sfHover = function() { var sfEls = document.getElementById("nav").getElementsByTagName("LI"); for (var i=0; i 2){ Timer.set[i][0] = args[2]; t += "Timer.set["+i+"][0]"; for(var j=1; (j+2) 1) { if (textrandom == textItems-1) textrandom--; else textrandom++; } document.getElementById('textadtext').innerHTML = myTextads[textrandom].text; document.getElementById('textadlink').href = myTextads[textrandom].link; textlastrandom = textrandom; setTimeout('replaceTextAds()',this.textAdTimeout); } function startAdRotation(b7ads,normalads,textads,slads,B7AdTimeout,normalAdTimeout,textAdTimeout,slAdTimeout, number_of_menuitems, numOfMenuItems) { // "javascript:startAdRotation(['http://www.bellona.no/imagearchive/adimage_AkerASA_B7_logo_web.jpg','Aker ASA','http://www.akerasa.com','http://www.bellona.no/imagearchive/appliedplasmaphysicsas','Applied Plasma Physics AS','http://www.app.no/','http://www.bellona.no/imagearchive/adimage_Avikom-logo_web-1..jpg','Avikom','http://www.avikom.no','http://www.bellona.no/imagearchive/adimage_bama_logo_web.jpg','Bama','http://www.bama.no','http://www.bellona.no/imagearchive/adimage_bwgas_logo_web.jpg','BWGas','http://www.bwgas.com/','http://www.bellona.no/imagearchive/cocacolanorgeas','Coca Cola Norge AS','http://www.cocacola.no/','http://www.bellona.no/imagearchive/conocophillips','ConocoPhillips','http://www.conocophillips.no/','http://www.bellona.no/imagearchive/adimage_EBL_b7_logo_web.jpg','Energibedriftenes landsforening','http://www.ebl.no','http://www.bellona.no/imagearchive/eidesvikas','Eidesvik as','http://www.eidesvik.no/','http://www.bellona.no/imagearchive/eiendomsspar','Eiendomsspar','http://www.epi.no/eiendomsspar/','http://www.bellona.no/imagearchive/adimage_EB_logo-1..jpg','Energiselskapet Buskerud AS','http://www.eb.no/','http://www.bellona.no/imagearchive/erametnorge','Eramet Norge','http://www.eramet.fr/','http://www.bellona.no/imagearchive/ferrolegeringsindustriensforskningsforening','Ferrolegeringsindustriens Forskningsforening','http://www.ferroforsk.com/','http://www.bellona.no/imagearchive/findus','Findus','http://www.findus.no/','http://www.bellona.no/imagearchive/adimage_flytoget2_logo_web-1..jpg','Flytoget','http://www.flytoget.no','http://www.bellona.no/imagearchive/adimage_Hafslund_logo_web.jpg','hafslund','http:www.hafslund.no','http://www.bellona.no/imagearchive/marineharvest','Marine Harvest','http://www.marineharvest.no','http://www.bellona.no/imagearchive/marinepower','Marine Power','http://www.marinepower.no/','http://www.bellona.no/imagearchive/mesta','Mesta','http://www.mesta.no/','http://www.bellona.no/imagearchive/noahas','Noah AS','http://www.noah.no/ ','http://www.bellona.no/imagearchive/norskindustri','Norsk Industri','http://www.norskindustri.no/','http://www.bellona.no/imagearchive/norskeshellas','Norske Shell as','http://www.shell.no/','http://www.bellona.no/imagearchive/adimage_pon-power.jpg','Pon Power','http://www.ponpower.no/','http://www.bellona.no/imagearchive/adimage_saab_logo_web-5..jpg','Saab','http://www.saab.no','http://www.bellona.no/imagearchive/adimage_siemens_logo_web.jpg','Siemens ','http://www.siemens.no','http://www.bellona.no/imagearchive/adimage_skretting_logo_web_b7.jpg','Skretting AS','http://www.skretting.no/','http://www.bellona.no/imagearchive/adimage_statkraft_ny_logo_web_150x4.jpg','Statkraft','http://www.statkraft.no/','http://www.bellona.no/imagearchive/statoil','Statoil','http://www.statoil.no/MAR/SVG01183.nsf/fs/start','http://www.bellona.no/imagearchive/adimage_veolia_logo_web.jpg','Veolia Miljø AS','http://www.veolia.no','http://www.bellona.no/imagearchive/waterpowerindustriesas','Water Power Industries AS','','http://www.bellona.no/imagearchive/adimage_wilh.wilhelmsen_logo_web-1..jpg','Wilh Wilhelmsen','http://www.ww-group.com','http://www.bellona.no/imagearchive/woodpolymertechnologiesasa','Wood Polymer Technologies ASA','http://www.wpt.no/','http://www.bellona.no/imagearchive/adimage_yara_logo_web-1..jpg','Yara','http://www.yara.com'],['http://www.bellona.no/imagearchive/adimage_sor-norge-alu_logo_web.jpg','Sør-Norge Aluminium','http://www.soral.no/eng/'],[],[],15000,15000,10000,15000,8,['6','5','8','5','7','6','5'])"> // alert("b7ads length:" + b7ads.length + " --> normalads length: " + normalads.length); // alert(normalads); for (num=1; num<=number_of_menuitems; num++) { nn = numOfMenuItems[num-1] initializeMenu("menu"+num, "actuator_slot"+num,"img"+num); for (n=1; n<=nn; n++) { initializeMenu("submenu"+num+"_"+n, "submenu_actuator_slot"+num+"_"+n,"img"+num+"_"+n); } } this.B7AdTimeout = B7AdTimeout; this.normalAdTimeout = normalAdTimeout; this.slAdTimeout = slAdTimeout; this.textAdTimeout = textAdTimeout; // this.textAdTimeout = 100; // this.slAdTimeout = 100; // this.B7AdTimeout = 100; // this.normalAdTimeout = 100; setb7AdInfo(b7ads); setNormalAdInfo(normalads); setSlAdInfo(slads); setTextAdInfo(textads); var now = new Date(); b7random = now.getSeconds()%b7Items; b7lastrandom = b7random; normalrandom = now.getSeconds()%normalItems; normallastrandom = normalrandom; slrandom = now.getSeconds()%slItems; sllastrandom = slrandom; textrandom = now.getSeconds()%textItems; textlastrandom = textrandom; if (myB7ads[b7random] != null) { document.getElementById('b7adimage').src = myB7ads[b7random].image; document.getElementById('b7adtext').innerHTML = myB7ads[b7random].text; document.getElementById('b7adlink').href = myB7ads[b7random].link; } if (myNormalads[normalrandom] != null) { document.getElementById('normaladimage').src = myNormalads[normalrandom].image; document.getElementById('normaladtext').innerHTML = myNormalads[normalrandom].text; document.getElementById('normaladlink').href = myNormalads[normalrandom].link; } if (mySlads[slrandom] != null) { try{ document.getElementById('sladimage').src = mySlads[slrandom].image; document.getElementById('sladtext').innerHTML = mySlads[slrandom].text; document.getElementById('sladlink').href = mySlads[slrandom].link; } catch(err) { } } if (myTextads[textrandom] != null) { document.getElementById('textadtext').innerHTML = myTextads[textrandom].text; document.getElementById('textadlink').href = myTextads[textrandom].link; } if (b7Items > 1) { setTimeout('replaceB7Ads()',this.B7AdTimeout); } if (normalItems > 1) { setTimeout('replaceNormalAds()',this.normalAdTimeout); } if (slItems > 1) { setTimeout('replaceSlAds()',this.slAdTimeout); } if (textItems > 1) { setTimeout('replaceTextAds()',this.textAdTimeout); } } function getCookie(name) { var dc = document.cookie; var prefix = name + "="; var begin = dc.indexOf("; " + prefix); if (begin == -1) { begin = dc.indexOf(prefix); if (begin != 0) return null; } else begin += 2; var end = document.cookie.indexOf(";", begin); if (end == -1) end = dc.length; return unescape(dc.substring(begin + prefix.length, end)); } // LIST ALL SHOW/HIDE ELEMENT IDS HERE menus_array = new Array ('ddNA','ddAA','ddBlog','ddDA','ddPress','ddLink','ddFaq', 'ddAO', 'ddBk'); menus_status_array = new Array ();// remembers state of switches img_close = 'style/minus_white.jpg'; img_open = 'style/plus_white.jpg'; function showHideSwitch (theid) { if (document.getElementById) { var switch_id = document.getElementById(theid); var imgid = theid+'Button'; var button_id = document.getElementById(imgid); if (menus_status_array[theid] != 'show') { if (button_id != null) { button_id.setAttribute ('src', img_close); } if (switch_id != null) { switch_id.className = 'showSwitch'; } menus_status_array[theid] = 'show'; document.cookie = theid+'=show'; } else { if (button_id != null) { button_id.setAttribute ('src', img_open); } if (switch_id != null) { switch_id.className = 'hideSwitch'; } menus_status_array[theid] = 'hide'; document.cookie = theid+'=hide'; } } } function resetMenu () { // read cookies and set menus to last visited state if (document.getElementById) { for (var i=0; i