function NewWindow(myPage, myName, Width, Height, Scroll, Resizable) {
    var winTop = ((screen.height - Height) / 2);
    var winLeft= ((screen.width - Width) / 2);
    winProps = 'top=' +winTop+ ',left=' +winLeft+ ',height=' +Height+ ',width=' +Width+ ',Scrollbars=' +Scroll+ ',Resizable=' +Resizable+ ';'
    Win = window.open(myPage, myName, winProps);

        if (parseInt(navigator.appVersion) >= 4) {
            Win.window.focus(); //set focus to the window
        }
}

//this function checks if a form field is blank
function notBlank(formField)
{
    var result = true;
    var blank_spaces  = 0;

    for (var i=0; i < formField.value.length; i++)
    {
         if (formField.value.charAt(i) == " ")
        {
             blank_spaces ++;
        }
    }

    if ((formField.value == "") || (blank_spaces == formField.value.length))
    {
        result = false;
    }

    return result;
}