﻿    var myimages=new Array()

    function preloadimages()
    {
        for (i=0;i<preloadimages.arguments.length;i++)
        {
            myimages[i]=new Image()
            myimages[i].src=preloadimages.arguments[i]
        }
    }
    

    //This method will fire before any controls/content is loaded on the client-side
    function ShowWindowLoading()
    {
        try
        {
            document.write("<div id='dvLoading'><div id='dvProgress'>Loading...</div></div>");
            
        }
        catch (ex) { }
        
        return true;
    }

    function HideWindowLoading()
    {
        try
        {
            document.getElementById('dvLoading').style['display'] = 'none';
        }
        catch (ex) { }
    }


    function setLeftPanel()
    {
        if (document.getElementById('MainContentWrapper') != null && document.getElementById('SideMenuMiddle') != null)
            if (document.getElementById('MainContentWrapper').offsetHeight - document.getElementById('SideMenuMiddle').offsetTop > 0)
            {
                if (document.getElementById('MainContentWrapper').offsetHeight - 150 >= document.getElementById('SideMenuMiddle').offsetHeight)
                    document.getElementById('SideMenuMiddle').style.height = document.getElementById('MainContentWrapper').offsetHeight - 150 + "px";
                else
                    document.getElementById('SideMenuMiddle').style.height = document.getElementById('SideMenuMiddle').offsetHeight + "px";
            }
    }
    
    function wOpen(url, w, h)
    {
        wleft = (screen.width - w) / 2;
        wtop = (screen.height - h) / 2;
  
		day = new Date();
        id = day.getTime();
        // IE5 and other old browsers might allow a window that is
        // partially offscreen or wider than the screen. Fix that.
        // (Newer browsers fix this for us, but let's be thorough.)
        if (wleft < 0)
        {
            w = screen.width;
            wleft = 0;
        }
        if (wtop < 0)
        {
            h = screen.height;
            wtop = 0;
        }
  
        var win = window.open(url, id,
            'width=' + w + ', height=' + h + ', ' +
            'left=' + wleft + ', top=' + wtop + ', ' +
            'location=no, menubar=no, ' +
            'status=no, toolbar=no, scrollbars=no, resizable=1');

        win.moveTo(wleft, wtop);
        win.focus();
    }