function ValidateAlpha()
{
var keyCode = window.event.keyCode;
if (keyCode <48 || keyCode >57)
{
window.event.returnValue = false;
alert("Enter only Numerical Characters");
}
}
function validate()
{
  alert('RAM');
  document.return.submit();


}

function checkros(){


if (document.getElementById("fullname").value== "" )
		{
			
			 alert ( " Please enter Your Fullname " );
			  document.getElementById("fullname").focus();
		return false;
		}
 var iChars = "!@#$%^&*()+=-[]\\\';,./{}|\":<>?0123456789";

  for (var i = 0; i < document.form.fullname.value.length; i++) {
  	if (iChars.indexOf(document.form.fullname.value.charAt(i)) != -1) {
  	alert ("Your Fullname field has invalid characters. \nThese are not allowed.\n Please remove them and try again.");
	document.getElementById("fullname").focus();
  	return false;
  	}
  }

  var abc = document.getElementById("fullname").value;
 var bcd=abc.substring(0,1);
 if(bcd="" || bcd==null || bcd==" ")
 {
 alert("Invalid Input - 'First Character cannot be null'");
 document.getElementById("fullname").focus();
  	return false;
 }

var abc = document.getElementById("fullname").value;
//alert(abc.length);

  if(abc.charAt(abc.length-1,1) == " " || abc.charAt(abc.length-1,1) ==null)
{
alert("Invalid Input - 'Last Character cannot be null'");
document.getElementById("fullname").focus();
  	return false;
}





		
if ( document.getElementById("Email").value== "" )
		{
			
			 alert ( " Please enter Your Email " );
			  document.getElementById("Email").focus();
			 return false;
			 
		}
if (document.getElementById("Email").value.indexOf("@") == -1)
    {
        alert(" Please enter a valid e-mail address.");
        document.getElementById("Email").focus();
        return false;
    }


if (document.getElementById("Email").value.indexOf(".") == -1)
    {
        alert(" Please enter a valid e-mail address.");
          document.getElementById("Email").focus();
        return false;
    }


 var abc = document.getElementById("Email").value;
 var bcd=abc.substring(0,1);
 if(bcd="" || bcd==null || bcd==" ")
 {
 alert("Invalid Input - 'First Character cannot be null'");
 document.getElementById("Email").focus();
  	return false;
 }

var abc = document.getElementById("Email").value;
//alert(abc.length);

  if(abc.charAt(abc.length-1,1) == " " || abc.charAt(abc.length-1,1) ==null)
{
alert("Invalid Input - 'Last Character cannot be null'");
document.getElementById("Email").focus();
  	return false;
}
   var iChars = "!#$%^&*()+=-[]\\\';,/{}|\":<>?";
     for (var i = 0; i < document.form.Email.value.length; i++) {
  	if (iChars.indexOf(document.form.Email.value.charAt(i)) != -1) {
  	alert ("Invalid Email Id. \n Please Check");
	document.getElementById("Email").focus();
  	return false;
  	}
  }
	var at="@"
	var dot="."
	var lat=abc.indexOf(at);
      var lstr=abc.length;
      var ldot=abc.indexOf(dot);
          
     if (abc.indexOf(at)==-1)
         {
	    alert("Invalid E-mail ID");
	    return false;
	   }
     if (abc.indexOf(at)==-1 || abc.indexOf(at)==0 || abc.indexOf(at)==lstr){
		   alert("Invalid E-mail ID");
		   return false;
		}
if (abc.indexOf(dot)==-1 || abc.indexOf(dot)==0 || abc.indexOf(dot)==lstr){
		    alert("Invalid E-mail ID");
		    return false;
		}
	 if (abc.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail ID");
		    return false;
		 }
        if (abc.substring(lat-1,lat)==dot || abc.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail ID");
		    return false;
		 }
           if (abc.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail ID");
                 
		    return false;
		 }
           if (abc.indexOf(dot,(lat+2))==lstr-1){
		    alert("Invalid E-mail ID");
                 
		    return false;
		 }

           if ((abc.indexOf(dot,(lat+2))+2 ==lstr)||(abc.indexOf(dot,(lat+2))+5 <=lstr)){
		    alert("Invalid E-mail ID");
                 
		    return false;
		 }
           	 if (abc.indexOf(" ")!=-1){
		    alert("Invalid E-mail ID");
		    return false;
		 }
     
     
   if ((abc.indexOf(dot,(lat+2))+3).value ==0){
		    alert("Invalid E-mail ID");
               
		    return false;
		 }
           
             

if ( document.getElementById("designation").value== "" )
		{
			
			 alert ( " Please enter Your Designation " );
			  document.getElementById("designation").focus();
return false;
		}


		 var iChars = "!@#$%^&*()+=-[]\\\';,./{}|\":<>?0123456789";

  for (var i = 0; i < document.form.designation.value.length; i++) {
  	if (iChars.indexOf(document.form.designation.value.charAt(i)) != -1) {
  	alert ("Your Designation field has invalid characters. \nThese are not allowed.\n Please remove them and try again.");
		  document.getElementById("designation").focus();
  	return false;
  	}
  }


var abc = document.getElementById("designation").value;
 var bcd=abc.substring(0,1);
 if(bcd="" || bcd==null || bcd==" ")
 {
 alert("Invalid Input - 'First Character cannot be null'");
 document.getElementById("designation").focus();
  	return false;
 }

var abc = document.getElementById("designation").value;
//alert(abc.length);

  if(abc.charAt(abc.length-1,1) == " " || abc.charAt(abc.length-1,1) ==null)
{
alert("Invalid Input - 'Last Character cannot be null'");
document.getElementById("designation").focus();
  	return false;
}

		
if ( document.getElementById("company").value== "" )
		{
			
			 alert ( " Please enter Your Company Name " );

			 document.getElementById("company").focus();
			return false;
		}

var iChars = "!@#$%^&*()+=-[]\\\';,./{}|\":<>?";

  for (var i = 0; i < document.form.company.value.length; i++) {
  	if (iChars.indexOf(document.form.company.value.charAt(i)) != -1) {
  	alert ("Your Company field has special characters. \nThese are not allowed.\n Please remove them and try again.");
	 document.getElementById("company").focus();
  	return false;
  	}
  }

var abc = document.getElementById("company").value;
 var bcd=abc.substring(0,1);
 if(bcd="" || bcd==null || bcd==" ")
 {
 alert("Invalid Input - 'First Character cannot be null'");
 document.getElementById("company").focus();
  	return false;
 }

var abc = document.getElementById("company").value;
//alert(abc.length);

  if(abc.charAt(abc.length-1,1) == " " || abc.charAt(abc.length-1,1) ==null)
{
alert("Invalid Input - 'Last Character cannot be null'");
document.getElementById("company").focus();
  	return false;
}






		
if ( document.getElementById("telephone").value== "" )
		{
			
			 alert ( " Please enter Your Telephone " );
			  document.getElementById("telephone").focus();
			 return false;
		}


		if (!isFinite(parseInt(document.getElementById("telephone").value))) {

         alert ( " Please enter Valid Phone Number " );
		  document.getElementById("telephone").focus();
		 return false;
}
		
	
var iChars = "!@#$%^&*()=[]\\\';,./{}|\":<>?";

  for (var i = 0; i < document.form.telephone.value.length; i++) {
  	if (iChars.indexOf(document.form.telephone.value.charAt(i)) != -1) {
  	alert ("Your Telephone field has Invalid characters. \nThese are not allowed.\n Please remove them and try again.");
	document.getElementById("telephone").focus();
  	return false;
  	}
  }

var abc = document.getElementById("telephone").value;
 var bcd=abc.substring(0,1);
 if(bcd="" || bcd==null || bcd==" ")
 {
 alert("Invalid Input - 'First Character cannot be null'");
 document.getElementById("telephone").focus();
  	return false;
 }

var abc = document.getElementById("telephone").value;
//alert(abc.length);

  if(abc.charAt(abc.length-1,1) == " " || abc.charAt(abc.length-1,1) ==null)
{
alert("Invalid Input - 'Last Character cannot be null'");
document.getElementById("telephone").focus();
  	return false;
}

		  
  if ( document.getElementById("country").value== "" )
		{
			 alert ( " Please choose Country " );

			  document.getElementById("country").focus();
			 return false;
			 }
 if ( document.getElementById("Industry").value== "" )
		{
			 alert ( " Please choose Industry " );
			  document.getElementById("Industry").focus();
			  return false;
			 }
if ( document.getElementById("hearabtus").value== "" )
		{
			 alert ( " Please choose How did you hear about us? " );
			 document.getElementById("hearabtus").focus();
			  return false;
			 }

			 
			 if ( document.getElementById("message").value== "" )
		{
			 alert ( " Please Write your message " );
			 document.getElementById("message").focus();
			  return false;
			 }




var iChars = "!@#$%^&*()+=-[]\\\';/{}|\":<>?";

  for (var i = 0; i < document.form.message.value.length; i++) {
  	if (iChars.indexOf(document.form.message.value.charAt(i)) != -1) {
  	alert ("Your Message field has special characters. \nThese are not allowed.\n Please remove them and try again.");
	document.getElementById("message").focus();
  	return false;
  	}
  }
  

if (document.getElementById("message").value.length > 250)
{
alert('You have exceeded the Character Limit!');
return false;
}



return true;


}
