
function Checkall()

{
	// check name
	if(document.form.txtname.value == "" || document.form.txtname.value == "Name")
	{
		document.getElementById('name_alert').style.display = 'block';
		document.form.txtname.focus();
		return false;
	}	
	else{
		document.getElementById('name_alert').style.display = 'none';
	}
	if (document.form.txtname.value.match(/^[a-zA-Z ]+$/)){
		document.getElementById('name_alert').style.display = 'none';		
	}
	else{
		document.getElementById('name_alert').style.display = 'block';
		document.form.txtname.focus();
		return false;
	}
	
	// check Industry
	if(document.form.txtind.value == "" || document.form.txtind.value == "Industry")
	{
		document.getElementById('ind_alert').style.display = 'block';
		document.form.txtind.focus();
		return false;
	}
	else
	{
		document.getElementById('ind_alert').style.display = 'none';
	}
	
		
// check mobile
	if(document.form.txtmobile.value == "" || document.form.txtmobile.value == "Mobile" || document.form.txtmobile.value.length <= 9)
	{
		document.getElementById('mobile_alert').style.display = 'block';
		document.form.txtmobile.focus();
		return false;
	}
	else
	{
		document.getElementById('mobile_alert').style.display = 'none';
	}
	
	if (document.form.txtmobile.value.match(/^[0-9]+$/))
	{
		document.getElementById('mobile_alert').style.display = 'none';
	}
	else
	{
		document.getElementById('phone_alert').style.display = 'block';
		document.form.txtmobile.focus();
		return false;
	}
var digits="0123456789"
var integernum=document.form.txtmobile.value;
 for (var i=0;i<integernum.length;i++)
 {
	temp1=integernum.substring(i,i+1)
	if(integernum.substring(0,1)!="8")
	{
		if(integernum.substring(0,1)!="9")
		{
			alert ("Mobile Number starts with - 8 or 9");
			document.form.txtmobile.focus();
			return false;
		}
	}
	if (digits.indexOf(temp1)== -1)
	{
		alert ("Enter A Valid Mobile Number");
		document.form.txtmobile.focus();
		return false;
	}
}
	//check mail
	if(document.form.txtmail.value == "" || document.form.txtmail.value == "E-Mail")
	{
		document.getElementById('mail_alert').style.display = 'block';
		document.form.txtmail.focus();
		return false;
	}	
	else{
		document.getElementById('mail_alert').style.display = 'none';
	
	}
	var ss=document.form.txtmail.value;
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
	 if (!(filter.test(ss)))
	{
		document.getElementById('mail_alert').style.display = 'block';
		document.form.txtmail.focus();
		return false;
	}
	else{
	document.getElementById('mail_alert').style.display = 'none';
	}
	
	
	
	// check city
	if(document.form.txtcity.value == "" || document.form.txtcity.value == "City")
	{
		document.getElementById('city_alert').style.display = 'block';
		document.form.txtcity.focus();
		return false;
	}	
	else{
		document.getElementById('city_alert').style.display = 'none';
	}
	if (document.form.txtcity.value.match(/^[a-zA-Z ]+$/)){
		document.getElementById('city_alert').style.display = 'none';		
	}
	else{
		document.getElementById('city_alert').style.display = 'block';
		document.form.txtcity.focus();
		return false;
	}
	
//	requirement check
	if(document.form.txtcity2.value == "" || document.form.txtcity2.value == "Specify your requirements")
	{
		document.getElementById('req_alert').style.display = 'block';
		document.form.txtcity2.focus();
		return false;
	}	
	else{
		document.getElementById('req_alert').style.display = 'none';
	}
	
var ss=new Date();
var mn=ss.getMonth();
var day=ss.getDate();
var year=ss.getFullYear();
var hor=ss.getHours();
var mnut=ss.getMinutes();
var sec=ss.getSeconds();
var mon=mn+1;
var final=mon+"/"+day+"/"+year+" "+hor+":"+mnut+":"+sec;
document.getElementById('hdate').value=final;

}


