/* 
 * functions.js
 * The home for many javascript functions
 */

/* popup () - function to create a popup window
 * arguments:
 *      URL - the URL to the file to open in the window
 *      width - width of the window
 *      height - neight of the window
 */
function popup(URL, width, height) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=" + width + ",height=" + height + "');");
}

/* String.trim() - a prototype function to add trim fuunction to the String object
 * no arguments
 * returns the new string without leading and trailing whitespace
 */
String.prototype.trim = function() {
    return this.replace(/^\s*|\s*$/g, "");
}


