// edit these defaults
var iDefaultHeight = 350;
var iDefaultWidth  = 400;
var sDefaultParams = 'personalbar=no,toolbar=no,status=no,scrollbars=no,resizable=no,menubar=no';
//************************
// Date:        8/3/2000
// Purpose:     Load a centered popup window
// Developer:   Scott Hopkins
// Parameters:  sPage   - Page to pop 
//              [vWidth]  - Optional window width; default is defined in the constants above
//              [vHeight] - Optional window height; default is defined in the constants above
//              [sName]   - Optional window name; 
//              [sParams] - Optional param string; default is defined in the constants above
// Return:      none
//
// Revision: 
//************************
var windVar;

self.name = "Parent_Window"; 

function tearOff(sPage, vWidth, vHeight, sName, sParams) {
	// Front door interface to tearoff
//     if(windVar != null) windVar.close();
     windVar = tearOffSvc(sPage, vWidth, vHeight, sName, sParams);
	 //if(navigator.appVersion >= 4) 
	     windVar.window.focus(); 
}

function tearOffSvc(sPage, vWidth, vHeight, sName, sParams) {
     if(vHeight == null) vHeight = iDefaultHeight;
     if(vWidth == null) vWidth = iDefaultWidth;
     if(sParams == null) sParams = sDefaultParams;
     var offsetx = (screen.availWidth - vWidth) / 2;
     var offsety = (screen.availHeight - vHeight) / 2;
     sParams = 'width='+vWidth+',height='+vHeight+','+sParams+',top='+offsety+',left='+offsetx+',screeny='+offsety+',screenx='+offsetx
     if(sName == null)
	 	win = window.open(sPage, '', sParams);
	 else
	    win = window.open(sPage, sName, sParams);
	 return win;
}