var undefined; var meHeight=20; var topMargin=110; var currentElement="0"; var currentUnid=""; var theMenu=new Array(); var tm; var hb = String.fromCharCode(164); // Hair ball, "€". Must set the variable this way because IE operates with different char.sets var level0Height=20; var level1Height=0; var level2Height=0; var level3Height=0; var level4Height=0; var ver=navigator.appVersion var dom=document.getElementById?1:0 var ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; var ie5=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:this.ie5; var ie5=(this.ver.indexOf("MSIE 7")>-1 && this.dom)?1:this.ie5; var ie4=(document.all && !this.dom)?1:0; var ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; var ns4=(document.layers && !this.dom)?1:0; var opera=!(this.ie5 || this.ie4 || this.ns4 || this.ns5) && this.dom if (dom) {var visible = "visible";} else {var visible = "show";} theMenu[1] = new Array(); tm = theMenu[1]; tm.id="mi1"; tm.txt="Home"; tm.level=1; tm.unid="JTHD5WGFFU"; tm.urls = new Array(); tm.targets = new Array(); tm.urls[0] = "/esite/esite.nsf?open"; tm.targets[0] = "_self"; tm.height=0; theMenu[2] = new Array(); tm = theMenu[2]; tm.id="mi2"; tm.txt="Products"; tm.level=1; tm.unid="JTHD5WGFG2"; tm.urls = new Array(); tm.targets = new Array(); tm.urls[0] = "/esite/esite.nsf/pub/EGRN5YBB2P?Open&cid=JTHD5WGFG2"; tm.targets[0] = "_top"; tm.height=0; theMenu[3] = new Array(); tm = theMenu[3]; tm.id="mi2x1"; tm.txt="Afinion"; tm.level=2; tm.unid="JTHD5WGH68"; tm.urls = new Array(); tm.targets = new Array(); tm.urls[0] = "/esite/esite.nsf/pub/JTHD5WRCCE?Open&cid=JTHD5WGH68"; tm.targets[0] = "_self"; tm.height=0; theMenu[17] = new Array(); tm = theMenu[17]; tm.id="mi2x4"; tm.txt="NycoCard"; tm.level=2; tm.unid="JTHD5WGH6E"; tm.urls = new Array(); tm.targets = new Array(); tm.urls[0] = "/esite/esite.nsf/pub/EGRN5WZF5F?Open&cid=JTHD5WGH6E"; tm.targets[0] = ""; tm.height=0; theMenu[39] = new Array(); tm = theMenu[39]; tm.id="mi2x5"; tm.txt="Coagulation"; tm.level=2; tm.unid="JTHD5WGH6J"; tm.urls = new Array(); tm.targets = new Array(); tm.urls[0] = "/esite/esite.nsf/pub/EGRN5YBAST?Open&cid=JTHD5WGH6J"; tm.targets[0] = "_self"; tm.height=0; theMenu[47] = new Array(); tm = theMenu[47]; tm.id="mi2x6"; tm.txt="Density Gradient Media"; tm.level=2; tm.unid="BLOH6MEJ8Z"; tm.urls = new Array(); tm.targets = new Array(); tm.urls[0] = "http://www.axis-shield-density-gradient-media.com"; tm.targets[0] = "_blank"; tm.height=0; theMenu[48] = new Array(); tm = theMenu[48]; tm.id="mi3"; tm.txt="Disease Areas"; tm.level=1; tm.unid="JTHD5WGFG5"; tm.urls = new Array(); tm.targets = new Array(); tm.urls[0] = "/esite/esite.nsf/pub/MSMN6QKDWP?Open&cid=JTHD5WGFG5"; tm.targets[0] = "_self"; tm.height=0; theMenu[49] = new Array(); tm = theMenu[49]; tm.id="mi3x1"; tm.txt="Diabetes"; tm.level=2; tm.unid="JTHD5WHDV2"; tm.urls = new Array(); tm.targets = new Array(); tm.urls[0] = "/esite/esite.nsf/pub/MSMN6RKHZF?Open&cid=JTHD5WHDV2"; tm.targets[0] = "_self"; tm.height=0; theMenu[66] = new Array(); tm = theMenu[66]; tm.id="mi3x2"; tm.txt="Inflammation"; tm.level=2; tm.unid="JTHD5WHDV9"; tm.urls = new Array(); tm.targets = new Array(); tm.urls[0] = "/esite/esite.nsf/pub/MSMN6RLHJ3?Open&cid=JTHD5WHDV9"; tm.targets[0] = "_self"; tm.height=0; theMenu[85] = new Array(); tm = theMenu[85]; tm.id="mi3x5"; tm.txt="Cardiovascular"; tm.level=2; tm.unid="EGRN5Y9HX2"; tm.urls = new Array(); tm.targets = new Array(); tm.urls[0] = "/esite/esite.nsf/pub/EGRN5YBB7H?Open&cid=EGRN5Y9HX2"; tm.targets[0] = "_self"; tm.height=0; theMenu[95] = new Array(); tm = theMenu[95]; tm.id="mi4"; tm.txt="News & Events"; tm.level=1; tm.unid="JTHD5WGFGC"; tm.urls = new Array(); tm.targets = new Array(); tm.urls[0] = "/esite/esite.nsf/pub/MSMN65WGS3?Open&cid=JTHD5WGFGC"; tm.targets[0] = "_top"; tm.height=0; theMenu[99] = new Array(); tm = theMenu[99]; tm.id="mi5"; tm.txt="Distributors"; tm.level=1; tm.unid="JTHD5WGFGG"; tm.urls = new Array(); tm.targets = new Array(); tm.urls[0] = "/esite/esite.nsf/pub/JTHD5WVGMW?Open&view=distributors&cid=JTHD5WGFGG&view=distributorsbycountry&count=1000"; tm.targets[0] = "_self"; tm.height=0; function Initialize(clickId) { // Called from the OnLoad event ResetMenu(); if (!isNaN(clickId) && clickId > 0) { OpenElement(clickId); } // OpenBookmark(); } // Initialize function OpenBookmark() { var theUnid = top.menuUnid; top.menuUnid = ""; if (theUnid != ""){ for (arrNr in theMenu){ arrayElement = theMenu[arrNr]; if (arrayElement.unid == theUnid) { OpenElement(arrNr); break; } } //for } // if } // OpenBookmark function Click(id) { OpenReference(id); // OpenElement(id); } // Click function OpenReference(arrNr) { arrayElement = theMenu[arrNr]; if (arrayElement.urls == undefined) return; currentUnid=theMenu[arrNr].unid; for (var i = 0;i < arrayElement.urls.length;i++) { click = "&mi=" + arrNr if (arrayElement.targets[i]=="_blank") { window.open(arrayElement.urls[i]); } else if (arrayElement.targets[i]=="_top") { top.document.location.href=arrayElement.urls[i] + click; } // ***** else if (arrayElement.targets[i]=="_self" || arrayElement.targets[i]=="") { document.location.href=arrayElement.urls[i] + click; } // ***** else if (arrayElement.targets[i]!="") { //var currentUrl = eval("top." + arrayElement.targets[i] + ".location.href").slice(-arrayElement.urls[i].length); var currentUrl = eval("top.location.href").slice(-arrayElement.urls[i].length-click.length); // if we are trying to open a new url if (currentUrl != arrayElement.urls[i]) { eval("document.location.href=\"" + arrayElement.urls[i] + click +"\""); } } } } // OpenReference function OpenElement(arrNr) { var theStyle; id = theMenu[arrNr].id; if (currentElement.substr(0, id.length) == id) { var lastX = id.lastIndexOf("x"); if (lastX > 0) { id = id.substr(0, lastX) } else { ResetMenu(); // collapsing the menu currentElement = "0"; return; } } // if currentElement = id; ResetMenu(); // collapsing the menu var theStyle; var TheStyle2; var arrayElement; var nextYPos = topMargin; for (arrId in theMenu){ arrayElement = theMenu[arrId]; if (GetLevelSubset(arrayElement.id, arrayElement.level-1)==GetLevelSubset(id, arrayElement.level-1) || arrayElement.level==1) { theStyle=GetElementStyle(arrayElement.id); theStyle.top=nextYPos; if (arrNr == arrId) { theStyle.background = 'url(/esite/esite.nsf/images/selected.gif) no-repeat'; //alert (id+'a') theStyle2=GetElementStyle(id+'a'); theStyle2.color = '#000000'; } theStyle.visibility=visible; theStyle.display='block'; if (arrayElement.height > 0) { nextYPos+=arrayElement.height; } else if (eval("level" + arrayElement.level + "Height") > 0) { nextYPos+=eval("level" + arrayElement.level + "Height"); } else { nextYPos+=meHeight; } } } //for } // OpenElement() function ResetMenu() { var theStyle; var nextYPos = topMargin; for (arrId in theMenu){ arrayElement = theMenu[arrId]; if (arrayElement.level==1){ theStyle=GetElementStyle(arrayElement.id); theStyle.top=nextYPos; if (arrayElement.height > 0) { nextYPos+=arrayElement.height; } else if (eval("level" + arrayElement.level + "Height") > 0) { nextYPos+=eval("level" + arrayElement.level + "Height"); } else { nextYPos+=meHeight; } } else { theStyle=GetElementStyle(arrayElement.id); theStyle.top=0; theStyle.visibility="visible"; theStyle.display="none"; } } //for } // ResetMenu() function GetLevelSubset(element, level) { if (level==0) level = 1; var tmp = element.split("x"); var tmp2 = tmp.slice(0, level); var tmp3 = tmp2.join("x"); return tmp3; } // GetLevelSubset() function GetElementStyle(id) { var theStyle=""; if (dom) {theStyle=document.getElementById(id).style;} else {theStyle=eval('document.layers.' + id);} return theStyle; } // GetElementStyle function AddBookmark() { var domain = "http://" + document.domain; var domainAndDb = domain + "/esite/esite.nsf"; var frmMenuUrl = top.frmMenu.location.href; var frmMainUrl = top.frmMain.location.href; var frmRightUrl = top.frmRight.document.location.href; frmMenuUrl = frmMenuUrl.replace(domain, "").replace("?","!"); frmMainUrl = frmMainUrl.replace(domain, "").replace("?","!"); frmRightUrl = frmRightUrl.replace(domain, "").replace("?","!"); var newUrl = domainAndDb + "!OpenDatabase&frmmenu=" + frmMenuUrl + "&menuunid=" + currentUnid + "&frmmain=" + frmMainUrl + "&frmright=" + frmRightUrl; if (ie5) { if (top.frmMain.document.title!="") { var title = top.document.title + " - " + top.frmMain.document.title; } else { var title = top.document.title } window.external.AddFavorite(newUrl, title); } else { var message = "Det vil nå settes en ny adresse i adressefeltet. Denne kan bokmerkes på vanlig måte i nettleseren. Bokmerket vil åpne sidene slik de vises nå."; alert(message); top.location.href = newUrl; } } // AddBookmark