/*
*********************************************************************
Language:    Javascript
Web site:    http://www.dockingbay-94.com/
File Path:   /globals/scripts/
Copyright:   ©2004, Jamie Peloquin
Created:     8/29/04 11:41 AM 
Created by:  Jamie Peloquin (www.dockingbay-94.com)
*********************************************************************
JAVASCRIPT WORKSHEET                                                
*********************************************************************
*/
/*
*********************************************************************
Windowing Functions                                                 
*********************************************************************
*/
/* Pop Window Generic - Centered --------------------------------- */
function pop_generic(NAME,URL,WD,HT,TOOL,LOCATION,MENU,SCROLL,STATUS,RESIZE){
	if(!NAME){NAME = "popWin"}
	if(!WD){WD = "800"}
	if(!HT){HT = "600"}
	if(!TOOL){TOOL = "yes"}
	if(!LOCATION){LOCATION = "yes"}
	if(!MENU){MENU = "yes"}
	if(!SCROLL){SCROLL = "yes"}
	if(!STATUS){STATUS = "yes"}
	if(!RESIZE){RESIZE = "yes"}
	var halfW = (WD/2)
 	var halfH = (HT/2)
   	var screenW = screen.availWidth
    var screenH = screen.availHeight
    
    var screenX = ((screenW / 2) - halfW) // is half the width of the window
    var screenY = ((screenH / 2) - halfH) // is half the height of the window

	var WINNAME = NAME+'_win'
	if(document.layers){ //Fixes Netscape 4 bug
    	var NAME = window.open(URL, WINNAME);
	}
	else{
		var NAME = window.open(URL, WINNAME, 'width='+WD+', height='+HT+', top='+screenY+', left='+screenX+', toolbar='+TOOL+', location='+LOCATION+', menubar='+MENU+', scrollbars='+SCROLL+', status='+STATUS+', resizable='+RESIZE);
    }
    NAME.focus();
}//END