<!--
var expando = 0;
var expando_status = "closed";
var expando_action_status = "null";
var expandoHeight = 0;
var expandoOpacity = 0;
var expandoType = "";

function setupExpando(){
	document.getElementById("expando").style.visibility = "hidden";
	document.getElementById("expando").style.height = "0px";
	var expandoType = "pushDown";
}

function doExpando(){
	if(!expando && expando_status == "closed"){
		expandoHeight = 0;
	}
	
	if(expandoHeight <= 20 && expando_status == "open"){
		window.clearTimeout(expando);
		expando_action_status = "null";
		expando_status = "closed";
		expando = 0;
		setupExpando();
		
	} else if(expandoHeight >= 240 && expando_status == "closed"){
		document.getElementById("expando").style.height = "230px";
		window.clearTimeout(expando);
		expando_action_status = "null";
		expando_status = "open";
		expando = 0;
		
	} else {
		animateExpando();
		expando = window.setTimeout("doExpando();",10);
	}
	
}

function closeExpando(){
	if(expando_status == "open" && expando_action_status == "null"){
		if(expandoType == "pushDown") doExpando();
		else if(expandoType == "fadeIn") doAlternateExpando();
	}
}

function animateExpando(){
	// OPEN EXPANDO
	if(expando_status == "open"){
		expando_action_status = "closing";
		document.getElementById("expando").style.visibility = "visible";
		document.getElementById("expando").style.height = expandoHeight + "px";
		expandoHeight = expandoHeight - 40;
		
	} else {
		expando_action_status = "opening";
		document.getElementById("expando").style.visibility = "visible";
		document.getElementById("expando").style.height = expandoHeight + "px";
		expandoHeight = expandoHeight + 40;
	}
}


// alternate: fades in/out instead of pushes
// filter:alpha(opacity=50); -moz-opacity:.5; opacity:.50;
function setupAlternateExpando(){
	document.getElementById("alternateExpando").style.visibility = "hidden";
	document.getElementById("alternateExpando").style.opacity = "0";
	var expandoType = "fadeIn";
}

function doAlternateExpando(){
	if(!expando && expando_status == "closed"){
		expandoOpacity = 0;
	}
	
	if(expandoOpacity <= 9 && expando_status == "open"){
		window.clearTimeout(expando);
		expando_action_status = "null";
		expando_status = "closed";
		expando = 0;
		setupAlternateExpando();
		
	} else if(expandoOpacity >= 9 && expando_status == "closed"){
		document.getElementById("alternateExpando").style.opacity = "1";
		window.clearTimeout(expando);
		expando_action_status = "null";
		expando_status = "open";
		expando = 0;
		
	} else {
		animateAlternateExpando();
		expando = window.setTimeout("doAlternateExpando();",10);
	}
}

function animateAlternateExpando(){
	// OPEN EXPANDO
	if(expando_status == "open"){
		expando_action_status = "closing";
		document.getElementById("alternateExpando").style.visibility = "visible";
		document.getElementById("alternateExpando").style.opacity = "." + expandoOpacity;
		expandoOpacity = expandoOpacity - 1;
		
	} else {
		expando_action_status = "opening";
		document.getElementById("alternateExpando").style.visibility = "visible";
		document.getElementById("alternateExpando").style.opacity = "." + expandoOpacity;
		expandoOpacity = expandoOpacity + 1;
	}
}

// alternate 2: swaps between products, technology, none
// no animation, but toggles between multiple Flash navs included in divs
function showProductsNav(which,page,fappend){
	var nav_products = document.getElementById("nav_products");
	var alternateExpando = document.getElementById("alternateExpando");
	alternateExpando.style.visibility = "visible";
	alternateExpando.style.opacity = "1";
	alternateExpando.innerHTML = flashNav(which,page,fappend);
}

function showTechnologyNav(which,page,fappend){
	var nav_technology = document.getElementById("nav_technology");
	var alternateExpando = document.getElementById("alternateExpando");
	alternateExpando.style.visibility = "visible";
	alternateExpando.style.opacity = "1";
	alternateExpando.innerHTML = flashNav(which,page,fappend);
}

function hideAllNav(){
	var alternateExpando = document.getElementById("alternateExpando");
	alternateExpando.style.visibility = "hidden";
	alternateExpando.style.opacity = "0";
	alternateExpando.innerHTML = "";
}

function flashNav(which,page,fappend){
	var flashFile = 'flash/centerpiece_plain.swf?page=' + page + '&which=' + which;
	if(which == "products" && page == "products") flashFile += '&navLevel=2';
	if(which == page) flashFile += fappend;
	
	var htmlContents = '<table border="0" cellpadding="0" cellspacing="0" width="100%">';
	htmlContents += '<tr><td onmouseover="hideAllNav();">&nbsp;</td><td>';
	htmlContents += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="869" height="230" id="navigation">';
	htmlContents += '<param name="menu" value="false" />';
	htmlContents += '<param name="movie" value="' + flashFile + '" /><param name="wmode" value="transparent" />';
	htmlContents += '<param name="quality" value="high" />';
	htmlContents += '<embed src="' + flashFile + '" quality="high" wmode="transparent" menu="false" width="869" height="230" align="middle" id="navigation" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';
	htmlContents += '</td><td onmouseover="hideAllNav();">&nbsp;</td>';
	htmlContents += '</tr><tr><td colspan="3" onmouseover="hideAllNav();">&nbsp;</td>';
	htmlContents += '</tr></table>';
	
	return htmlContents;
	//return flashFile;
}

// -->