function ValidateName(name)
{
var badchars="0123456789/<>;:@#$%^&*()";
for (var i=0; i < name.length; i++)
{
temp = "" +name.substring(i, i+1);

if (badchars.indexOf(temp) != -1)
{
alert("Bad-characters not allowed in name");
return false;
}
}
 }
function ValidateNumber(name)
{
var badchars="/<>;:@#$%^&*";
for (var i=0; i < name.length; i++)
{
temp = "" +name.substring(i, i+1);

if (badchars.indexOf(temp) != -1)
{
alert("Bad-characters not allowed in Phone number");
return false;
}
}
 //var ch_sID = document.signup.name.value;
 var ch_num_sID = name.substr(0,1);

if((ch_num_sID >= "a" && ch_num_sID <= "z") || (ch_num_sID >= "A" && ch_num_sID <= "Z"))
 {
 alert("First letter should be Number here!Try Again!!");
 //document.signup.name.focus();
 return false; 
 }
return true;
}
 
 
 


 function checkData()
 {
 
 
// validate name

if (document.signup.description.value == "") {
 alert("Please Describe Your Requirements.");
 document.signup.description.focus()
 return false } 

if (document.signup.subj.value == "") {
 alert("Please Describe Subject or purpose of enquiry.");
 document.signup.subj.focus()
 return false } 
 
if (document.signup.name.value == "") {
 alert("Sorry! Your Name should not be empty.Please fill in your name.");
 document.signup.name.focus()
 return false } 

if (document.signup.companyname.value == "") {
 alert("Sorry! Your Company Name should not be empty.Please fill in your Name.");
 document.signup.companyname.focus()
 return false } 

if (document.signup.desig.value == "") {
 alert("Sorry! Your Position / Designation should not be empty.Please fill in your Position / Designation.");
 document.signup.desig.focus()
 return false } 
 
if (document.signup.street.value == "") {
 alert("Sorry! Your Address should not be empty.Please fill in your Address.");
 document.signup.street.focus()
 return false } 
 
if (document.signup.cityname.value == "") {
 alert("Sorry! Your CITY should not be empty.Please fill in your CITY.");
 document.signup.cityname.focus()
 return false } 

if (document.signup.state.value == "") {
 alert("Sorry! Your STATE should not be empty.Please fill in your STATE.");
 document.signup.state.focus()
 return false } 

if (document.signup.zip.value == "") {
 alert("Sorry! Your PINCODE should not be empty.Please fill in your PINCODE.");
 document.signup.zip.focus()
 return false } 

if (document.signup.phone.value == "") {
 alert("Sorry! Your phone number should not be empty.Please fill in your phone number.");
 document.signup.phone.focus()
 return false } 



if (document.signup.email.value == "") {
 alert("Please Insert Your E-mail Address here.")
 
 document.signup.email.focus()
return false } 

if (document.signup.email.value.length < 7) {
 alert(" Your E-mail Address is too much short")
 
 document.signup.email.focus()
return false } 

if (document.signup.email.value.indexOf("@") < 1) {
 alert("@ missing in Your E-mail Address.")
 
 document.signup.email.focus()
return false } 

if (document.signup.email.value.indexOf(".") < 1) {
 alert("Something missing in Your E-mail-Address. Please enter a valid E-Mail Address.")
 
 document.signup.email.focus()
return false }  

document.signup.submit(); 
 return true; 
}








// function for Agree Before Submit 

var checkobj

function agreesubmit(el){
checkobj=el
if (document.all||document.getElementById){
for (i=0;i<checkobj.form.length;i++){  //hunt down submit button
var tempobj=checkobj.form.elements[i]
if(tempobj.type.toLowerCase()=="submit")
tempobj.disabled=!checkobj.checked
}
}
}

function defaultagree(el){
if (!document.all&&!document.getElementById){
if (window.checkobj&&checkobj.checked)
return true
else{
alert("Please read/accept terms to submit form")
return false
}
}
} 




function handleEnter (field, event) {
		var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
		if (keyCode == 13) {
			var i;
			for (i = 0; i < field.form.elements.length; i++)
				if (field == field.form.elements[i])
					break;
			i = (i + 1) % field.form.elements.length;
			field.form.elements[i].focus();
			return false;
		} 
		else
		return true;
	}      


