var timeout = true;
function timeoutmenu(num){
	timeout = true;
	setTimeout('if(timeout) hidemenu('+num+');', 100)
}
function hidemenu(num){
	var menuu = document.getElementById('dropdown'+num);
	if(menuu){
		menuu.style.visibility= 'hidden';
		menuu.style.display= 'none';
	}else{
		setTimeout('hidemenu('+num+');', 100);
	}
}
function showmenu(num){	
	var menuu = document.getElementById('dropdown'+num);
	if(menuu){
		menuu.style.visibility= 'visible';
		menuu.style.display= '';
	}else{
		setTimeout('showmenu();', 100);
	}
}
timeoutmenu(1);timeoutmenu(2);






//#############################################
//  STRIPE TABLES


// this function is needed to work around 
// a bug in IE related to element attributes
function hasClass(obj) {
 var result = false;
 if (obj.getAttributeNode("class") != null) {
	 result = obj.getAttributeNode("class").value;
 }
 return result;
}   

function stripe(id) {
	var even = false;
	// if arguments are provided to specify the colours
	// of the even & odd rows, then use the them;
	// otherwise use the following defaults:
	var oddColor = arguments[1] ? arguments[1] : "#fff";
	var evenColor = arguments[2] ? arguments[2] : "#eee";
	var table = document.getElementById(id);
	if (! table) { return; }	
	// by definition, tables can have more than one tbody
	// element, so we'll have to get the list of child
	// &lt;tbody&gt;s 
	var tbodies = table.getElementsByTagName("tbody");
	// and iterate through them...
	for (var h = 0; h < tbodies.length; h++) {
	 // find all the &lt;tr&gt; elements... 
	  var trs = tbodies[h].getElementsByTagName("tr");
	  // ... and iterate through them
	  for (var i = 0; i < trs.length; i++) {
		// avoid rows that have a class attribute
		// or backgroundColor style
		if (! hasClass(trs[i]) &&
			! trs[i].style.backgroundColor) {
		  var mytr = trs[i];
		  // get all the cells in this row...
		  mytr.style.backgroundColor =
				even ? evenColor : oddColor;
		  var tds = trs[i].getElementsByTagName("td");
		  // and iterate through them...
		  for (var j = 0; j < tds.length; j++) {
			var mytd = tds[j];
			// avoid cells that have a class attribute
			// or backgroundColor style
			if (! hasClass(mytd) &&
				! mytd.style.backgroundColor) {
			  //mytd.style.backgroundColor =
				//even ? evenColor : oddColor;
			}
		  }
		}
		// flip from odd to even, or vice-versa
		even =  ! even;
	  }
	}
}




function showudrows(){
	document.getElementById("rowud5").style.display='table-row';
	document.getElementById("rowud6").style.display='table-row';
	document.getElementById("rowud7").style.display='table-row';
	document.getElementById("rowud8").style.display='table-row';
	document.getElementById("rowud9").style.display='table-row';
	document.getElementById("rowud10").style.display='table-row';
	document.getElementById("rowud11").style.display='table-row';
	document.getElementById("rowud12").style.display='table-row';
	document.getElementById("rowud13").style.display='table-row';
	document.getElementById("rowud14").style.display='table-row';
	document.getElementById("rowud15").style.display='table-row';
	document.getElementById("udbutz").style.display='none';
	return false;
}

