<!--
	//RegExp for e-mail address validation
	re1 = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})$/;

    //RegExp for simple address validation - no PO Box addresses
    re4 = /^.*[Pp]{1}[\. ]*[Oo]{1}[\. ]*[Bb]{1}[Oo]{1}[Xx]{1}.*$/;

    //RegExp for zip codes
    re2 = /^\d{5}$/;

    //RegExp for names
    re3 = /^[a-zA-Z].*$/;

    //RegExp for phone numbers (currently not in use)
    //re3 = /^\(?\d{3}([-\. /]|(\)|\) ))?\d{3}[-\. ]?\d{4}$/;


    function IsNumeric(val)
    {
    	//Uses a Regular Expression to determine if a string represents a numeric value

    	reNum = /^\d+[\.]?\d*$/;

        if (reNum.test(val))
        	return true;
        else
    		return false;
    }

	function isSignUpValid()
    {
    	if(document.getElementById('txtEMail').value == "" || !re1.test(document.getElementById('txtEMail').value)){
        	alert("Please provide a valid EMail Address.");
            document.getElementById('txtEMail').focus();
            return false;
        }
        if(document.getElementById('taComments').value == ""){
        	alert("Please enter your comments.");
            document.getElementById('taComments').focus();
            return false;
        }
        if(document.getElementById('security_code').value == ""){
        	alert("Please enter the security code.");
            document.getElementById('security_code').focus();
            return false;
        }

        return true;
    }

  	function isAccountFormValid(accountForm)
    {
    	//Validates basic account information
        if(accountForm.txtEMail.value.length==0 || !re1.test(accountform.txtEMail.value))
        {
        	alert("Please provide a valid e-mail address");
            accountForm.txtEMail.focus();
            return false;
        }

        if(accountForm.txtFName.value == "")
        {
        	alert("Please provide at least your First Name");
            accountForm.txtFname.focus();
            return false;
        }

        return true;
    }

    function isCheckoutFormValid(accountForm)
    {
    	//Validation for the form during the checkout process
        if(accountForm.txtEMail.value == "" || !re1.test(accountForm.txtEMail.value))
        {
        	alert("Please provide a valid e-mail address.");
            accountForm.txtEMail.focus();
            return false;
        }
        if(accountForm.txtFName.value == "" ||!re3.test(accountForm.txtFName.value))
        {
        	alert("Please provide your First Name.");
            accountForm.txtFName.focus();
            return false;
        }
        if(accountForm.txtLName.value == "" || !re3.test(accountForm.txtLName.value))
        {
        	alert("Please provide your Last Name.");
            accountForm.txtLName.focus();
            return false;
        }
        if(accountForm.txtAddress1.value == "" || re4.test(accountForm.txtAddress1.value))
        {
        	alert("Please provide your street address. It must not be a P.O. box.");
            accountForm.txtAddress1.focus();
            return false;
        }
        if(accountForm.txtCity.value == "")
        {
        	alert("Please provide the name of your city.");
            accountForm.txtCity.focus();
            return false;
        }
        if(accountForm.selState.value == "")
        {
        	alert("Please select a state.");
            accountForm.selState.focus();
            return false;
        }
        if(accountForm.txtZip.value == "" || !re2.test(accountForm.txtZip.value))
        {
        	alert("Please enter a valid zip code.");
            accountForm.txtZip.focus();
            return false;
        }

        //If all checks pass, the form is valid
        return true;
    }

	function IsFormValid(dataForm){
    	//This function performs validation of the account setup form

        if(!IsNumeric(dataForm.txtRPrice.value))
        {
            dataForm.txtRPrice.style.backgroundColor="#ec5353;"
            alert("All Prices Must Be Numeric.");
            return false;
        }

        if(!IsNumeric(dataForm.txtSPrice.value))
        {
            dataForm.txtSPrice.style.backgroundColor="#ec5353;"
            alert("All Prices Must Be Numeric.");
            return false;
        }

        if(!IsNumeric(dataForm.txtMPrice.value))
        {
            dataForm.txtMPrice.style.backgroundColor="#ec5353;"
            alert("All Prices Must Be Numeric.");
            return false;
        }

        if(!IsNumeric(dataForm.txtLPrice.value))
        {
            dataForm.txtLPrice.style.backgroundColor="#ec5353;"
            alert("All Prices Must Be Numeric.");
            return false;
        }

        if(!IsNumeric(dataForm.txtOrder.value))
        {
            alert("Display Order Must Be Numeric.");
            dataForm.txtOrder.style.backgroundColor="#ec5353;"
            return false;
        }
        //if the script makes it this far, then the form is considered valid.
        return true;
	}

    function subForm()
    {
     	//if(isFormValid(document.frmBasicInfo))
			document.frmBasicInfo.submit();

    }
-->

