if (document.images) {
	about = new Image(); about.src = "images/navbuts/about_on.gif";
	help = new Image(); help.src = "images/navbuts/help_on.gif";
	basket = new Image(); basket.src = "images/navbuts/basket_on.gif";
	faq = new Image(); faq.src = "images/navbuts/faq_on.gif";
	home = new Image(); home.src = "images/navbuts/home_on.gif";
	account = new Image(); account.src = "images/navbuts/account_on.gif";
	join = new Image(); join.src = "images/navbuts/join_on.gif";
}
function swapNavBut(imgname,imgswap){
	imgname.src = "images/navbuts/" + imgname.name + imgswap;
	//alert("images/navbuts/" + imgswap + ".gif");
}
//validate mailing list
function validateListJoin(){
	if (document.shopper_email.shopper_email.value=="Enter Email" || document.shopper_email.shopper_email.value.length <= 5) {
	alert('please enter your email address when before clicking join'); 
	document.shopper_email.shopper_email.focus();
	} else {
		document.shopper_email.submit();
	}
};

function showAlertMess(whichDiv, doWhat) {
    if (doWhat == "hide") {
        whichDiv.style.display = 'none';
    }
    else {
        whichDiv.style.display = 'block';
    }
}
//pop up window for backorder list
function prodBackorderWin(p_id, p_name) {
    var newWin = window.open("prodBackorder.asp?p_id=" + p_id + "&p_name=" + p_name, "Backorder", "status=no,width=300,height=200,scrollbars=no");
    if (newWin && newWin.open) { newWin.focus(); }
}


function setCheckboxProd() {
    if (!document.atb.noAttr == "1") {
        var theChecks = false;

        if (document.atb.skulist.length == null) {
            document.atb.skulist.checked;
        } else {
            for (i = 0; i < document.atb.skulist.length; i++) {
                if (document.atb.skulist[i].checked) {
                    theChecks = true;
                };
            };
            if (!theChecks) {
                alert("please check off one or more products");
                return false;
                //document.atb1.submit();
            };
        };
    };
};


function setCheckbox(theForm) {
    var cb = theForm.skulist;
    if (cb.length == null) {
        theForm.skulist.checked = true;
        return cb.checked;
    }
    for (var i = 0; i < cb.length; i++) {
        if (cb[i].checked) return true;
    }
    alert("Please check off the product you wish to purchase!");
    return false;
}

//tell-a-friend popup window
function tafPOP() {
    newWin = window.open('pop_taf.asp', 'TellAFriend', 'status=no,width=400,height=200,scrollbars=no');
};