﻿areaId = 0;
//AreaId is set in master template

var translations = new Array();
//Dansk
translations[11] = new Array();
translations[11][0] = "Søg";
translations[11][1] = "11325"; //Den side søg-formen linker til efter submit
translations[11][2] = "Se relaterede varer";
translations[11][3] = ""; //Fakta overskriften til Showroom produkter
translations[11][4] = "Se detaljer";
translations[11][5] = "Links";
translations[11][6] = "Relaterede links";
translations[11][7] = "Kategorier";
translations[11][8] = "GROUP42"; //TilbehørsGruppen
translations[11][9] = "11389"; //Tilbehørssiden
translations[11][8] = "Forrige produkt"; //Pil tilbage produkt
translations[11][9] = "Næste produkt"; //Pil frem produkt
translations[11][10] = "24723"; //Markedspladsens afsnitsid
translations[11][11] = "11408"; //Markedspladsens sideid
translations[11][12] = "Før"; //Henviser til førpris i markedspladsen
translations[11][13] = "Nu"; //Henviser til nupris i markedspladsen
translations[11][14] = "kr. "; //Henviser til møntfoden i markedspladsen
translations[11][15] = "<a href='{1}'>Kontakt {0} for nærmere information</a>"; //Henviser til møntfoden i markedspladsen
translations[11][16] = "."; //Tusindeseperator
translations[11][17] = ","; //Decimalseperator
translations[11][18] = "Bordplader"; //Overskrift til tilbehørsmenuen
translations[11][19] = "Se detaljebillede"; // Showroom alt tekst
translations[11][20] = "Modeller"; //Overskrift til produktmenu
translations[11][21] = "11279"; //ID på forsiden
translations[11][22] = "http://viewer.zmags.com/showmag.php?magid=79361"; //Tilbehørs Zmag ID
translations[11][23] = "Se mere i vores tilbehørskatalog"; //Tilbehørskatalog link tekst
translations[11][24] = "Trends"; //Overskrift til produktmenu

//Engelsk
translations[13] = new Array();
translations[13][0] = "Search";
translations[13][1] = "11567"; //Den side søg-formen linker til efter submit
translations[13][2] = "See related products";
translations[13][3] = ""; //Fakta overskriften til Showroom produkter
translations[13][4] = "See details";
translations[13][5] = "Links";
translations[13][6] = "Related links";
translations[13][7] = "Categories";
translations[13][8] = "GROUP42"; //TilbehørsGruppen
translations[13][9] = "11478"; //Tilbehørssiden
translations[13][8] = "Previous product"; //Pil tilbage produkt
translations[13][9] = "Next product"; //Pil frem produkt
translations[13][10] = "26152"; //Markedspladsens afsnitsid
translations[13][11] = "11538"; //Markedspladsens sideid
translations[13][12] = "Before"; //Henviser til førpris i markedspladsen
translations[13][13] = "Now"; //Henviser til nupris i markedspladsen
translations[13][14] = "kr. "; //Henviser til møntfoden i markedspladsen
translations[13][15] = "<a href='{1}'>Contact {0} for more information</a>"; //Henviser til møntfoden i markedspladsen
translations[13][16] = "."; //Tusindeseperator
translations[13][17] = ","; //Decimalseperator
translations[13][18] = "Tabletops"; //Overskrift til tilbehørsmenuen
translations[13][19] = "See detailpicture"; // Showroom alt tekst
translations[13][20] = "Models"; //Overskrift til produktmenu
translations[13][21] = "11473"; //ID på forsiden
translations[13][22] = ""; //Tilbehørs Zmag ID
translations[13][23] = "See more in our accessories catalogue"; //Tilbehørskatalog link tekst
translations[13][24] = "Trends"; //Overskrift til produktmenu

//Norsk
translations[14] = new Array();
translations[14][0] = "Søk";
translations[14][1] = "11674"; //Den side søg-formen linker til efter submit
translations[14][2] = "Se relaterte varer";
translations[14][3] = ""; //Fakta overskriften til Showroom produkter
translations[14][4] = "Se detaljer";
translations[14][5] = "Links";
translations[14][6] = "Relaterede links";
translations[14][7] = "Kategorier";
translations[14][8] = "GROUP42"; //TilbehørsGruppen
translations[14][9] = "11389"; //Tilbehørssiden
translations[14][8] = "Forrige produkt"; //Pil tilbage produkt
translations[14][9] = "Neste produkt"; //Pil frem produkt
translations[14][10] = "24723"; //Markedspladsens afsnitsid
translations[14][11] = "11408"; //Markedspladsens sideid
translations[14][12] = "Før"; //Henviser til førpris i markedspladsen
translations[14][13] = "Nu"; //Henviser til nupris i markedspladsen
translations[14][14] = "kr. "; //Henviser til møntfoden i markedspladsen
translations[14][15] = "<a href='{1}'>Kontakt {0} for nærmere information</a>"; //Henviser til møntfoden i markedspladsen
translations[14][16] = "."; //Tusindeseperator
translations[14][17] = ","; //Decimalseperator
translations[14][18] = "Bordplader"; //Overskrift til tilbehørsmenuen
translations[14][19] = "Se bilde med detaljene"; // Showroom alt tekst
translations[14][20] = "Modeller"; //Overskrift til produktmenu
translations[14][21] = "11580"; //ID på forsiden
translations[14][22] = "http://viewer.zmags.com/showmag.php?magid=107714"; //Tilbehørs Zmag ID
translations[14][23] = "Se mere i våres tilbehørskatalog"; //Tilbehørskatalog link tekst
translations[14][24] = "Trends"; //Overskrift til produktmenu

//Svensk
translations[15] = new Array();
translations[15][0] = "Sök";
translations[15][1] = "11781"; //Den side søg-formen linker til efter submit
translations[15][2] = "Se relaterade produkter";
translations[15][3] = ""; //Fakta overskriften til Showroom produkter
translations[15][4] = "Se detaljerad bild";
translations[15][5] = "Links";
translations[15][6] = "Relaterede links";
translations[15][7] = "Kategorier";
translations[15][8] = "GROUP42"; //TilbehørsGruppen
translations[15][9] = "11389"; //Tilbehørssiden
translations[15][8] = "Föregående vara"; //Pil tilbage produkt
translations[15][9] = "Nästa vara"; //Pil frem produkt
translations[15][10] = "24723"; //Markedspladsens afsnitsid
translations[15][11] = "11408"; //Markedspladsens sideid
translations[15][12] = "Før"; //Henviser til førpris i markedspladsen
translations[15][13] = "Nu"; //Henviser til nupris i markedspladsen
translations[15][14] = "kr. "; //Henviser til møntfoden i markedspladsen
translations[15][15] = "<a href='{1}'>Kontakt {0} for nærmere information</a>"; //Henviser til møntfoden i markedspladsen
translations[15][16] = "."; //Tusindeseperator
translations[15][17] = ","; //Decimalseperator
translations[15][18] = "Bordplader"; //Overskrift til tilbehørsmenuen
translations[15][19] = "Se detaljebillede"; // Showroom alt tekst
translations[15][20] = "Modeller"; //Overskrift til produktmenu
translations[15][21] = "11687"; //ID på forsiden
translations[15][22] = "http://viewer.zmags.com/showmag.php?mid=wqffrq"; //Tilbehørs Zmag link
translations[15][23] = "Se mer i vår tillbehörskatalog"; //Tilbehørskatalog link tekst
translations[15][24] = "Trends"; //Overskrift til produktmenu

function TranslationText(index) {
  return translations[areaId][index];
}

// Giver dig en parameter fra urlen
function getURLParam(strParamName) {
  return getParameterFromLink(strParamName, window.location.href);
}

// Giver dig en parameter fra et link
function getParameterFromLink(strParamName, link) {
  var strReturn = "";
  var strHref = link;
  if (strHref.indexOf("?") > -1) {
    var strQueryString = strHref.substr(strHref.indexOf("?")).toLowerCase();
    var aQueryString = strQueryString.split("&");
    for (var iParam = 0; iParam < aQueryString.length; iParam++) {
      if (aQueryString[iParam].indexOf(strParamName.toLowerCase() + "=") > -1) {
        var aParam = aQueryString[iParam].split("=");
        strReturn = aParam[1];
        break;
      }
    }
  }
  return unescape(strReturn);
}

// Sleep thread
function Sleep(naptime) {
  naptime = naptime;
  var sleeping = true;
  var now = new Date();
  var alarm;
  var startingMSeconds = now.getTime();
  while (sleeping) {
    alarm = new Date();
    alarmMSeconds = alarm.getTime();
    if (alarmMSeconds - startingMSeconds > naptime) { sleeping = false; }
  }
}

//Sæt panelets egenskaber
function setPanelProperties(pHeader, pID, sID, lastPID, panelBG) {
  if (document.getElementById("panel" + lastPID)) {
    //Setup'en gælder et almindeligt panel


    //panelElement = document.getElementById("panel" + lastPID);
    //document.getElementById("panel").
    //alert(panelElement + " : " + panelElement.parentNode.childNodes.length );

    //if(panelElement.parentNode.id == "")
    //panelElement.parentElement.style.overflow = "visible";


    //Sætte teaseren
    //Teaseren er teksten under det klikbare område på panelerne
    headerTextDiv = document.getElementById("HeaderText" + lastPID);
    if (teaser && teaser != "") {
      //Teaseren er blevet sat af et indeholdt modul
      headerTextDiv.innerHTML = teaser;
      teaser = "";
    } else {
      //Ingen teaser er valgt og vi skal benytte Setuppens tekst eller modul til at bestemme teaseren
      headerTextDiv.innerHTML = document.getElementById("headerText" + pID).innerHTML;
    }

    try {
      //Her prøver vi at sætte bredden med Paragraphheaderen, som gerne skulle indeholde et tal.
      panelWidth = parseInt(pHeader);
      if (panelWidth.toString() == "NaN")
        throw ("NaN");
      document.getElementById("panel" + lastPID).style.width = (panelWidth + 116) + "px";
      document.getElementById("panelContent" + lastPID).style.width = panelWidth + "px";
      document.getElementById("panelHeader" + lastPID).style.width = panelWidth + "px";
    } catch (ex) {
      //Hvis ingen bredde er til stede i Paragraphheaderen sættes bredden til panelContent's bredde
      panelWidth = document.getElementById("panelContent" + lastPID).style.width.replace("px", "");
    }
  } else {
    //Setup'en gælder en baggrund og der skal blot sættes en bredde
    try {
      panelWidth = parseInt(pHeader);
      if (panelWidth.toString() == "NaN")
        throw ("NaN");
      document.getElementById("startContent" + lastPID).style.width = panelWidth + "px";
      document.getElementById("startHeader" + lastPID).style.width = (panelWidth - 60) + "px";
    } catch (ex) {
      panelWidth = document.getElementById("startContent" + lastPID).style.width.replace("px", "");
    }
  }

  try {
    //Bredden på scrollbaren sættes
    scrollToCheck = sID - 1;
    if (!scrollsSet[scrollToCheck]) {
      arrScroll["scroll_" + scrollToCheck]["width"] = panelWidth - 33;
      scrollsSet[scrollToCheck] = true;
    }
  } catch (ex) {
  }

  //Sæt baggrunden hvis der findes en
  if (panelBG != "" && panelBG.indexOf("<!-") < 0) {
    if (document.getElementById("panelContent" + lastPID))
      document.getElementById("panelContent" + lastPID).style.backgroundImage = "url(" + panelBG + ")";
    if (document.getElementById("shiftingImage"))
      document.getElementById("shiftingImage").style.backgroundImage = "url(" + panelBG + ")";

    //Nulstil panelbaggrundsvariablen
    panelBackground = "";
  }
}

//Indsæt en flash i stedet for andet indhold
function setFlash() {
  if (panelFlashBackground != "" && document.getElementById("panelFlash" + lastParagraphId)) {
    height = "100%";
    width = "100%";
    align = "middle";
    name = "flash";
    link = panelFlashBackground + panelFlashParameter;
    var flash = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"'
                + ' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"'
                + ' width="' + width + '" height="' + height + '" id="' + name + '" align="' + align + '">'
                + '<param name="allowScriptAccess" value="always" />'
                + '<param name="movie" value="' + link + '" />'
                + '<param name="wmode" value="transparent" />'
                + '<param name="quality" value="high" />'
                + '<param name="bgcolor" value="#ffffff" />'
                + '<param name="scale" value="noscale" />'
                + '<embed src="' + link + '"'
                + ' quality="high" bgcolor="#fff" scale="noscale" width="' + width + '" height="' + height + '" name="' + name + '" align="' + align + '" wmode="transparent" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';
    document.getElementById("panelFlash" + lastParagraphId).innerHTML = flash;

    lastScrollID = scrollID - 1;
    if (document.getElementById("scrollHolder_" + (lastScrollID)))
      document.getElementById("scrollHolder_" + (lastScrollID)).style.display = "none";

    arrScroll["scroll_" + lastScrollID] = null;

    //if(document.getElementById("startContent" + (lastParagraphId)))
    //    document.getElementById("startContent" + (lastParagraphId)).style.zIndex = 0;
    //if(document.getElementById("panelFlash" + (lastParagraphId)))
    //    document.getElementById("panelFlash" + (lastParagraphId)).style.zIndex = 0;

    panelFlashBackground = "";
    panelFlashParameter = "";
  } else {
    
    if (panelFlashParameter != "")
      panelFlashParameter = "";
    if (document.getElementById("panelFlash" + lastParagraphId))
      document.getElementById("panelFlash" + lastParagraphId).style.display = "none";
  }
}

//Hvis der er en nyhed kan vi lægge nyhedens bund header og bund text til bundens text i stedet.
function setModuleTexts() {
  if (lastNewsID > 0 && !bottomHeaderUsed) {
    headerForBottom = document.getElementById("headerForBottom" + lastNewsID).innerHTML;
    textForBottom = document.getElementById("textForBottom" + lastNewsID).innerHTML;
    if (headerForBottom != "" && document.getElementById("panelHeaderH1" + lastParagraphId))
      document.getElementById("panelHeaderH1" + lastParagraphId).innerHTML = headerForBottom;
    if (headerForBottom != "" && document.getElementById("panelHeaderText" + lastParagraphId))
      document.getElementById("panelHeaderText" + lastParagraphId).innerHTML = textForBottom;
    bottomHeaderUsed = true;
  }
}


function changeSmallImage(image, newId) {
  lastImageSrcTmp = image.src;
  lastShiftId = image.id.replace("detail", "");
  image.id = "detail" + newId;
  image.src = lastImageSrc;
  lastImageSrc = lastImageSrcTmp;
}

runningId = 0;
stopId = 0;
//Changes the opacity for the object with the chosen id
function opacity(id, opacStart, opacEnd, millisec, showElement) {
  //speed for each frame 
  var speed = Math.round(millisec / 100);
  var timer = 0;


  //determine the direction for the blending, if start and end are the same nothing happens 
  if (opacStart > opacEnd) {
    for (i = opacStart; i >= opacEnd; i--) {
      setTimeout("changeOpac(" + i + ",'" + id + "')", (timer * speed));
      timer++;
    }
  } else if (opacStart < opacEnd) {
    for (i = opacStart; i <= opacEnd; i++) {
      setTimeout("changeOpac(" + i + ",'" + id + "')", (timer * speed));
      timer++;
    }
  }
}

//change the opacity for different browsers 
function changeOpac(opacity, id) {
  var object = document.getElementById(id).style;
  object.opacity = (opacity / 100);
  object.MozOpacity = (opacity / 100);
  object.KhtmlOpacity = (opacity / 100);
  object.filter = "alpha(opacity=" + opacity + ")";
}

function docWriter(text) {
  document.write(text);
}


//En ekstra format funktion til String objektet
//Kan bruges med parametre
String.format = function(text) {
  //check if there are two arguments in the arguments list
  if (arguments.length <= 1) {
    //if there are not 2 or more arguments there's nothing to replace
    //just return the original text
    return text;
  }
  //decrement to move to the second argument in the array
  var tokenCount = arguments.length - 2;
  for (var token = 0; token <= tokenCount; token++) {
    //iterate through the tokens and replace their placeholders from the original text in order
    text = text.replace(new RegExp("\\{" + token + "\\}", "gi"), arguments[token + 1]);
  }
  return text;
};

function formatCurrency(num) {
  num = num.toString().replace(/\$|\,/g, '');
  if (isNaN(num))
    num = "0";

  sign = (num == (num = Math.abs(num)));
  num = Math.floor(num * 100 + 0.50000000001);
  cents = num % 100;
  num = Math.floor(num / 100).toString();
  if (cents < 10)
    cents = "0" + cents;

  for (var i = 0; i < Math.floor((num.length - (1 + i)) / 3); i++)
    num = num.substring(0, num.length - (4 * i + 3)) + TranslationText(16) +

	    num.substring(num.length - (4 * i + 3));
  return (((sign) ? '' : '-') + TranslationText(14) + num + TranslationText(17) + cents);
}


//Indsæt en flash i stedet for andet indhold
function setFlashNy() {
  if (panelFlashBackground != "" && document.getElementById("panelFlash" + lastParagraphId)) {
    height = "100%";
    width = "100%";
    align = "middle";
    name = "flash";
    link = panelFlashBackground + panelFlashParameter;
    var flash = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"'
                + ' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"'
                + ' width="' + width + '" height="' + height + '" id="' + name + '" align="' + align + '">'
                + '<param name="allowScriptAccess" value="always" />'
                + '<param name="movie" value="' + link + '" />'
                + '<param name="wmode" value="transparent" />'
                + '<param name="quality" value="high" />'
                + '<param name="bgcolor" value="#ffffff" />'
                + '<param name="scale" value="noscale" />'
                + '<embed src="' + link + '"'
                + ' quality="high" bgcolor="#fff" scale="noscale" width="' + width + '" height="' + height + '" name="' + name + '" align="' + align + '" wmode="transparent" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';
    document.getElementById("panelFlash" + lastParagraphId).innerHTML = flash;

    lastScrollID = scrollID - 1;
    if (document.getElementById("scrollHolder_" + (lastScrollID)))
      document.getElementById("scrollHolder_" + (lastScrollID)).style.display = "none";

    arrScroll["scroll_" + lastScrollID] = null;

    //if(document.getElementById("startContent" + (lastParagraphId)))
    //    document.getElementById("startContent" + (lastParagraphId)).style.zIndex = 0;
    //if(document.getElementById("panelFlash" + (lastParagraphId)))
    //    document.getElementById("panelFlash" + (lastParagraphId)).style.zIndex = 0;

    panelFlashBackground = "";
    panelFlashParameter = "";
  } else {
    
    if (panelFlashParameter != "")
      panelFlashParameter = "";
    if (document.getElementById("panelFlash" + lastParagraphId))
      document.getElementById("panelFlash" + lastParagraphId).style.display = "none";
  }
}



/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;



window.onload = function() {
  initBanners();
}


function initBanners() {
  var settings = {
    globalShowTime: 5000,
    bannerSelector: ".NyForsideBudskab",
    shiftStyle: "fade",
    fadefrontColor: "#ffffff",
    shiftSpeed: 3000,
    resizeSpeed: 500
  }

  jQuery("#NyForsideBudskaber").startBannerShift(settings);

  jQuery("NyForsideBudskaber").each(function() {
    jQuery(this).startBannerShift(settings);
  });
}
