function validateFields(){
	
	/*if(document.frmOrder.package[0].checked==false){
	alert('check');
	}*/
	if((document.frmOrder.package[0].checked==false) && (document.frmOrder.package[1].checked==false) && (document.frmOrder.package[2].checked==false))
	{
	alert('Package should be choose');
	document.frmOrder.package[0].focus();
	return false;
	}

	if (document.frmOrder.txt_fname.value == "")
			{
			alert("FirstName is Required");
			document.frmOrder.txt_fname.focus();
			return false;	
			}
	if (document.frmOrder.txt_lname.value == "")
			{
			alert("LastName is Required");
			document.frmOrder.txt_lname.focus();
			return false;	
			}
	 if (document.frmOrder.txt_city.value=="")
		 {
		 alert("City is Required");
		 document.frmOrder.txt_city.focus();
		 return false; }
		
		if (document.frmOrder.txt_state.value=="")
		 {
		 alert("State is Required");
		 document.frmOrder.txt_state.focus();
		 return false; }
		 if (document.frmOrder.txt_country.value=="")
		 {
		 alert("Country is Required");
		 document.frmOrder.txt_country.focus();
		 return false; }
		 
		  if (document.frmOrder.txt_email.value == "")
			{
				alert("Email is required");
				document.frmOrder.txt_email.focus();
				return false;
			}
		else if (echeck(document.frmOrder.txt_email.value) == false){
				document.frmOrder.txt_email.value="";
				document.frmOrder.txt_email.focus();
				return false;
			}
		if (document.frmOrder.txt_logoname.value=="")
		 {
		 alert("Exact name to be used in your logo is required");
		 document.frmOrder.txt_logoname.focus();
		 return false;
		 }
		 
		 if (document.frmOrder.txt_bdesc.value == "")
			{
			alert("Please describe your business");
			document.frmOrder.txt_bdesc.focus();
			return false;	
			}
	
	return true;

	}  		
//function to validate Email
function echeck(str) {

		//alert(str);
		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalid E-mail")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail")
		    return false
		 }

 		 return true					
	}
