function popup(url,name,width,height,scroll,menu,urlbar,x,y) 
{
	// set a defaults
	name = name ? name : 'win'+ new Date().getTime();
	width = Number(width ? width : 800);
	height = Number(height ? height : 500);
	scroll = scroll ? scroll : 'yes' ;
	menu = menu ? menu : 'no' ;

	// screen width	and height - js 1.2
	var sWidth  = window.screen.availWidth;
	var sHeight = window.screen.availHeight;

	// calculation to center the window
	var left = x ? x : (sWidth-width)/2 ;
	var top = y ? y : (sHeight-height)/2 ;

	// popup the window	- js 1.0
	var mywin = window.open(url,name,'width=' + width + ',height=' + 
	height + ',toolbar=no,location='+ urlbar +',directories=no,status=yes,menubar='+ 
	menu +',scrollbars='+ scroll +',copyhistory=no,resizable=yes,top='+ 
	top + ',left=' + left + ',screenX=' + left + ',screenY=' + top);
	
	// focus window
	mywin.focus();
}