function validEmail(email)
{
	strProperAt = "@";
	strProperPer = ".";
	properAt = email.indexOf(strProperAt);
	if ( properAt == -1 )
	{
		return false;
	}
	if ( properAt != email.lastIndexOf(strProperAt) )
	{
		return false;	
	}
	properLast = email.lastIndexOf(strProperPer);
	if ( properLast == -1 )
	{
		return false;	
	}
	if ( properAt > properLast )
	{
		return false;	
	}
	if (properAt == 0)
	{
			return false;
	}
	if ( properLast < (properAt + 2))
	{
			return false;     
	}                               
	if ( email.length < 5)
	{
			return false;
	}
	if ( email.length > 60)
	{
			return false;
	}
	if (properLast == (email.length - 1))
	{
			return false;     
	}
	return true;
}

function chkForm() {
	loadnow = true;
	mfields = "";

	if(document.signup.email.value == null || document.signup.email.value == "" || validEmail(document.signup.email.value)==false){
		loadnow = false;
		document.signup.email.style.background="#FAF3C5";
		document.signup.email.value="";
		mfields += "Specify a valid email\n";
	}
	else {
		document.signup.email.style.background="ffffff";
	}

	if(loadnow == true){
		return true;
	}
	else {
		alert(mfields);
		return false;
	}
}

