﻿//open ExternalWindow
function OpenWin(varURL, varWidth, varHeight) {
    var placeLeft = ((screen.availWidth) / 2) - (varWidth / 2)
    var placeTop = ((screen.availHeight) / 2) - (varHeight / 2)
    window.open(varURL, '', 'width=' + varWidth + ',height=' + varHeight + ',screenX=' + placeLeft + ',left=' + placeLeft + ',screenY=' + placeTop + ',top=' + placeTop + ',resizable=yes,scrollbars=yes,location=no,menubar=no,status=no,titlebar=no,toolbar=no')
}

// retrieves the value of the url parameter
function gup(name) {
    name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
    var regexS = "[\\?&]" + name + "=([^&#]*)";
    var regex = new RegExp(regexS);
    var results = regex.exec(window.location.href);
    if (results == null)
        return "";
    else
        return results[1];
}
