
Evonux.Custom = {}

/**
 * Show option popup
 */
Evonux.Custom.showOption = function (ref)
{
    var		width = 500;
    var		height = 400;
    var		top = (screen.height - height) / 2;
    var		left = (screen.width - width) / 2;
    var		popup;

    popup = window.open (U_ROOT + '/?module=webpage&action=view&template=none&ref=' + ref, '', "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, border=no, left=" + left + ", top=" + top + ", width=" + width + ", height=" + height);    
    popup.focus ();
}

/**
 * Fading slide
 */
Evonux.Custom.slide = function ()
{        
    for (var i = 1; i <= 4; i++)
    {
	//Evonux.Page.get ("module=tools&action=refreshRealisations", "", function () { $('rea-' + i).src = this.response.text; });
    }
}

/** 
 * Open submenu
 */
Evonux.Custom.selectMenu = function (i)
{
    $$('sub').each (function (el)
	{
	    el.addClass ("off");
	    el.removeClass ("selected");
	});
    $('submenu-item-' + i).removeClass ("off");
    $('submenu-item-' + i).addClass ("selected");
}

/**
 * Mark submenu open
 */
Evonux.Custom.selectSubmenu = function (sel)
{
    $$('sublink').each (function (el)
	{
	    el.removeClass ("selected");
	});
    sel.addClass ('selected');
}
