function tog(id) {

 if(document.getElementById(id).style.display == 'none')
 {
  document.getElementById(id).style.display = 'block';
  document.getElementById('filtersimg').src= '/img/moins.jpg';

 }
 else
 {
  document.getElementById(id).style.display = 'none';
  document.getElementById('filtersimg').src= '/img/plus.jpg';
 }

}


function showPreview(imgname,imgurl) {
    var tempImage = new Image();
    tempImage.onload=function setImage() {document.getElementById(imgname).src = tempImage.src;}
    tempImage.src = imgurl;
}

function changemap(id,url,thetext,theclass) {
    refresh = new Image();
    refresh.src = url;
    document[id].src = refresh.src;
  if(thetext!='') {
    document.getElementById('textmap').innerHTML=thetext;
    document.getElementById('tablemap').className=theclass;
  }
    document.getElementById(id).src = url;
    showPreview(id, url);
}

function microAjax(url,cF){
this.bF=function(caller,object){
return function(){
return caller.apply(object,new Array(object));
}}
this.sC=function(object) {
if (this.r.readyState==4) {
this.cF(this.r.responseText);
}}
this.gR=function(){
if (window.ActiveXObject)
return new ActiveXObject('Microsoft.XMLHTTP');
else if (window.XMLHttpRequest)
return new XMLHttpRequest();
else
return false;
}
if (arguments[2]) this.pb=arguments[2];
else this.pb="";
this.cF=cF;
this.url=url;
this.r=this.gR();
if(this.r){
this.r.onreadystatechange=this.bF(this.sC,this);
if(this.pb!=""){
this.r.open("POST",url,true);
this.r.setRequestHeader('Content-type','application/x-www-form-urlencoded');
this.r.setRequestHeader('Connection','close');
}else{
this.r.open("GET",url,true);
}
this.r.send(this.pb);
}}


function opop(page,nom,option) {
    window.open(page,nom,option);
}
