// JavaScript Document
function showmenu(elmnt){document.getElementById(elmnt).style.display="block";};
function hidemenu(elmnt){document.getElementById(elmnt).style.display="none";};
/* define function that calls QuickTime's "Play" method */
function PlayIt(anObj) {anObj.Play(); };
/* define function that calls QuickTime's "Stop" method */
function StopIt(anObj) {anObj.Stop();};

 the_inputs = new Array();
 the_inputNames = new Array();
 function getInputs() {
 	the_inputs=document.getElementsByTagName("input");
	for (i=0; i<the_inputs.length; i++) {
		the_inputNames[i]=the_inputs[i].name
	}
}
 function sort() {
  	var order = Sortable.serialize('product');
	order = order.replace(/product\[\]=/g, '');
	sortedProducts = order.split('&');
	for (i=0; i<the_inputNames.length; i++) {
		elements=document.changeOrder[the_inputNames[i]]
		elements.value=sortedProducts[i];
	}
	document.changeOrder.submit();
}
//the function for the FAQ
	function hideChild(ele,numOfULs) {
		if (ele.parentNode.lastChild.style.display=='block') {
			var clickOff = true;
		}
		var allULs = ele.parentNode.parentNode.parentNode.childNodes;
		//loops through all children of Div, and display='none'
		for (i=1; i<allULs.length; i++) {
			//checks if it has a subUL with content
			isUL=allULs[i].lastChild.lastChild
			if(isUL.nodeName=='UL') {
				isUL.style.display = 'none';
			}
			//haxx for IE. Firefox displays /n as a child, IE does not
			if(allULs.length>numOfULs+1) {i++;}
		}
		ele=ele.parentNode.lastChild;		
		if ( ele.style.display == 'none' ) {ele.style.display = 'block';}
		//unless set by javascript or inline CSS, then display = ''
		else if (ele.style.display == '' ) {ele.style.display = 'block';}
		//hides an element that was already displayed
		if(clickOff==true){ele.style.display = 'none'}
	}
