function hor_menu_load(HTMLid, ref){	document.getElementById(HTMLid).innerHTML = XMLReq_get("product_data.php?product="+techno_product+"&section="+ref);
}
function hor_menu_init(){	el = document.getElementById("hor_menu_ftd");
	txt = el.innerHTML;
	txt = txt.substr(txt.indexOf("this, '")+7);
	Hid = txt.substr(0,txt.indexOf("', '"));
	txt = txt.substr(txt.indexOf("', '")+4);
	ref = txt.substr(0,txt.indexOf("',"));
    hor_menu_load(Hid, ref);
}
function hor_click(elem, HTMLid, ref, closing){
	var x; var opened = false;
	elem = elem.parentNode.parentNode;
	for(x=0; x < elem.childNodes.length; x++){
		if(elem.childNodes[x].tagName == 'EM'){
			opened = true;
			elem = elem.parentNode;
		}
	}
	if(opened && (!closing)) return;
	var cellEl;	var cellText;
	var currentNode = NaN; var bottomText = "bottom"; var curEl;
	elem = elem.parentNode.parentNode.parentNode.parentNode.parentNode;
	if(!opened){ bottomText = "center";	currentNode = elem; }
	elem = elem.parentNode;
	var str = "";
	for(x=0; x < elem.childNodes.length; x++){
		el = elem.childNodes[x];
		switch(el.tagName){
			case 'TD':
				curEl = false;
				for(var y=0; y<=7; y++){
					switch(y){
						case 0:
							if(currentNode == el){ txtpos = "top"; curEl = true;}
								else{ txtpos = bottomText; }
							el.style.backgroundPosition = "left "+txtpos;
						break;
						case 1: el.style.backgroundPosition = "right "+txtpos; break;
						case 2: el.style.backgroundPosition = txtpos; break;
						case 6: cellText = el.innerHTML; break;
						case 7:
							if(el.tagName == "EM"){ cellText = el.innerHTML; }
							if(curEl){ cellText = '<EM>' + cellText + '</EM>'; }
							el.parentNode.innerHTML = cellText;
						break;
					}
					el = el.childNodes[0];
				}
			break;
			case 'TH':
				if(opened){ el.style.backgroundPosition = "bottom"; }
				else{ el.style.backgroundPosition = "top"; }
			break;
		}
	}
	if(opened){		document.getElementById(HTMLid).innerHTML = "";
	}else{		hor_menu_load(HTMLid, ref);
	}
}
