﻿function MM_openBrWindow(theURL, winName, Width, Height) { //v2.0
    var leftPos = (screen.width - Width) / 2;
    var topPos = (screen.height - Height) / 2;

    window.open(theURL, winName, 'width=' + Width + ',height=' + Height + ',top=' + topPos + ',left=' + leftPos + ',status=0,resizable=0,scrollbars=no');

}

function MM_openBrWindowScroll(theURL, winName, Width, Height) { //v2.0
    var leftPos = (screen.width - Width) / 2;
    var topPos = (screen.height - Height) / 2;

    window.open(theURL, winName, 'width=' + Width + ',height=' + Height + ',top=' + topPos + ',left=' + leftPos + ',status=0,resizable=0,scrollbars=yes');
}
function MM_openBrWindowResize(theURL, winName, Width, Height) { //v2.0
    var leftPos = (screen.width - Width) / 2;
    var topPos = (screen.height - Height) / 2;

    window.open(theURL, winName, 'width=' + Width + ',height=' + Height + ',top=' + topPos + ',left=' + leftPos + ',status=0,resizable=1,scrollbars=yes');
}

function MM_openPictureWindow(theURL, winName, Width, Height) {
    var w = 400; h = 400;
    Width = 400; Height = 400;

    var popW = Width, popH = Height;

    var leftPos = (w - popW) / 2, topPos = (h - popH) / 2;
    winNamePic = window.open(theURL, winName, "scrollbars=yes,resizable=0,width=" + popW + ",height=" + popH + ",top=" + topPos + ",left=" + leftPos);
    winNamePic.focus()

}

function enforcechar(field, maxlen) {
    if (field.value.length > maxlen)
        field.value = field.value.substring(0, maxlen);
}


