﻿function openWindow(url, width, height, showScroll, windowName) {
    var leftVal = (screen.width - width) / 2;
    var topVal = (screen.height - height) / 2;

    var args = 'height=' + height + ',width=' + width + ',left=' + leftVal + ',top=' + topVal
            + ',location=0,scrollbars=' + ((showScroll == true) ? '1' : '0')
            + ',toolbar=0,directories=0,status=0,menubar=0,resizable=1';

    var popWin = window.open(url, windowName, args);
    if (popWin != null) {
        popWin.focus();
    }
}

function clearField(fld) {
    if (fld.defaultValue == fld.value)
        fld.value = ""
}