
/* Vide et remplit les champs texte pour y afficher un message par défaut */

function manageTextbox(currentControl, text) 
{
    if(currentControl.value == text)
    {
        currentControl.value = "";
        currentControl.onblur = function(){
			if(this.value == "") 
				this.value = text;
        }
    }
}
/* Ouvre ou ferme une popup */

function popup(url, width, height,resizable)
{
    var posX = (screen.width - width) / 2;
    var posY = (screen.height - height) / 2;
    window.open(url,'_blank','width=' + width + ',height=' + height + ',toolbar=no,status=no,resizable='+resizable+',scrollbars='+resizable+',left=' + posX + ',top=' + posY);        
}   
        
/* Ouvre ou ferme la liste des collection associe au catalogue */

function divCatalogueOpen(idCatalogue)
{
	var div = document.getElementById(idCatalogue);
	if (div.style.display == "block")
	{
		div.style.display = "none";
	}
	else
	{
		div.style.display = "block";
	}
}

function divAllClose()
{
	var divs = document.getElementsByTagName('div');
	for(var i = 0; i < divs.length; i++)
	{
		divs[i].style.display = "none";
	}
}
