// JavaScript Document

function doPopup(targetURL, targetWindow, width, height) {
	
	// targetURL+'?w='+width+'&h='+height
	
    newwindow=window.open(targetURL,targetWindow,'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width='+width+',height='+height);
	
	// center popup
	var newLeft = (screen.width - width)/2;
	var newTop = (screen.height - height)/3;
	if (newLeft < 0) newLeft = 0;
	if (newTop < 0) newTop = 0;
	newwindow.moveTo(newLeft, newTop);
	
	// resize
	if (parseInt(navigator.appVersion)>3) {
		if (navigator.appName=="Netscape") {
			newwindow.outerWidth=width;
			newwindow.outerHeight=height;
		}
		else newwindow.resizeTo(width,height);
	}
	
	
	// bring popup to front
	if (window.focus) {
		newwindow.focus();
	}
	return false;
}
