function emailvalidate()
{
	a = document.getElementById('email');
	
		if(!(isEmail(a.value)))
		{
			alert("Please Enter the Email Address (abc@abc.com)","NewWindow");
			a.focus();
			return false;	
		}
	else
		{
			document.emailfrm.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 ChangeTextBoxStyle( textBoxId, textBoxValue, fontColor )
{
    var TextBoxElement = document.getElementById(textBoxId);
    TextBoxElement.value = textBoxValue;
    TextBoxElement.style.color=fontColor;
}

function ChangeTextBoxStyle1( textBoxId, textBoxValue, fontColor )
{
    var TextBoxElement = document.getElementById(textBoxId);
    TextBoxElement.value = textBoxValue;
    TextBoxElement.style.color=fontColor;
}
