
// Opens a secondary window if not already open, otherwise brings secondary window into focus.
// (c) Craig Housley. Updated 07-Jan-2005

	function openWindow(url){
		if (typeof(myWindow) == "undefined" || myWindow.closed) { // second condition is a workaround for a problem in Mozilla
			myWindow=window.open(url,'fact','scrollbars=yes,toolbar=yes,status=yes,location=yes,menubar=yes,resizable=yes,top=30,left=30,width=500,height=400');
		}
		else {
			myWindow.location=url
		}
		myWindow.focus();
	}
	
	function openExtWindow(url){
		var windowWidth=screen.availWidth*0.9;
		var windowHeight=screen.availHeight*0.7;
		var extWindow = window.open(url,'external','scrollbars=yes,toolbar=yes,status=yes,location=yes,menubar=yes,resizable=yes,top=30,left=30,width=' + windowWidth + ',height=' + windowHeight + '');
		extWindow.focus();
	}

