/**
 * UICC Windowing Javascript Library
 * 
 * @package All_Packages
 * @subpackage PresentationScripts
 * @copyright UICC 2006 - 2007
 */

function getIdealWidth() {
    return (userHas1680x1050screen ? 1670 : 980);
}
function getIdealHeight() {
    return (userHas1680x1050screen ?  980 : 700);
}
 
function openWindow(url, name, width, height, resizable, fullsize) {
    return window.open(url, name, 'height='+height+',width='+width+',scrollbars=1,resizable='+(resizable?1:0)+',titlebar=0,menubar=0,toolbar=0,status=0'+(fullsize?',top=0,left=0,fullsize=1':''));
}

function openZoomWindow(url_p, returnFalse_p) {
    var fullsize = (userHas1680x1050screen ? 1 : 0);
    var res = openWindow(url_p, 'zoom_window', getIdealWidth(), getIdealHeight(), true, fullsize);
    return (returnFalse_p ? false : res);
}

function openZoomHistoryWindow(url_p, returnFalse_p) {
    var res = openWindow(url_p, 'zoom_history', 600, 600, true, false);
    return (returnFalse_p ? false : res);
}

function openInfo(url, width, height) {
    window.open(url, 'info', 'height='+height+',width='+width+',scrollbars=1,resizable=1,titlebar=0,menubar=0,toolbar=0,status=0');
    return false;
}

function openConfiguration(url) {
    var myWindow = openWindow(url, 'configuration', getIdealWidth(), getIdealHeight(), true, true);
    myWindow.moveTo(0, 0);
    myWindow.focus();
}

