// $Header: $
/***************************************************************************
 * Automatic Image Popup
 * Copyright 2002 by David Schontzler | www.stilleye.com
 * Free to use under GNU General Public License as long as this message
 *  remains intact.
 * Description:  Automate your image popup windows (centered and sized)
 * URI: http://www.stilleye.com/scripts/iPop
 ***************************************************************************
 * Version: 1.0
 ***************************************************************************/
function iPop(img, w, h, ttl){
    var iPopURL = '/ipop.html' // set as location of ipop.html
    var url = iPopURL + '?' + img + (ttl ? '&' + escape(ttl) : '')
    var l = (screen.width - w) / 2
    var t = (screen.height - h) / 2
    var attribs = 'width=' + w + ',height=' + h + ',left=' + l + ',top=' + t
    open(url, 'imgWin', attribs)
    return false;
}

/****************************************************
 *	Creates and centers a popup window
 *		by LWD-hk 20030722
 ****************************************************/
function rsPopUp(url, w, h, ttl){
    var l = (screen.width - w) / 2
    var t = (screen.height - h) / 2
    var attribs = 'scrollbars=yes,resizable=yes,width=' + w + ',height=' + h + ',left=' + l + ',top=' + t
    open(url, 'newWindow', attribs)
    return false;
}

/****************************************************
 *	Add Site to Favorits:
 *		by LWD-sb 20051019
 ****************************************************/
function addBookmark(title){

    var url = document.location.href;
    var foo = url.split('?');
    url = foo[0];
    
    if (window.sidebar) 
        window.sidebar.addPanel(title, url, "");
    else 
        if (document.all) 
            window.external.AddFavorite(url, title);
    return true;
}

/****************************************************
 *	Booking engine
 ****************************************************/
function _logout(){
    new Ajax.Request('/media/templates/forms/logout.cfm', {
        method: 'get',
        onComplete: initDP
    })
}

function rsinit(){
    $$('div.inside img').each(function(el){
        el.onmouseover = function(){
            new Effect.Opacity(el, {
                duration: 0.3,
                to: 0.7
            });
        };
        el.onmouseout = function(){
            new Effect.Opacity(el, {
                duration: 0.1,
                to: 1.0,
				queue:'end'
            });
        };
    });
}
Event.observe(window, 'load', rsinit, false);