function look4ghosts(){
    if((location.host=='www.constantvzw.org')|(location.host=='data.constantvzw.org')){
        if(currentItem<ar_history.length){
        //alert(currentItem);
        if(!(ar_history[currentItem].indexOf("id_rubrique")<0)){
        var g="http://"+location.host+"/site/spip.php?page=proxy_rubrique&"+ar_history[currentItem];}else if(!(ar_history[currentItem].indexOf("id_article")<0)){
        var g="http://"+location.host+"/site/spip.php?page=proxy_article&"+ar_history[currentItem];
}else if(!(ar_history[currentItem].indexOf("page")<0)){
        var g="http://"+location.host+"/site/spip.php?"+ar_history[currentItem];
}
        //alert(g);
	http.open('get', g);
	http.onreadystatechange = showResult; 
	http.send(null);}}
}

function showResult(){
        //alert(div_target);
	if(http.readyState == 4){ 
                  //alert('response is ready?');
	  	  var response = http.responseText;
                  //alert(response);
                  currentItem++;
                  if(currentItem<98){
                  var numLay=currentItem+1;
                  var layId="layer"+numLay;
                  //alert(layId);
                  document.getElementById(layId).innerHTML = response;
                  look4ghosts();
                  }
                  //look4ghosts();  
}
}

function exorcise(){
var LayId;
eraseCookie("ghost");
for(k=1;k<99;k++){
LayId="layer"+k;
document.getElementById(LayId).innerHTML="";
}
}
