var featureState="block";var timer;var allowedRotations=5;var curStart=-1;function onTabAvailable(){YAHOO.util.Event.onAvailable("tab_menu",this.handleOnAvailable,this);}onTabAvailable.prototype.handleOnAvailable=function(me){$("tab_image").setStyle({display:"block"});$("tab_cm").setStyle({display:"block"});};function updateSearchScope(_5b){var _5c=_5b;if(!_5c){_5c="query";}var _5d=Form.serialize(_5c);if(_5d.indexOf("external_")>-1){document.getElementById("home_scope").style.visibility="hidden";}else{if(bIsAnonymous){document.getElementById("home_scope").style.visibility="hidden";}else{document.getElementById("home_scope").style.visibility="visible";var _5e=YAHOO.util.Connect.asyncRequest("POST","/searchscope.do",searchScopeCallback,_5d);}}}function onHomeLoad(){var _5f=new YAHOO.widget.TabView("tab_menu");var _60=new CREDO.util.state.Cookie("features").getValue();if(_60&&_60!=featureState){toggleFeatures();}getFeaturedContent();onLoad();updateSearchScope("query");var _61=new onTabAvailable();}function toggleFeatures(){featureState=(featureState=="block")?"none":"block";var _62=(featureState=="block")?"none":"inline";var _63=(featureState=="none")?"none":"inline";if(featureState=="block"){allowedRotations=5;getFeaturedContent();}else{if(timer){clearTimeout(timer);}allowedRotations=0;}$("home_extra").style.display=featureState;$("home_feature_button_hide").style.display=_63;$("home_feature_button_show").style.display=_62;new CREDO.util.state.Cookie("features",featureState,30);}function featuredContent(_64){if(timer){clearTimeout(timer);}allowedRotations=0;getFeaturedContent(_64);}function getFeaturedContent(_65){var _66={success:function(o){if(o.responseText!==undefined){try{var _68=document.getElementById("feature_div");if(_68){while(_68.hasChildNodes()){_68.removeChild(_68.firstChild);}_68.innerHTML=o.responseText;}else{alert(home_features_notavail);}}catch(err){alert(home_features_notavail);}if(allowedRotations>0){allowedRotations--;timer=setTimeout("getFeaturedContent()",4000);}}},failure:function(o){var _6a=document.getElementById("feature_div");if(_6a){while(_6a.hasChildNodes()){_6a.removeChild(_6a.firstChild);}_6a.innerHTML=home_features_notavail;}else{alert(home_features_notavail);}},argument:{}};clearTimeout(timer);if(typeof (_65)!=="undefined"){curStart=_65;}else{if(curStart==-1){curStart=Math.floor(Math.random()*10);}else{curStart++;}}YAHOO.util.Connect.asyncRequest("GET","/featuredcontent.do?start="+curStart,_66);return false;}document.observe("dom:loaded",function(){var _6b=new YAHOO.widget.Tooltip("tt1",{context:"conceptMapTab",text:home_tab_concept_rollover,xyoffset:[20,200]});});
