<!--
function showLayer(layerName){
	if (document.getElementById){
		var targetElement = document.getElementById(layerName);
		targetElement.style.visibility = 'visible';
		targetElement.style.height = 'auto';
	}
}

function hideLayer(layerName){
	if (document.getElementById) {
		var targetElement = document.getElementById(layerName);
		targetElement.style.visibility = 'hidden';
		targetElement.style.height = '0px';
	}
}

// POPUP MENU
var timeoutVar;
function show(id) {
	document.getElementById(id).style.visibility = "visible";
	clearTimeout(timeoutVar);
	timeoutVar = setTimeout("hide()",5000);
	for(var i=1; i<8; i++){
		layerID = "topnav_" + i;
		if(document.getElementById(layerID)){
			if(layerID != id && document.getElementById(layerID).style.visibility == "visible"){
				document.getElementById(layerID).style.visibility = "hidden";
			}
		}
	}
}
function hide(id) {
	for(var i=1; i<8; i++){
		layerID = "topnav_" + i;
		if(document.getElementById(layerID)){
			if(layerID != id && document.getElementById(layerID).style.visibility == "visible"){
				document.getElementById(layerID).style.visibility = "hidden";
			}
		}
	}
}

// HREF VIA JAVASCRIPT EVENT
function redirect(url) {
	window.location = url;
}

// new window popup used for opening up artwork and flash projects
function launchwin(uri,name,args)
{
	newwin = window.open(uri,name,args);
	newwin.focus();
}

// USER TYPES EMAIL INTO FORM AND USES THIS FUNCTION TO REDIRECT TO A 'SEND PASSWORD TO MY EMAIL' PAGE
function requestpass(type){
	var e = document.form1.email.value;
	uri = "actions/forgotpass.php?email=" + e + "";
	if(type && type != "") uri += "&type=" + type;
	top.location.replace( uri );
}

// WEB BASED 'BACK' BUTTON
function go_back(){
	history.back();
}

// FOR USE IN CMS... CONFIRM ACTION BEFORE SUBMITTING TO db_update PAGE
function confirmSubmit(conf)
{
	var agree=confirm(conf);
	if (agree){
		return true ;
	} else {
		return false ;
	}
}

// *** FOR CATALOG ***

// COLLECT AND SEND: gathers size and color from page, and id, and adds to cart
function collectAndSend(loc,product_id){
	var product_size = document.form1.size.value;
	var product_color = document.form1.color.value;
	uri = loc + "?product_id=" + product_id + "&product_size=" + product_size + "&product_color=" + product_color;
	top.location.replace( uri );
}

function setColor(varValue){
	document.form1.color.value = varValue;
	return false;
}

// SHOW PRICE FROM DYNAMIC SELECTION
function showDPrice(thePrice){
	document.getElementById("price").innerHTML = thePrice;
}

function setRadioButton(radioObj, newValue) {
        if(!radioObj)
                return;
        var radioLength = radioObj.length;
        if(radioLength == undefined) {
                radioObj.checked = (radioObj.value == newValue.toString());
                return;
        }
        for(var i = 0; i < radioLength; i++) {
                radioObj[i].checked = false;
                if(radioObj[i].value == newValue.toString()) {
                        radioObj[i].checked = true;
                }
        }
}

function checkQuantity(min_quantity_requirement){
	quantity_requested = document.getElementById("product_qty");
	if(min_quantity_requirement > quantity_requested.value){
		alert(min_quantity_requirement + " is the fewest units you are allowed to purchase.\nPlease add more to your cart.");
		return false;
	} else {
		return true;
	}
}

// *** END CATALOG ***

//-->

