function popup(url,t,h,w,Loc,Re,Tb,Mb,Sb) {
var iMyWidth;
var iMyHeight;

// divide the current screen hright and width in half
var hN = Number(h)/2;
var wN = Number(w)/2;

// gets top and left positions based on user's resolution so hint window is centered.
iMyWidth = (window.screen.width/2) - (wN + 10); //half the screen width minus half the new window width (plus 5 pixel borders).

// check to see if the user wants the status bar to show up and size accordingly
   if (Loc == 'yes') {
		iMyHeight = (window.screen.height/2) - (hN + 25); //half the screen height minus half the new window height (plus title and status bars if necessary).
		} else {
		iMyHeight = (window.screen.height/2) - (hN + 50); //half the screen height minus half the new window height (plus title and status bars if necessary).
	}

// make the new window and give it focus
var win2 = window.open(url,t,"height="+ h +",width="+ w +",left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=" 
+ Sb + ",resizable=" + Re + ",menubar=" + Mb + ",dependent,location=" + Loc + ",toolbar=" + Tb + "");
win2.focus();
}