<!--


function validate()
{
var flag;
var url;
url=window.location.href;
phone=document.query.txtphone.value;
document.query.url.value=url;

flag=true;
var mail=document.query.txtmail.value;

var invalidChar = " *|,\":<>/[]{}`\';()&$#%";

for (var i = 0; i < mail.length; i++) 
   {
      if (invalidChar.indexOf(mail.charAt(i)) != -1)
      	{
         alert("Please enter a valid e-mail ID!!");
				flag=false;
				document.query.txtmail.focus();
				return false;
       }
   }
			

if(mail!="")
	{
		check1=mail.indexOf("@");
		check2=mail.indexOf(".");
		if(check1==-1 || check2==-1)
			{
				alert("Please Enter a valid e-mail ID!!");
				flag=false;
				document.query.txtmail.focus();
				return false;
			}
		if((check1-check2)==1 || (check1-check2)==-1)
			{
				alert("Please Enter a valid e-mail ID!!");
				flag=false;
				document.query.txtmail.focus();
				return false;
			}
		
	}

if(mail=="")
{
				alert("Please Enter your e-mail ID!!");
				flag=false;
				document.query.txtmail.focus();
				return false;
}

// Phone Number validation
	var digit = "12345687890";

  if (document.query.txtphone.value == "")
  {
    alert("Please fill in Phone Number!!");
	flag=false;
	document.query.txtphone.focus();
	return false;
  }
 
  for (var i = 0; i < document.query.txtphone.value.length; i++)
  {
    temp = document.query.txtphone.value.substring(i, i+1)

    if (digit.indexOf(temp) == -1 && document.query.txtphone.value != "")
    {
      alert("Phone Number must be in Numbers!!");
	  flag=false;
	  document.query.txtphone.value="";
	  document.query.txtphone.focus();
	  return false;
      break;
    }
  } 
  
// Phone Number validation end 



if(flag==true)
	{
		document.query.submit();
	}
}


// end the hiding comment --> 

