// default height IE for Win; adjust for other browsers:
var IEmacW = -16	
var SafW = -2		
var SafH = -1		
var Ns7W = -1		
var Ns6W = -2		
var Ns4H = -22		
var Op5W = 12		

function popUp(popURL,mywidth,myheight) {
	
// adjust window size to browser
	if (navigator.userAgent.indexOf("Opera") != -1) {
		if ((navigator.userAgent.indexOf("Opera 5") != -1) || (navigator.userAgent.indexOf("Opera/5") != -1)) {mywidth += Op5W}
	}
	else {
		if (navigator.userAgent.indexOf("Mozilla/5") != -1) {
			if (navigator.userAgent.indexOf("Netscape6") != -1) {mywidth += Ns6W}
			else if (navigator.userAgent.indexOf("Netscape/7") != -1) {mywidth += Ns7W}
			else if (navigator.userAgent.indexOf("Safari/1") != -1) {mywidth += SafW; varArr[2] += SafH}
		}
		else if (navigator.userAgent.indexOf("Mozilla/4") != -1) {
			if (navigator.appName == "Netscape") {myheight += Ns4H}
		}
		if ((navigator.userAgent.indexOf("Mac") != -1) && (navigator.userAgent.indexOf("MSIE") != -1)) {mywidth += IEmacW}
	}

		if (window.screen) {screenheight = window.screen.availHeight}
		yPos = (screenheight-myheight)/2

		if (window.screen) {screenwidth = window.screen.availWidth}
		xPos = (screenwidth-mywidth)/2
	

//open popup
	mywin = window.open(popURL,'mywin','width=' + mywidth + ',height=' + myheight + ',top=' + yPos + ',left=' + xPos);
}
