/*
 * JAVASCRIPT POPUP WINDOW VERSION 1.1
 * BY DOUGLAS HERIOT
 *
 * Based on code from yourhtmlsource.com
 *
 * To use this script, run the function:
 * popup('page url','popup name','width','height')
 *
 * VERSION LOG
 * 1.0 - initial release
 * 1.1 - added code to place widow in the centre of screen
*/

var newwindow;
function popup(url,name,x,y){
	var top = (screen.availHeight-y)/2;
	var left= ((screen.availWidth-x)/2);
	
	newwindow =	window.open(url,name,'directories=false,resizable=true,menubar=false,toolbar=false,width='+x+',height='+y+',loaction=false,status=no,scrollbars=yes,top='+top+',left='+((screen.availWidth-x)/2));
	if (newwindow.focus) newwindow.focus();
}