// developed by apt as - www.apt.no - 2001 - christopher@apt.no content = new Array(); /* forside */ content[0] = new Array(); //content[0][0] = 'link'; /* søndagsåpent */ content[1] = new Array(); //content[1][0] = 'programinfo'; //content[1][1] = 'konsept'; /* produksjoner */ content[2] = new Array(); content[2][0] = 'aktuelle'; content[2][1] = 'tidligere'; /* tjenester */ content[3] = new Array(); content[3][0] = 'kompetanse'; content[3][1] = 'bestilling'; /* ansatte */ content[4] = new Array(); //content[4][0] = 'staben'; /* om tvinter */ content[5] = new Array(); content[5][0] = 'om oss'; content[5][1] = 'linkside'; //content[5][2] = 'partnere'; //content[5][3] = 'historie'; // this array is the widths of the layers var width = new Array(126,122,123,123,123,125); // this array is the widths of the menubuttons var btnSize = new Array(126,122,123,123,123,125); // this array define style-classes for the layers(class,background-color,hi-lite-color) arrStyle[0] = new Array('menu01','#688a92','#436d77'); arrStyle[1] = new Array('menu02','#033855','#002132'); arrStyle[2] = new Array('menu03','#c88119','#9f6000'); arrStyle[3] = new Array('menu04','#3e3217','#262400'); arrStyle[4] = new Array('menu05','#de2913','#b10200'); arrStyle[5] = new Array('menu06','#d1bb51','#b3950f'); /* */ /* only private functions below - DO NOT ALTER !!! */ /* */ var i; var j; var k; var top; var bgtop; var bgleft; var bgheight; var bgwidth; var clleft; var cltop; // get the xy-position of the first menubutton if ((document.getElementById)||(document.all)){ // if msie, netscape 6, Opera var x = getXpos(document.images['menu_01']); var y = getYpos(document.images['menu_01']); // if platform is Mac or browser is Opera, add some pixels.. var macAdd = (navigator.platform.indexOf("Mac")!= -1 || navigator.userAgent.indexOf('Opera')!= -1)?4:0; // set coords for the background-layer bgtop = y+38+macAdd; bgleft = x; // set coords for the closing-layer cltop = y+38+macAdd; clleft= x-10; // write closing-layers closingLayer(clleft,cltop) // loop through the outer array (content) for(i=0;i0){ bgwidth = width[i]; bgheight = content[i].length * 14; }else{ bgwidth = 0; bgheight= 0; } // the menubackground needs an background-color to be 'visible' for IE and // protect for the underlying closinglayer document.writeln(''); top = top+14; } document.writeln(''); // set next leftposition bgleft = bgleft+btnSize[i]; } }else if(document.layers){ var x = document.images['menu_01'].x; var y = document.images['menu_01'].y; bgtop = y+38; bgleft = x; cltop = y+38; clleft= x-10; // write closinglayers closingLayer(clleft,cltop) // loop through the outer array (content) for(i=0;i'); top = 1; // loop through the inner array and write the div's for(j=0;j'+content[i][j]+''); top = top+14; } document.writeln(''); // set next leftposition bgleft = bgleft+btnSize[i]; } } // this indicates that the menu is written and can be accessed menu = true; function closingLayer(myX,myY){ // function: create the closing layer // returns : nothing var height = 0; var width = 0; // set height to the same as the longest submenu for(k=0;kheight){ height = content[k].length; } } // calculate the width for(k=0;k