function ValidatePage()
 {
    var whitespace="t\n\r";
    function isEmpty(s)
    {
       return((s==null)||(s.length==0))
    }//end of isEmpty()
    function isWhitespace(s)
    {
     var i;
     if(isEmpty(s))return true;
     for(i=0;i<s.length;i++)
         {
         var c=s.charAt(i);
         if (whitespace.indexOf(c)==-1)return false;
         }
	   return true;
     }//end of isWhitespace()
    function isEmail(s)
     {
      if(isEmpty(s))
      if(iswhitespace(s)) return false;
      var i=1;
      var slength=s.length;
      while((i<slength)&&(s.charAt(i)!="@")) {
       i++;
      }
     if((i>=slength)||(s.charAt(i)!="@")) return false;
     else i+=2
     while((i<slength)&&(s.charAt(i)!="."))
     {
      i++;
      }
     if((i>=slength-1)||(s.charAt(i)!="."))return false;
     else return true;
     }	 //end of isEmail()
    
	function isCharsInBag(s,bag)
    {
     var i;
     for(i=0;i<s.length;i++)
     {
      var c=s.charAt(i);
      if(bag.indexOf(c)==-1)
      return false;
     }
      return true;
     }//end of isCharsInBag
	if(document.form2.name.value==""){
	alert("Name Can't be Blank");
	document.form2.name.focus();
	return false;
	}
     var flag=0;
     if(document.form2.email.value=="")
     {
	 alert("Email Field can't be Blank");
	document.form2.email.focus();
	 flag=1;
     }

    if(flag==1)   {
	  return false;
      }
     if(flag==0)   {
	var email=document.form2.email.value;
	if(!isEmail(email))
	{
		alert("Please enter the Email Address in Proper format");
		document.form2.email.focus();
		return false;
	}
}
   	if(document.form2.message.value==""){
	alert("Message Can't be Blank");
	document.form2.message.focus();
	return false;
	}
	else
	{
	document.form2.method="post";
	document.form2.action="submit_quickcontact.php";
	document.form2.submit();
	
	}
	return false;
  }//end of function ValidatePage()