/*
Language:    JavaScript
Web site:    www.gllt.org
Copyright:   © 2004 Axon Design & Marketing
Created by:  Jamie Peloquin
Created on:  03/25/04
Updated:     06/04/04 
*/
/*
*********************************************************************
JAVASCRIPT WORKSHEET                                                *
*********************************************************************
*/
/*
*********************************************************************
Windowing Functions                                                 *
*********************************************************************
*/

/* Pop Window Generic - Centered --------------------------------- */
function pop_generic(URL,WD,HT,TOOL,LOCATION,MENU,SCROLL,STATUS,RESIZE){
	if(!WD){WD = "780"}
	if(!HT){HT = "500"}
	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
	
	if(document.layers){ //Fixes Netscape 4 bug
    	var genWin = window.open(URL, 'PopWindow');
	}
	else{
    	var genWin = window.open(URL, 'PopWindow', 'width='+WD+', height='+HT+', top='+screenY+', left='+screenX+', toolbar='+TOOL+', location='+LOCATION+', menubar='+MENU+', scrollbars='+SCROLL+', status='+STATUS+', resizable='+RESIZE);
    }
    genWin.focus();
}
/* END Generic - Centered ---------------------------------------- */

