﻿function showGuarateeDetails(){ 
    //alert('hi5');
    //var oPos = GetTopLeftPosition(document.getElementById('btnGoogleCorner')); 
    TagToTip('over_map_info', FIX, [200, 120], TITLE, '&nbsp;Search Results Info'); 
} 

function showTermsWindow(){
    //TagToTip('divTerms', LEFT, true, TITLE, 'Booking Terms and Conditions');
    alert('By proceeding with your booking request or general enquiry, you agree to the following terms and conditions:\n\n' + 
    '1. The check is a no obligation check, and no booking will exist until you have been contacted by the accommodation(s) and you subsequently agree to stay at the accommodation(s). \n\n' + 
    '2. Any booking that arises from our booking service will be a contract between you and the accommodation(s) and we will have no part in the contract and cannot be responsible in any way for your booking. \n\n' + 
    '3. You will be entered into our Lodging Club. You will receive an email conforming this and an unsubscribe link.');
}
var text = 'Town, City, County or State';
function ontxtblur(txt){
    var textb = document.getElementById(txt);
    if (textb.value=='') {
        textb.value=text;
        textb.style.color="#a9a9a9";
    } 
}
function ontxtfocus(txt) {
    var textb = document.getElementById(txt);
    if (textb.value==text) {
        textb.value='';
    }
    textb.style.color="#000000";
}

function openBookingForm(id){ 
    var frame = document.getElementById('booking_' + id); 
    var hidden = document.getElementById('OpenedForms');
    if (frame.style.display == 'none'){ 
        frame.src = 'BookingForm.aspx?id=' + id + '&l=<%=IIF(enquiry="ENQUIRY", "", "us") %>'
        frame.style.display = 'block';
        frame.parentNode.style.display = 'block';
        //Close another forms
        var arr = hidden.value.split(";");
        for (i=0;i<arr.length;i++){
            //alert(arr[i]);
            if (arr[i] != ''){
                document.getElementById('booking_' + arr[i]).style.display = 'none';
                document.getElementById('booking_' + arr[i]).src = '';
                hidden.value = hidden.value.replace(arr[i] + ";", "");
            }
        } 
    hidden.value += id + ";";
    }else {
        frame.style.display = 'none';
        frame.parentNode.style.display = 'none';
        frame.src = '';
        hidden.value = hidden.value.replace(id + ";", "");
    }
}

function showLowerRatesMsg(){
    alert('You cant get Lower Room Rates\n anywhere else on the Internet.\n\nWe offer the best, most competative\nrates with nothing to pay until departure*.\n\nBook now at the lowest rates with\ninstant booking confirmations.\n\n Instant booking confirmations available\nat listings that offer real time bookings\nand availability checking.\n\n*These listings also offer guaranteed\nreservations with nothing to pay\nuntil deparrture.');
}

function showTop(){
    var dr = document.getElementById('tr_top_listings');
    var frame = document.getElementById('frame_top_listings');
    if (dr.className=='invisible'){
        frame.src='BestDeals.aspx';
        dr.className = 'visible';
    } else {
        frame.src='';
        dr.className = 'invisible';
    }
}

function showGoogleMap(){
    var frame = document.getElementById('google_frame').style.height='260px';
}
