/**
 *
 * Moc 10 Media
 * http://www.moc10media.com/
 *
 * Script Name: scripts.js
 * Script Version: 1.0
 * Script Info: Basic Config/Load Scripts
 *
 */

// Function to create dynamic pop up window, currently set to center window on screen.

function newWindow(url, name, wid, hgt, scr, res, stat, loc, mnu, tool, x, y) {
    if (screen) {
        widthOfScreen = screen.width;
        heightOfScreen = screen.height;
    }
    if ((x == null) || (y == null)) {
        midX = widthOfScreen / 2;
        midY = heightOfScreen / 2;
        midWid = wid / 2;
        midHgt = hgt / 2;
        x = midX - midWid;
        y = midY - midHgt;
    }
    windowOpts = "width=" + wid + ",height=" + hgt + ",scrollbars=" + scr + ",resizable=" + res + ",status=" + stat + ",location=" + loc + ",menubar=" + mnu + ",toolbar=" + tool + ",left=" + x + ",top=" + y;
    popUpWindow = window.open(url, name, windowOpts);
}