// JavaScript Document

function validfields()
	{
		
		var a=document.check.txtname.value;
		var b=document.check.txtcompany.value;
		var c=document.check.txtemail.value;
		var d=document.check.txtphone.value;
		var e=document.check.txtselect.value;
		var f=document.check.txtsubject.value;
		var g=document.check.txtmessage.value;
		if(a=="")
		{
			alert("Please Enter the Name");
			document.check.txtname.focus();
			return false;
		}
		
		if(b=="")
		{
			alert("Please Enter Company Name");
			document.check.txtcompany.focus();
			return false;
		}		
				
		if(c=="")
		{
			alert("Please Enter Email Address");
			document.check.txtemail.focus();
			return false;
		}
		var cmail = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

		if(!(c.match(cmail)))
		{
			alert("Please Enter Valid Email Address");
			return false;
		}
		
		if(d=="")
		{
			alert("Please Enter the Phone Number");
			document.check.txtphone.focus();
			return false;
		}		
		var num=/[0-9]/;
		if(num.exec(d)==null)
		{
			alert("Numeric Character Only Allowed");
			document.check.txtphone.focus();
			return false;
		}
		
		if(e=="")
		{
			alert("Please Tell How did you hear about Blogstand?");
			document.check.txtselect.focus();
			return false;
		}
		if(f=="")
		{
			alert("Please Enter the Subject");
			document.check.txtsubject.focus();
			return false;
		}
		if(g=="")
		{
			alert("Please Enter Message Field");
			document.check.txtmessage.focus();
			return false;
		}
		
	}
	
	function validfields1()
	{
		var a=document.check.txtname.value;
		var b=document.check.txtcompany.value;
		var c=document.check.txtemail.value;
		var d=document.check.txtphone.value;
		var e=document.check.txtaddr.value;
		var f=document.check.txtcity.value;
		var g=document.check.txtstate.value;
		var h=document.check.txtzip.value;
		var i=document.check.txtsname.value;
		var j=document.check.txturl.value;
		var k=document.check.txtselect.value;
		
		
		
		if(a=="")
		{
			alert("Please Enter the Name");
			document.check.txtname.focus();
			return false;
		}
		
		if(b=="")
		{
			alert("Please Enter Company Name");
			document.check.txtcompany.focus();
			return false;
		}		
				
		if(c=="")
		{
			alert("Please Enter Email Address");
			document.check.txtemail.focus();
			return false;
		}
		var cmail = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

		if(!(c.match(cmail)))
		{
			alert("Please Enter Valid Email Address");
			document.check.txtemail.focus();
			return false;
		}
		
		if(d=="")
		{
			alert("Please Enter the Phone Number");
			document.check.txtphone.focus();
			return false;
		}		
		var num=/[0-9]/;
		if(num.exec(d)==null)
		{
			alert("Numeric Character Only Allowed");
			document.check.txtphone.focus();
			return false;
		}
		
		if(e=="")
		{
			alert("Please Enter the Address");
			document.check.txtaddr.focus();
			return false;
		}
		if(f=="")
		{
			alert("Please Enter the City");
			document.check.txtcity.focus();
			return false;
		}
		if(g=="0")
		{
			alert("Please Select State Field");
			document.check.txtstate.focus();
			return false;
		}
		
		
		if(h=="")
		{
			alert("Please Enter the Zip");
			document.check.txtzip.focus();
			return false;
		}
		
		var expzip=/[0-9]/;
		if(expzip.exec(h)==null)
		{
			alert("Numeric Character Only Allowed");
			document.check.txtzip.focus();
			return false;
		}
		

		if(i=="")
		{
			alert("Please Enter the Sitename");
			document.check.txtsname.focus();
			return false;
		}
		if(j=="")
		{
			alert("Please Enter the URL");
			document.check.txturl.focus();
			return false;
		}
		if(k=="")
		{
			alert("Please Tell How did you hear about Blogstand?")
			document.check.txtselect.focus();
			return false;
		}
		if(!document.getElementById('txtcat1').checked && !document.getElementById('txtcat2').checked && !document.getElementById('txtcat3').checked && !document.getElementById('txtcat4').checked && !document.getElementById('txtcat5').checked && !document.getElementById('txtcat6').checked && !document.getElementById('txtcat7').checked && !document.getElementById('txtcat8').checked && !document.getElementById('txtcat9').checked && !document.getElementById('txtcat10').checked)
		{
			alert("Please Select Category");
			document.getElementById('txtcat1').focus();
			return false;
		}
		if(document.getElementById('txtvisitor').value == "")
		{
			alert("Please Select Monthly Unique visitors");
			document.getElementById('txtvisitor').focus();
			return false;
		}
		if(document.getElementById('txtviews').value == "")
		{
			alert("Please Select Monthly Page views");
			document.getElementById('txtviews').focus();
			return false;
		}
	}
	

