
shown=''
function OpenFile(url,width,height) {

	height += 30;
	width += 20;

	var Left = (screen.width - width) / 2 - 5;
	var Top = (screen.height - height) / 2 - 29;

	if(Left < 0) Left = 0;
	if(Top < 0) Top = 0;

	if( shown=='' || shown.closed) {
		window.focus();
		shown=window.open(url,"OpenFile","top="+Top+",left="+Left+",width="+width+",height="+height+",scrollbars=no,status=no,high");
	}
	else {
		shown.close();
		shown=window.open(url,"OpenFile","top="+Top+",left="+Left+",width="+width+",height="+height+",scrollbars=no,status=no,high");
	}
}

