


var over_submenu = new Array();  
var id1 = 1; 
while(eval("window.submenu"+id1+"_1_text")) 
{   
	document.write("<div id=\"submenu"+id1+"\" onMouseOver=\"over_submenu["+id1+"]=true;\" onMouseOut=\"over_submenu["+id1+"]=false; deactivateAllDelay();\" style=\"position:absolute;cursor:hand; padding: 1px; z-index:10; visibility: hidden; background-color: "+submenu_Layer_Color+"; layer-background-color: "+submenu_border_color+"; border: 1px none #000000\">");
	document.write("<table border=\"0\" cellspacing=\"0\" cellpadding=\""+submenu_border+"\" width=\""+submenu_width+"\" bgcolor=\""+submenu_border_color+"\"><tr><td>");   
	document.write("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\""+submenu_width+"\" bgcolor=\""+submenu_item_spacing_color+"\">");   
	var id2 = 1;   
	while(eval("window.submenu"+id1+"_"+id2+"_text")) 
	{     
		if(id2 > 1 && submenu_item_spacing > 0) 
		document.write("<tr><td><img src=\"spacer.gif\" width=\"1\" height=\""+submenu_item_spacing+"\"></td></tr>");     
		document.write("<tr><td><div id=\"submenu"+id1+"_"+id2+"\" onClick=\"link('"+eval("window.submenu"+id1+"_"+id2+"_link")+"','"+submenu_url_target+"');\" onMouseOver=\"over_submenu["+id1+"]=true; setItemColor('submenu"+id1+"_"+id2+"','"+submenu_highlight_color+"','"+submenu_font_highlight_color+"');\" onMouseOut=\"over_submenu["+id1+"]=false; deactivateAllDelay(); setItemColor('submenu"+id1+"_"+id2+"','"+submenu_background_color+"','"+submenu_font_color+"');\" style=\"position:relative; padding: 5px; height: "+submenu_item_height+"; z-index:10;  visibility: inherit;  background-color: "+submenu_background_color+"; layer-background-color: "+submenu_background_color+"; color: "+submenu_font_color+"\"><img src=\"spacer.gif\" width=\""+submenu_item_indent+"\" height=\"1\"><font face=\""+submenu_font_face+"\" size=\""+submenu_font_size+"\">"+eval("window.submenu"+id1+"_"+id2+"_text")+"</font></div></td></tr>");     
		id2++;
	}   
	document.write("</table>");   
	document.write("</td></tr></table>");   
	document.write("</div>");   
	id1++;
} 
var menuNum = id1 - 1;

;function activate(id) 
{   
	over_submenu[id] = true;   
	deactivateAll();   
	//setImageSrc("image"+id, eval("window.image"+id+"_highlight_src"));  
	showSubMenu(id); 
}

;function deactivate(id) 
{	
	over_submenu[id] = false;   
	deactivateAllDelay(); 
} 

;function deactivateAllDelay() 
{	
	setTimeout("deactivateAll()",hide_delay); 
}  

;function deactivateAll() 
{
	var id = 1;   
	while( id <= menuNum ) 
	{     
		if(!over_submenu[id]) 
		{       
			hideSubMenu(id);       
			//setImageSrc("image"+id, eval("window.image"+id+"_src"));     
		}     
		id++;
	} 
}  

/*;function setImageSrc(theImageName,theImageSrc) 
{   
	if(document.images) 
	{     
		document.images[theImageName].src=theImageSrc;   
	} 
} */ 

;function link(url, target) 
{ 
	if(target == "_self") 
	{     
		window.location.href=url;   
	}   
	else 
	{     
		window.open(url, target);   
	} 
}  

;function showSubMenu(id) 
{   
	var theImageName = "image" + id;   
	var theImage;   
	if(document.images) 
	{     
		theImage = document.images[theImageName];   
	}
	if( document.getElementById )
		var theSubMenu = document.getElementById("submenu"+id);
	else
		var theSubMenu = eval("submenu"+id);   
	theSubMenu.style.top = getCoordinates(theImage).y + theImage.height - 1;   
	theSubMenu.style.left = getCoordinates(theImage).x + submenu_x;   
	theSubMenu.style.visibility = 'visible'; 
}  

;function getCoordinates(obj) 
{   
	var newObj = new Object();   
	newObj.x = obj.offsetLeft;   
	newObj.y = obj.offsetTop;   
	theParent = obj.offsetParent;   
	while(theParent != null)
	{     
		newObj.y += theParent.offsetTop;     
		newObj.x += theParent.offsetLeft;     
		theParent = theParent.offsetParent;   
	}   
	return newObj;  
}  

;function setItemColor(theItemName,theItemBgColor,theItemColor) 
{   
	if(document.all) 
	{     
		document.all[theItemName].style.backgroundColor=theItemBgColor;     
		document.all[theItemName].style.color=theItemColor;   
	} 
	else if( document.getElementById )
	{
		document.getElementById(theItemName).style.backgroundColor=theItemBgColor;  
		document.getElementById(theItemName).style.color=theItemColor;
	}
}  

;function hideSubMenu(id) 
{   
	if( document.all )
		var theSubMenu = eval("submenu"+id);
	else if( document.getElementById )
		var theSubMenu = document.getElementById("submenu"+id);
	theSubMenu.style.visibility='hidden'; 
}
