function followHiddenLink( link, target )
{
	document.location.href = link;
}

function scrambleJS(urlscrambled)
{
	var l  = '';
	urlscrambled=urlscrambled.substring(1);
	l = urlscrambled.replace(/\|/g,'/').replace(/@/g,'.');
	window.location.href=l;
}

function ajax_exec(divId)
{
	var m = document.getElementById(divId);
  	var allscript = m.getElementsByTagName('script');
    for(var i=0;i< allscript.length;i++){
   	 eval(allscript[i].text);
    }
}

function exists() {
	
}
	
/* report */
var domin = '';
var animation = false;

function report2(id, type) {
	window.open ('http://moderatus.netino.com/clients/all/abuse.asp?origine=NRJ&content_id=' + type + id, 'Abuse' +id, config='height=500, width=900, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no')
}

function report(id, type) {

	var domin = "http://www" + window.location.hostname.replace( /^[^.]*/i, "" );

	window.open (domin + '/alerter/?content_id=' + type + id, 'Abuse' +id, config='height=500, width=750, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no');

}
	
	/* Simple Collapse */
	function simpleCollapse(id) {
	
		if( ! document.getElementById(id) ) return;
		var header = document.getElementById("header_quick_access_unfolded");
		
		header.style.height = 'auto';
		header.style.display = 'block';
		
		if(document.getElementById(id).style.display != 'none')
		{
			if(animation == false)
			{
				animation = true;
				new Effect.BlindUp(document.getElementById(id), {afterFinish: function() { document.getElementById(id).style.display = 'none'; animation = false; } } );
			}
			//	document.getElementById(id).style.display = 'none';
		}
		else
		{
			if(animation == false)
			{
				animation = true;
				new Effect.BlindDown(document.getElementById(id), {afterFinish: function() { document.getElementById(id).style.display = ''; animation = false; } } );
			}
			
			// document.getElementById(id).style.display = '';
		}
	
	}
	
	function simpleReinitAll()
	{
		if( $('header_menu_buttons_button_1') )
		$('header_menu_buttons_button_1').getElementsByTagName('a')[0].style.backgroundImage = 'url(http://www.nrj.fr/images/header/ecouter-webradios.png)';
		if( $('header_menu_buttons_button_2') )
		$('header_menu_buttons_button_2').getElementsByTagName('a')[0].style.backgroundImage = 'url(http://www.nrj.fr/images/header/regarder-webtvs.png)';
		if( $('header_menu_buttons_button_3') )
		$('header_menu_buttons_button_3').getElementsByTagName('a')[0].style.backgroundImage = 'url(http://www.nrj.fr/images/header/tv-on-demand.png)';
	}
	
	function simpleCollapseAnimation(id) {
	
		var header = document.getElementById("header_quick_access_unfolded");
	
		header.style.height = 'auto';
		header.style.display = 'block';
		
		simpleReinitAll();
		
		if(document.getElementById(id).style.display != 'none')
		{
			document.getElementById(id).style.display = 'none';
		}
		else
		{
			
			if(id == 'bloc_top1') $('header_menu_buttons_button_1').getElementsByTagName('a')[0].style.backgroundImage = 'url(http://www.nrj.fr/images/header/ecouter-webradios-hover.png)';
			if(id == 'bloc_top2') $('header_menu_buttons_button_2').getElementsByTagName('a')[0].style.backgroundImage = 'url(http://www.nrj.fr/images/header/regarder-webtvs-hover.png)';
			if(id == 'bloc_top3') $('header_menu_buttons_button_3').getElementsByTagName('a')[0].style.backgroundImage = 'url(http://www.nrj.fr/images/header/tv-on-demand-hover.png)';
					
			document.getElementById(id).style.display = '';
		}
	
		/*if(document.getElementById(id).style.display != 'none')
		{
			var fadeExample = new YAHOO.util.Anim(id, { opacity: { from: 1, to: 0 } }, .2, YAHOO.util.Easing.easeOut);
			fadeExample.animate();
			window.setTimeout("document.getElementById('"+id+"').style.display = 'none';",200);
		}
		else
		{
			document.getElementById(id).style.display = '';
			document.getElementById(id).style.opacity = '0';
	
			var fadeExample = new YAHOO.util.Anim(id, { opacity: { from: 0, to: 1 } }, .4, YAHOO.util.Easing.easeOut);
			fadeExample.animate();
			window.setTimeout("document.getElementById('"+id+"').style.display = '';",400);
		}*/
	
	}
	
	
	function simpleClose(id) {
	
		document.getElementById(id).style.display = 'none';
	
	}
	
	/* top */
	/*
	   * Ch�rie FM - Tous droits r�serv�s
	   */
	
	  var total_bloc_top = new Array(1,2);
	
	  function openBlocTop(id)
	  {
	    // Ouvrir le bon sous menu
	    document.getElementById("bloc_top" + id).style.display = '';
	    //document.getElementById('header_menu').className = 'header_menu_content_js_select';
	  }
	
	  function flushBlocTop()
	  {
	    // Fermer les autres sous menus
		document.getElementById("bloc_top1").style.display = 'none';
	    document.getElementById("bloc_top2").style.display = 'none';
	  }
