//get out of frame, if page is shown in frameif(parent.frames.length > 0) parent.location.replace(window.location.href);var g_adminPath = "";var g_mainPath = "";var g_mainAreaPath = "";var g_currentPath = "";var isPopup = false;/*var g_timeout = -1;var g_timeoutTime = 80;*/// var g_timeout = -1;var g_timeout = 1;/* var g_timeoutTime = 80; */var g_timeoutTime = 250; var g_openZoom = 0;var g_is_home = false;var g_req;var g_pageWidth = 1024; /*839;*/var g_initHome = false;var g_timeoutHide1 = 0;var g_timeoutHide2 = 0;var g_timeoutHide3 = 0;var g_timeoutHide4 = 0;var g_timeoutHead = 0;var g_currentNav1 = "";var g_currentNav2 = "";var g_currentNav3 = "";var g_currentNav4 = "";var g_currentHi1 = "";var g_currentHi2 = "";var g_currentHi3 = "";var g_currentHi4 = "";var g_blackValue = 0;var g_blackTimeout = 0;var g_navShadeMax = .35;var g_echoCount = 0;var g_is_opera = false;var g_is_ie = false;var g_is_ie5 = false;var g_is_ie5_5 = false;var g_is_safari = false;var g_is_mac = false;var g_is_gecko = false;var g_isQuirks = false;var g_contextDebug = "";var g_fallbackImage = "";window.onload = function (){    initAll();};function initAll(){	g_adminPath = backLeftStr(backLeftStr(leftStr(window.location.href, ".nsf"), "/"), "/") + "/pc_admin.nsf/";	g_mainPath = backLeftStr(leftStr(window.location.href, ".nsf"), "/") + "/pc_main.nsf/";		g_currentPath = backLeftStr(window.location.href, "/web/") + "/";	g_mainAreaPath = (window.location.href.indexOf("pc_main") == -1) ? g_mainPath : g_currentPath;		    var sClass = "";    if (document.body.className) {        sClass = document.body.className;    }    else {        sClass = document.body.getAttribute("class");    }    if (sClass != undefined) {            g_is_home = sClass.indexOf("home") >= 0;    }    else {        g_is_home = false;    }        positionFooter();        var noteConflict = false;    sniffAll();    if (document.getElementById) {        g_canHandleTransparency = !g_is_ie5;    }    else if (noteConflict) {        gotoUrl("/browser.htm");    }    if (g_is_home) {        initHome();    }   }function positionFooter(){    var footer = document.getElementById("footer");//    var search = document.getElementById("search");    //   if (!g_is_home) setDocumentSize();    if (footer) { footer.style.bottom = "-1px"; }//    if (search) { search.style.bottom = "-1px"; }}function setDocumentSize() {	var size = 350; //160 + 105 + 85;	var elm = document.getElementsByTagName("a");		if (elm) {		for (i = 0; i < elm.length; i++){			var className = elm[i].className;						switch (true) {				case containsStr(className, "navigationBelowHome"):					size += 24;				break;				case containsStr(className, "subNavigationChapter"):				case containsStr(className, "subSubNavigation"):				case containsStr(className, "subSubNavigationActive"):													size += 20; // 1 line: 16, 2 lines: 31;									break;					}		}	}			var elm = document.getElementsByTagName("div");		if (elm) {		for (i = 0; i < elm.length; i++){			if (elm[i].className == "content") {				//elm[i].style.border = "1px solid red";				elm[i].style.minHeight = size + "px";				elm[i].style.height = size + "px";				break;						}		}	}}function overHome(){    if (!g_is_safari) {        if (g_timeout != -1) { clearTimeout(g_timeout); }        showNavHomeSub();    }}function outHome(){    if (!g_is_safari) {        g_timeout = setTimeout("hideNavHomeSub()", g_timeoutTime);    }}function overNavHomeSub(){    if (g_timeout != -1) { clearTimeout(g_timeout); }}function outNavHomeSub(){    if (g_timeout != -1) { clearTimeout(g_timeout); }    g_timeout = setTimeout("hideNavHomeSub()", g_timeoutTime);}function showNavHomeSub(){    showLr("navigationHomeSub");    showLr("navigationShade");    showLr("navigationIFrame");    setBackground("navigationHome", "rgb(242,242,242)");}function hideNavHomeSub(){    hideLr("navigationHomeSub");    hideLr("navigationShade");    hideLr("navigationIFrame");        setBackground("navigationHome", "rgb(255,255,255)");}function setBackground(id, sBack){    var elm = document.getElementById(id);    elm.style.backgroundColor = sBack;}function showLr(id){    var elm = document.getElementById(id);    if (elm) {        elm.style.display = "block";    }}function hideLr(id){    var elm = document.getElementById(id);    if (elm) {        elm.style.display = "none";    }}function viewportGetHeight(){    var retval = 0;    if (window.innerHeight)        retval = window.innerHeight; // - 18;    else if (document.documentElement && document.documentElement.clientHeight)         retval = document.documentElement.clientHeight;    else if (document.body && document.body.clientHeight)         retval = document.body.clientHeight;    return retval;    }function viewportGetWidth(){    var retval = 0;    if (window.innerWidth)        retval = window.innerWidth - 18;    else if (document.documentElement && document.documentElement.clientWidth)         retval = document.documentElement.clientWidth;    else if (document.body && document.body.clientWidth)         retval = document.body.clientWidth;    return retval;    }function viewportGetScrollY(){    var retval = 0;    if (typeof window.pageYOffset == "number")        retval = window.pageYOffset;    else if (document.documentElement && document.documentElement.scrollTop)        retval = document.documentElement.scrollTop;    else if (document.body && document.body.scrollTop)         retval = document.body.scrollTop;     else if (window.scrollY)        retval = window.scrollY;    return retval;}/* Windows module */function gotoUrlIE(url){        if (g_is_ie) {        gotoUrl(url);    }}function gotoUrlNewWinSimple(s){    newWin = window.open(s, "newWin" + getRandomInt(10000));}function gotoUrlNewWin(s){    sWidth = 826;    sHeight = 610;    sWidth += 20;    sHeight += 25;    newWin = window.open(s, "newWin" + getRandomInt(10000), "width=" + sWidth + ",height=" + sHeight + ",left=40,top=40,dependent=yes,location=no,resizable=no,scrollbars=no,status=no");}function gotoUrlNewWinSize(s, sWidth, sHeight){    sWidth += 20;    sHeight += 25;    newWin = window.open(s, "newWin" + getRandomInt(10000), "width=" + sWidth + ",height=" + sHeight + ",left=40,top=40,dependent=yes,location=no,resizable=no,scrollbars=no,status=no");}function gotoUrlNewWinSizeScrollable(s, sWidth, sHeight){    sWidth += 20;    sHeight += 25;    newWin = window.open(s, "newWin" + getRandomInt(10000), "width=" + sWidth + ",height=" + sHeight + ",left=40,top=40,dependent=yes,location=no,resizable=no,scrollbars=yes,status=no");}function gotoUrlNewWinSizeCenteredScrollable(s, iWidth, iHeight, isExistingWindow){    iWidth += 20;    iHeight += 25;    iLeft = Math.round((screen.width - iWidth) / 2);    iTop = Math.round((screen.height - iHeight) / 2);    newWin = window.open(s, "newWin" + (isExistingWindow ? "" : getRandomInt(10000)), "width=" + iWidth + ",height=" + iHeight + ",left=" + iLeft + ",top=" + iTop + ",dependent=yes,location=no,resizable=no,scrollbars=yes,status=no");    newWin.focus();}function gotoUrlNewWinSizeCenteredScrollableVarHeight(s, iWidth){    //iWidth += 20;        iHeight = viewportGetHeight();			if (iHeight == 0) iHeight = 600;	else iHeight -= 100;		         iLeft = Math.round((screen.width - iWidth) / 2);    iTop = Math.round((screen.height - iHeight) / 2);          newWin = window.open(s, "newWin" + getRandomInt(10000), "width=" + iWidth + ",height=" + iHeight + ",left=" + iLeft + ",top=" + iTop + ",dependent=yes,location=no,resizable=no,scrollbars=yes,status=no");}function gotoUrlNewWinSizeScrollableWithMenu(s, sWidth, sHeight){    sWidth += 20;    sHeight += 50;    newWin = window.open(s, "newWin" + getRandomInt(10000), "width=" + sWidth + ",height=" + sHeight + ",left=40,top=40,dependent=yes,location=yes,menubar=yes,toolbar=yes,resizable=no,scrollbars=yes,status=yes");}function gotoUrlNewWinDefaultSize(s){    sWidth = 570;    sHeight = 610;    sWidth += 20;    sHeight += 25;    newWin = window.open(s, "newWin" + getRandomInt(10000), "width=" + sWidth + ",height=" + sHeight + ",left=40,top=40,dependent=yes,location=no,resizable=no,scrollbars=no,status=no");}function gotoUrlNewWinSizeCentered(s, iWidth, iHeight){    iWidth += 20;    iHeight += 25;        iLeft = Math.round((screen.width - iWidth) / 2);    iTop = Math.round((screen.height - iHeight) / 2);    newWin = window.open(s, "newWin" + getRandomInt(10000), "width=" + iWidth + ",height=" + iHeight + ",left=" + iLeft + ",top=" + iTop + ",dependent=yes,location=no,resizable=no,scrollbars=no,status=no");}function gotoUrlNewWinSizeByName(s, sWidth, sHeight, sName){    sWidth += 20;    sHeight += 25;    newWin = window.open(s, sName, "width=" + sWidth + ",height=" + sHeight + ",left=40,top=40,dependent=yes,location=no,resizable=no,scrollbars=no,status=no");}function openLeanWin(sUrl, sWidth, sHeight){    sWidth += 20;    sHeight += 25;    newWin = window.open(sUrl, "newWin" + getRandomInt(10000), "width=" + sWidth + ",height=" + sHeight + ",left=140,top=140,dependent=yes,location=no,resizable=no,scrollbars=no,status=no,menubar=no,toolbar=no");}function gotoUrlNewWinSizeCenteredScrollableResizable(s, iWidth, iHeight){    iWidth += 20;    iHeight += 25;	     iLeft = Math.round((screen.width - iWidth) / 2);    iTop = Math.round((screen.height - iHeight) / 2);    newWin = window.open(s, "newWin", "width=" + iWidth + ",height=" + iHeight + ",left=" + iLeft + ",top=" + iTop + ",dependent=yes,location=no,resizable=yes,scrollbars=yes,status=no");}function openAgentWin(sUrl){    newWin = window.open(sUrl, "newWin" + getRandomInt(10000), "width=10,height=10,left=10,top=10,dependent=yes,location=no,resizable=no,scrollbars=no,status=no,menubar=no,toolbar=no");}function getRandomInt(max){    return Math.round( Math.random() * (max-1) );}/* Home module */function initHome(){    if (document.getElementById) {        g_initHome = true;            		if (g_is_safari) {    		//	document.getElementById("homeNavigationShade").style.visibility = "hidden";    		}    }}function bannerLinkToHi(sId){    if (g_initHome)    {        var elm = document.getElementById(sId);        if (elm)        {            elm.style.color = "#c00";            elm.style.backgroundImage = "url(" + g_adminPath + "arrow-red.gif)";        }    }}function bannerLinkToLo(sId){    if (g_initHome)    {        var elm = document.getElementById(sId);        if (elm)        {            elm.style.color = "rgb(102,102,102)";            elm.style.backgroundImage = "url(" + g_adminPath + "arrow-gray.gif)";        }    }}function navShadeIn(level){    if (g_initHome)    {        if (level == 1)        {            if (g_timeoutHide1 != 0) { clearTimeout(g_timeoutHide1); }        }        else if (level == 2)        {            if (g_timeoutHide1 != 0) { clearTimeout(g_timeoutHide1); }            if (g_timeoutHide2 != 0) { clearTimeout(g_timeoutHide2); }        }        else if (level == 3)        {            if (g_timeoutHide1 != 0) { clearTimeout(g_timeoutHide1); }            if (g_timeoutHide2 != 0) { clearTimeout(g_timeoutHide2); }            if (g_timeoutHide3 != 0) { clearTimeout(g_timeoutHide3); }        }    }}function navShadeOut(level){    if (g_initHome)    {        if (level == 1)        {            g_timeoutHide1 = setTimeout("hideNav(1,\"" + g_currentNav1 + "\",\"" + g_currentHi1 + "\")", g_timeoutTime);        }        else if (level == 2)        {            g_timeoutHide1 = setTimeout("hideNav(1,\"" + g_currentNav1 + "\",\"" + g_currentHi1 + "\")", g_timeoutTime);            g_timeoutHide2 = setTimeout("hideNav(2,\"" + g_currentNav2 + "\",\"" + g_currentHi2 + "\")", g_timeoutTime);        }        else if (level == 3)        {            g_timeoutHide1 = setTimeout("hideNav(1,\"" + g_currentNav1 + "\",\"" + g_currentHi1 + "\")", g_timeoutTime);            g_timeoutHide2 = setTimeout("hideNav(2,\"" + g_currentNav2 + "\",\"" + g_currentHi2 + "\")", g_timeoutTime);            g_timeoutHide3 = setTimeout("hideNav(3,\"" + g_currentNav3 + "\",\"" + g_currentHi3 + "\")", g_timeoutTime);        }    }}function overNav(level, sName, sSelf){    if (g_initHome)    {        if (level == 0 || level == "0")        {            echo("level in 0");            if (g_timeoutHide1 != 0) { clearTimeout(g_timeoutHide1); }            hideSubLayers(g_currentNav1);            loliteLr(level, g_currentHi1);            if (g_currentNav1 != "") { hideSubLayers(g_currentNav1); }            if (g_currentHi1 != "") { loliteLr(level, g_currentHi1); }            showNav(level + 1, sName, sSelf);            g_currentNav1 = sName;            g_currentHi1 = sSelf;                    }        else if (level == 1 || level == "1")        {            echo("level in 1");            if (g_timeoutHide1 != 0) { clearTimeout(g_timeoutHide1); }            if (g_timeoutHide2 != 0) { clearTimeout(g_timeoutHide2); }            if (g_currentNav2 != "") { hideSubLayers(g_currentNav2); }            if (g_currentHi2 != "") { loliteLr(level, g_currentHi2); }            showNav(level + 1, sName, sSelf);            g_currentNav2 = sName;            g_currentHi2 = sSelf;        }        else if (level == 2 || level == "2")        {            echo("level in 2");            if (g_timeoutHide1 != 0) { clearTimeout(g_timeoutHide1); }            if (g_timeoutHide2 != 0) { clearTimeout(g_timeoutHide2); }            if (g_timeoutHide3 != 0) { clearTimeout(g_timeoutHide3); }            if (g_currentNav3 != "") { hideSubLayers(g_currentNav3); }            if (g_currentHi3 != "") { loliteLr(level, g_currentHi3); }            showNav(level + 1, sName, sSelf);            g_currentNav3 = sName;            g_currentHi3 = sSelf;                    }        else if (level == 3 || level == "3")        {            echo("level in 3");            if (g_timeoutHide1 != 0) { clearTimeout(g_timeoutHide1); }            if (g_timeoutHide2 != 0) { clearTimeout(g_timeoutHide2); }            if (g_timeoutHide3 != 0) { clearTimeout(g_timeoutHide3); }            if (g_timeoutHide4 != 0) { clearTimeout(g_timeoutHide4); }            if (g_currentNav4 != "") { hideSubLayers(g_currentNav4); }            showNav(level + 1, sName, sSelf);            g_currentNav4 = sName;        }    }}function loadImage(sName, sUrl){     var elem = document.getElementById(sName + "_image");    if (elem) elem.src = sUrl;}function outNav(level){    if (g_initHome)    {        if (level == 0 || level == "0")        {            echo("level out 0");            g_timeoutHide1 = setTimeout("hideNav(1,\"" + g_currentNav1 + "\",\"" + g_currentHi1 + "\")", g_timeoutTime);              }        else if (level == 1 || level == "1")        {            echo("level out 1");            g_timeoutHide1 = setTimeout("hideNav(1,\"" + g_currentNav1 + "\",\"" + g_currentHi1 + "\")", g_timeoutTime);            g_timeoutHide2 = setTimeout("hideNav(2,\"" + g_currentNav2 + "\",\"" + g_currentHi2 + "\")", g_timeoutTime);        }        else if (level == 2 || level == "2")        {            echo("level out 2");            g_timeoutHide1 = setTimeout("hideNav(1,\"" + g_currentNav1 + "\",\"" + g_currentHi1 + "\")", g_timeoutTime);            g_timeoutHide2 = setTimeout("hideNav(2,\"" + g_currentNav2 + "\",\"" + g_currentHi2 + "\")", g_timeoutTime);            g_timeoutHide3 = setTimeout("hideNav(3,\"" + g_currentNav3 + "\",\"" + g_currentHi3 + "\")", g_timeoutTime);        }        else if (level == 3 || level == "3")        {            echo("level out 3");            g_timeoutHide1 = setTimeout("hideNav(1,\"" + g_currentNav1 + "\",\"" + g_currentHi1 + "\")", g_timeoutTime);            g_timeoutHide2 = setTimeout("hideNav(2,\"" + g_currentNav2 + "\",\"" + g_currentHi2 + "\")", g_timeoutTime);            g_timeoutHide3 = setTimeout("hideNav(3,\"" + g_currentNav3 + "\",\"" + g_currentHi3 + "\")", g_timeoutTime);            g_timeoutHide4 = setTimeout("hideNav(4,\"" + g_currentNav4 + "\",\"" + g_currentHi4 + "\")", g_timeoutTime);        }        else        {            echo("level out is else: " + level);        }             }}function dimHeadline(doOn){             var elem = document.getElementById("homeHead");        if (elem) {        if (parseInt(elem.style.top.replace(/px/, ""),10) > 88) {                               if (doOn)                {                    elem.style.MozOpacity = ".99";                    elem.style.filter = "alpha(opacity=100)";                }                else                {                    elem.style.MozOpacity = ".40";                    elem.style.filter = "alpha(opacity=40)";                }        }    }}function showNav(level, sName, sSelf){    dimHeadline(false);    hiliteLr(level - 1, sSelf);    var foundOne = showSubLayers(sName);    if (foundOne)    {        if (g_canHandleTransparency)        {            var elm = document.getElementById("navshade" + level);            showLr("navshade" + level);        }        else        {            var elm = document.getElementById("navshadeSimple" + level);            showLr("navshadeSimple" + level);        }    }    else    {        if (g_canHandleTransparency)        {            hideLr("navshade" + level);        }        else        {            hideLr("navshadeSimple" + level);        }    }     }function hideNav(level, sName, sSelf){    if (level == 1) { g_timeoutHide1 = 0; g_currentNav1 = ""; g_currentSelf1 = ""; dimHeadline(true); }    if (level == 2) { g_timeoutHide2 = 0; g_currentNav2 = ""; g_currentSelf2 = ""; }    if (level == 3) { g_timeoutHide3 = 0; g_currentNav3 = ""; g_currentSelf3 = ""; }    if (level == 4) { g_timeoutHide4 = 0; g_currentNav4 = ""; }    loliteLr(level - 1, sSelf);    if (g_canHandleTransparency)    {        hideLr("navshade" + level);    }    else    {        hideLr("navshadeSimple" + level);    }    hideSubLayers(sName);}function hiliteLr(level, sName){    var elem = document.getElementById(sName);    if (elem)    {        if (level == 0 || level == "0")        {            elem.style.color = "rgb(204, 0, 0)";           // elem.style.backgroundColor = "rgb(255,255,255)";            elem.style.backgroundColor = "rgb(242,242,242)";            if (! (elem.className.indexOf("final") >= 0) )            {                elem.style.backgroundImage = "url(" + g_adminPath + "arrow-red.gif)";            }        }        else        {            elem.style.color = "rgb(204, 0, 0)";            if (! (elem.className.indexOf("final") >= 0) )            {                elem.style.backgroundImage = "url(" + g_adminPath + "arrow-red.gif)";            }            elem.style.MozOpacity = ".99"; // hack around weeeiiird bug which causes "1" to break NS7.02            elem.style.filter = "alpha(opacity=100)";        }    }}function loliteLr(level, sName){    var elem = document.getElementById(sName);    if (elem)    {        if (level == 0 || level == "0")        {            //elem.style.color = "rgb(255,255,255)";            elem.style.color = "rgb(51,51,51)";           // elem.style.backgroundColor = "transparent";           elem.style.backgroundColor = "rgb(255,255,255)";            if (! (elem.className.indexOf("final") >= 0) )            {               // elem.style.backgroundImage = "url(" + g_adminPath + "arrow-white.gif)";                elem.style.backgroundImage = "url(" + g_adminPath + "arrow-gray.gif)";            }        }        else        {            elem.style.color = "rgb(0, 0, 0)";            if (! (elem.className.indexOf("final") >= 0) )            {                elem.style.backgroundImage = "url(" + g_adminPath + "arrow-gray.gif)";            }            elem.style.MozOpacity = ".86";            elem.style.filter = "alpha(opacity=86)";        }    }}function showSubLayers(sName){    var i = 0;    var foundOne = false;    for (i = 1; i <= 18; i++)    {        var s = "nav_" + sName + "_" + i;        var elem = document.getElementById(s);        if (elem)        {            foundOne = true;        }        else        {            break;        }        showLr(s);    }    return foundOne;}function hideSubLayers(sName){    var i = 0;    var foundOne = false;    for (i = 1; i <= 18; i++)    {        var s = "nav_" + sName + "_" + i;        var elem = document.getElementById(s);        if (elem)        {            foundOne = true;        }        else        {            break;        }        hideLr(s);    }    return foundOne;}function echo(s){    /*    var elDebug = document.getElementById("debug");    elDebug.innerHTML = "<div><span>" + (++g_echoCount) + ".</span> " + s + "</div>" + elDebug.innerHTML;    */}function gotoUrl(s){    document.location.href = s;}function nogo(){    //}function selectAllInput(elm){    if (elm)    {        elm.focus();        elm.select();    }}function clickZoomable(id, imgWidth, imgHeight){   if (g_openZoom != 0) clickZoomed();   if (g_openZoom == 0)    {        var shadeborder = 8;        var elmShade = document.getElementById("zoomImageShade");        var elmImage = document.getElementById("zoomImage" + id);        var elmCloseButton = document.getElementById("zoomImageCloseButton");        var imgX = Math.round((g_pageWidth - imgWidth) / 2);        var imgY = Math.round((viewportGetHeight() - imgHeight) / 2  + viewportGetScrollY());        if (imgY < 0) { imgY = 0; }        // if (imgX < 0) { imgX = 0; }        elmShade.style.left = (imgX - shadeborder) + "px";        elmShade.style.width = (imgWidth + shadeborder * 2) + "px";        elmShade.style.top = (imgY - shadeborder) + "px";        elmShade.style.height = (imgHeight + shadeborder * 2) + "px";        elmImage.style.left = imgX + "px";        elmImage.style.top = imgY + "px";               elmCloseButton.style.left = (imgX + imgWidth - 18) + "px";        elmCloseButton.style.top = (imgY + 5) + "px";           elmImage.style.display = "block";        elmShade.style.display = "block";        elmCloseButton.style.display = "block";                g_openZoom = id;    }}function clickZoomed(){    hideLr("zoomImageShade");    hideLr("zoomImageCloseButton");    hideLr("zoomImage" + g_openZoom);    g_openZoom = 0;}function sniffAll(){    /* JavaScript Browser Sniffer       Eric Krok, Andy King, Michel Plungjan Jan. 31, 2002       see http://www.webreference.com/ for more information       This program is free software */    var agt=navigator.userAgent.toLowerCase();    var appVer = navigator.appVersion.toLowerCase();    var is_minor = parseFloat(appVer);    var is_major = parseInt(is_minor);    var is_opera = (agt.indexOf("opera") != -1);    /*    var is_opera6 = (agt.indexOf("opera 6") != -1 || agt.indexOf("opera/6") != -1);    var is_opera7 = (agt.indexOf("opera 7") != -1 || agt.indexOf("opera/7") != -1);    var is_opera6up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4 && !is_opera5);    var is_opera7up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4 && !is_opera5 && !is_opera6);    */    var iePos  = appVer.indexOf('msie');    if (iePos !=-1) {       is_minor = parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos)));       is_major = parseInt(is_minor);    }    var is_konq = false;    var kqPos   = agt.indexOf('konqueror');    if (kqPos !=-1) {                        is_konq  = true;       is_minor = parseFloat(agt.substring(kqPos+10,agt.indexOf(';',kqPos)));       is_major = parseInt(is_minor);    }    var is_getElementById   = (document.getElementById) ? "true" : "false";    var is_getElementsByTagName = (document.getElementsByTagName) ? "true" : "false";    var is_documentElement = (document.documentElement) ? "true" : "false";    var is_safari = ((agt.indexOf('safari')!=-1)&&(agt.indexOf('mac')!=-1))?true:false;    var is_khtml  = (is_safari || is_konq);    var is_gecko = ((!is_khtml)&&(navigator.product)&&(navigator.product.toLowerCase()=="gecko"))?true:false;    var is_gver  = 0;    if (is_gecko) is_gver=navigator.productSub;    var is_moz   = ((agt.indexOf('mozilla/5')!=-1) && (agt.indexOf('spoofer')==-1) &&                    (agt.indexOf('compatible')==-1) && (agt.indexOf('opera')==-1)  &&                    (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)     &&                    (is_gecko) &&                     ((navigator.vendor=="")||(navigator.vendor=="Mozilla")));    if (is_moz) {       var is_moz_ver = (navigator.vendorSub)?navigator.vendorSub:0;       if(!(is_moz_ver)) {           is_moz_ver = agt.indexOf('rv:');           is_moz_ver = agt.substring(is_moz_ver+3);           is_paren   = is_moz_ver.indexOf(')');           is_moz_ver = is_moz_ver.substring(0,is_paren);       }       is_minor = is_moz_ver;       is_major = parseInt(is_moz_ver);    }    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)                && (!is_khtml) && (!(is_moz)));    if ((navigator.vendor)&&        ((navigator.vendor=="Netscape6")||(navigator.vendor=="Netscape"))&&        (is_nav)) {       is_major = parseInt(navigator.vendorSub);       is_minor = parseFloat(navigator.vendorSub);    }    var is_nav2 = (is_nav && (is_major == 2));    var is_nav3 = (is_nav && (is_major == 3));    var is_nav4 = (is_nav && (is_major == 4));    var is_nav4up = (is_nav && is_minor >= 4);     var is_navonly  = (is_nav && ((agt.indexOf(";nav") != -1) ||                          (agt.indexOf("; nav") != -1)) );    var is_nav6   = (is_nav && is_major==6);    var is_nav6up = (is_nav && is_minor >= 6);    var is_nav5   = (is_nav && is_major == 5 && !is_nav6);    var is_nav5up = (is_nav && is_minor >= 5);    var is_nav7   = (is_nav && is_major == 7);    var is_nav7up = (is_nav && is_minor >= 7);    var is_ie   = ((iePos!=-1) && (!is_opera) && (!is_khtml));    var is_ie3  = (is_ie && (is_major < 4));    var is_ie4   = (is_ie && is_major == 4);    var is_ie4up = (is_ie && is_minor >= 4);    var is_ie5   = (is_ie && is_major == 5);    var is_ie5up = (is_ie && is_minor >= 5);        var is_ie5_5  = (is_ie && (agt.indexOf("msie 5.5") !=-1));    var is_ie5_5up =(is_ie && is_minor >= 5.5);        var is_ie6   = (is_ie && is_major == 6);    var is_ie6up = (is_ie && is_minor >= 6);      g_is_opera = is_opera;    g_is_ie = is_ie;    g_is_ie5 = is_ie5;    g_is_ie5_5 = is_ie5_5;    g_is_safari = is_safari;    g_is_gecko = is_gecko;        //only for some DocTypes    if(g_is_ie) g_isQuirks = true;}// String handlingfunction trim(str) { 	return str.replace(/^\s+/g, '').replace(/\s+$/g, '');}function containsStr(s, find) {	return (s.indexOf(find) != -1);}function getTextBetween(sAll, sStart, sEnd){    var sPart = "";    var posStart = sAll.indexOf(sStart);    var posEnd = sAll.indexOf(sEnd);    if (posStart >= 0 && posEnd >= 0 && posEnd > posStart) {        sPart = sAll.substring(posStart + sStart.length, posEnd);    }    return sPart;} function replStr(str,oldStr,newStr){ var strPos=str.indexOf(oldStr);  return (strPos>=0) ?    str.substring(0,strPos) + newStr +       replStr( str.substring(strPos +       oldStr.length), oldStr, newStr ) :    str}function middleStr(sAll, sStart, sEnd){    	var sPart = "";    	var posStart = sAll.indexOf(sStart);	var posEnd = sAll.indexOf(sEnd, posStart + sStart.length + 1); 	if (posStart >= 0 && posEnd >= 0 && posEnd > posStart) {     	sPart = sAll.substring(posStart + sStart.length, posEnd);    	}    	return sPart;}function rightStr(sAll, sStart){    	var sPart = "";    	var posStart = sAll.indexOf(sStart);	if (posStart >= 0) {     	sPart = sAll.substring(posStart + sStart.length, sAll.length);    	}    	return sPart;}function backRightStr(sAll, sStart){    	var sPart = "";    	var posStart = sAll.lastIndexOf(sStart);	if (posStart >= 0) {     	sPart = sAll.substring(posStart + sStart.length, sAll.length);    	}    	return sPart;}function leftStr(sAll, sStart){    	var sPart = "";    	var posEnd = sAll.indexOf(sStart);	if (posEnd >= 0) {     	sPart = sAll.substring(0, posEnd);    	}    	return sPart;}function backLeftStr(sAll, sStart){    	var sPart = "";    	      	var posEnd = sAll.lastIndexOf(sStart);	if (posEnd >= 0) {     	sPart = sAll.substring(0, posEnd);    	}    	return sPart;}function hideActions() {	var elems = getElementsByClassName("actions", "div");	for (var i = 0; i < elems.length; i++) {		elems[i].style.visibility = "hidden";	}}function submitForm() {	hideActions();	document.forms[0].submit();}//select year in events overviewfunction selectYear() {	var selYear = document.forms['selyear'].year.value;			var href = leftStr(document.location.href + "?OpenDocument", "?OpenDocument");	if(selYear == "upcoming") href += "?OpenDocument&cat=upcoming";								else if(selYear == "all") href += "?OpenDocument&cat=all";								else if(selYear == "currentyearupcoming") href += "?OpenDocument&cat=currentyearupcoming";								else href += "?OpenDocument&year=" + selYear;	document.location.href = href;						}//select catfunction selectViewCat() {	var selCat = document.forms['selcat'].cat.value;			var href = leftStr(document.location.href + "?OpenView", "?OpenView");	if(selCat == "all") href += "?OpenView";	else if(selCat == "nothing")  href += "?OpenView&nothing";	else href += "?OpenView&cat=" + selCat;								document.location.href = href;						}function selectNavigatorCat() {	var selCat = document.forms['selcat'].cat.value;			var href = leftStr(document.location.href + "?OpenNavigator", "?OpenNavigator");	if(selCat == "all") href += "?OpenNavigator";	else if(selCat == "nothing")  href += "?OpenNavigator&nothing";	else href += "?OpenNavigator&cat=" + selCat;								document.location.href = href;						}function selectCat(event) {	if (!event) event = window.event;	var eventSrc = event.target ? event.target : event.srcElement;	var field = eventSrc.name;	var value = eventSrc.value;	//alert(field + "=" + value);	var href = document.location.href;	//alert(href);	if (href.indexOf(field + "=") == -1){		if (value != "all") href += "&" + field + "=" + value;	}	else {		var curValue = middleStr(href + "&", field + "=", "&");		//alert(curValue);		if (value != "all") href = replStr(href, "&" + field + "=" + curValue, "&" + field + "=" + value);		else href = replStr(href, "&" + field + "=" + curValue, "");	}	//alert(href);	document.location.href = href;		 		 		 		 		 		 }function openHelp(language, key) {	var pos1 = window.location.href.indexOf('.nsf/');	var pos2 = window.location.href.indexOf('/', pos1 + 5);	var helpURL = (pos2 != -1) ? '../../../' : url = '../../';		helpURL += "pc_admin.nsf/Help/" + language + key + "?OpenDocument";	var windowWidth = 750;	var windowHeight = 550;	var left = (screen.width - windowWidth) / 2;	var top = (screen.height - windowHeight) / 2;	var helpWin = open(helpURL,'helpWindow','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,left=' + left + ',top=' + top+ ',width=' + windowWidth + ',height=' + windowHeight);	helpWin.focus();	}function openNews(language, key) {	var pos1 = window.location.href.indexOf('.nsf/');	var pos2 = window.location.href.indexOf('/', pos1 + 5);	var helpURL = (pos2 != -1) ? '../../../' : url = '../../';		helpURL += "pc_admin.nsf/News/" + key + "?OpenDocument";	var windowWidth = 750;	var windowHeight = 550;	var left = (screen.width - windowWidth) / 2;	var top = (screen.height - windowHeight) / 2;	var newsWin = open(helpURL,'newsWindow','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,left=' + left + ',top=' + top+ ',width=' + windowWidth + ',height=' + windowHeight);	newsWin.focus();	}// Action Areafunction showEditAdminArea() {	document.getElementById("showEditAdmin").style.visibility = "hidden";	document.getElementById("editAdminArea").style.visibility = "visible"	document.cookie = "showedit=1";}function closeEditAdminArea() {	document.getElementById("showEditAdmin").style.visibility = "visible";	document.getElementById("editAdminArea").style.visibility = "hidden"	document.cookie = "showedit=0";}function closeFailureShow() {	document.getElementById("failureShow").style.visibility = "hidden"	document.cookie = 'failure=1; expires=Thu, 01-Jan-70 00:00:01 GMT;';	document.cookie = 'labels=1; expires=Thu, 01-Jan-70 00:00:01 GMT;';}function closeSuccessShow() {	document.getElementById("successShow").style.visibility = "hidden"}	function resizeMoveWindow() {	//alert(document.images["imgend"].offsetTop);//	var windowWidth =  width + 30;//	var windowHeight = height + 130;	//alert(windowHeight);	//alert(windowHeight);	//alert(document.images["imgend"].offsetTop);		/*	if(document.images["imgend"].offsetTop) {		while(document.images["imgend"].offsetTop + 50 > windowHeight) {			windowHeight += 10;		}	}	*/	alert(window.innerWidth + " " + document.body.offsetWidth);	alert(window.innerHeight + " " + document.body.offsetHeight);		//alert(windowHeight);	var windowX = (screen.width - windowWidth) / 2;	var windowY = (screen.height - windowHeight) / 2;	window.resizeTo(windowWidth, windowHeight);	window.moveTo(windowX, windowY);	}function openLinkWindow(strUrl) {	var width = 710;	var height = 220;	var left = (screen.availWidth - width) / 2;	var top = (screen.availHeight - height) / 2;	var options = "height=" + height + ",width=" + width + ", left=" + left + ",top=" + top + ",location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no";	window.open('CopyLink?OpenForm&link=' + strUrl, "Link", options);}function openDBLinkWindow(strDB, strUrl) {	var width = 710;	var height = 220;	var left = (screen.availWidth - width) / 2;	var top = (screen.availHeight - height) / 2;	var options = "height=" + height + ",width=" + width + ", left=" + left + ",top=" + top + ",location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no";	window.open(strDB + 'CopyLink?OpenForm&link=' + strUrl, "Link", options);}function getCachePrevent(){    return "&rand=" + escape( Math.round( Math.random() * 10000 ) );}//opens wait window//is called when page is submittedvar waitWindow;function openWaitWindow() {	document.getElementsByTagName("body")[0].style.cursor = "wait";	var windowWidth = 147;	var windowHeight = 147;	var windowX;	var windowY;	if(!isPopup) {		windowX = (g_pageWidth - windowWidth) / 2;	     windowY = Math.round( (viewportGetHeight() - windowHeight)/2 ) + viewportGetScrollY();	     }     else {     	if (window.innerWidth) windowX = (window.innerWidth - windowWidth) / 2;     	else windowX = (document.body.offsetWidth - windowWidth) / 2;     	     	 //if (window.innerHeight) windowY = (window.innerHeight - windowHeight) / 2;     	//else windowY = (document.body.offsetHeight - windowHeight) / 2;         	windowY = Math.round( (viewportGetHeight() - windowHeight)/2 ) + viewportGetScrollY();	     }		if (document.getElementById("actions")) document.getElementById("actions").style.visibility = "hidden";		if (document.getElementById("actionstop")) document.getElementById("actionstop").style.visibility = "hidden";	if (document.getElementById("actionsbottom")) document.getElementById("actionsbottom").style.visibility = "hidden";		var elemWait = document.getElementById("wait");	if (elemWait) {		elemWait.style.position = "absolute";		elemWait.style.left = windowX + "px";		elemWait.style.top = windowY + "px";		elemWait.style.visibility = "visible";	}			}function buttonMouseover(id) {	if(id) {		if(document.getElementById(id)) {			document.getElementById(id).style.backgroundColor = '#FFFFFF';			document.getElementById(id).style.borderColor = '#FFFFFF';			document.getElementById(id).style.color = '#5B85AD';		}	}}function buttonMouseout(id) {	if(id) {		if(document.getElementById(id)) {			document.getElementById(id).style.backgroundColor = '#5B85AD';			document.getElementById(id).style.borderColor = '#5B85AD';			document.getElementById(id).style.color = '#FFFFFF';				}	}}function strLeft(src, delim) {	var pos = src.indexOf(delim);	return  src.substring(0, pos);}function strLeftBack(src, delim) {	var pos = src.lastIndexOf(delim);	return  src.substring(0, pos);}	function strRight(src, delim) {	var pos = src.indexOf(delim);	return  src.substring(pos + delim.length, src.length);}function strRightBack(src, delim) {	var pos = src.LastIndexOf(delim);	return  src.substring(pos + delim.length, src.length);}// F\u00FChrende und Abschlie\u00DFende Whitespaces (Leerzeichen, Tabulatoren, ...)// aus der \u00FCbergebenen Zeichenkette entfernen.function trim (src) {  // Erst f\u00FChrende, dann Abschlie\u00DFende Whitespaces entfernen  // und das Ergebnis dieser Operationen zur\u00FCckliefern  return src.replace (/^\s+/, '').replace (/\s+$/, '');}function cancel() {	history.back();}function openLegalNotice() {	var windowWidth = 750;	var windowHeight = 600;	var left = (screen.width - windowWidth) / 2;	var top = (screen.height - windowHeight) / 2;	var legalNoticePage = strLeftBack(strLeft(document.URL, ".nsf"), "/") + "/pc_main.nsf/LegalNotice?OpenPage";	var wnd = window.open(legalNoticePage, "LegalNotice", "width=" + windowWidth + ",height=" + windowHeight + ",left=" + left + ",top=" + top + ",location=no,toolbar=no,scrollbars=yes");	wnd.focus();}function openFullWindow(url) {	var window = open(url, 'window');	window.focus();}function openWindow(url) {	var params = 'location=no,menubar=no,toolbar=no,status=no';	var window = open(url, 'window', params);	window.focus();}//Opens window before leaving porsche sitevar exitWin;function openExitWin(url) {	if (exitWin && !exitWin.closed) {		exitWin.close();	}	var exitPageURL = g_mainAreaPath + "ExternalLink?OpenNavigator&url=" + url;		window.location.href = exitPageURL;}function openNewExitWin(url) {	if (exitWin && !exitWin.closed) {		exitWin.close();	}	var exitPageURL = g_mainAreaPath + "ExternalLink?OpenNavigator&url=" + url + "&sw=1";		window.open(exitPageURL, "exit");}function openPrintPage(url, width,  height) { 	if (printWin) {		printWin.close();	}	var left = (screen.availWidth - width) / 2;	var top = (screen.availHeight - height) / 2;	var printWin = window.open( url, 'print', "directories=no,location=no,menubar=no,resizable=no,status=no,scrollbars=yes,toolbar=no,width=" + width + ",height=" + height); 	printWin.focus();	printWin.print()}function openCenteredWindow(url, width,  height) {		var left = (screen.width - width) / 2;	var top = (screen.height - height) / 2;	var wnd = window.open(url, "window", "width=" + width + ",height=" + height + ",left=" + left + ",top=" + top + ",location=no,toolbar=no,scrollbars=no");	wnd.focus();}function getBrowserHeight() {	if (window.innerHeight) {		return window.innerHeight;	}	else if (document.documentElement && document.documentElement.clientHeight != 0) {		return document.documentElement.clientHeight;	}	else if (document.body) {		return document.body.clientHeight;	}		return 0;}function startSearch() {			var urlBegin = containsStr(document.location.href, "pc_main") ? 		strLeftBack(strLeftBack(document.location.href, "nsf"), ".") + ".nsf/" : 		strLeftBack(strLeftBack(document.location.href, "nsf"), "/") + "/pc_main.nsf/";	var term = encodeURIComponent(document.forms["searchform"].query.value);	var action = urlBegin + "SearchResult?OpenNavigator&search=" + term; 	document.location.href = action;	}//Flashfunction showFlashFO(url, id, video, width, height) {	var FO = {	movie:"/PorscheClubs/DevNew/pc_admin.nsf/mediaplayer.swf" ,width:width,height:height,majorversion:"7",build:"0",bgcolor:"#FFFFFF",allowfullscreen:"true",		flashvars:"file=" + video + "&image=/911_6.jpg" };	UFO.create(	FO, id);}function showFlash(url, id, width, height, version, bgcolor, playerparamstr, flashparamstr) {/* AKAMAI-HACK *//*if (url.indexOf('/') == 0){  url = 'http://files.porsche.com' + url;  if (flashparamstr.indexOf('xmlurl=/') > -1)  {    flashparamstr = flashparamstr.replace('xmlurl=/','xmlurl=http://files.porsche.com/');  }  else if (flashparamstr.indexOf('flashfolder') < 0)  {     flashparamstr += ',flashfolder=http://files.porsche.com/all/media/flash/';  }    if (flashparamstr.indexOf('basefolder') < 0)  {     flashparamstr += ',basefolder=http://files.porsche.com';  }  if (flashparamstr.indexOf('base') > 0)  {     flashparamstr = flashparamstr.replace("base=", "base=http://files.porsche.com");  }  }*/	var runShowFlash = true;		/*	if (!g_is_home) {		if (g_is_safari) {			runShowFlash = false;					}	}	*/	    if (runShowFlash) {        //var fo = new FlashObject(url, id + "_flash", width, height, version, bgcolor);		var fo = new FlashObject(url, id + "_flash", width, height, version, bgcolor, flashparamstr);                if (playerparamstr != undefined) {                var playerparams = playerparamstr.split(",");            for (var i=0; i < playerparams.length; i++ ){                var param = playerparams[i].split("=");                fo.addParam(param[0], param[1]);            }        }                if (flashparamstr != undefined) {            var flashparams = flashparamstr.split(",");            for (var i=0; i < flashparams.length; i++ ){                                   var param = flashparams[i].split("=");                fo.addVariable(param[0], param[1]);            }        }                fo.write(id);    }}function closePopupDiv(){	// IE Hack for dropdowns	//ieToggleDropDowns(getListIEDropDowns(), false);		//TODO Stop Movie	//alert("close");	document.getElementById("popupDivContent").innerHTML = "<p>&nbsp;</p>";	hideLr("popupDiv");    hideLr("popupDivShade");    g_openpopupDiv = 0;    }function showFlashVideo(videoTitle, videoTitleImg, videoUrlEnd, videoWidth, videoHeight) {	var flashParams = 'filetype=swf';				//scale by 1.2375 for galleryPlayer.swf	//videoWidth = Math.round(videoWidth * 1.2375);	//videoHeight = Math.round(videoHeight * 1.2375);		var shadeborder = 8;	 var divWidth = videoWidth + 38;	var divHeight = videoHeight + 20;	// magic numbers follow, do not try at home	//var popupWidth = divWidth;	//var popupHeight = divHeight - 36;	var shadeWidth = divWidth + 56;	var shadeHeight = divHeight + 78;	var elmShade = document.getElementById("popupDivShade");	var elmPopup = document.getElementById("popupDiv");	var elmContent = document.getElementById("popupDivContent");	var divX = Math.round( g_pageWidth / 2 - (divWidth + 38) / 2 );	var divY = Math.round( (viewportGetHeight() - divHeight)/2 ) + viewportGetScrollY();	//if (divX < 0) { divX = 0; }	if (divY < 0) { divY = 0; }		elmShade.style.left = (divX - shadeborder) + "px";	elmShade.style.top = (divY - shadeborder) + "px";	elmShade.style.width = shadeWidth + "px";	elmShade.style.height = shadeHeight + "px";	elmPopup.style.left = divX + "px";	elmPopup.style.top = divY + "px";	elmPopup.style.width = divWidth + "px";	elmPopup.style.height = divHeight + "px";	elmContent.style.width = videoWidth + "px";	elmContent.style.height = videoHeight + "px";	document.getElementById("popupDivTitle").style.width = (divWidth + 25) + "px";	document.getElementById("closeButtonPopupDiv").style.left = (divWidth +16) + "px";      //g_openpopupDiv = sUrl;		document.getElementById("popupDivTitle").innerHTML = "<img src=\"" + videoTitleImg + "\" alt=\"" + videoTitle + "\">";		elmPopup.style.display = "block";	elmShade.style.display = "block";	elmContent.style.display = "block";		var flashWidth = (videoWidth).toString();	var flashHeight = (videoHeight + 20).toString();	//var playerUrl = g_adminPath + "FlowPlayer.swf";	//var playerUrl = g_adminPath + "mediaplayer.swf";	var playerUrl = g_adminPath + "videoplayer.swf";	//var playerUrl = "/mediaplayer/galleryPlayer.swf";				var videoUrl = g_currentPath + "0/" + videoUrlEnd;	//"videourl=" + videoUrl + ",eventhandler=flashEnded," + flashParams);	showFlash(playerUrl, "popupDivContent", videoWidth, videoHeight, "7", "#FFFFFF", "loop=true,menu=true,quality=high,wmode=opaque", "id=" + videoUrl + ",eventHandler=flashEnded");	//showFlash(playerUrl, "popupDivContent", videoWidth, videoHeight, "7", "#FFFFFF", "allowfullscreen=true,loop=true,menu=true,quality=high,wmode=opaque", "videopath=" + videoUrl + ",eventHandler=flashEnded");		//showFlash(playerUrl, "popupDivContent", videoUrl, videoWidth, videoHeight);            }function flashEnded() {	/*if (g_fallbackImage != "") {		var elmContent = document.getElementById("galleryContent");		elmContent.innerHTML = "<img src=\"" + g_fallbackImage + "\" alt=\"\" id=\"galleryImage\" />";	}*/	//alert("flashEnded");}//// Function ieToggleDropDowns: //// Description: Toggles dropdown visibility in case of a dynamic layer // covering them pops up, and has a z-index higher than these. IE does not handle them correctly.//// Input: // 		strAttr: String Array, whose elements are the <DIV> id's to toggle. See function: getListIEDropDowns() //		boolHide: Boolean toggle. true, if the layer should be made visible, false otherwise.// Returns : none.function ieToggleDropDowns(strArr, boolHide) {	// collection of dropdowns		if (strArr.length > 0) {		for (i=0; i < strArr.length; i++) {			dd = document.getElementById(strArr[i]);			if (dd) 				if (boolHide) 				{					dd.style.visibility = 'hidden'				}				else				{					dd.style.visibility = 'visible';				}		}	}}//// Function getListIEDropDowns()://// Description: Builds an array of Dropdowns whose visibility should be toggled // in case of a dynamic layer covering them.// Input: none.// Returns: String array of <DIV> id's.function getListIEDropDowns() {	//return (new Array("monthDropDown"));	return null;}/* ------------------------- Social Networks ----------------------------*/function sharethis(href) {    var link = href.replace('URL', encodeURIComponent(document.location.toString()));    link = link.replace('TITEL', document.title);    window.open(link, 'share');}var activeSocialNetworks;function showSocialNetworks() {    if(!activeSocialNetworks) {		document.getElementById('sharelayer').style.visibility = "visible";    		if (document.getElementById('followlayer')) document.getElementById('followlayer').style.visibility = "visible";/*		document.getElementById('sharelayer').style.display = "block";    		document.getElementById('followlayer').style.display = "block";*/	}	else {		stopSocialNetworksClose();	}}function closeSocialNetworks() {    document.getElementById('sharelayer').style.visibility = "hidden";       if (document.getElementById('followlayer'))document.getElementById('followlayer').style.visibility = "hidden";    /*document.getElementById('sharelayer').style.display = "none";       document.getElementById('followlayer').style.display = "none";*/    activeSocialNetworks = null;}function stopSocialNetworksClose() {    if(activeSocialNetworks) clearTimeout(activeSocialNetworks);}function startSocialNetworksClose() {    var timeout = 100;    if (activeSocialNetworks) clearTimeout(activeSocialNetworks);    activeSocialNetworks = setTimeout("closeSocialNetworks()", timeout);  }function showYouTubeVideo(videoTitle, videoTitleImg, videoId) {        var videoHtml = '<object style="height: 390px; width: 640px">' + 				'<param name="movie" value="http://www.youtube.com/v/' + videoId + '?version=3&autoplay=1 ">' + 				'<param name="allowFullScreen" value="true">' + 				'<param name="allowScriptAccess" value="always">' + 				'<embed src="http://www.youtube.com/v/' + videoId + '?version=3&autoplay=1 " type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="640" height="390">' + 				'</object>';    	var videoWidth = 640;	var videoHeight = 390;            var shadeborder = 8;	    var divWidth = videoWidth + 8;    var divHeight = videoHeight + 8;    var shadeWidth = divWidth + 23;   //56;	var shadeHeight = divHeight + 69; 	var elmShade = document.getElementById("divContentShade");    var elmPopup = document.getElementById("divContent");    var elmContent = document.getElementById("divContentInnerContent");   // var elmOverlay = document.getElementById('pageoverlay');    var divX = Math.round(g_pageWidth / 2 - divWidth / 2);    var divY = Math.round((viewportGetHeight() - divHeight) / 2) + viewportGetScrollY();    if (divX < 0) { divX = 0; }    if (divY < 0) { divY = 0; }	elmShade.style.left = (divX - shadeborder) + "px";	elmShade.style.top = (divY - shadeborder) + "px";	elmShade.style.width = shadeWidth + "px";	elmShade.style.height = shadeHeight + "px";    elmPopup.style.left = divX + "px";    elmPopup.style.top = divY + "px";    elmPopup.style.width = divWidth + "px";    elmPopup.style.height = divHeight + "px";    elmContent.style.width = videoWidth + "px";    elmContent.style.height = videoHeight + "px";    document.getElementById("divContentTitle").style.width = (divWidth - 8) + "px";    document.getElementById("closeButtonDivContent").style.left = (divWidth - 16) + "px";            document.getElementById("divContentTitle").innerHTML = "<img src=\"" + videoTitleImg + "\" alt=\"" + videoTitle + "\">";	elmContent.innerHTML = videoHtml;    elmShade.style.display = "block";     elmPopup.style.display = "block";    //elmContent.style.display = "block";        }function closeExternalVideo() {	document.getElementById("divContentInnerContent").innerHTML = "&nbsp;";	document.getElementById("divContentShade").style.display = "none";     document.getElementById("divContent").style.display = "none";    //elmContent.style.display = "none";    }// Delivers an array of DOM Elements matching the input criteria// // Returns: an array of found dom elementsfunction getElementsByClassName(strClass, strTag, objContElm) {  strTag = strTag || "*";  objContElm = objContElm || document;  var objColl = (strTag == '*' && document.all && !window.opera) ? document.all : objContElm.getElementsByTagName(strTag);  var arr = new Array();  var delim = strClass.indexOf('|') != -1  ? '|' : ' ';  var arrClass = strClass.split(delim);  for (var i = 0, j = objColl.length; i < j; i++) {    var arrObjClass = objColl[i].className.split(' ');    if (delim == ' ' && arrClass.length > arrObjClass.length) continue;    var c = 0;    comparisonLoop:    for (var k = 0, l = arrObjClass.length; k < l; k++) {      for (var m = 0, n = arrClass.length; m < n; m++) {        if (arrClass[m] == arrObjClass[k]) c++;        if (( delim == '|' && c == 1) || (delim == ' ' && c == arrClass.length)) {          arr.push(objColl[i]);          break comparisonLoop;        }      }    }  }  return arr;}/*Gardine \u00FCber Seite anzeigen nichts unter Gardine ist mehr klickbar*/var gBodyOverflow;var gIsOverlayVisible = false;function showOverlay() {	if (!gIsOverlayVisible) {		var elmOverlay = document.getElementById("pageoverlay");		if (!elmOverlay) {			elmOverlay = document.createElement("div");			elmOverlay.id = "pageoverlay";		}				document.getElementsByTagName("body")[0].appendChild(elmOverlay);		//elmOverlay.style.display = "block";		elmOverlay.style.visibility = "visible";    		//elmOverlay.style.top = viewportGetScrollY();				elmOverlay.style.height = (viewportGetHeight() + viewportGetScrollY()) + "px";		//gBodyOverflow = document.getElementsByTagName("body")[0].style.overflow;		//document.getElementsByTagName("body")[0].style.overflow = "hidden";				gIsOverlayVisible = true;	}	}function hideOverlay() {	if (gIsOverlayVisible) {		//document.getElementById("pageoverlay").style.display = "none";		document.getElementById("pageoverlay").style.visibility = "hidden";  		//document.getElementsByTagName("body")[0].style.overflow = gBodyOverflow;				gIsOverlayVisible = false;	}}/* Teaserbar *//* Teaser Scroller */var g_firstVisible = 1;var g_lastVisible = 4;var g_LastTeaser = 0;var g_teaserWidth = 167 + 9;var g_xposLastVisibleTeaser = g_teaserWidth * (g_lastVisible - g_firstVisible);function setLastTeaser(){  var elem = document.getElementsByTagName("li");  if (elem)  {    var i = 0;    for (i = 0; i < elem.length; i++)    {      if (elem[i].className)      {        if (elem[i].className.indexOf("teaser") >= 0)        {          // PS4 rendert kein id Attribut          if (!elem[i].id)          {            elem[i].id = elem[i].className;          }          elem[i].style.left = (g_LastTeaser * g_teaserWidth).toString()+"px";          g_LastTeaser++;        }      }    }  }}function showHideTeaserNavbar(){    var leftNav = document.getElementById("teaserbarNavLeftLink");    if(g_firstVisible == 1)        leftNav.style.display = "none";    else        leftNav.style.display = "block";    var rightNav = document.getElementById("teaserbarNavRightLink");    if(g_lastVisible == g_LastTeaser)        rightNav.style.display = "none";    else        rightNav.style.display = "block";}function moveTeaserbar(){    var wrapper = document.getElementById("teaserBarWrapper");    if(!wrapper)        return;    var elem = document.getElementsByTagName("ul");    if(!elem)        return;    var i = 0;    for(i; i < elem.length; i++)    {        if(elem[i].className.indexOf("teaserBar") >= 0)            break;    }    var teaserBar = elem[i];    if(!teaserBar)        return;    wrapper.appendChild(teaserBar);    teaserBar.style.display = 'block';    if (g_LastTeaser == 0)    {        setLastTeaser();    }    showHideTeaserNavbar();}function scrollTeaserBar(direction){    if(!direction)        return;    if (g_LastTeaser == 0)    {        setLastTeaser();    }  var numTeasers = 4;  if(direction == 'next')  {    if(g_lastVisible < g_LastTeaser)    {      if((g_lastVisible + 4) > g_LastTeaser)      {        // weniger als 4 \u00FCbrig:        numTeasers = g_LastTeaser - g_lastVisible;      }      g_lastVisible += numTeasers;      g_firstVisible = g_lastVisible - 4 + 1;      numTeasers = -numTeasers;      scrollTeaserBarBy( numTeasers * g_teaserWidth);    }  }  else if(direction == 'previous')  {    if(g_lastVisible > 4)    {      if(g_firstVisible <= 4)      {        // weniger als  5 \u00FCbrig:        numTeasers = g_lastVisible - 4;      }      g_lastVisible -= numTeasers;      g_firstVisible = g_lastVisible - 4 + 1;      scrollTeaserBarBy( numTeasers * g_teaserWidth);    }  }}function scrollTeaserBarBy(px){    var elem = document.getElementsByTagName("ul");    if(!elem)        return;    var i = 0;    for(i; i < elem.length; i++)    {        if(elem[i].className.indexOf("teaserBar") >= 0)            break;    }    var teaserBar = elem[i];    if(!teaserBar)        return;    var step = getStep(px);    if(px < 0)    {        step = -step;        if(px < step)        {            teaserBar.style.left = (teaserBar.offsetLeft + step).toString() + "px";            px -= step;            window.setTimeout('scrollTeaserBarBy(' + px.toString() + ')', 10);        }        else        {            teaserBar.style.left = (teaserBar.offsetLeft + px).toString() + "px";            showHideTeaserNavbar();        }    }    else    {        if(px > step)        {            teaserBar.style.left = (teaserBar.offsetLeft + step).toString() + "px";            px -= step;            window.setTimeout('scrollTeaserBarBy(' + px.toString() + ')', 10);        }        else        {            teaserBar.style.left = (teaserBar.offsetLeft + px).toString() + "px";            showHideTeaserNavbar();        }    }}function getStep(px){  // abs()  if(px < 0)    px = -px;  if(px >= 300)    return 50;  if(px >= 50)    return 20;  if(px >= 15)    return 5;  return 2;}/* Teaserbar End *///debugvar showDebug = false;function getDebugDiv() {	var elem = document.getElementById("debugjs");		if (!elem) {		elem = document.createElement("div");		elem.id = "debugjs"				var elemStyle = elem.style;				elemStyle.position = "absolute";		elemStyle.top = "10px";		elemStyle.left = "10px";				elemStyle.width = "980px";		elemStyle.height = "100px";		elemStyle.padding = "3px";		elemStyle.backgroundColor = "#000000";		elemStyle.border = "1px solid #FF0000";		elemStyle.color = "#FFFFFF";		elemStyle.fontFamily = "arial, helvetica, sans-serif";		elemStyle.fontSize = "12px";				elemStyle.zIndex = "1000000";						//elemStyle.overflow = "-moz-scrollbars-vertical !important";	    	elemStyle.overflow = "auto";	    	elemStyle.overflowY = "auto";	    		    		    	elemStyle.visibility = showDebug ? "visible" : "hidden";					document.getElementsByTagName("body")[0].appendChild(elem);	}			return elem;}function debug(text) {			getDebugDiv().innerHTML = text;}function debugAppend(text) {	var elem = getDebugDiv();	elem.innerHTML += "<br />" + text;}function hideDebug() {	var elem = getDebugDiv();	elem.innerHTML = "";	elem.style.visibility = "hidden";}/* ------------------------------------------------- table sorter -----------------------------------------------*/var g_strSortTableLastCol;var g_strSortTableSortOrder;var g_arrSortTableColNr;var g_arrSortTableRowId;var g_arrSortTableCellContent;var g_arrSortTableCellStyle;var g_arrSortTableCellId;var g_arrSortTableDataType;//Formatangaben, k\u00F6nnen \u00FCberschrieben werdenvar gNumberFractionDelimiter = ".";var gDateDelimiter = ".";var gDateOrder = "dmy";var gCurrencySymbol = "\u20AC";/** * sortiert Tabelle * merkt sich letzte Spalte und letzte Sortierreihenfolge,  * wenn letzte Spalte gleich der jetzigen ist, dann Sortierreihenfolge invertieren * sonst aufsteigend * thead und tbody m\u00FCssen verwendet werden * @param {Object} tableId: String * @param {Object} columnNr: String, kann Komma-getrennte Liste sein, dann wird bei Gleichheit der einen Spalte, die n\u00E4chste verglichen * @param {Object} dataType: optional, s (String, default), n (Nummer), d (Datum) oder c (W\u00E4hrung)  */function sortTable(tableId, columnNr, dataType){       if (g_strSortTableLastCol == columnNr) {        if (g_strSortTableSortOrder == "a")             g_strSortTableSortOrder = "d"        else             g_strSortTableSortOrder = "a";    }    else {        g_strSortTableSortOrder = "a"    }    g_strSortTableLastCol = columnNr;    g_arrSortTableColNr = g_strSortTableLastCol.split(",");    g_arrSortTableDataType = (dataType ? dataType.split(",") : new Array("s"));    for (var i = 0; i < g_arrSortTableColNr.length; i++) {        //Spalten in Zahl umwandeln        g_arrSortTableColNr[i] = g_arrSortTableColNr[i] * 1;    }        var elemTable = document.getElementById(tableId);    var elemTBody = elemTable.getElementsByTagName("tbody")[0];    var tRows = elemTBody.getElementsByTagName("tr");    var tRowsCount = tRows.length;        var tColsCount = tRows[0].getElementsByTagName("td").length;        //Inhalte und Stil in Arrays schreiben    g_arrSortTableRowId = new Array(tRowsCount);        g_arrSortTableCellContent = new Array(tRowsCount);       g_arrSortTableCellStyle = new Array(tRowsCount);    g_arrSortTableCellId = new Array(tRowsCount);    for (var row = 0; row < tRowsCount; row++) {    	g_arrSortTableRowId[row] = tRows[row].id;    	        var tCols = tRows[row].getElementsByTagName("td");        g_arrSortTableCellContent[row] = new Array(tColsCount);              g_arrSortTableCellStyle[row] = new Array(tColsCount);        g_arrSortTableCellId[row] = new Array(tColsCount);        for (var col = 0; col < tColsCount; col++) {            g_arrSortTableCellContent[row][col] = tCols[col].innerHTML;                        g_arrSortTableCellStyle[row][col] = tCols[col].style.cssText;            g_arrSortTableCellId[row][col] = tCols[col].id;                       }    }        //sortieren    var temp;    for (var row1 = 0; row1 < tRowsCount - 1; row1++) {        for (var row2 = row1 + 1; row2 < tRowsCount; row2++) {                    if (!isItInRightOrder(g_arrSortTableCellContent[row1], g_arrSortTableCellContent[row2], 0)) {              	            	temp = g_arrSortTableRowId[row1];                g_arrSortTableRowId[row1] = g_arrSortTableRowId[row2];                g_arrSortTableRowId[row2] = temp;                                                  for (var col = 0; col < tColsCount; col++) {                    temp = g_arrSortTableCellContent[row1][col];                    g_arrSortTableCellContent[row1][col] = g_arrSortTableCellContent[row2][col];                    g_arrSortTableCellContent[row2][col] = temp;                                        temp = g_arrSortTableCellStyle[row1][col];                    g_arrSortTableCellStyle[row1][col] = g_arrSortTableCellStyle[row2][col];                    g_arrSortTableCellStyle[row2][col] = temp;                                        temp = g_arrSortTableCellId[row1][col];                    g_arrSortTableCellId[row1][col] = g_arrSortTableCellId[row2][col];                    g_arrSortTableCellId[row2][col] = temp;                }                            }        }    }        //sortierte Inhalte in tbody anh\u00E4ngen        var elemTBodyNew = document.createElement("tbody");    elemTable.replaceChild(elemTBodyNew, elemTBody);                for (var row = 0; row < tRowsCount; row++) {        var elemTR = document.createElement("tr");                if (row % 2 == 1)             elemTR.className = "alternate";                      if (g_arrSortTableRowId[row] && g_arrSortTableRowId[row] != "")  elemTR.id = g_arrSortTableRowId[row];                 elemTBodyNew.appendChild(elemTR);                for (var col = 0; col < tColsCount; col++) {                    var elemTD = document.createElement("td");            elemTD.innerHTML = g_arrSortTableCellContent[row][col];            if (g_arrSortTableCellStyle[row][col] && g_arrSortTableCellStyle[row][col] != "")elemTD.style.cssText = g_arrSortTableCellStyle[row][col];            if (g_arrSortTableCellId[row][col] && g_arrSortTableCellId[row][col] != "") elemTD.id = g_arrSortTableCellId[row][col];            elemTR.appendChild(elemTD);        }    }    }var oldID = "-1";// tauscht das Img in der sortier \u00DCberschrift aus - Absteigend - Aufsteigend / Bei Suchergebnissenfunction changeSortImg(strId, tableId, columnNr, dataType) {    // pr\u00FCfen ob element existiert    if(document.getElementById(strId)) {            // Andere Spalte zur\u00FCcksetzen        if (oldID != "-1" && oldID != strId) {            if(document.getElementById(oldID).src.indexOf("_down") > -1) {                document.getElementById(oldID).src = document.getElementById(oldID).src.replace(/_down/, 'able');            } else {                document.getElementById(oldID).src = document.getElementById(oldID).src.replace(/_up/, 'able');            }            document.getElementById(oldID).style.verticalAlign = "";        }                // pr\u00FCfen welches Bild gerade benutzt wird        if(document.getElementById(strId).src.indexOf('able') > -1) {             document.getElementById(strId).src = document.getElementById(strId).src.replace(/able/, '_down');            document.getElementById(strId).style.verticalAlign = "middle";        } else if(document.getElementById(strId).src.indexOf("_down") > -1) {            document.getElementById(strId).src = document.getElementById(strId).src.replace(/_down/, '_up');            document.getElementById(strId).style.verticalAlign = "middle";        } else {            document.getElementById(strId).src = document.getElementById(strId).src.replace(/_up/, '_down');            document.getElementById(strId).style.verticalAlign = "middle";        }       }    oldID = strId;    sortTable(tableId, columnNr, dataType);}/** * sind zwei Elemente in richtiger Reihenfolge * @param {Object} arrRowOne: String-Array * @param {Object} arrRowTwo: String-Array * @param {Object} columnNr: Spalte  * returns true wenn Elemente in richtiger Reihenfolge sind */function isItInRightOrder(arrRowOne, arrRowTwo, columnIndex) {        var columnNr = g_arrSortTableColNr[columnIndex];        var one = arrRowOne[columnNr];        var two = arrRowTwo[columnNr];    one = one.toLowerCase();    two = two.toLowerCase();      var dataType = (columnIndex < g_arrSortTableDataType.length) ? g_arrSortTableDataType[columnIndex] : "s";    var sortOrder = (columnIndex < 1) ? g_strSortTableSortOrder : "a";        var content1;    if (one.indexOf("<a ") > -1) content1 = getTextBetween(one, ">", "</a>");    else if (one.indexOf("<span ") > -1) content1 = getTextBetween(one, ">", "</span>");    else if (one.indexOf("<label ") > -1) content1 = getTextBetween(one, ">", "</label>");    else content1 = one;        var content2;    if (two.indexOf("<a ") > -1) content2 = getTextBetween(two, ">", "</a>");    else if (two.indexOf("<label ") > -1) content2 = getTextBetween(two, ">", "</label>");    else content2 = two;        if (dataType == "n") {        //In Zahl konvertieren        content1 = toNumberFormat(content1)        content2 = toNumberFormat(content2);    }    else if (dataType == "d") {        //In Datum konvertieren        content1 = toDateFormat(content1)        content2 = toDateFormat(content2);    }     else if (dataType == "c") {        //In Zahl ohne W\u00E4hrungssymbol konvertieren        content1 = toCurrencyFormat(content1)        content2 = toCurrencyFormat(content2);    }             var isInRightOrder;    if (sortOrder == "d") {        if (content1 > content2) {            isInRightOrder = true;        }        else if (content1 < content2) {            isInRightOrder = false;        }        else {            //gleich            if (columnIndex < g_arrSortTableColNr.length - 1) {                //n\u00E4chste Spalte vergleichen                isInRightOrder = isItInRightOrder(arrRowOne, arrRowTwo, columnIndex + 1);            }            else {                isInRightOrder = true;            }              }    }    else {        //sortOrder == "a"        if (content1 < content2) {            isInRightOrder = true;        }        else if (content1 > content2) {          isInRightOrder = false;        }        else {             //gleich             if (columnIndex < g_arrSortTableColNr.length - 1) {               //n\u00E4chste Spalte vergleichen               isInRightOrder = isItInRightOrder(arrRowOne, arrRowTwo, columnIndex + 1);             }             else {                isInRightOrder = true;             }                  }    }    return isInRightOrder;    }/** * String in Nummer umwandeln, ersetzt wenn notwendig . und , * @param {Object} strNumber: Nummer als String  * returns Zahl in Javascript Nummerformat */function toNumberFormat(strNumber) {    if (strNumber == "") {        return 0;    }    else {        if (gNumberFractionDelimiter == ",") {              strNumber = replStr(strNumber, ".", "#$.#$");            strNumber = replStr(strNumber, ",", "#$,#$");            strNumber = replStr(strNumber, "#$.#$", "");            strNumber = replStr(strNumber, "#$,#$", ".");        }        else {            strNumber = replStr(strNumber, ",", "");        }        if (isNaN(strNumber)) return 0;        else return strNumber * 1;          }}/** * String in Datum umwandeln, abh\u00E4ngig von Datumsformat und Trenner, * @param {Object} strDateTime: Datum als String, kann mit oder ohne Zeit sein  * returns Datum in Javascript Datumsformat */function toDateFormat(strDateTime) {	var strDate;	var strTime;	var theDateTime = new Date(0);	var strYear, strMonth, strDay, strHour, strMinute, strSecond;	var iYear, iMonth, iDay, iHour, iMinute, iSecond;		    if (strDateTime != "") {            	var pos = strDateTime.indexOf(" ");     	if (pos > 0) {    		//Datum und Zeit    		strDate = strDateTime.substring(0, pos);    		strTime = strDateTime.substring(pos + 1, strDateTime.length);    	}    	else {    		//nur Datum    		strDate = strDateTime;    	}            	var tokens = strDate.split(gDateDelimiter);		if(tokens.length >= 3) {				if(!(isNaN(tokens[0]) || isNaN(tokens[1]) || isNaN(tokens[2]))) {				if(gDateOrder == "ymd") {					strYear = tokens[0];					strMonth = tokens[1];					strDay = tokens[2];				}				else if(gDateOrder == "mdy") {					strYear = tokens[2];					strMonth = tokens[0];					strDay = tokens[1];				}				else { //gDateOrder == "dmy"					strYear = tokens[2];					strMonth = tokens[1];					strDay = tokens[0];				}				iYear = Number(strYear);				iMonth = Number(strMonth) - 1;				iDay = Number(strDay);													if (strTime == ""){											theDateTime = new Date(iYear, iMonth, iDay);				}				else {					tokens = strTime.split(":");					if(tokens.length < 2) theDateTime = new Date(iYear, iMonth, iDay);					else {							if(isNaN(tokens[0]) || isNaN(tokens[1])) theDateTime = new Date(iYear, iMonth, iDay);						else {							strHour = tokens[0];							strMinute = tokens[1];							if (tokens.length == 3) strSecond = tokens[2];							else strSecond = "0";														iHour = Number(strHour);							iMinute = Number(strMinute);							iSecond = Number(strSecond);																					theDateTime = new Date(iYear, iMonth, iDay, iHour, iMinute, iSecond);													}					}				}												}		}   		}	return theDateTime;}/** * String in Nummer ohne W\u00E4hrunggsymbol umwandeln, ersetzt wenn notwendig . und , * @param {Object} strAmount: Betrag als String  * returns Zahl in Javascript Nummerformat */function toCurrencyFormat(strAmount) {	var iAmountWithoutCurrencySymbol = 0;    if (strAmount != "") {      	var pos = strAmount.indexOf(gCurrencySymbol);        	if (pos == -1) {    		//kein W\u00E4hrungssymbol    		iAmountWithoutCurrencySymbol = toNumberFormat(strAmount);    	}    	else if(pos == 0) {    		//W\u00E4hrungssymbol am Anfang    		iAmountWithoutCurrencySymbol = toNumberFormat(trim(strAmount.substring(1, strAmount.length)));    		    	}    	else {    		//W\u00E4hrungssymbol am Ende    		     		iAmountWithoutCurrencySymbol = toNumberFormat(trim(strAmount.substring(0, pos)));      	}           }    return iAmountWithoutCurrencySymbol;}/* ------------------------------------------------- table sorter -----------------------------------------------*/
