﻿function _$(id){
   return document.getElementById(id);
}
     

try {
	  var menus = _$("main_menu").childNodes;
		for(var i = 0; i < menus.length; i++){
		 	 	if(menus[i].nodeType == 1){
		 	 		 var sm = menus[i].lastChild.nodeName;
		 	 		 if(sm == "UL"){
		       	 menus[i].onmouseover = function(){
		       	 	 if(document.all){
		       	       this.lastChild.style.cssText = "display:block; z-index:9999!important"
		       	   }else
		       	   	   this.lastChild.style.cssText = "display:block; z-index:9999!important; left:0px!important;"
		       	 }
		       	 
		       	 menus[i].onmouseout = function(){
		       	   this.lastChild.style.cssText = "display:none; z-index:1"
		       	 }       	 
		       }	    
		 	 	}	 	
		}
} catch (e) {
	//alert(e.message);
	//alert("对象没有被加载")
}




//Screen Auto
(screen.width > 1024)? set() : def();
function set(){
 	 var w = document.body.scrollWidth + 10;
 	 var l = (w-800)/2 + "px";
 	 var pl =  (w-800)/2 + 10 + "px";
 	 _$("mainbody").style.cssText = "margin-left:" + l;
 	 document.body.style.backgroundPosition = pl + " 0px"
}

function def(){
   //d
}
 
try{ 
	var status = true;
	var isHas  = $("#split_temp");
	//var _menu = $(".sub_menu").children(".menu_select");
	
	
	if(isHas){
		$("#split").click(function(){
		  if(status == false){
			  	status = true;
			  	//$("split_temp").style.cssText = "width:765px!important;"
			  	$("#split_temp").css("width","765px")
			  	$(this).attr("src","/images/ss.gif")
			  	$(this).attr("alt","收缩")
			  	//this.setAttribute("src","/images/ss.gif");
			  	//this.alt = "收缩";
		  }else{
			  	status = false;
			  	//$("split_temp").style.cssText = "width:575px;";
			  	$("#split_temp").css("width","575px")
			  	$(this).attr("src","/images/zk.gif")
			  	$(this).attr("alt","展开")
			  	//this.setAttribute("src","/images/zk.gif");
			  	//this.alt = "展开";
		  	}	
		})
		
	}
	

}catch(e){
	
}

 
 	 
/* 	 function getBrw(){
	 	 var browser=navigator.appName
	   var b_version=navigator.appVersion
	   var version=parseFloat(b_version)	
     switch(browser){
       case  "Microsoft Internet Explorer":
            //alert(b_version);            
       case  "Netscape":
            //alert(b_version);
            //$("index").style.cssText = "height:2300px"    	
     }  
 	 }
 	 
getBrw();*/