	function unFocus()
	{
		document.search.str.blur();
	}
	function jm(mainDiv,apearDiv)
	{
		menuPosition(mainDiv,apearDiv);
		showLayer(apearDiv);
	}
	function menuPosition(mainDiv,apearDiv)
	{
		var is=new Is();		
		if (is.ie)
		{
			var mainMenu=document.all[mainDiv];
			mainLeft = 0; 
			mainTop = 0; 
			while (mainMenu && mainMenu.offsetParent)
			{
				mainLeft+=mainMenu.offsetLeft;
				mainTop+=mainMenu.offsetTop;
				mainMenu=mainMenu.offsetParent;
			}
			document.all[apearDiv+"Div"].style.pixelLeft=mainLeft;
			document.all[apearDiv+"Div"].style.pixelTop=mainTop+34;
			if(navigator.appName=='Opera')
			{
				
				document.all[apearDiv+"Div"].style.pixelTop=mainTop;
			}
		}
		else
		{
			if(is.ns)
			{
				var mainMenu=document.getElementById(mainDiv);
				mainLeft = 0; 
				mainTop = 0; 
				while (mainMenu && mainMenu.offsetParent)
				{
					mainLeft+=mainMenu.offsetLeft;
					mainTop+=mainMenu.offsetTop;
					mainMenu=mainMenu.offsetParent;
				}
				document.getElementById(apearDiv+"Div").style.left=mainLeft;
				document.getElementById(apearDiv+"Div").style.top=mainTop+14;
			}
			if(navigator.appName=='Opera')
			{
				
				document.all[apearDiv+"Div"].style.pixelTop=mainTop;
			}
		}
	}
	function Is()
	{
		var appName = navigator.appName;
		var version = navigator.appVersion;
	
		this.ns = ( appName == "Netscape" );
		this.ns4 = this.ns && version.indexOf("4.")!=-1;
		this.ns5 = this.ns && version.indexOf("5.")!=-1;
		this.ns6 = ( this.ns5 || (this.ns && version.indexOf("6.")!=-1) );

		this.ie = ( appName == "Microsoft Internet Explorer" );
		this.ie4 = this.ie && version.indexOf("MSIE 4.")!=-1;
		this.ie5 = this.ie && version.indexOf("MSIE 5.")!=-1;
		this.ie6 = this.ie && version.indexOf("MSIE 6.")!=-1;
	
		var userAgent = navigator.userAgent.toLowerCase();
		this.mac = ( userAgent.indexOf( "mac" ) != -1 );
		this.win = ( userAgent.indexOf( "windows" ) != -1 );
		this.linux = ( userAgent.indexOf( "linux" ) != -1 );
	}
	Is.prototype.toString = function()
	{
		var s = '';
		for( var i in this )
		{
			s += i + ': ' + this[i] + '\n';
		}
		return s;
	}
	var is = new Is();
	function objectMenu( div )
	{
		this.id = div.id;
		this.name = div.id.replace(/Div/, "");

		this.div = div;
		this.style = ( is.ns4 ) ? this.div : this.div.style;

	}
	objectMenu.all = new Array();
	objectMenu.add = function( div )
	{
		var name = div.id.slice(0, -3);
		if( div.id == name + "Div")
		{
			objectMenu.all[ name ] = new objectMenu( div );
			eval( name + " = objectMenu.all." + name );
		}
	}
	objectMenu.init = function( doc )
	{
		this.isLoaded = true;
		if( document.layers )
		{
			if( doc == null ) doc = document;
			for( var i=0; i<doc.layers.length; i++ )
			{
				objectMenu.add( doc.layers[i] );
				objectMenu.init( doc.layers[i].document );
			}
			return true;
		} 
		var allD = false;
		if( is.ie4 ) 
			allD = document.all.tags("DIV");
			
		else 
			if( is.ie5 || is.ie6 ) 
				allD = document.getElementsByTagName("DIV");
			else 
				if( is.ns6 ) 
					allD = document.getElementsByTagName("DIV");
		if( allD )
		{
			for( var i=0; i<allD.length; i++ )
				objectMenu.add( allD[i] );
			return true;
		}
		return false;
	}
	objectMenu.prototype.show = function()
	{
		this.style.visibility = "visible";
	}
	objectMenu.prototype.hide = function()
	{
		this.style.visibility = "hidden";
	}
	function show(obj)
	{
		
		if(objectMenu.all[obj])
		{
			objectMenu.all[obj].show();
		}
	}
	function hide(obj)
	{
		if(objectMenu.all[obj])
			objectMenu.all[obj].hide();
	}

window.onerror = null;
 var bName = navigator.appName;
 var bVer = parseInt(navigator.appVersion);
 var NS4 = (bName == "Netscape" && bVer == 4);
 var NS4 = (bName == "Netscape" && bVer >= 4);
 var IE4 = (bName == "Microsoft Internet Explorer" && bVer >= 4);
 var IE4 = ((bName == "Microsoft Internet Explorer" && bVer >= 4) || (bName == "Netscape" && bVer == 5));
 var NS3 = (bName == "Netscape" && bVer < 4);
 var IE3 = (bName == "Microsoft Internet Explorer" && bVer < 4);
 var menuActive = 0;
 var menuOn = 0;
 var onLayer;
 var timeOn = null;
 var loaded = 0;
 var onLayerSize = 0;

var menuColor = "#FFFFFF";
var menuBorderColor = "#000000";

if (NS4 || IE4) {
 if (navigator.appName == "Netscape") {
  layerStyleRef="layer.";
  layerRef="document.layers";
  styleSwitch="";
  }else{
  layerStyleRef="layer.style.";
  layerRef="document.all";
  styleSwitch=".style";
 }
}

function showLayer(layerName)
{
	if (NS4 || IE4) 
	{
		if (timeOn != null) 
		{
  			clearTimeout(timeOn);
  			hideLayer(onLayer);
  			
  		}
  		onLayer = layerName;
		if (NS4 || IE4) 
		{
			if(navigator.appName != "Netscape")
			{
				eval(layerRef+'["'+layerName+'Div"]'+styleSwitch+'.display=""');
			}
  			show(layerName);
		}
 		
	}
}

function hideLayer(layerName)
{
	if (menuActive == 0)
	{
		 if (NS4 || IE4) 
		 {
		 hide(layerName);
		 }
	}
}

function btnTimer(opt) 
{
 	timeOn = setTimeout("btnOut()",250);
}

function btnOut(layerName) 
{
	if (menuActive == 0) 
	{
  		hideLayer(onLayer);
  	}
}

function menuOver(itemName) 
{
	clearTimeout(timeOn);
 	menuActive = 1;
}

function menuOut(itemName) 
{
 	menuActive = 0;
	timeOn = setTimeout("hideLayer(onLayer)", 400);
}


function menuLink(title, url) 
{
	this.title = title;
	this.url = url;
}

function menuMaker(menuArray, LayerSize) 
{
	onLayerSize = LayerSize;
 	n = "";
 	j = eval(menuArray + ".length") - 1;
 	nameOfLayer = eval(menuArray + ".id.slice(0, -3)");
 	topTable = "<div ID='" + eval(menuArray + ".id") + "'><table border=1 style='border-collapse: collapse; border-width: 1px; border-top-width: 0px;' Cellpadding=0 cellspacing=0 bgcolor='" + menuColor +"' bordercolor='" + menuBorderColor +"'>";
 	cell = "<tr><td onmouseover=\"showLayer('" + nameOfLayer + "'); this.className='menuover'; \" onmouseout=\"btnTimer(); this.className='menuout'; \" style='border-color: #C4C4C4; border-top-width: 0px; padding: 3px; padding-left: 6px; padding-right: 6px;'>"; 
 	cellend = "</td></tr>";
 	btmTable = "</table></div>";
	n += topTable;
 	for( var i = 1; i <=j; i++)
 	{
   		n += cell+"<a class=menu href='" + eval(menuArray + "[" + i + "].url") + "' target='_top' >" + eval(menuArray + "[" + i + "].title") + "</a><br>"+cellend;
 	}
 	n += btmTable;
 	return n;
}

function CallThisMenu() 
{
	for(i=0; i<menuSize.length;i++)
	{
                	document.write(menuMaker(menuSize[i],31));
		nameMenu=eval(menuSize[i]+".id");
		if(navigator.appName != "Netscape")
		{
			eval(layerRef+'["'+nameMenu+'"]'+styleSwitch+'.display="none"');
		}
	}
}
onload=objectMenu.init;
