/*************************************************************************

    chm2web Javascript Help Contents Viewer 1.40
    Copyright (c) 2002-2004 A!K Research Labs (http://www.aklabs.com)  
    http://chm2web.aklabs.com - HTML Help Conversion Utility

    Tested with: Internet Explorer 5, Opera 6, Mozilla 1.2, NN6
    Best viewed with: Internet Explorer 5+, Mozilla 1.x+

    ATTENTION! You can use this script only with web help system 
               generated by chm2web software.  
               
**************************************************************************/

var f={
'target':'content',
'ic_e':'files/0.gif',
'ic_l':'files/90.gif',
'ic_2':'files/91.gif',
'ic_3':'files/92.gif',
'ic_4':'files/99.gif',
'ic_18':'files/93.gif',
'ic_19':'files/94.gif',
'ic_20':'files/97.gif',
'ic_26':'files/95.gif',
'ic_27':'files/96.gif',
'ic_28':'files/98.gif'
};
var d=true;
var trees=[];
var u=0;
get_element=document.all?
function(s_id){return document.all[s_id]}:
function(s_id){return document.getElementById(s_id)};
function p(){
try{
var aa="";
aa=document.body.innerHTML;
if(aa.length<=0)return false;
}catch(e){
return false;
}
return true;
}
function ak(b_junction){
if(!b_junction){
cur=this.a_prop[2];
if(this.b_opened){
if((cur=='1')||(cur=='2'))cur='2';
if((cur=='3')||(cur=='4'))cur='4';
if((cur=='5')||(cur=='6'))cur='6';
if((cur=='7')||(cur=='8'))cur='8';
};
if(!this.b_opened){
if((cur=='1')||(cur=='2'))cur='1';
if((cur=='3')||(cur=='4'))cur='3';
if((cur=='5')||(cur=='6'))cur='5';
if((cur=='7')||(cur=='8'))cur='7';
};
return'files/'+cur+'.gif';
}else{
return f['ic_'+(
(this.a.length?16:0)+
(this.a.length&&this.b_opened?8:0)+
(this.is_last()?1:0)+
(this.is_first()?2:0)+2)];
}
}
function v(o_parent,n_order){
this.n_depth=o_parent.n_depth+1;
this.a_prop=o_parent.a_prop[n_order+(this.n_depth?3:0)];
if(!this.a_prop)return;
this.o_root=o_parent.o_root;
this.o_parent=o_parent;
this.n_order=n_order;
this.b_opened=d;
this.n_id=this.o_root.a_index.length;
this.o_root.a_index[this.n_id]=this;
o_parent.a[n_order]=this;
this.a=[];
for(var i=0;i<this.a_prop.length-2;i++)
new v(this,i);
this.get_icon=ak;
this.open=aw;
this.select=av;
this.init=au;
this.is_last=function(){
return this.n_order==this.o_parent.a.length-1};
this.is_first=function(){
return(this.n_depth==0)&&(this.n_order==0)&&(!this.is_last())};
}
function aw(b_close){
var a=[];
var k=get_element('divtree'+this.n_id);
if(!k)return;
if(d){
document.write(a.join(''));
for(var i=0;i<this.a.length;i++){
document.write(this.a[i].init());
this.a[i].open();
}
}else{
if(!k.innerHTML){
for(var i=0;i<this.a.length;i++)
a[i]=this.a[i].init();
k.innerHTML=a.join('');
}
k.style.display=(b_close?'none':'block');
this.b_opened=!b_close;
var x=document.images['j_img'+this.n_id],
i=document.images['i_img'+this.n_id];
if(x)x.src=this.get_icon(true);
if(i)i.src=this.get_icon();
}
}
function av(b_deselect){
if(!b_deselect){
var q=this.o_root.o_selected;
this.o_root.o_selected=this;
if(q)q.select(true);
}
var i=document.images['i_img'+this.n_id];
if(i)i.src=this.get_icon();
get_element('i_txt'+this.n_id).style.fontWeight=b_deselect?'normal':'bold';
return Boolean(this.a_prop[1]);
}
function MakeTree(itm,b_openroot){
d=!p();this.a_prop=itm;
this.o_root=this;this.a_index=[];this.o_selected=null;
this.n_depth=-1;
var y=new Image(),
o_iconl=new Image();
y.src=f['ic_e'];
o_iconl.src=f['ic_l'];
f['im_e']=y;
f['im_l']=o_iconl;
for(var i=0;i<64;i++)
if(f['ic_'+i]){
var af=new Image();
f['im_'+i]=af;
af.src=f['ic_'+i];
}
this.select=function(n_id){return this.a_index[n_id].select();};
this.toggle=function(n_id){var ae=this.a_index[n_id];
ae.open(ae.b_opened)};
this.a=[];
for(var i=0;i<itm.length;i++){
new v(this,i);
}
this.n_id=trees.length;
trees[this.n_id]=this;
for(var i=0;i<this.a.length;i++){
document.write(this.a[i].init());
if(b_openroot||d)this.a[i].open();
}
this.h=h;
this.OpenTreeNode=OpenTreeNode;
this.OpenNextNode=OpenNextNode;
}
function au(){
var w=[],
o_current_item=this.o_parent;
for(var i=this.n_depth;i>0;i--){
w[i]='<img alt="" src="'+f[o_current_item.is_last()?'ic_e':'ic_l']+'" border="0" align="absbottom">';
o_current_item=o_current_item.o_parent;
}
return'<a name="#i_txt'+this.n_id+'"></a><table cellpadding="0" cellspacing="0" border="0"><tr><td nowrap>'+
w.join('')+(this.a.length?
(d?'':'<a href="javascript: trees['+this.o_root.n_id+'].toggle('+this.n_id+
')" >')+'<img alt="" src="'+this.get_icon(true)+'" border="0" align="absbottom" name="j_img'+this.n_id+
'">'+
(d?'':'</a>'):'<img alt="" src="'+this.get_icon(true)+
'" border="0" align="absbottom">')+
'<a href="'+this.a_prop[1]+
'" target="'+f['target']+'"'+
' onclick="return trees['+this.o_root.n_id+'].select('+this.n_id+');" '+
(d?'':' ondblclick="trees['+
this.o_root.n_id+'].toggle('+this.n_id+')"')+' class="t0i" id="i_txt'+
this.n_id+'"><img alt="" src="'+this.get_icon()+'" border="0" align="absbottom" name="i_img'+
this.n_id+'" class="t0im">&nbsp;'+
this.a_prop[0]+'</td></tr></table>'+(this.a.length?
'<div id="divtree'+this.n_id+'" style="display:none"></div>':'');
}
function OpenTreeNode(filename)
{
if(this.o_root!=null&&this.o_root.o_selected!=null&&
this.o_root.o_selected.a_prop[1]==filename){
return;
}
CheckNode(filename,this);
}
function CheckNode(filename,itm)
{
for(var i=0;i<itm.a.length;i++){
if(itm.a[i].b_opened)
itm.a[i].open(false);
if(filename==itm.a[i].a_prop[1]){
OpenDownTo(itm.a[i]);
itm.a[i].select(false);
};
CheckNode(filename,itm.a[i]);
};
}
function h(id)
{
if(this.o_root!=null&&this.o_root.o_selected!=null&&
this.o_root.o_selected.n_id==id)return;
u=-1;
m(id,this);
return u;
}
function m(id,itm,obj)
{
for(var i=0;i<itm.a.length;i++){
if(itm.a[i].b_opened)
itm.a[i].open(false);
if(id==itm.a[i].n_id){
OpenDownTo(itm.a[i]);
itm.a[i].select(false);
u=id;
return;
};
m(id,itm.a[i]);
};
}
function OpenDownTo(node)
{
if(!node.n_depth)
return;
OpenDownTo(node.o_parent);
node.o_parent.open(false);
}
function OpenNextNode(incr)
{
var ac=this.o_root.o_selected;
var ai=this.o_root.o_selected.n_id+incr;
if(ai<0)return;
if(this.h(ai)==-1)return;
trees[0].select(ai);
window.open(this.o_root.o_selected.a_prop[1],"content");
}
