// Validating the Contact Us Form
function ContactCheck() {
	d = document.cntctus;

	if (d.AdvertiserName.value.length<2) {
	   alert("Please enter the Full Name...");
	   d.AdvertiserName.select();
	   d.AdvertiserName.focus();
           return false;
	}

	if (d.AdvertiserName.value.charAt(0) == " " ) {
	   alert("Please enter the Full Name...");
	   d.AdvertiserName.select();
	   d.AdvertiserName.focus();
           return false;
	}
	if (d.Address.value.length<2) {
	   alert("Please enter the Address...");
	   d.Address.select();
	   d.Address.focus();
           return false;
	}

	if (d.Address.value.charAt(0) == " " ) {
	   alert("Please enter the Address...");
	   d.Address.select();
	   d.Address.focus();
           return false;
	}
	if( (d.Mobile.value.length<6) || (isNaN(d.Mobile.value) == true )) {
		alert("Please enter the Mobile No... ");
  		d.Mobile.focus();
		d.Mobile.select();
		return false;
        } 

	if (d.Mobile.value.charAt(0) == " "){
		alert("Please enter the Mobile No...");
  		d.Mobile.focus();
		d.Mobile.select();
		return false;
        }


	if (d.Email.value.length<4){
		alert("Please enter your Email-ID");
  		d.Email.focus();
		d.Email.select();
		return false;
        }
    	if(d.Email.value.indexOf('@')<1){
		alert("Please note the e-mail id must have @")
		d.Email.focus();
		d.Email.select();
		return false;
	}
	if(d.Email.value.indexOf('.')<4){
		alert("Please enter your correct e-mail")
		d.Email.focus();
		d.Email.select();
		return false;
	}
	var emaillen = d.Email.value.length;
	if(d.Email.value.lastIndexOf('.')>(emaillen-3)){
		alert("Please specify whether you belong .com or .net or .org etc...");
		d.Email.focus();
		d.Email.select();
		return false;
	}
	var atpos = d.Email.value.indexOf('@');
	var dotpos = d.Email.value.indexOf('.');
	if((dotpos-atpos)<4){
		alert("Please mention ...@ where you are?");
		d.Email.focus();
		d.Email.select();
		return false;
	}

 
	if (d.Ad_Content.value.length < 5) {
		alert("Please enter the Your Ad Content... ");
  		d.Ad_Content.focus();
		d.Ad_Content.select();
		return false;
        } 
	if (d.Ad_Content.value.charAt(0) == " "){
		alert("Please enter the Your Ad Content... ");
  		d.Ad_Content.focus();
		d.Ad_Content.select();
		return false;
         }
	return true;
}
