function validate(){
    if ( document.contact.fname.value == "" ){
        document.getElementById("errors").innerHTML="Please fill <font style='text-decoration:blink;'><i>Your Name</i></font>";
	document.contact.fname.focus();
        return false;
    } if ( document.contact.phno.value == "" ) {
         document.getElementById("errors").innerHTML="Please fill <font style='text-decoration:blink;'><i>Your Contact No</i></font>";
	document.contact.phno.focus();
        return false;
    } if(document.contact.phno.value!=''){
	if(isNaN(document.contact.phno.value)){	 
	document.getElementById("errors").innerHTML="Please fill only <font style='text-decoration:blink;'><i>Numbers.</i></font>";	document.contact.phno.value="";
	document.contact.phno.focus();
	return false; } else if((document.contact.phno.value.charAt(0)!="9")&&(document.contact.phno.value.charAt(0)!="8")&&(document.contact.phno.value.charAt(0)!="7")) {
        document.getElementById("errors").innerHTML="Mobile No should start with <font style='text-decoration:blink;'><i>9.</i></font>";	
	document.contact.phno.value="";
	document.contact.phno.focus();
	return false; } else if (!(document.contact.phno.value.length == 10)) {
	document.getElementById("errors").innerHTML="Please fill valid <font style='text-decoration:blink;'><i>Mobile No.</i></font>";	
	document.contact.phno.focus();
	return false; } 
    }if ( document.contact.email.value == "" ){
         document.getElementById("errors").innerHTML="Please fill <font style='text-decoration:blink;'><i>Your Email Id </i></font>";
	document.contact.email.focus();
       return false;
    }if(document.contact.email.value!=''){
	if(!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.contact.email.value))){	 
	document.getElementById("errors").innerHTML="Please fill <font style='text-decoration:blink;'><i>Valid Email Id</i></font>";	
	document.contact.email.focus();
	return false; }
    }  if ( document.contact.msg.value == "" ){
         document.getElementById("errors").innerHTML="Please fill <font style='text-decoration:blink;'><i>Message</i></font>";
	document.contact.msg.focus();
       return false;
    }
    return true;
    
}



