var windowName = null;
var url = null;
var myWindow = null;
var saveWindow = new Array();
var i = 0

//example for calling popWindow would be 
//onClick="popWindow("/assessor/help.html","HelpWindow")
function popWindow(url,windowName) {

myWindow=window.open(url,windowName,"HEIGHT=250,WIDTH=250,toolbar=no,scrollbars=no,menubar=no,resizable=no,dependent,screenX=555,screenY=4");
myWindow.moveTo(250, 5)
saveWindow[i] = myWindow
i++;

if (myWindow || myWindow.open) {
myWindow.focus();
	}

}

function popBigWindow(url,windowName) {

myWindow=window.open(url,windowName,"Height=150,Width=150,toolbar=no,scrollbars=no,menubar=no,resizable=no,dependent,screenX=555,screenY=4");
myWindow.moveTo(250, 5)
saveWindow[i] = myWindow
i++;

if (myWindow || myWindow.open) {
myWindow.focus();
	}

}


//you can use this function attached to a button
//be sure to use <body onUnload="closeMe()"> in your body tag
//this will close any window that was spawned from the original window
//if the user leaves the page

function closeMe() {

	for(i=0; i<saveWindow.length; i++) {
	if(saveWindow[i]) {
	saveWindow[i].close()
		}
	}
}

function closeOpener() {
	var myWindow
	if (myWindow) {
		myWindow.close()
		}
	} 
