// JavaScript Document

    function RequireData()
      {
	if (document.frmTeller.email.value.search('@') == -1)
		{
		alert("Please enter a valid e-mail address");
		document.frmTeller.email.focus();
		return false;
		}
	  if (document.frmTeller.email.value.length < 5)
		{
		alert("Please enter a valid e-mail address");
		document.frmTeller.email.focus();
		return false;
		}

	return true;
	}
	
function ContactRequiredata()
      {
	  if (document.frmTeller2.FirstName.value == "")
		{
	    alert("Please Enter Your First Name!");
	    document.frmTeller2.FirstName.focus();
	    return false;
		}
	if (document.frmTeller2.LastName.value == "")
		{
	    alert("Please Enter Your Last Name!");
	    document.frmTeller2.LastName.focus();
	    return false;
		}
	  if (document.frmTeller2.email.value.search('@') == -1)
		{
		alert("Please enter a valid e-mail address for \"Your E-mail\".");
		document.frmTeller2.email.focus();
		return false;
		}
	  if (document.frmTeller2.email.value.length < 5)
		{
		alert("Please enter a valid e-mail address for \"Your E-mail\".");
		document.frmTeller2.email.focus();
		return false;
		} 
	if (document.frmTeller2.Phone.value == "")
		{
	    alert("Please Enter Your Phone Number!");
	    document.frmTeller2.Phone.focus();
	    return false;
		}
	if (document.frmTeller2.Subject[document.frmTeller2.Subject.selectedIndex].value == '')
			{
				alert("Please Select Your Subject");
				document.frmTeller2.Subject.focus();
				return false;
			}
	return true;
	}
	
	function SubRequiredata()
      {
	  var CostRegxp = /^([0-9]*)$/;
	  var PhoneRegxp = /^([0-9.-]*)$/;
	  
	  if (document.frmSub.FirstName.value == "")
		{
	    alert("Please Enter Your First Name!");
	    document.frmSub.FirstName.focus();
	    return false;
		}
	if (document.frmSub.LastName.value == "")
		{
	    alert("Please Enter Your Last Name!");
	    document.frmSub.LastName.focus();
	    return false;
		}
	if (document.frmSub.MailingZip.value == "")
		{
	    alert("Please Enter Your Zip Code!");
	    document.frmSub.MailingZip.focus();
	    return false;
		}
	if (document.frmSub.OfficePhone.value == "")
		{
	    alert("Please Enter Your Phone Number!");
	    document.frmSub.OfficePhone.focus();
	    return false;
		}
	 if (document.frmSub.AgentClass.options[document.frmSub.AgentClass.selectedIndex].value == "")
		{
		alert("Please enter a valid Agent Classification for \"Agent Classification\".");
		document.frmSub.AgentClass.focus();
		return false;
		}
	   if (document.frmSub.userName.value.search('@') == -1)
		{
		alert("Please enter a valid e-mail address for \"Your E-mail\".");
		document.frmSub.userName.focus();
		return false;
		}
	  if (document.frmSub.userName.value.length < 5)
		{
		alert("Please enter a valid e-mail address for \"Your E-mail\".");
		document.frmSub.userName.focus();
		return false;
		} 
	  if (document.frmSub.password.value.length < 5)
		{
		alert("Your password must be at least 5 characters.");
		document.frmSub.password.focus();
		return false;
		}
	 if (document.frmSub.password.value != document.frmSub.password2.value)
		{
		alert("Please enter the same password in both boxes.");
		document.frmSub.password.focus();
		return false;
		}
	if (PhoneRegxp.test(document.frmSub.OfficePhone.value) != true)
	{
		alert("Please enter only numbers, dot(.) and dash(-) for Office Phone.");
		document.frmSub.OfficePhone.focus();
		return false;
	}
	if (PhoneRegxp.test(document.frmSub.CellPhone.value) != true)
	{
		alert("Please enter only numbers, dot(.) and dash(-) for Cell Phone.");
		document.frmSub.CellPhone.focus();
		return false;
	}
	return true;
	}
	
	function Sub2Requiredata()
      {
		var CostRegxp = /^([0-9]*)$/;
		var PhoneRegxp = /^([0-9.-]*)$/;
	if (document.frmSub2.Subscription[document.frmSub2.Subscription.selectedIndex].value == '')
			{
				alert("Please Select Your Subscription");
				document.frmSub2.Subscription.focus();
				return false;
			}

	if (document.frmSub2.ccType[document.frmSub2.ccType.selectedIndex].value == '')
			{
				alert("Please Select Your Credit Card Type");
				document.frmSub2.ccType.focus();
				return false;
			}
	if (document.frmSub2.ccNum.value == "")
		{
	    alert("Please Enter Your Credit Card Number!");
	    document.frmSub2.ccNum.focus();
	    return false;
		}

	 if (document.frmSub2.ccID.value.length < 3 || !(CostRegxp.test(document.frmSub2.ccID.value)))
		{
		 if (document.frmSub2.ccIDValidate.checked == false)
			{
			 alert("Please enter a valid Card ID Number");
			 document.frmSub2.ccID.focus();
			 return false;
			}
		}
	if (document.frmSub2.BillingAddress.value == "")
		{
	    alert("Please Enter Your Billing Address");
	    document.frmSub2.BillingAddress.focus();
	    return false;
		}
	if (document.frmSub2.BillingCountry.value == "")
		{
	    alert("Please Enter Your Billing Country");
	    document.frmSub2.BillingCountry.focus();
	    return false;
		}
	if (document.frmSub2.BillingState.value == "")
		{
	    alert("Please Enter Your Billing State");
	    document.frmSub2.BillingState.focus();
	    return false;
		}
	if (document.frmSub2.BillingCity.value == "")
		{
	    alert("Please Enter Your Billing City");
	    document.frmSub2.BillingCity.focus();
	    return false;
		}
	
	if (document.frmSub2.BillingZip.value == "")
		{
	    alert("Please Enter Your Billing Zip Code");
	    document.frmSub2.BillingZip.focus();
	    return false;
		}
	if (PhoneRegxp.test(document.frmSub2.BillingPhone.value) != true)
	{
		alert("Please enter only numbers, dot(.) and dash(-) for Billing Phone.");
		document.frmSub2.BillingPhone.focus();
		return false;
	}
		return true;
	}
	
	function AdsRequiredata()
      {
	  if (document.frmTeller3.FirstName.value == "")
		{
	    alert("Please Enter Your First Name!");
	    document.frmTeller3.FirstName.focus();
	    return false;
		}
	if (document.frmTeller3.LastName.value == "")
		{
	    alert("Please Enter Your Last Name!");
	    document.frmTeller3.LastName.focus();
	    return false;
		}
	  if (document.frmTeller3.email.value.search('@') == -1)
		{
		alert("Please enter a valid e-mail address for \"Your E-mail\".");
		document.frmTeller3.email.focus();
		return false;
		}
	  if (document.frmTeller3.email.value.length < 5)
		{
		alert("Please enter a valid e-mail address for \"Your E-mail\".");
		document.frmTeller3.email.focus();
		return false;
		} 
	return true;
	}

	function Sub2RequiredataBack()
      {
		  //avoid check will avoid validation checks - will be used in case of back button, 
		return true;
	}

	function checkState()
    {
		document.frmSub.ResetT.value="Fill"
        document.frmSub.action="Default.asp" 
		document.frmSub.submit();	
        
    }

	function checkStateFrmSub2()
    {
		document.frmSub2.Submit2.value="Fill";
        document.frmSub2.action="Subscribe2.asp" 
		document.frmSub2.submit();	
        
    }

        function checkAgentStateFrmSub2()
    {
		document.frmSub2.Submit2.value="Fill";
        	document.frmSub2.action="agent-subscription.asp" 
		document.frmSub2.submit();	
        
    }

	
	function checkSameBilling()
    {
		document.frmSub2.Submit2.value="SameAddress";
        document.frmSub2.action="Subscribe2.asp" 
		document.frmSub2.submit();	
        
    }

	function checkAgentSameBilling()
    {
		document.frmSub2.Submit2.value="SameAddress";
        document.frmSub2.action="agent-subscription.asp" 
		document.frmSub2.submit();	
        
    }
	

