// JavaScript Document
function PopUp(url,width,height)
{
	var top=((screen.height)/2)-(height/2);
	var left=((screen.width)/2)-(width/2);
	window.open(url,'','toolbar=0, location=0, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width='+width+', height='+height+', left='+left+', top='+top+', titlebar=0');		
}
function DeleteRow(url)
{
		if(window.confirm("Supprimer cet enregistrement ?"))
			window.location=url;
}
function toggleDiv(objid,vis)
{
	var obj;
	try
	{
		if(objid.parentNode)	//it's an object. we needn't do anything
			obj = objid;
		else	//it's not an object
			obj = document.getElementById(objid);
	}
	catch(e)	//it's not an object and the browser errors on undefined properties
	{
		obj = document.getElementById(objid);
	}
	if(vis)
	{
		if(obj.style.visibility=='hidden')
			obj.style.visibility='visible';
		else
			obj.style.visibility='hidden';
	}
	else
	{
		if(obj.style.display=='none')
			obj.style.display='block';
		else
			obj.style.display='none';
	}
	return true;
}