﻿function validate()
{	
	if(document.formdealer.txb_name.value=="")
		{
			alert("Enter your Name");
			document.formdealer.txb_name.focus();
			return false;
		}
	if(document.formdealer.txb_email.value=="")
		{
			alert("Enter your Email ID");
			document.formdealer.txb_email.focus();
			return false;
		}
	if(document.formdealer.txb_company.value=="")
	{
		alert("Enter your Company Name");
		document.formdealer.txb_company.focus();
		return false;
	}
		if(document.formdealer.txb_designation.value=="")
	{
		alert("Enter your Designation");
		document.formdealer.txb_designation.focus();
		return false;
	}
		if(document.formdealer.txb_city.value=="")
	{
		alert("Enter your City Name");
		document.formdealer.txb_city.focus();
		return false;
	}
		if(document.formdealer.txb_telephone.value=="")
		{
			alert("Enter your Mobile No");
			document.formdealer.txb_telephone.focus();
			return false;
		}
		if(document.formdealer.txb_comments.value=="")
	{
		alert("Enter your Comments");
		document.formdealer.txb_comments.focus();
		return false;
	}
}
function IsNumericspecial(strString,rewrite)
   //  check for valid numeric strings	
   {
   
   var strValidChars = "1234567890+./ ";
   var strChar;
   var blnResult = true;
   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
		 alert('Enter Numeric Values Only')
		 document.getElementById(rewrite).value="";
		 document.getElementById(rewrite).focus();
         }
      }
   return blnResult;
   document.formdealer.txb_telephone.value==""
   }
