// JavaScript Document

function emailCheck(s)
{
	if(!(s.match(/^[\w]+([_|\.-][\w]{1,})*@[\w]{2,}([_|\.-][\w]{1,})*\.([a-z]{2,4})$/i) ))
    {
		alert("Please Enter Valid Email Address");
		return false;
	}
	else
	{
		return true;
	}	
}


function Trim(str)
{  while(str.charAt(0) == (" ") )
  {  str = str.substring(1);
  }
  while(str.charAt(str.length-1) == " " )
  {  str = str.substring(0,str.length-1);
  }
  return str;
}


/*function phonechaeck(s)
{
	if(!(s.match(/^([a-z0-9\-\])$/i) ))
    {
		alert("Please Enter Valid phone number");
		return false;
	}
	else
	{
		return true;
	}	
}



function checkPhone(phone)
{
  phoneRegex = /^\(\d\d\d\) \d\d\d-\d\d\d\d$/;
 if( !phone.match( phoneRegex ) ) {
  alert("Please enter a valid phone number");
  return false;
 }
 return true;
}*/