
// Top Colors
t_lowlite     = "#BBAE93"; 
t_highlite    = "#E4DFD6"; 
t_lowlite_bg  = "#E4DFD6";
t_highlite_bg = "#BBAE93"; 

// Sub Colors
b_lowlite     = "#BBAE93"; 
b_highlite    = "#COB39A"; 
b_lowlite_bg  = "whitesmoke";
b_highlite_bg = "#E4DFD6"; 

//----------------

t_css = "cursor: default; border: 1px solid "+t_highlite_bg+"; padding-top: 2px; padding-bottom: 2px; width: 100px; text-align: center; background-color:"+t_lowlite_bg+"; color:"+t_lowlite+"; font-family: Verdana; font-size: 12px;"; 
b_css = "cursor: default; border: 1px solid "+b_highlite_bg+"; padding-top: 2px; padding-bottom: 2px; width: 100%; text-align: center; background-color:"+b_lowlite_bg+"; color:"+b_lowlite+"; font-family: Verdana; font-size: 12px;"; 

Items    = 0; 
SubItems = 0; 
Itemscss = new Array(); 
Holdcss  = new Array(); 
Subcss   = new Array(); 

function Menu(){
document.write('<div id="Menu" style="position: relative; left: 0; top: 0; width: 200px;">'); 
this.addItem = addItem;
this.endMenu = 
function(){
 document.write('</div>'); 
 acum = 0; 
 for(i=0;i<Items;i++){
   w = (200/Items);  
   Holdcss[i].width = (w+.1)+'%'; 
   Holdcss[i].left = acum+'%'; 
   Itemscss[i].width = (w+.1)+'%';
   Itemscss[i].left = acum+'%'; 
   //acum += (w);  
 }
}
return this; 
}

function addItem(txt){
 this.subs = 0; 
 l = Items * 99; 
 document.write(''
 +'<div id="Item'+Items+'" onmouseout="hide('+Items+')" onmouseover="show('+Items+')" style="'+t_css+' position: absolute; left:'+l+'; top: 0;">'+txt+'</div>'
 +'<div id="HoldItems'+Items+'" onmouseout="hide('+Items+')" onmouseover="show('+Items+')" style="width:100; visibility: hidden; position: absolute; top: 20; left: '+l+'">'); 
 
 Itemscss[Items] = document.all?document.all['Item'+Items].style:document.layers?document.layers['Item'+Items]:document.getElementById?document.getElementById('Item'+Items).style:0; 
 this.num = Items; 
 this.left = l;  
 Items++; 
 
   this.endItem = function()
    { 
       document.write('</div>');
       Holdcss[this.num] = document.all?document.all['HoldItems'+this.num].style:document.layers?document.layers['HoldItems'+this.num]:document.getElementById?document.getElementById('HoldItems'+this.num).style:0; 
    }
   this.addSub  = function(txt,href,pop)
    {
       if(this.subs!=0){xtra = "border-top: none"; }else{ xtra = ""; }
       
       if(pop==1){       document.write('<div id="Sub'+SubItems+'" style="'+b_css+'; '+xtra+'" '+     
       'onmouseover="hilite('+SubItems+')" onmouseout="lowlite('+SubItems+')" '+
       'onclick="javascript:StartPopup(\''+href+'\')">'+txt+'</div>');
       }else{
       document.write('<div id="Sub'+SubItems+'" style="'+b_css+'; '+xtra+'" '+     
       'onmouseover="hilite('+SubItems+')" onmouseout="lowlite('+SubItems+')" '+
       'onclick="location.href=\''+href+'\'">'+txt+'</div>');}
       Subcss[SubItems] = document.all?document.all['Sub'+SubItems].style:document.layers?document.layers['Sub'+SubItems]:document.getElementById?document.getElementById('Sub'+SubItems).style:0; 
       SubItems++; 
       this.subs++; 
    }
      
 return this;     
}
old = sold = 0; 
function hide(num){
Itemscss[num].backgroundColor = t_lowlite_bg; 
Itemscss[num].color           = t_lowlite; 
Holdcss[num].visibility       = "hidden"; 
}

function show(num){
Itemscss[old].backgroundColor = t_lowlite_bg; 
Itemscss[old].color           = t_lowlite; 
Holdcss[old].visibility       = "hidden"; 
Itemscss[num].backgroundColor = t_highlite_bg; 
Itemscss[num].color           = t_highlite; 
Holdcss[num].visibility       = "visible"; 
old = num; 
}

function hilite(num){
Subcss[sold].backgroundColor = b_lowlite_bg; 
Subcss[sold].color           = b_lowlite;
Subcss[num].backgroundColor = b_highlite_bg; 
//Subcss[num].color			= b_highlite; 
sold = num; 
}
function lowlite(num){
Subcss[num].backgroundColor = b_lowlite_bg; 
Subcss[num].color           = b_lowlite; 
}
	var oLastBtn=0;
	var nOpac = -1
	var NS4 = (document.layers) ? 1 : 0;
	var IE6 = (document.all) ? 1 : 0;
	
	function RaiseButton(){
		window.event.cancelBubble=true;
		oBtn = window.event.srcElement;
		if(oLastBtn && oLastBtn != oBtn){
			HideButton();
		}
		if(oBtn.buttonType){
			oBtn.className = oBtn.buttonType + "Up";
			oLastBtn=oBtn;
		}else{
			oLastBtn = 0;
		}
	}
	function DepressButton(){
		window.event.cancelBubble=true;
		oBtn = window.event.srcElement;
		if(oBtn.buttonType){
			oBtn.className = oBtn.buttonType + "Down";
		}
	}
	function HideButton(){
		if ((oLastBtn.buttonType == "LeftNavChosen") || (oLastBtn.buttonType == "LeftNavSubChosen") || (oLastBtn.buttonType == "appNavChosen") || (oLastBtn.buttonType == "appNavSubChosen")) {
			oLastBtn.className = oLastBtn.buttonType;
		}else{
			oLastBtn.className = oLastBtn.buttonType + "Off";
		}
	}
	
function RiseImg(){
if (!NS4){
    if(document.getElementById('imgMa')){
		imgs = document.getElementById('imgMa');
		opacity = nOpac + 3;
		nOpac = opacity;
		if (opacity>100)
			return;
		if(IE6){
			imgs.style.filter = "alpha(opacity=0)";
			imgs.filters.alpha.opacity = opacity;
		}else{
			imgs.style.MozOpacity = 0 + '%';
			imgs.style.MozOpacity = opacity + '%';
		}
		setTimeout(RiseImg, 0);
	}
	document.getElementById('imgMa').style.visibility="visible";
  }
}

        