// JavaScript Document

function funcontact() {

	var mail = document.getElementById('email').value;
	var SecurityCode = document.getElementById('frmSecurityCode').value;
	
	if (document.getElementById('firstname').value=='') {

		alert("Please enter your first name"); 
		
		document.getElementById('firstname').focus(); return false; 
		
	}

	if (document.getElementById('lastname').value=='') {

		alert("Please enter your last name"); 

		document.getElementById('lastname').focus(); return false; 

	}

	if (document.getElementById('email').value=='') {

		alert("Please enter your email"); 

		document.getElementById('email').focus(); return false; 

	}

	if(mail!=''){

		var s = document.getElementById('email').value;
	
		var i = 1,Length = s.length,result;
	
		if(s==""){
	
			alert("Email Address should not be empty");
	
			document.getElementById('email').focus();
	
			return false;
	
		}

		while((i<Length) && (s.charAt(i) != '@')) i++;
	
			if ((i == Length) || (s.charAt(i) != '@')){
	
				alert("Invalid Email Address");
	
				document.getElementById('email').focus();
	
				return false;
	
			}
	
			i+=2;

		while((i<Length) && (s.charAt(i) != '.')) i++;
	
			if ((i == Length) || (s.charAt(i) != '.')){
	
				alert("Invalid Email Address");
	
				document.getElementById('email').focus();
	
				return false;
	
			}
	
			if (i+1 >= Length){
	
				alert("Invalid Email Address");
	
				document.getElementById('email').focus();
	
				return false;
	
			}
	}
	if (document.getElementById('frmSecurityCode').value=='') {

		alert("Please enter verification code"); 

		document.getElementById('frmSecurityCode').focus(); 
		return false; 
	}
}
function funlogin()
{
		if (document.aspnetForm.ctl00$Body$CTRL1504$lgnMainLogin$UserName.value=='') {
		alert("Please enter user name"); 
		document.aspnetForm.ctl00$Body$CTRL1504$lgnMainLogin$UserName.focus(); 
		return false; 
		}
		if (document.aspnetForm.ctl00$Body$CTRL1504$lgnMainLogin$Password.value=='') {
		alert("Please your password"); 
		document.aspnetForm.ctl00$Body$CTRL1504$lgnMainLogin$Password.focus(); 
		return false; 
		}
}
