var init={body:document.getElementsByTagName("body")[0],imgToggle:function(f,d,a,c){if(!document.getElementById(f)){return}var g=document.getElementById(f).getElementsByTagName(d);for(var e=0;e<g.length;e++){var b=g[e];b.onmouseover=function(){this.src=a+this.parentNode.className+".jpg"};b.onmouseout=function(){this.src=c+this.parentNode.className+".jpg"}}},navigation:function(c,b,a){if(document.getElementById(c)){var e=document.getElementById(c);var f=e.getElementsByTagName(b);for(var d=0;d<f.length;d++){var g=f[d].getElementsByTagName("a")[0].className;f[d].onmouseover=function(){if(this.getElementsByTagName(a)[0]){this.getElementsByTagName("a")[0].className+="_hover";this.className=this.className.replace("off","on")}};f[d].onmouseout=function(){if(this.getElementsByTagName(a)[0]){this.getElementsByTagName("a")[0].className=this.getElementsByTagName("a")[0].className.replace("_hover","");this.className=this.className.replace("on","off")}}}}},toggle:function(f,e,c,a){if(document.getElementById(f)){var d=document.getElementById(f);var g=d.className;var b=document.getElementById(e);b.onclick=function(){d.className.indexOf(a)!=-1?d.className=d.className.replace(a,c):d.className=d.className.replace(c,a)}}},toggle2:function(e,d){if(document.getElementById(e)){var c=document.getElementById(e);var a=c.getElementsByTagName(d);for(var b=0;b<a.length;b++){a[b].onmouseover=function(){this.className=this.className.replace("off","on")};a[b].onmouseout=function(){this.className=this.className.replace("on","off")}}}},tab:function(e,c){var h=document.getElementById(e);var f=h.getElementsByTagName("li");var j=document.getElementById(c);var d=j.getElementsByTagName("li");if(document.getElementById(e)){for(var g=0;g<f.length;g++){d[0].style.display="block";f[g].inx=g;f[g].onmouseover=function(){for(var a=0;a<d.length;a++){d[a].style.display="none";h.getElementsByTagName("a")[a].className="tab"}h.getElementsByTagName("a")[this.inx].className="tab current";d[this.inx].style.display="block"}}}}};init.navigation("globalNav","li","dl");init.toggle("home_news","n_switch","close","open");init.toggle2("control","li");init.imgToggle("carShow_main","img","img/carShow_on_","img/carShow_");
