<!--
	//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(accountForm)
    {
    	//Validates basic account information
        if(accountForm.txtFName.value == "")
        {
        	alert("Please provide at least your First Name");
            accountForm.txtFName.focus();
            return false;
        }

        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(document.getElementById('security_code').value == ""){
        	alert("Please enter the security code.");
            document.getElementById('security_code').focus();
            return false;
        }

        return true;
    }

  	function isSDonationValid(accountForm)
    {
    	//Validates basic account information
        if(accountForm.selProgram.value == "--")
        {
        	alert("Please select the program you wish to support");
            accountForm.selProgram.focus();
            return false;
        }
        if(accountForm.txtFName.value.length == 0)
        {
        	alert("Please provide at your First Name");
            accountForm.txtFName.focus();
            return false;
        }
        if(accountForm.txtLName.value.length == 0)
        {
        	alert("Please provide at your Last Name");
            accountForm.txtLName.focus();
            return false;
        }
        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(!IsNumeric(accountForm.amount.value))
        {
        	alert("Please provide valid amount for your donation.");
            accountForm.amount.focus();
            return false;
        }

        return true;
    }

    function isBookingValid(accountForm)
    {
    	//Validation for the form during the registration process

        if(accountForm.txtPartName.value == "")
        {
            alert("Please specify the Participant's Name");
            accountForm.txtPartName.focus();
            return false;
        }
        if(!IsNumeric(accountForm.txtAge.value))
        {
        	alert("Please specify the Participant's Age");
            accountForm.txtAge.focus();
            return false;
        }
        if(accountForm.radGender.value == "")
        {
        	alert("Please specify the Participant's Gender");
            accountForm.txtLName.focus();
            return false;
        }
        if(accountForm.txtParentName.value == "")
        {
            alert("Please specify the Parent's Name");
            accountForm.txtParentName.focus();
            return false;
        }
        if(!IsNumeric(accountForm.txtPAreaCode.value) || !IsNumeric(accountForm.txtPExchange.value) || !IsNumeric(accountForm.txtPLastFour.value))
        {
            alert("Please provide a valid Daytime Phone Number");
            accountForm.txtPAreaCode.focus();
            return false;
        }
        if(accountForm.txtEMail.value == "" || !re1.test(accountForm.txtEMail.value))
        {
        	alert("Please provide a valid e-mail address.");
            accountForm.txtEMail.focus();
            return false;
        }
        if(accountForm.txtAddress1.value == "")
        {
        	alert("Please provide your street address.");
            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.txtZipCode.value == "" || !re2.test(accountForm.txtZipCode.value))
        {
        	alert("Please enter a valid zip code.");
            accountForm.txtZipCode.focus();
            return false;
        }
        if(accountForm.txtEmergName.value == "")
        {
            alert("Please provide the name of an Emergency Contact.");
            accountForm.txtEmergName.focus();
            return false;
        }
        if(!IsNumeric(accountForm.txtEAreaCode.value) || !IsNumeric(accountForm.txtEExchange.value) || !IsNumeric(accountForm.txtELastFour.value))
        {
            alert("Please provide the Emergency Contact's Phone Number");
            accountForm.txtEAreaCode.focus();
            return false;
        }
        //If all checks pass, the form is valid
        return true;
    }

    function isCheckoutFormValid(accountForm)
    {
    	//Validation for the form during the checkout process

        if(!IsNumeric(accountForm.txtQty.value))
        {
            alert("Please specify a Quantity.");
            accountForm.txtQty.focus();
            return false;
        }
        if(accountForm.selDrink.selectedIndex == 0)
        {
            alert("Please choose your Beverage.");
            accountForm.selDrink.focus();
            return false;
        }
        if(accountForm.selPolish.selectedIndex == 0)
        {
            alert("Please choose your Nail Polish.");
            accountForm.selPolish.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.txtEMail.value == "" || !re1.test(accountForm.txtEMail.value))
        {
        	alert("Please provide a valid e-mail address.");
            accountForm.txtEMail.focus();
            return false;
        }
        if(!IsNumeric(accountForm.txtAreaCode.value) || !IsNumeric(accountForm.txtExchange.value) || !IsNumeric(accountForm.txtLastFour.value))
        {
            alert("Please provide a valid phone number");
            accountForm.txtAreaCode.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.txtZipCode.value == "" || !re2.test(accountForm.txtZipCode.value))
        {
        	alert("Please enter a valid zip code.");
            accountForm.txtZipCode.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();

    }
-->

