// These functions will handle popup windows...

function popupwindow(link,w,h) {
	if (arguments.length > 2)
		s = arguments[2];
	sb = 'no';

	//need to name the window something unique...this should do it:
	i=Math.round(Math.random()*10000);
	winname='popup_' + i.toString();
		
	x = Math.floor((screen.width - w)/2); 
	y = Math.floor((screen.height - h)/2); 
	if (arguments.length > 3) if (s) sb = 'yes';
	options = "scrollbars=" + sb +",toolbar=no,resizable=yes,location=no,directories=no,status=no,menubar=no,width=" + w + ",height=" + h + ",screenX=" + x + ",screenY=" + y;
	MyWin = window.open(link,winname,options);
	MyWin.moveTo(x,y);
	MyWin.focus();
	return MyWin;
}

function resizeWindow(win,w,h) {
	x = Math.floor((screen.width - w)/2); 
	y = Math.floor((screen.height - h)/2); 
	win.resizeTo(w,h);
	win.moveTo(x,y);
}

