﻿// JScript File

 
            
   function clearSearchBox(thisBox)
    {
       if (thisBox.value == '')
       {
          thisBox.value = 'Search By Destination';
       }
       search();
    }
    function SearchBox(thisBox)
    {
        thisBox.value = '';
        search();
    }
    function SearchBoxChanged()
     {  
        
        setTimeout("search()", 100);

     }
    function clickButton(e, buttonid)
    { 
        var bt = document.getElementById(buttonid); 
        if (typeof bt == 'object')
        {	
            if (is_ie)
            {       
                if (event.keyCode == 13)
                {	
                    window.location = "Search.aspx?str=" +  document.getElementById("ctl00_ContentPlaceHolder1_divText").innerHTML;     
                    return false; 
                }   
            }       
            if(is_nav)
            {	    
                if (e.keyCode == 13)
                {   
                    window.location = "Search.aspx?str=" +  document.getElementById("ctl00_ContentPlaceHolder1_divText").innerHTML;       
                    return false; 
                }   
            }       
        }           
    } 
    
     
     function search()
     {      
   
        top.frames[0].location.href="FramedPages/DefaultPageSearch.aspx?str=" + document.getElementById("ctl00_ContentPlaceHolder1_tbLiveSearch").value ;
         //alert("1")
              
        if(document.getElementById("ctl00_ContentPlaceHolder1_tbLiveSearch").value == 'Search By Destination')
        {
         document.getElementById("divSearch").style.display = "none";
        
        }else{
            if(document.getElementById("ctl00_ContentPlaceHolder1_tbLiveSearch").value == '')
            {
             document.getElementById("divSearch").style.display = "none";
            }else{          
             document.getElementById("divSearch").style.display = "block";
             //alert("1")
            }
             
        }
        
     }
     
     
    
    function clearSearchBox1(thisBox)
    {
       if (thisBox.value == '')
       {
          thisBox.value = 'City or town';
       }
       search1();
    }
    function SearchBox1(thisBox)
    {
        thisBox.value = '';
        search1();
    }
    function SearchBoxChanged1()
     {  
        
        setTimeout("search1()", 100);

     }
     
     function search1()
     {
   
        top.frames[0].location.href="FramedPages/PackageSearch.aspx?str=" + document.getElementById("ctl00_ContentPlaceHolder1_tbCitySearch").value ;
         //alert("1")
              
        if(document.getElementById("ctl00_ContentPlaceHolder1_tbCitySearch").value == 'Search By Destination')
        {
         document.getElementById("divSearch").style.display = "none";
        
        }else{
            if(document.getElementById("ctl00_ContentPlaceHolder1_tbCitySearch").value == '')
            {
             document.getElementById("divSearch").style.display = "none";
            }else{          
             document.getElementById("divSearch").style.display = "block";
             //alert("1")
            }
             
        }
        
     }
     
     
      function clearSearchBox2(thisBox)
    {
       if (thisBox.value == '')
       {
          thisBox.value = 'Key Words';
       }
       search2();
    }
    function SearchBox2(thisBox)
    {
        thisBox.value = '';
        search1();
    }
    function SearchBoxChanged2()
     {  
        
        setTimeout("search2()", 100);

     }
     
     function search2()
     {
   
        top.frames[0].location.href="FramedPages/AccomodationSearch.aspx?str=" + document.getElementById("ctl00_ContentPlaceHolder1_tbKeyword").value ;
         //alert("1")
              
        if(document.getElementById("ctl00_ContentPlaceHolder1_tbKeyword").value == 'Key Words')
        {
         document.getElementById("divSearch").style.display = "none";
        
        }else{
            if(document.getElementById("ctl00_ContentPlaceHolder1_tbKeyword").value == '')
            {
             document.getElementById("divSearch").style.display = "none";
            }else{          
             document.getElementById("divSearch").style.display = "block";
             //alert("1")
            }
             
        }
        
     }
     
    
     function SrchBTNCl(){     
         
         if(document.getElementById("ctl00_ContentPlaceHolder1_tbLiveSearch").value != 'Search By Destination')
         {
              window.location = "Search.aspx?str=" +  document.getElementById("ctl00_ContentPlaceHolder1_tbLiveSearch").value;
         }
     }
     
     
     
     
     
     
    