﻿var ispopshow = 0;
function openPopUp(_url, _title, _width, _height) {
    var winDef = 'status=no,resizable=no,scrollbars=yes,toolbar=no,location=no,fullscreen=no,titlebar=yes,height='.concat(_height).concat(',').concat('width=').concat(_width).concat(',');
    winDef = winDef.concat('top=').concat((screen.height - _height) / 2).concat(',');
    winDef = winDef.concat('left=').concat((screen.width - _width) / 2);
    newwin = open(_url, _title, winDef);
}

function clearText(field) {
    if (field.defaultValue == field.value) field.value = '';
    else if (field.value == '') field.value = field.defaultValue;
}

function showWindow(msg, options, title) {
    if (!options) options = {};
    options["title"] = title;
    if (!window["dialogWindows"]) window.dialogWindows = new Array();

    var dwindow = new DialogWindow(undefined, options);

    dwindow.el.style.width = '550px';
    dwindow.el.style.height = '490px';

    dwindow.show(msg);
    ispopshow = 1;

    window.dialogWindows.push(window);

}

function callPopUp(tt, href) {
    if (ispopshow) {
        $('.dialogBody iframe').attr({ src: href });
        return false;
    }

    ifrmpg = '<iframe src=' + href + ' style="background: white;" width="95%" height="95%"></iframe>';
    showWindow(ifrmpg, null, tt);
}

function ResizeText(size) {
    document.getElementById("weeklycontent").style.fontSize = size;
}
