var meDisDelay, meDisLev = [0], meDisNum = 0, meDisArray = [];
function autoMenu(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) {
this.oWidth = a; this.rightimg = b; this.downimg = c; this.oNormCol = d; this.oHighCol = e;
this.oNormColF = f; this.oHighColF = g; this.oBordCol = h; this.oBordWid = i; this.linkStyle = j;
this.oDelay = k; this.lPos = l; this.tPos = m; this.oOrient = n; this.oScroll = o;
this.sub = new Array(); this.buildMenu = buildMenu; return this;
}
function menuBox( oTxt, oLnk, oTgt ) {
this.text = oTxt;
this.link = oLnk;
this.target = oTgt;
this.sub = new Array();
return this;
}
function buildMenu() {
this.oName = meDisNum; meDisNum++;
var firstName = 'display:block;'+(document.layers?'':'width:100%;font-size:16px;line-height:19px;')+this.linkStyle+((this.linkStyle.charAt(this.linkStyle.length-1)==';')?'':';')+'color:'+this.oNormColF+';';
var lastName = this.linkStyle+((this.linkStyle.charAt(this.linkStyle.length-1)==';')?'':';')+'color:'+this.oHighColF+';';
if( document.layers && navigator.mimeTypes['*'] ) {
document.write('<style type="text/css">\ntd.removeNS4BugPad { line-height: 0px; }\ntd.removeNS4BugPad ilayer { line-height: 1em; }\n.meDisA'+this.oName+'{'+firstName+'}\n.meDisB'+this.oName+'{'+lastName+'}\n</style>\n');
firstName = 'class="meDisA'+this.oName+'"'; lastName = 'class="meDisB'+this.oName+'"';
} else { firstName = 'style="'+firstName+'"'; lastName = 'style="'+lastName+'"'; }
buildTree(this.sub,0,this.tPos,this.lPos,this,'',firstName,lastName);
}
function buildTree(oOb,oLev,oVOffset,oOffset,oBase,oI,firstName,lastName) {
if( oBase.oScroll ) { meDisArray[meDisArray.length] = ['meDi'+oBase.oName+oI,oVOffset,oOffset]; }
var oLineOut = ( document.layers ? ' <layer onmouseover="window.clearTimeout(meDisDelay);" onmouseout="meDisDelay = window.setTimeout(\'hideAll(1);\','+oBase.oDelay+');" left="'+oOffset+'" top="'+oVOffset+'" width="'+(oBase.oBordWid+((oBase.oBordWid+oBase.oWidth)*((oLev||oBase.oOrient)?1:oOb.length)))+'" visibility="'+(oLev?'hide':'show')+'" id="meDi'+oBase.oName+oI+'">\n' : ' <div onmouseover="window.clearTimeout(meDisDelay);" onmouseout="meDisDelay = window.setTimeout(\'hideAll(1);\','+oBase.oDelay+');" style="width:'+(oBase.oBordWid+((oBase.oBordWid+oBase.oWidth)*((oLev||oBase.oOrient)?1:oOb.length)))+'px;position: absolute;left: '+oOffset+'px;top: '+oVOffset+'px;visibility: '+(oLev?'hidden':'visible')+';" id="meDi'+oBase.oName+oI+'">\n' )+
' <table border="0" cellpadding="0" cellspacing="0"><tr><td bgcolor="'+oBase.oBordCol+'">\n'+
' <table border="0" cellpadding="0" cellspacing="'+oBase.oBordWid+'">\n'+
((oLev||oBase.oOrient)?'':' <tr>\n');
for( var i = 0; i < oOb.length; i++ ) {
if( oOb[i].sub.length ) { buildTree(oOb[i].sub,oLev+1,(((oLev||oBase.oOrient)?i:1)*(19+oBase.oBordWid))+oVOffset,(((oLev||oBase.oOrient)?1:i)*(oBase.oWidth+oBase.oBordWid))+oOffset,oBase,oI+'_'+i,firstName,lastName); }
if( oOb[i].sub.length && document.images && !window['meDisImgH'+oBase.oName+((oLev||oBase.oOrient)?'r':'d')] ) {
window['meDisImgH'+oBase.oName+((oLev||oBase.oOrient)?'r':'d')] = new Image();
window['meDisImgN'+oBase.oName+((oLev||oBase.oOrient)?'r':'d')] = new Image();
window['meDisImgH'+oBase.oName+((oLev||oBase.oOrient)?'r':'d')].src = oBase[((oLev||oBase.oOrient)?'rightimg':'downimg')][3];
window['meDisImgN'+oBase.oName+((oLev||oBase.oOrient)?'r':'d')].src = oBase[((oLev||oBase.oOrient)?'rightimg':'downimg')][2];
}
oLineOut +=
((oLev||oBase.oOrient)?' <tr>\n':'')+
( oOb[i].sub.length ?
' <td '+(document.layers?'class="removeNS4BugPad"':'style="background-color:'+oBase.oNormCol+';"')+' width="'+oBase.oWidth+'" height="19" onmouseover="if(document.layers){return;} this.oNormCol=\''+oBase.oNormCol+'\';this.oHighCol=\''+oBase.oHighCol+'\';this.oNormColF=\''+oBase.oNormColF+'\';this.oHighColF=\''+oBase.oHighColF+'\';this.toChange=getRefToDivNest(\'meDiA'+oBase.oName+oI+'_'+i+'\');if(!document.images){document.images=[];}this.toImg=document.images[\'meDiI'+oBase.oName+oI+'_'+i+'\'];this.imgIden=\''+oBase.oName+((oLev||oBase.oOrient)?'r':'d')+'\';showdivCol(\'meDi'+oBase.oName+oI+'_'+i+'\','+(oLev+1)+');giveCol(this);meDisLev['+(oLev+1)+']=this;">\n'+
( document.layers ? ' <ilayer><layer width="'+(oBase.oWidth-3)+'" onmouseover="this.oNormCol=\''+oBase.oNormCol+'\';this.oHighCol=\''+oBase.oHighCol+'\';this.toChange=document.layers[0];showdivCol(\'meDi'+oBase.oName+oI+'_'+i+'\','+(oLev+1)+');giveCol(this);meDisLev['+(oLev+1)+']=this;" bgcolor="'+oBase.oNormCol+'" top="0" left="0">\n' : '' )+
' <a '+firstName+' href="javascript:showdivCol(\'meDi'+oBase.oName+oI+'_'+i+'\','+(oLev+1)+');" onclick="return tryToFindParent(this,'+i+',\'meDi'+oBase.oName+oI+'\','+(oLev+1)+',\'meDi'+oBase.oName+oI+'_'+i+'\');" id="meDiA'+oBase.oName+oI+'_'+i+'"><img src="'+((oLev||oBase.oOrient)?oBase.rightimg[2]:oBase.downimg[2])+'" height="'+((oLev||oBase.oOrient)?oBase.rightimg[1]:oBase.downimg[1])+'" width="'+((oLev||oBase.oOrient)?oBase.rightimg[0]:oBase.downimg[0])+'" border="0" align="right" alt="" name="meDiI'+oBase.oName+oI+'_'+i+'">'+oOb[i].text+'</a>\n'+
( document.layers ? ' <layer width="'+(oBase.oWidth-3)+'" top="0" left="0" visibility="hide">\n'+
' <a '+lastName+' href="javascript:showdivCol(\'meDi'+oBase.oName+oI+'_'+i+'\','+(oLev+1)+');" onclick="return tryToFindParent(this,'+i+',\'meDi'+oBase.oName+oI+'\','+(oLev+1)+',\'meDi'+oBase.oName+oI+'_'+i+'\');"><img src="'+((oLev||oBase.oOrient)?oBase.rightimg[3]:oBase.downimg[3])+'" height="'+((oLev||oBase.oOrient)?oBase.rightimg[1]:oBase.downimg[1])+'" width="'+((oLev||oBase.oOrient)?oBase.rightimg[0]:oBase.downimg[0])+'" border="0" align="right" alt="">'+oOb[i].text+'</a>\n'+
' </layer>\n' : '' )
: ( oOb[i].link ?
' <td '+(document.layers?'':'style="background-color:'+oBase.oNormCol+';" ')+'width="'+oBase.oWidth+'" height="19" onmouseover="if(document.layers){return;} this.oNormCol=\''+oBase.oNormCol+'\';this.oHighCol=\''+oBase.oHighCol+'\';this.oNormColF=\''+oBase.oNormColF+'\';this.oHighColF=\''+oBase.oHighColF+'\';this.toChange=getRefToDivNest(\'meDiA'+oBase.oName+oI+'_'+i+'\');hideAll('+(oLev+1)+');giveCol(this);" onmouseout="if(document.layers){return;} takeCol(this);">\n'+
( document.layers ? ' <ilayer><layer width="100%" onmouseover="this.oNormCol=\''+oBase.oNormCol+'\';this.oHighCol=\''+oBase.oHighCol+'\';this.toChange=document.layers[0];hideAll('+(oLev+1)+');giveCol(this);" onmouseout="takeCol(this);" bgcolor="'+oBase.oNormCol+'" top="0" left="0">\n' : '' )+
' <a '+firstName+' href="'+oOb[i].link+'" id="meDiA'+oBase.oName+oI+'_'+i+'" target="'+(oOb[i].target?oOb[i].target:'_self')+'">'+oOb[i].text+'</a>\n'+
( document.layers ? ' <layer width="100%" top="0" left="0" visibility="hide">\n'+
' <a '+lastName+'" href="'+oOb[i].link+'" target="'+(oOb[i].target?oOb[i].target:'_self')+'">'+oOb[i].text+'</a>\n'+
' </layer>\n' : '' )
:
' <td bgcolor="'+oBase.oNormCol+'" width="'+oBase.oWidth+'" height="19" onmouseover="hideAll('+(oLev+1)+');">\n'+
( document.layers ? ' <ilayer><layer width="100%" onmouseover="hideAll('+(oLev+1)+');" bgcolor="'+oBase.oNormCol+'">\n' : '' )+
' '+oOb[i].text+'\n'
) )+
( document.layers ? ' </layer>'+((oOb[i].sub.length||oOb[i].link)?'<span class="meDisA'+oBase.oName+'">':'')+oOb[i].text+((oOb[i].sub.length||oOb[i].link)?'</span>':'')+'</ilayer>\n' : '' )+
' </td>'+((oLev||oBase.oOrient)?'\n </tr>':'')+'\n';
}
oLineOut += ((oLev||oBase.oOrient)?'':' </tr>\n')+
' </table>\n </td></tr></table>\n'+
( document.layers ? ' </layer>\n' : ' </div>\n' );
document.write( oLineOut );
}
function tryToFindParent(oOb,oInd,oStr,oLev,toShow){
oOb = document.layers ? document.layers[oStr].document.layers[oInd].document.layers[0] : oOb = oOb.offsetParent;
if( oOb && oOb.oNormCol ) { showdivCol(toShow,oLev); giveCol(oOb); meDisLev[oLev] = oOb; return false; } return true;
}
function hideAll( oNum ) {
for( var x = oNum; x < meDisLev.length; x++ ) { takeCol( meDisLev[x] ); }
meDisLev.length = oNum;
hideDivsToLevel(oNum);
}
function showdivCol(oName,oNum) {
for( var x = oNum; x < meDisLev.length; x++ ) { takeCol( meDisLev[x] ); }
meDisLev.length = oNum;
showdiv(oName,oNum);
}
function giveCol( oOb ) { if( oOb.style ) { if( oOb.style.backgroundColor ) {
oOb.style.backgroundColor = oOb.oHighCol;
} else { oOb.style.background = oOb.oHighCol;
} } else { oOb.bgColor = oOb.oHighCol; } if( oOb.toChange.visibility ) {
oOb.toChange.visibility = 'show'; } else { if( oOb.toChange && oOb.toChange.style ) {
oOb.toChange.style.color = oOb.oHighColF; } } if( oOb.toImg ) {
oOb.toImg.src = window['meDisImgH'+oOb.imgIden].src; } }
function takeCol( oOb ) { if( !oOb ) { return; } if( oOb.style ) { if( oOb.style.backgroundColor ) {
oOb.style.backgroundColor = oOb.oNormCol;
} else { oOb.style.background = oOb.oNormCol;
} } else { oOb.bgColor = oOb.oNormCol; } if( oOb.toChange.visibility ) {
oOb.toChange.visibility = 'hide'; } else { if( oOb.toChange && oOb.toChange.style ) {
oOb.toChange.style.color = oOb.oNormColF; } } if( oOb.toImg ) {
oOb.toImg.src = window['meDisImgN'+oOb.imgIden].src; } }
function checkScroll() {
var meDiX = 0, meDiY = 0;
if( typeof( window.pageYOffset ) == 'number' ) { meDiY = pageYOffset; meDiX = pageXOffset; } else {
if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) { meDiY = document.body.scrollTop; meDiX = document.body.scrollLeft; } else {
if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) { meDiY = document.documentElement.scrollTop; meDiX = document.documentElement.scrollLeft; } }
}
for( var y = 0; y < meDisArray.length; y++ ) {
var myRefToTheDiv = getRefToDivNest(meDisArray[y][0]);
if( !myRefToTheDiv ) { return; }
if(myRefToTheDiv.style) { myRefToTheDiv = myRefToTheDiv.style; }
myRefToTheDiv.left = meDisArray[y][2] + meDiX;
myRefToTheDiv.top = meDisArray[y][1] + meDiY;
}
}
window.setInterval('checkScroll();',75);