	nvg_btnaudio_off = new Image;
	nvg_btnaudio_off.src = "images/nvg_btnaudio_off.gif";
	nvg_btnaudio_on = new Image;
	nvg_btnaudio_on.src = "images/nvg_btnaudio_on.gif";
	nvg_btnvideo_off = new Image;
	nvg_btnvideo_off.src = "images/nvg_btnvideo_off.gif";
	nvg_btnvideo_on = new Image;
	nvg_btnvideo_on.src = "images/nvg_btnvideo_on.gif";
	nvg_btnnews_off = new Image;
	nvg_btnnews_off.src = "images/nvg_btnnews_off.gif";
	nvg_btnnews_on = new Image;
	nvg_btnnews_on.src = "images/nvg_btnnews_on.gif";
	nvg_btnartist_off = new Image;
	nvg_btnartist_off.src = "images/nvg_btnartist_off.gif";
	nvg_btnartist_on = new Image;
	nvg_btnartist_on.src = "images/nvg_btnartist_on.gif";
	nvg_btnlabels_off = new Image;
	nvg_btnlabels_off.src = "images/nvg_btnlabels_off.gif";
	nvg_btnlabels_on = new Image;
	nvg_btnlabels_on.src = "images/nvg_btnlabels_on.gif";
	nvg_btnmobiles_on = new Image;
	nvg_btnmobiles_on.src = "images/nvg_btnmobiles_on.gif";
	nvg_btnmobiles_off = new Image;
	nvg_btnmobiles_off.src = "images/nvg_btnmobiles_off.gif";
	
	function swapImg(x, y) {
	document.images[x].src=eval(y+'.src');
	}
	
	var xhr_object = null;

	// VERIFICATION POUR LE HTTP REQUEST
	function verif_xhr()
	{
		if(window.XMLHttpRequest) // Firefox et autres
			xhr_object = new XMLHttpRequest(); 
		else if(window.ActiveXObject) // Internet Explorer
		{  
			try 
			{
				xhr_object = new ActiveXObject("Msxml2.XMLHTTP"); 
			}
			catch (e) 
			{
				xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
			}
		}
		else // XMLHttpRequest non supporté par le navigateur
		{  
			alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest..."); 
			xhr_object = false; 
		} 	
	}
	
	// AFFICHAGE
	function affiche(p_id) 
	{  		
		if (document.getElementById(p_id).style.display == 'none')
			document.getElementById(p_id).style.display = '';					
	}
	
	// MASQUAGE
	function masque(p_id) 
	{  		
		if (document.getElementById(p_id).style.display == '')		
			document.getElementById(p_id).style.display = 'none';			
	}
	
	// AFFICHAGE ET MASQUAGE
	function affiche_masque(p_nb, p_id_select, p_id, p_background, p_gras) 
	{ 		
		if(p_nb == 0)
			p_nb = document.getElementById('nb_cat').value;
			
		for(var cpt = 1; cpt <= p_nb; cpt ++)
		{
			if(cpt != p_id_select)
			{
				document.getElementById(p_id+cpt).style.display = 'none';
				
				if(p_background != '')
					document.getElementById(p_background+cpt).style.backgroundPosition = '0% 0%';
					
				if(p_gras != '')
					document.getElementById(p_gras+cpt).style.fontWeight = 'normal';
			}
		}
		
		if(p_id_select != 0)
		{		
			document.getElementById(p_id+p_id_select).style.display = '';
			
			if(p_background != '')
				document.getElementById(p_background+p_id_select).style.backgroundPosition = '0% 100%';
				
			if(p_gras != '')
				document.getElementById(p_gras+p_id_select).style.fontWeight = 'bold';
		}
	}
	
	// CREATION OU DESTRUCTION D'UNE SESSION
	function session(p_action, p_nom, p_valeur)
	{
		if(p_action != '' && p_nom != '')
		{
			verif_xhr();
			
			xhr_object.open("POST", 'pg/resultats.php',true);
				
			xhr_object.onreadystatechange = function()
			{
				if (xhr_object.readyState == 4 && xhr_object.status == 200) 
				{
					if(xhr_object.responseText)
					{

					alert(xhr_object.responseText);
					return true;
					}
				}
			}
			
			xhr_object.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
			xhr_object.send("action="+p_action+"&nom="+p_nom+"&valeur="+p_valeur);
		}	
	}
	
	// VOTE TITRE ID
	function verif_commentaire() 
	{	 
		var msg = "";
		if(/\w/.test(document.form_commentaire.commentaire.value) == false)   
		{
			document.form_commentaire.commentaire.style.backgroundColor = "#E3C4C4";
			msg += "Vous n'avez pas laissé de commentaire\n";
		}
		if(msg == "")
		{
			document.form_commentaire.checked.value="1";
			if(document.form_commentaire.ban_url.value != "")
    			window.open(document.form_commentaire.ban_url.value);
			return(true);
		}
		else 
		{
		  alert(msg);
		  return(false);
		}
	}
	
	function jumpMenu(targ,selObj,restore){
	  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	  if (restore) selObj.selectedIndex=0;
	}
	
	function popup(page,largeur,hauteur) {
		var windowPop = window.open(page,"popbox","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width="+largeur+",height="+hauteur);
		windowPop.focus();
		windowPop.moveTo((screen.width-largeur)/2,(screen.height-hauteur)/2);
	}
	function popupname(page,nom,largeur,hauteur) {
		var windowPop = window.open(page,nom,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+largeur+",height="+hauteur);
		windowPop.focus();
		windowPop.moveTo((screen.width-largeur)/2,(screen.height-hauteur)/2);
	}
	function checkmail() {
	 
	   var msg = "";
	   if (document.form_news.ins_email.value != "")   {
		  indexAroba = document.form_news.ins_email.value.indexOf('@');
		  indexPoint = document.form_news.ins_email.value.indexOf('.');
		  if ((indexAroba < 0) || (indexPoint < 0))      {
		  document.form_news.ins_email.style.backgroundColor = "#E3C4C4";
		  msg += "Désolé mais l'email '"+document.form_news.ins_email.value+ "' n'est pas valide !";
		  }
	   }
	   if (msg == "")
		 return(true);
	else {
		  alert(msg);
		  return(false);
	}
	}
	
	<!--Max Media Manager Ad Tag Scripts //-->
	var az_channel = 'MSR';
	
	<!--Max Media Manager Ad Tag Scripts //-->
	var az_p=location.protocol=='https:'?'https:':'http:';
	var az_r=Math.floor(Math.random()*99999999);
	if (!document.phpAds_used) document.phpAds_used = ',';
	if (!document.context) document.context = '';
	
	function az_adjs(z,n)
	{
	  if (z>-1) {
		var az="<"+"script language='JavaScript' type='text/javascript' src='"+az_p+"//awrz.net/adjs.php?n="+n+"&zoneid="+z;
		az+="&source="+az_channel+"&exclude="+document.phpAds_used+"&context="+document.context+"&r="+az_r;
		if (window.location) az+="&loc="+escape(window.location);
		if (document.referrer) az+="&referer="+escape(document.referrer);
		az+="'><"+"/script>";
		document.write(az);
	  }
	}
	function az_adpop(z,n)
		{
		  if (z>-1) {
			var az="<"+"script language='JavaScript' type='text/javascript' src='"+az_p+"//awrz.net/adpopup.php?n="+n+"&zoneid="+z;
			az+="&source="+az_channel+"&exclude="+document.phpAds_used+"context="+document.context+"&r="+az_r;
			if (window.location) az+="&loc="+escape(window.location);
			if (document.referrer) az+="&referer="+escape(document.referrer);
			az+="'><"+"/script>";
			document.write(az);
		  }
		}
		var xhr = null; 
		function getXhr(){
						if(window.XMLHttpRequest) // Firefox et autres
						   xhr = new XMLHttpRequest(); 
						else if(window.ActiveXObject){ // Internet Explorer 
						   try {
									xhr = new ActiveXObject("Msxml2.XMLHTTP");
								} catch (e) {
									xhr = new ActiveXObject("Microsoft.XMLHTTP");
								}
						}
						else { // XMLHttpRequest non supporté par le navigateur 
						   alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest..."); 
						   xhr = false; 
						} 
					}
			/*	ajout d'un favori au profil */				
	function addprofil(rub,id){
							getXhr();
				// On défini ce qu'on va faire quand on aura la réponse
							xhr.onreadystatechange = function(){
								// On ne fait quelque chose que si on a tout reçu et que le serveur est ok
								if(xhr.readyState == 4 && xhr.status == 200){
									alert(xhr.responseText);
								}
							}
							xhr.open("POST","addprofil.php",true);
							xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
			
							var param = "id="+id+"&rub="+rub;
							xhr.send(param);
	}
	
	function email_verification(emailAddr) {
	// Cette fonction vérifie la bon format d'une adresse e-mail.
	// Comme :
	// user@domain.com ou user.perso@domain.com
	
	var i;
	
	// Recherche de @
	i = emailAddr.indexOf("@");
	if (i == -1) {
		return false;
	}
	
	// Séparation du nom de l'utilisateur et du nom de domaine.
	var username = emailAddr.substring(0, i);
	var domain = emailAddr.substring(i + 1, emailAddr.length)

	// Recherche des espaces au début du nom de l'utilisateur.
	i = 0;
	while ((username.substring(i, i + 1) == " ") && (i < username.length)) {
		i++;
	}
	// Les enlève s'il en trouve.
	if (i > 0) {
		username = username.substring(i, username.length);
	}

	// Recherche d'espaces à la fin du nom de domaine.
	i = domain.length - 1;
	while ((domain.substring(i, i + 1) == " ") && (i >= 0)) {
		i--;
	}
	// Les enlève s'il en trouve.
	if (i < (domain.length - 1)) {
		domain = domain.substring(0, i + 1);
	}
	//recherche du suffixe du domaine
	
	j = domain.indexOf(".");
	if (j == -1) {
		return false;
	}
	var suffixe = domain.substring(j + 1, domain.length);


	// Vérifie que le nom de l'utilisateur et du domaine ne soit pas vide ou domaine > 4.
	if ((username == "") || (domain == "") || (suffixe.length > 6)|| (suffixe.length < 2)) {
		return false;
	}
	
	// Vérifie s'il n'y a pas de caractères interdits dans le nom de l'utilisateur.
	var ch;
	for (i = 0; i < username.length; i++) {
		ch = (username.substring(i, i + 1)).toLowerCase();
		if (!(((ch >= "a") && (ch <= "z")) || 
			((ch >= "0") && (ch <= "9")) ||
			(ch == "_") || (ch == "-") || (ch == "."))) {
				return false;
		}
	}
	
	// Vérifie s'il n'y a pas de caractères interdits dans le nom de domaine
	for (i = 0; i < domain.length; i++) {
		ch = (domain.substring(i, i + 1)).toLowerCase();
		if (!(((ch >= "a") && (ch <= "z")) || 
			((ch >= "0") && (ch <= "9")) ||
			(ch == "_") || (ch == "-") || (ch == "."))) {
				return false;
		}
	}

	return true;
	
}

	function checkprofil() 
	{
		var msg = "";
		//Vérification du mail
		if (document.form_profil.ins_email.value != "")   
		{
			  indexAroba = document.form_profil.ins_email.value.indexOf('@');
			  indexPoint = document.form_profil.ins_email.value.indexOf('.');
			  if ((indexAroba < 0) || (indexPoint < 0))      
			  {
				 document.form_profil.ins_email.style.backgroundColor = "#BDCEDA";
				 msg += "L'adresse mail n'est pas valide\n";
			  }
		} 
		else 
		{
			  document.form_profil.ins_email.style.backgroundColor = "#BDCEDA";
			  msg += "Merci de saisir votre email\n";
		}
		if (document.form_profil.ins_password.value == "")   
		{
			  msg += "Merci de saisir un mot de passe\n";
			  document.form_profil.ins_password.style.backgroundColor = "#BDCEDA";
			  document.form_profil.ins_password2.style.backgroundColor = "#BDCEDA";
		}
		else if (document.form_profil.ins_password2.value == "")   
		{
			  msg += "Merci de confirmer le mot de passe\n";
			  document.form_profil.ins_pasword2.style.backgroundColor = "#BDCEDA";
		}
		else if (document.form_profil.ins_password.value != document.form_profil.ins_password2.value)   
		{
			  msg += "Les mots de passe ne coincident pas\n";
			  document.form_profil.ins_password.style.backgroundColor = "#BDCEDA";
				document.form_profil.ins_password2.style.backgroundColor = "#BDCEDA";
		}
		if (document.form_profil.ins_login.value == "")   
		{
			  msg += "Merci de saisir un login\n";
			  document.form_profil.ins_login.style.backgroundColor = "#BDCEDA";
		}
		else if (document.form_profil.ins_login.value.length <  3)   
		{
			  msg += "Le login est trop court\n";
			  document.form_profil.ins_login.style.backgroundColor = "#BDCEDA";
		}
		
		if (document.form_profil.login_exist.value == "1")   
		{
			  msg += "le login existe déjà";
			  document.form_profil.ins_login.style.backgroundColor = "#BDCEDA";
		}
		
		if (document.form_profil.ins_nom.value == "")   
		{
			  msg += "Merci de saisir votre nom\n";
			  document.form_profil.ins_nom.style.backgroundColor = "#BDCEDA";
		}
		
		if (document.form_profil.ins_prenom.value == "")   
		{
			  msg += "Merci de saisir votre prénom\n";
			  document.form_profil.ins_prenom.style.backgroundColor = "#BDCEDA";
		}
		if (!document.form_profil.ins_sexe_M.checked && !document.form_profil.ins_sexe_F.checked)   
		{
			  msg += "Merci de préciser votre sexe\n";
			  document.form_profil.ins_sexe_M.style.backgroundColor = "#BDCEDA";
			  document.form_profil.ins_sexe_F.style.backgroundColor = "#BDCEDA";
		}
		/*if ( document.form_profil.date_an.value!="")
		{
			if(document.form_profil.ins_naissance.value) > 2005) || (parseInt(document.form_profil.date_an.value) < 1880) || ( isNaN(document.form_profil.date_an.value) ) )
				  msg += "Votre année de naissance est erronée \n";
		}*/
		
		// résultat
		if (msg == "")
		{
			document.form_profil.checked.value="1";
			return(true);
		}
		else 
		{
			  alert(msg);
			  return(false);
		}
	}
<!-- Trafiz - Outils de statistiques de trafic -->
function get_trafiz() {
<!--
var id=3140;
url1='http://www.musique-radio.com|http://www.musiqueradio.com';
url2='http://www.referencement-2000.com';
url3='http://www.plusdehits.com';
if (document.referrer.length > 0) {
urlreg = '('+url1+'|'+url2+'|'+url3+')';
hasard = Math.round(Math.random()*10000);
var refer= escape(document.referrer);
var tagdebut= '<LINK rel="stylesheet" type="text/css" href="http://stats.ref2000.com/stats.css?idbrioude='+id;
tagdebut+='&thereferer=';
var tagfin ='">';
var tagmilieu='';
var pagescript= escape(window.location);
var page = "&page="+pagescript;
page+='&hasard=';
reg1 = /(xml_bi|cpc_bi)/;
ok2 = reg1.exec(window.location);
var reg = new RegExp(urlreg,'i');
ok = reg.exec(document.referrer);
if ((!ok)&&(!ok2)) {
document.write(''+tagdebut+refer+tagfin);
}
}
}
<!-- Fin Trafiz -->
function flash_activ() {
theObjects = document.getElementsByTagName("object");
for (var i = 0; i < theObjects.length; i++)
{
	theObjects[i].outerHTML = theObjects[i].outerHTML;
}
}
function code_profil(membre, imagejpg) {
		document.form1.code_profil_txt.value = '<a target="_blank" href="http://www.musiqueradio.com/membre-'+membre+'" title="Profil de '+membre+' sur Musiqueradio.com" ><img src="http://www.musiqueradio.com/images/'+imagejpg+'" alt="'+membre+' - My Musique Radio" border="0"/></a>';
		
	}

// LIMITATION DE CARACTERES
function restrictinput(maxlength,e,placeholder)
{
	if (window.event&&event.srcElement.value.length>=maxlength)
		return false
	else if (e.target&&e.target==eval(placeholder)&&e.target.value.length>=maxlength)
	{
		var pressedkey=/[a-zA-Z0-9\.\,\/]/ 
		if (pressedkey.test(String.fromCharCode(e.which)))
		e.stopPropagation()
	}
}

function countlimit(maxlength,e,placeholder)
{
	var theform=eval(placeholder)
	var lengthleft=maxlength-theform.value.length
	var placeholderobj=document.all? document.all[placeholder] : document.getElementById(placeholder)
	if (window.event||e.target&&e.target==eval(placeholder))
	{
		if (lengthleft<0)
			theform.value=theform.value.substring(0,maxlength)
			
		placeholderobj.innerHTML=lengthleft
	}
}

function displaylimit(thename, theid, thelimit)
{
	var theform=theid!=""? document.getElementById(theid) : thename
	var limit_text='<span id="'+theform.toString()+'" class="nb_caract">'+thelimit+'</span>';
	if (document.all||ns6)
		document.write(limit_text)
	if (document.all)
	{
		eval(theform).onkeypress=function(){ return restrictinput(thelimit,event,theform)}
		eval(theform).onkeyup=function(){ countlimit(thelimit,event,theform)}
	}
	else if (ns6)
	{
		document.body.addEventListener('keypress', function(event) { restrictinput(thelimit,event,theform) }, true); 
		document.body.addEventListener('keyup', function(event) { countlimit(thelimit,event,theform) }, true); 
	}
}



function verification_partage()
{
	var msg = "";
	
	// @
	/*if(/\w/.test(document.form_partage.mail_exped.value))   
	{
		indexAroba = document.form_partage.mail_exped.value.indexOf('@');
		indexPoint = document.form_partage.mail_exped.value.indexOf('.');
		
		if ((indexAroba < 0) || (indexPoint < 0))      
		{
			document.form_partage.mail_exped.style.backgroundColor = "#E2C4C4";
			msg += "Votreadresse email n'est pas valide\n";
		}
		
		if(document.form_partage.nom_exped.value != "" && document.form_partage.nom_exped.value == document.form_partage.mail_exped.value)
		{
			document.form_partage.nom_exped.style.backgroundColor = "#E2C4C4";
			msg += "Votre nom doit être différent de votre adresse email\n";
		}
	} 
	else 
	{
		  document.form_partage.mail_exped.style.backgroundColor = "#E2C4C4";
		  msg += "Merci de saisir votre email\n";
	}*/
	
	// LOGIN
	if(/\w/.test(document.form_partage.nom_exped.value) == false)   
	{
		msg += "Merci de saisir votre nom\n";
		document.form_partage.nom_exped.style.backgroundColor = "#E2C4C4";
	}
	
	// @ 1
	if(/\w/.test(document.form_partage.mail_dest_1.value))   
	{
		indexAroba = document.form_partage.mail_dest_1.value.indexOf('@');
		indexPoint = document.form_partage.mail_dest_1.value.indexOf('.');
		
		if ((indexAroba < 0) || (indexPoint < 0))      
		{
			document.form_partage.mail_dest_1.style.backgroundColor = "#E2C4C4";
			msg += "L'adresse email de votre 1er ami n'est pas valide\n";
		}
	} 
	
	// @ 2
	if(/\w/.test(document.form_partage.mail_dest_2.value))   
	{
		indexAroba = document.form_partage.mail_dest_2.value.indexOf('@');
		indexPoint = document.form_partage.mail_dest_2.value.indexOf('.');
		
		if ((indexAroba < 0) || (indexPoint < 0))      
		{
			document.form_partage.mail_dest_2.style.backgroundColor = "#E2C4C4";
			msg += "L'adresse email de votre 2ème ami n'est pas valide\n";
		}
	} 
	
	// @ 3
	if(/\w/.test(document.form_partage.mail_dest_3.value))   
	{
		indexAroba = document.form_partage.mail_dest_3.value.indexOf('@');
		indexPoint = document.form_partage.mail_dest_3.value.indexOf('.');
		
		if ((indexAroba < 0) || (indexPoint < 0))      
		{
			document.form_partage.mail_dest_3.style.backgroundColor = "#E2C4C4";
			msg += "L'adresse email de votre 3ème n'est pas valide\n";
		}
	} 
	
	// @ 4
	if(/\w/.test(document.form_partage.mail_dest_4.value))   
	{
		indexAroba = document.form_partage.mail_dest_4.value.indexOf('@');
		indexPoint = document.form_partage.mail_dest_4.value.indexOf('.');
		
		if ((indexAroba < 0) || (indexPoint < 0))      
		{
			document.form_partage.mail_dest_4.style.backgroundColor = "#E2C4C4";
			msg += "L'adresse email de votre 4ème ami n'est pas valide\n";
		}
	} 
	
	// @ 5
	if(/\w/.test(document.form_partage.mail_dest_5.value))   
	{
		indexAroba = document.form_partage.mail_dest_5.value.indexOf('@');
		indexPoint = document.form_partage.mail_dest_5.value.indexOf('.');
		
		if ((indexAroba < 0) || (indexPoint < 0))      
		{
			document.form_partage.mail_dest_5.style.backgroundColor = "#E2C4C4";
			msg += "L'adresse email de votre 5ème ami n'est pas valide\n";
		}
	} 
	
	if(( /\w/.test(document.form_partage.mail_dest_1.value) == false) && ( /\w/.test(document.form_partage.mail_dest_2.value) == false) && ( /\w/.test(document.form_partage.mail_dest_3.value) == false)
	&& ( /\w/.test(document.form_partage.mail_dest_4.value) == false) && ( /\w/.test(document.form_partage.mail_dest_5.value) == false))
	{
		  document.form_partage.mail_dest_1.style.backgroundColor = "#E2C4C4";
		  msg += "Merci de saisir l'email d'au moins un de vos amis\n";
	}
	
	// EDITO
	if(/\w/.test(document.form_partage.message.value) == false)
	{
		document.form_partage.message.value = "Je te recommande vivement ce lien sur Musique-radio.com !";
	}
	
	if (msg == "")
	{
		document.form_partage.checked.value="1";
		return(true);
	}
	else 
	{
		  alert(msg);
		  return(false);
	}
}


/* PARTAGE */
function partager(p_rub, p_id, p_url) 
{		
	if(document.form_partage.checked.value == 1)
	{
		var xhr_object = null;
		
		if(window.XMLHttpRequest) // Firefox
		  xhr_object = new XMLHttpRequest();
		else if(window.ActiveXObject) // Internet Explorer
		  xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
		else 
		{ // XMLHttpRequest non supporté par le navigateur
		  alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");
		  return;
		}
		
		xhr_object.open("POST", "../pg/resultats.php", true);
		
		xhr_object.onreadystatechange = function() 
		{
			if(xhr_object.readyState == 4 && xhr_object.status == 200)
			{
				document.getElementById('partage').innerHTML = xhr_object.responseText;
			}
			else
			{
				document.getElementById('partage').innerHTML = '<img name="image" src="../images/loadingAnimation.gif" />';
			}
		}
		
		xhr_object.setRequestHeader("Content-type", "application/x-www-form-urlencoded");			
		xhr_object.send("action=partager&nom_exped="+document.getElementById('nom_exped').value+"&mail_exped="+document.getElementById('mail_exped').value+"&mail_dest_1="+document.getElementById('mail_dest_1').value+"						&mail_dest_2="+document.getElementById('mail_dest_2').value+"&mail_dest_3="+document.getElementById('mail_dest_3').value+"&mail_dest_4="+document.getElementById('mail_dest_4').value+"&message="+document.getElementById('message').value+"&rubrique="+p_rub+"&id="+p_id);
	}
}
