
 var over_submenu = new Array();
 var id1 = 1;
 
	
	for(var id1=0;id1<=number_headers;id1++)
		{
			
		 	if(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; width:"+submenu_width+"px; z-index:10; visibility: hidden; background-color: "+submenu_border_color+"; layer-background-color: "+submenu_border_color+"; border: 1px none #000000\">");
			 		document.write("<table border=\"0\" cellspacing=\"0\" cellpadding=\""+submenu_border+"\" bgcolor=\""+submenu_border_color+"\"><tr><td>");
			 		document.write("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" 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; width:"+submenu_width+"px; 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+"\"><font class=\"standard12\"><b>"+eval("window.submenu"+id1+"_"+id2+"_text")+"</font></div></td></tr>");
			 				id2++;   
			 				
			 				  	
			 			}  
			 			
			 			document.write("</table>");
			 			document.write("</td></tr></table>");
			 			document.write("</div>");   
			 			
			 	};
		};
 
 


function activate(id) 
	{   
		
		over_submenu[id] = true;
		deactivateAll();
		showSubMenu(id); 
	};
	
function deactivate(id) 

	{   
		over_submenu[id] = false;
		deactivateAllDelay();
	};
	
function deactivateAllDelay() 
	{
		setTimeout("deactivateAll()",hide_delay); 
	}  ;

function deactivateAll() 
	{
		
		//var id = 1;

		for(var id=0;id<=number_headers;id++)
			{
			
			if(eval("document.getElementById('submenu'+id)")) 
				{     
					if(!over_submenu[id]) 
						{       
							hideSubMenu(id);
							
						}
			
				}
			}
			
	 };
	 

function link(url, target) 
	{ 
		
		if(target == "_self") 
			{
				
			     window.location.href=url;   
			}
		else 
			{
				window.open(url, target);   
			} 
	}  ;
	
function showSubMenu(id) 
	{   
		
			
		if(eval("document.getElementById('submenu'+id)"))
			{
				
				
				var theSubMenu = eval("submenu"+id);
				theSubMenu.style.top = getCoordinates(id).y + submenu_y;
				theSubMenu.style.left = getCoordinates(id).x + submenu_x;
				theSubMenu.style.visibility = 'visible'; 
			}
	}  ;
	
function getCoordinates(obj) 
	{	
		obj = eval("image"+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;
			 }
	 }  ;

function hideSubMenu(id) 
	{
		var theSubMenu = eval("submenu"+id);
		theSubMenu.style.visibility='hidden'; 
	} 
