﻿function ControlFocus(obj, txt) {
    if (String(obj.value) == String(txt)) {
        obj.value = '';
    }
}
fixHeightHotel1 = function() {
    // Declare and initialize variables
    var divs, contDivs, maxHeight, divHeight, d;
    maxHeight = 0;
    contDivs = [];

    divs = document.getElementsByTagName('div'); 	// get all <div> elements in the document 
    for (var i = 0; i < divs.length; i++) {				// for all divs...
        if (/\bfixHeightHotel1\b/.test(divs[i].className)) {	// find those with the class attribute 'fixHeightHotel1'...
            d = divs[i];
            contDivs[contDivs.length] = d;

            // determine their height, defined as either offsetHeight or pixelHeight
            if (d.offsetHeight) { divHeight = d.offsetHeight; }
            else if (d.style.pixelHeight) { divHeight = d.style.pixelHeight; }

            // Keep track of the largest div height
            maxHeight = Math.max(maxHeight, divHeight);
            // alert(maxHeight);
        }
    }

    // assign all divs the height of the tallest div
    for (var i = 0; i < contDivs.length; i++) {


        //contDivs[i].style.height=maxHeight-12 + "px"; 

        contDivs[i].style.height = maxHeight + "px";
    }
}

fixHeightHotel2 = function() {
    // Declare and initialize variables
    var divs, contDivs, maxHeight, divHeight, d;
    maxHeight = 0;
    contDivs = [];

    divs = document.getElementsByTagName('div'); 	// get all <div> elements in the document 
    for (var i = 0; i < divs.length; i++) {				// for all divs...
        if (/\bfixHeightHotel2\b/.test(divs[i].className)) {	// find those with the class attribute 'fixHeightHotel2'...
            d = divs[i];
            contDivs[contDivs.length] = d;

            // determine their height, defined as either offsetHeight or pixelHeight
            if (d.offsetHeight) { divHeight = d.offsetHeight; }
            else if (d.style.pixelHeight) { divHeight = d.style.pixelHeight; }

            // Keep track of the largest div height
            maxHeight = Math.max(maxHeight, divHeight);
            // alert(maxHeight);
        }
    }

    // assign all divs the height of the tallest div
    for (var i = 0; i < contDivs.length; i++) {


        //contDivs[i].style.height=maxHeight-12 + "px"; 

        contDivs[i].style.height = maxHeight + "px";
    }
}


// Run fixHeightHotel2 on page load 
window.onload = function() {
if (document.getElementsByTagName) { fixHeightHotel1(); fixHeightHotel2(); }
}