function emailInvalid(s)
{
	if(!(s.match(/^[\w]+([_|\.-][\w]{1,})*@[\w]{1,}([_|\.-][\w]{1,})*\.([a-z]{1,4})$/i) ))
    {
		return false;
	}
	else
	{
		return true;
	}
}
function validateDate()
{
	var day=document.getElementById("bd").value;
	var month=document.getElementById("bm").value;
	var year=document.getElementById("by").value;
	leap=0;
	if ((year % 4 == 0) || (year % 100 == 0) || (year % 400 == 0)) {
      leap = 1;
   }
   if ((month == 2) && (leap == 1) && (day > 29)) {
      return false;
   }
   if ((month == 2) && (leap != 1) && (day > 28)) {
      return false;
   }
   /* Validation of other months */
   if ((day > 31) && ((month == "1") || (month == "3") || (month == "5") || (month == "7") || (month == "8") || (month == "10") || (month == "12"))) {
      return false;
   }
   if ((day > 30) && ((month == "4") || (month == "6") || (month == "9") || (month == "11"))) {
     return false;
   }
	return true;
	
}
function GetXmlHttpObject()
{
	if(window.XMLHttpRequest)
  	{
  		// code for IE7+, Firefox, Chrome, Opera, Safari
  		return new XMLHttpRequest();
  	}
	if(window.ActiveXObject)
  	{
  		// code for IE6, IE5
  		return new ActiveXObject("Microsoft.XMLHTTP");
  	}
	return null;
}

