var depth = 10; //in pixels var opacity = 15; //in procents function updateElements(){ var c = document.getElementById('Content'); var a = document.all ? document.all : document.getElementsByTagName('*'); for (var i = 0; i < a.length; i++){ if (a[i].className == "shadow"){ for (x = 0; x < depth; x++){ var newSd = document.createElement("DIV"); newSd.className = "shadow2"; if (a[i].id == "") newSd.style.background = "black"; else newSd.style.background = a[i].id; //opacity filter var opac = Math.round(((((depth - x) * 100) / depth) / 100) * opacity); newSd.style.opacity = (opac / 100); newSd.style.MozOpacity = (opac / 100); newSd.style.KhtmlOpacity = (opac / 100); newSd.style.filter = "alpha(opacity=" + opac + ")"; //object position newSd.style.width = a[i].offsetWidth + "px"; newSd.style.height = a[i].offsetHeight + "px"; newSd.style.left = a[i].offsetLeft + x + 1 + "px"; newSd.style.top = a[i].offsetTop + x + "px"; c.appendChild(newSd); } } else if (a[i].className == "opac") changeOpac(a[i], a[i].id); else if (a[i].className == "image_text") changeOpac(a[i], '75'); } } function changeOpac(elem, opac){ elem.style.opacity = (opac / 100); elem.style.MozOpacity = (opac / 100); elem.style.KhtmlOpacity = (opac / 100); elem.style.filter = "alpha(opacity=" + opac + ")"; } var cursubmenu = -1; function submenu_switch(menu_id){ if (cursubmenu >= 0){ document.getElementById('sub_' + cursubmenu).className = 'submenu_gt_off'; document.getElementById('sub_' + cursubmenu + '_link').className = 'submenu_link_off'; document.getElementById('sub_' + cursubmenu + '_div').style.display = "none"; } if (cursubmenu != menu_id){ document.getElementById('sub_' + menu_id).className = 'submenu_gt_on'; document.getElementById('sub_' + menu_id + '_link').className = 'submenu_link_on'; document.getElementById('sub_' + menu_id + '_div').style.display = "block"; cursubmenu = menu_id; } else{ cursubmenu = -1; } } function switchEngine(value){ var obj = document.getElementById('maxengine'); document.getElementById('maxengine').style.visibility = value; } function openWindow(page, wWidth, wHeight, type){ var wLeft = (screen.width - wWidth) / 2; var wTop = (screen.height - wHeight) / 2; if (wLeft < 0){ wWidth = screen.width; wLeft = 0; } if (wTop < 0) { wHeight = screen.height; wTop = 0; } if (type) page_location = page; else page_location = "http://www.rijsserberg.nl/?q=win&x=" + page + "&ln=de"; var openWin = window.open(page_location, "window", "width=" + wWidth + ",height=" + wHeight + ",top=" + wTop + ",left=" + wLeft + ",dependent=yes,scrollbars=yes"); openWin.focus(); } function checkSize(){ var contentWidth = document.getElementById('Content').clientWidth; var contentHeight = document.getElementById('Content').clientHeight; if (windowSize('width') < contentWidth){ document.getElementById('Content').style.left = '0px'; document.getElementById('Content').style.marginLeft = '0px'; } else{ document.getElementById('Content').style.left = '50%'; document.getElementById('Content').style.marginLeft = '-' + parseInt(contentWidth / 2) + 'px'; } if (windowSize('height') < contentHeight){ document.getElementById('Content').style.top = '0px'; document.getElementById('Content').style.marginTop = '0px'; } else{ document.getElementById('Content').style.top = '50%'; document.getElementById('Content').style.marginTop = '-' + parseInt(contentHeight / 2) + 'px'; } } function windowSize(what){ var myWidth = 0, myHeight = 0; if (typeof(window.innerWidth) == 'number'){ //Non-IE myWidth = window.innerWidth; myHeight = window.innerHeight; } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)){ //IE 6+ in 'standards compliant mode' myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight; } else if (document.body && (document.body.clientWidth || document.body.clientHeight)){ //IE 4 compatible myWidth = document.body.clientWidth; myHeight = document.body.clientHeight; } if (what == 'width') return myWidth; else if (what == 'height') return myHeight; } var site_id = '1'; function maxengineSubmit(theform){ if ((theform.coupon_code.value.length > 0) && (site_id == '0')) theform.type.value = 'list'; else theform.type.value = 'hotel'; theform.submit(); switchEngine('visible'); }