<!--

function preloadImages()
{
    if (document.images)
    {
        buttonHomeOn = new Image(130, 25);
        buttonHomeOff = new Image(130, 25);
        buttonBookingsOn = new Image(130, 25);
        buttonBookingsOff = new Image(130, 25);
        buttonRoomsOn = new Image(130, 25);
        buttonRoomsOff = new Image(130, 25);
        buttonFacilitiesOn = new Image(130, 25);
        buttonFacilitiesOff = new Image(130, 25);
        buttonSpecialsOn = new Image(130, 25);
        buttonSpecialsOff = new Image(130, 25);
        buttonAttractionsOn = new Image(130, 25);
        buttonAttractionsOff = new Image(130, 25);
        buttonLocationOn = new Image(130, 25);
        buttonLocationOff = new Image(130, 25);
        buttonContactOn = new Image(130, 25);
        buttonContactOff = new Image(130, 25);
        buttonFlindersOn = new Image(180, 20);
        buttonFlindersOff = new Image(180, 20);
        buttonSwanstonOn = new Image(180, 20);
        buttonSwanstonOff = new Image(180, 20);
        buttonSydneyOn = new Image(180, 20);
        buttonSydneyOff = new Image(180, 20);
        buttonBookingOff = new Image(180, 20);
        buttonBookingOn = new Image(180, 20);

        buttonHomeOn.src = "images/buttons/home_on.gif";
        buttonHomeOff.src = "images/buttons/home_off.gif";
        buttonBookingsOn.src = "images/buttons/bookings_on.gif";
        buttonBookingsOff.src = "images/buttons/bookings_off.gif";
        buttonRoomsOn.src = "images/buttons/rooms_on.gif";
        buttonRoomsOff.src = "images/buttons/rooms_off.gif";
        buttonFacilitiesOn.src = "images/buttons/facilities_on.gif";
        buttonFacilitiesOff.src = "images/buttons/facilities_off.gif";
        buttonSpecialsOn.src = "images/buttons/specials_on.gif";
        buttonSpecialsOff.src = "images/buttons/specials_off.gif";
        buttonAttractionsOn.src = "images/buttons/attractions_on.gif";
        buttonAttractionsOff.src = "images/buttons/attractions_off.gif";
        buttonLocationOn.src = "images/buttons/location_on.gif";
        buttonLocationOff.src = "images/buttons/location_off.gif";
        buttonContactOn.src = "images/buttons/contact_on.gif";
        buttonContactOff.src = "images/buttons/contact_off.gif";
        buttonFlindersOn.src = "images/buttons/flinders_on.gif";
        buttonFlindersOff.src = "images/buttons/flinders_off.gif";
        buttonSwanstonOn.src = "images/buttons/swanston_on.gif";
        buttonSwanstonOff.src = "images/buttons/swanston_off.gif";
        buttonSydneyOn.src = "images/buttons/sydney_on.gif";
        buttonSydneyOff.src = "images/buttons/sydney_off.gif";
        buttonBookingOn.src = "images/buttons/check_availability_on.gif";
        buttonBookingOff.src = "images/buttons/check_availability_off.gif";
    }
    else
    {
        buttonHomeOn = "";
        buttonHomeOff = "";
        buttonBookingsOn = "";
        buttonBookingsOff = "";
        buttonRoomsOn = "";
        buttonRoomsOff = "";
        buttonFacilitiesOn = "";
        buttonFacilitiesOff = "";
        buttonSpecialsOn = "";
        buttonSpecialsOff = "";
        buttonAttractionsOn = "";
        buttonAttractionsOff = "";
        buttonLocationOn = "";
        buttonLocationOff = "";
        buttonContactOn = "";
        buttonContactOff = "";
        buttonFlindersOn = "";
        buttonFlindersOff = "";
        buttonSwanstonOn = "";
        buttonSwanstonOff = "";
        buttonSydneyOn = "";
        buttonSydneyOff = "";
        buttonBookingOff = "";
        buttonBookingOn = "";
    }
}

function changeImage(imageName, newImage)
{
    if (document.images)
    {
        document[imageName].src = eval(newImage + ".src");
    }
}

function checkFields(frm)
{
    if(frm.inName.value == "")
    {
        alert("Please enter your name");
    }
    else if(frm.inPhone.value == "")
    {
        alert("Please enter your phone number");
    }
    else if(frm.inEmail.value == "")
    {
        alert("Please enter your email address");
    }
    else if(frm.inEnquiryDetails.value == "")
    {
        alert("Please enter some enquiry details");
    }
    else
    {
        frm.submit();
    }
}

function imagePopup(imgName, imgWidth, imgHeight)
{
     var width = imgWidth + 30;
     var height = imgHeight + 30;

     var str = 'height=' + height + ',innerHeight=' + height;
     str += ',width=' + width + ',innerWidth=' + width;

     if (window.screen)
     {
         var ah = screen.availHeight - 100;
         var aw = screen.availWidth - 10;
         var xc = (aw - width) / 2;
         var yc = (ah - height) / 2;
         str += ',left=' + xc + ',screenX=' + xc;
         str += ',top=' + yc + ',screenY=' + yc;
     }

     window.open(imgName,'imageWindow','scrollbars=no,status=no,menubar=no,toolbar=no,' + str);
}
    function openWR()
    {
        var width = 685;
        var height = 475;
        var str = 'height=' + height + ',innerHeight=' + height;
        str += ',width=' + width + ',innerWidth=' + width;

        if (window.screen)
        {
            var ah = screen.availHeight - 100;
            var aw = screen.availWidth - 10;
            var xc = (aw - width) / 2;
            var yc = (ah - height) / 2;
            str += ',left=' + xc + ',screenX=' + xc;
            str += ',top=' + yc + ',screenY=' + yc;
        }
        window.open('http://www.unilodgehotel.com.au/obmc22/cancel_res.php?page=chain&ln=en','obmc21R','scrollbars=1,status=0,menubar=0,toolbar=1,resizable=1' + str);
        return false;
    }

//-->
