function Popup(targetpage, w, h) {
	var winl = (screen.width - w) / 2;
	if (screen.height < h) {
	var wint = 20;
	var scrollorno = 'yes';
	var resizableorno = '1';
	} 
	else {
	var wint = (screen.height - h) / 2;	
	var scrollorno = 'yes';
	var resizableorno = '1';
	};
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scrollorno+',resizable='+resizableorno;
	win = window.open(targetpage, 'targettitle', winprops);
	if (parseInt(navigator.appVersion) >= 4) { 
		win.window.focus(); 
	}
}
