    var yi; 
	function show(id)
	{
		for(i=1;i<9;i++)
		{
			var yid="a"+i;
			if(document.getElementById(yid).style.backgroundImage=="url(image/default/bg_menu_on.gif)")
			{	 
				yi=yid; 
			}
			document.getElementById(yid).style.backgroundImage="";
		}
		document.getElementById(id).style.backgroundImage="url(image/default/bg_menu_on.gif)";
	}
	
	function hid(id)
	{
		document.getElementById(id).style.backgroundImage="";
		if(yi)
			document.getElementById(yi).style.backgroundImage="url(image/default/bg_menu_on.gif)";

	}
	function hiid()
	{
		if(yi)
			document.getElementById(yi).style.backgroundImage="";
	}
	function select_form(i,url)
	{
		if(i==1)
			$('sear').action=url+'/buy_list.php';
		if(i==2)
			$('sear').action=url+'/product_list.php';
		if(i==3)
			$('sear').action=url+'/company_list.php';
		if(i==4)
			$('sear').action=url+'/news_list.php';
		if(i==5)
			$('sear').action=url+'/exhibition.php';
		if(i==6)
			$('sear').action=url+'/project_list.php';
		if(i==7)
			$('sear').action=url+'/job_list.php';
		if(i==8)
		{
			$('catType').value=1;
			$('sear').action=url+'/buy_list.php';
		}
		if(i==9)
		{
			$('catType').value=2;
			$('sear').action=url+'/buy_list.php';
		}
	}
function setHomepage(url)
{
	if (document.all)
	{
		document.body.style.behavior='url(#default#homepage)';
		document.body.setHomePage(url);
	}
    else if (window.sidebar)
    {
    	if(window.netscape)
		{
			 try
			 {
				netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
			 }
			 catch(e)
			 {
				alert("Your browser permissions is denied");
			 }
		}
		var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
		prefs.setCharPref('browser.startup.homepage',url);
 	}
}
	
function myAddPanel(url,title)
{
	var desc=title;
	if ((typeof window.sidebar == 'object') && (typeof window.sidebar.addPanel == 'function'))
	{
		window.sidebar.addPanel(title,url,desc);
	}
	else
	{
		window.external.AddFavorite(url,title);
	}
}

function setTab(name,cursel,n)
{
	for(i=1;i<=n;i++)
	{
		var menu=document.getElementById(name+i);
		if(menu)
		{
			var con=document.getElementById("con_"+name+"_"+i);
			menu.className=i==cursel?"hover":"";
			con.style.display=i==cursel?"block":"none";
		}
	}
}
function get_randfunc(obj)
{
	var sj = new Date();
	obj.src=obj.src+'?'+sj;
}
