
/*
PHP/AjaX By 0ri0n
*/
/*ZONE COMMENTAIRES EN AJAX
*/
pagesokcommentaires = new Array;
pagesokcommentaires['commentaires.php'] = 'commentaires.php';

	function updatePagecommentaires(divchoix, url, idarticle){
if(pagesokcommentaires[url]){ 
	

	  var zonepage = document.getElementById('divAjax' + divchoix + idarticle);
        zonepage.innerHTML = '<p><img src="images/loading.gif" width="31" height="31"></p><p class="Style2">Chargement...</p>';
		
		///Url avec un anti cache ie
		var urlcompletecommentaires = pagesokcommentaires[url] + "?idart=" + idarticle + '&anticache='+(new Date().getTime()) ;
	
		
	new Ajax.Updater('divAjax' + divchoix  + idarticle ,urlcompletecommentaires,{method: 'GET', evalScripts: true} );
	
		
}		
	}
	
/* /////////////////////////////////////// */	

	function updatePagesondage(idarticle, type, contenu){



	  var zonepage = document.getElementById('divAjaxsondage' + idarticle);
        zonepage.innerHTML = '<p><img src="images/loading.gif" width="31" height="31"></p><p class="Style2">Chargement...</p>';
		
///Url avec un anti cache ie

var urlcompletesondage = "traitement_sondage.php" + "?type=" + type + "&note=" + contenu + "&idart=" + idarticle + '&anticache='+(new Date().getTime()) ;
		
	new Ajax.Updater('divAjaxsondage' + idarticle ,urlcompletesondage,{method: 'GET', evalScripts: true} );
	
		
}		
	
	
/* /////////////////////////////////////// */	

///MET A JOUR LES RESULTATS





////


///Vider la div	
function viderdiv(divchoix){
 var zonepage = document.getElementById(divchoix);
 zonepage.innerHTML = "";
}

function vote_confirme(idsondage, idvote, vote){
	
 var confirme = document.getElementById('choix' + idsondage);
 confirme.innerHTML = 'Choix : ' + vote ;
 location.href= '#valider'+ idsondage ;
 
 var formulaire = "sondage_avance" + idsondage ;
 
  
 document.forms[formulaire].id_a_voter.value= idvote;

/*document.getElementById('form108').value = true;*/
}


/* /////////////////////////////////////// */	

	function vote_sondage_avance(idsondage, idvote){



	  var zonepage = document.getElementById('divAjaxsondageavance' + idsondage);
        zonepage.innerHTML = '<p><img src="images/loading.gif" width="31" height="31"></p><p class="Style2">Chargement...</p>';
		
///Url avec un anti cache ie

var urlcompletesondage = "traitement_sondage_avance.php" + "?id_sondage=" + idsondage + "&id_vote=" + idvote + '&anticache='+(new Date().getTime()) ;
		
	new Ajax.Updater('divAjaxsondageavance' + idsondage ,urlcompletesondage,{method: 'GET', evalScripts: true} );
	
		
}		
	
	
function resultats_sondage_avance(idsondage) {
	var zonepage = document.getElementById('divAjaxresultatssondageavance' + idsondage);
	zonepage.innerHTML = '<p><img src="images/loading.gif" width="31" height="31"></p><p class="Style2">Chargement...</p>';
	var urlcompletesondage = "sondage_avance.php"  + "?id_sondage=" + idsondage + '&anticache='+(new Date().getTime()) ;
		
	new Ajax.Updater('divAjaxresultatssondageavance' + idsondage ,urlcompletesondage,{method: 'GET', evalScripts: true} );
}
	
/* /////////////////////////////////////// */	

