// attach missing url-params to all page links var cartID = null; function quickSearch (formName, target) { document[formName].search.value='"'+document[formName].search.value+'"'; return (true); } function onLoadStdPage() { initializepage(); var start = location.search.indexOf("&"); var params = ""; if (start >=0) { keys = (location.search.substr(start + 1)).split("&"); for (var i=0; i=0)) { if ((link.toLowerCase().indexOf("&knotenid") < 0) && (link.toLowerCase().indexOf("&mnn") < 0)) { document.links[i].href=document.links[i].href + params; } else { document.links[i].href=document.links[i].href + paramsNoNav; } // optional CartID anhaengen if (link.toLowerCase().indexOf("&cartid") < 0) { document.links[i].href=document.links[i].href + "&cartid=" + cartID; } } } } function klick(URL,NODE,MNN) { var node = (NODE=="")?"":"&knotenid=" + NODE; if(URL=='') { location.href = location.pathname + "?open" + node + MNN+'&cartid='+cartID; } else { location.href = URL + node + MNN+'&cartid='+cartID; } } function klick2(URL,NODE,MNN) { if(URL=='') { location.href = location.pathname + "?open" + '&knotenid=' + NODE + MNN +'&cartid='+cartID; } else { location.href = URL + '&knotenid=' + NODE + MNN+'&cartid='+cartID; } } function historyBack() { history.back(); } function statusbartext(statustext) { window.status=statustext; } function getfield(name, inputstring, trunc) { //Simply parses out CartID from either the cookie or URL passed to function inputstring = inputstring + trunc; inputstring = inputstring.toLowerCase(); var start=inputstring.indexOf(name + "="); if (start>-1) { start=inputstring.indexOf("=", start)+1 } var end = inputstring.indexOf(trunc, start); if (start==-1 || end==-1) { value=null } else { var value=unescape(inputstring.substring(start,end)) } return value; } function getcartid(name, inputstring, trunc) { //Simply parses out CartID from either the cookie or URL passed to function inputstring = inputstring + trunc; inputstring = inputstring.toLowerCase(); var start=inputstring.indexOf(name + "="); if (start>-1) { start=inputstring.indexOf("=", start)+1 } var end = inputstring.indexOf(trunc, start); if (start==-1 || end==-1) { value=null } else { var value=unescape(inputstring.substring(start,end)) } return value; } function printPage() { // var start = window.location.href.toLowerCase().indexOf('/0/'); // if (start >= 0) // { var link = window.location.href + "&p=yes" printWindow = window.open(link,"print","width=800,height=600,left=10,top=10"); printWindow.setTimeout("print()",2000) printWindow.focus(); // } } function retrieve(URL,DC) { path = location.pathname; params = location.search; while ((start = params.toLowerCase().indexOf('&dc')) >= 0) { ende = (params.toLowerCase() + '&').indexOf('&', start + 1); params = params.substring(0, start) + params.substr(ende); } document.location.href = path + params + '&dc' + DC + '=http:' + URL; } function subOpen(combo) { subSel = document.forms['subnav'].elements[combo].options[document.forms['subnav'].elements[combo].selectedIndex].value; if (subSel != '') { if (subSel.substr(0,1) == "&") { location.href = location.pathname + "?open" + subSel; } else { location.href = subSel; } } } function comboRetrieve(formName, combo, DC) { subSel = document.forms[formName].elements[combo].options[document.forms[formName].elements[combo].selectedIndex].value; if (subSel != '') { if (subSel.substr(0,1) == "&") { retrieve(location.pathname + "?open" + subSel, DC) } else { retrieve(subSel, DC) } } } function openCombo(formName, combo) { subSel = document.forms[formName].elements[combo].options[document.forms[formName].elements[combo].selectedIndex].value; if (subSel != '') { if (subSel.substr(0,1) == "&") { location.href = location.pathname + "?open" + subSel; } else { location.href = subSel + location.search; } } } function openLink(link) { location.href = link + location.search; } function onLoadStdPage2() { initializepage() } function initializepage() { //Look for CartID in cookie first var cookies=document.cookie; cartID = getcartid("cartid", cookies, ";"); // alert (cartID); // window.status="Ihre Warenkorb-ID:" + window.document.cookie; } function randomnum() { var TodaysDate=new Date(); var rn = Math.floor(16000*Math.random()+1)+"-"+TodaysDate.getHours()+TodaysDate.getMinutes()+TodaysDate.getSeconds(); return rn; } // attach missing cartid (is necessary) function setlinks(v) { for (var i = 0; i < document.links.length; i++) { //Use the search property of the link object to append the CartID var link = new String(document.links[i]).toLowerCase(); if( (link.toLowerCase().indexOf("mailto")<0) && (link.toLowerCase().indexOf("cartid=") < 0) && (link.toLowerCase().indexOf("javascript") < 0) && (link.toLowerCase().indexOf(location.hostname)>=0)) { document.links[i].search=document.links[i].search + "&cartid=" +v; } } } function openLogin() { var xWin=window.open('/kunden/luebbe/useradm.nsf/Document?ReadForm&layout=login','my_luebbe','width= 600,innerWidth= 600,height= 480,innerHeight= 480,screenX= 50,left= 50,screenY= 50,top= 50,location=no,menubar=no,status=no,resizable=yes,scrollbars=yes'); } function anchorTop() { window.scrollTo(0,0); } function tellAFriend(Language) { if(Language=="EN"){var site = "TellAFriend-E";}else{var site = "TellAFriend";} var path = location.pathname.toLowerCase(); var start = location.pathname.toLowerCase().indexOf("/0/"); var nsfStart = location.pathname.toLowerCase().indexOf(".nsf"); var pathdb = ""; if (start > 0) { if (nsfStart > 0) { pathdb = location.pathname.substr(0, nsfStart + 4); } else { var replid = location.pathname.substr(start - 16, 16); } var docid = location.pathname.substr(start + 3, 32); if ( (pathdb == "" ) && (docid.length==32) ) { var link = location.protocol + "//" + location.host + "/__" + replid+ ".nsf/index?ReadForm&content=" + docid; link = location.protocol + "//" + location.host + "/kunden/luebbe/vgl//www.nsf/htmls/"+site+"?Open&replid="+replid+"&docid="+docid; var fenster = window.open(link, "tellAFriend", "width=600,height=300,left=50,top=50"); fenster.focus(); } else if (docid.length==32) { var link = location.protocol + "//" + location.host + pathdb + "/index?ReadForm&content=" + docid; link = location.protocol + "//" + location.host + "/kunden/luebbe/vgl/www.nsf/htmls/"+site+"?Open&replid="+pathdb+"&docid="+docid; var fenster = window.open(link, "tellAFriend", "width=600,height=300,left=50,top=50"); fenster.focus(); } }else { var link = location.protocol + "//" + location.host + "/kunden/luebbe/vgl/www.nsf/htmls/"+site+"?Open"; var fenster = window.open(link, "tellAFriend", "width=600,height=300,left=50,top=50"); fenster.focus(); } }