var OnDisplay = null;var LayerYPos = 10;var selected = '';var preloadFlag = false;var uploadingDiv = 0;function newImage(arg) {	if (document.images) {		rslt = new Image();		rslt.src = arg;		return rslt;	}}function changeImages() {	if (document.images && (preloadFlag == true)) {		for (var i=0; i<changeImages.arguments.length; i+=2) {     			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];		}	}}function preloadImages() {	if (document.images) {		top_news_over = newImage("img/top_news_over.gif");		top_company_over = newImage("img/top_company_over.gif");		top_support_over = newImage("img/top_support_over.gif");		top_terms_over = newImage("img/top_terms_over.gif");		top_contact_over = newImage("img/top_contact_over.gif");		top_minsida_over = newImage("img/top_minsida_over.gif");		top_home_over = newImage("img/top_home_over.gif");		preloadFlag = true;	}}function Show(LayerId,What,CustomerID,Module,Banner,Row,Action){      if (document.getElementById){    if (OnDisplay != null)      OnDisplay.style.visibility = 'hidden';	            OnDisplay = top.document.getElementById(LayerId);		    if (navigator.userAgent.indexOf ('Gecko') == -1 || navigator.userAgent.indexOf ('Opera') == -1) // Alla utom Mozilla/Ns6 och Opera			      OnDisplay.style.top = (LayerYPos + top.document.body.scrollTop) + "px";		    else // Mozilla/Ns6 och Opera			      OnDisplay.style.top = (LayerYPos + pageYOffset) + "px";      OnDisplay.style.visibility = 'visible';	   }	   else if (document.all){      if (OnDisplay != null){	            OnDisplay.style.visibility = 'hidden';	            OnDisplay = top.frames[0].document.all[LayerId];	            top.document.all[LayerId].style.visibility = 'visible';	        }	   }	   else if (document.layers){      if (OnDisplay != null){	            OnDisplay.visibility = 'hide';	            OnDisplay = eval ("document." + LayerId);	            OnDisplay.visibility = 'show';	            OnDisplay.top = LayerYPos + pageYOffset;	        }	   }}function Hide (LayerId,Action,CustomerID,Module,Data){  if (document.getElementById){    top.document.getElementById(LayerId).style.visibility = 'hidden';    }    else if (document.all){        top.document.all[LayerId].style.visibility = 'hidden';    }    else if (document.layers){      eval("top.document." + LayerId + ".visibility = 'hide'");    }}function eis(Cat,Module){   CustomerID = GetCookie('EIS.NU');   var url;   if (Module == "gfp1"){          url = 'http://www.eis.nu/cgi-bin/eis/eis.cgi?' + CustomerID + '=7&' + Cat;       }      else if (Module == "gfp2"){          url = 'http://www.eis.nu/cgi-bin/eis/eis.cgi?' + CustomerID + '=2&' + Cat;       }      else if (Module == "gfp3"){          url = 'http://www.eis.nu/cgi-bin/eis/eis.cgi?' + CustomerID + '=0';       }      else{          url = 'http://www.eis.nu/cgi-bin/eis/eis.cgi?' + CustomerID + '=' + Module + '&' + Cat;      }   if (Cat == 1234567890){     top.frames[4].location.href = url;   }   else{     window.location.href = url;   }}var mainCookie = "initCookie1234567890"; function GetCookie(name) {   var cookiecontent = 'initCookie1234567890';    if(document.cookie.length > 0) {      //alert("cookie exists: " + document.cookie);     var cookiename = name + '=';      var cookiebegin = document.cookie.indexOf(cookiename);      var cookieend = 0; //     alert("1) BEGIN: " + cookiebegin + " = END: " + cookieend);      if(cookiebegin > -1) {         cookiebegin += cookiename.length;         cookieend = document.cookie.indexOf(";", cookiebegin);                          if(cookieend < cookiebegin){            cookieend = document.cookie.length;         }        cookiecontent = document.cookie.substring(cookiebegin,cookieend);       // alert("2) BEGIN: " + cookiebegin + " = END: " + cookieend + " => " + cookiecontent);        cookiecontent = unescape(cookiecontent);      }      else{      //   alert("ELSE1");        cookiecontent = getRandomId(1000000000000000);      }    }    else{   //  alert("ELSE2");      cookiecontent = getRandomId(1000000000000000);    }       var value = parseInt(cookiecontent);       PutCookie(name,value);   //alert("SAVE: " + name + " :: " + value);   return value; } function PutCookie(n,v) {    document.cookie = n + "=" + v; } function getRandomId(indata){   return Math.floor(Math.random() * indata) + 1; }  var SessionId = 987654;var LoggedIn = 0;function checkUrl(){        if(top.location.hostname == "www.euroinfosys.se"){       top.location.href = "http://www.eis.nu";  }}function initPage(momsFlag,product){  window.frames[0].location.href = 'top.html';  window.frames[1].location.href = 'topMenu.html';  window.frames[2].location.href = 'menu/menu.html';    if (product == 'nada'){    window.frames[2].location.href = 'main.html';  }  else{    window.frames[2].location.href = 'http://www.eis.nu/cgi-bin/eis/getProdInfo.cgi?' + momsFlag + '=' + product;  }    window.frames[0].location.href = 'http://www.eis.nu/cgi-bin/eis/getCartSum.cgi?entry=';}function getPage(cat){  top.SessionId = SessionId;   url = 'http://www.eis.nu/cgi-bin/eis/makePage.cgi?' + SessionId + '=cat=' + cat;  window.frames[4].location.href = url;}function updateBillBoard(cat){  var category;    if(cat == 'init'){             category = 999;  }         else{    category = cat;  }  if (window.frames[0].frames.length == 4){    window.frames[0].frames[0].location.href = 'http://www.eis.nu/cgi-bin/eis/getBB.cgi?' + SessionId + '=1=' + category;    window.frames[0].frames[3].location.href = 'http://www.eis.nu/cgi-bin/eis/getBB.cgi?' + SessionId + '=2=' + category;  }}function cleanPricePage(){  html1 = "<html><head>\n";  html1 += "<meta name=\"AUTHOR\" content=\"www.mediable.net\">\n";  html1 += "<link href=\"http://www.eis.nu/includes/styles.css\" type=\"text/css\" rel=\"stylesheet\">\n";  html1 += "</head>\n<body bgcolor=#5e6288>\n";    html1 += "<table width=80 border=0 cellpadding=0 cellspacing=1 bgcolor=#FFFFFF bordercolor=#FFFFFF>\n";  html1 += "<tr><td nowrap class=table6>&nbsp; &nbsp;<b>Datorpaket</b></td></tr>\n";  html1 += "<tr><td class=table7><b>&nbsp;</b></td></tr>\n";    html1 += "<tr><td class=table7>&nbsp;</b></td></tr>\n";  html1 += "<tr><td class=table7>&nbsp;</b></td></tr>\n";  html1 += "<tr><td class=table7>&nbsp;</b></td></tr>\n";              html1 += "</table>\n</body>\n</html>";    window.frames[1].document.open();  window.frames[1].document.writeln(html1);  window.frames[1].document.close();}function updateCart(userId){  CustomerID = GetCookie('EIS.NU');  window.frames[0].location.href = 'http://www.eis.nu/cgi-bin/eis/getCartSum.cgi?' + CustomerID + '=';	}function updateItem(userId,artNr,q){  CustomerID = GetCookie('EIS.NU');  window.frames[0].location.href = 'http://www.eis.nu/cgi-bin/eis/eis.cgi?' + CustomerID + '=4&' + artNr + '=1';}function firstPage(){  window.frames[2].location.href = 'http://www.eis.nu/cgi-bin/eis/getFirstPage.cgi?' + SessionId + '=';}function statusPage(){  window.frames[2].location.href = 'http://www.eis.nu/cgi-bin/eis/getStatusPage.cgi?' + SessionId + '=statusPage6782937499233';}function logInOut(step){  if (top.LoggedIn){    window.frames[2].location.href = 'http://www.eis.nu/cgi-bin/eis/logMeOut.cgi?' + SessionId + '=' + step;  }  else{     window.frames[2].location.href = 'http://www.eis.nu/cgi-bin/eis/getLogInWin.cgi?' + SessionId + '=1';  }}function preCheck(){  var allOk = true;  var text = "";  data = new Array(5);  if (document.retur.name.value.length < 3){   allOk = false;   data[0] = "Artikelnamn/ben&auml;mning";  }  if (document.retur.serial.value.length < 5){   allOk = false;   data[1] = "Serienummer (minst 5 siffror)";   }  if (document.retur.invoice.value.length < 6){   allOk = false;   data[2] = "FakturaNr (fem eller sex siffror)";  }  if (document.retur.date.value.length < 8){   allOk = false;   data[3] = "Datum (&aring;tta siffror)";  }  if (document.retur.desc.value.length < 10){   allOk = false;   data[4] = "Beskrivning";  }  if (allOk){    return true;  }  else{    text += "Var god r&auml;tta till f&ouml;ljande uppgifter:\n\n";    for (i=0; i < 5; i++){     if (data[i]){       text += "* ";       text += data[i];       text += "\n";     }    }    alert(text);    return false;  }}function preCheckML(){  var allOk = true;  var text = "";  data = new Array(3);  if (document.cForm.fname.value.length < 3){   allOk = false;   data[0] = "Namn";  }  if (document.cForm.ename.value.length < 5){   allOk = false;   data[1] = "Efternamn";   }  if (document.cForm.email.value.length < 6){   allOk = false;   data[2] = "Email";  }  if (allOk){    return true;  }  else{    text += "Var god och fyll i f&ouml;ljande uppgifter:\n\n";    for (i=0; i < 3; i++){     if (data[i]){       text += "* ";       text += data[i];       text += "\n";     }    }    alert(text);    return false;  }}function inV(w,w1){  var length = 20;  if (self.document.forms[1].elements.length == 16){    length = 15;  }  if (self.document.forms[1].elements.length == 10){    length = 9;  }  if (self.first){    self.webPrice = w;    self.weight = w1;  }  w = parseInt(w * 1);	  i = 4;  while (i < length){    if ((i == 19) || ((length == 9) && (i == 8))){       listLen = self.document.forms[1].Extra.length;              j = 0;       while (j < listLen){         if (self.document.forms[1].Extra[j].selected){           vals = self.document.forms[1].Extra[j].value;           values = vals.split("#");                      w = w + parseInt(values[1]);           w1 = w1 + parseInt(values[2]);          }         j++;       }    }    else{	      vals = self.document.forms[1].elements[i].value;      values = vals.split("#");      w = w + parseInt(values[1]);      w1 = w1 + parseInt(values[2]);    }    i++;  }  fa = getPostage(w1,w);  fa = parseInt(fa * 1);  w1a = w + ":-";  w11 = w1 + "kg";  f1 = fa + " :-";  av = parseInt(w / 24);  html1 = "<html><head>\n";  html1 += "<link href=\"http://www.eis.nu/includes/styles.css\" type=\"text/css\" rel=\"stylesheet\">\n";  html1 += "</head>\n<body bgcolor=#ccccff>\n";  html1 += "<table width=80 border=0 cellpadding=0 cellspacing=1 bgcolor=#FFFFFF bordercolor=#FFFFFF>\n";  html1 += "<tr><td nowrap class=table6>&nbsp; &nbsp;<b>Datorpaket</b></td></tr>\n";  html1 += "<tr><td class=table7><b>-</b></td></tr>\n";  html1a = "<tr><td class=table7><b>";  html1b = ":-</b></td></tr>\n";  html1c = ":-/m&aring;n</b></font></td></tr>\n";                            html2 = "</table>\n";  html2 += "</body>\n</html>";  top.frames[1].document.open();  top.frames[1].document.writeln(html1);  top.frames[1].document.write(html1a);  top.frames[1].document.write(w);  top.frames[1].document.write(html1b);  top.frames[1].document.write(html1a);  top.frames[1].document.write(fa);  top.frames[1].document.write(html1b);  top.frames[1].document.write(html1a);  top.frames[1].document.write(av);  top.frames[1].document.write(html1c);      top.frames[1].document.writeln(html2);  top.frames[1].document.close();}function updateValues(){  var length = 20;  if (self.document.forms[1].elements.length == 10){    length = 9;  }  if (self.document.forms[1].elements.length == 16){    length = 15;  }  wp = parseInt(self.webPrice);  we = parseInt(self.weight);  i = 4;	  while (i < length){    if ((i == 19) || ((length == 9) && (i == 8))){       listLen = self.document.forms[1].Extra.length;              j = 0;       while (j < listLen){         if (self.document.forms[1].Extra[j].selected){           vals = self.document.forms[1].Extra[j].value;           values = vals.split("#");           wp = wp + parseInt(values[1]);           we = we + parseInt(values[2]);          }         j++;       }    }    else{      vals = self.document.forms[1].elements[i].value;      values = vals.split("#");      wp = wp + parseInt(values[1]);      we = we + parseInt(values[2]);    }    i++;  }  fa = getPostage(we,wp);    wp = parseInt(wp * 1);  fa = parseInt(fa * 1);     w1a = wp + ":-";  w11 = we + "kg";  f1 = fa + " :-";  av = parseInt(wp / 24);  html1 = "<html><head>\n";  html1 += "<link href=\"http://www.eis.nu/includes/styles.css\" type=\"text/css\" rel=\"stylesheet\">\n";  html1 += "</head>\n<body bgcolor=#ccccff>\n";  html1 += "<table width=80 border=0 cellpadding=0 cellspacing=1 bgcolor=#FFFFFF bordercolor=#FFFFFF>\n";  html1 += "<tr><td nowrap class=table6>&nbsp; &nbsp;<b>Datorpaket</b></td></tr>\n";  html1 += "<tr><td class=table7><font face=\"Verdana, Arial, Helvetica, sans-serif\" size=1><b>-</b></font></td></tr>\n";  html1a = "<tr><td class=table7><b><font face=\"Verdana, Arial, Helvetica, sans-serif\" size=1><b>";  html1b = ":-</b></font></td></tr>\n";  html1c = ":-/m&aring;n</b></font></td></tr>\n";                           html2 = "</table>\n";  html2 += "</body>\n</html>";  top.frames[1].document.open();  top.frames[1].document.writeln(html1);  top.frames[1].document.write(html1a);  top.frames[1].document.write(wp);  top.frames[1].document.write(html1b);  top.frames[1].document.write(html1a);  top.frames[1].document.write(fa);  top.frames[1].document.write(html1b);  top.frames[1].document.write(html1a);  top.frames[1].document.write(av);  top.frames[1].document.write(html1c);      top.frames[1].document.writeln(html2);  top.frames[1].document.close();}function getPostage(weight,price){    if (weight <= 3){      return 240;    }    if ((weight > 3) && (weight <= 5)){      return 260;    }    if ((weight > 5) && (weight <= 10)){      return 300;    }    if ((weight > 10) && (weight <= 15)){      return 340;    }    if ((weight > 15) && (weight <= 20)){      return 370;    }    if ((weight > 20) && (weight <= 30)){      return 450;    }    else{      return 495;    }}function search(string){  top.SessionId = SessionId;   url = 'http://www.eis.nu/cgi-bin/eis/search.cgi?user=' + SessionId + '&' + string;  window.frames[2].location.href = url;}var persistmenu="yes" var persisttype="local"if (document.getElementById){   document.write('<style type="text/css">\n')  document.write('.submenu{display: none;}\n')  document.write('.ssubmenu{display: none;}\n')  document.write('</style>\n')}function SwitchMenu(obj){  if(document.getElementById){    var elpic = document.getElementById(obj+'pic');    var el = document.getElementById(obj);    var ar = document.getElementById("masterdiv").getElementsByTagName("span");     var arpic = document.getElementById("masterdiv").getElementsByTagName("img");    if(el.style.display != "block"){      for (var i=0; i<ar.length; i++){	if (ar[i].className=="submenu") 	  ar[i].style.display = "none";      }      for (var i=0; i<arpic.length; i++){	if (arpic[i].className!=='lst') {	  if (arpic[i].className!=='ssub') 	    arpic[i].src = "menu/fold.gif";	}       }      el.style.display = "block";      if (elpic)	elpic.src = "menu/open.gif";    }else{      el.style.display = "none";      if (elpic) 	elpic.src = "menu/fold.gif";    }  }}function SwitchsubMenu(obj){  if(document.getElementById){    var selpic = document.getElementById(obj+'pic');    var sel = document.getElementById(obj);    var sar = document.getElementById("masterdiv").getElementsByTagName("span");    var sarpic = document.getElementById("masterdiv").getElementsByTagName("img");    if(sel.style.display != "block"){      for (var i=0; i<sar.length; i++){	if (sar[i].className=="ssubmenu")	  sar[i].style.display = "none";      }      for (var i=0; i<sarpic.length; i++){	if (sarpic[i].className=='ssub')	  sarpic[i].src = "menu/fold.gif";       }      sel.style.display = "block";      selpic.src = "menu/open.gif";    }else{      sel.style.display = "none";      selpic.src = "menu/fold.gif";    }  }}function get_cookie(Name) {   var search = Name + "=";  var returnvalue = "";  if (document.cookie.length > 0) {    offset = document.cookie.indexOf(search)      if (offset != -1) { 	offset += search.length	end = document.cookie.indexOf(";", offset);	if (end == -1) end = document.cookie.length;	returnvalue=unescape(document.cookie.substring(offset, end))      }  }  return returnvalue;}function onloadfunction(){  if (persistmenu=="yes"){    var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname;    var cookievalue=get_cookie(cookiename)      if (cookievalue!=""){	document.getElementById(cookievalue).style.display="block"	document.getElementById(cookievalue+'pic').src="menu/open.gif"      }  }  if (persistmenu=="yes"){    var scookiename=(persisttype=="sitewide")? "sswitchmenu" : "s"+window.location.pathname      var scookievalue=get_cookie(scookiename)      if (scookievalue!=""){	document.getElementById(scookievalue).style.display="block"	document.getElementById(scookievalue+'pic').src="menu/open.gif"      }  }}function savemenustate(){  var inc=1, blockid="";  var sinc=1, sblockid="";    while (document.getElementById("sub"+inc)){      if (document.getElementById("sub"+inc).style.display=="block"){	blockid="sub"+inc	break      }      inc++    }  while (document.getElementById("ssub"+sinc)){    if (document.getElementById("ssub"+sinc).style.display=="block"){      sblockid="ssub"+sinc	break	}    sinc++      }  var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname;  var cookievalue=(persisttype=="sitewide")? blockid+";path=/" : blockid;  document.cookie=cookiename+"="+cookievalue;  var scookiename=(persisttype=="sitewide")? "sswitchmenu" : "s"+window.location.pathname;  var scookievalue=(persisttype=="sitewide")? sblockid+";path=/" : sblockid;  document.cookie=scookiename+"="+scookievalue;}if (window.addEventListener)window.addEventListener("load", onloadfunction, false)else if (window.attachEvent)window.attachEvent("onload", onloadfunction)else if (document.getElementById)window.onload=onloadfunctionif (persistmenu=="yes" && document.getElementById)window.onunload=savemenustate