vitesse_opacite = 200;
listval = "";
MyBoxA = 0;

function aff_form_vol()
{
	function aff_vol()
	{
		objetsVoles = new Array();
		document.getElementById('formulaire_vol').style.display = 'block';
		document.getElementById('form_vol').style.display = 'none';
		document.getElementById('nom').value = "";
		document.getElementById('email').value = "";
		document.getElementById('pays').value = "0";
		document.getElementById('dep').value = "0";
		document.getElementById('ville').value = "";
		document.getElementById('datevol').value = "";
		document.getElementById('precisions').value = "";
		maj_liste_objvol();
	}
	if (document.getElementById('formulaire_vol').style.display == "block")
	{
		MyBoxA.confirm('Toutes les informations seront perdues. Recommencer la rédaction de ce vol ?',{textBoxBtnOk: 'Oui', textBoxBtnCancel: 'Non', onComplete: function(returnvalue) { if (returnvalue) {aff_vol();} } });
	}
	else
	{
		aff_vol();
	}
}

function annuler_vol()
{
	function ann_vol()
	{
		document.getElementById('formulaire_vol').style.display = 'none';
	}
	MyBoxA.confirm('Toutes les informations seront perdues. Annuler la rédaction de ce vol ?',{textBoxBtnOk: 'Oui', textBoxBtnCancel: 'Non', onComplete: function(returnvalue) { if (returnvalue) {ann_vol();} } });
}

function publier_vol()
{
	function add_vol()
	{
		if (document.getElementById('nom').value == "" || document.getElementById('email').value == "")
		{
			alerte('', 'Erreur :', '<br /><br />Le nom du contact et<br />l\'adresse e-mail<br />sont obligatoires...', 3);
		}
		else if (!email_valide(document.getElementById('email').value))
		{
			alerte('', 'Erreur...', '<br /><br /><br />Le format de l\'email<br />est invalide...', 2.5);
		}
		else
		{
			if (objetsVoles.length > 0)
			{
				objets = "";
				objli = document.getElementById('ordreobjvol').firstChild;
				while (objli!=null)
				{
					for (i=0; i<objetsVoles.length; i++)
					{
						if (objetsVoles[i].id == objli.id)
						{
							objets+=objetsVoles[i].nom+'[|]'+objetsVoles[i].photos+'[|]'+objetsVoles[i].commentaire+'[||]';
							break;
						}
					}
					objli = objli.nextSibling;
				}
				objets = objets.substr(0, objets.length-4);
				vol = document.getElementById('nom').value+'[|]';
				vol+= document.getElementById('email').value+'[|]';
				vol+= document.getElementById('pays').value+'[|]';
				vol+= document.getElementById('dep').value+'[|]';
				vol+= document.getElementById('ville').value+'[|]';
				vol+= document.getElementById('datevol').value+'[|]';
				vol+= document.getElementById('precisions').value;
				variable = encode_ajax(vol+'[|||]'+objets);
				ficajaxPOST('ajax.php', 'vol='+variable+'&captcha='+document.getElementById('captcha').value, 'volOK');
			}
			else
			{
				alerte('', 'Erreur :', '<br /><br />Le formulaire doit<br />contenir au moins<br />un objet volé...', 3);
			}
		}
	}
	MyBoxA.confirm('Publier ce vol sur Drumprofile ?',{textBoxBtnOk: 'Oui', textBoxBtnCancel: 'Non', onComplete: function(returnvalue) { if (returnvalue) {add_vol();} } });
}

function propose_supp_objvol(id)
{
	function supp_objvol(id)
	{
		nbr = objetsVoles.length;
		for (i=0; i<nbr; i++)
		{
			if (objetsVoles[i].id == id)
			{
				num = i;
				break;
			}
		}
		for (i=num; i<nbr-1; i++)
		{
			objetsVoles[i] = objetsVoles[i+1];
		}
		objetsVoles.pop();
		maj_liste_objvol();
	}
	MyBoxA.confirm('Supprimer définitivement cet objet ?',{textBoxBtnOk: 'Oui', textBoxBtnCancel: 'Non', onComplete: function(returnvalue) { if (returnvalue) {supp_objvol(id);} } });
}

function maj_liste_objvol()
{
	document.getElementById('liste_vols').style.display = "none";
	if (objetsVoles.length > 0)
	{
		document.getElementById('liste_vols').style.display = "block";
		zone = document.getElementById('liste_vols');
		zone.innerHTML = "";
		if (objetsVoles.length > 1)
		{
			zone.innerHTML = "Déplacez les objets avec votre souris pour changer l\'ordre d'apparition.<br /><br />";
		}
		var objul = document.createElement("ul");
		objul.id = "ordreobjvol";
		zone.appendChild(objul);
		for (i=0; i<objetsVoles.length; i++)
		{
			susp = '';
			if (objetsVoles[i].nom.length > 30)
			{
				susp = '...';
			}
			contenu = objetsVoles[i].nom.substr(0, 30)+susp;
			contenu+=' <input type="button" value="Supprimer" onmousedown="propose_supp_objvol(\''+objetsVoles[i].id+'\')" />';
			contenu+=' <input type="button" value="Modifier" onmousedown="form_vol(\''+objetsVoles[i].id+'\')" />';
			var objli = document.createElement("li");
			objli.id = objetsVoles[i].id;
			objli.className = "sortme";
			objli.innerHTML = contenu;
			objul.appendChild(objli);
		}
		new Sortables($('ordreobjvol'), {
			initialize: function(){
				this.elements.each(function(element, i){
					element.setStyle('background-color', '#444444');
					element.setStyle('border', 'solid 1px #999999');
					element.setStyle('text-align', 'left');
					element.setStyle('font-size', 11);
					element.setStyle('width', 395);
					element.setStyle('height', 20);
				});
			}
		});
	}
}

function maxID_objvol()
{
	max = 0;
	for (i=0; i<objetsVoles.length; i++)
	{
		if (objetsVoles[i].id > max)
		{
			max = objetsVoles[i].id;
		}
	}
	return max;
}

function valide_objetvole()
{
	id = document.getElementById('modeobjvol').value;
	if (id != "") // modif
	{
		if (document.getElementById('objnom').value != "")
		{
			for (i=0; i<objetsVoles.length; i++)
			{
				if (objetsVoles[i].id == id)
				{
					num = i;
					break;
				}
			}
			objetsVoles[num].nom = document.getElementById('objnom').value;
			objetsVoles[num].commentaire = document.getElementById('objcomm').value;
			objetsVoles[num].photos = document.getElementById('objph1').value+'|'+document.getElementById('objph2').value+'|'+document.getElementById('objph3').value+'|'+document.getElementById('objph4').value+'|'+document.getElementById('objph5').value;
			document.getElementById('form_vol').style.display = "none";
			maj_liste_objvol();
		}
		else
		{
			alerte('', 'Erreur :', '<br /><br />Le nom de l\'objet<br />est obligatoire...', 2.5);
		}
	}
	else // ajout
	{
		if (document.getElementById('objnom').value != "")
		{
			num = objetsVoles.length;
			objetsVoles[num] = new objetVole();
			objetsVoles[num].id = maxID_objvol() + 1;
			objetsVoles[num].nom = document.getElementById('objnom').value;
			objetsVoles[num].commentaire = document.getElementById('objcomm').value;
			objetsVoles[num].photos = document.getElementById('objph1').value+'|'+document.getElementById('objph2').value+'|'+document.getElementById('objph3').value+'|'+document.getElementById('objph4').value+'|'+document.getElementById('objph5').value;
			document.getElementById('form_vol').style.display = "none";
			maj_liste_objvol();
		}
		else
		{
			alerte('', 'Erreur :', '<br /><br />Le nom de l\'objet<br />est obligatoire...', 2.5);
		}
	}
}

function form_vol(id)
{
	document.getElementById('form_vol').style.display = "block";
	if (id) // modif
	{
		document.getElementById('modeobjvol').value = id;
		document.getElementById('bouton_valide_obj').value = "Mettre à jour";
		for (i=0; i<objetsVoles.length; i++)
		{
			if (objetsVoles[i].id == id)
			{
				num = i;
				break;
			}
		}
		document.getElementById('objnom').value = objetsVoles[num].nom;
		document.getElementById('objcomm').value = objetsVoles[num].commentaire;
		photo = objetsVoles[num].photos.split('|');
		document.getElementById('objph1').value = photo[0];
		document.getElementById('objph2').value = photo[1];
		document.getElementById('objph3').value = photo[2];
		document.getElementById('objph4').value = photo[3];
		document.getElementById('objph5').value = photo[4];
		document.getElementById('objnom').focus();
	}
	else // ajout
	{
		document.getElementById('modeobjvol').value = "";
		document.getElementById('bouton_valide_obj').value = "Ajouter";
		document.getElementById('objnom').value = "";
		document.getElementById('objcomm').value = "";
		document.getElementById('objph1').value = "";
		document.getElementById('objph2').value = "";
		document.getElementById('objph3').value = "";
		document.getElementById('objph4').value = "";
		document.getElementById('objph5').value = "";
		document.getElementById('objnom').focus();
	}
}

function objetVole()
{
	this.id = "";
	this.nom = "";
	this.photos = "";
	this.commentaire = "";
}

function nouveau_captcha()
{
	num = Math.random();
	document.getElementById('img_captcha').src = 'captcha.php?num='+Math.round(num * 1000000000);
}

function maj_kit_defaut(nom)
{
	ficajax('ajax.php?maj_kit_defaut='+encode_ajax(nom));
	document.getElementById('zone_kit_defaut').innerHTML = ' Kit par défaut';
}

function aff_kit_defaut(nom)
{
	if (document.getElementById('liste_kits').length > 0)
	{
		retour = ficajax('ajax.php?aff_kit_defaut='+encode_ajax(nom));
		if (retour == "0")
		{
			document.getElementById('zone_kit_defaut').innerHTML = ' <input type="button" value="Kit par défaut" onclick="maj_kit_defaut(document.getElementById(\'liste_kits\').value)" />';
		}
		else if (retour == "1")
		{
			document.getElementById('zone_kit_defaut').innerHTML = " Kit par défaut";
		}
	}
	else
	{
		document.getElementById('zone_kit_defaut').innerHTML = "";
	}
}

function supp_message(id, supp, typ)
{
	function supp_mess(id, supp, typ)
	{
		/*
			0 = visible
			1 = dest supp
			2 = exp supp
			3 = dest + exp supp
		*/
		if (typ == 'dest')
		{
			if (supp == 0) {supp = 1;}
			else if (supp == 2) {supp = 3;}
		}
		else if (typ == 'exp')
		{
			if (supp == 0) {supp = 2;}
			else if (supp == 1) {supp = 3;}
		}
		ficajax('ajax.php?supp_message='+id+'&supp='+supp);
		affiche_page('messagerie');
	}
	MyBoxA.confirm('Supprimer définitivement ce message ?',{textBoxBtnOk: 'Oui', textBoxBtnCancel: 'Non', onComplete: function(returnvalue) { if (returnvalue) {supp_mess(id, supp, typ);} } });
}

function envoie_message(pseudo)
{
	dest = document.formulaire_messagerie.destinataire.value;
	mess = encode_ajax(document.formulaire_messagerie.message.value);
	if (dest == '' || mess == '')
	{
		alerte('', 'Erreur :', '<br /><br />Tous les champs<br />sont obligatoires...', 2.5);
	}
	else if (dest.toLowerCase() == pseudo.toLowerCase())
	{
		alerte('', 'Erreur :', '<br /><br />Vous ne pouvez pas<br />vous envoyer un message...', 2.5);
	}
	else
	{
		retour = ficajaxPOST("ajax.php", "envoie_message=1&dest="+dest+"&mess="+mess);
		if (retour == '0')
		{
			alerte('', 'Erreur :', '<br /><br />Destinataire<br />introuvable...', 2.5);
		}
		else
		{
			alerte('', 'Confirmation', '<br /><br /><br />Message envoyé<br />avec succès.', 2.5);
			affiche_page('messagerie');
		}
	}
}

function message_lu(id)
{
	nbr = ficajax("ajax.php?message_lu="+id);
	document.getElementById('togglerecu'+id).style.fontWeight = 'normal';
	document.getElementById('nbrmessages_entete').innerHTML = nbr;
	document.getElementById('nbrmessages_menu').innerHTML = nbr;
}

function nbr_wallpaper(id)
{
	ficajax("ajax.php?nbr_wallpaper="+id);
}

function maj_apercu_truc(titre, desc)
{
	desc = HTMLentities(desc);
	desc = desc.replace(/[\n]/g,'<br />');
	document.getElementById('apercu_truc').innerHTML = '<b>'+HTMLentities(titre)+'</b><br /><br />'+desc;
}

function ajoute_astuce()
{
	titre = document.getElementById('titre').value;
	desc = document.getElementById('desc').value;
	captcha = document.getElementById('captcha').value;
	if (titre != '' && desc != '' && captcha != '')
	{
		function add_truc(titre, desc, captcha)
		{
			retour = ficajaxPOST("ajax.php", "ajoutetruc=ok&titre="+titre+"&desc="+desc+"&captcha="+captcha);
			if (retour != "erreur_code")
			{
				alerte('', 'Merci', '<br /><br />Votre conseil sera<br />publié après validation<br />du Webmaster.', 3.5);
				affiche_page('trucs', '0', '1');
			}
			else
			{
				alerte('', 'Erreur', '<br /><br />Le code que vous avez<br />saisi est invalide.', 2.5);
			}
		}
		MyBoxA.confirm('Ajouter cette astuce sur Drumprofile ?',{textBoxBtnOk: 'Oui', textBoxBtnCancel: 'Non', onComplete: function(returnvalue) { if (returnvalue) {add_truc(titre, desc, captcha);} } });
	}
	else
	{
		alerte('', 'Erreur :', '<br /><br />Toutes les informations<br />sont obligatoires...', 2.5);
	}
}

function note_truc(id, note)
{
	document.getElementById('note'+id).innerHTML = ficajax("ajax.php?notetruc=ok&id="+id+"&note="+note);
	document.getElementById('noter'+id).innerHTML = ' - A voté...';
}

function voir_resultat_sondage_accueil(question, boxid)
{
	document.getElementById('box'+boxid).innerHTML = ficajax("ajax.php?voir_resultat_sondage_accueil=ok&question="+question+'&boxid='+boxid);
}

function voir_sondage_accueil(question, boxid)
{
	document.getElementById('box'+boxid).innerHTML = ficajax("ajax.php?voir_sondage_accueil=ok&question="+question+'&boxid='+boxid);
}

function voter_accueil(question, boxid, choix)
{
	if (choix != "-1")
	{
		document.getElementById('box'+boxid).innerHTML = ficajax("ajax.php?vote=ok&question="+question+"&choix="+choix+"&boxid="+boxid);
	}
}

function voter(question)
{
	val = -1;
	elem = document.form_sondage.choix;
	for (i=0; i<elem.length; i++)
	{
		if (elem[i].checked == true)
		{
			val = elem[i].id;
			break;
		}
	}
	if (val != -1)
	{
		ficajax("ajax.php?vote=ok&question="+question+"&choix="+val);
	}
	affiche_page('sondages', question);
}

function demande_supp_portlet(id)
{
	MyBoxA.confirm('Supprimer définitivement ce flux d\'informations ?',{textBoxBtnOk: 'Oui', textBoxBtnCancel: 'Non', onComplete: function(returnvalue) { if (returnvalue) {supp_portlet(id);} } });
}

function supp_portlet(id)
{
	ficajax("ajax.php?supp_portlet="+id);
	affiche_page('accueil');
}

function sauve_portlets()
{
	ficajaxPOST("ajax.php", "maj_portlets="+recup_portlets());
}

function maj_ajout_portlet(val)
{
	texte = '<form name="form_ajout_portlets" style="background: none; border: none; text-align: left; padding: 0px; margin: 0px">';
	if (val == '0')
	{
		texte+='<label><input type="radio" name="portlet_news" value="0" checked /> Les dernières news</label><br />';
		texte+='<label><input type="radio" name="portlet_news" value="1" /> Les dernières news concernant le site</label><br />';
		texte+='<label><input type="radio" name="portlet_news" value="2" /> Les dernières news concernant la batterie</label><br />';
		texte+='<label><input type="radio" name="portlet_news" value="3" /> La dernière news complète</label><br />';
		texte+='<label><input type="radio" name="portlet_news" value="4" /> La dernière news complète concernant le site</label><br />';
		texte+='<label><input type="radio" name="portlet_news" value="5" /> La dernière news complète concernant la batterie</label><br />';
	}
	else if (val == '1')
	{
		texte+='<label><input type="radio" name="portlet_sondages" value="0" checked /> Le dernier sondage</label><br />';
		texte+='<label><input type="radio" name="portlet_sondages" value="1" /> Le dernier sondage ayant été voté</label><br />';
		texte+='<label><input type="radio" name="portlet_sondages" value="2" /> Le sondage le plus populaire</label><br />';
		texte+='<label><input type="radio" name="portlet_sondages" value="3" /> Les derniers sondages</label><br />';
	}
	else if (val == '2')
	{
		texte+='Mes derniers messages reçus. (non lus)<br />';
	}
	else if (val == '3')
	{
		texte+='<label><input type="radio" name="portlet_wallpapers" value="0" checked /> Les derniers fonds d\'écran</label><br />';
		texte+='<label><input type="radio" name="portlet_wallpapers" value="1" /> Les fonds d\'écran les plus vus</label><br />';
	}
	else if (val == '4')
	{
		texte+='<label><input type="radio" name="portlet_trucs" value="0" checked /> Les derniers conseils</label><br />';
		texte+='<label><input type="radio" name="portlet_trucs" value="1" /> Les conseils les mieux notés</label><br />';
	}
	else if (val == '5')
	{
		texte+='Les dernieres infos<br />';
	}
	else if (val == '6')
	{
		texte+='Statistiques diverses sur mon profil<br />';
	}
	else if (val == '7')
	{
		document.getElementById('valide_flux').disabled = false;
		texte+='<select id="recherches">';
		retour = ficajaxPOST("ajax.php", "maj_liste_rech=ok");
		if (retour != "")
		{
			retour = retour.split('[|]');
			ids = retour[0].split('|');
			noms = retour[1].split('|');
			if (ids != '')
			{
				for (i=0; i<ids.length; i++)
				{
					texte+='<option value="'+ids[i]+'">'+decode_ajax(noms[i])+'</option>';
				}
			}
			else
			{
				document.getElementById('valide_flux').disabled = true;
				texte+='Vous n\'avez sauvegardé aucune recherche thématique...';
			}
		}
		else
		{
			document.getElementById('valide_flux').disabled = true;
			texte+='Vous n\'avez sauvegardé aucune recherche thématique...';
		}
		texte+='</select>';
	}
	texte+= '</form>';
	document.getElementById('type_portlet').innerHTML = texte;
}

function ajoute_portlet()
{
	type = document.getElementById('liste_portlets').value;
	if (type == '0')
	{
		elem = document.form_ajout_portlets.portlet_news;
		for (i=0; i<elem.length; i++)
		{
			if (elem[i].checked == true)
			{
				val = i;
				break;
			}
		}
	}
	else if (type == '1')
	{
		elem = document.form_ajout_portlets.portlet_sondages;
		for (i=0; i<elem.length; i++)
		{
			if (elem[i].checked == true)
			{
				val = i;
				break;
			}
		}
	}
	else if (type == '2')
	{
		val = '';
	}
	else if (type == '3')
	{
		elem = document.form_ajout_portlets.portlet_wallpapers;
		for (i=0; i<elem.length; i++)
		{
			if (elem[i].checked == true)
			{
				val = i;
				break;
			}
		}
	}
	else if (type == '4')
	{
		elem = document.form_ajout_portlets.portlet_trucs;
		for (i=0; i<elem.length; i++)
		{
			if (elem[i].checked == true)
			{
				val = i;
				break;
			}
		}
	}
	else if (type == '5')
	{
		val = '';
	}
	else if (type == '6')
	{
		val = '';
	}
	else if (type == '7')
	{
		val = document.getElementById('recherches').value;
	}
	ficajaxPOST("ajax.php", "ajoute_portlet=ok&type="+type+"&val="+val);
	affiche_page('accueil');
}

function aff_ajout_portlet()
{
	maj_ajout_portlet(document.getElementById('liste_portlets').value);
	document.getElementById('ajout_portlet').style.display = "block";
}

function ferme_ajout_portlet()
{
	document.getElementById('type_portlet').innerHTML = "";
	document.getElementById('ajout_portlet').style.display = "none";
}

function recup_portlets()
{
	val = document.getElementById('columns').innerHTML;
	val = val.split(String.fromCharCode(10));
	texte= '';
	colonne = 1;
	ligne = 1;
	for (i=0; i<val.length; i++)
	{
		//if (val[i].indexOf('</td>', 0) != -1)
		if (val[i].indexOf('</td><td><div', 0) != -1)
		{
			colonne++;
			ligne = 1;
		}
		if (val[i].indexOf('class="portlet"', 0) != -1)
		{
			pos1 = val[i].indexOf('id="', 0) + 4;
			pos2 = val[i].indexOf('" class="portlet">', 0);
			if (val[i].indexOf('id="sortHelper"', 0) == -1)
			{
				texte+=val[i].substr(pos1, pos2-pos1);
			}
			else
			{
				pos1 = val[i].indexOf('id="', val[i].length-30) + 4;
				pos2 = val[i].indexOf('" class="portlet">', val[i].length-30);
				texte+=val[i].substr(pos1, pos2-pos1);
			}
			texte+='-'+colonne+'-'+ligne;
			ligne++;
		}
		if (val[i].indexOf('class="portlet_content"', 0) != -1)
		{
			if (val[i].indexOf('display: none;', 0) != -1)
			{
				texte+='-0';
			}
			else
			{
				texte+='-1';
			}
			texte+='|';
		}
	}
	texte = texte.substr(0, texte.length-1);
	return texte; // a-b-c : a=id / b=colonne[1..n] / c=visilibité[0, 1]
}

function exec_rech_avancee(type, membres_enligne)
{
	if (membres_enligne)
	{
		affiche_page("recherche", type, 1);
	}
	else
	{
		affiche_page("recherche", type);
	}
}

function exec_rech(id)
{
	retour = ficajaxPOST("ajax.php", "exec_rech="+id);
	retour = retour.split('|');
	document.rech_avancee.recherche.value = retour[0];
	maj_criteres_recherche(document.rech_avancee.recherche.value);
	if (document.rech_avancee.recherche.value == "1")
	{
		document.form1.pays.value = retour[1];
		document.form1.dep.value = retour[2];
		document.form1.sexe.value = retour[3];
		document.form1.dispo.checked = false;
		if (retour[4] == "1")
		{
			document.form1.dispo.checked = true;
		}
		document.form1.enligne.checked = false;
		if (retour[7] == "1")
		{
			document.form1.enligne.checked = true;
		}
		document.form1.tri.value = retour[5];
		document.form1.ordre[retour[6]].checked = true;
		document.form1.phrase[retour[8]].checked = true;
		document.form1.texte.value = retour[9];
		document.form1.bouton_valide1.click();
	}
	if (document.rech_avancee.recherche.value == "2")
	{
		document.form2.marque.value = retour[1];
		document.form2.vintage.checked = false;
		if (retour[2] == "1")
		{
			document.form2.vintage.checked = true;
		}
		document.form2.elec.checked = false;
		if (retour[3] == "1")
		{
			document.form2.elec.checked = true;
		}
		document.form2.tri.value = retour[4];
		document.form2.ordre[retour[5]].checked = true;
		document.form2.phrase[retour[6]].checked = true;
		document.form2.texte.value = retour[9];
		document.form2.bouton_valide2.click();
	}
	if (document.rech_avancee.recherche.value == "3")
	{
		document.form3.transaction.value = retour[1];
		document.form3.pays.value = retour[2];
		document.form3.dep.value = retour[3];
		document.form3.tri.value = retour[4];
		document.form3.ordre[retour[5]].checked = true;
		document.form3.phrase[retour[6]].checked = true;
		document.form3.texte.value = retour[9];
		document.form3.bouton_valide3.click();
	}
	if (document.rech_avancee.recherche.value == "4")
	{
		document.form4.tri.value = retour[1];
		document.form4.ordre[retour[2]].checked = true;
		document.form4.phrase[retour[3]].checked = true;
		document.form4.texte.value = retour[9];
		document.form4.bouton_valide4.click();
	}
	if (document.rech_avancee.recherche.value == "5")
	{
		document.form5.phrase[retour[1]].checked = true;
		document.form5.texte.value = retour[9];
		document.form5.bouton_valide5.click();
	}
	if (document.rech_avancee.recherche.value == "6")
	{
		document.form6.phrase[retour[1]].checked = true;
		document.form6.texte.value = retour[9];
		document.form6.bouton_valide6.click();
	}
	if (document.rech_avancee.recherche.value == "7")
	{
		document.form7.phrase[retour[1]].checked = true;
		document.form7.texte.value = retour[9];
		document.form7.bouton_valide7.click();
	}
}

function change_rech()
{
	if (document.rech_avancee.liste_recherches.value == '0')
	{
		document.getElementById('supp_rech').style.display = "none";
		document.rech_avancee.recherche.value = "0";
		maj_criteres_recherche(document.rech_avancee.recherche.value);
	}
	else
	{
		document.getElementById('supp_rech').style.display = "inline";
		exec_rech(document.rech_avancee.liste_recherches.value);
	}
}

function supp_recherche(id)
{
	ficajaxPOST("ajax.php", "supp_rech="+id);
	maj_liste_recherches();
}

function sauve_recherche()
{
	val = document.form_sauve_recherche.recherche.value;
	if (val != '')
	{
		typerech = document.rech_avancee.recherche.value;
		val1 = '';val2 = '';val3 = '';val4 = '';val5 = '';val6 = '';val7 = '';val8 = '';val9 = '';val10 = '';
		val1 = '&val1='+typerech;
		if (typerech == '1')
		{
			val2 = '&val2='+document.form1.pays.value;
			val3 = '&val3='+document.form1.dep.value;
			val4 = '&val4='+document.form1.sexe.value;
			val5 = "&val5=0";
			if (document.form1.dispo.checked == true)
			{
				val5 = "&val5=1";
			}
			val8 = "&val8=0";
			if (document.form1.enligne.checked == true)
			{
				val8 = "&val8=1";
			}
			val6 = '&val6='+document.form1.tri.value;
			val7 = "&val7=0";
			if (document.form1.ordre[1].checked == true)
			{
				val7 = "&val7=1";
			}
			val9 = "&val9=0";
			for (i=0; i<3; i++)
			{
				if (document.form1.phrase[i].checked)
				{
					val9 = "&val9="+i;
				}
			}
			val10 = '&val10='+document.form1.texte.value;
		}
		if (typerech == '2')
		{
			val2 = '&val2='+document.form2.marque.value;
			val3 = "&val3=0";
			if (document.form2.vintage.checked == true)
			{
				val3 = "&val3=1";
			}
			val4 = "&val4=0";
			if (document.form2.elec.checked == true)
			{
				val4 = "&val4=1";
			}
			val5 = '&val5='+document.form2.tri.value;
			val6 = "&val6=0";
			if (document.form2.ordre[1].checked == true)
			{
				val6 = "&val6=1";
			}
			val7 = "&val7=0";
			for (i=0; i<3; i++)
			{
				if (document.form2.phrase[i].checked)
				{
					val7 = "&val7="+i;
				}
			}
			val10 = '&val10='+document.form2.texte.value;
		}
		if (typerech == '3')
		{
			val2 = '&val2='+document.form3.transaction.value;
			val3 = '&val3='+document.form3.pays.value;
			val4 = '&val4='+document.form3.dep.value;
			val5 = '&val5='+document.form3.tri.value;
			val6 = "&val6=0";
			if (document.form3.ordre[1].checked == true)
			{
				val6 = "&val6=1";
			}
			val7 = "&val7=0";
			for (i=0; i<3; i++)
			{
				if (document.form3.phrase[i].checked)
				{
					val7 = "&val7="+i;
				}
			}
			val10 = '&val10='+document.form3.texte.value;
		}
		if (typerech == '4')
		{
			val2 = '&val2='+document.form4.tri.value;
			val3 = "&val3=0";
			if (document.form4.ordre[1].checked == true)
			{
				val3 = "&val3=1";
			}
			val4 = "&val4=0";
			for (i=0; i<3; i++)
			{
				if (document.form4.phrase[i].checked)
				{
					val4 = "&val4="+i;
				}
			}
			val10 = '&val10='+document.form4.texte.value;
		}
		if (typerech == '5')
		{
			val2 = "&val2=0";
			for (i=0; i<3; i++)
			{
				if (document.form5.phrase[i].checked)
				{
					val2 = "&val2="+i;
				}
			}
			val10 = '&val10='+document.form5.texte.value;
		}
		if (typerech == '6')
		{
			val2 = "&val2=0";
			for (i=0; i<3; i++)
			{
				if (document.form6.phrase[i].checked)
				{
					val2 = "&val2="+i;
				}
			}
			val10 = '&val10='+document.form6.texte.value;
		}
		if (typerech == '7')
		{
			val2 = "&val2=0";
			for (i=0; i<3; i++)
			{
				if (document.form7.phrase[i].checked)
				{
					val2 = "&val2="+i;
				}
			}
			val10 = '&val10='+document.form7.texte.value;
		}
		document.form_sauve_recherche.recherche.value = "";
		ficajaxPOST("ajax.php", "sauve_rech="+encode_ajax(val)+val1+val2+val3+val4+val5+val6+val7+val8+val9+val10);
		maj_liste_recherches();
	}
}

function maj_liste_recherches()
{
	retour = ficajaxPOST("ajax.php", "maj_liste_rech=ok");
	if (retour != "")
	{
		retour = retour.split('[|]');
		ids = retour[0].split('|');
		noms = retour[1].split('|');
		while (document.rech_avancee.liste_recherches.options.length>0)
		{
			document.rech_avancee.liste_recherches.options[0] = null;
		}
		if (ids != '')
		{
			nouvel_element = new Option('- Mes recherches -', '0', false, false);
			document.rech_avancee.liste_recherches.options[document.rech_avancee.liste_recherches.length] = nouvel_element;
			for (i=0; i<ids.length; i++)
			{
				nouvel_element = new Option(decode_ajax(noms[i]), ids[i], false, false);
				document.rech_avancee.liste_recherches.options[document.rech_avancee.liste_recherches.length] = nouvel_element;
			}
			document.getElementById('zone_liste_recherches').style.display = 'inline';
		}
		else
		{
			document.getElementById('zone_liste_recherches').style.display = 'none';
		}
	}
	else
	{
		document.getElementById('zone_liste_recherches').style.display = 'none';
	}
	change_rech();
}

function maj_criteres_recherche(num)
{
	document.getElementById('resultat_rech_avancee').style.display = "none";
	for (i=1; i<=7; i++)
	{
		document.getElementById('criteres_rech'+i).style.display = "none";
	}
	if (num > 0)
	{
		document.getElementById('criteres_rech'+num).style.display = "block";
	}
}

function lance_recherche_simple(texte, phrase)
{
	if (texte != "")
	{
		for (i=0; i<3; i++)
		{
			if (phrase[i].checked)
			{
				val_phrase = i;
			}
		}
		ficajaxPOST("ajax.php", "rech_simple="+texte+"&phrase="+val_phrase, "rech_simple");
	}
}

function lance_recherche_video(num, texte, phrase)
{
	for (i=0; i<3; i++)
	{
		if (phrase[i].checked)
		{
			val_phrase = i;
		}
	}
	ficajaxPOST("ajax.php", "rech_video="+texte+"&phrase="+val_phrase+"&num="+num, "rech_avancee");
}

function lance_recherche_son(num, texte, phrase)
{
	for (i=0; i<3; i++)
	{
		if (phrase[i].checked)
		{
			val_phrase = i;
		}
	}
	ficajaxPOST("ajax.php", "rech_son="+texte+"&phrase="+val_phrase+"&num="+num, "rech_avancee");
}

function lance_recherche_image(num, texte, phrase)
{
	for (i=0; i<3; i++)
	{
		if (phrase[i].checked)
		{
			val_phrase = i;
		}
	}
	ficajaxPOST("ajax.php", "rech_image="+texte+"&phrase="+val_phrase+"&num="+num, "rech_avancee");
}

function lance_recherche_concert(num, texte, phrase, tri, ordre)
{
	val_ordre = "0";
	if (ordre[1].checked == true)
	{
		val_ordre = "1";
	}
	for (i=0; i<3; i++)
	{
		if (phrase[i].checked)
		{
			val_phrase = i;
		}
	}
	ficajaxPOST("ajax.php", "rech_concert="+texte+"&phrase="+val_phrase+"&num="+num+"&tri="+tri+"&ordre="+val_ordre, "rech_avancee");
}

function lance_recherche_annonce(num, texte, phrase, transaction, pays, dep, tri, ordre)
{
	val_ordre = "0";
	if (ordre[1].checked == true)
	{
		val_ordre = "1";
	}
	for (i=0; i<3; i++)
	{
		if (phrase[i].checked)
		{
			val_phrase = i;
		}
	}
	ficajaxPOST("ajax.php", "rech_annonce="+texte+"&phrase="+val_phrase+"&num="+num+"&transaction="+transaction+"&pays="+pays+"&dep="+dep+"&tri="+tri+"&ordre="+val_ordre, "rech_avancee");
}

function lance_recherche_materiel(num, texte, phrase, marque, vintage, elec, tri, ordre)
{
	val_vintage = "0";
	if (vintage.checked == true)
	{
		val_vintage = "1";
	}
	val_elec = "0";
	if (elec.checked == true)
	{
		val_elec = "1";
	}
	val_ordre = "0";
	if (ordre[1].checked == true)
	{
		val_ordre = "1";
	}
	for (i=0; i<3; i++)
	{
		if (phrase[i].checked)
		{
			val_phrase = i;
		}
	}
	ficajaxPOST("ajax.php", "rech_materiel="+texte+"&phrase="+val_phrase+"&num="+num+"&marque="+marque+"&vintage="+val_vintage+"&elec="+val_elec+"&tri="+tri+"&ordre="+val_ordre, "rech_avancee");
}

function lance_recherche_membres(num, texte, phrase, pays, dep, sexe, dispo, enligne, tri, ordre)
{
	val_dispo = "0";
	if (dispo.checked == true)
	{
		val_dispo = "1";
	}
	val_enligne = "0";
	if (enligne.checked == true)
	{
		val_enligne = "1";
	}
	val_ordre = "0";
	if (ordre[1].checked == true)
	{
		val_ordre = "1";
	}
	for (i=0; i<3; i++)
	{
		if (phrase[i].checked)
		{
			val_phrase = i;
		}
	}
	ficajaxPOST("ajax.php", "rech_membres="+texte+"&phrase="+val_phrase+"&num="+num+"&pays="+pays+"&dep="+dep+"&sexe="+sexe+"&dispo="+val_dispo+"&enligne="+val_enligne+"&tri="+tri+"&ordre="+val_ordre, "rech_avancee");
}

function maj_typepers(val)
{
	typepers = "Objet";
	document.getElementById('zone_prix').style.visibility = 'visible';
	document.getElementById('zone_photos').style.visibility = 'visible';
	if (val == 3)
	{
		typepers = "Activité souhaitée";
		document.getElementById('zone_photos').style.visibility = 'hidden';
	}
	if (val >= 1)
	{
		document.getElementById('zone_prix').style.visibility = 'hidden';
	}
	document.getElementById('type_pers').innerHTML = typepers;
}

function supp_ami(ami)
{
	ficajax("ajax.php?supp_ami="+ami, "supp_ami");
}

function refuse_ami(ami)
{
	ficajax("ajax.php?refuse_ami="+ami, "refuse_ami");
}

function annule_ami(ami)
{
	ficajax("ajax.php?annule_ami="+ami, "annule_ami");
}

function accepte_ami(ami)
{
	ficajax("ajax.php?accepte_ami="+ami, "accepte_ami");
}

function demande_supp_ami(ami)
{
	MyBoxA.confirm('Supprimer définitivement ce membre de cette liste ?',{textBoxBtnOk: 'Oui', textBoxBtnCancel: 'Non', onComplete: function(returnvalue) { if (returnvalue) {supp_ami(ami);} } });
}

function ajout_ami(ami, monPseudo)
{
	if (ami != '')
	{
		document.form_profil8.ami.value = '';
		retour = ficajax("ajax.php?ajout_ami="+ami);
		if (retour == 'ok')
		{
			alerte('', 'Succès', '<br /><br />'+ami+' a été prévenu de<br />votre demande.<br /><br />Vérifiez régulièrement<br />votre liste d\'amis...', 3.5);
			texte = monPseudo+' souhaite vous ajouter à sa liste d\'amis.\n\n';
			texte+= 'Cliquez sur votre pseudo dans l\'entete du site et sur le bouton "Modifier mon profil" pour répondre à cette demande.';
			//texte+= 'Voir son profil, accepter, <a href=\'javascript:refuse_ami()\'>refuser</a>.';
			mess = encode_ajax(texte);
			retour = ficajaxPOST("ajax.php", "envoie_message=1&exp=0&dest="+ami+"&mess="+mess);
			recup_amis(document.getElementById('type_amis').value);
		}
		else if (retour == 'ko')
		{
			alerte('', 'Erreur :', '<br /><br />Ce membre est déjà<br />votre ami ou<br />en attente de l\'être...', 3.5);
		}
		else
		{
			alerte('', 'Erreur :', '<br /><br />Ce membre<br />n\'existe pas<br />dans notre base...', 3.5);
		}
	}
}

function maj_prix()
{
	document.form_concerts.conc_prix.disabled = false;
	if (document.form_concerts.conc_type_prix.value < 2)
	{
		document.form_concerts.conc_prix.value = "";
		document.form_concerts.conc_prix.disabled = true;
	}
}

function supp_annonce(id)
{
	ficajax("ajax.php?supp_annonce="+id, "supp_annonce");
}

function supp_concert(id)
{
	ficajax("ajax.php?supp_concert="+id, "supp_concert");
}

function demande_supp_annonce(id)
{
	if (document.form_annonces.style.display == "block")
	{
		alerte('', 'Attention :', '<br /><br />Validez ou annulez<br />l\'annonce en cours...', 3.5);
	}
	else
	{
		MyBoxA.confirm('Supprimer définitivement cette annonce ?',{textBoxBtnOk: 'Oui', textBoxBtnCancel: 'Non', onComplete: function(returnvalue) { if (returnvalue) {supp_annonce(id);} } });
	}
}

function demande_supp_concert(id)
{
	if (document.form_concerts.style.display == "block")
	{
		alerte('', 'Attention :', '<br /><br />Validez ou annulez<br />le concert en cours...', 3.5);
	}
	else
	{
		MyBoxA.confirm('Supprimer définitivement ce concert ?',{textBoxBtnOk: 'Oui', textBoxBtnCancel: 'Non', onComplete: function(returnvalue) { if (returnvalue) {supp_concert(id);} } });
	}
}

function recup_annonces(act)
{
	if (document.form_annonces.style.display == "block")
	{
		if (document.form_annonces.mode_ann.value == 'ajout')
		{
			alerte('', 'Attention :', '<br /><br />Validez ou annulez<br />l\'annonce en cours<br />de création...', 3.5);
		}
		else
		{
			alerte('', 'Attention :', '<br /><br />Validez ou annulez<br />l\'annonce en cours<br />de modification...', 3.5);
		}
	}
	else
	{
		document.form_listeann.style.display = "none";
		val = ficajaxPOST('ajax.php', 'liste_annonces=ok&act='+act);
		if (val != "")
		{
			document.getElementById('liste_annonces').innerHTML = decode_ajax(val);
			document.form_listeann.style.display = "block";
		}
		if (IE())
		{
			document.getElementById('zone_profil5').height = document.form_listeann.offsetHeight + document.form_annonces.offsetHeight;
		}
		else
		{
			document.getElementById('zone_profil5').setStyle('height', document.form_listeann.style.height + document.form_annonces.style.height);
		}
	}
}

function recup_amis(act)
{
	document.getElementById('liste_amis').style.display = "none";
	val = ficajaxPOST('ajax.php', 'liste_amis=ok&act='+act);
	if (val != "")
	{
		document.getElementById('liste_amis').innerHTML = decode_ajax(val);
		document.getElementById('liste_amis').style.display = "block";
	}
	if (IE())
	{
		document.getElementById('zone_profil8').height = document.form_amis.offsetHeight;
	}
	else
	{
		document.getElementById('zone_profil8').setStyle('height', document.form_amis.style.height);
	}
}

function recup_concerts()
{
	if (document.form_concerts.style.display == "block")
	{
		if (document.form_concerts.mode_conc.value == 'ajout')
		{
			alerte('', 'Attention :', '<br /><br />Validez ou annulez<br />le concert en cours<br />de création...', 3.5);
		}
		else
		{
			alerte('', 'Attention :', '<br /><br />Validez ou annulez<br />le concert en cours<br />de modification...', 3.5);
		}
	}
	else
	{
		document.form_listeconc.style.display = "none";
		val = ficajaxPOST('ajax.php', 'liste_concerts=ok');
		if (val != "")
		{
			document.getElementById('liste_concerts').innerHTML = decode_ajax(val);
			document.form_listeconc.style.display = "block";
		}
		if (IE())
		{
			document.getElementById('zone_profil7').height = document.form_listeconc.offsetHeight + document.form_concerts.offsetHeight;
		}
		else
		{
			document.getElementById('zone_profil7').setStyle('height', document.form_listeconc.style.height + document.form_concerts.style.height);
		}
	}
}

function ferme_form_annonces()
{
	document.form_annonces.style.display = 'none';
	document.getElementById('zone_profil5').setStyle('height', document.form_listeann.style.height + document.form_annonces.style.height);
}

function ferme_form_concerts()
{
	document.form_concerts.style.display = 'none';
	document.getElementById('zone_profil7').setStyle('height', document.form_listeconc.style.height + document.form_concerts.style.height);
}

function valide_form_concerts(mode)
{
	if (document.form_concerts.conc_nom1.value != "" && document.form_concerts.conc_date.value != "" && document.form_concerts.conc_lieu.value != "" && document.form_concerts.conc_ville.value != "")
	{
		variables = 'mode='+mode;
		for (i=1; i<=10; i++)
		{
			nom_elema = "conc_nom"+i;
			nom_elemb = "conc_style"+i;
			if (eval("document.form_concerts."+nom_elema).value != "")
			{
				variables+= '&nom'+i+'='+encode_ajax(eval("document.form_concerts."+nom_elema+".value"));
				variables+= '&style'+i+'='+encode_ajax(eval("document.form_concerts."+nom_elemb+".value"));
			}
			else { break; }
		}
		variables+= '&jour='+encode_ajax(document.form_concerts.conc_date.value.substr(0, 2));
		variables+= '&mois='+encode_ajax(document.form_concerts.conc_date.value.substr(3, 2));
		variables+= '&annee='+encode_ajax(document.form_concerts.conc_date.value.substr(6, 4));
		variables+= '&heure='+encode_ajax(document.form_concerts.conc_heure.value);
		variables+= '&minutes='+encode_ajax(document.form_concerts.conc_minutes.value);
		variables+= '&lieu='+encode_ajax(document.form_concerts.conc_lieu.value);
		variables+= '&adresse='+encode_ajax(document.form_concerts.conc_adresse.value);
		variables+= '&cp='+encode_ajax(document.form_concerts.conc_cp.value);
		variables+= '&ville='+encode_ajax(document.form_concerts.conc_ville.value);
		variables+= '&prix='+encode_ajax(document.form_concerts.conc_prix.value);
		variables+= '&type_prix='+encode_ajax(document.form_concerts.conc_type_prix.value);
		variables+= '&comm='+encode_ajax(document.form_concerts.conc_comm.value);
		variables+= '&affiche='+encode_ajax(document.form_concerts.conc_affiche.value);
		ficajaxPOST("ajax.php", "valide_concert=ok&"+variables);
		ferme_form_concerts();
		recup_concerts();
		if (mode == 'ajout')
		{
			alerte('', 'Confirmation', '<br /><br /><br />Création effectuée<br />avec succès.', 3);
		}
		else
		{
			alerte('', 'Confirmation', '<br /><br /><br />Mise à jour effectuée<br />avec succès.', 3);
		}
	}
	else
	{
		alerte('', 'Erreur...', '<br /><br /><br />Les champs marqués<br />d\'une étoile sont<br />obligatoires...', 2.5);
	}
}

function valide_form_annonces(mode)
{
	if ((document.form_annonces.ann_email.value != "" && email_valide(document.form_annonces.ann_email.value)) || (document.form_annonces.ann_email.value == ""))
	{
		if (document.form_annonces.ann_objet.value != "" && document.form_annonces.ann_desc.value != "" && ((document.form_annonces.ann_type_trans.value == "0" && document.form_annonces.ann_prix.value != "") || (document.form_annonces.ann_type_trans.value != "0" && document.form_annonces.ann_prix.value == "")) && document.form_annonces.ann_pays.value != "0" && ((document.form_annonces.ann_pays.value == "France" && document.form_annonces.ann_dep.value != "0") || document.form_annonces.ann_pays.value != "France") && document.form_annonces.ann_ville.value != "")
		{
			variables = 'mode='+mode;
			variables+= '&type_trans='+encode_ajax(document.form_annonces.ann_type_trans.value);
			variables+= '&objet='+encode_ajax(document.form_annonces.ann_objet.value);
			variables+= '&desc='+encode_ajax(document.form_annonces.ann_desc.value);
			variables+= '&prix='+encode_ajax(document.form_annonces.ann_prix.value);
			variables+= '&pays='+encode_ajax(document.form_annonces.ann_pays.value);
			variables+= '&dep='+encode_ajax(document.form_annonces.ann_dep.value);
			variables+= '&ville='+encode_ajax(document.form_annonces.ann_ville.value);
			variables+= '&email='+encode_ajax(document.form_annonces.ann_email.value);
			variables+= '&statut='+document.form_annonces.ann_statut.checked;
			for (i=1; i<=10; i++)
			{
				nom_elem = "ann_photo"+i;
				if (eval("document.form_annonces."+nom_elem).value != "")
				{
					variables+= '&photo'+i+'='+encode_ajax(eval("document.form_annonces."+nom_elem).value);
				}
				else { break; }
			}
			ficajaxPOST("ajax.php", "valide_annonce=ok&"+variables);
			ferme_form_annonces();
			recup_annonces(document.getElementById('type_affann').value);
			if (mode == 'ajout')
			{
				alerte('', 'Confirmation', '<br /><br /><br />Création effectuée<br />avec succès.', 3);
			}
			else
			{
				alerte('', 'Confirmation', '<br /><br /><br />Mise à jour effectuée<br />avec succès.', 3);
			}
		}
		else
		{
			alerte('', 'Erreur...', '<br /><br /><br />Les champs marqués<br />d\'une étoile sont<br />obligatoires...', 2.5);
		}
	}
	else
	{
		alerte('', 'Erreur...', '<br /><br /><br />Le format de l\'email<br />est invalide...', 2.5);
	}
}

function aff_form_annonces(mode)
{
	if (document.form_annonces.style.display == "block")
	{
		if (mode == 'ajout')
		{
			alerte('', 'Attention :', '<br /><br />Validez ou annulez<br />l\'annonce en cours<br />de création...', 3.5);
		}
		else
		{
			alerte('', 'Attention :', '<br /><br />Validez ou annulez<br />l\'annonce en cours<br />de modification...', 3.5);
		}
	}
	else
	{
		document.form_annonces.mode_ann.value = mode;
		if (mode == 'ajout')
		{
			document.form_annonces.ann_type_trans.value = "0";
			document.form_annonces.ann_objet.value = "";
			document.form_annonces.ann_desc.value = "";
			document.form_annonces.ann_prix.value = "";
			if (IE())
			{
				for (compt=1; compt<=10; compt++)
				{
					elem = 'ann_photo'+compt;
					document.all[elem].value = "";
					if (compt > 1)
					{
						document.all[elem].style.display = 'none';
					}
					else
					{
						document.all[elem].style.display = 'block';
					}
				}
			}
			else
			{
				for (compt=1; compt<=10; compt++)
				{
					elem = 'ann_photo'+compt;
					eval("document.form_annonces."+elem).value = "";
					if (compt > 1)
					{
						eval("document.form_annonces."+elem).style.display = 'none';
					}
					else
					{
						eval("document.form_annonces."+elem).style.display = 'block';
					}
				}
			}
			document.form_annonces.ann_pays.value = "0";
			document.form_annonces.ann_dep.value = "0";
			document.form_annonces.ann_ville.value = "";
			document.form_annonces.ann_email.value = "";
			document.form_annonces.ann_statut.checked = true;
			document.getElementById('bouton_validformann').value = 'Valider';
		}
		else
		{
			retour = ficajaxPOST("ajax.php", "aff_form_annonce=ok&id="+mode);
			retour = retour.split('[||]');
			document.form_annonces.ann_type_trans.value = retour[0];
			document.form_annonces.ann_objet.value = decode_ajax(retour[1]);
			document.form_annonces.ann_desc.value = decode_ajax(retour[2]);
			document.form_annonces.ann_prix.value = decode_ajax(retour[3]);
			photos = retour[4].split('[|]');
			for (compt=1; compt<=photos.length; compt++)
			{
				elem = 'ann_photo'+compt;
				if (IE())
				{
					document.all[elem].value = decode_ajax(photos[compt-1]);
				}
				else
				{
					eval("document.form_annonces."+elem).value = decode_ajax(photos[compt-1]);
				}
				maj_liste_elements(document.form_annonces, 'ann_photo', 10, compt);
			}
			document.form_annonces.ann_pays.value = decode_ajax(retour[5]);
			document.form_annonces.ann_dep.value = decode_ajax(retour[6]);
			document.form_annonces.ann_ville.value = decode_ajax(retour[7]);
			document.form_annonces.ann_email.value = decode_ajax(retour[8]);
			document.form_annonces.ann_statut.checked = false;
			if (retour[9] == "1")
			{
				document.form_annonces.ann_statut.checked = true;
			}
			document.getElementById('bouton_validformann').value = 'Mettre à jour';
			maj_dep(document.form_annonces);
		}
		maj_typepers(document.form_annonces.ann_type_trans.value);
		document.form_annonces.style.display = 'block';
		document.getElementById('zone_profil5').setStyle('height', document.form_annonces.style.height);
	}
}

function aff_form_concerts(mode)
{
	if (document.form_concerts.style.display == "block")
	{
		if (mode == 'ajout')
		{
			alerte('', 'Attention :', '<br /><br />Validez ou annulez<br />le concert en cours<br />de création...', 3.5);
		}
		else
		{
			alerte('', 'Attention :', '<br /><br />Validez ou annulez<br />le concert en cours<br />de modification...', 3.5);
		}
	}
	else
	{
		document.form_concerts.mode_conc.value = mode;
		if (mode == 'ajout')
		{
			for (compt=1; compt<=10; compt++)
			{
				elema = 'conc_nom'+compt;
				elemb = 'conc_style'+compt;
				elemc = 'support_nomstyle'+compt;
				eval("document.form_concerts."+elema).value = "";
				eval("document.form_concerts."+elemb).value = "";
				if (compt > 1)
				{
					document.getElementById(elemc).style.display = 'none';
				}
				else
				{
					document.getElementById(elemc).style.display = 'block';
				}
			}
			document.form_concerts.conc_date.value = "";
			document.form_concerts.conc_heure.selectedIndex = 0;
			document.form_concerts.conc_minutes.selectedIndex = 0;
			document.form_concerts.conc_lieu.value = "";
			document.form_concerts.conc_adresse.value = "";
			document.form_concerts.conc_cp.value = "";
			document.form_concerts.conc_ville.value = "";
			document.form_concerts.conc_prix.value = "";
			document.form_concerts.conc_type_prix.selectedIndex = 0;
			document.form_concerts.conc_comm.value = "";
			document.form_concerts.conc_affiche.value = "";
			document.getElementById('bouton_validformconc').value = 'Valider';
		}
		else
		{
			retour = ficajaxPOST("ajax.php", "aff_form_concert=ok&id="+mode);
			retour = retour.split('[||]');
			noms = retour[0].split('[|]');
			styles = retour[1].split('[|]');
			for (compt=1; compt<=10; compt++)
			{
				elema = 'conc_nom'+compt;
				elemb = 'conc_style'+compt;
				elemc = 'support_nomstyle'+compt;
				if (compt <= noms.length)
				{
					eval("document.form_concerts."+elema).value = decode_ajax(noms[compt-1]);
					eval("document.form_concerts."+elemb).value = decode_ajax(styles[compt-1]);
				}
				else
				{
					eval("document.form_concerts."+elema).value = "";
					eval("document.form_concerts."+elemb).value = "";
				}
				if (compt <= noms.length+1)
				{
					document.getElementById(elemc).style.display = 'block';
				}
				else
				{
					document.getElementById(elemc).style.display = 'none';
				}
				maj_liste_elements(document.form_concerts, 'conc_nom', 10, compt);
			}
			madate = retour[2];
			/*document.form_concerts.conc_jour.value = madate.substr(8, 2);
			document.form_concerts.conc_mois.value = madate.substr(5, 2);
			document.form_concerts.conc_annee.value = madate.substr(0, 4);*/
			document.form_concerts.conc_date.value = madate.substr(8, 2) + '/' + madate.substr(5, 2) + '/' + madate.substr(0, 4);
			monheure = retour[3];
			document.form_concerts.conc_heure.value = monheure.substr(0, 2);
			document.form_concerts.conc_minutes.value = monheure.substr(3, 2);
			document.form_concerts.conc_lieu.value = decode_ajax(retour[4]);
			document.form_concerts.conc_adresse.value = decode_ajax(retour[5]);
			document.form_concerts.conc_cp.value = decode_ajax(retour[6]);
			document.form_concerts.conc_ville.value = decode_ajax(retour[7]);
			document.form_concerts.conc_prix.value = decode_ajax(retour[8]);
			document.form_concerts.conc_type_prix.value = decode_ajax(retour[9]);
			document.form_concerts.conc_comm.value = decode_ajax(retour[10]);
			document.form_concerts.conc_affiche.value = decode_ajax(retour[11]);
			document.getElementById('bouton_validformconc').value = 'Mettre à jour';
		}
		maj_prix();
		document.form_concerts.style.display = 'block';
		document.getElementById('zone_profil7').setStyle('height', document.form_concerts.style.height);
	}
}

function aff_video(ps, num)
{
	if (num != 'choix')
	{
		document.getElementById('support_video').innerHTML = ficajaxPOST("../ajax.php", "aff_video=ok&pseudo="+ps+"&num="+num);
	}
	else
	{
		document.getElementById('support_video').innerHTML = '';
	}
	document.getElementById('zone_multi').setStyle('height', document.getElementById('support_video').style.height);
}

function aff_son(ps, num)
{
	if (num != 'choix')
	{
		document.getElementById('support_son').innerHTML = ficajaxPOST("../ajax.php", "aff_son=ok&pseudo="+ps+"&num="+num);
	}
	else
	{
		document.getElementById('support_son').innerHTML = '';
	}
	document.getElementById('zone_multi').setStyle('height', document.getElementById('support_son').style.height);
}

function maj_support_kit(nbr, num)
{
	for (i=0; i<nbr; i++)
	{
		document.getElementById('support_kit'+i).style.display = 'none';
	}
	document.getElementById('support_kit'+num).style.display = 'block';
	document.getElementById('zone_kits').setStyle('height', document.getElementById('support_kit'+num).style.height);
}

function maj_aff_multimedia(num)
{
	if (num == 1)
	{
		if (document.getElementById('form_profil61').style.display == 'block')
		{
			document.getElementById('form_profil61').style.display = 'none';
			document.getElementById('bouton_multi'+num).value= "Afficher les images";
		}
		else
		{
			document.getElementById('form_profil61').style.display = 'block';
			document.getElementById('bouton_multi'+num).value= "Cacher les images";
		}
		document.getElementById('form_profil62').style.display = 'none';
		document.getElementById('form_profil63').style.display = 'none';
		document.getElementById('bouton_multi'+(num+1)).value= "Afficher les sons";
		document.getElementById('bouton_multi'+(num+2)).value= "Afficher les vidéos";
		document.getElementById('zone_profil6').setStyle('height', document.form_profil61.style.height);
	}
	else if (num == 2)
	{
		if (document.getElementById('form_profil62').style.display == 'block')
		{
			document.getElementById('form_profil62').style.display = 'none';
			document.getElementById('bouton_multi'+num).value= "Afficher les sons";
		}
		else
		{
			document.getElementById('form_profil62').style.display = 'block';
			document.getElementById('bouton_multi'+num).value= "Cacher les sons";
		}
		document.getElementById('form_profil61').style.display = 'none';
		document.getElementById('form_profil63').style.display = 'none';
		document.getElementById('bouton_multi'+(num-1)).value= "Afficher les images";
		document.getElementById('bouton_multi'+(num+1)).value= "Afficher les vidéos";
		document.getElementById('zone_profil6').setStyle('height', document.form_profil62.style.height);
	}
	else if (num == 3)
	{
		if (document.getElementById('form_profil63').style.display == 'block')
		{
			document.getElementById('form_profil63').style.display = 'none';
			document.getElementById('bouton_multi'+num).value= "Afficher les vidéos";
		}
		else
		{
			document.getElementById('form_profil63').style.display = 'block';
			document.getElementById('bouton_multi'+num).value= "Cacher les videos";
		}
		document.getElementById('form_profil61').style.display = 'none';
		document.getElementById('form_profil62').style.display = 'none';
		document.getElementById('bouton_multi'+(num-2)).value= "Afficher les images";
		document.getElementById('bouton_multi'+(num-1)).value= "Afficher les sons";
		document.getElementById('zone_profil6').setStyle('height', document.form_profil63.style.height);
	}
}

function valide_images()
{
	variables = '';
	var el = $('ordreimages');
	for( i=0; i<el.getChildren().length; i++)
	{
		idelem = el.getChildren()[i].id;
		nom_elem = "urlimage"+idelem.substr(3, idelem.length-3);
		variables+= '&urlimage'+(i+1)+'='+encode_ajax(eval("document.form_profil61."+nom_elem).value);
		nom_elem2 = "commimage"+idelem.substr(3, idelem.length-3);
		variables+= '&commimage'+(i+1)+'='+encode_ajax(eval("document.form_profil61."+nom_elem2).value);
	}
	ficajaxPOST("ajax.php", "valide_images="+variables, "valide_images");
}

function valide_sons()
{
	ok = true;
	variables = '';
	var el = $('ordresons');
	for( i=0; i<el.getChildren().length; i++)
	{
		idelem = el.getChildren()[i].id;
		nom_elem = "urlson"+idelem.substr(3, idelem.length-3);
		variables+= '&urlson'+(i+1)+'='+encode_ajax(eval("document.form_profil62."+nom_elem).value);
		nom_elem2 = "commson"+idelem.substr(3, idelem.length-3);
		variables+= '&commson'+(i+1)+'='+encode_ajax(eval("document.form_profil62."+nom_elem2).value);
		if (eval("document.form_profil62."+nom_elem).value != '' && eval("document.form_profil62."+nom_elem2).value == '')
		{
			ok = false;
		}
	}
	if (ok)
	{
		ficajaxPOST("ajax.php", "valide_sons="+variables, "valide_sons");
	}
	else
	{
		alerte('', 'Erreur...', '<br /><br />Certains sons n\'ont<br />pas de commentaire...', 2.5);
	}
}

function valide_videos()
{
	ok = true;
	variables = '';
	var el = $('ordrevideos');
	for( i=0; i<el.getChildren().length; i++)
	{
		idelem = el.getChildren()[i].id;
		nom_elem = "urlvideo"+idelem.substr(3, idelem.length-3);
		variables+= '&urlvideo'+(i+1)+'='+encode_ajax(eval("document.form_profil63."+nom_elem).value);
		nom_elem2 = "commvideo"+idelem.substr(3, idelem.length-3);
		variables+= '&commvideo'+(i+1)+'='+encode_ajax(eval("document.form_profil63."+nom_elem2).value);
		if (eval("document.form_profil63."+nom_elem).value != '' && eval("document.form_profil63."+nom_elem2).value == '')
		{
			ok = false;
		}
	}
	if (ok)
	{
		ficajaxPOST("ajax.php", "valide_videos="+variables, "valide_videos");
	}
	else
	{
		alerte('', 'Erreur...', '<br /><br />Certaines vidéos n\'ont<br />pas de commentaire...', 2.5);
	}
}

function encode_ajax(val)
{
	val = val.toString();
	texte = val.replace(/\+/g, "[pl]");
	texte = texte.replace(/\&/g, "[ec]");
	texte = texte.replace(/"/g, "[dc]");
	texte = texte.replace(/'/g, "[sc]");
	texte = texte.replace(/€/g, "[eur]");
	return texte;
}

function decode_ajax(val)
{
	val = val.toString();
	texte = val.replace(/\[pl\]/g, "+");
	texte = texte.replace(/\[ec\]/g, "&");
	texte = texte.replace(/\[dc\]/g, "\"");
	texte = texte.replace(/\[sc\]/g, "'");
	texte = texte.replace(/\[eur\]/g, "€");
	return val;
}

function maj_image(num)
{
	ficajax("ajax.php?urlexists="+document.getElementById('urlimage'+num).value, "url_exists_image"+num);
}

function maj_photo(num)
{
	ficajax("ajax.php?urlexists="+document.getElementById('urlphoto'+num).value, "url_exists_photo"+num);
}

function maj_optionsprofil()
{
	variables = '';
	variables+= '&typeaff='+document.form_profil1.typeaff[0].checked;
	variables+= '&cadredefaut='+encode_ajax(document.form_profil1.cadredefaut.options[document.form_profil1.cadredefaut.selectedIndex].text);
	variables+= '&commok='+document.form_profil1.commok.checked;
	variables+= '&theme='+document.form_profil1.theme.value;
	var el = $('ordrecadres');
	for( i=0; i<el.getChildren().length; i++)
	{
		variables+= '&pos'+i+'='+el.getChildren()[i].id;
	}
	ficajaxPOST("ajax.php", "maj_optionsprofil="+variables, "maj_optionsprofil");
}

function maj_coords()
{
	variables = '';
	variables+= '&nom='+document.form_profil2.aff_nom.checked;
	variables+= '&prenom='+document.form_profil2.aff_prenom.checked;
	variables+= '&datenaiss='+document.form_profil2.aff_datenaiss.checked;
	variables+= '&sexe='+document.form_profil2.aff_sexe.checked;
	variables+= '&pays='+document.form_profil2.aff_pays.checked;
	if (document.form_profil2.aff_dep)
	{
		variables+= '&dep='+document.form_profil2.aff_dep.checked;
	}
	variables+= '&ville='+document.form_profil2.aff_ville.checked;
	variables+= '&email='+document.form_profil2.aff_email.checked;
	variables+= '&msn='+document.form_profil2.aff_msn.checked;
	ficajaxPOST("ajax.php", "maj_coords="+variables, "maj_coords");
}

function ferme_kit()
{
	document.getElementById('support_kit').innerHTML = "";
	document.getElementById('support_kit').style.display = "none";
	//document.getElementById('zone_profil4').setStyle('height', document.form_profil4.style.height);
}

function maj_propos()
{
	variables = '';
	variables+= '&style='+encode_ajax(document.form_profil3.propos_style.value);
	variables+= '&depuis='+encode_ajax(document.form_profil3.propos_depuis.value);
	variables+= '&jouegroupes='+encode_ajax(document.form_profil3.propos_jouegroupes.value);
	for (i=1; i<=10; i++)
	{
		nom_elem = "propos_sitesgroupes"+i;
		if (eval("document.form_profil3."+nom_elem).value != "")
		{
			variables+= '&sitesgroupes'+i+'='+encode_ajax(eval("document.form_profil3."+nom_elem).value);
		}
		else { break; }
	}
	variables+= '&cours='+encode_ajax(document.form_profil3.propos_cours.value);
	variables+= '&concert='+encode_ajax(document.form_profil3.propos_concert.value);
	variables+= '&dispo='+encode_ajax(document.form_profil3.propos_dispo.value);
	variables+= '&tenue='+encode_ajax(document.form_profil3.propos_tenue.value);
	variables+= '&cote='+encode_ajax(document.form_profil3.propos_cote.value);
	for (i=1; i<=10; i++)
	{
		nom_elem = "propos_groupespref"+i;
		if (eval("document.form_profil3."+nom_elem).value != "")
		{
			variables+= '&groupespref'+i+'='+encode_ajax(eval("document.form_profil3."+nom_elem).value);
		}
		else { break; }
	}
	for (i=1; i<=10; i++)
	{
		nom_elem = "propos_batteurspref"+i;
		if (eval("document.form_profil3."+nom_elem).value != "")
		{
			variables+= '&batteurspref'+i+'='+encode_ajax(eval("document.form_profil3."+nom_elem).value);
		}
		else { break; }
	}
	for (i=1; i<=10; i++)
	{
		nom_elem = "propos_sitespref"+i;
		if (eval("document.form_profil3."+nom_elem).value != "")
		{
			variables+= '&sitespref'+i+'='+encode_ajax(eval("document.form_profil3."+nom_elem).value);
		}
		else { break; }
	}
	for (i=1; i<=10; i++)
	{
		nom_elem = "propos_forums"+i;
		if (eval("document.form_profil3."+nom_elem).value != "")
		{
			variables+= '&forums'+i+'='+encode_ajax(eval("document.form_profil3."+nom_elem).value);
		}
		else { break; }
	}
	variables+= '&comm='+encode_ajax(document.form_profil3.propos_comm.value);
	ficajaxPOST("ajax.php", "maj_propos="+variables, "maj_propos");
}

function valide_kit(mode)
{
	if (document.form_profil4.matos_nom.value == "" || document.form_profil4.matos_marque.value == "" || document.form_profil4.matos_modele.value == "")
	{
		alerte('', 'Erreur...', '<br /><br />Les champs marqués d\'une<br />étoile sont obligatoires...', 2.5);
	}
	else if (mode == 'ajout' && ficajax("ajax.php?matos_nom="+document.form_profil4.matos_nom.value) == "1")
	{
		alerte('', 'Erreur...', '<br /><br />Le nom convivial<br />est déjà utilisé...', 2.5);
	}
	else
	{
		variables = '';
		variables+= '&nom='+encode_ajax(document.form_profil4.matos_nom.value);
		variables+= '&nom2='+encode_ajax(document.form_profil4.matos_nom2.value);
		variables+= '&marque='+encode_ajax(document.form_profil4.matos_marque.value);
		variables+= '&modele='+encode_ajax(document.form_profil4.matos_modele.value);
		for (i=1; i<=20; i++)
		{
			nom_elem = "matos_futs"+i;
			if (eval("document.form_profil4."+nom_elem+".value") != "")
			{
				variables+= '&futs'+i+'='+encode_ajax(eval("document.form_profil4."+nom_elem+".value"));
			}
			else { break; }
		}
		for (i=1; i<=20; i++)
		{
			nom_elem1 = "matos_futs"+i;
			nom_elem2 = "matos_typefuts"+i;
			if (eval("document.form_profil4."+nom_elem1+".value") != "")
			{
				variables+= '&typefuts'+i+'='+encode_ajax(eval("document.form_profil4."+nom_elem2+".selectedIndex"));
			}
			else { break; }
		}
		for (i=1; i<=20; i++)
		{
			nom_elem = "matos_cymbales"+i;
			if (eval("document.form_profil4."+nom_elem+".value") != "")
			{
				variables+= '&cymbales'+i+'='+encode_ajax(eval("document.form_profil4."+nom_elem+".value"));
			}
			else { break; }
		}
		for (i=1; i<=20; i++)
		{
			nom_elem1 = "matos_cymbales"+i;
			nom_elem2 = "matos_typecymb"+i;
			if (eval("document.form_profil4."+nom_elem1+".value") != "")
			{
				variables+= '&typecymb'+i+'='+encode_ajax(eval("document.form_profil4."+nom_elem2+".selectedIndex"));
			}
			else { break; }
		}
		variables+= '&peaux='+encode_ajax(document.form_profil4.matos_peaux.value);
		variables+= '&pedales='+encode_ajax(document.form_profil4.matos_pedales.value);
		variables+= '&baguettes='+encode_ajax(document.form_profil4.matos_baguettes.value);
		variables+= '&micros='+encode_ajax(document.form_profil4.matos_micros.value);
		variables+= '&hard='+encode_ajax(document.form_profil4.matos_hard.value);
		variables+= '&vintage='+encode_ajax(document.form_profil4.matos_vintage.value);
		variables+= '&elec='+encode_ajax(document.form_profil4.matos_elec.value);
		variables+= '&comm='+encode_ajax(document.form_profil4.matos_comm.value);
		var el = $('ordrephotos');
		for( i=0; i<el.getChildren().length; i++)
		{
			idelem = el.getChildren()[i].id;
			nom_elem = "urlphoto"+idelem.substr(2, idelem.length-2);
			variables+= '&urlphoto'+(i+1)+'='+encode_ajax(eval("document.form_profil4."+nom_elem+".value"));
			nom_elem2 = "commphoto"+idelem.substr(2, idelem.length-2);
			variables+= '&commphoto'+(i+1)+'='+encode_ajax(eval("document.form_profil4."+nom_elem2+".value"));
		}
		ficajaxPOST("ajax.php", "valide_kit="+mode+variables, "valide_kit");
	}
}

function ajoute_kit()
{
	if (document.getElementById('support_kit').style.display == "block")
	{
		alerte('', 'Attention :', '<br /><br />Validez ou annulez<br />le kit en cours<br />de modification...', 3.5);
	}
	else
	{
		ficajax("ajax.php?ajoute_kit", "ajoute_kit");
	}
}

function modif_kit(nom)
{
	if (document.getElementById('support_kit').style.display == "block")
	{
		alerte('', 'Attention :', '<br /><br />Validez ou annulez<br />le kit en cours<br />de modification...', 3.5);
	}
	else
	{
		ficajax("ajax.php?modif_kit="+encode_ajax(nom), "modif_kit");
	}
}

function supp_kit(nom)
{
	ficajax("ajax.php?supp_kit="+encode_ajax(nom), "supp_kit");
}

function demande_supp_kit(nom)
{
	if (document.getElementById('support_kit').style.display == "block")
	{
		alerte('', 'Attention :', '<br /><br />Validez ou annulez<br />le kit en cours<br />de modification...', 3.5);
	}
	else
	{
		MyBoxA.confirm('Supprimer définitivement ce kit ?',{textBoxBtnOk: 'Oui', textBoxBtnCancel: 'Non', onComplete: function(returnvalue) { if (returnvalue) {supp_kit(nom);} } });
	}
}

function maj_liste_elements(formulaire, element, nbr, num)
{
	a = element+num;
	if ((listval.length <=0 && eval("formulaire."+a+".value.length") > 0) || (listval.length > 0 && eval("formulaire."+a+".value.length") <= 0))
	{
		for (i=0; i<nbr; i++)
		{
			for (j=0; j<(nbr-1); j++)
			{
				nom_elema = element+(j+1);
				nom_elemb = element+(j+2);
				if (eval("formulaire."+nom_elema+".value") == "" && eval("formulaire."+nom_elemb+".value") != "")
				{
					eval("formulaire."+nom_elema).value = eval("formulaire."+nom_elemb+".value");
					eval("formulaire."+nom_elemb).value = "";
					if (element == 'conc_nom')
					{
						nom_elemc = 'conc_style'+(j+1);
						nom_elemd = 'conc_style'+(j+2);
						eval("formulaire."+nom_elemc).value = eval("formulaire."+nom_elemd+".value");
						eval("formulaire."+nom_elemd).value = "";
					}
					if (element == 'matos_futs')
					{
						nom_elemc = 'matos_typefuts'+(j+1);
						nom_elemd = 'matos_typefuts'+(j+2);
						eval("formulaire."+nom_elemc).selectedIndex = eval("formulaire."+nom_elemd+".selectedIndex");
						eval("formulaire."+nom_elemd).selectedIndex = 0;
					}
					if (element == 'matos_cymbales')
					{
						nom_elemc = 'matos_typecymb'+(j+1);
						nom_elemd = 'matos_typecymb'+(j+2);
						eval("formulaire."+nom_elemc).selectedIndex = eval("formulaire."+nom_elemd+".selectedIndex");
						eval("formulaire."+nom_elemd).selectedIndex = 0;
					}
				}
			}
		}
		for (i=0; i<(nbr-1); i++)
		{
			nom_elema = element+(i+1);
			nom_elemb = eval("formulaire."+element+(i+2));
			if (element == 'conc_nom')
			{
				nom_elemb = document.getElementById('support_nomstyle'+(i+2));
			}
			if (element == 'matos_futs')
			{
				nom_elemb = document.getElementById('support_futs'+(i+2));
			}
			if (element == 'matos_cymbales')
			{
				nom_elemb = document.getElementById('support_cymbales'+(i+2));
			}
			if (eval("formulaire."+nom_elema).value != "")
			{
				nom_elemb.style.display = "block";
			}
			else
			{
				nom_elemb.style.display = "none";
			}
		}
		if (formulaire == document.form_concerts)
		{
			document.getElementById('zone_profil7').setStyle('height', document.form_concerts.style.height);
		}
		if (formulaire == document.form_profil3)
		{
			document.getElementById('zone_profil3').setStyle('height', document.form_profil3.style.height);
		}
		if (formulaire == document.form_profil4)
		{
			document.getElementById('zone_profil4').setStyle('height', document.form_profil4.style.height);
		}
	}
}

function maj_liste_elementsBAK(formulaire, element, nbr, num)
{
	a = element+num;
	if ((listval.length <=0 && formulaire.eval(a).value.length > 0) || (listval.length > 0 && formulaire.eval(a).value.length <= 0))
	{
		for (i=0; i<nbr; i++)
		{
			for (j=0; j<(nbr-1); j++)
			{
				nom_elema = element+(j+1);
				nom_elemb = element+(j+2);
				if (formulaire.eval(nom_elema).value == "" && formulaire.eval(nom_elemb).value != "")
				{
					formulaire.eval(nom_elema).value = formulaire.eval(nom_elemb).value;
					formulaire.eval(nom_elemb).value = "";
					if (element == 'conc_nom')
					{
						nom_elemc = 'conc_style'+(j+1);
						nom_elemd = 'conc_style'+(j+2);
						formulaire.eval(nom_elemc).value = formulaire.eval(nom_elemd).value;
						formulaire.eval(nom_elemd).value = "";
					}
					if (element == 'matos_futs')
					{
						nom_elemc = 'matos_typefuts'+(j+1);
						nom_elemd = 'matos_typefuts'+(j+2);
						formulaire.eval(nom_elemc).selectedIndex = formulaire.eval(nom_elemd).selectedIndex;
						formulaire.eval(nom_elemd).selectedIndex = 0;
					}
					if (element == 'matos_cymbales')
					{
						nom_elemc = 'matos_typecymb'+(j+1);
						nom_elemd = 'matos_typecymb'+(j+2);
						formulaire.eval(nom_elemc).selectedIndex = formulaire.eval(nom_elemd).selectedIndex;
						formulaire.eval(nom_elemd).selectedIndex = 0;
					}
				}
			}
		}
		for (i=0; i<(nbr-1); i++)
		{
			nom_elema = element+(i+1);
			nom_elemb = formulaire.eval(element+(i+2));
			if (element == 'conc_nom')
			{
				nom_elemb = document.getElementById('support_nomstyle'+(i+2));
			}
			if (element == 'matos_futs')
			{
				nom_elemb = document.getElementById('support_futs'+(i+2));
			}
			if (element == 'matos_cymbales')
			{
				nom_elemb = document.getElementById('support_cymbales'+(i+2));
			}
			if (formulaire.eval(nom_elema).value != "")
			{
				nom_elemb.style.display = "block";
			}
			else
			{
				nom_elemb.style.display = "none";
			}
		}
		if (formulaire == document.form_concerts)
		{
			document.getElementById('zone_profil7').setStyle('height', document.form_concerts.style.height);
		}
		if (formulaire == document.form_profil3)
		{
			document.getElementById('zone_profil3').setStyle('height', document.form_profil3.style.height);
		}
		if (formulaire == document.form_profil4)
		{
			document.getElementById('zone_profil4').setStyle('height', document.form_profil4.style.height);
		}
	}
}

function maj_avatar()
{
	ficajax("ajax.php?urlexists="+document.formulaire_coords.avatar.value, "url_exists_avatar");
}

function maj_dep(monform)
{
	if (monform.pays)
	{
		//monform.dep.selectedIndex = 0;
	}
	else if (monform.ann_dep)
	{
		//monform.ann_pays.selectedIndex = 0;
	}
	document.getElementById("zone_dep").style.display = "none";
	if ((monform.pays && monform.pays.value == "France") || (monform.ann_pays && monform.ann_pays.value == "France"))
	{
		document.getElementById("zone_dep").style.display = "table-row";
	}
}

function verif_form_coords()
{
	if ((document.formulaire_coords.pwdact.value == "" ||
	document.formulaire_coords.pwdnouv1.value == "" ||
	document.formulaire_coords.pwdnouv2.value == "") &&
	(document.formulaire_coords.pwdact.value != "" ||
	document.formulaire_coords.pwdnouv1.value != "" ||
	document.formulaire_coords.pwdnouv2.value != ""))
	{
		alerte('', 'Erreur...', '<br /><br /><br />Problème avec le<br />mot de passe...', 2.5);
	}
	else if (document.formulaire_coords.pwdact.value != "" &&
	document.formulaire_coords.pwdnouv1.value != "" &&
	document.formulaire_coords.pwdnouv2.value != "" &&
	document.formulaire_coords.pwdnouv1.value != document.formulaire_coords.pwdnouv2.value)
	{
		alerte('', 'Attention :', '<br /><br />Les 2 nouveaux<br />mots de passe doivent<br />être identiques.', 2.5);
	}
	else if (document.formulaire_coords.pwdact.value != "" && ficajax('ajax.php?coords_pwdact='+document.formulaire_coords.pwdact.value) != "ok")
	{
		alerte('', 'Erreur...', '<br /><br />Le mot de passe<br />actuel est<br />incorrect...', 2.5);
	}
	else if ((document.formulaire_coords.email1.value == "" ||
	document.formulaire_coords.email2.value == "") &&
	(document.formulaire_coords.email1.value != "" ||
	document.formulaire_coords.email2.value != ""))
	{
		alerte('', 'Erreur...', '<br /><br /><br />Problème avec les<br />adresse e-mail...', 2.5);
	}
	else if (document.formulaire_coords.email1.value != "" &&
	document.formulaire_coords.email2.value != "" &&
	document.formulaire_coords.email1.value != document.formulaire_coords.email2.value)
	{
		alerte('', 'Attention :', '<br /><br />Les 2 adresse<br />e-mails doivent<br />être identiques.', 2.5);
	}
	else if (document.formulaire_coords.email1.value != "" && !email_valide(document.formulaire_coords.email1.value))
	{
		alerte('', 'Erreur...', '<br /><br /><br />Le format de l\'email<br />est invalide...', 2.5);
	}
	else if (document.formulaire_coords.msn.value != "" && !email_valide(document.formulaire_coords.msn.value))
	{
		alerte('', 'Erreur...', '<br /><br /><br />Le format du compte<br />MSN est invalide...', 2.5);
	}
	else
	{
		pwd = document.formulaire_coords.pwdnouv1.value;
		nom = encode_ajax(document.formulaire_coords.nom.value);
		prenom = encode_ajax(document.formulaire_coords.prenom.value);
		datenaiss = document.formulaire_coords.datenaiss.value.substr(6, 4)+'-'+document.formulaire_coords.datenaiss.value.substr(3, 2)+'-'+document.formulaire_coords.datenaiss.value.substr(0, 2);
		sexe = document.formulaire_coords.sexe.value;
		pays = encode_ajax(document.formulaire_coords.pays.value);
		dep = encode_ajax(document.formulaire_coords.dep.value);
		ville = encode_ajax(document.formulaire_coords.ville.value);
		email = encode_ajax(document.formulaire_coords.email1.value);
		msn = encode_ajax(document.formulaire_coords.msn.value);
		emailmess = document.formulaire_coords.emailmess.value;
		newsletter = document.formulaire_coords.newsletter.value;
		avatar = encode_ajax(document.formulaire_coords.avatar.value);
		if (avatar == "") {avatar = "_design/avatar_defaut.jpg";}
		variables = 'formulaire=coords';
		variables+= '&mdp='+pwd;
		variables+= '&nom='+nom;
		variables+= '&prenom='+prenom;
		variables+= '&datenaiss='+datenaiss;
		variables+= '&sexe='+sexe;
		variables+= '&pays='+pays;
		variables+= '&dep='+dep;
		variables+= '&ville='+ville;
		variables+= '&email='+email;
		variables+= '&msn='+msn;
		variables+= '&emailmess='+emailmess;
		variables+= '&newsletter='+newsletter;
		variables+= '&avatar='+avatar;
		retour = ficajaxPOST('recup_form.php', variables);
		//alert(ficajaxPOST('recup_form.php', variables));
		if (retour != "")
		{
			if (retour > "0")
			{
				alerte('', 'Confirmation', '<br />Mise à jour effectuée<br />avec succès.<br /><br />Veuillez confirmer vos<br />changements par email.', 3);
				setTimeout('location.href="index.php?deco=1"', 4000);
			}
			else
			{
				alerte('', 'Confirmation', '<br /><br /><br />Mise à jour effectuée<br />avec succès.', 3);
				setTimeout('affiche_page("membre")', 4000);
			}
		}
		else
		{
			alerte('', 'Erreur...', '<br /><br /><br />Un problème inconnu<br />est survenu lors<br />de la mise à jour...', 2.5);
		}
	}
}

function verif_form_connex()
{
	if (document.formulaire_connexion.pseudo.value == "" ||
	document.formulaire_connexion.pwd.value == "")
	{
		alerte('', 'Attention :', '<br /><br /><br />Tous les champs<br />sont obligatoires.', 2.5);
	}
	else
	{
		pseudo = document.formulaire_connexion.pseudo.value;
		pwd = document.formulaire_connexion.pwd.value;
		auto = document.formulaire_connexion.auto.checked;
		retour = ficajaxPOST('recup_form.php', 'formulaire=connexion&pseudo='+pseudo+'&pwd='+pwd);
		if (retour != "")
		{
			document.formulaire_connexion.pseudo.blur();
			document.formulaire_connexion.pwd.blur();
			alerte('', 'Bienvenue '+retour, '<br /><br />Vous êtes maintenant<br />connecté à<br />Drumprofile.com', 3);
			setTimeout('location.href="index.php?ps='+retour+'&pw='+pwd+'&auto='+auto+'"', 4000);
		}
		else
		{
			alerte('', 'Erreur...', '<br /><br /><br />Connexion refusée...', 2.5);
		}
	}
}

function verif_form_insc()
{
	if (document.formulaire_inscription.pseudo.value == "" ||
	document.formulaire_inscription.pwd1.value == "" ||
	document.formulaire_inscription.pwd2.value == "" ||
	document.formulaire_inscription.email1.value == "" ||
	document.formulaire_inscription.email2.value == "")
	{
		alerte('', 'Attention :', '<br /><br /><br />Tous les champs<br />sont obligatoires.', 2.5);
	}
	else
	{
		if (!pseudo_valide(document.formulaire_inscription.pseudo.value))
		{
			alerte('', 'Attention :', '<br /><br />pour le pseudo,<br />Les seuls caractères<br />autorisés sont :<br />a-z, A-Z, 0-9, ._-', 3.5);
		}
		else if (document.formulaire_inscription.email1.value != document.formulaire_inscription.email2.value)
		{
			alerte('', 'Attention :', '<br /><br /><br />Les 2 adresses e-mail<br />doivent être identiques.', 2.5);
		}
		else if (document.formulaire_inscription.pwd1.value != document.formulaire_inscription.pwd2.value)
		{
			alerte('', 'Attention :', '<br /><br /><br />Les 2 mots de passe<br />doivent être identiques.', 2.5);
		}
		else
		{
			if (email_valide(document.formulaire_inscription.email1.value))
			{
				pseudo = document.formulaire_inscription.pseudo.value;
				email1 = document.formulaire_inscription.email1.value;
				pwd1 = document.formulaire_inscription.pwd1.value;
				retour = ficajaxPOST('recup_form.php', 'formulaire=inscription&pseudo='+pseudo+'&email1='+email1+'&pwd1='+pwd1);
				if (retour == "1")
				{
					alerte('', 'Confirmation', '<br /><br />Inscription effectuée<br />avec succès.<br /><br />Veuillez confirmer votre<br />inscription par e-mail.', 4);
					setTimeout('location.href="index.php"', 5000);
				}
				else if (retour == "2")
				{
					alerte('', 'Erreur...', '<br /><br /><br />Le pseudo demandé<br />existe déjà...', 2.5);
				}
				else if (retour == "3")
				{
					alerte('', 'Erreur...', '<br /><br /><br />Le pseudo demandé<br />est interdit...', 2.5);
				}
				else
				{
					alerte('', 'Erreur...', '<br /><br /><br />Un problème inconnu<br />est survenu lors<br />de l\'inscription...', 2.5);
				}
			}
			else
			{
				alerte('', 'Erreur...', '<br /><br /><br />Le format de l\'email<br />est invalide...', 2.5);
			}
		}
	}
}

function verif_form_contact()
{
	if (document.formulaire_contact.nom.value == "" ||
	document.formulaire_contact.email.value == "" ||
	document.formulaire_contact.message.value == "")
	{
		alerte('', 'Attention :', '<br /><br /><br />Tous les champs<br />sont obligatoires.', 2.5);
	}
	else
	{
		if (email_valide(document.formulaire_contact.email.value))
		{
			choix = encode_ajax(document.formulaire_contact.choix.value);
			nom = encode_ajax(document.formulaire_contact.nom.value);
			email = encode_ajax(document.formulaire_contact.email.value);
			message = encode_ajax(document.formulaire_contact.message.value);
			retour = ficajaxPOST('recup_form.php', 'formulaire=contact&choix='+choix+'&nom='+nom+'&email='+email+'&message='+message);
			if (retour == "1")
			{
				alerte('', 'Confirmation', '<br /><br />Votre message a bien<br />été envoyé.<br /><br />Il sera traité dans<br />les meilleurs délais.', 4);
				setTimeout('location.href="index.php"', 5000);
			}
			else
			{
				alerte('', 'Erreur...', '<br /><br /><br />Un problème inconnu<br />est survenu lors<br />de l\'envoi...', 2.5);
			}
		}
		else
		{
			alerte('', 'Erreur...', '<br /><br /><br />Le format de l\'email<br />est invalide...', 2.5);
		}
	}
}

function email_valide(email)
{
   var reg = /^[a-z0-9._-]+@[a-z0-9.-]{2,}[.][a-z]{2,4}$/;
   return (reg.exec(email)!=null);
}

function pseudo_valide(pseudo)
{
   //var reg = /^[a-zA-Z0-9_\-\().]*$/;
   var reg = /^[a-zA-Z0-9_.-]*$/;
   return (reg.exec(pseudo)!=null);
}

function alerte(image, titre, texte, duree)
{
	image = "_img/blank.png";
	Growl.Bezel({
		image: image,
		title: titre,
		text: texte,
		duration: duree
	});
}

function affiche_page(texte, val, val2)
{
	if (texte == 'recherche')
	{
		if (!val || val == '')
		{
			val = '-1';
		}
		if (!val2 || val2 == '')
		{
			val2 = '0';
		}
		texte+='&typerech='+val+'&membres_enligne='+val2;
	}
	if (texte == 'news')
	{
		if (!val || val == '')
		{
			val = '0';
		}
		if (!val2 || val2 == '')
		{
			val2 = '0';
		}
		texte+='&typenews='+val+'&pagenews='+val2;
	}
	if (texte == 'vol')
	{
		if (!val || val == '')
		{
			val = '0';
		}
		texte+='&pagevols='+val;
	}
	if (texte == 'trucs')
	{
		if (!val || val == '')
		{
			val = '0';
		}
		if (!val2 || val2 == '')
		{
			val2 = '0';
		}
		texte+='&typetrucs='+val+'&pagetrucs='+val2;
	}
	if (texte == 'divers')
	{
		if (!val || val == '')
		{
			val = '0';
		}
		texte+='&pagedivers='+val;
	}
	if (texte == 'wallpapers')
	{
		if (!val || val == '')
		{
			val = '0';
		}
		texte+='&pagefond='+val;
	}
	if (texte == 'sondages')
	{
		if (!val2 || val2 == '')
		{
			val2 = '0';
		}
		texte+='&sondage='+val+'&resultat='+val2;
	}
	ficajax('ajax.php?page='+texte, 'avanc');
}

function changeOpac(opacity, id)
{
    var object = document.getElementById(id).style;
    object.opacity = (opacity / 100);
    object.MozOpacity = (opacity / 100);
    object.KhtmlOpacity = (opacity / 100);
	object.filter = "alpha(opacity=" + opacity + ")";
}

function opacite(id, opacStart, opacEnd, millisec)
{
    var speed = Math.round(millisec / 100);
    var timer = 0;

	if (opacStart > opacEnd)
	{
		for (i = opacStart; i >= opacEnd; i--)
		{
			setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
			timer++;
		}
	}
	else if (opacStart < opacEnd)
	{
		for (i = opacStart; i <= opacEnd; i++)
		{
			setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
			timer++;
		}
	}
}

function masque(bouton)
{
	for (i=100; i>=0; i--)
	{
		document.getElementById('bouton_'+bouton).style.opacity = i / 100;
	}
}

function flash_references()
{
	document.write('<object width="150" height="195" id="InterNantes" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="references.swf" /><param name="quality" value="high" /><embed src="references.swf" quality="high" width="150" height="195" name="InterNantes" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>');
}

function envoie_contact()
{
	if (document.formulaire.email.value != '')
	{
		document.formulaire.submit();
	}
	else
	{
		alert("L'adresse e-mail est obligatoire.");
	}
}
window.onload = function() {
MyBoxA = new PBBAcpBox({BoxStyles:{'width': 500}});
setCorps();
setFooter();
};
window.onresize = function() {
setCorps();
setFooter();
};

function getWindowHeight() {
    var windowHeight=0;
    if (typeof(window.innerHeight)=='number') // firefox
	{
        windowHeight=window.innerHeight;
	    return windowHeight - 17;
    }
    else
	{
	    if (document.documentElement && document.documentElement.clientHeight)
		{
			windowHeight = document.documentElement.clientHeight;
	    }
	    else
		{
			if (document.body&&document.body.clientHeight)
			{
				windowHeight=document.body.clientHeight;
			}
	    }
	    return windowHeight;
    }
}

function setCorps()
{
	document.getElementById('corps').style.height = (getWindowHeight()-(document.getElementById('entete').offsetHeight+document.getElementById('pied').offsetHeight))+"px";
}

function setFooter()
{
    if (document.getElementById) 
	{
        var windowHeight=getWindowHeight();
        if (windowHeight>0)
		{
			var contentHeight=document.getElementById('entete').offsetHeight+document.getElementById('corps').offsetHeight;
			var footerElement=document.getElementById('pied');
			var footerHeight=footerElement.offsetHeight;
			if (windowHeight-(contentHeight+footerHeight)>=0)
			{
				footerElement.style.position='relative';
				footerElement.style.top=(windowHeight-(contentHeight+footerHeight))+'px';
			}
			else
			{
				footerElement.style.position='static';
			}
       }
    }
}

function ficajaxPOST(fichier, variables, async)
{
	document.getElementById('chargement').style.left = ((document.documentElement.clientWidth / 2)-55)+"px";
	document.getElementById('chargement').style.top = ((document.documentElement.clientHeight / 2)-55)+"px";
	document.getElementById('chargement').style.display = "block";
	asyn = false;
	if (async)
	{
		asyn = true;
	}
	if (window.XMLHttpRequest) // Firefox
	{
		xhr_object = new XMLHttpRequest();
	}
	else if (window.ActiveXObject) // Internet Explorer
	{
		xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else
	{
		return(false);
	}
	xhr_object.open("POST", fichier, asyn);
	xhr_object.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	xhr_object.send(variables);

	if (async)
	{
		xhr_object.onreadystatechange = function()
		{
			if (xhr_object.readyState == 4)
			{
				document.getElementById('chargement').style.display = "none";
				if (async == "rech_simple")
				{
					document.getElementById('resultat_rech_simple').innerHTML = xhr_object.responseText;
					document.getElementById('hauteur').style.height = (400 - document.getElementById('resultat_rech_simple').offsetHeight) + 'px';
				}
				else if (async == "volOK")
				{
					if (xhr_object.responseText == "erreur_code")
					{
						alerte('', 'Erreur', '<br /><br />Le code que vous avez<br />saisi est invalide.', 2.5);
					}
					else
					{
						document.getElementById('formulaire_vol').style.display = 'none';
						alerte('', 'Confirmation', '<br />Formulaire de vol<br />publié avec succès.<br /><br />Il sera visible après<br />validation du Webmaster.', 4);
					}
				}
				else if (async == "rech_avancee")
				{
					document.getElementById('resultat_rech_avancee').innerHTML = xhr_object.responseText;
					document.getElementById('resultat_rech_avancee').style.display = "block";
					document.getElementById('hauteur').style.height = (400 - document.getElementById('resultat_rech_avancee').offsetHeight) + 'px';
					hs.registerOverlay(
						{
							thumbnailId: null,
							overlayId: 'controlbar',
							position: 'top right',
							hideOnMouseOut: true
						}
					);
					hs.graphicsDir = '_img/highslide/';
					hs.outlineType = 'drop-shadow';
					hs.showCredits = false;
					window.onload = function() {
						hs.preloadImages(100);
					};
					var inforecherche = new Tips($$('.InfoRecherche'), {
						initialize:function(){
							this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 500, wait: false}).set(0);
						},
						onShow: function(toolTip) {
							this.fx.start(1);
						},
						onHide: function(toolTip) {
							this.fx.start(0);
						}
					});
				}
				else if (async == "valide_kit")
				{
					retour = xhr_object.responseText;
					if (retour != "")
					{
						ferme_kit();
						if (variables.substr(11, 5) == 'ajout')
						{
							nouvel_element = new Option(decode_ajax(retour), decode_ajax(retour), false, false);
							document.form_entete_profil4.liste_kits.options[document.form_entete_profil4.liste_kits.length] = nouvel_element;
							document.form_entete_profil4.liste_kits.selectedIndex = document.form_entete_profil4.liste_kits.length-1;
							document.form_entete_profil4.liste_kits.disabled = false;
							document.getElementById('modifkit').disabled = false;
							document.getElementById('suppkit').disabled = false;
							aff_kit_defaut(document.form_entete_profil4.liste_kits.value);
							alerte('', 'Confirmation', '<br /><br /><br />Kit ajouté<br />avec succès.', 3);
						}
						else if (variables.substr(11, 5) == 'modif')
						{
							val = retour.split('|');
							for (i=0; i<document.form_entete_profil4.liste_kits.length; i++)
							{
								if (document.form_entete_profil4.liste_kits.options[i].value == decode_ajax(val[0]))
								{
									document.form_entete_profil4.liste_kits.options[i].value = decode_ajax(val[1]);
									document.form_entete_profil4.liste_kits.options[i].text = decode_ajax(val[1]);
								}
							}
							//document.form_entete_profil4.liste_kits.selectedIndex = document.form_entete_profil4.liste_kits.length-1;
							alerte('', 'Confirmation', '<br /><br /><br />Mise à jour effectuée<br />avec succès.', 3);
						}
					}
				}
				else if (async == "valide_images" || async == "valide_sons" || async == "valide_videos")
				{
					alerte('', 'Confirmation', '<br /><br /><br />Mise à jour effectuée<br />avec succès.', 3);
				}
				else if (async == "maj_coords" || async == "maj_propos" || async == "maj_optionsprofil")
				{
					alerte('', 'Confirmation', '<br /><br /><br />Mise à jour effectuée<br />avec succès.', 3);
				}
			}
			else
			{
				return(false);
			}
		};
	}
	else
	{
		if (xhr_object.readyState == 4)
		{
			document.getElementById('chargement').style.display = "none";
			return(xhr_object.responseText);
		}
		else
		{
			return(false);
		}
	}
}

function ficajax(fichier, async)
{
	if (async != "url_exists")
	{
		document.getElementById('chargement').style.left = ((document.documentElement.clientWidth / 2)-55)+"px";
		document.getElementById('chargement').style.top = ((document.documentElement.clientHeight / 2)-55)+"px";
		document.getElementById('chargement').style.display = "block";
	}
	asyn = false;
	if (async)
	{
		asyn = true;
	}
	if (window.XMLHttpRequest) // Firefox
	{
		xhr_object = new XMLHttpRequest();
	}
	else if (window.ActiveXObject) // Internet Explorer
	{
		xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else
	{
		return(false);
	}
	xhr_object.open("GET", fichier, asyn);
	xhr_object.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	xhr_object.send(fichier);
	if (async)
	{
		xhr_object.onreadystatechange = function()
		{
			if (xhr_object.readyState == 4)
			{
				document.getElementById('chargement').style.display = "none";
				if (async == "url_exists_avatar")
				{
					if (xhr_object.responseText != "")
					{
						document.getElementById("zone_avatar").innerHTML = '<img src="'+document.formulaire_coords.avatar.value+'" style="border: none; width: 100px; height: 100px" />';
					}
					else
					{
						document.getElementById("zone_avatar").innerHTML = '<img src="_design/avatar_defaut.jpg" style="border: none; width: 100px; height: 100px" />';
					}
				}
				else if (async.substr(0, 16) == "url_exists_photo")
				{
					num = async.substr(16, async.length-16);
					if (xhr_object.responseText != "")
					{
						document.getElementById('imgphoto'+num).src = document.getElementById('urlphoto'+num).value;
					}
					else
					{
						document.getElementById('imgphoto'+num).src = '_design/avatar_defaut.jpg';
					}
				}
				else if (async.substr(0, 16) == "url_exists_image")
				{
					num = async.substr(16, async.length-16);
					if (xhr_object.responseText != "")
					{
						document.getElementById('image'+num).src = document.getElementById('urlimage'+num).value;
					}
					else
					{
						document.getElementById('image'+num).src = '_design/avatar_defaut.jpg';
					}
				}
				else if (async == "ajoute_kit" || async == "modif_kit")
				{
					document.getElementById('support_kit').innerHTML = xhr_object.responseText;
						new Sortables($('ordrephotos'), {
						 	initialize: function(){
								this.elements.each(function(element, i){
									element.setStyle('background-color', '#444444');
									element.setStyle('border', 'solid 1px #999999');
									element.setStyle('text-align', 'center');
									element.setStyle('vertical-align', 'top');
									element.setStyle('width', '500px');
									element.setStyle('font-size', 11);
									element.setStyle('height', 43);
								});
							}
						});
					document.getElementById('support_kit').style.display = "block";
					document.getElementById('zone_profil4').setStyle('height', document.form_profil4.style.height);
				}
				else if (async == "supp_kit")
				{
					document.form_entete_profil4.liste_kits.options[document.form_entete_profil4.liste_kits.selectedIndex] = null;
					document.getElementById('zone_kit_defaut').innerHTML = "";
					if (document.form_entete_profil4.liste_kits.length == 0)
					{
						document.form_entete_profil4.liste_kits.disabled = true;
					}
					else
					{
						document.form_entete_profil4.liste_kits.disabled = false;
					}
					aff_kit_defaut(document.getElementById('liste_kits').value);
				}
				else if (async == "supp_annonce")
				{
					recup_annonces(document.getElementById('type_affann').value);
					document.getElementById('zone_profil5').setStyle('height', document.form_listeann.style.height + document.form_annonces.style.height);
				}
				else if (async == "supp_concert")
				{
					recup_concerts();
					document.getElementById('zone_profil7').setStyle('height', document.form_listeconc.style.height + document.form_concerts.style.height);
					document.getElementById('zone_profil7').setStyle('height', document.form_listeconc.style.height + document.form_concerts.style.height);
				}
				else if (async == "supp_ami" || async == "annule_ami" || async == "refuse_ami" || async == "accepte_ami")
				{
					recup_amis(document.getElementById('type_amis').value);
					document.getElementById('zone_profil8').setStyle('height', document.form_amis.style.height);
				}
				else
				{
					document.getElementById('centre').innerHTML = xhr_object.responseText;
					if (fichier=='ajax.php?page=messagerie')
					{
						var idmessages = ficajaxPOST('ajax.php', 'idmessages=1');
						eval(idmessages);
						var el = document.getElementById('listeMembres');
						var indicator3 = new Element('div').addClass('autocompleter-loading').setHTML('').setStyle('display', 'none').injectAfter(el);
						var completer3 = new Autocompleter.Ajax.Xhtml(el, 'ajax.php', {
							'postData': {html: 1},
							'onRequest': function(el) {
								indicator3.setStyle('display', '');
							},
							'onComplete': function(el) {
								indicator3.setStyle('display', 'none');
							},
							'parseChoices': function(el) {
								var value = el.getFirst().innerHTML;
								el.inputValue = value;
								this.addChoiceEvents(el).getFirst().setHTML(this.markQueryValue(value));
							}
						});
					}
					if (fichier.indexOf('ajax.php?page=vol') != -1)
					{
						MyBoxA = new PBBAcpBox({BoxStyles:{'width': 500}});
						objetsVoles = new Array();
						window.addEvent('domready', function(){
							$$('input.DatePicker').each( function(el){
								new DatePicker(el);
							});
						});
					}
					if (fichier=='ajax.php?page=themes')
					{
						var szNormal = 87, szSmall  = 64, szFull   = 250;
						var kwicks = $$("#kwicks .kwick");
						var fx = new Fx.Elements(kwicks, {wait: false, duration: 300, transition: Fx.Transitions.Back.easeOut});
						kwicks.each(function(kwick, i) {
							kwick.addEvent("mouseenter", function(event) {
								var o = {};
								o[i] = {width: [kwick.getStyle("width").toInt(), szFull]};
								kwicks.each(function(other, j) {
									if(i != j) {
										var w = other.getStyle("width").toInt();
										if(w != szSmall) o[j] = {width: [w, szSmall]};
									}
								});
								fx.start(o);
							});
						});
						$("kwicks").addEvent("mouseleave", function(event) {
							var o = {};
							kwicks.each(function(kwick, i) {
								o[i] = {width: [kwick.getStyle("width").toInt(), szNormal]}
							});
							fx.start(o);
						})
					}
					if (fichier=='ajax.php?page=membre')
					{
						if (ficajax("ajax.php?demandes_amis=ok") > 0)
						{
							alerte('', 'Attention !', '<br />Un ou plusieurs membres<br />ont demandé à vous<br />ajouter à leur liste<br />d\'amis. N\'oubliez pas<br />de leur répondre.', 5);
						}
					}
					if (fichier=='ajax.php?page=liens')
					{
						initacc();
					}
					if (fichier=='ajax.php?page=edition_profil')
					{
						document.form_profil1.cadredefaut.disabled = true;
						if (document.form_profil1.typeaff[1].checked == true)
						{
							document.form_profil1.cadredefaut.disabled = false;
						}
						new Sortables($('ordrecadres'), {
						 	initialize: function(){
								this.elements.each(function(element, i){
									element.setStyle('background-color', '#444444');
									element.setStyle('border', 'solid 1px #999999');
									element.setStyle('text-align', 'center');
									element.setStyle('font-size', 11);
									element.setStyle('height', 12);
								});
							}
						});
						new Sortables($('ordreimages'), {
							initialize: function(){
								this.elements.each(function(element, i){
									element.setStyle('background-color', '#444444');
									element.setStyle('border', 'solid 1px #999999');
									element.setStyle('text-align', 'center');
									element.setStyle('vertical-align', 'top');
									element.setStyle('width', '500px');
									element.setStyle('font-size', 11);
									element.setStyle('height', 43);
								});
							}
						});
						new Sortables($('ordresons'), {
							initialize: function(){
								this.elements.each(function(element, i){
									element.setStyle('background-color', '#444444');
									element.setStyle('border', 'solid 1px #999999');
									element.setStyle('text-align', 'center');
									element.setStyle('vertical-align', 'top');
									element.setStyle('width', '500px');
									element.setStyle('font-size', 11);
									element.setStyle('height', 43);
								});
							}
						});
						new Sortables($('ordrevideos'), {
							initialize: function(){
								this.elements.each(function(element, i){
									element.setStyle('background-color', '#444444');
									element.setStyle('border', 'solid 1px #999999');
									element.setStyle('text-align', 'center');
									element.setStyle('vertical-align', 'top');
									element.setStyle('width', '500px');
									element.setStyle('font-size', 11);
									element.setStyle('height', 43);
								});
							}
						});
						var infoyoutube = new Tips($$('.InfoYoutube'), {
							initialize:function(){
								this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 500, wait: false}).set(0);
							},
							onShow: function(toolTip) {
								this.fx.start(1);
							},
							onHide: function(toolTip) {
								this.fx.start(0);
							}
						});
						var infodailymotion = new Tips($$('.InfoDailymotion'), {
							initialize:function(){
								this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 500, wait: false}).set(0);
							},
							onShow: function(toolTip) {
								this.fx.start(1);
							},
							onHide: function(toolTip) {
								this.fx.start(0);
							}
						});
						var infogooglevideo = new Tips($$('.InfoGooglevideo'), {
							initialize:function(){
								this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 500, wait: false}).set(0);
							},
							onShow: function(toolTip) {
								this.fx.start(1);
							},
							onHide: function(toolTip) {
								this.fx.start(0);
							}
						});

						recup_annonces(document.getElementById('type_affann').value);
						recup_concerts();
						recup_amis(document.getElementById('type_amis').value);
						
						var el = document.getElementById('listeMembres');
						var indicator3 = new Element('div').addClass('autocompleter-loading').setHTML('').setStyle('display', 'none').injectAfter(el);
						var completer3 = new Autocompleter.Ajax.Xhtml(el, 'ajax.php', {
							'postData': {html: 1},
							'onRequest': function(el) {
								indicator3.setStyle('display', '');
							},
							'onComplete': function(el) {
								indicator3.setStyle('display', 'none');
							},
							'parseChoices': function(el) {
								var value = el.getFirst().innerHTML;
								el.inputValue = value;
								this.addChoiceEvents(el).getFirst().setHTML(this.markQueryValue(value));
							}
						});
						window.addEvent('domready', function(){
							$$('input.DatePicker').each( function(el){
								new DatePicker(el);
							});
						});
						initacc();
					}
					if (fichier.indexOf('ajax.php?page=recherche&typerech=') != -1)
					{
						val = fichier.substr(33, 1);
						maj_liste_recherches();
						document.rech_avancee.recherche.value = val;
						maj_criteres_recherche(val)
						//document.eval("form"+val).eval("bouton_valide"+val).click();
						document.getElementById('bouton_valide'+val).click();
					}
					else if (fichier.indexOf('ajax.php?page=recherche') != -1)
					{
						if (document.rech_simple)
						{
							document.rech_simple.texte.focus();
						}
					}
					if (fichier=='ajax.php?page=coords')
					{
						initSqueezBox();
						maj_dep(document.formulaire_coords);
						window.addEvent('domready', function(){
							$$('input.DatePicker').each( function(el){
								new DatePicker(el);
							});
						});
					}
					if (fichier=='ajax.php?page=connexion')
					{
						setTimeout('document.formulaire_connexion.pseudo.focus();', 100);
					}
					if (fichier.indexOf('ajax.php?page=wallpapers') != -1 || fichier.indexOf('ajax.php?page=accueil') != -1)
					{
						hs.registerOverlay(
							{
								thumbnailId: null,
								overlayId: 'controlbar',
								position: 'top right',
								hideOnMouseOut: true
							}
						);
						hs.graphicsDir = '_img/highslide/';
						hs.outlineType = 'drop-shadow';
						hs.showCredits = false;
						window.onload = function() {
							hs.preloadImages(6);
						};
					}
					if (fichier=='ajax.php?page=inscription')
					{
						document.formulaire_inscription.pseudo.focus();
					}
					if (fichier=='ajax.php?page=accueil')
					{
						if (document.getElementById('container'))
						{
							eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('6.1a={2C:u(e){E x=0;E y=0;E 43=J;E es=e.1g;k(6(e).I(\'1c\')==\'1n\'){4v=es.30;7Q=es.T;es.30=\'3K\';es.1c=\'2A\';es.T=\'2i\';43=11}E el=e;6i(el){x+=el.65+(el.3M&&!6.3k.5k?R(el.3M.3G)||0:0);y+=el.64+(el.3M&&!6.3k.5k?R(el.3M.3O)||0:0);el=el.aP}el=e;6i(el&&el.6s&&el.6s.7T()!=\'1Y\'){x-=el.2s||0;y-=el.2p||0;el=el.3h}k(43){es.1c=\'1n\';es.T=7Q;es.30=4v}F{x:x,y:y}},bo:u(el){E x=0,y=0;6i(el){x+=el.65||0;y+=el.64||0;el=el.aP}F{x:x,y:y}},2g:u(e){E w=6.I(e,\'18\');E h=6.I(e,\'U\');E 1v=0;E 1t=0;E es=e.1g;k(6(e).I(\'1c\')!=\'1n\'){1v=e.5i;1t=e.5J}Q{4v=es.30;7Q=es.T;es.30=\'3K\';es.1c=\'2A\';es.T=\'2i\';1v=e.5i;1t=e.5J;es.1c=\'1n\';es.T=7Q;es.30=4v}F{w:w,h:h,1v:1v,1t:1t}},7U:u(el){F{1v:el.5i||0,1t:el.5J||0}},9C:u(e){E h,w,de;k(e){w=e.6B;h=e.6D}Q{de=1r.3s;w=3z.9j||6Q.9j||(de&&de.6B)||1r.1Y.6B;h=3z.9i||6Q.9i||(de&&de.6D)||1r.1Y.6D}F{w:w,h:h}},6e:u(e){E t,l,w,h,4A,4w;k(e&&e.7c.7T()!=\'1Y\'){t=e.2p;l=e.2s;w=e.9n;h=e.9f;4A=0;4w=0}Q{k(1r.3s&&1r.3s.2p){t=1r.3s.2p;l=1r.3s.2s;w=1r.3s.9n;h=1r.3s.9f}Q k(1r.1Y){t=1r.1Y.2p;l=1r.1Y.2s;w=1r.1Y.9n;h=1r.1Y.9f}4A=6Q.9j||1r.3s.6B||1r.1Y.6B||0;4w=6Q.9i||1r.3s.6D||1r.1Y.6D||0}F{t:t,l:l,w:w,h:h,4A:4A,4w:4w}},8D:u(e,5y){E el=6(e);E t=el.I(\'48\')||\'\';E r=el.I(\'4a\')||\'\';E b=el.I(\'49\')||\'\';E l=el.I(\'4h\')||\'\';k(5y)F{t:R(t)||0,r:R(r)||0,b:R(b)||0,l:R(l)};Q F{t:t,r:r,b:b,l:l}},by:u(e,5y){E el=6(e);E t=el.I(\'4l\')||\'\';E r=el.I(\'4r\')||\'\';E b=el.I(\'4F\')||\'\';E l=el.I(\'4q\')||\'\';k(5y)F{t:R(t)||0,r:R(r)||0,b:R(b)||0,l:R(l)};Q F{t:t,r:r,b:b,l:l}},6h:u(e,5y){E el=6(e);E t=el.I(\'3O\')||\'\';E r=el.I(\'4p\')||\'\';E b=el.I(\'4m\')||\'\';E l=el.I(\'3G\')||\'\';k(5y)F{t:R(t)||0,r:R(r)||0,b:R(b)||0,l:R(l)||0};Q F{t:t,r:r,b:b,l:l}},3B:u(4f){E x=4f.bH||(4f.bQ+(1r.3s.2s||1r.1Y.2s))||0;E y=4f.bS||(4f.bJ+(1r.3s.2p||1r.1Y.2p))||0;F{x:x,y:y}},92:u(3D,95){95(3D);3D=3D.5U;6i(3D){6.1a.92(3D,95);3D=3D.bh}},bs:u(3D){6.1a.92(3D,u(el){1S(E 1z 1D el){k(1Q el[1z]===\'u\'){el[1z]=W}}})},bp:u(el,1x){E 3Z=$.1a.6e();E 91=$.1a.2g(el);k(!1x||1x==\'2Z\')$(el).I({O:3Z.t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\'1b\';2y.T=L.T!=\'2d\'&&L.T!=\'2i\'?\'2d\':L.T;2y.3v=\'3K\';2y.U=L.14.1t+\'1b\';2y.18=L.14.1v+\'1b\';2y.48=L.2r.t;2y.4a=L.2r.r;2y.49=L.2r.b;2y.4h=L.2r.l;k(6.3k.5D){2y.aB=9g}Q{2y.co=9g}e.3h.aO(4W,e);es.48=\'2o\';es.4a=\'2o\';es.49=\'2o\';es.4h=\'2o\';es.T=\'2i\';es.9p=\'1n\';es.O=\'2o\';es.M=\'2o\';k(43){es.1c=\'1n\';es.30=4v}4W.ch(e);2y.1c=\'2A\';F{L:L,2k:6(4W)}};6.B.6u={cg:[0,1J,1J],cf:[9v,1J,1J],cm:[aF,aF,ck],cl:[0,0,0],cj:[0,0,1J],ci:[9B,42,42],cn:[0,1J,1J],cv:[0,0,5u],cu:[0,5u,5u],cp:[81,81,81],cq:[0,1M,0],cr:[ce,cd,b4],c1:[5u,0,5u],c2:[85,b4,47],bW:[1J,9u,0],bX:[cb,50,cc],ca:[5u,0,0],c9:[c6,9q,c7],c8:[cy,0,6K],cY:[1J,0,1J],cW:[1J,cV,0],cS:[0,52,0],cT:[75,0,cU],cZ:[9v,ae,9u],d0:[d6,bV,ae],d4:[9Q,1J,1J],d1:[9Z,d2,9Z],cR:[6K,6K,6K],cQ:[1J,cE,cF],cA:[1J,1J,9Q],cB:[0,1J,0],cH:[1J,0,1J],cI:[52,0,0],cO:[0,0,52],cN:[52,52,0],cL:[1J,9B,0],bj:[1J,6U,bU],bN:[52,0,52],bM:[1J,0,0],bK:[6U,6U,6U],bI:[1J,1J,1J],bC:[1J,1J,0]};6.B.4O=u(3a,aZ){k(6.B.6u[3a])F{r:6.B.6u[3a][0],g:6.B.6u[3a][1],b:6.B.6u[3a][2]};Q k(2b=/^5g\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*\\)$/.7h(3a))F{r:R(2b[1]),g:R(2b[2]),b:R(2b[3])};Q k(2b=/5g\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*\\)$/.7h(3a))F{r:1P(2b[1])*2.55,g:1P(2b[2])*2.55,b:1P(2b[3])*2.55};Q k(2b=/^#([a-5j-5x-9])([a-5j-5x-9])([a-5j-5x-9])$/.7h(3a))F{r:R("5L"+2b[1]+2b[1]),g:R("5L"+2b[2]+2b[2]),b:R("5L"+2b[3]+2b[3])};Q k(2b=/^#([a-5j-5x-9]{2})([a-5j-5x-9]{2})([a-5j-5x-9]{2})$/.7h(3a))F{r:R("5L"+2b[1]),g:R("5L"+2b[2]),b:R("5L"+2b[3])};Q F aZ==11?J:{r:1J,g:1J,b:1J}};6.B.aL={4m:1,3G:1,4p:1,3O:1,53:1,4t:1,U:1,M:1,bg:1,bw:1,49:1,4h:1,4a:1,48:1,5Z:1,7J:1,61:1,7w:1,1w:1,bB:1,bD:1,4F:1,4q:1,4r:1,4l:1,2e:1,bx:1,O:1,18:1,3A:1};6.B.aQ={6m:1,bz:1,bA:1,bR:1,bP:1,3a:1,bL:1};6.B.6F=[\'bl\',\'be\',\'cw\',\'dV\'];6.B.8a={\'83\':[\'6E\',\'ar\'],\'6L\':[\'6E\',\'8v\'],\'7O\':[\'7O\',\'\'],\'6V\':[\'6V\',\'\']};6.27.1O({7n:u(4u,H,D,G){F 8.1i(u(){E 7x=6.H(H,D,G);E e=S 6.aK(8,7x,4u)})},89:u(H,G){F 8.1i(u(){E 7x=6.H(H,G);E e=S 6.89(8,7x)})},7t:u(2M){F 8.1E(u(){k(8.4J)6.8B(8,2M)})},ey:u(2M){F 8.1E(u(){k(8.4J)6.8B(8,2M);k(8.1i&&8.1i[\'B\'])8.1i.B=[]})}});6.1O({89:u(1K,1k){E z=8,2n;z.2M=u(){k(6.9o(1k.1I))1k.1I.1A(1K)};z.3r=7p(u(){z.2M()},1k.19);1K.4J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+R(6.D[1k.D](6z,n,1N[p][0].g,(1N[p][1].g-1N[p][0].g),1k.19))+\',\'+R(6.D[1k.D](6z,n,1N[p][0].b,(1N[p][1].b-1N[p][0].b),1k.19))+\')\'}Q{E 8b=6.D[1k.D](6z,n,1N[p][0],(1N[p][1]-1N[p][0]),1k.19);k(p=="1w")6.1z(y,"1w",8b);Q y[p]=8b+(p!=\'3A\'&&p!=\'8C\'?\'1b\':\'\')}}}};z.3r=7p(u(){z.2M()},13);1K.4J=z},8B:u(1K,2M){k(2M)1K.4J.6T-=ep;Q{3z.7a(1K.4J.3r);1K.4J=W;6.24(1K,"B")}}});6.8y=u(4I){E 3Y={};k(1Q 4I==\'3L\'){4I=4I.7T().7Z(\';\');1S(E i=0;i<4I.1U;i++){5t=4I[i].7Z(\':\');k(5t.1U==2){3Y[6.a7(5t[0].4s(/\\-(\\w)/g,u(m,c){F c.ej()}))]=6.a7(5t[1])}}}F 3Y};6.P={1e:W,C:W,4N:u(){F 8.1E(u(){k(8.76){8.q.3C.2v(\'3I\',6.P.8t);8.q=W;8.76=J;k(6.3k.5D){8.82="eH"}Q{8.1g.f0=\'\';8.1g.a6=\'\';8.1g.aj=\'\'}}})},8t:u(e){k(6.P.C!=W){6.P.7L(e);F J}E A=8.2B;6(1r).1W(\'2P\',6.P.8j).1W(\'4E\',6.P.7L);A.q.1f=6.1a.3B(e);A.q.3m=A.q.1f;A.q.7s=J;A.q.eZ=8!=8.2B;6.P.C=A;k(A.q.3X&&8!=8.2B){8q=6.1a.2C(A.3h);8g=6.1a.2g(A);8h={x:R(6.I(A,\'M\'))||0,y:R(6.I(A,\'O\'))||0};dx=A.q.3m.x-8q.x-8g.1v/2-8h.x;dy=A.q.3m.y-8q.y-8g.1t/2-8h.y;6.2h.3H(A,[dx,dy])}F 6.5e||J},9H:u(e){E A=6.P.C;A.q.7s=11;E 7I=A.1g;A.q.5P=6.I(A,\'1c\');A.q.3P=6.I(A,\'T\');k(!A.q.86)A.q.86=A.q.3P;A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9S"})}Q{3C.I(\'-f4-5C-6X\',\'1n\');3C.I(\'5C-6X\',\'1n\');3C.I(\'-f3-5C-6X\',\'1n\')}8.q={3C:3C,4R:o.4R?11:J,2Q:o.2Q?11:J,2S:o.2S?o.2S:J,3X:o.3X?o.3X:J,6I:o.6I?o.6I:J,3A:o.3A?R(o.3A)||0:J,1w:o.1w?1P(o.1w):J,B:R(o.B)||W,4Q:o.4Q?o.4Q:J,44:{},1f:{},33:o.33&&o.33.1F==28?o.33:J,2D:o.2D&&o.2D.1F==28?o.2D:J,2a:o.2a&&o.2a.1F==28?o.2a:J,1x:/2Z|2V/.4x(o.1x)?o.1x:J,54:o.54?R(o.54)||0:0,2c:o.2c?o.2c:J,8A:o.8A?11:J,5c:o.5c||J};k(o.44&&o.44.1F==28)8.q.44.5C=o.44;k(o.32&&o.32.1F==28)8.q.32=o.32;k(o.1T&&((o.1T.1F==8e&&(o.1T==\'6k\'||o.1T==\'1r\'))||(o.1T.1F==5X&&o.1T.1U==4))){8.q.1T=o.1T}k(o.26){8.q.26=o.26}k(o.4B){k(1Q o.4B==\'eV\'){8.q.46=R(o.4B)||1;8.q.4L=R(o.4B)||1}Q k(o.4B.1U==2){8.q.46=R(o.4B[0])||1;8.q.4L=R(o.4B[1])||1}}k(o.2u&&o.2u.1F==28){8.q.2u=o.2u}8.76=11;3C.1E(u(){8.2B=el});3C.1W(\'3I\',6.P.8t)})}};6.27.1O({7G:6.P.4N,5p:6.P.3c});6.1h={a3:u(4j,4e,5B,5I){F 4j<=6.P.C.q.22&&(4j+5B)>=(6.P.C.q.22+6.P.C.q.1o.w)&&4e<=6.P.C.q.21&&(4e+5I)>=(6.P.C.q.21+6.P.C.q.1o.h)?11:J},9c:u(4j,4e,5B,5I){F!(4j>(6.P.C.q.22+6.P.C.q.1o.w)||(4j+5B)<6.P.C.q.22||4e>(6.P.C.q.21+6.P.C.q.1o.h)||(4e+5I)<6.P.C.q.21)?11:J},1f:u(4j,4e,5B,5I){F 4j<6.P.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:W,14:W,T:W,5v:u(e){6.K.C=(8.7R)?8.7R:8;6.K.1f=6.1a.3B(e);6.K.14={18:R(6(6.K.C).I(\'18\'))||0,U:R(6(6.K.C).I(\'U\'))||0};6.K.T={O:R(6(6.K.C).I(\'O\'))||0,M:R(6(6.K.C).I(\'M\'))||0};6(1r).1W(\'2P\',6.K.8n).1W(\'4E\',6.K.8m);k(1Q 6.K.C.V.aa===\'u\'){6.K.C.V.aa.1A(6.K.C)}F J},8m:u(e){6(1r).2v(\'2P\',6.K.8n).2v(\'4E\',6.K.8m);k(1Q 6.K.C.V.a4===\'u\'){6.K.C.V.a4.1A(6.K.C)}6.K.C=W},8n:u(e){k(!6.K.C){F}1f=6.1a.3B(e);59=6.K.T.O-6.K.1f.y+1f.y;5b=6.K.T.M-6.K.1f.x+1f.x;59=Z.3Q(Z.2w(59,6.K.C.V.6r-6.K.14.U),6.K.C.V.5r);5b=Z.3Q(Z.2w(5b,6.K.C.V.5Y-6.K.14.18),6.K.C.V.5o);k(1Q 6.K.C.V.32===\'u\'){E 5V=6.K.C.V.32.1A(6.K.C,[5b,59]);k(1Q 5V==\'eP\'&&5V.1U==2){5b=5V[0];59=5V[1]}}6.K.C.1g.O=59+\'1b\';6.K.C.1g.M=5b+\'1b\';F J},3l:u(e){6(1r).1W(\'2P\',6.K.5T).1W(\'4E\',6.K.7t);6.K.1l=8.1l;6.K.2L=8.2L;6.K.1f=6.1a.3B(e);k(6.K.1l.V.33){6.K.1l.V.33.1A(6.K.1l,[8])}6.K.14={18:R(6(8.1l).I(\'18\'))||0,U:R(6(8.1l).I(\'U\'))||0};6.K.T={O:R(6(8.1l).I(\'O\'))||0,M:R(6(8.1l).I(\'M\'))||0};F J},7t:u(){6(1r).2v(\'2P\',6.K.5T).2v(\'4E\',6.K.7t);k(6.K.1l.V.2D){6.K.1l.V.2D.1A(6.K.1l,[6.K.2L])}6.K.1l=W;6.K.2L=W},4U:u(dx,7u){F Z.2w(Z.3Q(6.K.14.18+dx*7u,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6s){el.V.2K[i].1l=el;el.V.2K[i].2L=i;6(el.V.2K[i]).1W(\'3I\',6.K.3l)}}}k(el.V.3x){k(1Q el.V.3x===\'3L\'){7K=6(el.V.3x);k(7K.4M()>0){7K.1E(u(){8.7R=el});7K.1W(\'3I\',6.K.5v)}}Q k(el.V.3x.6s){el.V.3x.7R=el;6(el.V.3x).1W(\'3I\',6.K.5v)}Q k(el.V.3x==11){6(8).1W(\'3I\',6.K.5v)}}})},4N:u(){F 8.1E(u(){E el=8;1S(i 1D el.V.2K){el.V.2K[i].1l=W;el.V.2K[i].2L=W;6(el.V.2K[i]).2v(\'3I\',6.K.3l)}k(el.V.3x){k(1Q el.V.3x===\'3L\'){2m=6(el.V.3x);k(2m.4M()>0){2m.2v(\'3I\',6.K.5v)}}Q k(el.V.3x==11){6(8).2v(\'3I\',6.K.5v)}}el.V=W})}};6.27.1O({dC:6.K.3c,dA:6.K.4N});6.1X=W;6.5e=J;6.2j=W;6.5M=[];6.7j=u(e){E 6o=e.bc||e.ba||-1;k(6o==17||6o==16){6.5e=11}};6.7k=u(e){6.5e=J};6.an=u(e){8.f.1f=6.1a.3B(e);8.f.1B=6.1O(6.1a.2C(8),6.1a.2g(8));8.f.2f=6.1a.6e(8);8.f.1f.x-=8.f.1B.x;8.f.1f.y-=8.f.1B.y;k(8.f.3o)6.1X.3V(8.f.3o);6.1X.I({1c:\'2A\',18:\'6w\',U:\'6w\'});k(8.f.o){6.1X.I(\'1w\',8.f.o)}6.2j=8;6.68=J;6.5M=[];8.f.el.1E(u(){8.1B={x:8.65+(8.3M&&!6.3k.5k?R(8.3M.3G)||0:0)+(6.2j.2s||0),y:8.64+(8.3M&&!6.3k.5k?R(8.3M.3O)||0:0)+(6.2j.2p||0),1v:8.5i,1t:8.5J};k(8.s==11){k(6.5e==J){8.s=J;6(8).4c(6.2j.f.5K)}Q{6.68=11;6.5M[6.5M.1U]=6.1z(8,\'1H\')}}});6(8).31(6.1X.N(0));8.f.6q=6.1a.6h(6.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6(8).4c(6.2j.f.5K)}}Q k((8.s==11)&&(6R==-1)){8.s=J;6(8).4c(6.2j.f.5K)}Q k((!8.s)&&(6.5e==11)&&(6R!=-1)){8.s=11;6(8).3V(6.2j.f.5K)}});F J};6.8w=u(e){k(!6.2j)F;6.b9.1A(6.2j,[e])};6.b9=u(e){6(1r).2v(\'2P\',6.7o).2v(\'4E\',6.8w);k(!6.2j)F;6.1X.I(\'1c\',\'1n\');k(8.f.3o)6.1X.4c(8.f.3o);6.2j=J;6(\'1Y\').31(6.1X.N(0));k(6.68==11){k(8.f.67)8.f.67(6.8s(6.1z(8,\'1H\')))}Q{k(8.f.66)8.f.66(6.8s(6.1z(8,\'1H\')))}6.5M=[]};6.8s=u(s){E h=\'\';E o=[];k(a=6(\'#\'+s)){a.N(0).f.el.1E(u(){k(8.s==11){k(h.1U>0){h+=\'&\'}h+=s+\'[]=\'+6.1z(8,\'1H\');o[o.1U]=6.1z(8,\'1H\')}})}F{5N:h,o:o}};6.27.do=u(o){k(!6.1X){6(\'1Y\',1r).31(\'<2I 1H="1X"></2I>\').1W(\'7W\',6.7j).1W(\'8r\',6.7k);6.1X=6(\'#1X\');6.1X.I({T:\'2i\',1c:\'1n\'});k(3z.4f){6(\'1Y\',1r).1W(\'7W\',6.7j).1W(\'8r\',6.7k)}Q{6(1r).1W(\'7W\',6.7j).1W(\'8r\',6.7k)}}k(!o){o={}}F 8.1E(u(){k(8.aA)F;8.aA=11;8.f={a:o.2q,o:o.1w?1P(o.1w):J,5K:o.at?o.at:J,3o:o.3E?o.3E:J,67:o.67?o.67:J,66:o.66?o.66:J};8.f.el=6(\'.\'+o.2q);6(8).1W(\'3I\',6.an)})};6.1d={5S:[],4b:{},1e:J,5H:W,3l:u(){k(6.P.C==W){F}E 3u,2r,c,cs;6.1d.1e.N(0).3d=6.P.C.q.4Q;3u=6.1d.1e.N(0).1g;3u.1c=\'2A\';6.1d.1e.1o=6.1O(6.1a.2C(6.1d.1e.N(0)),6.1a.2g(6.1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x,dy]);k(2l&&2l.1F==7i){dx=2l.dx;dy=2l.dy}22=A.q.1G.x+dx;21=A.q.1G.y+dy;k(A.q.3X&&(A.q.2u||A.q.2a)){6.2h.2u(A,22,21)}22=!A.q.1x||A.q.1x==\'2V\'?22:A.q.1G.x||0;21=!A.q.1x||A.q.1x==\'2Z\'?21:A.q.1G.y||0;A.1g.M=22+\'1b\';A.1g.O=21+\'1b\'},3c:u(o){F 8.1E(u(){k(8.8X==11||!o.2q||!6.1a||!6.P||!6.1h){F}3U=6(o.2q,8);k(3U.4M()==0){F}E 3w={1T:\'6k\',3X:11,2u:o.2u&&o.2u.1F==28?o.2u:W,2a:o.2a&&o.2a.1F==28?o.2a:W,2m:8,1w:o.1w||J};k(o.26&&R(o.26)){3w.26=R(o.26)||1;3w.26=3w.26>0?3w.26:1}k(3U.4M()==1)3U.5p(3w);Q{6(3U.N(0)).5p(3w);3w.2m=W;3U.5p(3w)}3U.7W(6.2h.9E);3U.1z(\'90\',6.2h.90++);8.8X=11;8.3b={};8.3b.9z=3w.9z;8.3b.26=3w.26;8.3b.51=3U;8.3b.94=o.94?11:J;8J=8;8J.3b.51.1E(u(9K){8.8U=9K;8.7q=8J});k(o.2n&&o.2n.1F==5X){1S(i=o.2n.1U-1;i>=0;i--){k(o.2n[i].1F==5X&&o.2n[i].1U==2){el=8.3b.51.N(i);k(el.6s){6.2h.3H(el,o.2n[i])}}}}})}};6.27.1O({da:6.2h.3c,dD:6.2h.ad,dE:6.2h.N});6.1V={4Z:W,5z:J,7M:W,9k:u(e){6.1V.5z=11;6.1V.23(e,8,11)},9b:u(e){k(6.1V.4Z!=8)F;6.1V.5z=J;6.1V.2N(e,8)},23:u(e,el,5z){k(6.1V.4Z!=W)F;k(!el){el=8}6.1V.4Z=el;1B=6.1O(6.1a.2C(el),6.1a.2g(el));62=6(el);4o=62.1z(\'4o\');5E=62.1z(\'5E\');k(4o){6.1V.7M=4o;62.1z(\'4o\',\'\');6(\'#a8\').7E(4o);k(5E)6(\'#9h\').7E(5E.4s(\'ds://\',\'\'));Q 6(\'#9h\').7E(\'\');1e=6(\'#6x\');k(el.3q.3d){1e.N(0).3d=el.3q.3d}Q{1e.N(0).3d=\'\'}8N=6.1a.2g(1e.N(0));9V=5z&&el.3q.T==\'9d\'?\'53\':el.3q.T;2O(9V){1j\'O\':21=1B.y-8N.1t;22=1B.x;1s;1j\'M\':21=1B.y;22=1B.x-8N.1v;1s;1j\'2e\':21=1B.y;22=1B.x+1B.1v;1s;1j\'9d\':6(\'1Y\').1W(\'2P\',6.1V.2P);1f=6.1a.3B(e);21=1f.y+15;22=1f.x+15;1s;9Y:21=1B.y+1B.1t;22=1B.x;1s}1e.I({O:21+\'1b\',M:22+\'1b\'});k(el.3q.6y==J){1e.23()}Q{1e.9X(el.3q.6y)}k(el.3q.5h)el.3q.5h.1A(el);62.1W(\'9P\',6.1V.2N).1W(\'ah\',6.1V.9b)}},2P:u(e){k(6.1V.4Z==W){6(\'1Y\').2v(\'2P\',6.1V.2P);F}1f=6.1a.3B(e);6(\'#6x\').I({O:1f.y+15+\'1b\',M:1f.x+15+\'1b\'})},2N:u(e,el){k(!el){el=8}k(6.1V.5z!=11&&6.1V.4Z==el){6.1V.4Z=W;6(\'#6x\').dw(1);6(el).1z(\'4o\',6.1V.7M).2v(\'9P\',6.1V.2N).2v(\'ah\',6.1V.9b);k(el.3q.5w)el.3q.5w.1A(el);6.1V.7M=W}},3c:u(1k){k(!6.1V.1e){6(\'1Y\').31(\'<2I 1H="6x"><2I 1H="a8"></2I><2I 1H="9h"></2I></2I>\');6(\'#6x\').I({T:\'2i\',3A:4Y,1c:\'1n\'});6.1V.1e=11}F 8.1E(u(){k(6.1z(8,\'4o\')){8.3q={T:/O|53|M|2e|9d/.4x(1k.T)?1k.T:\'53\',3d:1k.3d?1k.3d:J,6y:1k.6y?1k.6y:J,5h:1k.5h&&1k.5h.1F==28?1k.5h:J,5w:1k.5w&&1k.5w.1F==28?1k.5w:J};E el=6(8);el.1W(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y+1q;a=1q*0.3;p=19*.3;k(a<Z.3W(1q)){a=1q;s=p/4}Q{s=p/(2*Z.2x)*Z.8G(1q/a)}k(n<1){F-.5*(a*Z.5a(2,10*(n-=1))*Z.6P((n*19-s)*(2*Z.2x)/p))+1y}F a*Z.5a(2,-10*(n-=1))*Z.6P((n*19-s)*(2*Z.2x)/p)*.5+1q+1y}}});6.27.1O({dm:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.4P(8,H,G,\'3y\',D)})},dn:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.4P(8,H,G,\'3g\',D)})},di:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.4P(8,H,G,\'aU\',D)})},dg:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.4P(8,H,G,\'M\',D)})},db:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.4P(8,H,G,\'2e\',D)})},dc:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.4P(8,H,G,\'aY\',D)})}});6.B.4P=u(e,H,G,29,D){k(!6.3p(e)){6.24(e,\'12\');F J}E z=8;z.el=6(e);z.4M=6.1a.2g(e);z.D=1Q G==\'3L\'?G:D||W;k(!e.3i)e.3i=z.el.I(\'1c\');k(29==\'aU\'){29=z.el.I(\'1c\')==\'1n\'?\'3g\':\'3y\'}Q k(29==\'aY\'){29=z.el.I(\'1c\')==\'1n\'?\'2e\':\'M\'}z.el.23();z.H=H;z.G=1Q G==\'u\'?G:W;z.B=6.B.7f(e);z.29=29;z.1I=u(){k(z.G&&z.G.1F==28){z.G.1A(z.el.N(0))}k(z.29==\'3g\'||z.29==\'2e\'){z.el.I(\'1c\',z.el.N(0).3i==\'1n\'?\'2A\':z.el.N(0).3i)}Q{z.el.2N()}6.B.7S(z.B.2k.N(0),z.B.L);6.24(z.el.N(0),\'12\')};2O(z.29){1j\'3y\':4z=S 6.B(z.B.2k.N(0),6.H(z.H,z.D,z.1I),\'U\');4z.1u(z.B.L.14.1t,0);1s;1j\'3g\':z.B.2k.I(\'U\',\'6w\');z.el.23();4z=S 6.B(z.B.2k.N(0),6.H(z.H,z.D,z.1I),\'U\');4z.1u(0,z.B.L.14.1t);1s;1j\'M\':4z=S 6.B(z.B.2k.N(0),6.H(z.H,z.D,z.1I),\'18\');4z.1u(z.B.L.14.1v,0);1s;1j\'2e\':z.B.2k.I(\'18\',\'6w\');z.el.23();4z=S 6.B(z.B.2k.N(0),6.H(z.H,z.D,z.1I),\'18\');4z.1u(0,z.B.L.14.1v);1s}};6.27.dB=u(3T,G){F 8.1i(\'12\',u(){k(!6.3p(8)){6.24(8,\'12\');F J}E e=S 6.B.b1(8,3T,G);e.8T()})};6.B.b1=u(e,3T,G){E z=8;z.el=6(e);z.el.23();z.G=G;z.3T=R(3T)||40;z.L={};z.L.T=z.el.I(\'T\');z.L.O=R(z.el.I(\'O\'))||0;z.L.M=R(z.el.I(\'M\'))||0;k(z.L.T!=\'2d\'&&z.L.T!=\'2i\'){z.el.I(\'T\',\'2d\')}z.2G=5;z.4g=1;z.8T=u(){z.4g++;z.e=S 6.B(z.el.N(0),{19:dz,1I:u(){z.e=S 6.B(z.el.N(0),{19:80,1I:u(){z.3T=R(z.3T/2);k(z.4g<=z.2G)z.8T();Q{z.el.I(\'T\',z.L.T).I(\'O\',z.L.O+\'1b\').I(\'M\',z.L.M+\'1b\');6.24(z.el.N(0),\'12\');k(z.G&&z.G.1F==28){z.G.1A(z.el.N(0))}}}},\'O\');z.e.1u(z.L.O-z.3T,z.L.O)}},\'O\');z.e.1u(z.L.O,z.L.O-z.3T)}};6.27.1O({dr:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.2Y(8,H,G,\'3g\',\'34\',D)})},dt:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.2Y(8,H,G,\'3g\',\'1D\',D)})},eS:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.2Y(8,H,G,\'3g\',\'2F\',D)})},eT:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.2Y(8,H,G,\'3y\',\'34\',D)})},eN:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.2Y(8,H,G,\'3y\',\'1D\',D)})},eW:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.2Y(8,H,G,\'3y\',\'2F\',D)})},eG:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.2Y(8,H,G,\'M\',\'34\',D)})},ek:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.2Y(8,H,G,\'M\',\'1D\',D)})},ei:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.2Y(8,H,G,\'M\',\'2F\',D)})},ea:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.2Y(8,H,G,\'2e\',\'34\',D)})},ec:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.2Y(8,H,G,\'2e\',\'1D\',D)})},eC:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.2Y(8,H,G,\'2e\',\'2F\',D)})}});6.B.2Y=u(e,H,G,29,1p,D){k(!6.3p(e)){6.24(e,\'12\');F J}E z=8;z.el=6(e);z.D=1Q G==\'3L\'?G:D||W;z.L={};z.L.T=z.el.I(\'T\');z.L.O=z.el.I(\'O\');z.L.M=z.el.I(\'M\');k(!e.3i)e.3i=z.el.I(\'1c\');k(1p==\'2F\'){1p=z.el.I(\'1c\')==\'1n\'?\'1D\':\'34\'}z.el.23();k(z.L.T!=\'2d\'&&z.L.T!=\'2i\'){z.el.I(\'T\',\'2d\')}z.1p=1p;G=1Q G==\'u\'?G:W;6C=1;2O(29){1j\'3y\':z.e=S 6.B(z.el.N(0),6.H(H-15,z.D,G),\'O\');z.4C=1P(z.L.O)||0;z.7D=z.aE;6C=-1;1s;1j\'3g\':z.e=S 6.B(z.el.N(0),6.H(H-15,z.D,G),\'O\');z.4C=1P(z.L.O)||0;z.7D=z.aE;1s;1j\'2e\':z.e=S 6.B(z.el.N(0),6.H(H-15,z.D,G),\'M\');z.4C=1P(z.L.M)||0;z.7D=z.9t;1s;1j\'M\':z.e=S 6.B(z.el.N(0),6.H(H-15,z.D,G),\'M\');z.4C=1P(z.L.M)||0;z.7D=z.9t;6C=-1;1s}z.e2=S 6.B(z.el.N(0),6.H(H,z.D,u(){z.el.I(z.L);k(z.1p==\'34\'){z.el.I(\'1c\',\'1n\')}Q z.el.I(\'1c\',z.el.N(0).3i==\'1n\'?\'2A\':z.el.N(0).3i);6.24(z.el.N(0),\'12\')}),\'1w\');k(1p==\'1D\'){z.e.1u(z.4C+1M*6C,z.4C);z.e2.1u(0,1)}Q{z.e.1u(z.4C,z.4C+1M*6C);z.e2.1u(1,0)}};6.27.1O({dq:u(H,U,G,D){F 8.1i(\'12\',u(){S 6.B.72(8,H,U,G,\'9N\',D)})},dp:u(H,U,G,D){F 8.1i(\'12\',u(){S 6.B.72(8,H,U,G,\'7X\',D)})},df:u(H,U,G,D){F 8.1i(\'12\',u(){S 6.B.72(8,H,U,G,\'2F\',D)})}});6.B.72=u(e,H,U,G,1p,D){k(!6.3p(e)){6.24(e,\'12\');F J}E z=8;z.el=6(e);z.D=1Q G==\'3L\'?G:D||W;z.G=1Q G==\'u\'?G:W;k(1p==\'2F\'){1p=z.el.I(\'1c\')==\'1n\'?\'7X\':\'9N\'}z.H=H;z.U=U&&U.1F==dk?U:20;z.B=6.B.7f(e);z.1p=1p;z.1I=u(){k(z.G&&z.G.1F==28){z.G.1A(z.el.N(0))}k(z.1p==\'7X\'){z.el.23()}Q{z.el.2N()}6.B.7S(z.B.2k.N(0),z.B.L);6.24(z.el.N(0),\'12\')};k(z.1p==\'7X\'){z.el.23();z.B.2k.I(\'U\',z.U+\'1b\').I(\'18\',\'6w\');z.ef=S 6.B(z.B.2k.N(0),6.H(z.H,z.D,u(){z.ef=S 6.B(z.B.2k.N(0),6.H(z.H,z.D,z.1I),\'U\');z.ef.1u(z.U,z.B.L.14.1t)}),\'18\');z.ef.1u(0,z.B.L.14.1v)}Q{z.ef=S 6.B(z.B.2k.N(0),6.H(z.H,z.D,u(){z.ef=S 6.B(z.B.2k.N(0),6.H(z.H,z.D,z.1I),\'18\');z.ef.1u(z.B.L.14.1v,0)}),\'U\');z.ef.1u(z.B.L.14.1t,z.U)}};6.27.1O({dQ:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.57(8,H,1,1M,11,G,\'a0\',D)})},e0:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.57(8,H,1M,1,11,G,\'8W\',D)})},dj:u(H,G,D){F 8.1i(\'12\',u(){E D=D||\'9I\';S 6.B.57(8,H,1M,9q,11,G,\'4H\',D)})},57:u(H,3S,3t,5m,G,D){F 8.1i(\'12\',u(){S 6.B.57(8,H,3S,3t,5m,G,\'57\',D)})}});6.B.57=u(e,H,3S,3t,5m,G,1p,D){k(!6.3p(e)){6.24(e,\'12\');F J}E z=8;z.el=6(e);z.3S=R(3S)||1M;z.3t=R(3t)||1M;z.D=1Q G==\'3L\'?G:D||W;z.G=1Q G==\'u\'?G:W;z.19=6.H(H).19;z.5m=5m||W;z.1L=6.1a.2g(e);z.L={18:z.el.I(\'18\'),U:z.el.I(\'U\'),4t:z.el.I(\'4t\')||\'1M%\',T:z.el.I(\'T\'),1c:z.el.I(\'1c\'),O:z.el.I(\'O\'),M:z.el.I(\'M\'),3v:z.el.I(\'3v\'),3O:z.el.I(\'3O\'),4p:z.el.I(\'4p\'),4m:z.el.I(\'4m\'),3G:z.el.I(\'3G\'),4l:z.el.I(\'4l\'),4r:z.el.I(\'4r\'),4F:z.el.I(\'4F\'),4q:z.el.I(\'4q\')};z.18=R(z.L.18)||e.5i||0;z.U=R(z.L.U)||e.5J||0;z.O=R(z.L.O)||0;z.M=R(z.L.M)||0;14=[\'em\',\'1b\',\'eg\',\'%\'];1S(i 1D 14){k(z.L.4t.3j(14[i])>0){z.9W=14[i];z.4t=1P(z.L.4t)}k(z.L.3O.3j(14[i])>0){z.a2=14[i];z.8R=1P(z.L.3O)||0}k(z.L.4p.3j(14[i])>0){z.a5=14[i];z.8F=1P(z.L.4p)||0}k(z.L.4m.3j(14[i])>0){z.a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),z.19);l=6.D[z.D](p,n,z.2U,(z.3J-z.2U),z.19);k(z.1p==\'4H\')o=6.D[z.D](p,n,0.6O,-0.6O,z.19)}}z.8O(s,l,t,J,o)}};z.3r=7p(u(){z.2M()},13);z.8O=u(3e,M,O,b5,1w){z.el.I(\'U\',z.U*3e/1M+\'1b\').I(\'18\',z.18*3e/1M+\'1b\').I(\'M\',M+\'1b\').I(\'O\',O+\'1b\').I(\'4t\',z.4t*3e/1M+z.9W);k(z.8R)z.el.I(\'3O\',z.8R*3e/1M+z.a2);k(z.8F)z.el.I(\'4p\',z.8F*3e/1M+z.a5);k(z.8I)z.el.I(\'4m\',z.8I*3e/1M+z.a9);k(z.8K)z.el.I(\'3G\',z.8K*3e/1M+z.9J);k(z.8V)z.el.I(\'4l\',z.8V*3e/1M+z.9A);k(z.8L)z.el.I(\'4r\',z.8L*3e/1M+z.as);k(z.8Z)z.el.I(\'4F\',z.8Z*3e/1M+z.ak);k(z.8Y)z.el.I(\'4q\',z.8Y*3e/1M+z.aX);k(z.1p==\'4H\'){k(3z.5q)z.el.N(0).1g.6j="7P(1w="+1w*1M+")";z.el.N(0).1g.1w=1w}k(b5){k(z.5m){z.el.I(z.L)}k(z.1p==\'8W\'||z.1p==\'4H\'){z.el.I(\'1c\',\'1n\');k(z.1p==\'4H\'){k(3z.5q)z.el.N(0).1g.6j="7P(1w="+1M+")";z.el.N(0).1g.1w=1}}Q z.el.I(\'1c\',\'2A\');k(z.G)z.G.1A(z.el.N(0));6.24(z.el.N(0),\'12\')}}};6.27.e3=u(H,3a,G,D){F 8.1i(\'ay\',u(){8.5F=6(8).1z("1g")||\'\';D=1Q G==\'3L\'?G:D||W;G=1Q G==\'u\'?G:W;E 6N=6(8).I(\'6m\');E 6l=8.3h;6i(6N==\'b0\'&&6l){6N=6(6l).I(\'6m\');6l=6l.3h}6(8).I(\'6m\',3a);k(1Q 8.5F==\'6a\')8.5F=8.5F["7b"];6(8).7n({\'6m\':6N},H,D,u(){6.24(8,\'ay\');k(1Q 6(8).1z("1g")==\'6a\'){6(8).1z("1g")["7b"]="";6(8).1z("1g")["7b"]=8.5F}Q{6(8).1z("1g",8.5F)}k(G)G.1A(8)})})};6.27.1O({dM:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.45(8,H,G,\'2Z\',\'58\',D)})},dI:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.45(8,H,G,\'2V\',\'58\',D)})},dH:u(H,G,D){F 8.1i(\'12\',u(){k(6.I(8,\'1c\')==\'1n\'){S 6.B.45(8,H,G,\'2V\',\'5G\',D)}Q{S 6.B.45(8,H,G,\'2V\',\'58\',D)}})},dJ:u(H,G,D){F 8.1i(\'12\',u(){k(6.I(8,\'1c\')==\'1n\'){S 6.B.45(8,H,G,\'2Z\',\'5G\',D)}Q{S 6.B.45(8,H,G,\'2Z\',\'58\',D)}})},dL:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.45(8,H,G,\'2Z\',\'5G\',D)})},dT:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.45(8,H,G,\'2V\',\'5G\',D)})}});6.B.45=u(e,H,G,29,1p,D){k(!6.3p(e)){6.24(e,\'12\');F J}E z=8;E 43=J;z.el=6(e);z.D=1Q G==\'3L\'?G:D||W;z.G=1Q G==\'u\'?G:W;z.1p=1p;z.H=H;z.1L=6.1a.2g(e);z.L={};z.L.T=z.el.I(\'T\');z.L.1c=z.el.I(\'1c\');k(z.L.1c==\'1n\'){4v=z.el.I(\'30\');z.el.23();43=11}z.L.O=z.el.I(\'O\');z.L.M=z.el.I(\'M\');k(43){z.el.2N();z.el.I(\'30\',4v)}z.L.18=z.1L.w+\'1b\';z.L.U=z.1L.h+\'1b\';z.L.3v=z.el.I(\'3v\');z.1L.O=R(z.L.O)||0;z.1L.M=R(z.L.M)||0;k(z.L.T!=\'2d\'&&z.L.T!=\'2i\'){z.el.I(\'T\',\'2d\')}z.el.I(\'3v\',\'3K\').I(\'U\',1p==\'5G\'&&29==\'2Z\'?1:z.1L.h+\'1b\').I(\'18\',1p==\'5G\'&&29==\'2V\'?1:z.1L.w+\'1b\');z.1I=u(){z.el.I(z.L);k(z.1p==\'58\')z.el.2N();Q z.el.23();6.24(z.el.N(0),\'12\')};2O(29){1j\'2Z\':z.eh=S 6.B(z.el.N(0),6.H(H-15,z.D,G),\'U\');z.et=S 6.B(z.el.N(0),6.H(z.H,z.D,z.1I),\'O\');k(z.1p==\'58\'){z.eh.1u(z.1L.h,0);z.et.1u(z.1L.O,z.1L.O+z.1L.h/2)}Q{z.eh.1u(0,z.1L.h);z.et.1u(z.1L.O+z.1L.h/2,z.1L.O)}1s;1j\'2V\':z.eh=S 6.B(z.el.N(0),6.H(H-15,z.D,G),\'18\');z.et=S 6.B(z.el.N(0),6.H(z.H,z.D,z.1I),\'M\');k(z.1p==\'58\'){z.eh.1u(z.1L.w,0);z.et.1u(z.1L.M,z.1L.M+z.1L.w/2)}Q{z.eh.1u(0,z.1L.w);z.et.1u(z.1L.M+z.1L.w/2,z.1L.M)}1s}};6.27.84=u(H,2G,G){F 8.1i(\'12\',u(){k(!6.3p(8)){6.24(8,\'12\');F J}E B=S 6.B.84(8,H,2G,G);B.87()})};6.B.84=u(el,H,2G,G){E z=8;z.2G=2G;z.4g=1;z.el=el;z.H=H;z.G=G;6(z.el).23();z.87=u(){z.4g++;z.e=S 6.B(z.el,6.H(z.H,u(){z.ef=S 6.B(z.el,6.H(z.H,u(){k(z.4g<=z.2G)z.87();Q{6.24(z.el,\'12\');k(z.G&&z.G.1F==28){z.G.1A(z.el)}}}),\'1w\');z.ef.1u(0,1)}),\'1w\');z.e.1u(1,0)}};6.27.1O({7g:u(H,1x,D){o=6.H(H);F 8.1i(\'12\',u(){S 6.B.7g(8,o,1x,D)})},e1:u(H,1x,D){F 8.1E(u(){6(\'a[@5E*="#"]\',8).dX(u(e){aC=8.5E.7Z(\'#\');6(\'#\'+aC[1]).7g(H,1x,D);F J})})}});6.B.7g=u(e,o,1x,D){E z=8;z.o=o;z.e=e;z.1x=/b3|b8/.4x(1x)?1x:J;z.D=D;p=6.1a.2C(e);s=6.1a.6e();z.7m=u(){7a(z.3r);z.3r=W;6.24(z.e,\'12\')};z.t=(S 5A).5O();s.h=s.h>s.4w?(s.h-s.4w):s.h;s.w=s.w>s.4A?(s.w-s.4A):s.w;z.3F=p.y>s.h?s.h:p.y;z.3J=p.x>s.w?s.w:p.x;z.2R=s.t;z.2U=s.l;z.2M=u(){E t=(S 5A).5O();E n=t-z.t;E p=n/z.o.19;k(t>=z.o.19+z.t){z.7m();au(u(){z.8z(z.3F,z.3J)},13)}Q{k(!z.1x||z.1x==\'b3\'){k(!6.D||!6.D[z.D]){70=((-Z.4D(p*Z.2x)/2)+0.5)*(z.3F-z.2R)+z.2R}Q{70=6.D[z.D](p,n,z.2R,(z.3F-z.2R),z.o.19)}}Q{70=z.2R}k(!z.1x||z.1x==\'b8\'){k(!6.D||!6.D[z.D]){71=((-Z.4D(p*Z.2x)/2)+0.5)*(z.3J-z.2U)+z.2U}Q{71=6.D[z.D](p,n,z.2U,(z.3J-z.2U),z.o.19)}}Q{71=z.2U}z.8z(70,71)}};z.8z=u(t,l){3z.dd(l,t)};z.3r=7p(u(){z.2M()},13)};6.27.8p=u(2G,G){F 8.1i(\'12\',u(){k(!6.3p(8)){6.24(8,\'12\');F J}E e=S 6.B.8p(8,2G,G);e.8o()})};6.B.8p=u(e,2G,G){E z=8;z.el=6(e);z.el.23();z.2G=R(2G)||3;z.G=G;z.4g=1;z.L={};z.L.T=z.el.I(\'T\');z.L.O=R(z.el.I(\'O\'))||0;z.L.M=R(z.el.I(\'M\'))||0;k(z.L.T!=\'2d\'&&z.L.T!=\'2i\'){z.el.I(\'T\',\'2d\')}z.8o=u(){z.4g++;z.e=S 6.B(z.el.N(0),{19:60,1I:u(){z.e=S 6.B(z.el.N(0),{19:60,1I:u(){z.e=S 6.B(e,{19:60,1I:u(){k(z.4g<=z.2G)z.8o();Q{z.el.I(\'T\',z.L.T).I(\'O\',z.L.O+\'1b\').I(\'M\',z.L.M+\'1b\');6.24(z.el.N(0),\'12\');k(z.G&&z.G.1F==28){z.G.1A(z.el.N(0))}}}},\'M\');z.e.1u(z.L.M-20,z.L.M)}},\'M\');z.e.1u(z.L.M+20,z.L.M-20)}},\'M\');z.e.1u(z.L.M,z.L.M+20)}};6.27.1O({du:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.2T(8,H,G,\'3y\',\'1D\',D)})},dv:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.2T(8,H,G,\'3y\',\'34\',D)})},d9:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.2T(8,H,G,\'3y\',\'2F\',D)})},e9:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.2T(8,H,G,\'3g\',\'1D\',D)})},f6:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.2T(8,H,G,\'3g\',\'34\',D)})},eQ:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.2T(8,H,G,\'3g\',\'2F\',D)})},eJ:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.2T(8,H,G,\'M\',\'1D\',D)})},eI:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.2T(8,H,G,\'M\',\'34\',D)})},eK:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.2T(8,H,G,\'M\',\'2F\',D)})},eL:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.2T(8,H,G,\'2e\',\'1D\',D)})},eM:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.2T(8,H,G,\'2e\',\'34\',D)})},eU:u(H,G,D){F 8.1i(\'12\',u(){S 6.B.2T(8,H,G,\'2e\',\'2F\',D)})}});6.B.2T=u(e,H,G,29,1p,D){k(!6.3p(e)){6.24(e,\'12\');F J}E z=8;z.el=6(e);z.D=1Q G==\'3L\'?G:D||W;z.G=1Q G==\'u\'?G:W;k(1p==\'2F\'){1p=z.el.I(\'1c\')==\'1n\'?\'1D\':\'34\'}k(!e.3i)e.3i=z.el.I(\'1c\');z.el.23();z.H=H;z.B=6.B.7f(e);z.1p=1p;z.29=29;z.1I=u(){k(z.1p==\'34\')z.el.I(\'30\',\'3K\');6.B.7S(z.B.2k.N(0),z.B.L);k(z.1p==\'1D\'){z.el.I(\'1c\',z.el.N(0).3i==\'1n\'?\'2A\':z.el.N(0).3i)}Q{z.el.I(\'1c\',\'1n\');z.el.I(\'30\',\'eY\')}k(z.G&&z.G.1F==28){z.G.1A(z.el.N(0))}6.24(z.el.N(0),\'12\')};2O(z.29){1j\'3y\':z.ef=S 6.B(z.el.N(0),6.H(z.H,z.D,z.1I),\'O\');z.5n=S 6.B(z.B.2k.N(0),6.H(z.H,z.D),\'U\');k(z.1p==\'1D\'){z.ef.1u(-z.B.L.14.1t,0);z.5n.1u(0,z.B.L.14.1t)}Q{z.ef.1u(0,-z.B.L.14.1t);z.5n.1u(z.B.L.14.1t,0)}1s;1j\'3g\':z.ef=S 6.B(z.el.N(0),6.H(z.H,z.D,z.1I),\'O\');k(z.1p==\'1D\'){z.ef.1u(z.B.L.14.1t,0)}Q{z.ef.1u(0,z.B.L.14.1t)}1s;1j\'M\':z.ef=S 6.B(z.el.N(0),6.H(z.H,z.D,z.1I),\'M\');z.5n=S 6.B(z.B.2k.N(0),6.H(z.H,z.D),\'18\');k(z.1p==\'1D\'){z.ef.1u(-z.B.L.14.1v,0);z.5n.1u(0,z.B.L.14.1v)}Q{z.ef.1u(0,-z.B.L.14.1v);z.5n.1u(z.B.L.14.1v,0)}1s;1j\'2e\':z.ef=S 6.B(z.el.N(0),6.H(z.H,z.D,z.1I),\'M\');k(z.1p==\'1D\'){z.ef.1u(z.B.L.14.1v,0)}Q{z.ef.1u(0,z.B.L.14.1v)}1s}};6.en=W;6.27.eo=u(o){F 8.1E(u(){k(!o||!o.3t){F}E el=8;6(o.3t).1E(u(){S 6.B.9O(el,8,o)})})};6.B.9O=u(e,6A,o){E z=8;z.el=6(e);z.6A=6A;z.2X=1r.9L(\'2I\');6(z.2X).I({T:\'2i\'}).3V(o.3d);k(!o.19){o.19=eb}z.19=o.19;z.1I=o.1I;z.74=0;z.79=0;k(6.er){z.74=(R(6.2z(z.2X,\'3G\'))||0)+(R(6.2z(z.2X,\'4p\'))||0)+(R(6.2z(z.2X,\'4q\'))||0)+(R(6.2z(z.2X,\'4r\'))||0);z.79=(R(6.2z(z.2X,\'3O\'))||0)+(R(6.2z(z.2X,\'4m\'))||0)+(R(6.2z(z.2X,\'4l\'))||0)+(R(6.2z(z.2X,\'4F\'))||0)}z.3l=6.1O(6.1a.2C(z.el.N(0)),6.1a.2g(z.el.N(0)));z.56=6.1O(6.1a.2C(z.6A),6.1a.2g(z.6A));z.3l.1v-=z.74;z.3l.1t-=z.79;z.56.1v-=z.74;z.56.1t-=z.79;z.G=o.1I;6(\'1Y\').31(z.2X);6(z.2X).I(\'18\',z.3l.1v+\'1b\').I(\'U\',z.3l.1t+\'1b\').I(\'O\',z.3l.y+\'1b\').I(\'M\',z.3l.x+\'1b\').7n({O:z.56.y,M:z.56.x,18:z.56.1v,U:z.56.1t},z.19,u(){6(z.2X).cD();k(z.1I&&z.1I.1F==28){z.1I.1A(z.el.N(0),[z.3t])}})};',62,938,'||||||jQuery||this||||||||||||if||||||dragCfg||||function||||||elm|fx|dragged|easing|var|return|callback|speed|css|false|iResize|oldStyle|left|get|top|iDrag|else|parseInt|new|position|height|resizeOptions|null|dropCfg|iEL|Math||true|interfaceFX||sizes||||width|duration|iUtil|px|display|iSort|helper|pointer|style|iDrop|queue|case|options|resizeElement|newSizes|none|oC|type|delta|document|break|hb|custom|wb|opacity|axis|firstNum|attr|apply|pos|cont|in|each|constructor|oR|id|complete|255|elem|oldP|100|props|extend|parseFloat|typeof|newPosition|for|containment|length|iTooltip|bind|selectHelper|body|tp||ny|nx|show|dequeue||fractions|fn|Function|direction|onChange|result|cursorAt|relative|right|scr|getSize|iSlider|absolute|selectdrug|wrapper|newCoords|handle|values|0px|scrollTop|accept|margins|scrollLeft|zones|onSlide|unbind|min|PI|wrs|curCSS|block|dragElem|getPosition|onStop|highlighted|toggle|times|diff|div|dhs|handlers|resizeDirection|step|hide|switch|mousemove|ghosting|startTop|so|slide|startLeft|horizontally|vp|transferEl|DropOutDirectiont|vertically|visibility|append|onDrag|onStart|out||||||color|slideCfg|build|className|percent|ratio|down|parentNode|ifxFirstDisplay|indexOf|browser|start|currentPointer|nWidth|hc|fxCheckTag|tooltipCFG|timer|documentElement|to|shs|overflow|params|dragHandle|up|window|zIndex|getPointer|dhe|nodeEl|helperclass|endTop|borderLeftWidth|dragmoveBy|mousedown|endLeft|hidden|string|currentStyle|nHeight|borderTopWidth|oP|max|elS|from|hight|toDrag|addClass|abs|si|newStyles|clientScroll||clonedEl||restoreStyle|onDragModifier|OpenClose|gx||marginTop|marginBottom|marginRight|collected|removeClass|sw|zoney|event|cnt|marginLeft|overzone|zonex|els|paddingTop|borderBottomWidth|nmp|title|borderRightWidth|paddingLeft|paddingRight|replace|fontSize|prop|oldVisibility|ih|test|cur|fxh|iw|grid|point|cos|mouseup|paddingBottom|sortCfg|puff|styles|animationHandler|old|gy|size|destroy|parseColor|BlindDirection|hpc|revert|newDimensions|tolerance|getWidth|getHeight|wr|orig|3000|current||sliders|128|bottom|snapDistance||end|Scale|close|newTop|pow|newLeft|frameClass|np|selectKeyHelper|oldDisplay|rgb|onShow|offsetWidth|fA|opera|nw|restore|efx|minLeft|Draggable|ActiveXObject|minTop|cssRules|rule|139|startDrag|onHide|F0|toInteger|focused|Date|zonew|user|msie|href|oldStyleAttr|open|inFrontOf|zoneh|offsetHeight|sc|0x|selectCurrent|hash|getTime|oD|onOut|onHover|changed|move|firstChild|newPos|count|Array|maxRight|maxHeight||minHeight|jEl|sx|offsetTop|offsetLeft|onselectstop|onselect|selectedone|serialize|object|ts|fnc|ser|getScroll|xproc|yproc|getBorder|while|filter|parent|parentEl|backgroundColor|sh|pressedKey|sy|selectBorders|maxBottom|tagName|parentBorders|namedColors|contBorders|1px|tooltipHelper|delay|pr|targetEl|clientWidth|directionIncrement|clientHeight|border|cssSides|nRx|bounceout|insideParent|nRy|211|borderColor|os|oldColor|9999|sin|self|iIndex|2000|startTime|192|padding|5625|select|png|src|st|sl|DoFold|getValues|diffWidth||isDraggable|key|next|diffHeight|clearInterval|cssText|nodeName|sideEnd|prev|buildWrapper|ScrollTo|exec|Object|selectKeyDown|selectKeyUp|styleSheets|clear|animate|selectcheck|setInterval|SliderContainer|prot|init|stop|side|hidehelper|minWidth|opt|diffX|diffY|isDroppable|onActivate|onDrop|unit|html|hoverclass|DraggableDestroy|activeclass|dEs|maxWidth|handleEl|dragstop|oldTitle|checkhover|margin|alpha|oldPosition|dragEl|destroyWrapper|toLowerCase|getSizeLite|ne|keydown|unfold|is|split||169|unselectable|borderWidth|Pulsate||initialPosition|pulse|measure|pause|cssSidesEnd|pValue|elPosition|oneIsSortable|String|oldBorder|sliderSize|sliderPos|clnt|dragmove|idsa|10000|stopDrag|moveDrag|shake|Shake|parentPos|keyup|Selectserialize|draginit|floatVal|Color|selectstop|applyOnHover|parseStyle|scroll|autoSize|stopAnim|fontWeight|getMargins|empty|borderRightSize|asin|lastSi|borderBottomSize|sliderEl|borderLeftSize|paddingRightSize|bouncein|helperSize|zoom|slider|prevLeft|borderTopSize|prevTop|bounce|SliderIteration|paddingTopSize|shrink|isSlider|paddingLeftSize|paddingBottomSize|tabindex|windowSize|traverseDOM|getContainment|restricted|func|modifyContainer|fitToContainer|snapToGrid|firstStep|cursor|hidefocused|intersect|mouse|sortable|scrollHeight|oldFloat|tooltipURL|innerHeight|innerWidth|focus|floats|linear|scrollWidth|isFunction|listStyle|150|oldOverflow|getHeightMinMax|leftUnit|140|240|onResize|dragHelper|distance|onslide|paddingTopUnit|165|getClient|1000|dragmoveByKey|images|auto|dragstart|easeout|borderLeftUnit|nr|createElement|emptyGIF|fold|itransferTo|mouseout|224|checkdrop|on|shc|hlt|filteredPosition|fontUnit|fadeIn|default|144|grow|highlight|borderTopUnit|fit|onDragStop|borderRightUnit|KhtmlUserSelect|trim|tooltipTitle|borderBottomUnit|onDragStart|remeasure||set|230|random|img|blur|DroppableDestroy|userSelect|paddingBottomUnit|addItem|wid|selectstart|cloneNode|SortableAddItem|check|Width|paddingRightUnit|selectedclass|setTimeout|xfrac|fracH|fracW|interfaceColorFX|maxy|isSelectable|styleFloat|parts|onout|topUnit|245|onhover|Droppable|nbsp|sortHelper|fxe|cssProps|zindex|after|insertBefore|offsetParent|colorCssProps|isSortable|yfrac|maxx|togglever|directions|match|paddingLeftUnit|togglehor|notColor|transparent|iBounce|selectcheckApply|vertical|107|finish|containerMaxy|se|horizontal|selectstopApply|keyCode|containerMaxx|charCode|caption|Right|tbody|letterSpacing|nextSibling|th|pink|fixPNG|Top|progid|colgroup|getPositionLite|centerEl|col||purgeEvents|tfoot|thead|td|lineHeight|textIndent|getPadding|borderBottomColor|borderLeftColor|outlineOffset|yellow|outlineWidth|DXImageTransform|Microsoft|AlphaImageLoader|pageX|white|clientY|silver|outlineColor|red|purple|tr|borderTopColor|clientX|borderRightColor|pageY|prototype|203|216|darkorange|darkorchid|form|table|ul|darkmagenta|darkolivegreen|ol|button|iframe|233|122|darkviolet|darksalmon|darkred|153|204|183|189|azure|aqua|appendChild|brown|blue|220|black|beige|cyan|cssFloat|darkgrey|darkgreen|darkkhaki||fxWrapper|darkcyan|darkblue|Bottom|textarea|148|optgroup|lightyellow|lime|meta|remove|182|193|removeChild|magenta|maroon|frame|script|orange|frameset|olive|navy|option|lightpink|lightgrey|green|indigo|130|215|gold|hr|fuchsia|khaki|lightblue|lightgreen|238|float|lightcyan|w_|173|input|header|SlideToggleUp|Slider|BlindRight|BlindToggleHorizontally|scrollTo||FoldToggle|BlindLeft||BlindToggleVertically|Puff|Number||BlindUp|BlindDown|Selectable|UnFold|Fold|DropOutDown|http|DropInDown|SlideInUp|SlideOutUp|fadeOut|||120|ResizableDestroy|Bounce|Resizable|SliderSetValues|SliderGetValues|elasticboth|elasticout|SwitchHorizontally|CloseHorizontally|SwitchVertically|9375|OpenVertically|CloseVertically|Sortable|easeboth|easein|Grow|SortSerialize|SortableDestroy|OpenHorizontally|mouseover|Left|before|click|bounceboth|elasticin|Shrink|ScrollToAnchors||Highlight|625|984375|onchange|childNodes|ToolTip|SlideInDown|DropOutRight|500|DropInRight|RegExp|selectorText||pt||DropToggleLeft|toUpperCase|DropInLeft|||transferHelper|TransferTo|100000000|rules|boxModel|||dashed|solid|dotted|isNaN|stopAll|double|groove|borderStyle|DropToggleRight|outset|inset|ridge|DropOutLeft|off|SlideOutLeft|SlideInLeft|SlideToggleLeft|SlideInRight|SlideOutRight|DropInUp|ondrop|array|SlideToggleDown|recallDroppables|DropToggleDown|DropOutUp|SlideToggleRight|number|DropToggleUp|sqrt|visible|fromHandler|MozUserSelect|mozUserSelect|onselectstart|khtml|moz|find|SlideOutDown|ondragstart'.split('|'),0,{}))
							var $j = new jQuery.noConflict();
							$j(document).ready(
								function()
								{
									// Toggle Single Portlet
									$j('a.toggle').click(function()
										{
											$j(this).parent('div').next('div').toggle();
											vis = $j(this).parent('div').next('div').css('display');
											if (vis == 'none')
											{
												$j(this).html('<img src="_design/aff_portlet.jpg" style="border: none" />');
											}
											else
											{
												$j(this).html('<img src="_design/reduit_portlet.jpg" style="border: none" />');
											}
											sauve_portlets();
											return false;
										}
									);

									// Invert All Portlets
									$j('a#all_invert').click(function()
										{
											$j('div.portlet_content').toggle();
											sauve_portlets();
											return false;
										}
									);

									// Expand All Portlets
									$j('a#all_expand').click(function()
										{
											$j('div.portlet_content:hidden').show();
											sauve_portlets();
											return false;
										}
									);

									// Collapse All Portlets
									$j('a#all_collapse').click(function()
										{
											$j('div.portlet_content:visible').hide();
											sauve_portlets();
											return false;
										}
									);

									// Open All Portlets
									$j('a#all_open').click(function()
										{
											$j('div.portlet:hidden').show();
											$j('a#all_open:visible').hide();
											$j('a#all_close:hidden').show();
											sauve_portlets();
											return false;
										}
									);

									// Close All Portlets
									$j('a#all_close').click(function()
										{
											$j('div.portlet:visible').hide();
											$j('a#all_close:visible').hide();
											$j('a#all_open:hidden').show();
											sauve_portlets();
											return false;
										}
									);
									// Controls Drag + Drop
									$j('#columns td').Sortable(
										{
											handle: 'div.portlet_topper',
											accept: 'portlet',
											helperclass: 'sort_placeholder',
											opacity: 0.7,
											tolerance: 'pointer',
											onStop: function () {sauve_portlets();}
										}
									);
								}
							);
						}
					}
					//return(xhr_object.responseText);
				}
			}
			else
			{
				return(false);
			}
		};
	}
	else
	{
		if (xhr_object.readyState == 4)
		{
			document.getElementById('chargement').style.display = "none";
			return(xhr_object.responseText);
		}
		else
		{
			return(false);
		}
	}
}

function initacc(num)
{
	window.addEvent('domready', function(){AccordionInit(num);});
}

function AccordionInit(num)
{
	/*if (!num)
	{
		num = 0;
	}*/
	var accordion = new Accordion('h3.atStart', 'div.atStart', {
		show: num,
		opacity: true,
		onActive: function(toggler, element){
			toggler.setStyle('color', '#FFFFFF');
		},
		onBackground: function(toggler, element){
			toggler.setStyle('color', '#666666');
		}
	}, $('accordion'));
}

function initSqueezBox()
{
	window.addEvent('domready', function() {

		SqueezeBox.initialize({
			size: {x: 350, y: 400},
			ajaxOptions: {
				method: 'get'
			}
		});


		$$('a.boxed').each(function(el) {
			el.addEvent('click', function(e) {
				new Event(e).stop();
				SqueezeBox.fromElement(el);
			});
		});

		$$('.panel-toggler').each(function(el) {
			var target = el.getLast().setStyle('display', 'none');
			el.getFirst().addEvent('click', function() {
				target.style.display = (target.style.display == 'none') ? '' : 'none';
			});
		});
	});
}

 function HTMLentities(texte)
 {
	texte = texte.replace(/"/g,'&quot;'); // 34 22
	texte = texte.replace(/&/g,'&amp;'); // 38 26
	texte = texte.replace(/\'/g,'&#39;'); // 39 27
	texte = texte.replace(/</g,'&lt;'); // 60 3C
	texte = texte.replace(/>/g,'&gt;'); // 62 3E
	texte = texte.replace(/\^/g,'&circ;'); // 94 5E
	texte = texte.replace(/‘/g,'&lsquo;'); // 145 91
	texte = texte.replace(/’/g,'&rsquo;'); // 146 92
	texte = texte.replace(/“/g,'&ldquo;'); // 147 93
	texte = texte.replace(/”/g,'&rdquo;'); // 148 94
	texte = texte.replace(/•/g,'&bull;'); // 149 95
	texte = texte.replace(/–/g,'&ndash;'); // 150 96
	texte = texte.replace(/—/g,'&mdash;'); // 151 97
	texte = texte.replace(/˜/g,'&tilde;'); // 152 98
	texte = texte.replace(/™/g,'&trade;'); // 153 99
	texte = texte.replace(/š/g,'&scaron;'); // 154 9A
	texte = texte.replace(/›/g,'&rsaquo;'); // 155 9B
	texte = texte.replace(/œ/g,'&oelig;'); // 156 9C
	texte = texte.replace(//g,'&#357;'); // 157 9D
	texte = texte.replace(/ž/g,'&#382;'); // 158 9E
	texte = texte.replace(/Ÿ/g,'&Yuml;'); // 159 9F
	// texte = texte.replace(/ /g,'&nbsp;'); // 160 A0
	texte = texte.replace(/¡/g,'&iexcl;'); // 161 A1
	texte = texte.replace(/¢/g,'&cent;'); // 162 A2
	texte = texte.replace(/£/g,'&pound;'); // 163 A3
	//texte = texte.replace(/ /g,'&curren;'); // 164 A4
	texte = texte.replace(/¥/g,'&yen;'); // 165 A5
	texte = texte.replace(/¦/g,'&brvbar;'); // 166 A6
	texte = texte.replace(/§/g,'&sect;'); // 167 A7
	texte = texte.replace(/¨/g,'&uml;'); // 168 A8
	texte = texte.replace(/©/g,'&copy;'); // 169 A9
	texte = texte.replace(/ª/g,'&ordf;'); // 170 AA
	texte = texte.replace(/«/g,'&laquo;'); // 171 AB
	texte = texte.replace(/¬/g,'&not;'); // 172 AC
	texte = texte.replace(/­/g,'&shy;'); // 173 AD
	texte = texte.replace(/®/g,'&reg;'); // 174 AE
	texte = texte.replace(/¯/g,'&macr;'); // 175 AF
	texte = texte.replace(/°/g,'&deg;'); // 176 B0
	texte = texte.replace(/±/g,'&plusmn;'); // 177 B1
	texte = texte.replace(/²/g,'&sup2;'); // 178 B2
	texte = texte.replace(/³/g,'&sup3;'); // 179 B3
	texte = texte.replace(/´/g,'&acute;'); // 180 B4
	texte = texte.replace(/µ/g,'&micro;'); // 181 B5
	texte = texte.replace(/¶/g,'&para'); // 182 B6
	texte = texte.replace(/·/g,'&middot;'); // 183 B7
	texte = texte.replace(/¸/g,'&cedil;'); // 184 B8
	texte = texte.replace(/¹/g,'&sup1;'); // 185 B9
	texte = texte.replace(/º/g,'&ordm;'); // 186 BA
	texte = texte.replace(/»/g,'&raquo;'); // 187 BB
	texte = texte.replace(/¼/g,'&frac14;'); // 188 BC
	texte = texte.replace(/½/g,'&frac12;'); // 189 BD
	texte = texte.replace(/¾/g,'&frac34;'); // 190 BE
	texte = texte.replace(/¿/g,'&iquest;'); // 191 BF
	texte = texte.replace(/À/g,'&Agrave;'); // 192 C0
	texte = texte.replace(/Á/g,'&Aacute;'); // 193 C1
	texte = texte.replace(/Â/g,'&Acirc;'); // 194 C2
	texte = texte.replace(/Ã/g,'&Atilde;'); // 195 C3
	texte = texte.replace(/Ä/g,'&Auml;'); // 196 C4
	texte = texte.replace(/Å/g,'&Aring;'); // 197 C5
	texte = texte.replace(/Æ/g,'&AElig;'); // 198 C6
	texte = texte.replace(/Ç/g,'&Ccedil;'); // 199 C7
	texte = texte.replace(/È/g,'&Egrave;'); // 200 C8
	texte = texte.replace(/É/g,'&Eacute;'); // 201 C9
	texte = texte.replace(/Ê/g,'&Ecirc;'); // 202 CA
	texte = texte.replace(/Ë/g,'&Euml;'); // 203 CB
	texte = texte.replace(/Ì/g,'&Igrave;'); // 204 CC
	texte = texte.replace(/Í/g,'&Iacute;'); // 205 CD
	texte = texte.replace(/Î/g,'&Icirc;'); // 206 CE
	texte = texte.replace(/Ï/g,'&Iuml;'); // 207 CF
	texte = texte.replace(/Ð/g,'&ETH;'); // 208 D0
	texte = texte.replace(/Ñ/g,'&Ntilde;'); // 209 D1
	texte = texte.replace(/Ò/g,'&Ograve;'); // 210 D2
	texte = texte.replace(/Ó/g,'&Oacute;'); // 211 D3
	texte = texte.replace(/Ô/g,'&Ocirc;'); // 212 D4
	texte = texte.replace(/Õ/g,'&Otilde;'); // 213 D5
	texte = texte.replace(/Ö/g,'&Ouml;'); // 214 D6
	texte = texte.replace(/×/g,'&times;'); // 215 D7
	texte = texte.replace(/Ø/g,'&Oslash;'); // 216 D8
	texte = texte.replace(/Ù/g,'&Ugrave;'); // 217 D9
	texte = texte.replace(/Ú/g,'&Uacute;'); // 218 DA
	texte = texte.replace(/Û/g,'&Ucirc;'); // 219 DB
	texte = texte.replace(/Ü/g,'&Uuml;'); // 220 DC
	texte = texte.replace(/Ý/g,'&Yacute;'); // 221 DD
	texte = texte.replace(/Þ/g,'&THORN;'); // 222 DE
	texte = texte.replace(/ß/g,'&szlig;'); // 223 DF
	texte = texte.replace(/à/g,'&aacute;'); // 224 E0
	texte = texte.replace(/á/g,'&aacute;'); // 225 E1
	texte = texte.replace(/â/g,'&acirc;'); // 226 E2
	texte = texte.replace(/ã/g,'&atilde;'); // 227 E3
	texte = texte.replace(/ä/g,'&auml;'); // 228 E4
	texte = texte.replace(/å/g,'&aring;'); // 229 E5
	texte = texte.replace(/æ/g,'&aelig;'); // 230 E6
	texte = texte.replace(/ç/g,'&ccedil;'); // 231 E7
	texte = texte.replace(/è/g,'&egrave;'); // 232 E8
	texte = texte.replace(/é/g,'&eacute;'); // 233 E9
	texte = texte.replace(/ê/g,'&ecirc;'); // 234 EA
	texte = texte.replace(/ë/g,'&euml;'); // 235 EB
	texte = texte.replace(/ì/g,'&igrave;'); // 236 EC
	texte = texte.replace(/í/g,'&iacute;'); // 237 ED
	texte = texte.replace(/î/g,'&icirc;'); // 238 EE
	texte = texte.replace(/ï/g,'&iuml;'); // 239 EF
	texte = texte.replace(/ð/g,'&eth;'); // 240 F0
	texte = texte.replace(/ñ/g,'&ntilde;'); // 241 F1
	texte = texte.replace(/ò/g,'&ograve;'); // 242 F2
	texte = texte.replace(/ó/g,'&oacute;'); // 243 F3
	texte = texte.replace(/ô/g,'&ocirc;'); // 244 F4
	texte = texte.replace(/õ/g,'&otilde;'); // 245 F5
	texte = texte.replace(/ö/g,'&ouml;'); // 246 F6
	texte = texte.replace(/÷/g,'&divide;'); // 247 F7
	texte = texte.replace(/ø/g,'&oslash;'); // 248 F8
	texte = texte.replace(/ù/g,'&ugrave;'); // 249 F9
	texte = texte.replace(/ú/g,'&uacute;'); // 250 FA
	texte = texte.replace(/û/g,'&ucirc;'); // 251 FB
	texte = texte.replace(/ü/g,'&uuml;'); // 252 FC
	texte = texte.replace(/ý/g,'&yacute;'); // 253 FD
	texte = texte.replace(/þ/g,'&thorn;'); // 254 FE
	texte = texte.replace(/ÿ/g,'&yuml;'); // 255 FF
	return texte;
}

function IE()
{
	return document.all;
}