﻿ function PrintThisPage() 
{ 
   var sOption="toolbar=yes,location=no,directories=yes,menubar=yes,"; 
       sOption+="scrollbars=yes,width=750,height=600,left=100,top=25"; 

   var sWinHTML = document.getElementById('contentstart').innerHTML; 
   
   var winprint=window.open("","",sOption); 
       winprint.document.open(); 
       winprint.document.write('<html><LINK href=PopUpStyle.css rel=Stylesheet><body><form>'); 
       winprint.document.write(sWinHTML);          
       winprint.document.write('</form></body></html>'); 
       winprint.document.close(); 
       winprint.focus(); 
}
function CheckDisplay(){ 
var nights
nights = document.getElementById('HiddenNightTextBox').value
if (navigator.appName == "Microsoft Internet Explorer")
{ 
for (var x = 1; x <= nights ; x++)
{
var y = 'row' + x;
document.getElementById(y).style.display='inline';
} 
}
else
{
for (var x = 1; x <= nights ; x++)
{
var y = 'row' + x;
document.getElementById(y).style.display='table-row';
} 
}
}

function checkDate(sender,args)
{
 if (sender._selectedDate < new Date()) 
            {
                alert("You cannot select a day earlier than today!");
                sender._selectedDate = new Date() ; 
                // set the date back to the current date
sender._textbox.set_Value(sender._selectedDate.format(sender._format))
            }
}
function ShowMyModalPopup(room) 
{ 
 var modal = $find('ModalPopupExtender1'); 
 modal.show(); 
  var label=document.getElementById('lblCode'); 
        label.innerHTML=room; 
   document.getElementById('link').src = room +".html";

}
function ShowMyModalPopup2(rate) 
{ 
 var modal = $find('ModalPopupExtender2'); 
 modal.show(); 
 var label=document.getElementById('Label13'); 
       label.innerHTML=rate; 
 for (var x = 1; x <= 10; x++)
 {
    var myGrid = document.getElementById("GridView4").rows(x).cells(0).innerText;
    //document.write(myGrid)
    //document.write(rate)
    if (rate == myGrid)
    {
        document.getElementById("<%=GridView4.ClientID %>").rows(x).style.display='block';
    } 
    else
    {
        document.getElementById("<%=GridView4.ClientID %>").rows(x).style.display='none';
    }
 }

 }
 //Hidden Rates Grid 2
 function ShowMyModalPopup3(rate) 
{ 
 var modal = $find('ModalPopupExtender3'); 
 modal.show(); 
 //var label=document.getElementById('Label19'); 
  //     label.innerHTML=rate; 
 for (var x = 1; x <= 10; x++)
 {
    var myGrid = document.getElementById("GridView5").rows(x).cells(0).innerText;
    //document.write(myGrid)
    //document.write(rate)
    
    if (rate == myGrid)
    {
        document.getElementById("<%=GridView5.ClientID %>").rows(x).style.display='block';
    } 
    else
    {
        document.getElementById("<%=GridView5.ClientID %>").rows(x).style.display='none';
    }
 }

 } 
 //Hidden Rates Grid 3
 function ShowMyModalPopup4(rate) 
{ 
 var modal = $find('ModalPopupExtender4'); 
 modal.show(); 
 //var label=document.getElementById('Label19'); 
  //     label.innerHTML=rate; 
 for (var x = 1; x <= 10; x++)
 {
    var myGrid = document.getElementById("GridView6").rows(x).cells(0).innerText;
    //document.write(myGrid)
    //document.write(rate)
    
    if (rate == myGrid)
    {
        document.getElementById("<%=GridView6.ClientID %>").rows(x).style.display='block';
    } 
    else
    {
        document.getElementById("<%=GridView6.ClientID %>").rows(x).style.display='none';
    }
 }

 } 
 //Hidden Rates Grid 4
 function ShowMyModalPopup5(rate) 
{ 
 var modal = $find('ModalPopupExtender5'); 
 modal.show(); 
 //var label=document.getElementById('Label19'); 
  //     label.innerHTML=rate; 
 for (var x = 1; x <= 10; x++)
 {
    var myGrid = document.getElementById("GridView11").rows(x).cells(0).innerText;
    //document.write(myGrid)
    //document.write(rate)
    
    if (rate == myGrid)
    {
        document.getElementById("<%=GridView11.ClientID %>").rows(x).style.display='block';
    } 
    else
    {
        document.getElementById("<%=GridView11.ClientID %>").rows(x).style.display='none';
    }
 }

 } 
 
  //Hidden Rates Grid 5
 function ShowMyModalPopup6(rate) 
{ 
 var modal = $find('ModalPopupExtender6'); 
 modal.show(); 
 //var label=document.getElementById('Label19'); 
  //     label.innerHTML=rate; 
 for (var x = 1; x <= 10; x++)
 {
    var myGrid = document.getElementById("GridView14").rows(x).cells(0).innerText;
    //document.write(myGrid)
    //document.write(rate)
    
    if (rate == myGrid)
    {
        document.getElementById("<%=GridView14.ClientID %>").rows(x).style.display='block';
    } 
    else
    {
        document.getElementById("<%=GridView14.ClientID %>").rows(x).style.display='none';
    }
 }

 } 
 
  //Hidden Rates Grid 6
 function ShowMyModalPopup7(rate) 
{ 
 var modal = $find('ModalPopupExtender7'); 
 modal.show(); 
 //var label=document.getElementById('Label19'); 
  //     label.innerHTML=rate; 
 for (var x = 1; x <= 10; x++)
 {
    var myGrid = document.getElementById("GridView16").rows(x).cells(0).innerText;
    //document.write(myGrid)
    //document.write(rate)
    
    if (rate == myGrid)
    {
        document.getElementById("<%=GridView16.ClientID %>").rows(x).style.display='block';
    } 
    else
    {
        document.getElementById("<%=GridView16.ClientID %>").rows(x).style.display='none';
    }
 }

 } 
 
  //Hidden Rates Grid 7
 function ShowMyModalPopup8(rate) 
{ 
 var modal = $find('ModalPopupExtender8'); 
 modal.show(); 
 //var label=document.getElementById('Label19'); 
  //     label.innerHTML=rate; 
 for (var x = 1; x <= 10; x++)
 {
    var myGrid = document.getElementById("GridView18").rows(x).cells(0).innerText;
    //document.write(myGrid)
    //document.write(rate)
    
    if (rate == myGrid)
    {
        document.getElementById("<%=GridView18.ClientID %>").rows(x).style.display='block';
    } 
    else
    {
        document.getElementById("<%=GridView18.ClientID %>").rows(x).style.display='none';
    }
 }

 } 
 
  //Hidden Rates Grid 8
 function ShowMyModalPopup9(rate) 
{ 
 var modal = $find('ModalPopupExtender9'); 
 modal.show(); 
 //var label=document.getElementById('Label19'); 
  //     label.innerHTML=rate; 
 for (var x = 1; x <= 10; x++)
 {
    var myGrid = document.getElementById("GridView20").rows(x).cells(0).innerText;
    //document.write(myGrid)
    //document.write(rate)
    
    if (rate == myGrid)
    {
        document.getElementById("<%=GridView20.ClientID %>").rows(x).style.display='block';
    } 
    else
    {
        document.getElementById("<%=GridView20.ClientID %>").rows(x).style.display='none';
    }
 }

 } 
 
  //Hidden Rates Grid 9
 function ShowMyModalPopup10(rate) 
{ 
 var modal = $find('ModalPopupExtender10'); 
 modal.show(); 
 //var label=document.getElementById('Label19'); 
  //     label.innerHTML=rate; 
 for (var x = 1; x <= 10; x++)
 {
    var myGrid = document.getElementById("GridView22").rows(x).cells(0).innerText;
    //document.write(myGrid)
    //document.write(rate)
    
    if (rate == myGrid)
    {
        document.getElementById("<%=GridView22.ClientID %>").rows(x).style.display='block';
    } 
    else
    {
        document.getElementById("<%=GridView22.ClientID %>").rows(x).style.display='none';
    }
 }

 } 
 
 
  //Hidden Rates Grid 9
 function ShowMyModalPopup11(rate) 
{ 
 var modal = $find('ModalPopupExtender11'); 
 modal.show(); 
 //var label=document.getElementById('Label19'); 
  //     label.innerHTML=rate; 
 for (var x = 1; x <= 10; x++)
 {
    var myGrid = document.getElementById("GridView24").rows(x).cells(0).innerText;
    //document.write(myGrid)
    //document.write(rate)
    
    if (rate == myGrid)
    {
        document.getElementById("<%=GridView24.ClientID %>").rows(x).style.display='block';
    } 
    else
    {
        document.getElementById("<%=GridView24.ClientID %>").rows(x).style.display='none';
    }
 }

 } 
 
 
 //Hide Window Pop Up
function HideModalPopup() 
{ 
  var modal = $find('ModalPopupExtender1'); 
  modal.hide(); 
}
function HideModalPopup2() 
{ 
  var modal = $find('ModalPopupExtender2'); 
  modal.hide(); 
}
function HideModalPopup3() 
{ 
  var modal = $find('ModalPopupExtender3'); 
  modal.hide(); 
}
function HideModalPopup4() 
{ 
  var modal = $find('ModalPopupExtender4'); 
  modal.hide(); 
}
function HideModalPopup5() 
{ 
  var modal = $find('ModalPopupExtender5'); 
  modal.hide(); 
}
function HideModalPopup6() 
{ 
  var modal = $find('ModalPopupExtender6'); 
  modal.hide(); 
}
function HideModalPopup7() 
{ 
  var modal = $find('ModalPopupExtender7'); 
  modal.hide(); 
}
function HideModalPopup8() 
{ 
  var modal = $find('ModalPopupExtender8'); 
  modal.hide(); 
}
function HideModalPopup9() 
{ 
  var modal = $find('ModalPopupExtender9'); 
  modal.hide(); 
}
function HideModalPopup10() 
{ 
  var modal = $find('ModalPopupExtender10'); 
  modal.hide(); 
}
function HideModalPopup11() 
{ 
  var modal = $find('ModalPopupExtender11'); 
  modal.hide(); 
}
