﻿// JScript File
function makeUrlCacheSafe(url)
{
    return url + ((url.indexOf('?') == -1)?'?':'&') + 'rnd=' + ((new Date()).getTime()); 
}

function makeDoubleDelegate(function1, function2) {
    return function() {
        if (function1)
            function1();
        if (function2)
            function2();
    }
}

ePortal_GetBrowserSize = function(oWindow) {
    if (!oWindow) oWindow = window;
    var oDoc = oWindow.document;

    var rect = {};
    if (oDoc.all && "CSS1Compat" == oDoc.compatMode && !oWindow.opera)//!OPERA
    {

        rect.width = oDoc.documentElement.clientWidth;
        rect.height = oDoc.documentElement.clientHeight;
    }
    else {

        rect.width = window.innerWidth ? parseInt(oWindow.innerWidth) : parseInt(oDoc.body.clientWidth);
        rect.height = window.innerHeight ? parseInt(oWindow.innerHeight) : parseInt(oDoc.body.clientHeight);
    }
    return rect;
};