<!--
function validate()
{
x=document.myForm;
altmsg="is a mandatory field. Kindly fill it";
altmsg2="is in invalid format. Please correct";
c1=x.country_code.value;
c2=x.phone.value;

if (x.first_name.value==""){
alert ("First name is a mandatory field. Kindly fill it");
x.first_name.focus();
return false ;
}
if (x.family_name.value==""){
alert ("Last name is a mandatory field. Kindly fill it");
x.family_name.focus();
return false ;
}

if (x.email.value==""){
alert ("Email is a mandatory field. Kindly fill it");
x.email.focus();
return false ;
}


at=x.email.value.indexOf("@")
if (at==-1)
       {
       alert("Email is in invalid format. Please correct");
       x.email.focus();
       return false;
       }

if (x.country_code.value==""){
alert ("Contact Number(country code) is a mandatory field. Kindly fill it");
x.country_code.focus();
return false ;
}

if(c1.length>0)
{
ttl=c1.length;
for (f=0;f<ttl;f++)
{
checkit=c1.charCodeAt(f);
if (checkit<48 || checkit>57)
{
alert ("Country Code is in invalid format. Please correct");
x.country_code.focus();
return false;
}
}
}

if (x.city_code.value==""){
alert ("Contact Number(city code) is a mandatory field. Kindly fill it");
x.city_code.focus();
return false ;
}

if (x.phone.value==""){
alert ("Contact Number(phone number) is a mandatory field. Kindly fill it");
x.phone.focus();
return false ;
}


if(c2.length>0)
{
ttl=c2.length;
for (f=0;f<ttl;f++)
{
checkit=c2.charCodeAt(f);
if (checkit<48 || checkit>57)
{
alert ("Contact Number(phone number) is in invalid format. Please correct");
x.phone.focus();
return false;
}
}
}

if (x.fromwhere.value==""){
alert ("How did you hear about us?");
x.fromwhere.focus();
return false ;
}


var no=document.getElementById("fromwhere");
var option=no.options[no.selectedIndex].text;
if(option=="Select"){
alert("How did you hear about us?");
return false;
}


} // ends


//-->