//mouseover button function
if(document.images){
	checkout = new Image(); checkout.src = "images/buttons/checkout_on.gif"; 
	dog = new Image(); dog.src = "images/buttons/dog_on.gif"; 
	em_join = new Image(); em_join.src = "images/buttons/em_join_on.gif"; 
	cart_white = new Image(); cart_white.src = "images/buttons/cart_white_on.gif"; 
	cart_blue = new Image(); cart_blue.src = "images/buttons/cart_blue.gif"; 
	};
	
function swap_on(imgName){
	imgName.src = "images/buttons/" + imgName.name + "_on.gif";
	}
function swap_off(imgName){
	imgName.src = "images/buttons/" + imgName.name + "_off.gif";
	}
	 
	 
function setCheckboxProd(){
	if (!document.atb.noAttr == "1") {
	var theChecks=false;
		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();
		};
		};
	};
		
//tell-a-friend popup window
function tafPOP(){
	newWin = window.open('pop_taf.asp', 'TellAFriend', 'status=no,width=400,height=200,scrollbars=no');
};
	 
	 
	 	
//functions to control dog-bark sound
function playSound(theSound) { document.buy.run(); }

//functions for silent auction



function auctionCheck(theForm) {
	//check the bid first
	if (isNaN(parseFloat(theForm.maxBid.value))) {
		alert("Enter auction bid in 0.00 format! (i.e: 14.99)"); 
		theForm.maxBid.focus();
		return false;
	} else {
		if (parseFloat(theForm.maxBid.value) <= parseFloat(theForm.curBid.value)) {
			alert("Your Max Bid must be greater than the current bid!"); 
			theForm.maxBid.focus();
			return false;
		}
	}
	//check for the rest of the values
	if (theForm.auctionName.value == "") {
		alert("Please enter your name so that we may contact you if you've won!");
		theForm.auctionName.focus();
		return false;
		}
	if (theForm.auctionEmail.value == "") {
		alert("Please enter an email address so that we may contact you if you've won!");
		theForm.auctionEmail.focus();
		return false;
		}
	if (theForm.auction_cc_number.value == "") {
		alert("Please enter a credit card number to hold your bid!");
		theForm.auction_cc_number.focus();
		return false;
		}
	if (theForm.auction_cc_sec.value == "") {
		alert("Please enter the credit card security code!");
		theForm.auction_cc_sec.focus();
		return false;
		}
	if (theForm.auction_cc_expmonth.selectedIndex == 0) {
		alert("Please select the credit card expiration month!");
		return false;
		}
	if (theForm.auction_cc_expyear.selectedIndex == 0) {
		alert("Please select the credit card expiration year!");
		return false;
		}
		
		//if everything's cool, confirm the bid
	 return confirm('Are you sure your bid of $' + theForm.maxBid.value + ' is correct?');
	 return true;

}