function validate_form(thisform)
{

	//First Name
	if (thisform.txtName.value=="")
	{
		alert("Please enter a value for the \"Name\" field.");
		thisform.txtName.focus();
		return false;
	}
	
	//Company Name
	if (thisform.txtCompany.value=="")
	{
		alert("Please enter a value for the \"Company Name\" field.");
		thisform.txtCompany.focus();
		return (false);
	}	
	
	//Email Addresses
	var at="@";
	var dot=".";
	
	var lat_1=thisform.txtEmail.value.indexOf(at);
	var lstr_1=thisform.txtEmail.value.length;
	var ldot_1=thisform.txtEmail.value.indexOf(dot);
	if (thisform.txtEmail.value.indexOf(at)==-1){
	   alert("Invalid E-mail Address");
	   thisform.txtEmail.focus();
	   return (false);
	}

	if (thisform.txtEmail.value.indexOf(at)==-1 || thisform.txtEmail.value.indexOf(at)==0 || thisform.txtEmail.value.indexOf(at)==lstr_1){
	   alert("Invalid E-mail Address");
	   thisform.txtEmail.focus();
	   return (false);
	}

	if (thisform.txtEmail.value.indexOf(dot)==-1 || thisform.txtEmail.value.indexOf(dot)==0 || thisform.txtEmail.value.indexOf(dot)==lstr_1){
	    alert("Invalid E-mail Address");
	    thisform.txtEmail.focus();
	    return (false);
	}

	 if (thisform.txtEmail.value.indexOf(at,(lat_1+1))!=-1){
	    alert("Invalid E-mail Address");
	    thisform.txtEmail.focus();
	    return (false);
	 }

	 if (thisform.txtEmail.value.substring(lat_1-1,lat_1)==dot || thisform.txtEmail.value.substring(lat_1+1,lat_1+2)==dot){
	    alert("Invalid E-mail Address");
	    thisform.txtEmail.focus();
	    return (false);
	 }

	 if (thisform.txtEmail.value.indexOf(dot,(lat_1+2))==-1){
	    alert("Invalid E-mail Address");
	    thisform.txtEmail.focus();
	    return (false);
	 }
		
	 if (thisform.txtEmail.value.indexOf(" ")!=-1){
	    alert("Invalid E-mail Address");
	    thisform.txtEmail.focus();
	    return (false);
	 }



		var checkbox_choices = 0;
		if (eval (thisform.cbSubscription.length))
		{
			for(count=0; count<thisform.cbSubscription.length; count++)
			{
				if(thisform.cbSubscription[count].checked == true)
				{
					checkbox_choices = 1;
					break;
				}
			}
		}
		else
		{
			if (thisform.cbSubscription.checked == true)
			{
				checkbox_choices = 1;
			}
		}
 
		if(checkbox_choices == 0)
		{
			msg = "Please select a Subscription.";
			alert(msg);
			return false;
		}
		//else
		//{
		//	if (confirm("Are you sure to delete"))
		//	{
		//		thisform.cbSubscription.focus();
		//		return true;
		//	} else
		//	{
		//		return false;
		//	}
		//}







	// set var checkbox_choices to zero
	//var checkbox_choices = 0;



	//for (counter = 0; counter < thisform.cbSubscription.length; counter++)
	//{

	//alert(cbSubscription.length);
	// If a checkbox has been selected it will return true
	// (If not it will return false)
	//if (thisform.cbSubscription[counter].checked)
	//{ 
	//	checkbox_choices = checkbox_choices + 1; }
	//}

	//if (checkbox_choices==0)
	//{
	//	alert("Please select a Subscription.")
	//	return (false);
	//}
}