function toggleVisibility(id){
	divs = id.split(",");
	for(i=0;i<divs.length;i++) {
		if(document.getElementById(divs[i]).style.display == 'block')
			document.getElementById(divs[i]).style.display = 'none'
		else 
			document.getElementById(divs[i]).style.display = 'block'
	}	
	resetDiv('footer');
}

try {
  document.execCommand("BackgroundImageCache", false, true);
} catch(err) {}

/* Calls searchForLIs for both menu's. This replaces the csshover.htc
   functionality in the menu's */

function parseLists() {
	if (document.all&&document.getElementById) {
		menuRoot = document.getElementById("menu_top");
		searchForLIs(menuRoot);
 	} 	
}

/* Recursive function. Searches the childs of the passed object for LI's or UL's. 
   When found they are passed to this function again. LI's are also given 2 events (mouseover / mouseout). */

function searchForLIs(objectReference) {
	for (var i=0; i < objectReference.childNodes.length; i++) {
		node = objectReference.childNodes[i];
		switch (node.nodeName) {
			case "LI": {
				node.onmouseover = function() {
					this.className += " over";
  				}
  				node.onmouseout = function() {
  					this.className = this.className.replace(" over", "");
   				}				
				searchForLIs(node);	
				break;
			}
			case "UL": {
				searchForLIs(node);
				break;
			}		
		}
	}
	return;
}

//function wil place flash objects without the annoying "click ok" or "click element" messages in IE 6
function showFlash(filename,width,height) { 
	document.write ('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" data="'+filename+'" WIDTH="'+width+'" HEIGHT="'+height+'" ALIGN="middle">');
   document.write ('		<PARAM NAME="movie" VALUE="'+filename+'"> ');
	document.write ('		<param name="menu" value="false" />');
	document.write ('		<param name="quality" value="high" />');
	document.write ('		<param name="wmode" value="transparent" />');
	document.write ('		<embed src="'+filename+'" menu="false" quality="high" wmode="transparent" bgcolor="#FFFFFF" width="'+width+'" height="'+height+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');
	document.write ('		</embed>');
	document.write ('</OBJECT>');
}