// JavaScript Document
function checkform()
{
 
 var expTelephone = /[^\d\s-\.]+/;
 var expPin = /[^\d\s-\.]+/;
// var expDigit = /[^\d]+/;	

/*if (document.frmdownload.query.value.replace(/\s/g,'')=="") {
		alert("Please enter your query.");
		
		document.frmdownload.query.focus();
		return false;
	}*/
 
if (document.frmdownload.name.value.replace(/\s/g,'')=="") {
		alert("Please enter your name.");
		
		document.frmdownload.name.focus();
		return false;
	}
	
	if (document.frmdownload.company.value.replace(/\s/g,'')=="") {
		alert("Please enter your company.");
		
		document.frmdownload.company.focus();
		return false;
	}
	
	if (document.frmdownload.contact.value.replace(/\s/g,'')=="") {
		alert("Please enter your contact no.");
		
		document.frmdownload.contact.focus();
		return false;
	}
	else if(expTelephone.test(document.frmdownload.contact.value)==true)
	{
		alert("Contact number must be numeric.");
		
		document.frmdownload.contact.focus();
		return false;
	}
 

if(document.frmdownload.email.value.replace(/\s/g,'')=="")
	{
		alert("Please provide a valid email address.");
		document.frmdownload.email.value="";
		
		document.frmdownload.email.focus();
		return false;
	}
	else if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.frmdownload.email.value))
	{
		alert("Please provide a valid email address.")
		document.frmdownload.email.focus();
		return false;
	}
	


	


 document.frmdownload.submit();	

}	

function isNumberKey(evt)
     {
        var charCode = (evt.which) ? evt.which : event.keyCode
        if (charCode > 31 && (charCode < 48 || charCode > 57))
           return false;

        return true;
     }
