if(navigator.appName == "Netscape") {
	document.write('<SCRIPT src="menudata.js"></SCRIPT>')
}
ns = (navigator.appName == "Netscape")

// Bygger en menydel
var menuArr = new Array()
function DropMenu(menuname,xPos,xWidth) {
	dropnum=1
	error=false
	while(error==false) {
		if(dropTopicArray[dropnum]=='') error=true
		if(dropTopicArray[dropnum]==menuname) error=true
		dropnum++
	}

	dropnum--
	dropmenu=dropTopicArray[dropnum]
	dropmenudata=dropArray[dropnum]

  // Next row is an addition made by Glenn Nilsson (glenn.nilsson@framfab.se)
  menuArr[menuArr.length] = menuname

	if(ns) dropretstr='<LAYER name="'+menuname+'menu" top="0" left="'+xPos+'" visibility="hide" z-index="200" bgcolor="white">'
	else dropretstr='<TABLE id="'+menuname+'menu" border="0" cellspacing="0" cellpadding="0" style="position: absolute; top: 0px; left: '+xPos+'px; width: '+xWidth+'; visibility: hidden; z-index: 200; background: white;">'

	dropitem=1
	if(!ns) {
		droploop=0
		droplast=Math.round(dropmenudata.split(';').length/2-1)
	}

	while(extractData('name',dropmenudata)) {
    href = extractData('href',dropmenudata)
    stat = ""
    if (href.substring(0,9) == "external:") {
      stat = "external"
      href = href.substring(9)
    }
    if (href.substring(0,9) == "internal:") {
      stat = "internal"
      href = href.substring(9)
    }
		if(ns) {
      href = (stat != "") ? stat + ":" + href : href ;
			dropretstr=dropretstr+
			'<LAYER name="'+dropTopicArray[dropnum]+dropitem+'" top="'+((dropitem-1)*16)+'" width="'+xWidth+'" height="15" left="0" bgcolor="'+dropColorArray[dropnum]+'" style="text-decoration: none" '+
			'onmouseover="nextUrl=\''+href+'\'; this.bgColor=\''+dropOverColorArray[dropnum]+'\'" '+
			'onmouseout="nextUrl=\'\'; this.bgColor=\''+dropColorArray[dropnum]+'\'">'+
			'<A href="#" onclick="return false" style="text-decoration: none"><FONT color="white" face="arial,helvetica" size="1">'+
			'&nbsp; &nbsp; '+extractData('name',dropmenudata)+
			'</FONT></A></LAYER>'

		}
		else {
			droploop++
      if (stat == "external") href = "window.open(\'"+href+"\')"
      if (stat == "internal") href = "top.location=\'"+href+"\'"
      if (stat == "") href = "top.main.location=\'"+href+"\'"
			dropretstr=dropretstr+
			'<tr><td height="16" style="cursor: hand; background: '+dropColorArray[dropnum]+'; '
			if(droplast != droploop) dropretstr=dropretstr+'border-bottom: 1px solid white; '
			
			dropretstr=dropretstr+'" '+
			'onclick="'+href+'" '+
			'onmouseover="this.style.background=\''+dropOverColorArray[dropnum]+'\'" '+
			'onmouseout="this.style.background=\''+dropColorArray[dropnum]+'\'" '+
			'>'+
			'<FONT color="white" face="arial,,helvetica" size="1">'+
			'&nbsp; &nbsp; '+extractData('name',dropmenudata)+
			'</FONT></td></tr>'

		}
		
		dropitem++		
		dropmenudata=dropmenudata.substring(dropmenudata.indexOf(';')+1,dropmenudata.length)
		dropmenudata=dropmenudata.substring(dropmenudata.indexOf(';')+1,dropmenudata.length)
	}
	
	if(ns) dropretstr=dropretstr+'</LAYER>'
	else dropretstr=dropretstr+'</TABLE>'
	return dropretstr
}


// Plockar fram v”rdet f–r en variabel i menylistan dropArray. Anv”nds av DropMenu()
function extractData(name,str) {
	retstr=str.substring(str.indexOf(name+'=')+name.length+1,str.length)
	retstr=retstr.substring(0,retstr.indexOf(';'))
	if(retstr=='') return false
	else return retstr;
}

// Bygger ihop koden f–r menyn
menus='<DIV id="tommenu" style="position: absolute; top: 0px; left: 0px; width: 0px; height: 0px; visibility: hidden"></DIV>'+

DropMenu('group',8,187)+
DropMenu('trucks',105,145)+
DropMenu('buses',183,150)+
DropMenu('constructions',260,132)+
DropMenu('marine',392,158)+
DropMenu('aero',550,182)+
DropMenu('news',601,146)

document.writeln(menus)
top.mainReady=true