
function isnotblank(myelement,mymessage)
{
	var mystring = myelement.value;
	var mylength = mystring.length;
if (mylength >=1)
{
return true;
}
else

{
alert(mymessage);
myelement.focus();
return false;
}

}

function matchpass(myelement1,myelement2,mymessage)
{
a = isnotblank(myelement1,"You must have to enter password");

if (a == true)
	{
		
		var pass1 = myelement1.value;
		var pass2 = myelement2.value;
		if (pass1 == pass2)
		{
			return true;
		}
		else 
		{
			alert(mymessage);
			myelement1.focus();
			return false;
		}
	}
	
}

//------------------------------------------------------------------
function isvalidpass(mystring)
{
var Capok = false;
var Smlok = false;
var Numok = false;
var psize = false;

var Stringsize = mystring.length;

if (Stringsize >= 6)

{
psize = true;
}



if (Stringsize > 0)
{

for (i = 0; i < Stringsize ; i++)
{
  if (mystring.charCodeAt(i) >= 65 && mystring.charCodeAt(i) <= 90)
  Capok = true;

  if (mystring.charCodeAt(i) >= 97 && mystring.charCodeAt(i) <= 122)
  Smlok = true;

  if (mystring.charCodeAt(i) >= 48 && mystring.charCodeAt(i) <= 57)
  Numok = true;

}
}

if (Capok == true && Smlok == true && Numok == true && psize == true)

return true
else
return false
}


function isvalidentry(mystring)
{
var Capok = false;
var Smlok = false;
var Numok = false;
var Stringsize = mystring.length;

if (Stringsize > 0)
{

for (i = 0; i < Stringsize ; i++)
{
  if (mystring.charCodeAt(i) >= 65 && mystring.charCodeAt(i) <= 90)
  Capok = true;

  if (mystring.charCodeAt(i) >= 97 && mystring.charCodeAt(i) <= 122)
  Smlok = true;

  if (mystring.charCodeAt(i) >= 48 && mystring.charCodeAt(i) <= 57)
  Numok = true;

}
}

if (Capok == true || Smlok == true || Numok == true)

return true
else
return false
}


function dovalidpass(myelement, mymessage)
{
mystring = myelement.value;
x = isvalidpass(mystring);

if (x == false)
{
window.alert(mymessage);
myelement.focus();
return false;
}
else
return true;
}

function dovalidentry(myelement, mymessage)
{
mystring = myelement.value;
x = isvalidentry(mystring);

if (x == false)
{
window.alert(mymessage);
myelement.focus();
return false;
}
else
return true;
}