var newWindow;

function makeNewWindow(url,xWidth,yWidth) {
    if (!newWindow || newWindow.closed) {
       
    var width = xWidth;
    var height = yWidth;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/2));
    var windowFeatures = "width=" + width + ",height=" + height + 
        ",titlebar=0,status=0,resizable=1,alwaysRaised,dependent,left=" + left + ",top=" + top + 
        ",screenX=" + left + ",screenY=" + top;
    myWindow = window.open(url, "subWind", windowFeatures);


//newWindow = window.open(url,"subwind","status,alwaysRaised,dependent,height=200,width=300");   } else {
        // window is already open, so bring it to the front
     //   newWindow.focus( );
    }
}
