// Home Check Availability Form
function getReservation(frm)
{

var width = screen.width-100;
var height = screen.height-100;
var arrival_date=frm.arrival_date.value;
var departure_date=frm.departure_date.value;
var adults = frm.adults.value;
var children = frm.children.value;
var qString ="Hotel=73&Chain=73&lang=1&arrive=" + arrival_date +  "&depart=" + departure_date + "&Adult=" + adults + "&Child=" + children + "&step=2";	

var features="top=0,left=0,scrollbars=yes,toolbar=no,resizable=1,width=" + width + ",height=" + height;
 newWindow=window.open("https://reservations.synxis.com/LBE/rez.aspx?"+qString,"Reserve",features);
}

// Check Availability Advanced Form
function getReservationAdv(frm)
{

var width = screen.width-100;
var height = screen.height-100;
var arrival_date=frm.arrival_date.value;
var departure_date=frm.departure_date.value;
var adults = frm.adults.value;
var children = frm.children.value;
var room = frm.room.value;
var promo = frm.promo.value;
var qString ="Hotel=73&Chain=73&lang=1&arrive=" + arrival_date +  "&depart=" + departure_date + "&Adult=" + adults + "&child=" + children + "&room=" + room + "&promo=" + promo + "&step=2";	

var features="top=0,left=0,scrollbars=yes,toolbar=no,resizable=1,width=" + width + ",height=" + height;
 newWindow=window.open("https://reservations.synxis.com/LBE/rez.aspx?"+qString,"Reserve",features);
}


// Open New Window
function openWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// Homepage Random Images
var theImages = new Array()

theImages[0] = 'images/home-package-photo1.jpg'
theImages[1] = 'images/home-package-photo2.jpg'
theImages[2] = 'images/home-package-photo3.jpg'
theImages[3] = 'images/home-package-photo4.jpg'
theImages[4] = 'images/home-package-photo5.jpg'

var j = 0
var p = theImages.length;
var preBuffer = new Array()

for (i = 0; i < p; i++){
preBuffer[i] = new Image()
preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));

function showImage(){
if(whichImage==0){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=94 height=94>');
}
else if(whichImage==1){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=94 height=94>');
}
else if(whichImage==2){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=94 height=94>');
}
else if(whichImage==3){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=94 height=94>');
}
else if(whichImage==4){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=94 height=94>');
}

}
