// JavaScript Document
// popup window functions
var _openedWindows = new Array();

openWindow = function (u, w, h, n, scrollbar)
{
	var l	= w == screen.width ? 0 : (screen.width / 2) - (w / 2);
	var t	= h == screen.height ? 0 : (screen.height / 2) - (h / 2) - 25;	
 	n = n ? n = n.replace(/ /g,"") : "win";
 	
	scrollbar = ( scrollbar == true ) ? 'yes' : 'no';
	
 	if (_openedWindows[n] != null)
 	{
 		_openedWindows[n].close();
 	}
 
	//alert('scroll: ' + scrollbar);
	
	var win = window.open(u,
												n, 
												"toolbar=no,location=no,directories=no,status=no,menubar=no," +
												"scrollbars=" + scrollbar + ", " + 
												"resizable=no,copyhistory=no, left=" + l + ", top=" + t + ", width=" + w + ", height=" + h);

	_openedWindows[n] = win;
	
	win.focus();
}
// end popup