﻿var ImagesRoot = '';
function ToggleBlock(obj, img) {
    var el = document.getElementById(obj);
    var image = document.getElementById(img);
    if (el.style.display != 'none') {
        el.style.display = 'none';
        image.src = ImagesRoot + "expand.gif";
    }
    else {
        el.style.display = '';
        image.src = ImagesRoot + "collapse.gif";
    }
}
function popWin(url, name, w, h, options) {
    // Fudge factors for window decoration space.
    w += 32;
    h += 96;
    wleft = (screen.width - w) / 2;
    wtop = (screen.height - h) / 2;
    if (wleft < 0) {
        w = screen.width;
        wleft = 0;
    }
    if (wtop < 0) {
        h = screen.height;
        wtop = 0;
    }
    var win = window.open(url,
    name,
    'width=' + w + ', height=' + h + ', ' +
    'left=' + wleft + ', top=' + wtop + ', ' +
    options);
    // Just in case width and height are ignored
    win.resizeTo(w, h);
    // Just in case left and top are ignored
    win.moveTo(wleft, wtop);
    win.focus();
}
function wopen(url, name, w, h) {
    popWin(url,name,w,h,'location=no, menubar=yes, status=no, toolbar=no, scrollbars=yes, resizable=no');
}