window.onload = function () {  
BindEventOrange("Education_ToolBar_CenterUL","Education_Bottom","url(images/NewVersion/ToolBarOrange.jpg) no-repeat center left",null,null);

BindEventOrange("News_ToolBar_CenterUL","News_Bottom","url(images/NewVersion/ToolBarOrange.jpg) no-repeat center left","News_ToolBar_Right",["/html/zuixinzixun/","/html/benzhandongtai/","/html/toutiao/"]);

BindEventGray("Theatre_Toolbar_CenterUL","Theatre_Bottom","url(images/NewVersion/centertwo.jpg) no-repeat center left");

BindEventMultiColor("InfosHouse_Toolbar_UL","InfosHouse_Bottom","url(images/NewVersion/InfosHouse_Toolbar.jpg) no-repeat center left","#cc0033",null,["/Info/Class/Class.asp?ID=5","/Info/Class/Class.asp?ID=3","/Info/Class/Class.asp?ID=2","/Info/Class/Class.asp?ID=7"]);

BindEventMultiColor("InfosJob_Toolbar_UL","InfosJob_Bottom","url(images/NewVersion/InfosJob_Toolbar.jpg) no-repeat center left","#0e00cc",null,["/gzrcw/wszp.asp?lx=9&page=1","/gzrcw/rccx.asp?lx=10","#","#"]);

BindEventMultiColor("Tour_Toolbar_UL","Tour_Bottom","url(images/NewVersion/Tour.gif) no-repeat center left","#a73fac","Tour_Toolbar_Right",["/Html/Travel/T_index/lvyoukuaixun/","/html/Travel/T_index/lvyouluxian/","/Html/Travel/T_index/lvxingshe/"]);

BindEventMultiColor("Hotel_Toolbar_UL","Hotel_Bottom","url(images/NewVersion/Hotel_Toolbar.jpg) no-repeat center left","#2d9a12","Hotel_Toolbar_Right",["/Html/guizhoutechan/","/Hotel/","/Html/guizhoujiaotong/"]);

BindEventMultiColor("CompanyCatalogue_ToolBar_UL","CompanyCatalogue_Bottom","url(images/NewVersion/CompanyCatalogue.jpg) no-repeat center left","#9e302d","CompanyCatalogue_ToolBar_Right",["/qyml/","/Html/hangyedongtai/"]);

BindEventOrange("Business_ToolBar_CenterUL","Business_Bottom","url(images/NewVersion/ToolBarOrange.jpg) no-repeat center left","Business_ToolBar_Right",["/html/zhaoshangjiameng/","/html/zhaotoubiao/"]);

BindEventGray("Shop_Toolbar_CenterUL","Shop_Bottom","url(images/NewVersion/centertwo80.jpg) no-repeat center left");

BindEventMultiColor("GZHouse_Toolbar_UL","GZHouse_Bottom","url(images/NewVersion/GZHouse_Toolbar.gif) no-repeat center left","#e80b69","GZHouse_Toolbar_Right",["/Html/guizhoufangchan/","/Html/rexiaoloupantuijian/"]);

BindEventMultiColor("Car_Toolbar_UL","Car_Bottom","url(images/NewVersion/Car_Toolbar.jpg) no-repeat center left","#8c7515","Car_Toolbar_Right",["/html/Car/Car_Index/cheshidongtai/","/html/Car/Car_Index/xinchesudi/","/html/Car/Car_Index/qichechangshi/","/qyml/?act=showclass&soclass=ÆûÄ¦#0"]);
}
function BindEventGray(UI,DIV,BG)
{
var list = document.getElementById(UI).getElementsByTagName("li"); 
var divInner = document.getElementById(DIV).childNodes;
	 for (var i=0; i<list.length; i++) { 
		  list[i].onmouseover=function() {
			   this.style.background=BG;
			   for (var j=0; j<list.length; j++) { 
			   		if(list[j]!=this)
					{
						list[j].style.background="";
						divInner[j].style.display="none";
					}else
					{
						divInner[j].style.display="block";
					}
			   }
		  }
	 }  	
}
function BindEventOrange(UI,DIV,BG,APanel,links)
{
	var list = document.getElementById(UI).getElementsByTagName("li"); 
	var divInner = document.getElementById(DIV).childNodes;
	if(APanel!=null&&links!=null)
	{
		document.getElementById(APanel).getElementsByTagName("a")[0].href=links[0];
	}
	for (var i=0; i<list.length; i++) { 
		list[i].onmouseover=function() {
			this.style.background=BG;
			this.style.color="#FFFFFF";
			for (var j=0; j<list.length; j++) { 
				if(list[j]!=this)
				{		
					list[j].getElementsByTagName("a")[0].className="AGray"; 
					list[j].style.background="url(images/NewVersion/TooBakGray.jpg) no-repeat center left";
					divInner[j].style.display="none";
				}else
				{
					if(APanel!=null&&links!=null)
					{
						document.getElementById(APanel).getElementsByTagName("a")[0].href=links[j];
					}
					list[j].getElementsByTagName("a")[0].className="AWhite";
					divInner[j].style.display="block";
				}
			}
		}
	}  	
}
function BindEventMultiColor(UI,DIV,BG,Color,APanel,links)
{
	var list = document.getElementById(UI).getElementsByTagName("li"); 
	var divInner = document.getElementById(DIV).childNodes;
	if(APanel!=null&&links!=null)
	{
		document.getElementById(APanel).getElementsByTagName("a")[0].href=links[0];
	}
	for (var i=0; i<list.length; i++) { 
		list[i].onmouseover=function() {
			this.style.background=BG;
			this.style.color="#FFFFFF";
			for (var j=0; j<list.length; j++) { 
				if(list[j]!=this)
				{		
					list[j].style.color="#413f3f";
					list[j].style.background="";
					list[j].style.borderRight="solid 1px #e2e2e2";
					divInner[j].style.display="none";
				}else
				{
					if(APanel!=null&&links!=null)
					{
						document.getElementById(APanel).getElementsByTagName("a")[0].href=links[j];
					}
					list[j].style.color=Color;
					divInner[j].style.display="block";
				}
			}
		}
		list[i].onclick=function() {
			for (var j=0; j<list.length; j++) { 
				if(list[j]==this)
				{		
					window.open(links[j]);
					break;
				}
			}
		}
	}  	
}
function Search()
{
	var url="";
	var searchs=document.getElementsByName("search")[0].value;
	var r=document.getElementsByName('zn');
	if(r[0].checked==true)
	{
		url="http://video.baidu.com/v?word="+searchs+"&ct=301989888&rn=20&pn=0&db=0&s=0&fbl=1024";
	}
	if(r[1].checked==true)
	{
		url="http://www.baidu.com/s?wd="+searchs
	}
	if(r[2].checked==true)
	{
		url="http://www.google.com.hk/search?hl=zh-CN&source=hp&q="+searchs+"&btnG=Google+%E6%90%9C%E7%B4%A2&aq=f&aqi=&aql=&oq=&gs_rfai="
	}
	if(r[3].checked==true)
	{
		url="http://search.china.alibaba.com/search/offer_search.htm?keywords="+searchs
	}
	window.open(url);
}
function changeImage(object,imgSrc)
{
	object.src="../images/NewVersion/"+imgSrc;
}
