﻿// JScript File



function formSubmit(event, button) {
    if (event.keyCode == 13) {
        document.getElementById(button).click();
        return false;
    }
    if (event.keyCode == 11) {
        document.getElementById(button).click();
        return false;
    }
}
function clickSubmit(event, button) {
    document.getElementById(button).click();
    return false;
}

function setToDate() {
    //    var dt;
    //    dt=document.getElementById('ctl00_ContentPlaceHolder1_Fpsrch1_txtcheckin').value;
    //    var x =Date;
    //    x.parse(dt);
    //    x=x+1
    //    document.getElementById('ctl00_ContentPlaceHolder1_Fpsrch1_txtcheckout').value=x;
}

function showpan() {


    //document.getElementById("progress").innerHTML = "<img src=/images/wait.gif style='Z-Index: 11;' />";
    //main.style.visibility="visible";
    //document.getElementById("proc1").style.visibility="hidden";
    //document.getElementById("progress").innerHTML = "<img src=/images/wait.gif style='Z-Index: 11;' />";

    document.getElementById("blnk").style.display = ""
    document.getElementById("proc1").style.display = ""
    setTimeout("setpbar()", 200);

}

function hidepan() {

    if (typeof (Page_ClientValidate) == 'function') {
        Page_ClientValidate();
    }

    if (Page_IsValid) {

        //main.style.visibility="hidden";
        document.getElementById("blnk").style.visibility = "visible";
        document.getElementById("blnk").style.height = getDocHeight() + 'px'
        document.getElementById("proc1").style.visibility = "visible";
        //document.getElementById("progress").innerHTML = "<img src=/images/wait.gif style='Z-Index: 11;' />";
        document.getElementById("proc1").style.display = ""
        document.getElementById("blnk").style.display = ""
        document.getElementById("blnk").style.visibility = "visible";
        document.getElementById("proc1").style.visibility = "visible";
        setTimeout("setpbar()", 200);
    }
}

function setpbar() {
    try {
        document.getElementById("pbar").src = "/images/wait.gif";
    }
    catch (ex)
         { }

}

function showwait() {
    //document.getElementById("progress").innerHTML = "<img src=/images/wait.gif style='Z-Index: 11;' />";
    document.getElementById("blnk").style.visibility = "visible";
    document.getElementById("blnk").style.height = getDocHeight() + 'px'
    document.getElementById("proc1").style.visibility = "visible";
}

function getDocHeight() {
    var D = document;
    return Math.max(
        Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
        Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
        Math.max(D.body.clientHeight, D.documentElement.clientHeight)
    );
}


function pageLoad() {
    // set form action
    
    try
    {

    $get('aspnetForm').action=    document.location.href;
       
    }
    catch(e)
    {}

        

}



function showrooms() {
    var q;
    var h;
    q = document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_dlrooms").value

    h = (q * 19) + 42
    document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_pnrooms").style.height = h + 'px'

}

function showroomtype(x) {
    //		    var q; 
    //		    if (x==1) 
    //		    {
    //		     
    //		     q=document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_dlAd1").value
    //		     if (q==2) 
    //		       document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_dlRm1").style.visibility= 'visible';
    //		     }
    //		     
    //		    if (x==2) 
    //		    {
    //		     
    //		     q=document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_dlAd2").value
    //		     if (q==2) document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_dlRm2").style.visibility= 'visible';
    //		    }
    //		     if (x==3) 
    //		    {
    //		     document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_dlRm3").style.visibility= 'hidden';
    //		     q=document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_dlAd3").value
    //		     if (q==2) document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_dlRm3").style.visibility= 'visible';
    //		    }
}

function showchildage(x) {
    var q;
    document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_labchld").style.visibility = 'hidden';
    if (x == 1) {
        document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_r1ch1").style.visibility = 'hidden';
        document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_r1ch2").style.visibility = 'hidden';

        q = document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_dlChld1").value
        if (q == 1) {
            document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_r1ch1").style.visibility = 'visible';
            document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_labchld").style.visibility = 'visible';
        }
        if (q == 2) {
            document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_r1ch1").style.visibility = 'visible';
            document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_r1ch2").style.visibility = 'visible';
            document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_labchld").style.visibility = 'visible';
        }
    }

    if (x == 2) {
        document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_r2ch1").style.visibility = 'hidden';
        document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_r2ch2").style.visibility = 'hidden';

        q = document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_dlChld2").value
        if (q == 1) {
            document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_r2ch1").style.visibility = 'visible';
            document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_labchld").style.visibility = 'visible';
        }
        if (q == 2) {
            document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_r2ch1").style.visibility = 'visible';
            document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_r2ch2").style.visibility = 'visible';
            document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_labchld").style.visibility = 'visible';
        }
    }

    if (x == 3) {
        document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_r3ch1").style.visibility = 'hidden';
        document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_r3ch2").style.visibility = 'hidden';

        q = document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_dlChld3").value
        if (q == 1) {
            document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_r3ch1").style.visibility = 'visible';
            document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_labchld").style.visibility = 'visible';
        }
        if (q == 2) {
            document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_r3ch1").style.visibility = 'visible';
            document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_r3ch2").style.visibility = 'visible';
            document.getElementById("ctl00_ContentPlaceHolder1_Leftsrch1_labchld").style.visibility = 'visible';
        }
    }


}
function fpshowrooms() {
    var q;
    var h;
    q = document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_dlrooms").value

    h = (q * 18) + 19
    document.getElementById("pnrooms").style.height = h + 'px'
}

function fpshowroomtype(x) {
    //		    var q; 
    //		    if (x==1) 
    //		    {
    //		     document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_dlRm1").style.visibility= 'hidden';
    //		     q=document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_dlAd1").value
    //		     if (q==2) 
    //		       document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_dlRm1").style.visibility= 'visible';
    //		     }
    //		     
    //		    if (x==2) 
    //		    {
    //		     document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_dlRm2").style.visibility= 'hidden';
    //		     q=document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_dlAd2").value
    //		     if (q==2) document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_dlRm2").style.visibility= 'visible';
    //		    }
    //		     if (x==3) 
    //		    {
    //		     document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_dlRm3").style.visibility= 'hidden';
    //		     q=document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_dlAd3").value
    //		     if (q==2) document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_dlRm3").style.visibility= 'visible';
    //		    }
}

function fpshowchildage(x) {
    var q;
    document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_labchld").style.visibility = 'hidden';
    if (x == 1) {
        document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_r1ch1").style.visibility = 'hidden';
        document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_r1ch2").style.visibility = 'hidden';

        q = document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_dlChld1").value
        if (q == 1) {
            document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_r1ch1").style.visibility = 'visible';
            document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_labchld").style.visibility = 'visible';
        }
        if (q == 2) {
            document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_r1ch1").style.visibility = 'visible';
            document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_r1ch2").style.visibility = 'visible';
            document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_labchld").style.visibility = 'visible';
        }
    }

    if (x == 2) {
        document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_r2ch1").style.visibility = 'hidden';
        document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_r2ch2").style.visibility = 'hidden';

        q = document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_dlChld2").value
        if (q == 1) {
            document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_r2ch1").style.visibility = 'visible';
            document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_labchld").style.visibility = 'visible';
        }
        if (q == 2) {
            document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_r2ch1").style.visibility = 'visible';
            document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_r2ch2").style.visibility = 'visible';
            document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_labchld").style.visibility = 'visible';
        }
    }

    if (x == 3) {
        document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_r3ch1").style.visibility = 'hidden';
        document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_r3ch2").style.visibility = 'hidden';

        q = document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_dlChld3").value
        if (q == 1) {
            document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_r3ch1").style.visibility = 'visible';
            document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_labchld").style.visibility = 'visible';
        }
        if (q == 2) {
            document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_r3ch1").style.visibility = 'visible';
            document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_r3ch2").style.visibility = 'visible';
            document.getElementById("ctl00_ContentPlaceHolder1_fpsrch1_labchld").style.visibility = 'visible';
        }
    }


}

function dtshowrooms() {
    var q;
    var h;
    q = document.getElementById("dlrooms").value

    h = (q * 18) + 19
    document.getElementById("pnrooms").style.height = h + 'px'
}

function dtshowroomtype(x) {
    var q;
    if (x == 1) {
        document.getElementById("dlRm1").style.visibility = 'hidden';
        q = document.getElementById("dlAd1").value
        if (q == 2)
            document.getElementById("dlRm1").style.visibility = 'visible';
    }

    if (x == 2) {
        document.getElementById("dlRm2").style.visibility = 'hidden';
        q = document.getElementById("dlAd2").value
        if (q == 2) document.getElementById("dlRm2").style.visibility = 'visible';
    }
    if (x == 3) {
        document.getElementById("dlRm3").style.visibility = 'hidden';
        q = document.getElementById("dlAd3").value
        if (q == 2) document.getElementById("dlRm3").style.visibility = 'visible';
    }
}

// JScript File
var xx
var yy
var city
var url

function openw(url) {
    window.open(url, "book");
}

function openmap(city, xx) {
    window.open("/maps/vmap.aspx?city=" + city + "&pid=" + xx, "viewmap", "resizable=yes,Width=800, Height=600");
}


function sw(pl, aid) {

    var theForm = document.forms['aspnetForm'];
    if (!theForm) {
        theForm = document.getElementById("img1");
    }

    if (pl == 1) theForm.src = "/fs/" + aid + "/" + aid + "-1.jpg";
    if (pl == 2) theForm.src = "/fs/" + aid + "/" + aid + "-2.jpg";
    if (pl == 3) theForm.src = "/fs/" + aid + "/" + aid + "-3.jpg";
    if (pl == 4) theForm.src = "/fs/" + aid + "/" + aid + "-4.jpg";
    if (pl == 5) theForm.src = "/fs/" + aid + "/" + aid + "-5.jpg";
    if (pl == 6) theForm.src = "/fs/" + aid + "/" + aid + "-6.jpg";
    if (pl == 7) theForm.src = "/fs/" + aid + "/" + aid + "-7.jpg";
    if (pl == 8) theForm.src = "/fs/" + aid + "/" + aid + "-8.jpg";
    if (pl == 9) theForm.src = "/fs/" + aid + "/" + aid + "-9.jpg";
    if (pl == 10) theForm.src = "/fs/" + aid + "/" + aid + "-10.jpg";
    if (pl == 11) theForm.src = "/fs/" + aid + "/" + aid + "-11.jpg";
    if (pl == 12) theForm.src = "/fs/" + aid + "/" + aid + "-12.jpg";
    if (pl == 13) theForm.src = "/fs/" + aid + "/" + aid + "-13.jpg";
    if (pl == 14) theForm.src = "/fs/" + aid + "/" + aid + "-14.jpg";
    if (pl == 15) theForm.src = "/fs/" + aid + "/" + aid + "-15.jpg";
    if (pl == 16) theForm.src = "/fs/" + aid + "/" + aid + "-16.jpg";
    if (pl == 17) theForm.src = "/fs/" + aid + "/" + aid + "-17.jpg";
    if (pl == 18) theForm.src = "/fs/" + aid + "/" + aid + "-18.jpg";
    if (pl == 19) theForm.src = "/fs/" + aid + "/" + aid + "-19.jpg";
    if (pl == 20) theForm.src = "/fs/" + aid + "/" + aid + "-20.jpg";

}


function showwait() {
    document.getElementById("progress").innerHTML = "<img src=/images/wait.gif />";
}

				