function openPopup( pageToLoad, winName, width, height, center, scroll, winXpos, winYpos, resize) {
	xposition = 0;
	xposition = winXpos;
	yposition = 0;
	yposition = winYpos;
	resizable = 0;
	resizable = resize;
	if ((parseInt(navigator.appVersion) >= 4 ) && (center)) {
		xposition = (screen.width - width) / 2;
		yposition = (screen.height - height) / 2;
	}
	args = "width=" + width + ","     + "height=" + height + ","
	+ "location=0," + "menubar=0,"  + "resizable=" + resizable + "," + "scrollbars=" + scroll + ","
	+ "status=0,"   + "titlebar=0," + "toolbar=0," +                   "hotkeys=0,"
	+ "screenx=" + xposition + ","  //NN Only
	+ "screeny=" + yposition + ","  //NN Only
	+ "left=" + xposition + ","     //IE Only
	+ "top=" + yposition;           //IE Only

	return window.open( pageToLoad,winName,args );
}
function openSimplePopup( pageToLoad, winName, width, height) {
	//alert("opening: " + pageToLoad);
	openPopup(pageToLoad, winName, width, height, 'yes', 'yes', 400, 400, 'yes');
}
function startsWith(instr, prefix) {
	return instr.substring(0, prefix.length) == prefix;
}
