var dom = (document.getElementById)? true : false;
var isMSIE = (document.all)? true : false;
var isNN6 = (dom && !document.all)? true : false;
var isNN4 = (navigator.appName.indexOf("Netscape") >= 0 && parseInt(navigator.appVersion) == 4 ) ? true : false;

function MenuItem(text, link){
	this.text = text;
	this.link = link;
	}
	
function Menu(name,offset,width){
if(!offset) offset=12;
if(!width) width=130;
	this.name= name;
	this.posX= 0;
	this.posY= 134;
	this.offsetRight= offset;
	this.minWidh= 772;
	this.itemWidth= width;
	this.itemHeight= 18;
	this.itemHeightTop= 3;
	this.itemTextPadding = 5;
	this.bgcolorPsv= "#CFDAEC";
	this.bgcolorActv= "#EFF3F9";
	this.borderCol= "#325E83";
	this.className= "dropmenu";
	this.zIndex= 100;
	this.items= new Array();
	this.addItem= menuAddItem;
	this.setZIndex = menuSetZIndex;
	this.make= menuMake;}
	
function menuAddItem(item){
	this.items[this.items.length] = item;}

function menuSetZIndex(zI){
	this.zIndex = zI;}

function menuMake(){
	var str="";
	if(this.items.length<1) return "";
	
	if(isNN4){
	str += '<layer visibility="hide" name="'+this.name+'" top="'+this.posY+
	'" left="'+this.posX+'" width="100%" z-index="'+this.zIndex+'">';
	}
	else{str += '<div id="'+this.name+'" style="position: absolute; top: '+
	this.posY+'px;left: '+this.posX+'px;width: 100%;z-index: '+
	this.zIndex+';visibility: hidden;">';
	}
	
	str += '<table cellpadding="0" cellspacing="0" border="0" width="100%">'+
	'<tr><td width="50%"><img src="i/none.gif" width="1" height="1" alt="" border="0"></td><td>'+
	'<table cellpadding="0" cellspacing="0" border="0"><tr><td>'+
	
	'<img src="i/none.gif" width="'+ this.offsetRight+'" height="1" alt="" border="0"></td>'+
	'<td bgcolor="'+this.borderCol+'" width="'+this.itemWidth+'px">';
	
	if(isNN4) str+='<ilayer><layer onmouseover="show(\''+this.name+'\')" onmouseout="hide(\''+this.name+'\')">';
	else str+='<div onmouseover="show(\''+this.name+'\');act(\''+this.name+'td\');"'+' onmouseout="hide(\''+this.name+'\');pass(\''+this.name+'td\');">';
	
	str+='<table cellpadding="0" cellspacing="1" border="0">';
	
	for (i = 0; i < this.items.length; i++){str+='<tr><td nowrap width="'+this.itemWidth+'" bgcolor="'+this.bgcolorPsv+'"';
	if(!isNN4) str+=' onmouseover="this.bgColor=\''+this.bgcolorActv+'\';" onmouseout="this.bgColor=\''+this.bgcolorPsv+'\';"';str+=' class="'+this.className+'">';
	if(isNN4){str+='<ilayer><layer width="'+this.itemWidth+'" onmouseover="this.bgColor=\''+this.bgcolorActv+'\';" onmouseout="this.bgColor=\''+this.bgcolorPsv+'\';">';}
	if(isNN4){str+='<img src="i/none.gif" width="'+this.itemTextPadding+'" height="1"'+' alt="" border="0" align="absmiddle"><a href="'+this.items[i].link+'"'; if (this.items[i].link.substring(0,5)=='http:'){str+=' target="_blank" ';}str+='>'+this.items[i].text+'</a><img src="i/none.gif" width="'+this.itemTextPadding+'" height="'+this.itemHeight+'" alt="" border="0" align="absmiddle">';}
	else
	{str+='<table cellpadding="0" cellspacing="0" border="0"><tr><td colspan="2"><img src="i/none.gif" width="1" height="'+this.itemHeightTop+'" alt="" border="0" align="absmiddle"></td></tr><tr><td><img src="i/none.gif" width="'+this.itemTextPadding+'" height="1"'+' alt="" border="0" align="absmiddle"></td><td><a href="'+this.items[i].link+'"'; if (this.items[i].link.substring(0,5)=='http:'){str+=' target="_blank" ';}str+='>'+this.items[i].text+'</a></td></tr><tr><td colspan="2"><img src="i/none.gif" width="1" height="'+this.itemHeightTop+'" alt="" border="0" align="absmiddle"></td></tr></table>';}
	if(isNN4)str+='</layer></ilayer>';str+='</td></tr>';}
	str+='</table>';
	if(isNN4) str+='</layer></ilayer>';
	else	str+='</div>';
	
	str += '</td></tr></table>'+'</td><td width="50%"><img src="i/none.gif" width="1" height="1" alt="" border="0"></td></tr>'+
	'<tr><td><img src="i/none.gif" width="1" height="1" alt="" border="0"></td><td><img src="i/none.gif" width="'+this.minWidh+'" height="1" alt="" border="0"></td>'+
	'<td><img src="i/none.gif" width="1" height="1" alt="" border="0"></td></tr>'+
	'</table>';
	
	if(isNN4) str+='</layer>';
	
	else str+='</div>';
	
	return str;}
	
	
	function MenuBar(){
	this.menus = new Array();
	this.make = menuBarMake;
	this.addMenu = menuBarAddMenu;}
	
function menuBarAddMenu(menu) {this.menus[this.menus.length] = menu;}
	
function menuBarMake(){
	strFul = "";
	for (j = 0; j < this.menus.length; j++){
	this.menus[j].setZIndex(100+j);
	strFul += "\n\n"+this.menus[j].make();}
	document.write(strFul);}