function AffDeaff(nom, bouton){ 
		if (document.getElementById(nom).style.display=='none')	
            { 
                document.getElementById(nom).style.display='inline'; 
                if (bouton != '')
                {
                    if (bouton != 'nobutton')
                    {
                        document.getElementById(bouton).value = '-';	
                    }
                }
                else
                {
                    document.getElementById('imgLogin').src='/images/CloseLogin.png';
                }
                if (nom == 'divImport')
                {
                    document.getElementById('ddlSession').src='/images/ddlUpLong.png';
                }
            } 
            else 
            { 
                document.getElementById(nom).style.display='none'; 
                if (bouton != '')
                {
                    if (bouton != 'nobutton')
                    {
                        document.getElementById(bouton).value = '+'; 
                    }
                }
                else
                {
                    document.getElementById('imgLogin').src='/images/Login.png';
                }
                if (nom == 'divImport')
                {
                    document.getElementById('ddlSession').src='/images/ddlDown.png';
                }
            }}

function obtenirParametre(szName, theDoc) {
	var retValue = ""; 
	var n2 = theDoc.indexOf(szName) + szName.length; 
	n2 = theDoc.indexOf("=", n2) + 1;
	var n3 = theDoc.indexOf(",", n2+1); 
	if (n3 > n2) {
		retValue = theDoc.substring(n2, n3); 
	} else {
		retValue = theDoc.substring(n2); 
	}
	return retValue.replace(/^\s+|\s+$/g,"");
}
		
function ouvrirPopup(url2, nom, attributs){
    var pop = window.open(url2, nom.replace('.', 'P'), attributs); 
    var width = parseInt(obtenirParametre('width', attributs).replace('px', ''));
    var height = parseInt(obtenirParametre('height', attributs).replace('px', ''));
    var ww = screen.width;
    var wh = screen.height;
    pop.moveTo((ww / 2) - (width / 2), (wh / 2) - (height / 2)); 
    pop.window.focus();
}		