	
	var showHideMenu = new Array();
	/**
	* @param selected: Bool		true to keep arrow yellow
	*/
	function togCatalog(catid,selected) {
		
		//subcat_fx[catid].toggle();
		
		targ_cat 	= getEl('category['+catid+']');
		targ_button = getEl('category_button['+catid+']');
		targ_arrow	= getEl('arrow['+catid+']');
		
		if(!showHideMenu[catid] || showHideMenu[catid] == 'off') { // the table is currently 'OFF'
			// Make the arrow point down to indicate options now available
			if(selected) {
				imgsrc = 'images/menu_arrow_light_down.gif';
			}else {
				imgsrc = 'images/menu_arrow_down.gif';
			}
			
			// Show the table of subcategories
			targ_cat.className = 'show';
			
			targ_button.innerHTML = 'LESS- ';
			targ_button.className = 'contract padding';
			
			showHideMenu[catid] = 'on';
			
			if(is.ie) {
				targ_arrow.src = 'images/spacer.gif';
				targ_arrow.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+imgsrc+"', sizingMethod='scale')";
			}else {
				targ_arrow.src = imgsrc;
			}
			
		}else {
			// Make the arrow point down to indicate options now available
			if(selected) {
				imgsrc = 'images/menu_arrow_light.gif';
			}else {
				imgsrc = 'images/menu_arrow.gif';
			}
			
			targ_cat.className = 'hide';
			
			targ_button.innerHTML = 'MORE+ ';
			targ_button.className = 'expand padding';
			
			showHideMenu[catid] = 'off';
			
			if(is.ie) {
				targ_arrow.src = 'images/spacer.gif';
				targ_arrow.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+imgsrc+"', sizingMethod='scale')";
			}else {
				targ_arrow.src = imgsrc;
			}
		}
		
	}
	
	
	function loadProd(id, img, price, desc, name, subprod_exists) {
		li = getEl('lrgimg');
		pn = getEl('prodName');
		pd = getEl('prod_dollar');
		pc = getEl('prod_cent');
		ep = getEl('existing_subprod');
		it = getEl('item');
		holdit = getEl('holditem');
		
		li.src = img;
		pn.innerText = name.toUpperCase();
		pd.innerText = '$' + parseInt(price);
		
		cent = ((parseFloat(price) - parseInt(price))*100);
		if(!cent) {
			cent = '00';
		}
		pc.innerText = '.' + cent;


		if(subprod_exists) {
			ep.value = 1;
			it.value = getEl('subproduct').value;
		}else {
			ep.value = 0;
			it.value = id;
		}
		holdit.value = id;
	}
	
	function checkCartFrm(frm) {
		spe = frm.existing_subprod.value; // sub product exists
		if(spe == 1) {
			if(frm.subproduct.value < 1) {
				id = frm.item.value;
				animSubProd('open', 0, id);
				getEl('item').value = getEl('subproduct').value;
			}else {
				getEl('item').value = getEl('subproduct').value;
				return frm.submit();
			}
		}else {
			return frm.submit();
		}
		return false;
	}