function checkState(){
		var stateNumber=    form_checkOut2.select_s_state.selectedIndex;
		var state =         form_checkOut2.select_s_state.options[stateNumber].value;
		
		if (state == 'AK' || state == 'HI' ){
				if (state == 'AK'){
					theState = 'Alaska'
                }else{
					theState = 'Hawaii'
                }		
					alert("Sorry, we don't ship to " + theState + ".\nWe only ship within the contiguous United States.");
        }
}

//when "use billing for shipping" is checked 
function copyBillToShip(){
    //if it's checked, make sure billing is filled in before copying over and disabling 
    if(
          (document.form_checkOut2.checkbox_useBilling.checked == true)
        &&(document.form_checkOut2.text_b_nameFirst.value != "")        
        &&(document.form_checkOut2.text_b_nameLast.value != "")
        &&(document.form_checkOut2.text_b_address1.value != "")
        &&(document.form_checkOut2.text_b_city.value != "")
        &&(document.form_checkOut2.text_b_ZIPcode.value != "")
        ){
        document.form_checkOut2.text_s_nameFirst.value =        document.form_checkOut2.text_b_nameFirst.value;
        document.form_checkOut2.text_s_nameLast.value =         document.form_checkOut2.text_b_nameLast.value;
        document.form_checkOut2.text_s_company.value =          document.form_checkOut2.text_b_company.value;
        document.form_checkOut2.text_s_address1.value =         document.form_checkOut2.text_b_address1.value;
        document.form_checkOut2.text_s_address2.value =         document.form_checkOut2.text_b_address2.value;
        document.form_checkOut2.text_s_city.value =             document.form_checkOut2.text_b_city.value;
        document.form_checkOut2.select_s_state.selectedIndex =  document.form_checkOut2.select_b_state.selectedIndex;
        document.form_checkOut2.text_s_ZIPcode.value =          document.form_checkOut2.text_b_ZIPcode.value;
        
        document.form_checkOut2.text_s_nameFirst.disabled   = true;
        document.form_checkOut2.text_s_nameFirst.readonly   = true;
        document.form_checkOut2.text_s_nameLast.disabled    = true;       
        document.form_checkOut2.text_s_company.disabled     = true;          
        document.form_checkOut2.text_s_address1.disabled    = true;     
        document.form_checkOut2.text_s_address2.disabled    = true;       
        document.form_checkOut2.text_s_city.disabled        = true;          
        document.form_checkOut2.select_s_state.disabled     = true;
        document.form_checkOut2.text_s_ZIPcode.disabled     = true;
        
    //if not checked, then blank out and un-disable 
    }else if(document.form_checkOut2.checkbox_useBilling.checked == false){
        document.form_checkOut2.text_s_nameFirst.value =        "";
        document.form_checkOut2.text_s_nameLast.value =         "";
        document.form_checkOut2.text_s_company.value =          "";
        document.form_checkOut2.text_s_address1.value =         "";
        document.form_checkOut2.text_s_address2.value =         "";
        document.form_checkOut2.text_s_city.value =             "";
        document.form_checkOut2.select_s_state.selectedIndex =   0;
        document.form_checkOut2.text_s_ZIPcode.value =          "";
        
        document.form_checkOut2.text_s_nameFirst.disabled   = false;
        document.form_checkOut2.text_s_nameFirst.readonly   = false;
        document.form_checkOut2.text_s_nameLast.disabled    = false;       
        document.form_checkOut2.text_s_company.disabled     = false;          
        document.form_checkOut2.text_s_address1.disabled    = false;     
        document.form_checkOut2.text_s_address2.disabled    = false;       
        document.form_checkOut2.text_s_city.disabled        = false;          
        document.form_checkOut2.select_s_state.disabled     = false;
        document.form_checkOut2.text_s_ZIPcode.disabled     = false;
        
    //else the only other outcome is...
    }else{
    alert("Please complete the billing address first.");
    document.form_checkOut2.checkbox_useBilling.checked = false;
    document.form_checkOut2.text_b_nameFirst.focus();
    }
}

function fillFormForTesting(){
    document.form_checkOut2.text_b_nameFirst.value = "Tony";
    document.form_checkOut2.text_b_nameLast.value = "TESTING";
    document.form_checkOut2.text_b_company.value = "Phoenix Risen";
    document.form_checkOut2.text_b_address1.value = "2123 Mass ave ";
    document.form_checkOut2.text_b_address2.value = "apt 1";
    document.form_checkOut2.text_b_city.value = "cambridge";
    //document.form_checkOut2.select_state.selectedIndex = "Tony";
    document.form_checkOut2.text_b_ZIPcode.value = "55555";
        
    
        
    document.form_checkOut2.ccNumber.value = "5424000000000015";     
        
    document.form_checkOut2.text_s_nameFirst.value = "Alex";        
    document.form_checkOut2.text_s_nameLast.value = "Dwight";         
    document.form_checkOut2.text_s_company.value = "Water Heaters, Inc.";          
    document.form_checkOut2.text_s_address1.value = "700 opa bldv";         
    document.form_checkOut2.text_s_address2.value = "suite 1";         
    document.form_checkOut2.text_s_city.value = "Miami";             
    //document.form_checkOut2.select_s_state.selectedIndex = "Tony";  
    document.form_checkOut2.text_s_ZIPcode.value = "33173";
}

function highlightUpdateButton(onOrOff){
    if(document.getElementById){
        document.getElementById('span_submit_update1').style.visibility = 'visible';
        document.getElementById('span_submit_update2').style.visibility = 'visible';
    }
    if((document.getElementById)&&(onOrOff == 'off')){
        document.getElementById('span_submit_update1').style.visibility = 'hidden';
        document.getElementById('span_submit_update2').style.visibility = 'hidden';
    }
}

function getIndex(thisObject){
    for(var i=0;i<document.form_cart.elements.length;i++)
        if(thisObject == document.form_cart.elements[i]){
            return i;
        }
}

function forceNumeric(thisQty,thisMinUnits,thisSKU){
    //thisObject = object;
    //stringToCheck = thisObject.value;
    if (isNaN(thisQty)||thisQty == "."||thisQty < thisMinUnits){
        alert('Woops!  The minimum number of units required to order this item is ' + thisMinUnits + '. If you\'d like to order this item, please enter ' + thisMinUnits + ' or more.\n\n(The quantity will now be changed back to ' + thisMinUnits + '.)');
        //thisObject.value = thisMinUnits;
        document.form_5inc.qty.value = thisMinUnits;
        return false;
    }else{
        return true;
    }
}
function forceNumericCart(object,thisMinUnits,thisSKU){
    thisObject = object;
    stringToCheck = thisObject.value;
    if ((isNaN(stringToCheck)||(stringToCheck == ".")||(stringToCheck < thisMinUnits)) && (stringToCheck != 0)){
        document.getElementById("id_button_checkout").disabled = true;
        alert('Woops!  The minimum number of units required to order sku ' + thisSKU + ' is ' + thisMinUnits + '. If you\'d like to order this item, please enter ' + thisMinUnits + ' or more.\n\n(The quantity will now be changed back to ' + thisMinUnits + '.)\n\nTo remove the item from your cart, enter a zero, then click \"Update.\"');
        thisObject.value = thisMinUnits;
        document.getElementById("id_button_checkout").disabled = false;
        return false;
    }else{
        return true;
    }
}

/*
    alert('Please check the box to continue.');
    return false;
  } else
    return true;
    
    for SKU ' + thisSKU + ' has b
    
*/


function isNotBlank(theString){
    thisString = Trim(theString);
    if (thisString != ""){
        return true;
    }
}

function isWholeNumber(theString){
    thisNumber = theString;
    thisNumber_ceil = Math.ceil(thisNumber);
    if(thisNumber == thisNumber_ceil){
        return true;
    }
}

function isFloat(theString){
    thisNumber = theString;
    quotient = thisNumber/thisNumber;
    decimalPosition = thisNumber.indexOf('.');
    if( (quotient == 1) && (decimalPosition > -1) ){
        return true;
    }
}

//S H O P P I N G   C A R T   WHILE TYPING
//for highlighting Update button AND forcing numberic 
function compareValues(thisTextBox){
    //get the index of this textbox
    thisTextBox_index = getIndex(thisTextBox);
    //add 1 to get index of the hidden that follow
    thisHidden_index  = thisTextBox_index + 1;
    thisTextBox_value = document.form_cart.elements[thisTextBox_index].value;
    thisHidden_value  = document.form_cart.elements[thisHidden_index].value;
    //if they don't match update button needs to be clicked so highlite it 
    if(thisTextBox_value != thisHidden_value){
        highlightUpdateButton();   
    }else{
        highlightUpdateButton('off');   
    }
    forceNumeric(document.form_cart.elements[thisTextBox_index]);
    //document.form_cart.elements[thisTextBox_index].value = newval2;

}

//S H O P P I N G   C A R T    SUBMIT
//validate the qty text boxes then pass the action if successful
function submitFormCart(thisAction){    
    if(thisAction == "emptyCart" || thisAction == "continueShopping"){
        document.form_cart.hidden_action.value = thisAction;
        document.form_cart.submit();
    }else{    
        //for update or checkout replace blanks with zero, validate qty  
        for(var i=0;i<document.form_cart.elements.length;i++){
            if((document.form_cart.elements[i].name.indexOf('qty') > -1)){
                //thisName = document.form_cart.elements[i].name;
                thisQty = document.form_cart.elements[i].value;
                //thisMin = document.form_cart.elements[i+1].value;
                //alert(thisName + " " + thisQty + " " + thisMin)
                if(thisQty == ""){
                    document.form_cart.elements[i].value = 0;
                }else if( ! (isWholeNumber(thisQty)) ){
                    alert("Please verify the number you entered for \"qty.\"");
                    return -1;
                }
            }
        }
        //please wait only for checkout   
            document.form_cart.hidden_action.value = thisAction;
            document.form_cart.submit();
        if(thisAction == "checkout"){     
            document.form_cart.button_checkout.disabled = true;    
            document.form_cart.button_checkout.value = "Please wait...";
            document.nameImage.src = 'images/pleaseWait.gif';                
        }
    }
}

//D R I L L   D O W N  5    SUBMIT 
function submitFormDrillDown5(formObject){
    thisString = formObject.qty.value;
    if( (isNotBlank(thisString)) && (isWholeNumber(thisString)) ){
        //thisObject.disabled = true;
        return true;
    }else{
        alert("Please verify the quantity you entered under \"Qty.\'");
        return false;
    }
}

//see also intersticial.cfm 
function pleaseWaitSubmit1(theObject, theFormObject){
    thisObject = theObject;
    thisFormObject = theFormObject;
    document.nameImage.src = 'images/pleaseWait.gif';
    thisObject.value = 'Please wait...';
    thisObject.disabled = true;
    thisFormObject.submit();
    document.nameImage.src = 'images/pleaseWait.gif';
}

//adminPriceChanges
function submitFormAdminPriceChanges(){

    for(var i=0;i<document.form_priceUpdater.elements.length;i++){
        if((document.form_priceUpdater.elements[i].name.indexOf('newPrice') > -1)){
            thisString = document.form_priceUpdater.elements[i].value;
            
            if( (isFloat(thisString)) && (isNotBlank(thisString)) ){    
                submitTheForm = "yes";
            }else{
                submitTheForm = "no";
                //return -1;
            }
        }
    } 
    
    if(submitTheForm == "yes"){
                document.form_priceUpdater.submit();
                document.form_priceUpdater.button_updatePrices.disabled = true;    
                document.form_priceUpdater.button_updatePrices.value = "Please wait...";
                document.nameImage.src = 'images/pleaseWait.gif';
            }else{
                alert("Error - Make sure each price is filled in correctly, including decimal points.");  
            }
}

//adminPriceChanges
function setAllNewPrices(){
    thisString = document.form_setAllPrices.text_percent.value;
    if( ((isFloat(thisString)) || isWholeNumber(thisString)) && (isNotBlank(thisString)) ){    
        increaseDecreasePrices();
    }else{
        alert("Error - Make sure the percent amount is filled in correctly.");
    }
}

//checkout2 
function countCharacters(formObject){
    thisString = formObject.textArea_specialInstructions.value;
    if(thisString.length > 175){
        thisString_truncated = thisString.substr(1,175);
        alert("You've reached the maximun number of characters allowed. Your message was truncated to read:\n\n" + thisString_truncated + "\n\nPlease email us your entire message or give us a call. We don't want to miss what you have to say.")
        formObject.textArea_specialInstructions.value = thisString_truncated;
        formObject.textArea_specialInstructions.focus();
    }
}
 
//new checkout1 returning
function validate_form_login_returning(formObject){
    if(!_CF_checkregex(formObject.text_email.value, /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/)){
        alert("Please verify the email address your entered.");
        return false;
    }
    if((formObject.password_password.value.length < 5)||(formObject.password_password.value.length > 20)){
        alert("Your password should be 5 - 20 characters.");
        formObject.password_password.value = "";
        formObject.password_password.focus();
        return false;
    }
    formObject.submit_toLoginCustomTagFromCheckout1.disabled = true;
    formObject.submit_toLoginCustomTagFromCheckout1.value = 'Please wait...';
    document.nameImage.src = 'images/pleaseWait.gif';
    return true;
}
//new checkout1 new
function validate_form_login_new(formObject){
    if(!_CF_checkregex(formObject.text_email1.value, /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/)){
        alert("Please verify the email address your entered.");
        return false;
    }
    formObject.submit_createNewAccount.disabled = true;
    formObject.submit_createNewAccount.value = 'Please wait...';
    document.nameImage2.src = 'images/pleaseWait.gif';
    return true;
} 
//checkout15
function validate_form_login_checkout15(formObject){
    if(!_CF_checkregex(formObject.text_email2.value, /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/)){
        alert("Please verify the email address your entered.");
        return false;
    }
    if((formObject.password_password1.value.length < 5)||(formObject.password_password1.value.length > 20)){
        alert("Your password should be 5 - 20 characters.");
        formObject.password_password1.value = "";
        formObject.password_password2.value = "";
        return false;
    }
    if((formObject.password_password2.value.length < 5)||(formObject.password_password2.value.length > 20)){
        alert("Your password should be 5 - 20 characters.");
        formObject.password_password1.value = "";
        formObject.password_password2.value = "";
        formObject.password_password1.focus();
        return false;
    }
    if(formObject.password_password1.value != formObject.password_password2.value){
        alert("The password your re-entered didn't match the first one.");
        formObject.password_password1.value = "";
        formObject.password_password2.value = "";
        formObject.password_password1.focus();
        return false;
    }
    if(!isNotBlank(formObject.text_firstName.value) || !isNotBlank(formObject.text_lastName.value)){
        alert("Both first name and last name are required.");
        return false;
    }
    if(!_CF_checkphone(formObject.text_phone.value) || !isNotBlank(formObject.text_phone.value)){
        alert("Please enter your phone number in this format: xxx-xxx-xxxx.  \nWe will only contact you if there is a problem with your order.");
        return false;
    }
    if(!_CF_checkphone(formObject.text_fax.value)){
        alert("Please enter your fax number in this format: xxx-xxx-xxxx, or leave it blank.");
        return false;
    }
    formObject.submit_toLoginCustomTagFromCheckout15.disabled = true;
    formObject.submit_toLoginCustomTagFromCheckout15.value = 'Please wait...';
    document.nameImage.src = 'images/pleaseWait.gif';
    return true;

} 

function checkAllCCinfo(ccNumber, typeFromIndex, ccMonthIndex, ccYearIndex){
    //check ccNumber LUHN 
    if(!_CF_checkcreditcard(ccNumber)){
        alert("Please verify the credit card number you entered.");
        return false;
    }
    //check ccType
    firstNumber      = ccNumber.substr(0,1);
    firstTwoNumbers  = ccNumber.substr(0,2);
    firstFourNumbers = ccNumber.substr(0,4);
    if(firstNumber == 4){
        //assign a 0 to visa since visa has an index of 0 in dropdown list , etc
        typeFromCard = 0;
    }else if((firstTwoNumbers > 50)&&(firstTwoNumbers < 56)){
        //masterCard is second (1)
        typeFromCard = 1;
    }else if(firstFourNumbers == 6011){
        //discover is third (2)
        typeFromCard = 2;
    }else if((firstTwoNumbers == 34)||(firstTwoNumbers == 37)){
        //americanExpress is fourth (3)
        typeFromCard = 3;
    }else{
        alert("Sorry, we don't accept the card type of the credit card number you entered.");
        return false;
    }
    //check ccNumber-ccType pair
    if(typeFromCard != typeFromIndex){
        alert("Please verify the card type you selected for that credit card number.");
        return false;
    }
    //check exp date - only way to have exp date in the past is if the year is this year, so, if so, check month 
    today       = new Date();
    monthToday  = today.getMonth() + 1;
    yearToday   = today.getYear();
    monthThisCC = ccMonthIndex + 1;
    yearThisCC  = ccYearIndex + yearToday;
    //alert(monthToday + " " + yearToday + " " + monthThisCC + " " + yearThisCC)
    if((yearToday == yearThisCC)&&(monthToday > monthThisCC)){
        alert("Please verify the expiration date of the credit card.");
        return false;
    }
    
    return true;
}
function validate_form_checkOut2(formObject){
    if(!isNotBlank(formObject.text_b_nameFirst.value) || !isNotBlank(formObject.text_b_nameLast.value)){
        //alert("asdf");
        alert("Both first name and last name are required under \"billing info\".");
        return false;
    }
    if(!isNotBlank(formObject.text_s_nameFirst.value) || !isNotBlank(formObject.text_s_nameLast.value)){
        alert("Both first name and last name are required under \"shipping info\".");
        return false;
    }
    if(!isNotBlank(formObject.text_b_address1.value)){
        alert("Address 1 is required under \"billing info\".");
        return false;
    }
    if(!isNotBlank(formObject.text_s_address1.value)){
        alert("Address 1 is required under \"shipping info\".");
        return false;
    }
    if(!isNotBlank(formObject.text_b_city.value)){
        alert("City is required under \"billing info\".");
        return false;
    }
    if(!isNotBlank(formObject.text_s_city.value)){
        alert("City is required under \"shipping info\".");
        return false;
    }
    if((formObject.text_b_ZIPcode.value.length < 5) || (!isWholeNumber(formObject.text_b_ZIPcode.value))){
        alert("Please enter your billing ZIP code in this format: 12345");
        return false;
    }
    if((formObject.text_s_ZIPcode.value.length < 5) || (!isWholeNumber(formObject.text_s_ZIPcode.value))){
        alert("Please enter your shipping ZIP code in this format: 12345");
        return false;
    }
    
    thisCCnumber      = formObject.ccNumber.value
    thisTypeFromIndex = formObject.ccType.selectedIndex;
    thisCCmonthIndex  = formObject.ccMonth.selectedIndex;
    thisCCyearIndex   = formObject.ccYear.selectedIndex;
    if(!checkAllCCinfo(thisCCnumber,thisTypeFromIndex,thisCCmonthIndex,thisCCyearIndex)){
        return false;
    }
        
    formObject.submit_toLoginCustomTagFromCheckout2.value = 'Please wait...';
    formObject.submit_toLoginCustomTagFromCheckout2.disabled = true;
    //document.form_checkOut2.submit();
    document.nameImage.src = 'images/pleaseWait.gif';
    return true;
}

function validate_form_forgotPassword(formObject){
    if(!_CF_checkregex(formObject.text_email.value, /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/)){
        alert("Please verify the email address your entered.");
        return false;
    }
    formObject.submit_sendNow.value = 'Please wait...';
    formObject.submit_sendNow.disabled = true;
} 


function validate_form_editAccountInfo(formObject){
    if(!_CF_checkregex(formObject.text_email1.value, /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/)){
        alert("Please verify the email address your entered.");
        return false;
    }
    if(formObject.text_email1.value != formObject.text_email2.value){
        alert("The email your re-entered didn't match the first one.");
        return false;
    }
    if((formObject.password_password1.value.length < 5)||(formObject.password_password1.value.length > 20)){
        alert("Your password should be 5 - 20 characters.");
        formObject.password_password1.value = "";
        formObject.password_password2.value = "";
        return false;
    }
    if(formObject.password_password1.value != formObject.password_password2.value){
        alert("The password your re-entered didn't match the first one.");
        formObject.password_password1.value = "";
        formObject.password_password2.value = "";
        return false;
    }
    if(!isNotBlank(Trim(formObject.text_firstName.value)) || !isNotBlank(Trim(formObject.text_lastName.value))){
        alert("Both first name and last name are required.");
        return false;
    }
    if(!_CF_checkphone(formObject.text_phone.value) || !isNotBlank(formObject.text_phone.value)){
        alert("Please enter your phone number in this format: xxx-xxx-xxxx.  \nWe will only contact you if there is a problem with your order.");
        return false;
    }
    if(!_CF_checkphone(formObject.text_fax.value)){
        alert("Please enter your fax number in this format: xxx-xxx-xxxx, or leave it blank.");
        return false;
    }
    formObject.submit_editAccountInfo.disabled = true;
    formObject.submit_editAccountInfo.value = 'Please wait...';
    document.nameImage.src = 'images/pleaseWait.gif';
    return true;

} 


function validate_form_editAddAddress(formObject){
    if(!isNotBlank(Trim(formObject.text_nameFirst.value)) || !isNotBlank(Trim(formObject.text_nameLast.value))){
        alert("Both first name and last name are required.");
        return false;
    }
    if(!isNotBlank(Trim(formObject.text_nameFirst.value)) || !isNotBlank(Trim(formObject.text_nameLast.value))){
        alert("Both first name and last name are required.");
        return false;
    }
    if(!isNotBlank(Trim(formObject.text_address1.value))){
        alert("Address 1 is required.");
        return false;
    }
    if(!isNotBlank(Trim(formObject.text_city.value))){
        alert("City is required.");
        return false;
    }
    if((formObject.text_ZIPcode.value.length < 5) || (!isWholeNumber(formObject.text_ZIPcode.value))){
        alert("Please enter the ZIP code in this format: 12345");
        return false;
    }
    formObject.submit_generic.disabled = true;
    formObject.submit_generic.value = 'Please wait...';
    document.nameImage.src = 'images/pleaseWait.gif';
    return true;
}


function validate_form_editAddPayment(formObject){
    thisCCnumber      = formObject.text_ccNumber.value;
    thisTypeFromIndex = formObject.select_ccType.selectedIndex;
    thisCCmonthIndex  = formObject.select_ccMonth.selectedIndex;
    thisCCyearIndex   = formObject.select_ccYear.selectedIndex;
    if(!checkAllCCinfo(thisCCnumber,thisTypeFromIndex,thisCCmonthIndex,thisCCyearIndex)){
        return false;
    }
    formObject.submit_generic.disabled = true;
    formObject.submit_generic.value = 'Please wait...';
    document.nameImage.src = 'images/pleaseWait.gif';
    return true;
}


//checkOut4.inc
function validate_form_checkOut4(formObject){
    thisCCnumber      = formObject.ccNumber.value
    thisTypeFromIndex = formObject.ccType.selectedIndex;
    thisCCmonthIndex  = formObject.ccMonth.selectedIndex;
    thisCCyearIndex   = formObject.ccYear.selectedIndex;
    if(!checkAllCCinfo(thisCCnumber,thisTypeFromIndex,thisCCmonthIndex,thisCCyearIndex)){
        return false;
    }
    formObject.submit_chargeCreditCard.disabled = true;
    formObject.submit_chargeCreditCard.value = 'Please wait...';
    document.nameImage.src = 'images/pleaseWait.gif';
    return true;
}

    var RE_EXP_PATTERN_EMAIL = "^[A-Za-z0-9\\-_]{1,}(\\.[A-Za-z0-9\\-]{1,})*@[A-Za-z0-9\\-_]{1,}(\\.[A-Za-z0-9\\-]{1,})*$";
    function validateGeneric(pattern, str){
        var regExp
        regExp = new RegExp(pattern);
        return regExp.test(str);
    }
    function validateEmail(str){
        return validateGeneric(RE_EXP_PATTERN_EMAIL, str);
    }
    function validateAndSubmit(){
        if (document.form_contactUs.textArea_questionsComments.value == ""){
            alert("Please enter your comment or question.");
            return false;
        }else if(document.form_contactUs.text_email.value == ""){
            alert("Please enter your email address.");                 
            return false;     
        }else if(!validateEmail(document.form_contactUs.text_email.value)){
            alert("Please verify your email address.");
            return false;
        }else{
            document.form_contactUs.button_sendNow.disabled = true;    
            document.form_contactUs.button_sendNow.value = "Please wait...";
        }
    }