/************************************//* Erweiterung f\u00FCr JD Power 2008/03 *//* -> Mouseovers konfiguriertbar    *//* -> hl = "hilite"                 *//* -> ll = "lolite"                 *//************************************/var g_homemenu_hl_fontcolor = "rgb(204, 0, 0)";var g_homemenu_hl_background_color = "rgb(255,255,255)";var g_homemenu_hl_background_color_Level5 = "rgb(255,255,255)";var g_homemenu_ll_fontcolor_level0 = "rgb(255,255,255)";var g_homemenu_ll_fontcolor_level1 = "rgb(0, 0, 0)";var g_homemenu_ll_background_color = "transparent";var g_homemenu_ll_background_image_level0 = "url(../arrow-white.gif)";var g_homemenu_ll_background_image_level1 = "url(../arrow-gray.gif)";var g_jdpowerphase = "none";var g_kabseLinkCurrentPosition = -1; // STV, 2007.10.25: f\u00FCr vor/zur\u00FCck im KBaseLayervar g_refresh = false;var g_timeout = -1;var g_timeoutTime = 80;var g_openZoom = 0;var g_imageNr = 1;var g_req;var g_is_home = false;var g_pageWidth = 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_MAXSUBLAYERS = 16;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_macmoz = false; // mozilla on mac has flash problems on the homepage.var g_is_mac = false;var g_is_linux = false;var g_contextDebug = "";var g_fallbackImage = "";var g_newWinFocus;/****************************************///global control variables for flash homepage.// turns flash on homepage on/off globally.var g_useFlashHomepage;// load flash hp configuration in the following xml object; var g_xmlFlashHPConfig;// also, copy the [pool].jpg into the fallback images directory.var g_flashHPFallbackOverride;/****************************************/var g_openDivPage = "";var g_openDivContent = "";window.onload = function (){    initAll();};function initAll(){    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") >= 1; changed        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();    }   //initATPBar();}function initATPBar() {	var atpBar = document.getElementById("atpBar");	var atpWrapper = document.getElementById("atpWrapper");	if (atpBar && atpWrapper) {		//atpWrapper.appendChild(atpBar);		//atpWrapper.replaceChild(atpBar, atpWrapper.firstChild);		atpWrapper.replaceChild(atpBar, document.getElementById("atpBarInitial"));						atpBar.style.visibility = "visible";		atpBar.style.display = "block";		atpBar.style.height = "29px";    /*"52px";*/						/*		$('atpBar').inject($('atpWrapper'), 'top');		var atpBarFx = new Fx.Morph($('atpBar'), {			duration: 800,			transition: Fx.Transitions.Sine.easeOut		});		atpBarFx.set({			'opacity': 0		});    		atpBarFx.start({        		'opacity': 1,        		'display': 'block',        		'height': '52px'    		});*/			}}function sendRequest(url,callback,postData) {	var req = createXMLHTTPObject();	if (!req) return;	var method = (postData) ? "POST" : "GET";	req.open(method,url,true);	//req.setRequestHeader('User-Agent','XMLHTTP/1.0');	if (postData)		req.setRequestHeader('Content-type','application/x-www-form-urlencoded');			req.onreadystatechange = function () {		if (req.readyState != 4) return;		if (req.status != 200 && req.status != 304) {//			alert('HTTP error ' + req.status);			return;		}		if(callback)		    callback(req);	}	if (req.readyState == 4) return;	if (postData) 		req.send(postData);	else 		req.send(null);}function flashHP_getFlashHPConf(){	var req = createXMLHTTPObject();	if (!req) return;		req.open("GET","/all/media/flash/videos/homepage/settings.xml",true);	//req.setRequestHeader('User-Agent','XMLHTTP/1.0');	req.onreadystatechange = function () {		if (req.readyState != 4) return;		if (req.status != 200 && req.status != 304) {			//alert('HTTP error ' + req.status);			return;		}				g_xmlFlashHPConfig = req.responseXML;		flashHP_initFlashHomepage();	}	if (req.readyState == 4) return;	req.send(null);}var XMLHttpFactories = [	function () {return new XMLHttpRequest()},	function () {return new ActiveXObject("Msxml2.XMLHTTP")},	function () {return new ActiveXObject("Msxml3.XMLHTTP")},	function () {return new ActiveXObject("Microsoft.XMLHTTP")}];function createXMLHTTPObject() {	var xmlhttp = false;	for (var i=0;i<XMLHttpFactories.length;i++) {		try {			xmlhttp = XMLHttpFactories[i]();		}		catch (e) {			continue;		}		break;	}	return xmlhttp;}function flashHP_getSettings(xPoolNode, xGlobalNode){	var pool = new Object();	pool.id        = xPoolNode.getAttribute("id");	pool.lang	   = xPoolNode.getAttribute("lang");		var hasFlash = (xPoolNode.getAttribute("hasFlash") != null) ? xPoolNode.getAttribute("hasFlash") : xGlobalNode.getAttribute("hasFlash");	pool.hasFlash  = eval(hasFlash); // "true" oder "false";	var overrideFallback = (xPoolNode.getAttribute("overrideFallback") != null) ? xPoolNode.getAttribute("overrideFallback") : xGlobalNode.getAttribute("overrideFallback");	pool.overrideFallback = eval(overrideFallback);		var timeOut = (xPoolNode.getAttribute("timeOut") != null) ? xPoolNode.getAttribute("timeOut") : xGlobalNode.getAttribute("timeOut");	pool.timeOut   = (isInteger(timeOut)) ? parseInt(timeOut) : 0;	pool.flashName = (xPoolNode.getAttribute("flashName") != null) ? xPoolNode.getAttribute("flashName") : xGlobalNode.getAttribute("flashName");	pool.claimPool = (xPoolNode.getElementsByTagName("claim")[0].getAttribute("pool") != null) ? xPoolNode.getElementsByTagName("claim")[0].getAttribute("pool") : xGlobalNode.getElementsByTagName("claim")[0].getAttribute("pool");		pool.claimId   = (xPoolNode.getElementsByTagName("claim")[0].getAttribute("id") != null) ? xPoolNode.getElementsByTagName("claim")[0].getAttribute("id") : xGlobalNode.getElementsByTagName("claim")[0].getAttribute("id");	pool.claimLang = (xPoolNode.getElementsByTagName("claim")[0].getAttribute("lang") != null) ? xPoolNode.getElementsByTagName("claim")[0].getAttribute("lang") : xGlobalNode.getElementsByTagName("claim")[0].getAttribute("lang");		var claimLink = (xPoolNode.getElementsByTagName("claim")[0].getAttribute("link") != null) ? xPoolNode.getElementsByTagName("claim")[0].getAttribute("link") : xGlobalNode.getElementsByTagName("claim")[0].getAttribute("link");		if (claimLink.indexOf("[pool_id]") != -1)		claimLink = myreplace(claimLink, "[pool_id]", pool.id);			if (claimLink.indexOf("[pool_lang]") != -1)		claimLink = myreplace(claimLink, "[pool_lang]", pool.lang);		pool.claimLink = claimLink;		return pool;}function isInteger (s){    var i;    if ((s == null) || (s.length == 0))    if (isInteger.arguments.length == 1) return 0;    else return (isInteger.arguments[1] == true);    for (i = 0; i < s.length; i++)    {        var c = s.charAt(i);        if (!isDigit(c)) return false;    }    return true;}function isDigit (c){    return ((c >= "0") && (c <= "9"))}function flashHP_getGlobalAttribute(setting){	var retVal;	try	{		retVal = g_xmlFlashHPConfig.documentElement.getElementsByTagName("globalsettings")[0].getAttribute(setting);	}	catch(e)	{		retVal = null;	}		return retVal;	}function flashHP_getPoolNode(poolName, poolLang){	var xmlRoot = g_xmlFlashHPConfig.documentElement;	var poolNodeList = xmlRoot.getElementsByTagName("pool");	var poolNode = null;		var i = 0;	var poolFound = false;		while (!poolFound && i < poolNodeList.length)	{		if (poolNodeList[i].getAttribute("id") == poolName && poolNodeList[i].getAttribute("lang") == poolLang)		{			poolFound = true;			poolNode = poolNodeList[i];		}		i++;	}	return poolNode;}function flashHP_initFlashHomepage(){	// pool id	var poolName = getPoolName().toLowerCase();		// pool language	var poolLang = getPoolLang(poolName).toLowerCase();		var poolHasFlashHP = true;		if (!g_xmlFlashHPConfig) 	{		g_useFlashHomepage = false;		poolHasFlashHP = false;		// alert("debug: Fehler: konnte das Xml-Dokument NICHT laden.");	}	else	{			g_useFlashHomepage = eval(flashHP_getGlobalAttribute("useflashHomepage"));				// get pool Settings		var xmlPoolNode = flashHP_getPoolNode(poolName, poolLang);		// get global pool settings		var xmlGlobalsNode = flashHP_getPoolNode("global", "none");		var objSettings = flashHP_getSettings(xmlPoolNode, xmlGlobalsNode);		// override these variables in case of deviation in the switch statement below.		// var timeOut = 2480;		var rootPath = flashHP_getGlobalAttribute("rootPath");		var cachePrevent = flashHP_getGlobalAttribute("cachePrevent");		// flash settings		poolHasFlashHP = objSettings.hasFlash;		var timeOut = objSettings.timeOut;		var flashName = objSettings.flashName;		g_flashHPFallbackOverride = objSettings.overrideFallback;		// claim settings		var claimPool = objSettings.claimPool;		var claimId = objSettings.claimId;		var claimLang = objSettings.claimLang;		var claimLink = objSettings.claimLink;				/*		alert(		"debug:\nclaimPool = " + objSettings.claimPool + 		"\npool-id = " + objSettings.id + 		"\npoolLang = " + objSettings.lang + 		"\npoolHasFlashHP = " + poolHasFlashHP + 		"\nclaimId = " + objSettings.claimId +  		"\nclaimLang = " + objSettings.claimLang + 		"\nclaimLink = " + objSettings.claimLink + 		"\nrootPath = " + rootPath +		"\ncachePrevent = " + cachePrevent +		"\ntimeOut = " + objSettings.timeOut + 		""				);		*/							// building the parts together..		var antiCacheSuffix = "?rid=" + cachePrevent;		var flashPath = rootPath + flashName + antiCacheSuffix;	}			// if both global and local variables are positive, go for it..	if (g_useFlashHomepage && poolHasFlashHP)	{		var introElem = getElementsByClassName('introImage')[0];		if (introElem) 		{			var introImg = introElem.getElementsByTagName("img")[0];			if (introImg) 			{			    //STV: 			    // >> Flashgr\u00F6\u00DFe = Gr\u00F6\u00DFe Introimage ... sollte eigentlich f\u00FCr jeden Markt funktionieren ...			    if((poolName == 'usa') || (poolName == 'canada'))			    {			        var imgWidth = parseInt(introImg.style.width);			        var imgHeight = parseInt(introImg.style.height);				    showFlash(flashPath, "introImage", imgWidth, imgHeight, 8, "#000", "loop=true,menu=true,quality=high,wmode=opaque", "pool=" + claimPool +  ",id=" + claimId + ",type=image,lang=" + claimLang + ",filetype=normal,claimlink=" + claimLink);				    //showFlash(flashPath, "introImage", "1063", "455", 8, "#000", "loop=true,menu=true,quality=high,wmode=opaque", "pool=" + claimPool +  ",id=" + claimId + ",type=image,lang=" + claimLang + ",filetype=normal,claimlink=" + claimLink);                }                else                {				    showFlash(flashPath, "introImage", "839", "440", 8, "#000", "loop=true,menu=true,quality=high,wmode=opaque", "pool=" + claimPool +  ",id=" + claimId + ",type=image,lang=" + claimLang + ",filetype=normal,claimlink=" + claimLink);                }				if (timeOut > 0) {					window.setTimeout("showHomepageNavigation()", timeOut);				}				else {					showHomepageNavigation();					// The claim is called from within Flash..				}			}		}	}	else	// back to regular homepage.	{		// showHomepageNavigation();		// showHomepageClaim();	}	}// this is a porschewebsite hack and would probably not work in other cases..// paints a grey border below the introImage div. // Used by the flash videos which are triggered on the same page by a button (not hmoepage).function setIntroImageBorder() {	var elm = document.getElementById('introImage');	if (elm) {		elm.style.borderBottom = 'solid 1px #CECECE';		elm.style.width = '615px';	}}/*Flash Homepage functions*/// 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;}// To cover IE 5.0's lack of the push methodArray.prototype.push = function(value) {  this[this.length] = value;}// finds the first Element carrying the class name and changes its visibility.function showHideByClassName(clsName, visible){	var visibility = (visible == true) ? 'visible' : 'hidden';	var display = (visible == true) ? 'block' : 'none';		var elm = getElementsByClassName(clsName)[0];	if (elm)		elm.style.visibility = visibility;		elm.style.display = display;}// this loads back the original Fallback-Image manually, and make the navi visible, in case the Flash animation fails to load.function fallBackFromFlash(pool) {    if (document.getElementById('introImage'))        introImgDiv = document.getElementById('introImage');    else        introImgDiv = getElementsByClassName('introImage')[0];    var introImg = introImgDiv.getElementsByTagName("img")[0];    var fbSrc;    if (g_flashHPFallbackOverride) {        fbSrc = pool + ".jpg";    }    else {        fbSrc = "default.jpg";    }    if (introImg) {    }    else {        introImg = document.createElement("img");        introImgDiv.appendChild(introImg);    }    introImg.src = "/all/media/flash/videos/homepage/fallback/" + fbSrc;    showHomepageClaim();    showHomepageNavigation();}//shows Navigation bar and shopping buttonsfunction showHomepageNavigation(){	// we don't use showHideClassByName here because of speed issues in IE6..	// document.getElementById('topnav1').parentNode.style.visibility = 'visible';	// getElementsByClassName("shoppingButtons", "span", document)[0].style.visibility = 'visible';	// getElementsByClassName("shoppingShade", "div", document)[0].style.visibility = 'visible';	showHideByClassName("homeNavigation", true);	showHideByClassName('shoppingButtons', true);	showHideByClassName("shoppingShade", true);}//hides Navigation bar and shopping buttonsfunction hideHomepageNavigation(){	showHideByClassName("homeNavigation", false);	showHideByClassName("shoppingButtons", false);	showHideByClassName("shoppingShade", false);}// makes the claim element invisible (flash loaded)function hideHomepageClaim() {	var claimElm = getHomepageClaim();	claimElm.style.visibility = 'hidden';	claimElm.style.display = 'none';}// makes the claim element visible (no flash loaded)function showHomepageClaim() {	var claimElm = getHomepageClaim();	claimElm.style.visibility = 'visible';	claimElm.style.display = 'block';}// returns the claim element to hide when loading the flash animation.function getHomepageClaim() {	return document.getElementById('homeHead');}function fitFrameFromParent(iHeight){    addContextDebug("iHeight", iHeight);    var elm = document.getElementById("mainframe");    var footer = document.getElementById("footer");    var search = document.getElementById("search");    if (elm) {        addContextDebug("enteredElm", true);        elm.style.height = (iHeight + 40 + 140) + "px";        if (search) { search.style.display = "none"; }        footer.style.bottom = "-1px";        if (search) { search.style.display = "block"; }        addContextDebug("finishedElm", true);    }}function addContextDebug(sName, sValue){    g_contextDebug += sName + "=" + sValue + "\r\n";}function showContextDebug(){    if (g_contextDebug != "") {        alert(g_contextDebug);    }}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 containsStr(s, find) {	return (s.indexOf(find) != -1);}function overHome(){    if (g_openDivPage == '' && !g_is_safari) {        if (g_timeout != -1) { clearTimeout(g_timeout); }        showNavHomeSub();    }}function outHome(){    if (g_openDivPage == 0 && !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");    setBackground("navigationHome", "rgb(242,242,242)");}function hideNavHomeSub(){    hideLr("navigationHomeSub");    hideLr("navigationShade");    setBackground("navigationHome", "rgb(255,255,255)");}function setBackground(id, sBack){    var elm = document.getElementById(id);    elm.style.backgroundColor = sBack;}function getCachePrevent(){    return "?rand=" + escape( Math.round( Math.random() * 10000 ) );}//Page in divfunction openDivPage(sUrl){    if (g_openDivPage == '')   {        var shadeborder = 8;        divWidth = 656;        divHeight = 535;        var elmShade = document.getElementById("divPageShade");        var elmPage = document.getElementById("divPage");        var divX = g_pageWidth / 2 - divWidth / 2;        var divY = Math.round( (viewportGetHeight() - divHeight)/2 ) + viewportGetScrollY();        if (divY < 0) { divY = 0; }        if (divX < 0) { divX = 0; }        elmShade.style.left = (divX - shadeborder) + "px";        elmShade.style.top = (divY - shadeborder) + "px";        elmPage.style.left = divX + "px";        elmPage.style.top = divY + "px";		/*        var elmCloseButton = document.getElementById("closeButtonDivPage");        if (elmCloseButton) {            elmCloseButton.style.left = (divWidth - 19) + "px";        }		*/        g_openDivPage = sUrl;        prepareFillDivPage(sUrl);    }}function closeDivPage(){    var elm = document.getElementById("divPage");    elm.innerHTML = "<p>&nbsp;</p>";    elm.style.display = "none";    hideLr("divPageShade");    g_openDivPage = '';    if (g_is_safari) {        var introElm = document.getElementById("introImage");        if (introElm) {            introElm.style.visibility = "visible";        }    }}function prepareFillDivPage(sUrl){    sUrl += getCachePrevent();    if (window.XMLHttpRequest) {        g_req = new XMLHttpRequest();    }    else if (window.ActiveXObject) {        g_req = new ActiveXObject("Microsoft.XMLHTTP");    }    g_req.onreadystatechange = fillDivPage;    g_req.open("GET", sUrl, true);    g_req.send(null);}//shows page in popup division, header and content is delivered in xmlfunction fillDivPage(){    if (g_req.readyState == 4)    {        if (g_req.status == 200)        {            if (g_is_safari) {                var introElm = document.getElementById("introImage");                if (introElm) {                    introElm.style.visibility = "hidden";                }            }            var s = "";                    var elmPage = document.getElementById("divPage");            s += "";            s += "<div class=\"closeButton\" id=\"closeButtonDivPage\" onclick=\"closeDivPage(false)\"><img src=\"../close-button.gif\" alt=\"[X]\" title=\"\" /></div>";            s += g_req.responseText;            s = replStr(s, "<content>", "");            s = replStr(s, "</content>", "");            var sRun = getTextBetween(s, "// <![CDATA[", "// ]]>");            sRun = replStr(sRun, ",wmode=opaque", ",");            elmPage.innerHTML = s;            var elmShade = document.getElementById("divPageShade");            var elmPage = document.getElementById("divPage");            elmPage.style.display = "block";            elmShade.style.display = "block";            if (sRun != "") { eval(sRun); }        }        else        {            alert("Can't retrieve XML: " + g_req.statusText);        }    }}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 clickZoomable(id, imgWidth, imgHeight){    if (g_openZoom == 0)    {        var shadeborder = 8;        var elmShade = document.getElementById("zoomImageShade");        var elmImage = document.getElementById("zoomImage" + id);        var elmCloseButton = document.getElementById("closeButton" + id);        var imgX = g_pageWidth / 2 - 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";        if (elmCloseButton) {            elmCloseButton.style.left = (imgWidth - 19) + "px";        }        elmImage.style.display = "block";        elmShade.style.display = "block";        g_openZoom = id;    }}function clickZoomed(){    hideLr("zoomImageShade");    hideLr("zoomImage" + g_openZoom);    g_openZoom = 0;}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";    }}/* Expandable module */function expandCollapse(id){    var elm = document.getElementById("expandable_" + id);    if (elm)    {        /* Hack alert -- footer will be hidden temporarily        to recalculate bottom position correctly.        */        var footer = document.getElementById("footer");        footer.style.display = "none";        if (elm.style.height != "auto")        {            collapseAllElements();            showElement(id);                }        else        {            collapseElement(id);        }        positionFooter();        footer.style.display = "block";    }}function showElement(id) {    var elm = document.getElementById("expandable_" + id);    elm.style.height = "auto";    var h3 = document.getElementById("expandableHead_" + id);    if (h3) {                        h3.style.backgroundColor = "rgb(102,102,102)";                         h3.style.color = "rgb(255,255,255)";                      h3.style.backgroundImage = "url(../arrow-lightgray-down.gif)";                    h3.style.backgroundPosition = "9px 9px";    }}function collapseElement(id) {    var elm = document.getElementById("expandable_" + id);    elm.style.height = "19px";    var h3 = document.getElementById("expandableHead_" + id);    if (h3) {        h3.style.backgroundColor = "rgb(204,204,204)";                        h3.style.color = "rgb(0,0,0)";        h3.style.backgroundImage = "url(../arrow-gray.gif)";                  h3.style.backgroundPosition = "11px 7px";    }}function collapseAllElements() {    var i=1;    do {        var elm = document.getElementById("expandable_" + i);        if (elm) collapseElement(i);        i++;    } while(elm);}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;}/* Gallery module */var g_lastNumber = 1;function setImage(elm, n){    if (g_lastNumber != n)    {        var lastElm = document.getElementById("thumbnail" + g_lastNumber);        lastElm.className = "";        lastElm.style.border = "1px solid #ccc";        var thisElm = document.getElementById("thumbnail" + n);        thisElm.className = "selected";        thisElm.style.border = "1px solid rgb(204,0,0)";		/* ADDED */		if (document.getElementById("wallpaperRes" + g_lastNumber)) 			document.getElementById("wallpaperRes" + g_lastNumber).style.visibility = 'hidden';		if (document.getElementById("wallpaperRes" + n)) 			document.getElementById("wallpaperRes" + n).style.visibility = 'visible';		if (document.getElementById("galleryLabel" + g_lastNumber)) 			document.getElementById("galleryLabel" + g_lastNumber).style.visibility = 'hidden';	 		if (document.getElementById("galleryLabel" + n)) 			document.getElementById("galleryLabel" + n).style.visibility = 'visible';	 		/* END ADDED */        g_lastNumber = n;        sHref = elm.href;        document.getElementById("galleryImage").src = sHref;                showGallerySubtitle(n);    }    return false;}function setThumbnail(elm, n){    if (g_lastNumber != n)    {        var lastElm = document.getElementById("thumbnail" + g_lastNumber);        lastElm.className = "";        lastElm.style.border = "1px solid #ccc";        var thisElm = document.getElementById("thumbnail" + n);        thisElm.className = "selected";        thisElm.style.border = "1px solid rgb(204,0,0)";        g_lastNumber = n;    }    return false;}function prevgalleryImage(img, imgMax){    var lastElm = document.getElementById("thumbnail" + g_lastNumber);    if (lastElm) {        	lastElm.className = "";    	lastElm.style.border = "1px solid #ccc";    }	/* ADDED */	if (document.getElementById("wallpaperRes" + g_lastNumber)) 		document.getElementById("wallpaperRes" + g_lastNumber).style.visibility = 'hidden';	 	if (document.getElementById("galleryLabel" + g_lastNumber)) 		document.getElementById("galleryLabel" + g_lastNumber).style.visibility = 'hidden';	 	/* END ADDED */    var n = --g_lastNumber;    if (n < 1) { n = getMaxNumberGallery(); }    var thisElm = document.getElementById("thumbnail" + n);    if (thisElm) {     	    thisElm.className = "selected";	    thisElm.style.border = "1px solid rgb(204,0,0)";	}    var elm = document.getElementById("href" + n);    sHref = elm.href;    document.getElementById("galleryImage").src = sHref;	/* ADDED */	if (document.getElementById("wallpaperRes" + n)) 		document.getElementById("wallpaperRes" + n).style.visibility = 'visible';	 	if (document.getElementById("galleryLabel" + n)) 		document.getElementById("galleryLabel" + n).style.visibility = 'visible';	 	/* END ADDED */    g_lastNumber = n;        showGallerySubtitle(n);    return false;}function nextgalleryImage(){    var lastElm = document.getElementById("thumbnail" + g_lastNumber);    if (lastElm) {	    lastElm.className = "";	    lastElm.style.border = "1px solid #ccc";    }	/* ADDED */	if (document.getElementById("wallpaperRes" + g_lastNumber)) 		document.getElementById("wallpaperRes" + g_lastNumber).style.visibility = 'hidden';	 	if (document.getElementById("galleryLabel" + g_lastNumber)) 		document.getElementById("galleryLabel" + g_lastNumber).style.visibility = 'hidden';	 	/* END ADDED */    var n = ++g_lastNumber;    var max = getMaxNumberGallery();    if (n > max) { n = 1; }    var thisElm = document.getElementById("thumbnail" + n);    if (thisElm) {    	    thisElm.className = "selected";	    thisElm.style.border = "1px solid rgb(204,0,0)";	}    var elm = document.getElementById("href" + n);    sHref = elm.href;    document.getElementById("galleryImage").src = sHref;	/* ADDED */	if (document.getElementById("wallpaperRes" + n)) 		document.getElementById("wallpaperRes" + n).style.visibility = 'visible';	 	if (document.getElementById("galleryLabel" + n)) 		document.getElementById("galleryLabel" + n).style.visibility = 'visible';	 	/* END ADDED */    g_lastNumber = n;        showGallerySubtitle(n);    return false;}function initGallerySubtitles(){    var subtitles = document.getElementById("gallerySubtitles")           	    if (subtitles) {        var tab = getGallerySubtitleTab();                   if (tab) {            tab.style.display = "block";                        showGallerySubtitle(1);        }    }}function showGallerySubtitle(n){    var subtitles = document.getElementById("gallerySubtitles");	    if (subtitles) {    	        var tab = getGallerySubtitleTab();                       if (tab != null) {            var tabSubtitles = tab.getElementsByTagName("div");                        if (tabSubtitles) {                            for (var i = 0; i < tabSubtitles.length; i++) {                    tabSubtitles[i].style.display = (i == n - 1) ? "block" : "none";                }            }        }   	    }}function getGallerySubtitleTab(){    var no = getGallerySubtitleTabNo();    var tab = document.getElementById("gallerySubtitlesTab" + no);        return tab;          }function getGallerySubtitleTabNo(){    var no = 1;        var regex = /tabindex=(\d)/;    var result = regex.exec(document.URL);        if (result != null) {         no = result[1]    }                    return no;          }function getMaxNumberGallery(){    var max = 0;    for (var i = 15; i >= 1 && max == 0; i--) {        var testElm = document.getElementById("thumbnail" + i);        if (testElm) {            max = i;            break;        }    }    return max;}function showWallpaper(img, iWidth, iHeight){    gotoUrlNewWin(img);}function showGalleryFlashVideo(n, videoUrl, videoWidth, videoHeight, videoTitle, countIt){    var elmImg = document.getElementById("galleryImage");    if (elmImg) {        g_fallbackImage = elmImg.src;    }        	var flashWidth = (videoWidth).toString();	var flashHeight = (videoHeight + 20).toString();	var playerUrl = "../videoplayer.swf";			/* ADDED */	if (document.getElementById("galleryLabel" + g_lastNumber)) 		document.getElementById("galleryLabel" + g_lastNumber).style.visibility = 'hidden';	 	if (document.getElementById("galleryLabel" + n)) 		document.getElementById("galleryLabel" + n).style.visibility = 'visible';	      g_lastNumber = n;	/* END ADDED */	if (countIt) countResourceOpen("Video", videoTitle, videoUrl);		showFlash(playerUrl, "galleryStage", videoWidth, videoHeight, "7", "#FFFFFF",            "loop=true,menu=true,quality=high,wmode=opaque",                        "id=" + videoUrl + ",eventHandler=flashEnded");}function playGallerySound(n, soundUrl, soundTitle, countIt) {	if (countIt) countResourceOpen("Sound", soundTitle, soundUrl);	if (document.getElementById("galleryLabel" + g_lastNumber)) 		document.getElementById("galleryLabel" + g_lastNumber).style.visibility = 'hidden';	 	if (document.getElementById("galleryLabel" + n)) 		document.getElementById("galleryLabel" + n).style.visibility = 'visible';	      g_lastNumber = n;		if (document.getElementById("galleryLabel" + g_lastNumber)) 		document.getElementById("galleryLabel" + g_lastNumber).style.visibility = 'hidden';	 	if (document.getElementById("galleryLabel" + n)) 		document.getElementById("galleryLabel" + n).style.visibility = 'visible';	      g_lastNumber = n;		//document.location.href = soundUrl;				var flashWidth = "595";	var flashHeight = "20";	var playerUrl = "../mp3playerje.swf";		document.getElementById("gallerySoundStage").style.visibility = "visible";	showFlash(playerUrl, "gallerySoundStage", flashWidth, flashHeight, "7", "#FFFFFF",            "loop=true,menu=false,quality=high,wmode=opaque",                        "file=" + soundUrl + ",autostart=true,eventHandler=flashEnded");}/* Windows module */function MM_openBrWindow(theURL,winName,features) { //v2.0  window.open(theURL,winName,features);}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 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 gotoUrlNewWinSizeCenteredScrollbar(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=yes,status=no");}function gotoUrlNewWinSizeCenteredResizable(s, iWidth, iHeight){    iWidth += 20;    iHeight += 25;	    iLeft = 20;    iTop = 20;    newWin = window.open(s, "sportWin", "width=" + iWidth + ",height=" + iHeight + ",left=" + iLeft + ",top=" + iTop + ",dependent=yes,location=no,resizable=no,scrollbars=yes,status=no");}function gotoUrlNewWinSizeCenteredScrollable(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=yes,status=no");}function getRandomInt(max){    return Math.round( Math.random() * (max-1) );}/* Home module */function initHome(){    if (document.getElementById) {        g_initHome = true;    }}function bannerLinkToHi(sId){    if (g_initHome)    {        var elm = document.getElementById(sId);        if (elm)        {            elm.style.color = "#c00";            elm.style.backgroundImage = "url(../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(../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 fadeAllOut(elem){  if(elem == undefined)    return;  if(g_jdpowerphase == "none")   return;  var ID = elem.id  var i = 0;  var which = parseInt(ID.replace('link', '').replace('topnav', ''));  for( ; i <= 9; i++)  {    if((i <= 4) && (which != i))    {      fadeOut('topnavlink' + i.toString());    }    if((i >= 5) && (which != i))      fadeOut('topnavlink' + i.toString());  }}function fadeAllIn(elem){  if(elem == undefined)    return;  if(g_jdpowerphase == "none")   return;  var ID = elem.id  var i = 0;  var which = parseInt(ID.replace('link', '').replace('topnav', ''));  for( ; i <= 9; i++)  {    if((i <= 4) && (which != i))    {      fadeIn('topnavlink' + i.toString());    }    if((i >= 5) && (which != i))      fadeIn('topnavlink' + i.toString());  }}function fadeOut(ID){  var elem = document.getElementById(ID);  if(elem)  {    elem.style.MozOpacity = ".5";     elem.style.Opacity = ".5";     elem.style.opacity = ".5";     elem.style.filter = "Alpha(opacity=50, finishopacity=50, style=2)";  }}function fadeIn(ID){  var elem = document.getElementById(ID);  if(elem)  {    elem.style.MozOpacity = "1.00"; // hack around weeeiiird bug which causes "1" to break NS7.02    elem.style.Opacity = "1.00";     elem.style.opacity = "1.00";     elem.style.filter = "Alpha(opacity=100, finishopacity=100, style=2)";  }}function hiliteLr(level, sName){    var elem = document.getElementById(sName);    if (elem)    {        if (level == 0 || level == "0")        {           elem.style.backgroundColor = g_homemenu_hl_background_color_Level5;                     elem.style.color = g_homemenu_hl_fontcolor;             if (! (elem.className.indexOf("final") >= 0) )            {                elem.style.backgroundImage = "url(../arrow-red.gif)";            }                        fadeAllOut(elem);        }        else        {            elem.style.color = g_homemenu_hl_fontcolor; //"rgb(204, 0, 0)";            elem.style.backgroundColor = "#FFFFFF";            if (! (elem.className.indexOf("final") >= 0) )            {                elem.style.backgroundImage = "url(../arrow-red.gif)";            }            elem.style.MozOpacity = ".99"; // hack around weeeiiird bug which causes "1" to break NS7.02            elem.style.Opacity = "1.00";             elem.style.opacity = "1.00";             elem.style.filter = "alpha(opacity=100)";        }    }}function loliteLr(level, sName){    var elem = document.getElementById(sName);    if (elem)    {        if (level == 0 || level == "0")        {                       elem.style.backgroundColor = g_homemenu_ll_background_color;                          elem.style.color = g_homemenu_ll_fontcolor_level0;              elem.style.backgroundColor = g_homemenu_ll_background_color;              if (! (elem.className.indexOf("final") >= 0) )             {                 elem.style.backgroundImage = g_homemenu_ll_background_image_level0;              }                        fadeAllIn(elem);                    }        else        {            elem.style.color = g_homemenu_ll_fontcolor_level1;            elem.style.backgroundColor = "#FFFFFF";            if (! (elem.className.indexOf("final") >= 0) )            {                elem.style.backgroundImage = g_homemenu_ll_background_image_level1;            }            elem.style.MozOpacity = ".86";            elem.style.Opacity = ".86";             elem.style.opacity = ".86";             elem.style.filter = "alpha(opacity=86)";        }    }}function showSubLayers(sName){    var i = 0;    var foundOne = false;    for (i = 1; i <= 13; 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 <= 13; 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 gotoUrlIE(url){    if (g_is_ie) {        gotoUrl(url);    }}function nogo(){    //}function getRandomInt(max){    return Math.round( Math.random() * (max-1) );}function selectAllInput(elm){    if (elm)    {        elm.focus();        elm.select();    }}function changedCountry(elmThis){    if (document.getElementById)    {        var sUrl = elmThis.value;        if (sUrl != "")        {            document.location.href = sUrl;        }    }}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")));	var is_mac = ((agt.indexOf('macintosh')!=-1))?true:false;	var is_linux = (navigator.platform.toLowerCase().indexOf('linux')!=-1)?true:false;	var is_win = (navigator.platform.toLowerCase().indexOf('win')!=-1)?true:false;	    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);	// OS	g_is_win = is_win;	g_is_mac = is_mac;	g_is_linux = is_linux;	    g_is_ie = is_ie;    g_is_opera = is_opera;    g_is_ie5 = is_ie5;    g_is_ie5_5 = is_ie5_5;    g_is_safari = is_safari;} /* Module Image Switch */function updateImageSwitch(elm, state){	var elmChild = null;		if (elm.childNodes[0].style != undefined) {		elmChild = elm.childNodes[0];	} else {		elmChild = elm.childNodes[1];	}    switch (state) {        case "active":                var i = 1;            do {                var elmInactive = document.getElementById("switchImage" + i);                if (elmInactive != null) {                    updateImageSwitch(elmInactive, "inactive");                }                i++;            } while (elmInactive != null)	            elm.style.color = "rgb(204,0,0)";            elm.style.background = "white url(../arrow-red.gif) no-repeat left 3px";            elmChild.style.display = "block";                                  break;        case "inactive":            elm.style.color = "rgb(102,102,102)";            elm.style.background = "white url(../arrow-gray.gif) no-repeat left 3px";            elmChild.style.display = "none";                                          }}/* Macht ein Redirect zur Value des ausgew\u00E4hlten Elements der angegebenen Select Box */function RedirectToOptionValue(name){  obj = document.getElementById(name);  if(obj)  {    link = obj.options[obj.selectedIndex].value;    if(link.length > 0)    {      document.location.href = link;    }  }}function getCookie(name){    var thisCookie = document.cookie;    var index = thisCookie.indexOf(name + "=");    if (index == -1) return null;    index = thisCookie.indexOf("=", index) + 1;    var endstr = thisCookie.indexOf(";", index);    if (endstr == -1) endstr = thisCookie.length;    return unescape(thisCookie.substring(index, endstr));}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 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);}function startSearch() {			var webArea = middleStr(document.location.href, "/web/", "-");	var term = encodeURIComponent(document.forms["searchform"].query.value);	var action = webArea + "-searchresult?OpenDocument&search=" + term; 	document.location.href = action;	}/* Inline videos */function videoWin(area, videoURL, videoWidth, videoHeight, docUNID, multimediaNr) {	var  url = '../Video?OpenNavigator&area=' + area + '&url=' + videoURL + '&width=' + String(videoWidth) + '&height=' + String(videoHeight) + '&unid=' + docUNID + '&nr=' + multimediaNr;	var windowWidth = videoWidth + 52;	var windowHeight;	if(videoURL.indexOf('.mov') > -1) windowHeight = videoHeight + 107;	else windowHeight = videoHeight + 137;    var windowLeft = Math.round((screen.width - windowWidth) / 2);    var windowTop = Math.round((screen.height - windowHeight) / 2);    newWin = window.open(url, "newWin" + getRandomInt(10000), "width=" + windowWidth + ",height=" + windowHeight + ",left=" + windowLeft + ",top=" + windowTop + ",dependent=yes,location=no,resizable=no,scrollbars=no,status=no");}//Flash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(stopIt){	// IE Hack for dropdowns	//ieToggleDropDowns(getListIEDropDowns(), false);		if (stopIt) document.getElementById("divContentInnerContent").innerHTML = "<p>&nbsp;</p>";	else stopSlideshow();	hideLr("divContent");    	hideLr("divContentShade");     hideLr("pageoverlay");    	g_openpopupDiv = 0;    }function countResourceOpen(type, title, url) {	var counterUrl = strLeftBack(document.location.href, ".nsf/") + ".nsf/ResourceOpenCounter?OpenAgent";	var callback = null;	var postData = "DocumentUrl=" + escape(document.location.href) + "&DocumentTitle=" + escape(document.title);	postData += "&Type=" + type + "&ResourceTitle=" + escape(title) + "&ResourceUrl=" + escape(url);				sendRequest(counterUrl, callback, postData)}function showFlashVideo(videoTitle, videoTitleImg, videoUrl, videoWidth, videoHeight, hasMore, countIt) {		if (countIt) countResourceOpen("Video", videoTitle, videoUrl);	var flashParams = 'filetype=swf';			var shadeborder = 8;	 var divWidth = videoWidth + 8;	var divHeight = videoHeight + 8;	if (hasMore) divHeight += 23;	// magic numbers follow, do not try at home	//var popupWidth = divWidth;	//var popupHeight = divHeight - 36;	//var shadeWidth = divWidth + 23;	//var shadeHeight = divHeight + 70;/*	if (screen.width <= 800) {     	divHeight = 300;          popupHeight = 276;          shadeHeight = 353;	}*/	//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";      //g_openpopupDiv = sUrl;		document.getElementById("divContentTitle").innerHTML = "<img src=\"" + videoTitleImg + "\" alt=\"" + videoTitle + "\">";	elmOverlay.style.display = "block";		elmPopup.style.display = "block";	//elmShade.style.display = "block";	elmContent.style.display = "block";		var flashWidth = (videoWidth).toString();	var flashHeight = (videoHeight + 20).toString();	var playerUrl = "../videoplayer.swf";			//"videourl=" + videoUrl + ",eventhandler=flashEnded," + flashParams);	showFlash(playerUrl, "divContentInnerContent", videoWidth, videoHeight, "7", "#FFFFFF",            "loop=true,menu=true,quality=high,wmode=opaque",                        "id=" + videoUrl + ",eventHandler=flashEnded");	//showFlash(playerUrl, "popupDivContent", videoUrl, videoWidth, videoHeight);            	}//Header flash videofunction showHeaderFlashVideo(videoTitle, videoUrl, videoWidth, videoHeight, countIt) {	if (countIt) countResourceOpen("Video", videoTitle, videoUrl);		var flashParams = 'filetype=swf';			var playerUrl = "../videoplayer.swf";		showFlash(playerUrl, "headerstage", videoWidth, videoHeight, "7", "#FFFFFF",            "loop=true,menu=true,quality=high,wmode=opaque",                     	  "id=" + videoUrl + ",eventHandler=flashEnded");		}function flashEnded() {	/*if (g_fallbackImage != "") {		var elmContent = document.getElementById("galleryContent");		elmContent.innerHTML = "<img src=\"" + g_fallbackImage + "\" alt=\"\" id=\"galleryImage\" />";	}*/}//// 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;}//debugvar showDebug = false;function getDebugDiv() {	var elem = document.getElementById("debug");		if (!elem) {		elem = document.createElement("div");		elem.id = "debug"				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.visibility = showDebug ? "visible" : "hidden";			elemStyle.zIndex = "1000000";						//elemStyle.overflow = "-moz-scrollbars-vertical !important";	    	elemStyle.overflow = "auto";	    	elemStyle.overflowY = "auto";				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";}