function addOption(selectId, txt, val)	{
        var objOption = new Option(txt,val);
        document.getElementById(selectId).options.add(objOption);

}

function selectOption(selectId, optionId)	{        
       
	   var selObj = document.getElementById(selectId);

	   for (i=0;i<selObj.length;i++) {
	   
				if( selObj.options[i].value == optionId )	{
						selObj.selectedIndex = i;
				}
	   } 
	  
}

function checkCheckBox(checkId)	{        
	   
		 document.getElementById(checkId).checked=true;			  
}

function checkRadio(checkName, checkValeur)	{  
	
	var selObj =  document.getElementsByName(checkName);	
	
   for (i=0;i<selObj.length;i++) {
			
			if( selObj[i].value == checkValeur )	{
					selObj[i].checked =true;
			}
   } 	  
}




function createElement(type, id, parent)	{
		
			/* //document.getElementById(parent).removeChild(document.getElementById(parent).firstChild);
			
			  var nouveauLI = document.createElement(type);			  
			  var numeroli = id + 1;
			  nouveauLI.id=numeroli;			  
			  var nouveautexteli = document.createTextNode("ok " + numeroli);
			  document.getElementById(parent).appendChild(nouveauLI);
			  document.getElementsByTagName(type)[id].appendChild(nouveautexteli);*/
			
}

function afficherContenu(element, lesFonctionsAussi)
{
    con = '';
    n = 0;
    for(i in element)
    {
        if(i != 'innerHTML' && (typeof(element[i]) != 'function' || lesFonctionsAussi))
        {
            try { con = con+i+': '+element[i]+"\n"; } catch(ex) { con = con+i+': ???'+"\n"; }
            if(++n == 0x10)
            {
                alert(con);
                con = '';
                n = 0;
            }
        }
    }
    alert(con);
}

function initEvenementCharge()
{
	/* On cherche dans le HTML obtenu un div dont le onclick contient les init specifiques. */
	var n = -1;
	var o;
	while((o = document.getElementById('evenement_init_'+(++n))))
try{
		eval(o.innerHTML);
}catch(ex){alert(ex);}
}

