function OpenNewWindow(url, scrollbars, userwidth, userheight) {

	if (window.open) {
		dateVar = new Date();
		var windowName =dateVar.getTime();
		
		var border = 100;
		var w = (userwidth == null) ? screen.availWidth - 2*border : userwidth;
		var h = (userheight == null) ? screen.availHeight - 2*border : userheight;

		var winl = (screen.width - w) / 2;
		var wint = (screen.height - h) / 2;
		
		var winprops = 'height='+h+',width='+w;
		
		winprops = winprops+',top='+wint+',left='+winl+',scrollbars='+scrollbars+',resizable=yes,status=yes';
		newWindow = window.open(url, windowName, winprops);
		newWindow.window.focus();
	}
}