var d = document;
var winIE = (navigator.userAgent.indexOf("Opera")==-1 && (d.getElementById && d.documentElement.behaviorUrns)) ? true : false;
var allPage;
if(winIE) 
{
	jsHover = function() 
	{
	    var hEls = document.getElementById("nav").getElementsByTagName("LI");
	    for (var i=0, len=hEls.length; i<len; i++) {
	      hEls[i].onmouseover=function() {this.className+=" jshover"; }
	      hEls[i].onmouseout=function() { this.className=this.className.replace(" jshover", ""); }
	    }
  	}
  if (window.attachEvent && navigator.userAgent.indexOf("Opera")==-1) window.attachEvent("onload", jsHover);
 }

function bodySize(){ 	

	if(winIE && d.documentElement.offsetWidth) 
	{

		 if(document.body.clientWidth >= 1140){
			allPage.style.width = 1140 + "px";
		 }else if(document.body.clientWidth <= 980){
		 	allPage.style.width = 980 + "px";
		 }else{
			allPage.style.width = "auto";
		 }
		 /*
		 sObj.width = (d.documentElement.offsetWidth>=1140) ? "1140px" : "100%"; 
		 */
	}
}
function init(){
	if(winIE){
		allPage = d.getElementById("allPage");
 		bodySize(); 
		window.onresize = bodySize;
	}
	if(window.init_search){
		init_search();
	}
	if(window.init_selects){
		init_selects();
	}
}

onload = init;

if(winIE) { onresize = bodySize; }


