function PopWindow( url ) {
  // URL of the page to be loaded into the new window:
  if ( url == null ) url = "";
  this.url = url;
  this.winHandle = null;
  this.winName = "newWin";
  // Width and height of the new window:
  this.width = null;
  this.height = null;
  // window features
  this.directories = null;
  this.location = null;
  this.menubar = null;
  this.resizable = null;
  this.scrollbars = null;
  this.status = null;
  this.toolbar = null;
}

// Method to open a new window:
function PUW_open() {
  var features = "";
  for ( var prop in this ) {
    with ( this ) {
      if ( typeof eval( prop ) != "function" ) {
        if ( prop != "url" && prop != "winHandle" ) {
          if ( eval( prop ) != null ) {
            if ( prop == "width" || prop == "height" ) {
              features += prop + "=" + eval( prop ) + ",";
            } else if ( eval( prop ) ) {
              features += prop + "=yes,";
            } else {
              features += prop + "=no,";
            }
          }
        }
      }
    }
  }

  this.winHandle = window.open( this.url, this.winName, features );
  if ( this.url == "" ) this.document = this.winHandle.document;
  // Browser bug fix:
  if ( !this.winHandle.opener ) this.winHandle.opener = self;
}
PopWindow.prototype.open = PUW_open;

// Close the window:
function PUW_close() {
  if ( this.winHandle != null ) this.winHandle.close();
  this.winHandle = null;
}
PopWindow.prototype.close = PUW_close;


function PUW_setWidth( pixels ) {
  pixels = parseInt( pixels );
  if ( !isNaN( pixels ) && pixels >= 0 ) this.width = pixels;  
}
PopWindow.prototype.setWidth = PUW_setWidth;


function PUW_setHeight( pixels ) {
  pixels = parseInt( pixels );
  if ( !isNaN( pixels ) && pixels >= 0 ) this.height = pixels;  
}
PopWindow.prototype.setHeight = PUW_setHeight;


function PUW_setDirectories( booleanValue ) {
  this.directories = booleanValue;  
}
PopWindow.prototype.setDirectories = PUW_setDirectories;


function PUW_setLocation( booleanValue ) {
  this.location = booleanValue;  
}
PopWindow.prototype.setLocation = PUW_setLocation;


function PUW_setMenubar( booleanValue ) {
  this.menubar = booleanValue;  
}
PopWindow.prototype.setMenubar = PUW_setMenubar;


function PUW_setResizable( booleanValue ) {
  this.resizable = booleanValue;  
}
PopWindow.prototype.setResizable = PUW_setResizable;


function PUW_setScrollbars( booleanValue ) {
  this.scrollbars = booleanValue;  
}
PopWindow.prototype.setScrollbars = PUW_setScrollbars;


function PUW_setStatus( booleanValue ) {
  this.status = booleanValue;  
}
PopWindow.prototype.setStatus = PUW_setStatus;


function PUW_setToolbar( booleanValue ) {
  this.toolbar = booleanValue;  
}
PopWindow.prototype.setToolbar = PUW_setToolbar;

function popbrowserwindow()
{
	var win = new PopWindow();
    win.setWidth( 500 );
    win.setHeight( 120 );
	win.open();            // open an empty window
    win.document.open();   // open document for writing
    win.document.write( '<html>\n<head>\n<META http-equiv="Content-Type" content="text/html; charset=UTF-8">\n<title>MAGIX Browser</title>\n<style type="text/css">A {font-family: verdana, arial, helvetica, geneva, trebuchet ms, sans-serif;font-size: 14px;color: #666666;font-weight: bold;text-decoration: none;text-align : center;}\nA:hover {font-family: verdana, arial, helvetica, geneva, trebuchet ms, sans-serif;font-size: 16px;color: #000000;font-weight: bold;text-decoration: none;text-align : center;}\n</style>\n</head>\n<body>\n\n' );

	win.document.writeln( '<center>');
	win.document.writeln( '<font class="ie" size="2" face="arial">Best viewed with Microsoft <sup>&#174;</sup> Internet Explorer<br></font> ');
	win.document.writeln( '<br><a href="http://www.microsoft.com/windows/ie/default.htm" target="blank"><img src="mxassets/logo_ie.gif" alt="Microsoft Internet Explorer" border="0"/></a><br> ');
	win.document.writeln( '<font class="ie_sub" size="1" face="arial">Microsoft is a registered trademark and the Microsoft InternetExplorer Logo is a trademark of Microsoft.</font><br/> ');

	win.document.writeln( "\n</body>\n</html>" );
    win.document.close();  // close document
}
	