function popUp(URL, windowName, windowWidth, windowHeight, toolbar)
{
	var xposition = 400;  
	var yposition = 300;
	var siteWin;
	
    if ((parseInt(navigator.appVersion) >= 4 )) {
        xposition = (screen.width - windowWidth) / 2;
        yposition = (screen.height - windowHeight) / 2;
    }
	
	if (!toolbar) var toolbar = "toolbar,";
	//if (!scrollbars) var scrollbars = 0;
	
    var args = "width=" + windowWidth + ","
	    	+ "height=" + windowHeight + ","
		    + toolbar;
		    + "scrollbars,"
		    + "status=0,"
		    + "titlebar=0,"
		    + "hotkeys=0,"
		    + "screenx=" + xposition + ","  // NN Only
		    + "screeny=" + yposition + ","  // NN Only
		    + "left=" + xposition + ","     // IE Only
		    + "top=" + yposition;           // IE Only
		
	if (siteWin != null && !siteWin.closed) {
		siteWin.close();
	}
	siteWin = window.open(URL, windowName, args);
	// window.open('/sa_popup.html','sweptaway','width=280,height=390,resizable=no,scrollbars=no,toolbar=no,directories=no,status=no');

	siteWin.focus();
}


function popup(imgheight,imgwidth,imgsrc,pagetitle) {
	var xposition = 100; 
	var yposition = 100;
	
    //if ((parseInt(navigator.appVersion) >= 4 )) {
        xposition = ((screen.width - imgwidth) / 2);
        yposition = ((screen.height - imgheight) / 2);
    //}
	
	//alert('screen.width: ' + screen.width + ' screen.height: ' + screen.height);
	
		if (!pagetitle) var pagetitle = "The Spaatz Association";
		popupWindow=window.open('','popupWindow','width=' + imgwidth + ',height=' + imgheight + ',toolbar=no,titlebar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,screenx=' + xposition + ',screeny=' + yposition + ',left=' + xposition + ',top=' + yposition);
		popupWindow.document.write ("<HEAD><TITLE>" + pagetitle + "</TITLE></HEAD>")
		popupWindow.document.write ("<BODY BGCOLOR=\"#FFFFFF\" onBlur=\"self.close()\" LEFTMARGIN=\"0\" TOPMARGIN=\"0\" MARGINHEIGHT=\"0\" MARGINWIDTH=\"0\" >")
		popupWindow.document.write ("<A HREF=\"javascript:self.close()\"><CENTER><IMG SRC=\"" + imgsrc + "\" WIDTH=\"" + imgwidth + "\" HEIGHT=\"" + imgheight + "\" BORDER=\"0\"></CENTER></A>")
		popupWindow.document.write ("</BODY>")
		popupWindow.focus();
	}