var is_ie = navigator.appName == 'Microsoft Internet Explorer'; var is_op = navigator.appName == 'Opera' ? true : false; var is_ns = !is_ie && !is_op ? true : false; //simple class for point function Point(x, y) { this.x = x; this.y = y; } //rectangle class for blocks like1st level menu item and 2nd level menu block function rectangle() { this.top = 0; this.bottom = 0; this.left = 0; this.right = 0; //class member - checks whether given point is in current rectangle this.IsPointIn = function (point) { var is_in_rectangle = true; if ((point.x > this.right + 5) || (point.x < this.left - 5) || (point.y > this.bottom + 5) || (point.y < this.top - 5)) { is_in_rectangle = false; } return is_in_rectangle; } } //object instance for second level menu block var m_block2 = new rectangle(); //object instance for first level menu item var m_menuitem = new rectangle(); //triggers mose track in BODY.onmousemove event, when menu-block is hidden do not track mose move var m_do_mouse_track = false; //current opened 2nd level menu block id, to be closed in BODY.onmousemove event var m_opened_id; //fired onmousemove for BODY function bodymousemove(e) { if (m_do_mouse_track) { if (!e) var e = window.event; var point = new Point(e.clientX, e.clientY); if (!m_menuitem.IsPointIn(point) && !m_block2.IsPointIn(point)) { he(m_opened_id); he('frmMenu2'); m_do_mouse_track = false; } } } function hl2l(elem) { elem.className = "item2ndl_hl"; } function unhl2l(elem) { elem.className = "item2ndl"; } //display 2ndlevel menu block function d2l(menu_item_1stl, menu_block_2ndl_id) { //before enabling new 2ndlevel menu disable the last opened he(m_opened_id); he('frmMenu2'); //enable new 2ndlevel menu block se(menu_block_2ndl_id); //move 2nslevel menu block under the selcted 1st level menu item var menu_block_2ndl = document.getElementById(menu_block_2ndl_id); var frmMenu2 = document.getElementById('frmMenu2'); if (menu_block_2ndl != null) { //get rectangle coordinates of 2ndlevel menu block m_block2.top = getAbsPos(menu_block_2ndl, "Top"); m_block2.left = getAbsPos(menu_block_2ndl, "Left"); m_block2.right = m_block2.left + menu_block_2ndl.offsetWidth; m_block2.bottom = m_block2.top + menu_block_2ndl.offsetHeight; var nLeft = getAbsPos(menu_item_1stl, "Left") - 7; var nTop = getAbsPos(menu_item_1stl, "Top") + menu_item_1stl.offsetHeight - 1; //menu_block_2ndl.style.left = getAbsPos(menu_item_1stl, "Left") - 7; //menu_block_2ndl.style.top = getAbsPos(menu_item_1stl, "Top") + menu_item_1stl.offsetHeight - 1; $("#" + menu_block_2ndl_id).css("left", nLeft + "px"); $("#" + menu_block_2ndl_id).css("top", nTop + "px"); frmMenu2.style.left = menu_block_2ndl.style.left; frmMenu2.style.top = menu_block_2ndl.style.top; frmMenu2.width = menu_block_2ndl.offsetWidth; frmMenu2.height = menu_block_2ndl.offsetHeight; frmMenu2.style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)'; he(menu_block_2ndl_id); se('frmMenu2') se(menu_block_2ndl_id); } //get rectangle coordinates of 1stlevel menu item m_menuitem.top = getAbsPos(menu_item_1stl, "Top"); m_menuitem.left = getAbsPos(menu_item_1stl, "Left"); m_menuitem.right = m_menuitem.left + menu_item_1stl.offsetWidth; m_menuitem.bottom = m_menuitem.top + menu_item_1stl.offsetHeight; m_do_mouse_track = true; m_opened_id = menu_block_2ndl_id; } //show elem function se(id) { she(id, true) } //hide elem function he(id) { she(id, false) } //internal function for show/hide function she(id, blnShow) { var elem = document.getElementById(id); if (elem != null) { elem.style.display = blnShow?'block':'none'; } } function getAbsPos(o, p) { var i = 0; while (o != null) { i += o["offset"+p]; o = o.offsetParent; } return i; } function displayTab(this_elem_id, tab_id) { var this_elem = document.getElementById(this_elem_id); var children = this_elem.parentNode.parentNode.childNodes; for (var i = 0; i < children.length; i ++) { for (var j = 0; j < children[i].childNodes.length; j ++) { if (children[i].childNodes[j].tagName.toLowerCase() == 'div') { if (children[i].childNodes[j] == this_elem) { children[i].childNodes[j].className = ''; } else if (children[i].childNodes[j].className != 'blnk_gr') { children[i].childNodes[j].className = 'blnk'; } } } } var tabs = document.getElementById('tabs'); if (tabs != null) { for (var i = 0; i < tabs.childNodes.length; i ++) { if (tabs.childNodes[i].id == tab_id) { tabs.childNodes[i].style.display = 'block'; } else { tabs.childNodes[i].style.display = 'none'; } } } var tabnoline = document.getElementById('tabnoline'); var width = this_elem.parentNode.offsetWidth + this_elem.parentNode.previousSibling.offsetWidth + this_elem.parentNode.nextSibling.offsetWidth; tabnoline.style.width = width>4?width - 4:0; tabnoline.style.top = getAbsPos(this_elem.parentNode.previousSibling, "Top") + this_elem.parentNode.previousSibling.offsetHeight - 1; tabnoline.style.left = getAbsPos(this_elem.parentNode.previousSibling, "Left") + 2; tabnoline.style.display = 'inline'; tabnoline.style.position = 'absolute'; } function wo(url, target, params) { window.open( url, target, 'location=0,menubar=0,titlebar=0,scrollbars=0,sstatus=0,toolbar=0' + (params!=''?',' + params:'')); } function loadPdf(strPath) { var frmD = document.getElementById('frmD'); if (frmD != null) { frmD.style.display = 'block'; frmD.src = "/deckplan.aspx?src=" + strPath; } } function hafen_change(elem_sel) { for (var i = 0; i < elem_sel.options.length; i ++) { var div_hafen = document.getElementById("hafen_" + elem_sel[i].value); if (div_hafen != null) { div_hafen.style.display = "none"; } } var div_hafen = document.getElementById("hafen_" + elem_sel[elem_sel.selectedIndex].value); if (div_hafen != null) { div_hafen.style.display = "block"; } } function insurance_click(elem) { if (elem.checked) { document.getElementById('cbReiseversicherung').style.display = ''; document.getElementById('txtReiseversicherung').style.display = ''; } else { document.getElementById('cbReiseversicherung').style.display = 'none'; document.getElementById('txtReiseversicherung').style.display = 'none'; } }// function IframeTransparentBG(elem_id) { var elem = document.getElementById(elem_id); var ifrm = document.getElementById('frmRooms'); if (elem == null) return; if (ifrm == null) { var ifrm = document.createElement("IFRAME"); ifrm.id = 'frmRooms'; document.body.appendChild(ifrm); $('#frmRooms').attr('frameborder', '0'); $('#frmRooms').attr('src', '/i/x.gif'); ifrm.style.zIndex = '9999'; ifrm.style.position = 'absolute'; ifrm.style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)'; } ifrm.style.display = 'none'; ifrm.style.left = elem.style.left; ifrm.style.top = elem.style.top; ifrm.style.width = elem.style.width; ifrm.style.height = elem.style.height; $('#frmRooms').hide(); //$('#'+elem_id).hide(); $('#frmRooms').show(); //$('#'+elem_id).show(); }//IframeTransparentBG function openGS() { var sWidth = ""; if (is_ie) { sWidth = "684"; } else { sWidth = "668"; } window.open( '/Gewinnspiel.aspx', 'blank', 'localtion=0,menubar=0,resizable=0,titlebar=0,toolbar=0,width='+sWidth+'px,height=750px,scrollbars=1'); } function appendRadio(elem, name, id, text, value, className) { $(elem).append("
"); } function fBlock() { $.blockUI({ message: $("#loadingRcclDiv").get(0) }); } function openKatalog(theURL, name) { var features = 'hotkeys=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=790,height=700'; var newWindow = window.open(theURL, name, features); newWindow.focus(); }