﻿function goPublication(x,y){
//document.getElementById(y).style.color="#454545";
for(i=1;i<5;i++){
temp="li"+i;
if(temp==y){document.getElementById(y).className="active";}
else{document.getElementById(temp).className="rien";}
}
var xhr; 
try {xhr = new ActiveXObject('Msxml2.XMLHTTP');}
catch (e){
try {xhr = new ActiveXObject('Microsoft.XMLHTTP');}
catch (e2){
try {xhr = new XMLHttpRequest();}
catch (e3){xhr = false;}
}}
 
xhr.onreadystatechange  = function(){ 
if(xhr.readyState  == 4){
if(xhr.status  == 200){
document.getElementById("toscroll").innerHTML=xhr.responseText; 
$(function() { $('#toscroll').jScrollPane({wheelSpeed:60}); });
}else{
document.ajax.dyn="Error code " + xhr.status;
}}}; 
addr="php/appelPublications.php?publication="+x
xhr.open( "POST", addr,  true); 
xhr.send(null); 
}


