function newWindow(filename,w,h) {
var Prop= 
"status=no"+",width=" + w + ",height=" + h + ",top=" +50+ ",left=" +55;
    
if (!window.window2) {
        // has not yet been defined
        window2 = window.open(filename,'windowRef',Prop);
    }
    else {
        // has been defined
        if (window2.focus) {
            // still open
           window2.close();
	     window2 = window.open(filename,'windowRef',Prop);

        }
        else {
            window2 = window.open(filename,'windowRef',Prop);
        }
    }
}