var accesskey=""; var act_page = 1; var lkg_base_url = "http://www.langenscheidt.de/"; var lkg_overview_page = "service/sprachkalender_2528.html"; var lkg_base_url_accesskey; var lkg_access_denied = false; function lkg_setCalendar() { document.getElementById("lkg_cal_img").style.backgroundImage = "url("+document.lkgArray[act_page-1].src+")"; } function lkg_switchCalendar() { if(act_page==1) act_page = 2; else act_page = 1; lkg_setCalendar(); } function lkg_preloadImages() { if (document.lkgArray==null) document.lkgArray = new Array(); document.lkgArray[0] = new Image; document.lkgArray[0].src = lkg_base_url_accesskey+"page=1"; document.lkgArray[1] = new Image; document.lkgArray[1].src = lkg_base_url_accesskey+"page=2"; } // // getPageSize() // Returns array with page width, height and window width, height // Core code from - quirksmode.org // Edit for Firefox by pHaez // Code taken from Lightbox JS by Lokesh Dhakar - http://www.huddletogether.com // function getPageSize(){ var xScroll, yScroll; if (window.innerHeight && window.scrollMaxY) { xScroll = document.body.scrollWidth; yScroll = window.innerHeight + window.scrollMaxY; } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac xScroll = document.body.scrollWidth; yScroll = document.body.scrollHeight; } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari xScroll = document.body.offsetWidth; yScroll = document.body.offsetHeight; } var windowWidth, windowHeight; if (self.innerHeight) { // all except Explorer windowWidth = self.innerWidth; windowHeight = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode windowWidth = document.documentElement.clientWidth; windowHeight = document.documentElement.clientHeight; } else if (document.body) { // other Explorers windowWidth = document.body.clientWidth; windowHeight = document.body.clientHeight; } // for small pages with total height less then height of the viewport if(yScroll < windowHeight){ pageHeight = windowHeight; } else { pageHeight = yScroll; } // for small pages with total width less then width of the viewport if(xScroll < windowWidth){ pageWidth = windowWidth; } else { pageWidth = xScroll; } arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) return arrayPageSize; } // // getPageScroll() // Returns array with x,y page scroll values. // Core code from - quirksmode.org // Code taken from Lightbox JS by Lokesh Dhakar - http://www.huddletogether.com // function getPageScroll(){ var yScroll; if (self.pageYOffset) { yScroll = self.pageYOffset; } else if (document.documentElement && document.documentElement.scrollTop){ // Explorer 6 Strict yScroll = document.documentElement.scrollTop; } else if (document.body) {// all other Explorers yScroll = document.body.scrollTop; } arrayPageScroll = new Array('',yScroll) return arrayPageScroll; } function lkg_showCalendar() { if(accesskey=="") { alert("Kalender nicht initialisiert"); return false; } if(lkg_access_denied==true) { alert("Zugriff verweigert!"); return false; } if(!document.getElementById("overlay")) { var overlay = document.createElement("div"); overlay.setAttribute('id','overlay'); overlay.style.display = 'block'; overlay.style.position = 'absolute'; // PNG 24 Transparency IE Decision if(navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer") { overlay.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+lkg_base_url+"_images/sprachkalender/teaser/overlay.png', sizingMethod='scale');"; overlay.style.backgroundImage = "url('blank.gif')"; } else overlay.style.backgroundImage = "url('"+lkg_base_url+"_images/sprachkalender/teaser/overlay.png')"; overlay.style.top = '0'; overlay.style.left = '0'; overlay.style.zIndex = '250'; overlay.style.width = "100%"; var arrayPageSize = getPageSize(); var arrayPageScroll = getPageScroll(); overlay.style.height = (arrayPageSize[1] + 'px'); var calendar = document.createElement("div"); calendar.setAttribute('id','calendar'); calendar.style.display = 'block'; calendar.style.position = 'absolute'; calendar.style.zIndex = '251'; calendar.style.top = '50%'; calendar.style.left = '50%'; calendar.style.width = '403'; calendar.style.height = '228'; calendar.style.marginTop = '-114'; calendar.style.marginLeft = '-201'; var calTop = arrayPageScroll[1] + ((arrayPageSize[3] - 35) / 2); var calLeft = ((arrayPageSize[0] - 20) / 2); calendar.style.top = (calTop < 0) ? "0px" : calTop + "px"; calendar.style.left = (calLeft < 0) ? "0px" : calLeft + "px"; calendar.innerHTML = ''; /* if(navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer") calendar.innerHTML = calendar.innerHTML + "
"; else */ calendar.innerHTML = calendar.innerHTML + "
"; calendar.innerHTML = calendar.innerHTML + ' '; calendar.innerHTML = calendar.innerHTML + ' Fenster schließen'; calendar.innerHTML = calendar.innerHTML + '
'; calendar.innerHTML = calendar.innerHTML + '
Kalenderblatt drehen
Mehr zum Sprachkalender bei Langenscheidt
'; // PNG 24 Transparency IE Decision if(navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer") { calendar.innerHTML = calendar.innerHTML + '
'; calendar.innerHTML = calendar.innerHTML + '
'; }else{ calendar.innerHTML = calendar.innerHTML + '
'; calendar.innerHTML = calendar.innerHTML + '
'; } overlay.onclick = function () { lkg_closeCalendar(); return false; } document.getElementsByTagName("body").item(0).insertBefore(overlay, document.getElementsByTagName("body").item(0).firstChild); document.getElementsByTagName("body").item(0).insertBefore(calendar, overlay.nextSibling); }else { var my_overlay = document.getElementById("overlay"); my_overlay.style.display="block"; document.getElementById("calendar").style.display="block"; var arrayPageSize = getPageSize(); var arrayPageScroll = getPageScroll(); my_overlay.style.height = (arrayPageSize[1] + 'px'); } lkg_setCalendar(); } function lkg_closeCalendar() { document.getElementById("overlay").style.display="none"; document.getElementById("calendar").style.display="none"; } function reset_style(el) { el.style.padding = '0'; el.style.margin = '0'; el.style.border = '0'; el.style.display = 'block'; el.style.fontSize = '0px'; el.style.background = 'transparent'; return el; } function init_teaser() { var teaser = document.getElementById("lkg_teaser"); teaser = reset_style(teaser); teaser.style.width = "156px"; teaser.style.height = "180px"; teaser.style.backgroundImage = 'url('+lkg_base_url+'/sprachkalender/teaser.gif)'; teaser.style.cursor = "pointer"; teaser.innerHTML = ""; // First spacing row first_row_style = 'width: 156px; height: 24px; font: 0px; padding: 0px; margin: 0px; border: 0px; '; teaser.innerHTML = teaser.innerHTML + '
 
'; // Day & Month daymonth_style = 'width: 156px; height: 23px; text-align: center; font-size: 16px; font-weight: bold; font-family: Tahoma; color: #0094BB; padding: 0px; margin: 0px; border: 0px;'; teaser.innerHTML = teaser.innerHTML + '
31. Juli 
'; // Year year_style = 'width: 156px; height: 57px; text-align: center; font-size: 22px; font-weight: bold; font-family: Tahoma; color: #0094BB; padding: 0px; margin: 0px; border: 0px;'; teaser.innerHTML = teaser.innerHTML + '
2010    
'; // Sprachkalender Title sktitle_style = 'width: 156px; height: 18px; text-align: right; font-size: 14px; font-weight: bold; font-family: Tahoma; color: #0094BB; padding: 0px; margin: 0px; border: 0px;'; teaser.innerHTML = teaser.innerHTML + '
Berühmte Zitate    
'; // Sprachkalender sk_style = 'width: 156px; height: 20px; text-align: right; font-size: 11px; font-weight: bold; font-family: Tahoma; color: #0094BB; padding: 0px; margin: 0px; border: 0px;'; teaser.innerHTML = teaser.innerHTML + '
Sprachkalender 2010     
'; } function lkg_initCalendar(vaccesskey,vcal) { accesskey = "CE46CCD76A"; lkg_base_url_accesskey = lkg_base_url + "_includes/sprachkalender_img.cfm?accesskey="+accesskey+"&"; lkg_preloadImages(); init_teaser(); }