//Default browsercheck, added to all scripts!
function checkBrowser(){
this.ver=navigator.appVersion
this.dom=document.getElementById?1:0
this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0; 
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
this.ie4=(document.all && !this.dom)?1:0;
this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns5)
return this
}

var bw=new checkBrowser()

//Ie var
var explorerev=''
/********************************************************************************
Object constructor and object functions
********************************************************************************/
function makePageCoords(){
	this.x=0;this.x2=(bw.ns4 || bw.ns5)?innerWidth:document.body.offsetWidth-20;
	this.y=0;this.y2=(bw.ns4 || bw.ns5)?innerHeight:document.body.offsetHeight-5;
	this.x50=this.x2/2;	this.y50=this.y2/2;
	return this;
}
function makeMenu(parent,obj,nest,type,num,subnum,subsubnum,subsub2num){
    nest=(!nest) ? '':'document.'+nest+'.'
   	this.css=bw.dom? document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+"document.layers." +obj):0;					
	this.evnt=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+"document.layers." +obj):0;		
	this.height=bw.ns4?this.css.document.height:this.evnt.offsetHeight
	this.width=bw.ns4?this.css.document.width:this.evnt.offsetWidth
	this.moveIt=b_moveIt; this.bgChange=b_bgChange;	
	this.clipTo=b_clipTo;
	this.clipSub=(bw.ns5)?b_hideIt:b_clipTo;	//ADDED FOR NS6
	this.showIt=b_showIt;
	this.hideIt=b_hideIt;
	this.show='';
	this.hide='';
	this.parent=parent;
	this.active=0;
	this.nssubover=0
	if(type==0){
		if(bw.ns4){
			this.show= hideLayer+'.showIt()';
			this.hide= hideLayer+'.hideIt()';
			this.css.captureEvents(Event.MOUSEDOWN);
		}
		this.evnt.onmouseover=new Function("mmover("+num+","+this.parent.name+");"+this.show);
		this.evnt.onmouseout=new Function("mmout("+num+","+this.parent.name+");"+this.hide);
		this.evnt.onmousedown= new Function("goLnk("+this.parent.name+".lnk["+num+"],"+this.parent.name+".target["+num+"])");
	}else if(type==1){
		this.clipIn=(bw.ns5)?b_hideIt:b_clipIn;	//ADDED FOR NS6
		this.clipOut=(bw.ns5)?b_showIt:b_clipOut;	//ADDED FOR NS6
		this.clipy=0
		if((bw.ns5 || bw.ns4) && this.parent.menueventoff=="mouse"){ //Change for Netscape 6 ------------------------------------------------------------
			this.evnt.onmouseout=new Function("setTimeout('if(!"+this.parent.name+"["+num+"].nssubover)"+this.parent.name+".hideactive("+num+");',100)")
			this.evnt.onmouseover=new Function(this.parent.name+"["+num+"].nssubover=true")
		}
		else this.evnt.onmouseover= cancelEv;
	}else if(type==2){
		if(bw.ns4){
			this.show= hideLayer+'.showIt()';
			this.hide= hideLayer+'.hideIt()';
			this.css.captureEvents(Event.MOUSEDOWN);
		}
		this.evnt.onmouseover=new Function("submmover("+num+","+subnum+","+this.parent.name+");"+this.show);
		this.evnt.onmouseout=new Function("submmout("+num+","+subnum+","+this.parent.name+");"+this.hide);
		this.evnt.onmousedown= new Function("goLnk("+this.parent.name+".sublnk["+num+"]["+subnum+"],"+this.parent.name+".subtarget["+num+"]["+subnum+"])");
	}else if(type==3){
		if(bw.ns4){
			this.show= hideLayer+'.showIt()';
			this.hide= hideLayer+'.hideIt()';
			this.css.captureEvents(Event.MOUSEDOWN);
		}
		this.evnt.onmouseover=new Function("subsubmmover("+num+","+subnum+","+subsubnum+","+this.parent.name+");"+this.show);
		this.evnt.onmouseout=new Function("subsubmmout("+num+","+subnum+","+subsubnum+","+this.parent.name+");"+this.hide);
		this.evnt.onmousedown= new Function("goLnk("+this.parent.name+".subsublnk["+num+"]["+subnum+"]["+subsubnum+"],"+this.parent.name+".subsubtarget["+num+"]["+subnum+"]["+subsubnum+"])");
	}else if(type==4){
		if(bw.ns4){
			this.show= hideLayer+'.showIt()';
			this.hide= hideLayer+'.hideIt()';
			this.css.captureEvents(Event.MOUSEDOWN);
		}
		this.evnt.onmouseover=new Function("subsub2mmover("+num+","+subnum+","+subsubnum+","+subsub2num+","+this.parent.name+");"+this.show);
		this.evnt.onmouseout=new Function("subsub2mmout("+num+","+subnum+","+subsubnum+","+subsub2num+","+this.parent.name+");"+this.hide);
		this.evnt.onmousedown= new Function("goLnk("+this.parent.name+".subsub2lnk["+num+"]["+subnum+"]["+subsubnum+"]["+subsub2num+"],"+this.parent.name+".subsub2target["+num+"]["+subnum+"]["+subsubnum+"]["+subsub2num+"])");
	}
	this.tim=100
    this.obj = obj + "Object"; 	eval(this.obj + "=this"); hideLayer= this.obj;
	return this
}
function b_clipTo(t,r,b,l,h){if(bw.ns4){this.css.clip.top=t;this.css.clip.right=r
this.css.clip.bottom=b;this.css.clip.left=l; this.clipx=r;
}else{this.css.clip="rect("+t+","+r+","+b+","+l+")"; this.clipx=r;;
if(h){ if(!bw.ns4){ this.css.height=b; this.css.width=r}}}} //CHANGE DONE FOR NETSCAPE 6 --------------------------------------------------------------------------------------------------------------------
function b_moveIt(x,y){this.x=x; this.y=y; this.css.left=this.x;this.css.top=this.y}
function b_bgChange(color,hilite){
	if(!bw.ns4){
		this.css.backgroundColor=color;
		if(bw.ie4) this.evnt.children[0].style.color= hilite;
		else this.evnt.firstChild.style.color= hilite;
	}
}
function b_showIt(){this.css.visibility='visible'}
function b_hideIt(){this.css.visibility='hidden'}
function goLnk(url,target){
	if(url=='#' || !url) return;
	if(target){
		if(target=='_parent') parent.location.href= url;
		else if(target=='_top') top.location.href= url;
		else if(target=='_blank') window.open(url,'');
		else if(target=='_self') setTimeout('location.href="'+url+'"',200);
		else if(parent.frames.length>0){
			if(!parent.frames[target]) window.open(url,target);
			else eval('parent.'+target+'.location.href="'+url+'"');
		}
		else window.open(url,target);
	}
	else setTimeout('location.href="'+url+'"',200);
	return false;
}
function b_clipIn(speed){
	if(this.clipy>0){
		this.clipy-=speed
		if(this.clipy<0) this.clipy=0
		this.clipTo(0,this.clipx,this.clipy,0,1)
		this.tim=setTimeout(this.obj+".clipIn("+speed+")",10)
	}else{this.clipy=0; this.clipTo(0,this.clipx,this.clipy,0,1)}	
}
function b_clipOut(speed){
	if(this.clipy<this.clipheight){
		speed=((this.clipheight-this.clipy)<speed)?this.clipheight-this.clipy:speed;
		this.clipy+=speed
		this.clipTo(0,this.clipx,this.clipy,0,1)
		this.tim=setTimeout(this.obj+".clipOut("+speed+")",10)
	}else{this.clipy=this.clipheight; this.clipTo(0,this.clipx,this.clipy,0,1)}
}
//Page variable, holds the width and height of the document. (see documentsize tutorial on bratta.com/dhtml)
var page=new makePageCoords()

/********************************************************************************
Checking if the values are % or not.
********************************************************************************/
function checkp(num,lefttop){
	if(num){
		if(num.toString().indexOf("%")!=-1){
			if(this.menurows)num=(page.x2*parseFloat(num)/100)
			else num=(page.y2*parseFloat(num)/100)
		}else num=parseFloat(num)
	}else num=0
	return num
}
/********************************************************************************
Menu object, constructing menu ++
********************************************************************************/
function menuObj(name){
	this.makeStyle=makeStyle;
	this.makeMain=makeMain;
	this.makeSub=makeSub;
	this.makeSubSub=makeSubSub
	this.makeSubSub2=makeSubSub2
	this.back= new Array();
	this.lnk= new Array();
	this.sublnk= new Array();
	this.subsublnk= new Array();
	this.subsub2lnk= new Array();
	this.target= new Array();
	this.subtarget= new Array();
	this.subsubtarget= new Array();
	this.subsub2target= new Array();
	this.mainmenus=0; 
	this.submenus=new Array()
	this.subsubmenus= new Array();
	this.construct=constructMenu;
	this.checkp=checkp;
	this.name=name;
	this.menumain=menumain;
	this.hidemain=hidemain;
	this.hideactive=hideactive;
	this.menusub=menusub;
	this.menusub2=menusub2;
	this.hidesubs=hidesubs;
	this.menueventon="mouse"
	this.menueventoff="mouse"
	this.stayoncolor=0
	this.clipStyle=(bw.ns5)?'':'clip:rect(0,0,0,0);';	//ADDED FOR NS6
	this.subClipStyle=(bw.ns5)?'visibility:hidden;':'clip:rect(0,0,0,0);';	//ADDED FOR NS6
}
function constructMenu(){
	bw=new checkBrowser()
	page=new makePageCoords()
	//Checking numbers for %
	//this.mainwidth=checkp(this.mainwidth,0)
	this.mainheight=checkp(this.mainheight,1)
	this.subplacement=checkp(this.subplacement,1)
	this.subwidth=checkp(this.subwidth,0)
	this.subheight=checkp(this.subheight,1)
	this.subsubwidth=checkp(this.subsubwidth,0)
	this.subsubheight=checkp(this.subsubheight,1)
	this.subsubXplacement=checkp(this.subsubXplacement,1)
	this.subsubYplacement=checkp(this.subsubYplacement,1)
	this.subsub2width=checkp(this.subsub2width,0)
	this.subsub2height=checkp(this.subsub2height,1)
	this.subsub2Xplacement=checkp(this.subsub2Xplacement,1)
	this.subsub2Yplacement=checkp(this.subsub2Yplacement,1)
	if(this.backgroundbar){ //Backgroundbar part
		this.oBackgroundbar=new makeMenu(this,'div'+this.name+'Backgroundbar','',-1)
		this.oBackgroundbar.moveIt(this.checkp(this.backgroundbarfromleft,0),this.checkp(this.backgroundbarfromtop,1))
if(this.menurows) this.oBackgroundbar.clipTo(0,this.checkp(this.backgroundbarsize),this.mainheight+(this.mBorderSize*2),0,1)
		else this.oBackgroundbar.clipTo(0,130+(this.mBorderSize*2),this.checkp(this.backgroundbarsize),0,1)
		if(!bw.ns4)this.oBackgroundbar.css.backgroundColor=this.backgroundbarcolor
		else this.oBackgroundbar.css.bgColor= this.backgroundbarcolor
	}
	this.x=this.checkp(this.fromleft,0); this.y=this.checkp(this.fromtop,1);
	for(i=0;i<this.mainmenus;i++){
		if(this.menuplacement!=0){
			if(this.menurows) this.x=this.checkp(this.menuplacement[i])
			else this.y=this.checkp(this.menuplacement[i])
		}
		this.back[i]= new makeMenu(this,'div'+this.name+'Mainback'+i,'',-1,i);
		this.back[i].clipTo(0,this.mainwidth[i]+(this.mBorderSize*2),this.mainheight+(this.mBorderSize*2),0,1);
		this.back[i].moveIt(this.x,this.y);
		if(bw.ns4){
			this[i]=new makeMenu(this,'div'+this.name+'Main'+i,'',-1,i)
			this[i].css.bgColor= this.mainbgcoloroff;
			this[i].hilite=new makeMenu(this,'div'+this.name+'Main'+i+'Hilite','',-1,i)
			this[i].hilite.clipTo(0,this.mainwidth[i],this.mainheight,0,1)
			this[i].hilite.moveIt(this.x+this.mBorderSize,this.y+this.mBorderSize)
			this[i].hilite.css.bgColor=this.mainbgcoloron;
			this[i].cover=new makeMenu(this,'div'+this.name+'Main'+i+'Cover','',0,i)
			this[i].cover.clipTo(0,this.mainwidth[i],this.mainheight,0,1)
			this[i].cover.moveIt(this.x+this.mBorderSize,this.y+this.mBorderSize);
		}
		else this[i]=new makeMenu(this,'div'+this.name+'Main'+i,'',0,i)
		this[i].clipTo(0,this.mainwidth[i],this.mainheight,0,1)
		this[i].moveIt(this.x+this.mBorderSize,this.y+this.mBorderSize)
		this[i].bgChange(this.mainbgcoloroff)
		if(!bw.ns4)this.back[i].css.backgroundColor= this.mBorderColor
		else this.back[i].css.bgColor= this.mBorderColor
		if(!this.menurows) this.y+=this.mainheight+this.checkp(this.pxbetween)+this.mBorderSize
		else {this.x+=this.mainwidth[i]+this.checkp(this.pxbetween)+this.mBorderSize;this.s1BorderSize=this.mBorderSize}
		if(this.submenus[i]!='nosub'){
			this[i].subs=new makeMenu(this,'div'+this.name+'Sub'+i,'',1,i,-1)
			if(!this.menurows) this[i].subs.moveIt(this.subplacement+this[i].x,this[i].y-this.s1Separator)
			else this[i].subs.moveIt(this[i].x-this.s1BorderSize,this[i].y+this.subplacement)
			if(!bw.ns4)this[i].subs.css.backgroundColor= this.s1BorderColor
			else this[i].subs.css.bgColor= this.s1BorderColor
			this.suby=this.s1BorderSize;
			this[i].sub=new Array()
			for(j=0;j<this.submenus[i]["main"];j++){
				if(bw.ns4){
					this[i].sub[j]=new makeMenu(this,'div'+this.name+'Sub'+i+'_'+j,'div'+this.name+'Sub'+i,-1,i,j)
					this[i].sub[j].css.bgColor=this.subbgcoloroff;
					this[i].sub[j].hilite=new makeMenu(this,'div'+this.name+'Sub'+i+'_'+j+'Hilite','div'+this.name+'Sub'+i,-1,i,j);
					this[i].sub[j].hilite.clipTo(0,this.subwidth,mysubheight[i][j],0,1)
					this[i].sub[j].hilite.moveIt(this.s1BorderSize,this.suby)
					this[i].sub[j].hilite.css.bgColor=this.subbgcoloron
					this[i].sub[j].cover=new makeMenu(this,'div'+this.name+'Sub'+i+'_'+j+'Cover','div'+this.name+'Sub'+i,2,i,j)
					this[i].sub[j].cover.clipTo(0,this.subwidth,mysubheight[i][j],0,1)
					this[i].sub[j].cover.moveIt(this.s1BorderSize,this.suby)
				}
				else this[i].sub[j]=new makeMenu(this,'div'+this.name+'Sub'+i+'_'+j,'div'+this.name+'Sub'+i,2,i,j)
				this[i].sub[j].clipTo(0,this.subwidth,mysubheight[i][j],0,1)
				this[i].sub[j].moveIt(this.s1BorderSize,this.suby)
				this[i].sub[j].bgChange(this.subbgcoloroff)
				this.suby+=mysubheight[i][j]+this.s1Separator
				if(this.submenus[i]["submenus"][j]>0){
					this.subsuby=this.s2BorderSize
					this[i].sub[j].subs=new makeMenu(this,'div'+this.name+'Sub'+i+'_'+j+'_sub','',1,i,j)
					this[i].sub[j].subs.moveIt(this[i].subs.x+this.subsubXplacement,this[i].subs.y+this[i].sub[j].y+this.subsubYplacement)
					if(!bw.ns4)this[i].sub[j].subs.css.backgroundColor=this.s2BorderColor
					else this[i].sub[j].subs.css.bgColor=this.s2BorderColor
					this[i].sub[j].sub=new Array()
					for(a=0;a<this.submenus[i]["submenus"][j];a++){
						if(bw.ns4){
							this[i].sub[j].sub[a]=new makeMenu(this,'div'+this.name+'Sub'+i+'_'+j+'_sub'+a,'div'+this.name+'Sub'+i+'_'+j+'_sub',-1,i,j,a)
							this[i].sub[j].sub[a].css.bgColor=this.subsubbgcoloroff
							this[i].sub[j].sub[a].hilite=new makeMenu(this,'div'+this.name+'Sub'+i+'_'+j+'_sub'+a+'Hilite','div'+this.name+'Sub'+i+'_'+j+'_sub',-1,i,j,a)
							this[i].sub[j].sub[a].hilite.clipTo(0,this.subsubwidth,this.subsubheight,0,1)
							this[i].sub[j].sub[a].hilite.moveIt(this.s2BorderSize,this.subsuby)
							this[i].sub[j].sub[a].hilite.css.bgColor=this.subsubbgcoloron
							this[i].sub[j].sub[a].cover=new makeMenu(this,'div'+this.name+'Sub'+i+'_'+j+'_sub'+a+'Cover','div'+this.name+'Sub'+i+'_'+j+'_sub',3,i,j,a)
							this[i].sub[j].sub[a].cover.clipTo(0,this.subsubwidth,this.subsubheight,0,1)
							this[i].sub[j].sub[a].cover.moveIt(this.s2BorderSize,this.subsuby)
						}
						else this[i].sub[j].sub[a]=new makeMenu(this,'div'+this.name+'Sub'+i+'_'+j+'_sub'+a,'div'+this.name+'Sub'+i+'_'+j+'_sub',3,i,j,a)
						this[i].sub[j].sub[a].clipTo(0,this.subsubwidth,this.subsubheight,0,1)
						this[i].sub[j].sub[a].moveIt(this.s2BorderSize,this.subsuby)
						this[i].sub[j].sub[a].bgChange(this.subsubbgcoloroff)
						this.subsuby+=this.subsubheight+this.s2Separator
						if(this.subsubmenus[i][j][a]>0){
							this.subsub2y=this.s3BorderSize;
							this[i].sub[j].sub[a].subs=new makeMenu(this,'div'+this.name+'Sub'+i+'_'+j+'_'+a+'_sub','',1,i,j,a)
							this[i].sub[j].sub[a].subs.moveIt(this[i].sub[j].subs.x+this.subsub2Xplacement,this[i].sub[j].subs.y+this[i].sub[j].sub[a].y+this.subsub2Yplacement)
							if(!bw.ns4)this[i].sub[j].sub[a].subs.css.backgroundColor=this.s3BorderColor
							else this[i].sub[j].sub[a].subs.css.bgColor=this.s3BorderColor
							this[i].sub[j].sub[a].sub= new Array()
							for(b=0;b<this.subsubmenus[i][j][a];b++){
								if(bw.ns4){
									this[i].sub[j].sub[a].sub[b]= new makeMenu(this,'div'+this.name+'Sub'+i+'_'+j+'_'+a+'_sub'+b,'div'+this.name+'Sub'+i+'_'+j+'_'+a+'_sub',-1,i,j,a,b)
									this[i].sub[j].sub[a].sub[b].css.bgColor= this.subsub2bgcoloroff
									this[i].sub[j].sub[a].sub[b].hilite= new makeMenu(this,'div'+this.name+'Sub'+i+'_'+j+'_'+a+'_sub'+b+'Hilite','div'+this.name+'Sub'+i+'_'+j+'_'+a+'_sub',-1,i,j,a,b)
									this[i].sub[j].sub[a].sub[b].hilite.clipTo(0,this.subsub2width,this.subsub2height,0,1)
									this[i].sub[j].sub[a].sub[b].hilite.moveIt(this.s3BorderSize,this.subsub2y)
									this[i].sub[j].sub[a].sub[b].hilite.css.bgColor=this.subsub2bgcoloron
									this[i].sub[j].sub[a].sub[b].cover= new makeMenu(this,'div'+this.name+'Sub'+i+'_'+j+'_'+a+'_sub'+b+'Cover','div'+this.name+'Sub'+i+'_'+j+'_'+a+'_sub',4,i,j,a,b)
									this[i].sub[j].sub[a].sub[b].cover.clipTo(0,this.subsub2width,this.subsub2height,0,1)
									this[i].sub[j].sub[a].sub[b].cover.moveIt(this.s3BorderSize,this.subsub2y)
								}
								else this[i].sub[j].sub[a].sub[b]= new makeMenu(this,'div'+this.name+'Sub'+i+'_'+j+'_'+a+'_sub'+b,'div'+this.name+'Sub'+i+'_'+j+'_'+a+'_sub',4,i,j,a,b)
								this[i].sub[j].sub[a].sub[b].clipTo(0,this.subsub2width,this.subsub2height,0,1)
								this[i].sub[j].sub[a].sub[b].moveIt(this.s3BorderSize,this.subsub2y)
								this[i].sub[j].sub[a].sub[b].bgChange(this.subsub2bgcoloroff,this.subsub2Off)
								this.subsub2y+=this.subsub2height+this.s3Separator
							}
							this[i].sub[j].sub[a].subs.clipheight=this.subsub2y+this.s3BorderSize-this.s3Separator;
							var h=(bw.ns5)?this[i].sub[j].sub[a].subs.clipheight:0	//ADDED FOR NS6
							this[i].sub[j].sub[a].subs.clipTo(0,this.subsub2width+(this.s3BorderSize*2),h,0,1)
						}else this[i].sub[j].sub[a].subs=0
					}
					this[i].sub[j].subs.clipheight=this.subsuby+this.s2BorderSize-this.s2Separator
					var h=(bw.ns5)?this[i].sub[j].subs.clipheight:0;	//ADDED FOR NS6
					this[i].sub[j].subs.clipTo(0,this.subsubwidth+(this.s2BorderSize*2),h,0,1)
				}else this[i].sub[j].subs=0
			}
			this[i].subs.clipheight=this.suby+this.s1BorderSize-this.s1Separator
			var h=(bw.ns5)?this[i].subs.clipheight:0;		//ADDED FOR NS6
			this[i].subs.clipTo(0,this.subwidth+(this.s1BorderSize*2),h,0,1)
		}else this[i].subs=0
	}
	if (bw.ns4){//Added If TEJ
	setTimeout("window.onresize=resized;",800)
	}
	if(this.menueventoff=="mouse"){
		if(!bw.ns5 && !bw.ns4){explorerev+=this.name+".hidemain(-1);" //CHANGE NETSCAPE 6 -------------------------------
		document.onmouseover=new Function(explorerev)}//CHANGE NETSCAPE 6 --------------------------------------------------------------
	}
	if(bw.ns5)document.body.style.visibility='visible'	//ADDED FOR NS6
}
function resized(){
	page2=new makePageCoords()
	if(page2.x2!=page.x2 || page.y2!=page2.y2) location.reload()
}

/*********************************************************************************************
Mouseevents (name==this (as in made object, not the event "this"))
*********************************************************************************************/
function cancelEv(){
	if(bw.ie4 || bw.ie5 || bw.ie6) window.event.cancelBubble=true
}
function mmover(num,name){
	name[num].bgChange(name.mainbgcoloron,name.mainHilite)
	if(name.menueventon=="mouse") name.menumain(num,1)
	name[num].nssubover=true
	cancelEv()
}
function mmout(num,name){
	if(!isNaN(num)){
		if(name[num].subs==0 || !name.stayoncolor || !name[num].active)
		name[num].bgChange(name.mainbgcoloroff,name.mainOff); 
		name[num].nssubover=false
		if(name.menueventoff=="mouse") if(bw.ns4) setTimeout("if(!"+name.name+"["+num+"].nssubover) "+name.name+".hideactive("+num+")",100)
	} 
	cancelEv()
}
function submmover(num,subnum,name){
	name[num].sub[subnum].bgChange(name.subbgcoloron,name.subHilite)
	if(name.menueventon=="mouse") {name.menusub(num,subnum,1)}
	name[num].nssubover=true
	cancelEv()
}
function submmout(num,subnum,name){
	if(!isNaN(subnum)){
		name[num].nssubover=false;
		if(!name.stayoncolor || !name[num].sub[subnum].active || name[num].sub[subnum].subs==0)
		name[num].sub[subnum].bgChange(name.subbgcoloroff,name.subOff)
	}
	cancelEv()
}
function subsubmmover(num,subnum,subsubnum,name){
	if(!isNaN(subnum)){
		name[num].sub[subnum].sub[subsubnum].bgChange(name.subsubbgcoloron,name.subsubHilite); 
		if(name.menueventon=="mouse") {name.menusub2(num,subnum,subsubnum,1)}
		name[num].nssubover=true
	}
	cancelEv()
}
function subsubmmout(num,subnum,subsubnum,name){
	if(!isNaN(subnum)){
		name[num].nssubover=false
		if(!name.stayoncolor || !name[num].sub[subnum].sub[subsubnum].active || name[num].sub[subnum].sub[subsubnum].subs==0) name[num].sub[subnum].sub[subsubnum].bgChange(name.subsubbgcoloroff,name.subsubOff)
	}
	cancelEv()
}
function subsub2mmover(num,subnum,subsubnum,subsub2num,name){
	if(!isNaN(subnum)){
		name[num].sub[subnum].sub[subsubnum].sub[subsub2num].bgChange(name.subsub2bgcoloron,name.subsub2Hilite); 
		name[num].nssubover=true
	}
	cancelEv()
}
function subsub2mmout(num,subnum,subsubnum,subsub2num,name){
	if(!isNaN(subnum)){
		name[num].nssubover=false
		name[num].sub[subnum].sub[subsubnum].sub[subsub2num].bgChange(name.subsub2bgcoloroff,name.subsub2Off)
	}
	cancelEv()
}
/*********************************************************************************************
Showing submenus
*********************************************************************************************/
function menumain(num,mouse){
	if(this[num].subs!=0){
		clearTimeout(this[num].subs.tim)
		if(this[num].subs.clipy==0 || mouse){
			this.hidemain(num); this[num].subs.clipOut(this.menuspeed); this[num].active=1
		}else{
			this.hidemain(-1); this[num].active=0
		}
	}
	else{
		this.hidemain(-1);
		this[num].bgChange(this.mainbgcoloron,this.mainHilite)
	}
}
/*********************************************************************************************
Showing subsubmenus
*********************************************************************************************/
function menusub(num,sub,mouse){
	this.hidesubs(num,sub)
	if(this[num].sub[sub].subs!=0){
		if(this[num].sub[sub].subs.clipy==0 || mouse){
			this[num].sub[sub].active=1
			this[num].sub[sub].subs.clipOut(this.menusubspeed)
		}else{
			this[num].sub[sub].active=0
			this[num].sub[sub].subs.clipIn(this.menusubspeed)
		}
	}
}
function menusub2(num,sub,sub2,mouse){
	this.hidesubs(num,sub,sub2);
	if(this[num].sub[sub].sub[sub2].subs!=0){
		if(this[num].sub[sub].sub[sub2].subs.clipy==0 || mouse){
			this[num].sub[sub].sub[sub2].active=1
			this[num].sub[sub].sub[sub2].subs.clipOut(this.menusubspeed)
		}else{
			this[num].sub[sub].sub[sub2].active=0
			this[num].sub[sub].sub[sub2].subs.clipIn(this.menusubspeed)
		}
	}
}
/*********************************************************************************************
Hides the other sub menuitems if any are shown. Also calls the hidesubs to hide any showing
submenus.
*********************************************************************************************/
function hidemain(num){
	for(i=0;i<this.mainmenus;i++){
		if(this[i].subs!=0){
			if(this[i].subs.clipy<=this[i].subs.clipheight){
				this.hidesubs(i,100,100)
				if(i!=num){
					clearTimeout(this[i].subs.tim)
					this[i].active=0
					this[i].bgChange(this.mainbgcoloroff)
					if(this.menurows)this[i].subs.clipIn(this.menuspeed)
					else{this[i].subs.clipy=0; this[i].subs.clipSub(0,this[i].subs.clipx,this[i].subs.clipy,0,1)}	//CHANGED FOR NS6
				}
			}
		}else this[i].bgChange(this.mainbgcoloroff)
	}
}
/*********************************************************************************************
Hides the active submenuitems
*********************************************************************************************/
function hideactive(num){
	if(this[num].subs!=0){
		this.hidesubs(num,100,100)
		clearTimeout(this[num].subs.tim)
		this[num].active=0
		this[num].bgChange(this.mainbgcoloroff)
		if(this.menurows)this[num].subs.clipIn(this.menuspeed)
		else{this[num].subs.clipy=0; this[num].subs.clipSub(0,this[num].subs.clipx,this[num].subs.clipy,0,1)}	//CHANGED FOR NS6
	}
}
/*********************************************************************************************
Hides the other subsub menuitems if any are shown.
*********************************************************************************************/
function hidesubs(num,sub,sub2){
	for(j=0;j<this[num].sub.length;j++){

		if(this[num].sub[j].subs!=0){
			if(j!=sub){
				if(this[num].sub[j].subs.clipy<=this[num].sub[j].subs.clipy	|| this[num].subs.clipy<this[num].subs.clipheight){
					clearTimeout(this[num].sub[j].subs.tim)
					this[num].sub[j].active=0
					this[num].sub[j].bgChange(this.subbgcoloroff)
					this[num].sub[j].subs.clipy=0
					this[num].sub[j].subs.clipSub(0,this[num].sub[j].subs.clipx,this[num].sub[j].subs.clipy,0,1)	//CHANGED FOR NS6
				}
			}
			for(k=0;k<this[num].sub[j].sub.length;k++){
				if(this[num].sub[j].sub[k].subs!=0 && k!=sub2){
					clearTimeout(this[num].sub[j].sub[k].subs.tim);
					this[num].sub[j].sub[k].active=0
					this[num].sub[j].sub[k].bgChange(this.subsubbgcoloroff)
					this[num].sub[j].sub[k].subs.clipy=0
					this[num].sub[j].sub[k].subs.clipSub(0,this[num].sub[j].sub[k].subs.clipx,this[num].sub[j].sub[k].subs.clipy,0,1)	//CHANGED FOR NS6
				}
			}
		}
	}
}
/*********************************************************************************************
These are the functions that writes the style and menus to the page. 
*********************************************************************************************/
function makeStyle(){
	str='\n<style type="text/css">\n'
	//CHANGE DONE FOR NETSCAPE 6 (removed the copyright line)--------------------------------------------------------------------------------------------------------------------
	//ADDED this.clipStyle and this.subClipStyle FOR NS6 ----------------------------------------------------------------------------------------------------------------------------------------------
	str+='\tDIV.cl'+this.name+'Back{position:absolute; z-index:50; '+this.clipStyle+'}\n'
	str+='\tDIV.cl'+this.name+'Main{position:absolute; z-index:51; '+this.clipStyle+' overflow:hidden; width:120; '+this.clMain+'; color:'+this.mainOff+'}\n'
	str+='\tDIV.cl'+this.name+'Sub{position:absolute; z-index:52; '+this.clipStyle+' overflow:hidden; width:'+(this.subwidth-10)+'; '+this.clSub+'; color:'+this.subOff+'}\n'
	str+='\tDIV.cl'+this.name+'SubSub{position:absolute; z-index:54; '+this.clipStyle+' width:'+(this.subsubwidth-10)+'; '+this.clSubSub+'; color:'+this.subsubOff+'}\n'
	str+='\tDIV.cl'+this.name+'SubSub2{position:absolute; z-index:54; '+this.clipStyle+' width:'+(this.subsub2width-10)+'; color:'+this.subsub2Off+'; '+this.clSubSub2+'}\n'
	if(bw.ns4){
		str+='\tDIV.cl'+this.name+'Cover{position:absolute; z-index:51; clip:rect(0,0,0,0); overflow:hidden; width:120}\n'
		str+='\tDIV.cl'+this.name+'MainHilite{position:absolute; z-index:51; clip:rect(0,0,0,0); overflow:hidden; width:120; '+this.clMainHilite+'; color:'+this.mainHilite+'; visibility:hidden}\n'
		str+='\tDIV.cl'+this.name+'SubCover{position:absolute; z-index:52; clip:rect(0,0,0,0); overflow:hidden; width:'+(this.subwidth-10)+'}\n'
		str+='\tDIV.cl'+this.name+'SubHilite{position:absolute; z-index:52; clip:rect(0,0,0,0); overflow:hidden; width:'+(this.subwidth-10)+'; '+this.clSubHilite+'; color:'+this.subHilite+'; visibility:hidden}\n'
		str+='\tDIV.cl'+this.name+'SubSubCover{position:absolute; z-index:54; clip:rect(0,0,0,0); width:'+(this.subsubwidth-10)+'}\n'
		str+='\tDIV.cl'+this.name+'SubSubHilite{position:absolute; z-index:54; clip:rect(0,0,0,0); width:'+(this.subsubwidth-10)+'; '+this.clSubSubHilite+';color:'+this.subsubHilite+'; visibility:hidden}\n'
		str+='\tDIV.cl'+this.name+'SubSub2Cover{position:absolute; z-index:54; clip:rect(0,0,0,0); width:'+(this.subsubwidth-10)+'}\n'
		str+='\tDIV.cl'+this.name+'SubSub2Hilite{position:absolute; z-index:54; clip:rect(0,0,0,0); width:'+(this.subsubwidth-10)+'; '+this.clSubSub2Hilite+';color:'+this.subsub2Hilite+'; visibility:hidden}\n'
	}
	str+='\tDIV.cl'+this.name+'Subs{position:absolute; z-index:53; '+this.subClipStyle+' overflow:hidden}\n'
	str+='\t#div'+this.name+'Backgroundbar{position:absolute; z-index:50; '+this.clipStyle+' overflow:hidden}\n'
	str+='\tA.clA'+this.name+'Main{'+this.clAMain+'; color:'+this.mainOff+'}\n'
	str+='\tA.clA'+this.name+'Sub{'+this.clASub+'; color:'+this.subOff+'}\n'
	str+='\tA.clA'+this.name+'SubSub{'+this.clASubSub+'; color:'+this.subsubOff+'}\n'
	str+='\tA.clA'+this.name+'SubSub2{'+this.clASubSub2+'; color:'+this.subsub2Off+'}\n'

	str+='</style>'
	document.write(str)
}
function makeMain(num,text,link,target){
	str=""
	if(this.backgroundbar && num==0){str+='\n<div id="div'+this.name+'Backgroundbar"></div>\n'}
	str+='<div id= "div'+this.name+'Mainback'+num+'" class="cl'+this.name+'Back"></div>\n'
	str+='\n\n<div id="div'+this.name+'Main'+num+'" class="cl'+this.name+'Main">'
	if(bw.ns4){
		str+=text;
		str+='</div>\n<div id="div'+this.name+'Main'+num+'Hilite" class="cl'+this.name+'MainHilite">'+text+'</div>\n'
		str+='<div id="div'+this.name+'Main'+num+'Cover" class="cl'+this.name+'Cover"></div>\n'
		if(link) this.submenus[num]='nosub';
	}
	else{
		if(link){ str+='<a href="'+link+'" onclick= "return false"'; this.submenus[num]='nosub'
		}else str+='<a href="#" onclick="'+this.name+'.menumain('+num+'); return false"'
		if(target) str+=' target="'+target+'" '
		str+=' class="clA'+this.name+'Main">'+text+'</a></div>\n'
	}
	this.target[num]= (target)?target:0;
	this.lnk[num]=link;
	this.sublnk[num]= new Array();
	this.subsublnk[num]= new Array();
	this.subsub2lnk[num]= new Array();
	this.subtarget[num]= new Array();
	this.subsubtarget[num]= new Array();
	this.subsub2target[num]= new Array();
	this.mainmenus++; 
	document.write(str)
}
function makeSub(num,subnum,text,link,total,target){
	str=""
	if(subnum==0) str='<div id="div'+this.name+'Sub'+num+'" class="cl'+this.name+'Subs">\n'
	str+='\t<div id="div'+this.name+'Sub'+num+'_'+subnum+'" class="cl'+this.name+'Sub">'
	if(bw.ns4){
		str+=text;
		str+='</div>\n\t<div id="div'+this.name+'Sub'+num+'_'+subnum+'Hilite" class="cl'+this.name+'SubHilite">'+text+'</div>\n'
		str+='\t<div id="div'+this.name+'Sub'+num+'_'+subnum+'Cover" class="cl'+this.name+'SubCover"></div>\n'
	}
	else{
		if(link) str+='<a href="'+link+'" onclick= "return false"'; else str+='<a href="#" onclick="'+this.name+'.menusub('+num+','+subnum+'); return false"'
		if(target) str+=' target="'+target+'" '
		str+=' class="clA'+this.name+'Sub">'+text+'</a></div>\n'
	}
	this.subtarget[num][subnum]= (target)?target:0;
	this.sublnk[num][subnum]=link;
	this.subsublnk[num][subnum]= new Array();
	this.subsub2lnk[num][subnum]= new Array();
	this.subsubtarget[num][subnum]= new Array();
	this.subsub2target[num][subnum]= new Array();
	if(subnum==total-1){
		str+='</div>\n'; this.submenus[num]=new Array()
		this.subsubmenus[num]= new Array();
		this.submenus[num]["main"]=total; this.submenus[num]["submenus"]=new Array()
	}
	document.write(str)
}
function makeSubSub(num,subnum,subsubnum,text,link,total,target){
	str=""
	if(subsubnum==0) str='<div id="div'+this.name+'Sub'+num+'_'+subnum+'_sub" class="cl'+this.name+'Subs">\n'
	str+='\t<div id="div'+this.name+'Sub'+num+'_'+subnum+'_sub'+subsubnum+'" class="cl'+this.name+'SubSub">'
	if(bw.ns4){
		str+=text;
		str+='</div>\n\t<div id="div'+this.name+'Sub'+num+'_'+subnum+'_sub'+subsubnum+'Hilite" class="cl'+this.name+'SubSubHilite">'+text+'</div>\n';
		str+='\t<div id="div'+this.name+'Sub'+num+'_'+subnum+'_sub'+subsubnum+'Cover" class="cl'+this.name+'SubSubCover"></div>\n'
	}
	else{
		if(link) str+='<a href="'+link+'" onclick= "return false"'; else str+='<a href="#"'
		if(target) str+=' target="'+target+'" '
		str+=' class="clA'+this.name+'SubSub">'+text+'</a></div>\n'
	}
	this.subsubtarget[num][subnum][subsubnum]=(target)?target:0;
	this.subsublnk[num][subnum][subsubnum]=link;
	this.subsub2lnk[num][subnum][subsubnum]= new Array();
	this.subsub2target[num][subnum][subsubnum]= new Array();
	if(subsubnum==total-1){
		str+='</div>\n';
		this.submenus[num]["submenus"][subnum]=total
		this.subsubmenus[num][subnum]= new Array()
	}
	document.write(str)
}
function makeSubSub2(num,subnum,subsubnum,subsub2num,text,link,total,target){
	str=""
	if(subsub2num==0) str='<div id="div'+this.name+'Sub'+num+'_'+subnum+'_'+subsubnum+'_sub" class="cl'+this.name+'Subs">\n'
	str+='\t<div id="div'+this.name+'Sub'+num+'_'+subnum+'_'+subsubnum+'_sub'+subsub2num+'" class="cl'+this.name+'SubSub2">'
	if(bw.ns4){
		str+=text;
		str+='</div>\n\t<div id="div'+this.name+'Sub'+num+'_'+subnum+'_'+subsubnum+'_sub'+subsub2num+'Hilite" class="cl'+this.name+'SubSub2Hilite">'+text+'</div>\n'
		str+='\t<div id="div'+this.name+'Sub'+num+'_'+subnum+'_'+subsubnum+'_sub'+subsub2num+'Cover" class="cl'+this.name+'SubSub2Cover"></div>\n';
	}
	else {
		if(link) str+='<a href="'+link+'" onclick= "return false"'; else str+='<a href="#"'
		if(target) str+=' target="'+target+'" '
		str+=' class="clA'+this.name+'SubSub2">'+text+'</a></div>\n'
	}
	this.subsub2target[num][subnum][subsubnum][subsub2num]=(target)?target:0;
	this.subsub2lnk[num][subnum][subsubnum][subsub2num]=link;
	if(subsub2num==total-1){
		str+='</div>\n';
		this.subsubmenus[num][subnum][subsubnum]=total
	}
	document.write(str);
}


function goMenus(){
/********************************************************************************
Variables to set.

Remember that to set fontsize and fonttype you set that in the stylesheet
above!
********************************************************************************/


//Making a menu object
oMenu=new menuObj('oMenu') //Place a name for the menu in there. Must be uniqe for each menu

//Setting menu object variables

//Style variables NOTE: The stylesheet have been removed. Use this instead! (some styles are there by default, like position:absolute ++)

NS6Offset = 12;

oMenu.clMain='padding:4px; font-family:Arial,Helvetica; font-size:9.4px;text-align:center' //The style //for the main menus
oMenu.clMainHilite='padding:4px; font-family: Arial,Helvetica; font-size:9.4px;text-align:center' //The style for NN main mouseovers
oMenu.clSub='padding:4px; font-family:Arial,Helvetica; font-size:9.4px' //The style for the submenus
oMenu.clSubHilite='padding:4px; font-family:Arial,Helvetica; font-size:9.4px' //The style for NN submenu mouseovers
oMenu.clSubSub='padding:5px; font-family:Arial,Helvetica; font-size:9.4px' //The style for the subsubmenus
oMenu.clSubSubHilite='padding:5px; font-family:Arial,Helvetica; font-size:9.4px' //The style for NN subsubmenu mouseovers
oMenu.clSubSub2='padding:5px; font-family:Arial,Helvetica; font-size:9.4px' //** NEW ** subsubsubmenu styles
oMenu.clSubSub2Hilite='padding:5px; font-family:verdana; font-size:10px;' //The style for NN subsubsubmenu mouseovers
oMenu.clSubSub3='padding:5px; font-family: Arial,Helvetica; font-size:9.4px' // ** NEW ** subsubsubsubmenu styles
oMenu.clAMain='text-decoration:none; color:FFFFFF;cursor:hand' //The style for the main links
oMenu.clASub='text-decoration:none; color:FFFFFF;cursor:hand' //The style for the sub links
oMenu.clASubSub='text-decoration:none; color:White;cursor:hand' //The style for the subsub links
oMenu.clASubSub2='text-decoration:none; color:000099;cursor:hand' //** NEW ** subsubsubmenu link styles
oMenu.clASubSub3='text-decoration:none; color:006600;cursor:hand' // ** NEW ** subsubsubsubmenu link styles

/***************************************
Border and separator variables
NOTE: The first sub border (s1BorderSize) will default to the main border size if you're arranging the menus in columns across the top (menurows=1). Only if the menus are in left-hand rows (menurows=0) will the s1BorderSize variable be applied.
****************************************/

oMenu.mBorderColor= 'cccccc';
oMenu.s1BorderColor= 'cccccc';
oMenu.s2BorderColor= '660000';
oMenu.s3BorderColor= '990000';
oMenu.s4BorderColor= '000099';

oMenu.mBorderSize= 1;		// The "frame" border size
oMenu.s1BorderSize= 1;
oMenu.s2BorderSize= 5;
oMenu.s3BorderSize= 1;
oMenu.s4BorderSize= 3;

oMenu.s1Separator= 1;		// The borders between the menu items
oMenu.s2Separator= 2;
oMenu.s3Separator= 1;
oMenu.s4Separator= 0;

/****************************************
*****************************************/

//Background bar properties
oMenu.backgroundbar=0 //Set to 0 if no backgroundbar
oMenu.backgroundbarfromleft=10 //The left placement of the backgroundbar in pixel or %
oMenu.backgroundbarfromtop=70 //The top placement of the backgroundbar  in pixel or %
oMenu.backgroundbarsize=720 //The size of the bar in pixel or %
oMenu.backgroundbarcolor="999999" //The backgroundcolor of the bar

oMenu.mainheight=20 //The height of the main menuitems in pixel or %
oMenu.mainwidth=new Array(108,63,65,72,53,60,88,70,70,60)

//Added for variable Sub-Heights TEJ
mysubheight=[[20,20,20,20,20,20,20,20,20,20,20,20],
             [20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20],
             [20,20,20,20,20,20,20,20,20,20,20,20],
             [30,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20],
             [20,20,20,20,20,20,20,20,20,20,20,20],
             [20,20,20,20,20,20,20,20,20,20,20,20],
             [20,20,20,20,20,20,20,20,20,20,20,20],
             [20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20],
             [20,20,20,20,20,20,20,20,20,20,20,20],
             [20,20,20,20,20,20,20,20,20,20,20,20]]


/**************************************************************/
// NEW VARIABLES

oMenu.mainOff= 'ffffff';	// The main menu font "off" color
oMenu.mainHilite= 'ffffff';	// The main menu font "on" color
oMenu.subOff= 'ffffff'		// The submenu font "off" color
oMenu.subHilite= 'ffffff';	// The submenu font "on" color
oMenu.subsubOff= '990000'	// The subsubmenu font "off" color
oMenu.subsubHilite= 'ffffff'	// The subsubmenu font "on" color
oMenu.subsub2Off= '0000ff'	// The subsubsubmenu font "off" color
oMenu.subsub2Hilite= 'ffff00'	// The subsubsubmenu font "on" color
/**************************************************************/


/*These are new variables. In this example they are set like the previous version*/
oMenu.subwidth=130 // ** NEW ** The width of the submenus
//oMenu.subheight=25 //The height if the subitems in pixel or %  //mySubHeight is used instead of this TEJ

oMenu.subsubwidth=100 // ** NEW ** The width of the subsubmenus in pixel or % 
oMenu.subsubheight=oMenu.subheight //** NEW ** The height if the subsubitems in pixel or % 

oMenu.subsub2width=100 // ** NEW ** The width of the subsubsubmenus
oMenu.subsub2height=oMenu.subheight // ** NEW ** The height of the subsubsubmenus

oMenu.subsub3width=100 // ** NEW ** The width of the subsubsubsubmenus
oMenu.subsub3height=oMenu.subheight	// ** NEW ** The height of the subsubsubsubmenus

//Writing out the style for the menu (leave this line!)
oMenu.makeStyle()

oMenu.subplacement=oMenu.mainheight //** NEW ** Relative to the main item
oMenu.subsubXplacement=oMenu.subwidth/2 //** NEW ** The X placement of the subsubmenus, relative to the sub item
oMenu.subsubYplacement=7 //** NEW ** The Y placement of the subsubmenus, relative to the sub item

oMenu.subsub2Xplacement=oMenu.subsubwidth/2 // ** NEW ** The X placement of the subsubsubmenus
oMenu.subsub2Yplacement=10 // ** NEW ** The Y placement of the subsubsubmenus

oMenu.subsub3Xplacement= oMenu.subsub2width/3 // ** NEW ** The X placement of the subsubsubsubmenus
oMenu.subsub3Yplacement=10 // ** NEW ** The Y placement of the subsubsubsubmenus

oMenu.mainbgcoloroff='black' //The backgroundcolor of the main menuitems
oMenu.mainbgcoloron='#ff6600' //The backgroundcolor on mouseover of the main menuitems
oMenu.subbgcoloroff='black' //The backgroundcolor of the sub menuitems
oMenu.subbgcoloron='#ff6600' //The backgroundcolor on mouseover of the sub menuitems
oMenu.subsubbgcoloroff='#deb887' //The backgroundcolor of the subsub menuitems
oMenu.subsubbgcoloron='#996666' //The backgroundcolor on mouseover of the subsub menuitems

oMenu.subsub2bgcoloron='#ffcccc' // ** NEW ** subsubsub menuitem mouseover backgroundcolor
oMenu.subsub2bgcoloroff='#cccccc' // ** NEW ** subsubsub menuitem mouseout backgroundcolor

oMenu.subsub3bgcoloron='#ff0000' // ** NEW ** subsubsubsub menuitem mouseover backgroundcolor
oMenu.subsub3bgcoloroff='#ffffff' // ** NEW ** subsubsubsub menuitem mouseout backgroundcolor

oMenu.stayoncolor=1 //Do you want the menus to stay on the mouseovered color when clicked?

oMenu.menuspeed=1000 //The speed of the clipping in px
oMenu.menusubspeed=1500 //The speed of the submenus clipping in px

oMenu.menurows=1 //Set to 0 if you want rows and to 1 if you want columns

oMenu.menueventon="mouse" //Set this to "mouse" if you want the menus to appear onmouseover, set it to "click" if you want it to appear onclick
oMenu.menueventoff="mouse" //Set this to "mouse" if you them to disappear onmouseout, if not set it to "click"

//Placement of the menuitems

//Example in %:
//oMenu.menuplacement=new Array("20%","40%","60%","50%","65%") //Remember to make the arrays contain as many values as you have main menuitems

//Example in px: (remember to use the ' ' around the numbers)
//oMenu.menuplacement=new Array('10','110','180','240','310','366','430','520','580','650')

//Example right beside eachother (only adding the pxbetween variable)
oMenu.menuplacement=0

//If you use the "right beside eachother" you cant how many pixel there should be between each here
//oMenu.pxbetween=1 //in pixel or %

//And you can set where it should start from the left here
if(bw.ns5){
oMenu.fromleft=8
}
else if(bw.ns4){
oMenu.fromleft=8
}
else {
oMenu.fromleft=10 //in pixel or %
}
//This is how much from the top the menu should be.
if(bw.ns5){
oMenu.fromtop=67 //in pixel or %
}
else if(bw.ns4){
oMenu.fromtop=62
}
else {
oMenu.fromtop=70 //in pixel or %
}

/********************************************************************************
Construct your menus below
********************************************************************************/

//MAIN 0

//Main items:
// makeMain(MAIN_NUM,'TEXT','LINK','FRAME_TARGET') (set link to 0 if you want submenus of this menu item)
if(bw.ns4 || bw.ns5){
oMenu.makeMain(0,CenterNS('News',oMenu.mainwidth[0]),'novinky.html','oGuide')
}
else {	
oMenu.makeMain(0,'News','novinky.html','oGuide')
}
	//Sub items:
	// makeSub(MAIN_NUM,SUB_NUM,'TEXT','LINK',TOTAL,'FRAME_TARGET') (set link to 0 if you want submenus of this menu item)
	//oMenu.makeSub(0,0,'Design studio','http://www.kopta.cz',9,'oGuide')
	//oMenu.makeSub(0,1,'Tatoo','jabko.html',9,'oGuide')
	oMenu.makeSub(0,0,'N.C.C. news','novinky.html',6,'oGuide')	
	oMenu.makeSub(0,1,'Encyclopaedia','http://www.radio.cz/grindenc/grindenc/grindenc/index.htm',6)
	//oMenu.makeSub(0,1,'Industrial','http://www.macabre.cz',6)
	//oMenu.makeSub(0,2,'Flash intro','flash.html',6,'oGuide')
	oMenu.makeSub(0,2,'Festival','http://www.sweb.cz/prague_industrial/page_2002_new01.htm',6)
	oMenu.makeSub(0,3,'Wired','http://www.wired.com/',6)
	//oMenu.makeSub(0,4,'Diderot','http://encyklopedie.diderot.cz/',6,'oGuide')
	oMenu.makeSub(0,4,'Britannica','http://www.eb.com/',6,'oGuide')
	oMenu.makeSub(0,5,'Thanks to','diky.html',6,'oGuide')
		//SubSub items:
		// makeSubSub(MAIN_NUM,SUB_NUM,SUBSUB_NUM,'TEXT','LINK',TOTAL,'FRAME_TARGET')
		

//MAIN 1

if(bw.ns4 || bw.ns5){
oMenu.makeMain(1,CenterNS('Digindustry',oMenu.mainwidth[1]),'')
}
else {	
oMenu.makeMain(1,'Digindustry','')
}
	oMenu.makeSub(1,0,'ierich´s ddrum software','ddrum.html',13,'oGuide')
	oMenu.makeSub(1,1,'ddrums','http://www.ddrums.com/',13)
	oMenu.makeSub(1,2,'ddrum','http://www.ddrum.com/',13)
	oMenu.makeSub(1,3,'Digidesign','http://www.digidesign.com/',13)
	oMenu.makeSub(1,4,'Roland','http://www.rolandmusik.de/',13)
	oMenu.makeSub(1,5,'Cakewalk','http://www.cakewalk.com/',13)
	oMenu.makeSub(1,6,'Sonic Foundry','http://www.sonicfoundry.com/',13)	
	oMenu.makeSub(1,7,'Steinberg','http://www.steinberg.net/',13)
	oMenu.makeSub(1,8,'Onkyo','http://www.onkyo.net/',13)
	oMenu.makeSub(1,9,'Yamaha','http://www.yamaha.com/',13)
	oMenu.makeSub(1,10,'Marantz','http://www.marantz.com/',13)	
	oMenu.makeSub(1,11,'Denon','http://www.denon.com/',13)	
	oMenu.makeSub(1,12,'Teac','http://www.teac.com/',13)	

//MAIN 2
if(bw.ns4 || bw.ns5){
oMenu.makeMain(2,CenterNS('Releases',oMenu.mainwidth[2]),'desky.html','oGuide')
}
else {			
oMenu.makeMain(2,'Releases','desky.html','oGuide')
}	
	oMenu.makeSub(2,0,'cd&gt; dead_in_jam','2006_dij.html',11,'oGuide')
	oMenu.makeSub(2,1,'7ep&gt; necro','2006_necro.html',11,'oGuide')
	oMenu.makeSub(2,2,'cd&gt; sick_atoms','2005_sick_atoms.html',11,'oGuide')
	oMenu.makeSub(2,3,'cd&gt; neurotransmitter','2004_neurotransmitter.html',11,'oGuide')
	oMenu.makeSub(2,4,'cd&gt; para_nano','2003_para_nanodivion.html',11,'oGuide')
	oMenu.makeSub(2,5,'cd&gt; r_s_d_e','2002_rsde.html',11,'oGuide')
	oMenu.makeSub(2,6,'cd&gt; blue_and_white','2001_blue_and_white.html',11,'oGuide')
	oMenu.makeSub(2,7,'7ep&gt; feynman','2000_feynman.html',11,'oGuide')
	oMenu.makeSub(2,8,'mc&gt; homologated','1999_homologated_recycled_4d_hippies.html',11,'oGuide')
	oMenu.makeSub(2,9,'mc&gt; spasm_of_extinction','1997_spasm_of_extinction.html',11,'oGuide')
	oMenu.makeSub(2,10,'mc&gt; 28_minutes','1996_28_minutes_of_silence_for_all_innocent_victims.html',11,'oGuide')

if(bw.ns4 || bw.ns5){
oMenu.makeMain(3,CenterNS('Think Enjoy',oMenu.mainwidth[3]),'')
}
else {			
oMenu.makeMain(3,'Think Enjoy','')
}
	oMenu.makeSub(3,0,'Astronomy Picture of the Day','http://antwrp.gsfc.nasa.gov/apod/astropix.html',19)
	oMenu.makeSub(3,1,'CSKI','http://www.cski.cz',19)
	oMenu.makeSub(3,2,'GI','http://www.gi-ev.de/',19)
	oMenu.makeSub(3,3,'Matlab','http://www.mathworks.com',19)
	oMenu.makeSub(3,4,'Java','http://java.sun.com',19)
	oMenu.makeSub(3,5,'JAVAWORLD','http://www.javaworld.com/',19)
	oMenu.makeSub(3,6,'SOURCEFORGE','http://sourceforge.net/',19)	
	//oMenu.makeSub(3,5,'Oracle','http://technet.oracle.com',13)
	oMenu.makeSub(3,7,'Uni','http://www.uni-muenchen.de/',19)
	oMenu.makeSub(3,8,'Museum','http://www.deutsches-museum.de/',19)	
	oMenu.makeSub(3,9,'Forum','http://www.fdt.de/',19)	
	//oMenu.makeSub(3,9,'F-1','http://www.formula1.com/news/home.html',13)
	oMenu.makeSub(3,10,'BNSC','http://www.bnsc.gov.uk/',19)
	//oMenu.makeSub(3,10,'F-3000','http://www.f3000.com/',13)
	oMenu.makeSub(3,11,'Raumflugbetrieb','http://www.weblab.dlr.de/rbweb/',19)
	//oMenu.makeSub(3,11,'F-CZ','http://www.formule-1.cz/',13)
	oMenu.makeSub(3,12,'DLR','http://www.dlr.de',19)
	oMenu.makeSub(3,13,'Space station','http://www.imax.com/spacestation/',19)				
	oMenu.makeSub(3,14,'SPACECLUB','http://www.spaceclub.de',19)					
	//oMenu.makeSub(3,12,'Odkud kam','http://www.falk-online.de/',13)			
	oMenu.makeSub(3,15,'AAAI','http://www.aaai.org/',19)//American Association for Artificial Intelligence				
	oMenu.makeSub(3,16,'ACM','http://acm.org/',19)//Association for Computing Machinery, ACM-SIGART http://sigart.acm.org/ 				
	oMenu.makeSub(3,17,'ECCAI','http://wwwis.cs.utwente.nl:8080/mars/ECCAI.html',19)//European Coordinating Committee for Artificial Intelligence				
	oMenu.makeSub(3,18,'IEEE','http://www.computer.org/',19)//Computer Society 				

if(bw.ns4 || bw.ns5){
oMenu.makeMain(4,CenterNS('Guestbook',oMenu.mainwidth[4]),'kniha.html','oGuide')
}
else {	
oMenu.makeMain(4,'Guestbook','kniha.html','oGuide')
}


if(bw.ns4 || bw.ns5){
oMenu.makeMain(5,CenterNS('About Us',oMenu.mainwidth[5]),'mem_up.html','oGuide')
}
else {			
oMenu.makeMain(5,'About Us','mem_up.html','oGuide')
}
	oMenu.makeSub(5,0,'The N.C.C. group','mem_up.html',8,'oGuide')
	oMenu.makeSub(5,1,'Robo','mem_robo.html',8,'oGuide')
	oMenu.makeSub(5,2,'Ierich','mem_ierich.html',8,'oGuide')
	oMenu.makeSub(5,3,'Paul','mem_paul.html',8,'oGuide')
	oMenu.makeSub(5,4,'Brain','mem_brain.html',8,'oGuide')
	oMenu.makeSub(5,5,'Buraq','mem_buraq.html',8,'oGuide')	
	oMenu.makeSub(5,6,'Hejc','mem_hejc.html',8,'oGuide')
	oMenu.makeSub(5,7,'Problem','mem_problem.html',8,'oGuide')

if(bw.ns4 || bw.ns5){
oMenu.makeMain(6,CenterNS('Gigs & Shows',oMenu.mainwidth[6]),'koncerty.html','oGuide')
}
else {
oMenu.makeMain(6,'Gigs & Shows','koncerty.html','oGuide')
}

if(bw.ns4 || bw.ns5){
oMenu.makeMain(7,CenterNS('Resources',oMenu.mainwidth[7]),'http://www.google.de/')
}
else {	
oMenu.makeMain(7,'Resources','http://www.google.de/')
}
	oMenu.makeSub(7,0,'ESA','http://www.esa.int/',19)
	oMenu.makeSub(7,1,'ESTEC','http://www.estec.esa.nl/',19)
	oMenu.makeSub(7,2,'ESOC','http://www.esoc.esa.de/',19)
	oMenu.makeSub(7,3,'ESRIN','http://www.esrin.esa.it/',19)
	oMenu.makeSub(7,4,'EAC','http://www.spaceflight.esa.int/',19)				
	oMenu.makeSub(7,5,'ESASCI','http://www.sci.esa.int',19)
	oMenu.makeSub(7,6,'ESACZ','http://www.czechspace.cz/',19)	
	oMenu.makeSub(7,7,'NASA','http://www.nasa.gov',19)
	oMenu.makeSub(7,8,'Russkij','http://www.russianspaceweb.com/',19)	
	oMenu.makeSub(7,9,'World Space Congress','http://www.aiaa.org/WSC2002',19)	
	oMenu.makeSub(7,10,'Solar System Simulator','http://space.jpl.nasa.gov/',19)
	oMenu.makeSub(7,11,'Astronomický deník','http://denik.hvezdarna.cz/',19)
	oMenu.makeSub(7,12,'SPACE.com','http://www.space.com/ ',19)			
	oMenu.makeSub(7,13,'Planetarium','http://www.planetarium.cz/',19)
	//oMenu.makeSub(7,6,'Sisyfos','http://sisyfos.hyperlink.cz/',12)
	oMenu.makeSub(7,14,'Forschungszentrum Jülich','http://www.fz-juelich.de/',19)
	oMenu.makeSub(7,15,'HELMHOLTZ','http://www.helmholtz.de/',19)
	oMenu.makeSub(7,16,'HAMEROFF','http://www.consciousness.arizona.edu/hameroff/',19)
	oMenu.makeSub(7,17,'Archiv','http://arxiv.org/',19)
	oMenu.makeSub(7,18,'Science World','http://scienceworld.wolfram.com/',19)	

if(bw.ns4 || bw.ns5){
oMenu.makeMain(8,CenterNS('Contact Us',oMenu.mainwidth[8]),'kontakt.html','oGuide')
}
else {	
oMenu.makeMain(8,'Contact Us','kontakt.html','oGuide')
}

if(bw.ns4 || bw.ns5){
oMenu.makeMain(9,CenterNS('Site Map',oMenu.mainwidth[9]),'sitemap.html','oGuide')
}
else {	
oMenu.makeMain(9,'Site Map','sitemap.html','oGuide')
}



/********************************************************************************
End menu construction
********************************************************************************/
		
		
//When all the menus are written out we initiates the menu
oMenu.construct()

}

function openWindow(url) {
	popupWin = window.open(url);
}

function CenterNS(title,width){//Added for NS4 Centering TEJ
	if (bw.ns4) {
		titleLengthpx = 120 - width;
		buffer = titleLengthpx;
		buffer = Math.round(buffer/2.65);
		for(i = 0;i<buffer;i++){
			title = title + "&nbsp;";
		}
	}
	if (bw.ns5) {
		buffer = NS6Offset;
		buffer = Math.round(buffer/3);
		for(i = 0;i<buffer;i++){
			title = title + "&nbsp;";
		}
	}
	
	return title;
}
/*********************************************************************************************
END Menu script
*********************************************************************************************/
if(bw.bw)goMenus();




