// JavaScript Document
function Montremonid(id){


for(var i=0; i< $(id).parentNode.childNodes.length; i++){
		if ($(id).parentNode.childNodes[i] == '[object Text]'){
		
		}else{
		if ($(id).parentNode.childNodes[i].getAttribute('id') != id){
			if ($(id).parentNode.childNodes[i].style.display == ''){
				$(id).parentNode.childNodes[i].style.display = 'none';
			}
		}
		}
}
	if (i==$(id).parentNode.childNodes.length){
		$(id).style.display = '';
		//Sound.play( '', [ options ])
		//Effect.Appear(id, { duration: 0.3 });
	}

}






function Montreoucache(id){
	
	if (jQuery("#"+id).css('display') == 'none' && jQuery("#"+id).css('overflow') == 'visible'){
		jQuery("#"+id).slideDown('slow');
		return false;
	}else if(jQuery("#"+id).css('overflow') == 'visible'){
		jQuery("#"+id).slideUp('slow');
		return false;
	}
	
	//OLD
	/*if ($(id).style.display == 'none' && $(id).style.overflow == 'visible'){
		Effect.SlideDown(id, { duration: 0.3 });
		return false;
	}else if($(id).style.overflow == 'visible'){
		Effect.SlideUp(id, { duration: 0.3 });
		return false;
	}*/
}


function toogle(id){
	
	if ($(id).style.display == 'none' && $(id).style.overflow == 'visible'){
		Effect.SlideDown(id, { duration: 0.3 });
		return false;
	}else if($(id).style.overflow == 'visible'){
		Effect.SlideUp(id, { duration: 0.3 });
		return false;
	}
	
}



function hidepresent(id){

compteur = 0;
 while($(compteur + "-presentateur")) {
	 if ((compteur + "-presentateur") != id && $(compteur + "-presentateur").style.display != 'none'){
   Effect.SlideUp(compteur + "-presentateur");
	 }
   compteur++;
 }
	
}


function hideprog(elmt, id){
	//alert ($('liste_prog').childNodes.length);
	jQuery('.when li').removeClass('select');
	jQuery(elmt).parent().addClass('select');
	
	jQuery('#programmes_list .forthcoming ol').hide();
	jQuery('#'+id).show();
	
	/*for (i=0; i<= $('liste_prog').childNodes.length; i++) {
		if ($('liste_prog').childNodes[i].style && $('liste_prog').childNodes[i].getAttribute('id') != id){
			$('liste_prog').childNodes[i].style.display = 'none';
		}else{
			$(id).style.display = '';
			$(id).style.marginTop = '0px;';
		}
	}*/
}





function Montreoucaches(id){
	
	if ($(id).style.display == 'none' && $(id).style.overflow == 'visible'){
		Effect.SlideDown(id);
		return false;
	}else if($(id).style.overflow == 'visible'){
		Effect.SlideUp(id);
		return false;
	}
}