
function enquiry()
   {

         if(isBlank(document.enq.company_name.value))
		{
		alert("Please enter the Company Name");
		document.enq.company_name.value="";
		document.enq.company_name.focus();
		return false;
		}

         if(isBlank(document.enq.contact_name.value))
		{
		alert("Please enter the Contact Name");
		document.enq.contact_name.value="";
		document.enq.contact_name.focus();
		return false;
		}


         if(isBlank(document.enq.address1.value))
		{
		alert("Please enter the Address");
		document.enq.address1.value="";
		document.enq.address1.focus();
		return false;
		}

         if(isBlank(document.enq.phone_number.value))
		{
		alert("Please enter the Phone Number");
		document.enq.phone_number.value="";
		document.enq.phone_number.focus();
		return false;
		}

	if(isBlank(document.enq.phone_number.value)==false)
	{	
	
	
		var y="-";
			for(var j=0; j < document.enq.phone_number.value.length; j++)
	       		{
                		temp4=  document.enq.phone_number.value.substring(j,j+1);
				if(y.indexOf(temp4) == -1)
					{
					if(isNaN(temp4))
						{
						alert("Please enter in Numeric only");
						document.enq.phone_number.value="";
						document.enq.phone_number.focus();
						return false;
						}
					}	
	       		}
		}



	if(isBlank(document.enq.fax_number.value)==false)
	{	
	
	
		var y="-";
			for(var j=0; j < document.enq.fax_number.value.length; j++)
	       		{
                		temp4=  document.enq.fax_number.value.substring(j,j+1);
				if(y.indexOf(temp4) == -1)
					{
					if(isNaN(temp4))
						{
						alert("Please enter in Numeric only");
						document.enq.fax_number.value="";
						document.enq.fax_number.focus();
						return false;
						}
					}	
	       		}
		}


         if(isBlank(document.enq.city.value))
		{
		alert("Please enter the City");
		document.enq.city.value="";
		document.enq.city.focus();
		return false;
		}


         if(isBlank(document.enq.country.value))
		{
		alert("Please enter the Country");
		document.enq.country.value="";
		document.enq.country.focus();
		return false;
		}


    return true;  
 }

function isBlank(s)
 { 
  var len = s.length;
  var i;
      for(i = 0; i < len ; ++i)
  	  { 
   	if(s.charAt(i) != " ") return false;
  	  }
	return true;
 }

function badEmail(str) 
{
  
  var supported = 0;
  if (window.RegExp) 
     {
    var tempStr = "a";
    var tempReg = new RegExp(tempStr);
    if (tempReg.test(tempStr)) supported = 1;
     }
  if (!supported) 
    return (str.indexOf(".") <= 2) || (str.indexOf("@") < 0);
    var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
    var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
  return (r1.test(str) || !r2.test(str));
}

function emailName(str)
  {
  if(str != "")
      {
        var chars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_-@.";
           for(var i=0; i <  str.length; i++)
	       {
                temp3=  str.substring(i,i+1);
		if((chars.indexOf(temp3) == -1) )
			 {
			  return true;  
			 }
	       }
      }
   }
