﻿// Tauscht Bild + TR-Hintergrundfarbe auf der Intro-Seite
function intronavChange(element, onoff, image) {
    document.getElementById("nav" + element).className = "intronav_" + onoff;
    document.getElementById("arr" + element).src = image;
}
// Tauscht Bild + TD-Hintergrundfarbe für den ersten oberen Navigationspunkt mit Rundung
function topnav1Change(element, onoff, image) {
    document.getElementById("tnav" + element).className = "topnav_" + onoff;
    document.getElementById("tnr" + element).src = image;
}
// Tauscht TD-Hintergrundfarbe fü einen oberen Navigationspunkt
function topnavChange(element, onoff) {
    document.getElementById("tnav" + element).className = "topnav_" + onoff;
}
// Tauscht Bild + TR-Hintergrundfarbe in der linken Navigation
// Example 1 onMouseOut:  navChange('1','nav_trans_','off')
// Example 2 onMouseOut:  navChange('1','nav_plus_','off')
// Example 3 onMouseOver: navChange('1','nav_pfeil_','on')
/* alt:
 function navChange(element, image ,onoff) {
 document.getElementById("nav" + element).className = "navi_" + onoff;
 document.images["arr"+element].src = "commongraphics/" + image + onoff + ".gif";
 }
 */
function navChange(element, onoff, image) {
    document.getElementById("nav" + element).className = "navi_" + onoff;
    document.getElementById("arr" + element).src = image;
}
// Tauscht Bild + TR-Hintergrundfarbe in der linken Navigation - Ebene 2
function subNavChange(element, onoff, image) {
    document.getElementById("subnav" + element).className = "subnavi_" + onoff;
    document.getElementById("subarr" + element).src = image;
}
// Tauscht Bild + TR-Hintergrundfarbe in der linken Navigation - Ebene 2
function btnChange(element, imgname) {
    document.getElementById(element).src = imgname;
}
// Führt einen Redirect durch die Quicknav aus
function quickNavTo(qnurl) {
    if ((qnurl != "-") && (qnurl != "--")) location.href = qnurl;
}
//fuer Fenster die auf onlick in einem a href aufgehen
function popWindow(url, name, params) {
    pwin = window.open(url, name, params);
    pwin.focus();
    return false;
}
//fuer reine javascript aufrufe
function openWindow(theURL, winName, features) {
    closeWindow();
    newWin = window.open(theURL, winName, features);
    newWin.focus();
}
function closeWindow() {
    if ((typeof newWin == 'object') && (! (newWin.closed))) newWin.close();
}
// Image-Preloader
function preload(imgObj, imgSrc) {
    if (document.images) {
        eval(imgObj + ' = new Image()')
        eval(imgObj + '.src = "' + imgSrc + '"')
    }
}
var firstSearchClick = true;
function clearSearch(Fname) {
    //den wert vom suchfeld nur beim ersten click loeschen
    if (firstSearchClick) {
        document.forms[0].elements[Fname].value = '';
        firstSearchClick = false;
    }
}
function linkToProduct(linkNode) {
    var startPoint = document.getElementById(linkNode).parentNode.parentNode;
    var allLinks = startPoint.getElementsByTagName("a");
    location.href = allLinks[1].getAttribute("href");
}
prodlinkCount = 0;
var genuineItem = '';
var intelLink = "win=window.open('http://syndication.intel.com/DistributeModule.aspx?ppc_cid=IIP_02110076301&cc=GB&contentType=0','02110076301','resizable=1,scrollbars=0,width=360,height=220');win.focus();";
function AddGenuineHint() {
    // Adds to  the word 'Genuine' a tooltip
    //sucht jetzt im ganzen body (in spans) und nicht nur in p-tags - flo 10.12.2008
    // - sets the link from the Intel Logo
    var allGenuine = document.getElementsByTagName("span");
    for (var countParagraphs = 0; countParagraphs < allGenuine.length; countParagraphs++) {
        try {
            //ENGLISCH
            if (allGenuine[countParagraphs].innerHTML.indexOf('Genuine') != -1) {
                allGenuine[countParagraphs].innerHTML = allGenuine[countParagraphs].innerHTML.replace(/Genuine/g, '<a href="http://www.microsoft.com/genuine" target="_blank" onmouseover="showWMTT();" onmouseout="hideWMTT();">Genuine</a>');
            }
            if (document.location.href.toLowerCase().indexOf('/fra/') != -1) {
                //FRANZOESISCH
                intelLink = "win=window.open('http://syndication.intel.com/DistributeModule.aspx?ppc_cid=IIP_02110076305&cc=FR&contentType=0','02110076305','resizable=1,scrollbars=0,width=360,height=220');win.focus();";
                if (allGenuine[countParagraphs].innerHTML.indexOf('Authentique') != -1) {
                    allGenuine[countParagraphs].innerHTML = allGenuine[countParagraphs].innerHTML.replace(/Authentique/g, '<a href="http://www.microsoft.com/genuine" target="_blank" onmouseover="showWMTT();" onmouseout="hideWMTT();">Authentique</a>');
                }
            } else if (document.location.href.toLowerCase().indexOf('/deu/') != -1) {
                //DEUTSCH
                intelLink = "win=window.open('http://syndication.intel.com/DistributeModule.aspx?ppc_cid=IIP_02110076306&cc=DE&contentType=0','02110076306','resizable=1,scrollbars=0,width=360,height=220');win.focus();";
                if (allGenuine[countParagraphs].innerHTML.indexOf('Original Windows') != -1) {
                    allGenuine[countParagraphs].innerHTML = allGenuine[countParagraphs].innerHTML.replace(/Original Windows/g, '<a href="http://www.microsoft.com/genuine" target="_blank" onmouseover="showWMTT();" onmouseout="hideWMTT();">Original</a> Windows');
                }
            } else if (document.location.href.toLowerCase().indexOf('/ita/') != -1) {
                //ITALIENISCH
                intelLink = "win=window.open('http://syndication.intel.com/DistributeModule.aspx?ppc_cid=IIP_02110076309&cc=FR&contentType=0','02110076309','resizable=1,scrollbars=0,width=360,height=220');win.focus();";
                if (allGenuine[countParagraphs].innerHTML.indexOf('Autentico') != -1) {
                    allGenuine[countParagraphs].innerHTML = allGenuine[countParagraphs].innerHTML.replace(/Autentico/g, '<a href="http://www.microsoft.com/genuine" target="_blank" onmouseover="showWMTT();" onmouseout="hideWMTT();">Autentico</a>');
                }
            } else if (document.location.href.toLowerCase().indexOf('/esn/') != -1) {
                //SPANISCH
                intelLink = "win=window.open('http://syndication.intel.com/DistributeModule.aspx?ppc_cid=IIP_02110076316&cc=ES&contentType=0','02110076316','resizable=1,scrollbars=0,width=360,height=220');win.focus();";
                if (allGenuine[countParagraphs].innerHTML.indexOf('Original') != -1) {
                    allGenuine[countParagraphs].innerHTML = allGenuine[countParagraphs].innerHTML.replace(/XP Tablet PC Autentico/g, 'XP Tablet PC <a href="http://www.microsoft.com/genuine" target="_blank" onmouseover="showWMTT();" onmouseout="hideWMTT();">Original</a>');
                }
                if (allGenuine[countParagraphs].innerHTML.indexOf('Original') != -1) {
                    allGenuine[countParagraphs].innerHTML = allGenuine[countParagraphs].innerHTML.replace(/Original/g, '<a href="http://www.microsoft.com/genuine" target="_blank" onmouseover="showWMTT();" onmouseout="hideWMTT();">Original</a>');
                }
                if (allGenuine[countParagraphs].innerHTML.indexOf('Original') != -1) {
                    allGenuine[countParagraphs].innerHTML = allGenuine[countParagraphs].innerHTML.replace(/XP Tablet PC Original/g, 'XP Tablet PC <a href="http://www.microsoft.com/genuine" target="_blank" onmouseover="showWMTT();" onmouseout="hideWMTT();">Original</a>');
                }
            }
        } catch(ex) {
        }
    }
    //text in den infolayer schreiben
    document.getElementById('genuineInfo').innerHTML=layerText;
}
function goToIntel() {
    eval(intelLink);
}
//Infolayer - Infotext wird im Redsys eingegeben (MP-Link)
function showInfo(text) {
    if (text.length > 2) {
        wmtt = document.getElementById('infoLayer');
        wmtt.innerHTML = text;
        wmtt.style.display = "block";
    }
}
function hideInfo() {
    wmtt.style.display = "none";
}
wmtt = null;
document.onmousemove = updateWMTT;
function updateWMTT(e) {
    if (wmtt != null) {
        x = (document.all) ? window.event.x + wmtt.offsetParent.scrollLeft : e.pageX;
        y = (document.all) ? window.event.y + wmtt.offsetParent.scrollTop : e.pageY;
        wmtt.style.left = (x + 20) + "px";
        wmtt.style.top = (y + 20) + "px";
    }
}
function showWMTT() {
    wmtt = document.getElementById('genuineInfo');
    wmtt.style.display = "block"
}
/*function showWMTTEN() {
    wmtt = document.getElementById('genuineInfoEn');
    wmtt.style.display = "block"
}*/
function hideWMTT() {
    wmtt.style.display = "none";
}
if (document.location.href.indexOf('reddot') == -1) {
    window.onload = AddGenuineHint;
    document.write('<div id="genuineInfo" style="position:absolute;width:380px;background-color:#ffffff;padding:5px;display:none;border: 1px solid #000000;"></div>');
    if (document.location.href.toLowerCase().indexOf('/fra/') != -1) {
        //FRANZOESISCH
        layerText='<span class="copy">Un logiciel Windows<SUP>®</SUP> authentique est publié par Microsoft, et fait l\'objet d\'une licence et d\'une assistance par Microsoft ou un concédant de licence agréé. Un logiciel authentique vous aide à vous protéger des risques liés aux logiciels contrefaits, et vous offre des avantages spéciaux ainsi que l\'experience et l\'assistance que vous attendez. Pour en savoir plus, visitez <a href=\'http://www.microsoft.com/genuine\'>www.microsoft.com/genuine</a>.</span>';
    } else if (document.location.href.toLowerCase().indexOf('/deu/') != -1) {
        //DEUTSCH
        layerText='<span class="copy">Original-Windows<SUP>®</SUP>-Software wird von Microsoft veröffentlicht und von Microsoft oder einem autorisierten Lizenzgeber unterstützt und lizenziert. Originalsoftware schützt Sie vor den Risiken, die gefälschte Software mit sich bringen kann, und bietet Ihnen die Vorteile im Hinblick auf die Benutzerfreundlichkeit und Unterstützung, die Sie erwarten können. Weitere Informationen erhalten Sie unter <a href=\'http://www.microsoft.com/genuine\'>www.microsoft.com/genuine</a>.</span>';
    } else if (document.location.href.toLowerCase().indexOf('ita/mca_cf-h1.aspx') != -1) {
        //ITALIENISCH
        layerText='<span class="copy">Il software Windows<SUP>®</SUP> autentico è pubblicato da Microsoft e concesso in licenza e supportato da Microsoft o da un concessore di licenze autorizzato. Il software autentico consente di proteggersi dai rischi correlati all\'utilizzo di software contraffatto e offre vantaggi speciali, nonché prestazioni e supporto all\'altezza delle aspettative. Per ulteriori informazioni, visitare il sito all\'indirizzo <a href=\'http://www.microsoft.com/genuine\'>www.microsoft.com/genuine</a>.</span>';
    } else if (document.location.href.toLowerCase().indexOf('esn/mca_cf-h1.aspx') != -1) {
        //SPANISCH
        layerText='<span class="copy">Windows<SUP>®</SUP> original es software publicado por Microsoft con licencia y soporte de Microsoft o un emisor de licencia autorizado. El software original previene de los riesgos del software falsificado, ofrece ventajas especiales y aporta la experiencia y el soporte deseados. Para obtener más información, visite <a href=\'http://www.microsoft.com/genuine\'>www.microsoft.com/genuine</a>.</span>';
    } else {
        // ENGLISCH
       layerText='<span class="copy">Genuine Windows<SUP>®</SUP> software is published by Microsoft and licensed and supported by Microsoft or an authorized licensor. Genuine software helps protect you from the risks of counterfeit software, provides you with special benefits and the experience and support you expect. Learn more by visiting <a href=\'http://www.microsoft.com/genuine\'>www.microsoft.com/genuine</a>.</span>';
    }
    //ENGLISCH
   /* document.write('<div id="genuineInfoEn" style="position:absolute;width:380px;background-color:#ffffff;padding:5px;display:none;border: 1px solid #000000;"><span class="copy">Genuine Windows<SUP>®</SUP> software is published by Microsoft and licensed and supported by Microsoft or an authorized licensor. Genuine software helps protect you from the risks of counterfeit software, provides you with special benefits and the experience and support you expect. Learn more by visiting <a href=\'http://www.microsoft.com/genuine\'>www.microsoft.com/genuine</a>.</span></div>');*/
}
//layer für text der übergeben wird
document.write('<div id="infoLayer"></div>');
/* End Tooltip */