<!--

function validateForm()
{
	if(!(isEmail(document.frm.txtemail1.value)) || document.frm.txtemail1.value=="")
	{
		alert("Kindly Enter Your Correct E-mail Address");
		document.frm.txtemail1.focus();
	}
	else if(document.frm.txtemail1.value != document.frm.txtemail2.value)
	{
		alert("Your E-mails Doesnot match");
		document.frm.txtemail1.focus();
	}
	else if(document.frm.txtpass1.value == "")
	{
		alert("Kindly Enter The Password For Your Account")
		document.frm.txtpass1.focus();
	}
	else if(document.frm.txtpass1.value != document.frm.txtpass2.value)
	{
		alert("Your Passwords Doesnot Match");
		document.frm.txtpass1.value = "";
		document.frm.txtpass2.value = "";
		document.frm.txtpass1.focus();
	}
	else if(document.frm.iam.value == 0)
	{
		alert("Kindly Select Your Preference");
		document.frm.iam.focus();
	}
	else if(document.frm.month.value == 0)
	{
		alert("Kindly Select The Birth Month");
		document.frm.month.focus();
	}
	else if(document.frm.year.value == 0)
	{
		alert("Kindly Select The Year Of Birth");
		document.frm.year.focus();
	}
	else if(document.frm.country.value == 0)
	{
		alert("Kindly Select Your Country");
		document.frm.country.focus();
	}
	else if(document.frm.txtstate.value == "")
	{
		alert("Kindly Enter Your State/County/Province");
		document.frm.txtstate.focus();
	}
	else if(document.frm.txtcity.value == "")
	{
		alert("Kindly Enter Your City");
		document.frm.txtcity.focus();
	}
	//else if(document.frm.txtzip.value == "")
	//{
		//alert("Kindly Enter Zip Code");
		//document.frm.txtzip.focus();
	//}
	else if(document.frm.chkterms.checked == false)
	{
		alert("You Must Accept Terms & Conditions Before You Get Registered");
		document.frm.chkterms.focus();
	}
	else
	{
		document.frm.action = 'thanksSignUp.php';
		document.frm.submit();
	}
}
/////////////////////////////////
function isEmail (theStr) 
{
	var atIndex = theStr.indexOf('@');
 	var dotIndex = theStr.indexOf('.', atIndex);
 	var flag = true;
 	theSub = theStr.substring(0, dotIndex+1)
 	if ((atIndex < 1)||(atIndex != theStr.lastIndexOf('@'))||(dotIndex < atIndex + 2)||(theStr.length <= theSub.length)) 
 	{	 
 		flag = false; 
 	}
 	else 
	{ 
 		flag = true; 
 	}
 	return(flag);
}

//////////////////////////////////

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function runMessenger()
{
	window.open('showMessenger.php','','left=630,top=360,scrollbars=yes,resizable=yes,width=300,height=320');
}

function validateLogin()
{
	if (!(isEmail(document.loginform.txtusername.value)) || document.loginform.txtusername.value=="")
	{
		alert ("Kindly Enter Your Correct Username / Email First ");
		document.loginform.txtusername.focus();
		return false;
	}
	else if (document.loginform.txtpassword.value=="")
	{
		alert ("Kindly Enter The Password ");
		document.loginform.txtpassword.focus();
		return false;
	}
	else
	{
		document.loginform.action = 'checkLogin.php';
		document.loginform.submit();
	}
}
/////////////////////////////////////////
function isEmail (theStr) 
{
	var atIndex = theStr.indexOf('@');
 	var dotIndex = theStr.indexOf('.', atIndex);
 	var flag = true;
 	theSub = theStr.substring(0, dotIndex+1)
 	if ((atIndex < 1)||(atIndex != theStr.lastIndexOf('@'))||(dotIndex < atIndex + 2)||(theStr.length <= theSub.length)) 
 	{	 
 		flag = false; 
 	}
 	else 
	{ 
 		flag = true; 
 	}
 	return(flag);
}


function reload_paging(str)
{
	f = new String(str);
	fs = f.split("|");
	
	fsa = fs[0].split("&");
	fsb = fs[1].split("&");
	
	for (var i = 0; i < fsa.length; i++)
	{
		document.getElementById(fsa[i]).value = fsb[i];
	}
	
	document.form1.submit();
}

// -->