﻿    /*************************************************************************
      This code is from Dynamic Web Coding at www.dyn-web.com
      Copyright 2001-5 by Sharon Paine 
      See Terms of Use at www.dyn-web.com/bus/terms.html
      regarding conditions under which you may use this code.
      This notice must be retained in the code as is!
    *************************************************************************/

    function LaunchModal(url, width, height, scrollbars, resizable)
    {
	    var modalWin = showModalDialog(url, window, 'status:No;resizable:' + resizable + ';dialogHeight:'+height+'px;dialogWidth:'+width+'px;center:Yes;help:No;');
	    return modalWin;
    }

    function ShowCalendar(TextBox)
    {
        var oReturnValue = LaunchModal('/calendar.aspx', 250, 170, false, false);
        
        if (oReturnValue != null)
        {
            document.getElementById(TextBox).value = oReturnValue;
        }
    }

    function OK()
    {
        window.returnValue = document.getElementById('txtDate').value;
        self.close();
    }
            
    function initScroller() {
      // arguments: id of layer that scrolls, width and height of scroller (of wn), 
      // number of items (including repeated 1st item), axis ("v" or "h")
      // set up pause/resume onmouseover/out? (true or false)
      var scr1 = new dw_scroller('cnt', 259, 126, 4, "v", true);
      scr1.setTiming(100, 4000);
    }


    function hideRoom(id) { 
        document.getElementById("room" + id).style.display="none";
        
    }

    function LaunchPopup(url, width, height, scrollbars, resizable, status) {
		    var intXPos = (screen.width / 2) - (width / 2)
		    var intYPos = (screen.height / 2) - (height / 2)
		    var popUpWin = open(url, '', 'toolbar=no,menubar=no,scrollbars=' + scrollbars + ',resizable=' + resizable + ',status=' + status + ',location=no,directories=no,copyhistory=no,height='+height+',width='+width+',left='+intXPos+',top='+intYPos);
	    }
    	
    function hideHotel(id) { 
        document.getElementById("hotel" + id).style.display="none";
        
    }

    function printPage(){
	    window.print();
    }

    function addToFavorites(url){
	    var title="EquaVista";
	    if (window.sidebar) { // Mozilla Firefox Bookmark
		    window.sidebar.addPanel(title, url,"");
	    } else if (window.external) { // IE Favorite
		    window.external.AddFavorite( url, title); 
	    }	else if (window.opera && window.print){ // Opera Hotlist
		    return true;
	    }
    }