// File: b_help_1126.js

Help=function(){this.history_broken=false};Help.prototype.init=function(){this.main_topic="1_main";this.sections=g_sections;this.topics=g_topics;this.cur_topic=YAHOO.util.History.getBookmarkedState("t");this.cur_topic=this.cur_topic||this.main_topic;this.cur_topic=this._check_topic(this.cur_topic);this.cur_section=this.cur_topic.substr(0,1);g_trace.log("cur section = "+this.cur_section);this.state=new Object;var A;for(A in this.sections){if(typeof (this.sections[A])=="function"){continue}this.state[A]="c"}};Help.prototype._check_topic=function(A){if(this.topics[A]){return A}else{return this.main_topic}};Help.prototype.write_tools=function(){this._init_history();var B=null,C="";var A,D;C+='<div id="tools">';C+='<div class="tools_help"><h1>Help Sections</h1>';C+="<ul>";for(t in this.topics){if(typeof (this.topics[t])=="function"){continue}A=t.substr(0,1);if(A!=B){if(B){C+="</ul></li>"}B=A;if(this.cur_section==A){this.state[A]="o";D="section_open"}else{D="section_closed"}C+='<li id="section_'+A+'" class="'+D+'"><a class="section" href="#" onclick="return g_help.section_click(\''+A+"');\">"+this.sections[A]+"</a>";C+='<ul class="topic">'}if(t==this.cur_topic){D="topic current"}else{D="topic"}C+='<li id="topic_'+t+'" class="'+D+'"><a href="#'+t+'" onclick="return g_help.topic_click(\''+t+"');\">"+this.topics[t]+"</a></li>"}C+="</ul></li>";C+="</ul>";if(this.cur_topic==this.main_topic){D="topic current"}else{D="topic"}C+='<div class="spacer"><div></div></div>';C+='<div id="back_to_help_home"><ul id="topic_'+this.main_topic+'" class="'+D+'"><li><a href="#'+this.main_topic+'" onclick="return g_help.topic_click(\''+this.main_topic+"')\")>< &nbsp;back to Help home</a></li></ul></div>";C+='<div class="bottom_spacer"><div></div></div>';C+="</div>";C+="</div>";document.write(C)};Help.prototype.write_board=function(){document.write('<script src="/help_topic.php?topic='+this.cur_topic+'" type="text/javascript"><\/script>')};Help.prototype.section_click=function(A){var B=document.getElementById("section_"+A);if(this.state[A]=="o"){B.className="section_closed";this.state[A]="c"}else{B.className="section_open";this.state[A]="o"}g_trace.log("yo - my current topic is "+this.cur_topic);return false};Help.prototype.topic_click=function(A){g_trace.log("topic click t="+A);YAHOO.util.History.navigate("t",A);return false};Help.prototype._init_history=function(){var A=this;YAHOO.util.History.register("t",this.cur_topic,function(C){A.history_change(C)});try{YAHOO.util.History.initialize("/blank.html")}catch(B){g_trace.log("history broken");this.history_broken=true}};Help.prototype.history_change=function(A){g_trace.log("history changed!! with "+A);A=this._check_topic(A);this.cur_section=A.substr(0,1);document.getElementById("topic_"+this.cur_topic).className="topic";document.getElementById("topic_"+A).className="topic current";this.cur_topic=A;var C;for(C in this.sections){if(typeof (this.sections[C])=="function"||C==this.cur_section){continue}this.state[C]="c";document.getElementById("section_"+C).className="section_closed"}if(this.cur_section!="1"){this.state[this.cur_section]="o";document.getElementById("section_"+this.cur_section).className="section_open"}var D={success:this._good_page,failure:this._bad_page,scope:this};var B="help_topic.html?topic="+A+"&randomer="+Math.round(100000*Math.random());YAHOO.util.Connect.asyncRequest("GET",B,D)};Help.prototype._good_page=function(A){document.getElementById("board").innerHTML=A.responseText;g_board.adjust()};Help.prototype._bad_page=function(A){window.location.reload()};g_help=new Help();