
popupwin = null;
function popup()

{
	// open popup and save window object
	this.Open = function(url, title ,width, height)
	{
		popupwin = window.open(url, title,"resizable=no, titlebar=yes,status=yes,scrollbars=yes,width=" + width + ",height=" + height + "'");
	}

	// check if window is closed
	this.IsClosing = function()
	{
		if(popupwin.closed){
			//alert('window close'); // window is closed!
		}else{
			//alert('what happen'); // window is closed!
		}
		var myFlashMovie = document.getElementById("Toto");
		myFlashMovie.forceSaldoRefresh();
	}

	// wait 50 ms before checking if child window is closed
	this.Unload = function()
	{
		setTimeout("Popup.IsClosing()",100);
	}
}

var Popup = new popup();

function openBibit( sUrl )
{
	Popup.Open(sUrl, 'bibit', 550, 400);
}