function init_yobo_main(){
try{
menuFix();
}
catch(e){
}
var _1=document.getElementById("yobo_nav_right_button");
var _2=document.getElementById("nav_sub_list");
if(_1){
attachEventListener(_1,"mouseover",openNavMenu,true);
attachEventListener(_1,"mouseout",closeNavMenu);
}
if(_2){
attachEventListener(_2,"mouseover",openNavMenu,true);
attachEventListener(_2,"mouseout",closeNavMenu);
}
var _3=document.getElementById("search_text");
if(_3){
attachEventListener(_3,"click",onFocusSearchInput);
attachEventListener(_3,"blur",onBlurSearchInput);
}
}
function menuFix(){
var _4=document.getElementById("header_nav_bar").getElementsByTagName("li");
for(var i=0;i<_4.length;i++){
_4[i].onmouseover=function(){
this.className+=(this.className.length>0?" ":"")+"fix_hover";
};
_4[i].onMouseDown=function(){
this.className+=(this.className.length>0?" ":"")+"fix_hover";
};
_4[i].onMouseUp=function(){
this.className+=(this.className.length>0?" ":"")+"fix_hover";
};
_4[i].onmouseout=function(){
this.className=this.className.replace(new RegExp("( ?|^)fix_hover\\b"),"");
};
}
}
function openNavMenu(_6){
if(typeof _6=="undefined"){
_6=window.event;
}
clearNavMenuTimeId();
var _7=document.getElementById("nav_sub_list");
if(_7==null){
return;
}
_7.style.display="block";
stopDefaultAction(_6);
return false;
}
function closeNavMenu(){
document.CloseNavMenuTimeId=setTimeout("closeNavMenuCallback()",500);
}
function clearNavMenuTimeId(){
clearTimeout(document.CloseNavMenuTimeId);
}
function closeNavMenuCallback(){
var _8=document.getElementById("nav_sub_list");
if(_8==null){
return;
}
_8.style.display="none";
}
function onFocusSearchInput(_9){
if(typeof _9=="undefined"){
_9=window.event;
}
var _a=getEventTarget(_9);
if(_a.value==CHAOJISOU){
_a.value="";
}
_a.select();
}
function onBlurSearchInput(_b){
if(typeof _b=="undefined"){
_b=window.event;
}
var _c=getEventTarget(_b);
if(_c.value.length<=0){
_c.value=CHAOJISOU;
}
}
function subListToButton(_d){
var _e=document.getElementById(_d);
if(!_e){
return false;
}
if(_e.style.display=="block"){
_e.style.display="none";
}else{
_e.style.display="block";
}
}
function listMouseover(){
try{
clearTimeout(document.listMenuTimeId);
}
catch(e){
}
}
function listMouseout(_f){
document.listMenuTimeId=setTimeout("hideSubList('"+_f+"')",500);
}
function hideSubList(_10){
var _11=document.getElementById(_10);
_11.style.display="none";
}
function attachEventListener(_12,_13,_14,_15){
if(typeof _12.addEventListener!="undefined"){
_12.addEventListener(_13,_14,_15);
}else{
if(typeof _12.attachEvent!="undefined"){
_12.attachEvent("on"+_13,_14);
}else{
_13="on"+_13;
if(typeof _12[_13]=="function"){
var _16=_12[_13];
_12[_13]=function(){
_16();
return _14();
};
}else{
_12[_13]=_14;
}
}
}
return true;
}
function stopDefaultAction(_17){
_17.returnValue=false;
if(typeof _17.preventDefault!="undefined"){
_17.preventDefault();
}
}
function getEventTarget(_18){
if(typeof _18=="undefined"){
_18=window.event;
}
var _19=null;
if(typeof _18.target!="undefined"){
_19=_18.target;
}else{
_19=_18.srcElement;
}
while(_19.nodeType==3&&_19.parentNode!=null){
_19=_19.parentNode;
}
return _19;
}
