function showText(id) {
	$('#text_max_'+id).show();
	$('#text_min_'+id).hide();
}
function hideText(id) {
	$('#text_max_'+id).hide();
	$('#text_min_'+id).show();
}
function preloadImages() {
	imageObj = new Image();
	images = new Array();
		images[0]="/img/btn/btn_search-over.gif"
		images[1]="/img/btn/btn_submit-over.gif"
		images[2]="/img/btn/btn_moreinfo-over.gif"
		images[3]="/img/btn/btn_addcart-over.gif"
		images[4]="/img/btn/btn_emptycart-over.gif"
		images[5]="/img/btn/btn_continue-over.gif"
		images[6]="/img/btn/btn_empty-over.gif"
		images[7]="/img/btn/btn_update-over.gif"
		images[8]="/img/btn/btn_save-over.gif"
		images[9]="/img/home/tab_cat-over.gif"
		images[10]="/img/home/tab_cond-over.gif"
	for(i=0; i<=1; i++) {
		imageObj.src=images[i];
	}
} 
function focusInput(theId,theContent) {
	if (theId.value == theContent) {
		theId.value = '';
	}
		theId.style.color = '#000';
		theId.style.background = '#fff';
}
function blurInput(theId,theContent) {
	if (theId.value == '') {
		theId.value = theContent;
	}
		theId.style.color = '#000';
		theId.style.background = '#efefef';
}
function focusSearch(theId,theContent) {
	if (theId.value == theContent) {
		theId.value = '';
		theId.style.color = '#000';
		theId.style.background = '#fff';
	}
}
function blurSearch(theId,theContent) {
	if (theId.value == '') {
		theId.value = theContent;
		theId.style.color = '#999';
		theId.style.background = '#efefef';
	}
}
function emptyCart() {
	var subConf = confirm("Are you sure you wish to empty your cart?" + "\r\n" + "Click \"OK\" to empty, or \"Cancel\" to return.");
	if (subConf == true) {
		window.location = "/shop/?action=empty";
	}
}
function imgPopup(theUrl, theWidth, theHeight) { 
	window.open(theUrl, 'imgPopup', 'width='+theWidth+',height='+theHeight+',scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=n'); 
}
function billEqShip() {
	form = document.getElementById('form_checkout');
	form.bill_name.value = form.ship_name.value;
	form.bill_company.value = form.ship_company.value;
	form.bill_address.value = form.ship_address.value;
	form.bill_address2.value = form.ship_address2.value;
	form.bill_city.value = form.ship_city.value;
	form.bill_state.value = form.ship_state.value;
	form.bill_zip.value = form.ship_zip.value;
	form.bill_phone.value = form.ship_phone.value;
}
function shipEqBill() {
	form = document.getElementById('form_checkout');
	form.ship_name.value = form.bill_name.value;
	form.ship_company.value = form.bill_company.value;
	form.ship_address.value = form.bill_address.value;
	form.ship_address2.value = form.bill_address2.value;
	form.ship_city.value = form.bill_city.value;
	form.ship_state.value = form.bill_state.value;
	form.ship_zip.value = form.bill_zip.value;
	form.ship_phone.value = form.bill_phone.value;
}

