<!--
function fnCheck()
{
	Firstname = document.frmLandPage.TxtFirstName.value;
	LastName  = document.frmLandPage.TxtlastName.value;
	Email	  = document.frmLandPage.Txtemail.value;
	EmailCon  = document.frmLandPage.TxtConfirmEmail.value;
	Phone1	  = document.frmLandPage.Txtphone1.value;
	Phone2	  = document.frmLandPage.Txtphone2.value;
	Phone3	  = document.frmLandPage.Txtphone3.value;

	
	if (Firstname == '')
	{
		alert('Please enter the First Name');
		document.frmLandPage.TxtFirstName.focus();
		return false;
	}
	else if(LastName == '')
	{
		alert('Please enter the Last Name');
		document.frmLandPage.TxtlastName.focus();
		return false;
	}
	else if(Email == '')
	{
		alert('Please enter the Email');
		document.frmLandPage.Txtemail.focus();
		return false;
	}
	else if(ValidEmail()!=true)
	{
		errmsg = ValidEmail();
		alert(errmsg);	
		document.frmLandPage.Txtemail.focus();
	}
	else if(EmailCon == '')
	{
		alert('Please re-enter the Email');
		document.frmLandPage.TxtConfirmEmail.focus();		
		return false;
	}
	else if(EmailCon != Email)
	{
		alert('Your Email Id does not match with the previous one ');
		document.frmLandPage.TxtConfirmEmail.focus();
		return false;
		
	}
	else if(Phone1 == '')
	{
		alert('Please re-enter the Phone1');
		document.frmLandPage.Txtphone1.value;
		return false;
	}
	else if ( !isCharsOk( Phone1, "0123456789 +-"))
	{
		alert("Phone number should not contain any special characters");
		document.frmLandPage.Txtphone1.focus();
	}
	else if(Phone2 == '')
	{
		alert('Please re-enter the Phone2');
		document.frmLandPage.Txtphone2.value;
		return false;
	}
	else if ( !isCharsOk( Phone2, "0123456789 +-"))	
	{
		alert("Phone number should not contain any special characters");
		document.frmLandPage.Txtphone2.focus();
	}
	else if(Phone3 == '')
	{
		alert('Please re-enter the Phone2');
		document.frmLandPage.Txtphone3.value;
		return false;
	}
	else if ( !isCharsOk( Phone3, "0123456789 +-"))
	{
		alert("Phone number should not contain any special characters");
		document.frmLandPage.Txtphone3.focus();
	}
	else
	{
		document.frmLandPage.action = "SaveLP-1A.asp?qryFrom=LP01-a.asp";
		document.frmLandPage.submit();
		return false;
	}
}
function ValidEmail()	// email validation
	{	
	var email1,atemail,atoccurance,splitter;
	email1 = document.frmLandPage.Txtemail.value;
	atemail=email1.indexOf("@");
	
	if (atemail==-1)
		{
			return "Your E-Mail id seems incorrect. Please check the '@' and '.' characters in your E-Mail id.";
		}
	else
	{
		atoccurence=email1.indexOf("@");
		dotcheck=email1.indexOf(".",atoccurence);
				
		 if (dotcheck==-1)
			{
				return "Your E-Mail id seems incorrect. Please check";
			}	
				
			splitter=email1.substring(atoccurence+1,2);
		if (splitter==".")
		{
			return "Your E-Mail id seems incorrect. Please check";
		}
		if(email1.indexOf("@.")!=-1)
		{
			return "Email should not have '@' immediately followed by '.'";
		}
								
		len=email1.length-1;
		if(email1.substr(len,1)==".")
		{
			return "Email should not have '.' as the last character";
		}									
					
		checky = email1.substr(len,1);
		if ((checky=="~")||(checky=="!")||(checky=="#")||(checky=="$")||(checky=="$")||(checky=="%")||(checky=="^")||(checky=="&")||(checky=="*")||(checky=="(")||(checky==")")||(checky=="_")||(checky=="+")||(checky=="|")||(checky=="-")||(checky=="?")||(checky==">")||(checky=="<")||(checky=="/")||(checky=="{")||(checky=="}")||(checky=="[")||(checky=="]")||(checky=="'")||(checky==":")||(checky==";")||(checky==",")||(checky=="`"))
		{
			return "Your E-Mail id seems incorrect. Please check";
		}
											
		if(email1.substr(0,1)=="@")
		{
			return "Email should not have '@' as the first character";
		}
		if(email1.substr(0,1)==".")
		{
			return "Email should not have '.' as the first character";
		}
		var speChar=0;
		for(i=0;i<email1.length;i++)
		{
			if(email1.substr(i,1)=="@")
			{
			speChar+=1;
			}
		}
		if(speChar>1)
		{
			return "Email should not have more than one '@'";
		}
	}
	return true;
}
function isCharsOk(sFirstName, sList)
	 {
		var i,c;
		for (i = 0; i < sFirstName.length; i++)
		{
		      c = sFirstName.charAt(i);
		      	if (sList.indexOf(c) == -1)
				  return false; 
		}
		return true;
     }
//-->