// JavaScript Document

/* 
 SCRIPT EDITE SUR L'EDITEUR JAVASCRIPT
 http://www.editeurjavascript.com

 
 if(!document.all && document.getElementById)
 var ejs_hauteur = window.innerHeight-300;

 document.write('<style type="text/css">\n');
 document.write('#ejs_slide_box ');
 document.write('	{');
 document.write('	position:absolute;');
 document.write('	-moz-border-radius: 20px;');
 document.write('	width:280px;');
 document.write('	height:270px;');
 document.write('	top:'+ejs_hauteur+'px;');
 document.write('	left:-260px;');
 document.write('	background-color:#ffffff;');
 document.write('	border-color:#000000;');
 document.write('	border-width:3px;');
 document.write('	border-style:solid;');
 document.write('	z-index:100;');
 document.write('	}\n');
 
 document.write('#ejs_slide_bouton ');
 document.write('	{');
 document.write('	position:absolute;');
 document.write('        color:#ffffff;');
 document.write('	-moz-border-radius: 20px;');
 document.write('	top:30px;');
 document.write('	left:270px;');
 document.write('	background-color:#000000;');
 document.write('	font-family:arial;');
 document.write('	font-weight:bold;');
 document.write('	font-size:15px;');
 document.write('	z-index:100;');
 document.write('	}\n');
 
 document.write('#ejs_slide_image ');
 document.write('	{');
 document.write('	position:relative;');
 document.write('	-moz-border-radius: 20px;');
 document.write('	top:7px;');
 document.write('	left:7px;');
 document.write('	z-index:100;');
 document.write('	}\n');
 
 document.write('.ejs_slide_blanc\n');
 document.write('	{\n');
 document.write('	color:#ffffff;');
 document.write('	font-family:arial;');
 document.write('	font-weight:bold;');
 document.write('	font-size:15px;');
 document.write('	text-decoration:none;');
 document.write('	}');
 document.write('</style>');
 
 var slide_tempo;
 var slide_url_image = 'http://www.chanceo.com/pub/bonneannee.jpg';
 var slide_url_click = 'http://www.chanceo.com';
 var slide_x = -260;
 var slide_ismoving = false;
 var slide_first = true;
 
 function slide_start()
 	{
 	if(slide_x == -260 && !slide_ismoving)
 		slide_deballe();
 	else if(!slide_ismoving)
 		slide_remballe();
 	}
 
 function slide_deballe()
 	{
 	slide_ismoving = true;
 	if(slide_x < 10)
 		{
 		slide_x += 5;
 		slide_move();
 		setTimeout("slide_deballe()", 10);
 		}
 	else
 		{
 		slide_ismoving = false;
 		if(slide_first)
 			slide_tempo = setTimeout("slide_start()", 5000);
 		slide_first = false;
 		}	
 	}
 
 function slide_remballe()
 	{
 	clearTimeout(slide_tempo);
 	slide_ismoving = true;
 	if(slide_x > -260)
 		{
 		slide_x -= 5;
 		slide_move();
 		setTimeout("slide_remballe()", 10);
 		}
 	else
 		slide_ismoving = false;
 	}
 
 function slide_move()
 	{
 	if(document.getElementById)
 		{
 		document.getElementById("ejs_slide_box").style.left=slide_x+'px';
 		}
 	}
 
 function slide_close()
 	{
 	if(document.getElementById)
 		{
 		document.getElementById("ejs_slide_box").innerHTML = '';
 		document.getElementById("ejs_slide_box").style.top = -100;
 		document.getElementById("ejs_slide_box").style.left = -100;
 		document.getElementById("ejs_slide_box").style.width = 1;
 		document.getElementById("ejs_slide_box").style.height = 1;
 		}
 	}
 
 window.onload = slide_start;
 
 document.write('<div id="ejs_slide_box">');
 document.write('<div id="ejs_slide_image">');
 document.write('<a href="'+slide_url_click+'" target="_blank"><img src="'+slide_url_image+'" border="0" alt="" /></a>');
 document.write('</div>');
 document.write('<div id="ejs_slide_bouton"><a href="#" onclick="slide_start();this.blur();return(false)" class="ejs_slide_blanc">><br /><</a><br /><a href="#" onclick="slide_close();return(false)" class="ejs_slide_blanc">x</a></div>');
 document.write('</div>');
 */ 
function CalcKeyCode(aChar) {
  var character = aChar.substring(0,1);
  var code = aChar.charCodeAt(0);
  return code;
}

function checkNumber(val) {
  var strPass = val.value;
  var strLength = strPass.length;
  var lchar = val.value.charAt((strLength) - 1);
  var cCode = CalcKeyCode(lchar);


  if (cCode < 48 || cCode > 57 ) {
    var myNumber = val.value.substring(0, (strLength) - 1);
    val.value = myNumber;
  }
  return false;
}
/*
function seeAlphabet(evt) {
        var keyCode = evt.which ? evt.which : evt.keyCode;
        var interdit = ' ABCDEFGHIJKLMNOPQRSTUVWXYZàâäãçéèêëìîïòôöõùûüñ&*?!:;,\t#~"^¨%$£?²¤§%*()[]{}<>|\\/`=%µ°+\'\.';
        if (interdit.indexOf(String.fromCharCode(keyCode)) >= 0) {
                return false;
        }
}
*/

function cpseudo(evt) {
var touche = evt.which ? evt.which : evt.keyCode;//pour savoir s'il s'agit de Msie ou de 
var reg = /^[a-z0-9@_-]$/gi
var decision = reg.exec(String.fromCharCode(touche));
if(decision === null){
return false;
}
/*
var texte = document.getElementById("identifiant").value;
var exp_reg = /[a-z0-9*]/gi;
var resultat = texte.match(exp_reg);
//alert(resultat);
for(var i=1; resultat!=null && i<resultat.length ; i++){
    if(i < 2){
	}else{
//	alert(i);
	return false;
	}
} 
*/
}

function cmdp(evt) {
var touche = evt.which ? evt.which : evt.keyCode;//pour savoir s'il s'agit de Msie ou de 
var reg = /^[a-z0-9.@]$/
var decision = reg.exec(String.fromCharCode(touche));
if(decision === null){
return false;
}
}

function cmail(evt) {
var touche = evt.which ? evt.which : evt.keyCode;//pour savoir s'il s'agit de Msie ou de 
var reg = /^[a-z0-9.\.@_-]$/
var decision = reg.exec(String.fromCharCode(touche));
if(decision === null){
return false;
}
}

function divdroite(hauteur,largeur) {
var site=parseInt("750");
var screenwidth=screen.width;
var difX = (parseInt(screenwidth) - parseInt(site));
var posplusX=(parseInt(difX)/parseInt("2")); 
var posX = (parseInt(site) + parseInt(posplusX));
var posY="0px"; 
document.getElementById('flash').style.left=posX+"px";
document.getElementById('flash').style.top=posY;
document.getElementById("flash").style.visibility = "visible";
}

function visiteprofil(){
//slide_deballe();
var url = 'detectervisiteprofil.php';
httpRequest = false;
httpRequest = new XMLHttpRequest();
if (httpRequest){
httpRequest.open("GET", url, true);
httpRequest.send(null);
httpRequest.onreadystatechange = function(){
if (httpRequest.readyState == 4 && httpRequest.status == 200){
var retourne = httpRequest.responseText;
alertemessage(retourne);
}
}
}
setTimeout('visiteprofil();', 8000);
}

function alertemessage(action){
	var larg = "120";
	var haut = "150";

	var alerteprofil = '';
		alerteprofil = "<TABLE CELLSPACING=2 CELLPADDING=2 WIDTH="+larg+" HEIGHT="+haut+"><TR><TD bgcolor=#CC0000>"+action+"</TD><TD>&nbsp;</TD></TR></TABLE>";	
	var  texteretourne = alerteprofil;			

	
	if(document.getElementById){
		document.getElementById("flash").innerHTML = texteretourne;
		document.getElementById("flash").style.display = "block";
		divdroite(haut,larg);
		setTimeout("fermermessage()",5000);
		}
	divdroite(haut,larg);
	}

function fermermessage(){
	if(document.getElementById){
		document.getElementById('flash').style.width = '1';
		document.getElementById('flash').style.height = '1';
		document.getElementById('flash').innerHTML = '';
		}
	}
	
function infos(alerte){
	var url = 'infos.php';
	httpRequest = false;
	httpRequest = new XMLHttpRequest();
	if (httpRequest){
	httpRequest.open("GET", url+"?info="+alerte, true);
	httpRequest.send(null);
	httpRequest.onreadystatechange = function(){
	if (httpRequest.readyState == 4 && httpRequest.status == 200){
	var retourne = httpRequest.responseText;
	}
	}
	}
}

function fmembre()
{
	document.getElementById("membres").innerHTML='<p><center><img src="http://www.chanceo.com/ajax-loader.gif" width="100" height="100"/></center></p>';

	var url="http://www.chanceo.com/fmembre.php";
	var xhr_object = null;
	   if(window.XMLHttpRequest)  xhr_object = new XMLHttpRequest();
	  else
	    if (window.ActiveXObject)  xhr_object = new ActiveXObject("Microsoft.XMLHTTP"); 

	xhr_object.open("GET", url, true);
	xhr_object.onreadystatechange = function(){
	if ( xhr_object.readyState == 4 )
	{
		document.getElementById("membres").innerHTML = xhr_object.responseText;
	}
	}
	xhr_object.send(null);
}

function fmembrevip()
{
	document.getElementById("membres").innerHTML='<p><center><img src="http://www.chanceo.com/ajax-loader.gif" width="100" height="100"/></center></p>';

	var url="http://www.chanceo.com/fmembrevip.php";
	var xhr_object = null;
	   if(window.XMLHttpRequest)  xhr_object = new XMLHttpRequest();
	  else
	    if (window.ActiveXObject)  xhr_object = new ActiveXObject("Microsoft.XMLHTTP"); 

	xhr_object.open("GET", url, true);
	xhr_object.onreadystatechange = function(){
	if ( xhr_object.readyState == 4 )
	{
		document.getElementById("membres").innerHTML = xhr_object.responseText;
	}
	}
	xhr_object.send(null);
}
function vmembre(){	
var membre=document.getElementById("identif").value;
var mdp=document.getElementById("pass").value;
document.getElementById("membres").innerHTML='<p><center><img src="http://www.chanceo.com/ajax-loader.gif" width="100" height="100"/></center></p>';

var datas=membre+"@"+mdp;
var reponse='';
var xmlhttp = false;
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined')
  {
     try
     {
        xmlhttp = new XMLHttpRequest();
     }
     catch (e)
     {
        xmlhttp = false;
     }
  }

  if (xmlhttp)
  {
     xmlhttp.onreadystatechange=function()
     {
        if (xmlhttp.readyState == 4) 
        {
           if (xmlhttp.status == 200) 
           {
				reponse=xmlhttp.responseText;
				if(reponse == "valid"){
				document.location='http://www.chanceo.com/prive';
				}else{
				document.getElementById("membres").innerHTML=reponse;
				}
           }
        }
     }
  }
xmlhttp.open("POST", "http://www.chanceo.com/identification.php",true);
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
xmlhttp.send("donnees="+datas);
return xmlhttp;
}

function vmembrevip(){	
var membre=document.getElementById("identif").value;
var mdp=document.getElementById("pass").value;
document.getElementById("membres").innerHTML='<p><center><img src="http://www.chanceo.com/ajax-loader.gif" width="100" height="100"/></center></p>';

var datas=membre+"@"+mdp;
var reponse='';
var xmlhttp = false;
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined')
  {
     try
     {
        xmlhttp = new XMLHttpRequest();
     }
     catch (e)
     {
        xmlhttp = false;
     }
  }

  if (xmlhttp)
  {
     xmlhttp.onreadystatechange=function()
     {
        if (xmlhttp.readyState == 4) 
        {
           if (xmlhttp.status == 200) 
           {
				reponse=xmlhttp.responseText;
				if(reponse == "valid"){
				document.location='http://www.chanceo.com/vip-members.php';
				}else{
				document.getElementById("membres").innerHTML=reponse;
				}
           }
        }
     }
  }
xmlhttp.open("POST", "http://www.chanceo.com/identificationvip.php",true);
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
xmlhttp.send("donnees="+datas);
return xmlhttp;
}

function clique(data){	
document.getElementById("membres").innerHTML='<p><center><img src="http://www.chanceo.com/ajax-loader.gif" width="100" height="100"/></center></p>';
var reponse='';
var xmlhttp = false;
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined')
  {
     try
     {
        xmlhttp = new XMLHttpRequest();
     }
     catch (e)
     {
        xmlhttp = false;
     }
  }

  if (xmlhttp)
  {
     xmlhttp.onreadystatechange=function()
     {
        if (xmlhttp.readyState == 4) 
        {
           if (xmlhttp.status == 200) 
           {
				reponse=xmlhttp.responseText;
				if(reponse == "valid"){
				document.getElementById("membres").innerHTML=reponse;
				redirection(data);
				}
           }
        }
     }
  }
xmlhttp.open("POST", "http://www.chanceo.com/clique.php",true);
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
xmlhttp.send("donnees="+data);
return xmlhttp;
}

function redirection(page){
window.location.replace(page);	
}

function finscription()
{
	document.getElementById("accroche").innerHTML='<p><center><img src="http://www.chanceo.com/ajax-loader.gif" width="100" height="100"/></center></p>';

	var url="http://www.chanceo.com/finscription.php";
	var xhr_object = null;
	   if(window.XMLHttpRequest)  xhr_object = new XMLHttpRequest();
	  else
	    if (window.ActiveXObject)  xhr_object = new ActiveXObject("Microsoft.XMLHTTP"); 

	xhr_object.open("GET", url, true);
	xhr_object.onreadystatechange = function(){
	if ( xhr_object.readyState == 4 )
	{
		document.getElementById("accroche").innerHTML = xhr_object.responseText;
	}
	}
	xhr_object.send(null);

}

function verificationpseudo(identifiant){	
var data=identifiant;
var reponse='';
var xmlhttp = false;
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined')
  {
     try
     {
        xmlhttp = new XMLHttpRequest();
     }
     catch (e)
     {
        xmlhttp = false;
     }
  }

  if (xmlhttp)
  {
     xmlhttp.onreadystatechange=function()
     {
        if (xmlhttp.readyState == 4) 
        {
           if (xmlhttp.status == 200) 
           {
				reponse=xmlhttp.responseText;
				document.getElementById("erpseudo").innerHTML=reponse;
           }
        }
     }
  }
xmlhttp.open("POST", "http://www.chanceo.com/choixpseudo.php",true);
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
xmlhttp.send("choix="+data);
return xmlhttp;
}

function verifpass(passw){
	if(passw.length < 8){
		document.getElementById("erpass").innerHTML="* 8 CARACTERES";	
	}else{
		document.getElementById("erpass").innerHTML="* PASSWORD OK";	
	}
}

function verificationmail(email){	
var data=email;
var reponse='';
var xmlhttp = false;
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined')
  {
     try
     {
        xmlhttp = new XMLHttpRequest();
     }
     catch (e)
     {
        xmlhttp = false;
     }
  }

  if (xmlhttp)
  {
     xmlhttp.onreadystatechange=function()
     {
        if (xmlhttp.readyState == 4) 
        {
           if (xmlhttp.status == 200) 
           {
				reponse=xmlhttp.responseText;
				document.getElementById("ermail").innerHTML=reponse;
           }
        }
     }
  }
xmlhttp.open("POST", "http://www.chanceo.com/choixemail.php",true);
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
xmlhttp.send("choix="+data);
return xmlhttp;
}

function file(fichier){
	if(window.XMLHttpRequest) // FIREFOX
		xhr_object = new XMLHttpRequest();
	else if(window.ActiveXObject) // IE
		xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
	else
		return(false);
		xhr_object.open("GET", fichier, false);
		xhr_object.send(null);
	if(xhr_object.readyState == 4) return(xhr_object.responseText);
	else return(false);
}

function verificationform(){
	document.getElementById("animenregistrement").innerHTML='<p><center><img src="http://www.chanceo.com/ajax-loader.gif" width="100" height="100"/></center></p>';	
var increment = "1";
var valeurradio = "";
var radiobtn = document.getElementsByName("sexe");
var checked = false;
for (var cptr = 0 ; (cptr < radiobtn.length) && !checked ; cptr++) {
	if(radiobtn[cptr].checked){
		valeurradio = radiobtn[cptr].value;
		checked = true;
		break;
		}
	}
	
var identite = document.getElementById("identifiant").value;
var pass = document.getElementById("motdepasse").value;
var mail = document.getElementById("email").value;
/*
	if (mail.search(/^[_a-z0-9-]+(.[_a-z0-9-]+)*[^._-]@[a-z0-9-]+(.[a-z0-9]{2,4})*$/) == -1){ 
      alert ('entrez une adresse Email valide'); 
	  calque.className= "erreur"; 
	  increment--;
	}
*/
var day = document.getElementById("jour").value;
var month = document.getElementById("mois").value;
var year = document.getElementById("annee").value;
var country =document.getElementById("pays").value;

var valeurradioa = "";
var radiobtna = document.getElementsByName("relation");
var checked = false;
for (var cptra = 0 ; (cptra < radiobtna.length) && !checked ; cptra++) {
	if(radiobtna[cptra].checked){
		valeurradioa = radiobtna[cptra].value;
		checked = true;
		break;
		}
	}
	
var valeurradiob = "";
var radiobtnb = document.getElementsByName("profil");
var checked = false;
for (var cptrb = 0 ; (cptrb < radiobtnb.length) && !checked ; cptrb++) {
	if(radiobtnb[cptrb].checked){
		valeurradiob = radiobtnb[cptrb].value;
		checked = true;
		break;
		}
	}

	var valeurcase = "";
	var casebtn = document.getElementsByName("cgi");
	var casechecked = false;
		
	for (var cpt = 0; cpt < casebtn.length; cpt++)
	{
	if(casebtn[cpt].checked){
		valeurcase = casebtn[cpt].value;
		checked = true;
		break;
		}
	}
	
if(valeurradio.length < 1){
var calque = document.getElementById("ersexe");
calque.className= "erreur"; 
}else{
var calque = document.getElementById("ersexe");
calque.className= "intitulechamps";
increment++;
}

if(identite.length < 3){
var calque = document.getElementById("erpseudo");
calque.className= "erreur"; 
}else{
var calque = document.getElementById("erpseudo");
calque.className= "intitulechamps";
increment++;
}

if(pass.length < 6){
var calque = document.getElementById("erpass");
calque.className= "erreur"; 
}else{
var calque = document.getElementById("erpass");
calque.className= "intitulechamps";
increment++;
}

if(mail.length < 6){
var calque = document.getElementById("ermail");
calque.className= "erreur"; 
}else{
var calque = document.getElementById("ermail");
calque.className= "intitulechamps";
increment++;
}

if(day == "jour"){
var calque = document.getElementById("erdatenaiss");
var calquea = document.getElementById("erjour");
calque.className= "erreur";
calquea.className= "erreur"; 
}else{
var calque = document.getElementById("erdatenaiss");
var calquea = document.getElementById("erjour");
calque.className= "intitulechamps";
calquea.className= "intitulechamps";
increment++;
}

if(month== "mois"){
var calque = document.getElementById("erdatenaiss");
var calquea = document.getElementById("ermois");
calque.className= "erreur";
calquea.className= "erreur"; 
}else{
var calque = document.getElementById("erdatenaiss");
var calquea = document.getElementById("ermois");
calque.className= "intitulechamps";
calquea.className= "intitulechamps";
increment++;
}

if(year == "annee"){
var calque = document.getElementById("erdatenaiss");
var calquea = document.getElementById("erannee");
calque.className= "erreur";
calquea.className= "erreur"; 
}else{
var calque = document.getElementById("erdatenaiss");
var calquea = document.getElementById("erannee");
calque.className= "intitulechamps";
calquea.className= "intitulechamps";
increment++;
}

if(country == "pays"){
var calque = document.getElementById("erpays");
calque.className= "erreur"; 
}else{
var calque = document.getElementById("erpays");
calque.className= "intitulechamps";
increment++;
}

if(valeurradioa.length < 1){
var calque = document.getElementById("ertyperelation");
calque.className= "erreur"; 
}else{
var calque = document.getElementById("ertyperelation");
calque.className= "intitulechamps";
increment++;
}

if(valeurradiob.length < 1){
var calque = document.getElementById("erprofil");
calque.className= "erreur"; 
}else{
var calque = document.getElementById("erprofil");
calque.className= "intitulechamps";
increment++;
}

if(valeurcase.length < 1){
var calque = document.getElementById("erconditions");
calque.className = "erreur"; 
}else{
var calque = document.getElementById("erconditions");
calque.className = "intitulechamps";
increment++;
}

var data = valeurradio+","+identite+","+pass+","+mail+","+day+","+month+","+year+","+country+","+valeurradioa+","+valeurradiob+","+valeurcase;

	if(increment == "12"){
		var calqueb = document.getElementById("erinsc");
		calqueb.className = "intitulechampssecret";
		if(texteconfirm = file('verif.php?infos='+escape(data))){
			document.getElementById("enregistrement").innerHTML = texteconfirm;
			document.getElementById("animenregistrement").innerHTML='';
		}
	}else{
		document.getElementById("animenregistrement").innerHTML='';
		var calqueb = document.getElementById("erinsc");
		calqueb.className = "erreur";
	}
}

function validationinsc(data){
	document.getElementById("enregistrement").innerHTML='<p><center><img src="http://www.chanceo.com/ajax-loader.gif" width="100" height="100"/></center></p>';
	var recep=unescape(data);
		if(texteconfirm = file('fvinscription.php?envoi='+escape(recep))){
			document.getElementById("enregistrement").innerHTML = texteconfirm;
			Init();
		}	
}

function corrigerinsc(){
	alert("fonction non applicable\nVeuillez utilisez F5 merci");
}


        var valeur_origine = 10;
        var valeur = valeur_origine
        var x;
        function Init(){
                window.document.getElementById('compteur').value=valeur;
                x = window.setInterval('Decompte()', 1000);
        }

        function Decompte(){
              var tempspasse =  (window.document.getElementById('compteur').value = --valeur);
             if(tempspasse == 0){
             document.location='valider.php';
             }
        }

function ncode(){
	document.getElementById("validationmail").innerHTML='<p><center><img src="http://www.chanceo.com/ajax-loader.gif" width="100" height="100"/></center></p>';
			if(clickconfirm = file('fcode.php')){
			document.getElementById("validationmail").innerHTML = clickconfirm;
		}	
}

function validationcode(){
	var donnees = document.getElementById("confirmemail").value;
		if(texteconfirm = file('fvcode.php?envoi='+escape(donnees))){
			document.getElementById("validationmail").innerHTML='<p><center><img src="http://www.chanceo.com/ajax-loader.gif" width="100" height="100"/></center></p>';	
			document.getElementById("validationmail").innerHTML = texteconfirm;
		}	
}

function formmail(){
	document.getElementById("validationmail").innerHTML='<p><center><img src="http://www.chanceo.com/ajax-loader.gif" width="100" height="100"/></center></p>';
			if(clickconfirm = file('fvalidationmail.php')){
			document.getElementById("validationmail").innerHTML = clickconfirm;
		}	
}

function validationmail(){
	var code = document.getElementById("confirmcode").value;
	var mail = document.getElementById("confirmemail").value;
	var donnees = code+","+mail;
	document.getElementById("validationmail").innerHTML='<p><center><img src="http://www.chanceo.com/ajax-loader.gif" width="100" height="100"/></center></p>';
		if(clickconfirm = file('fvvalidationmail.php?envoi='+escape(donnees))){
			document.getElementById("validationmail").innerHTML = clickconfirm;
		}	
}

function annulervalidation(){
	document.getElementById("validationmail").innerHTML='<p><center><img src="http://www.chanceo.com/ajax-loader.gif" width="100" height="100"/></center></p>';
	document.getElementById("validationmail").innerHTML='<div id="aligndroite"><input class="corrige" type="button" Onclick="javascript:ncode();" value="Demander nouveau code"><input class="bouton" type="button" Onclick="javascript:formmail();" value="Confirmer l\'inscription"></div>';
}

function vote(id, vote, idvote)
{
	if(vote == "n"){
	afficher('','veux plus voir',idvote);	
	}else{
	afficher('','top canon',idvote);
	}
	return true;
}

function afficher(action,contenu,idvote){	
var nombre = idvote;
 	document.getElementById('bulle'+idvote).innerHTML = contenu;
	document.getElementById('bulle'+idvote).style.visibility = "visible";
	document.getElementById('bulle'+idvote).style.display = "block";
	document.getElementById('boutons'+idvote).style.visibility = "hidden";
	document.getElementById('boutons'+idvote).style.display = "none";
	setTimeout('cacher(' + nombre + ')', 1000);
} 

function cacher(idvote){
	document.getElementById('bulle'+idvote).innerHTML = "";
	document.getElementById('bulle'+idvote).style.visibility = "hidden";
	document.getElementById('bulle'+idvote).style.display = "none";
	document.getElementById('boutons'+idvote).style.visibility = "visible";
	document.getElementById('boutons'+idvote).style.display = "block";
 }

function votea(id, vote, idvote)
{
	if(vote == "n"){
	affichera('','veux plus voir',idvote);	
	}
	if(vote == "o"){
	affichera('','top canon',idvote);
	}
	return true;
}

function affichera(action,contenu,idvote){	
var nombre = idvote;
 	document.getElementById('bullea'+idvote).innerHTML = contenu;
	document.getElementById('bullea'+idvote).style.visibility = "visible";
	document.getElementById('bullea'+idvote).style.display = "block";
	document.getElementById('boutonsa'+idvote).style.visibility = "hidden";
	document.getElementById('boutonsa'+idvote).style.display = "none";
	setTimeout('cachera(' + nombre + ')', 1000);
} 

function cachera(idvote){
	document.getElementById('bullea'+idvote).innerHTML = "";
	document.getElementById('bullea'+idvote).style.visibility = "hidden";
	document.getElementById('bullea'+idvote).style.display = "none";
	document.getElementById('boutonsa'+idvote).style.visibility = "visible";
	document.getElementById('boutonsa'+idvote).style.display = "block";
 }
 
 function bookmark(url,title){
  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
  window.external.AddFavorite(url,title);
  } else if (navigator.appName == "Netscape") {
    window.sidebar.addPanel(title,url,"");
  } else {
    alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
  }
}