/* gestion preload image */

var image_def = 1;    
function MM_preloadImages() { 
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}    
}  

/* fonction change image */
function changeImgAnnonce(srcImg){    
   
        document.images['big'].src = srcImg; 
}                                                    

function changeImgAnnonceMini(srcImg, bigimg){    
        document.images[bigimg].src = srcImg; 
}    

/* appel dic superpose */

function getHTML_div(namepage)
{                          
        document.getElementById("contenue_fen_superpose_1").innerHTML = ''; 
        var url = 'http://'+window.location.host+'/'+namepage;  
        var myAjax = new Ajax.Updater('contenue_fen_superpose_1', url, {method: 'get',parameters:''});                
        displaySubs('fen_superpose_1');
}

function stats_pack(idclient)
{
    var data = 'idclient='+idclient;
    try {
        // Firefox, Opera 8.0+, Safari
        xmlHttp=new XMLHttpRequest();}
      catch (e){
        // Internet Explorer
        try{
          xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}
        catch (e){
          try{
            xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}
          catch (e){
            alert("Votre navigateur ne supporte pas l'AJAX");
            return false;}
          }
        }
       
    xmlHttp.onreadystatechange=function()
    {
        if(xmlHttp.readyState==4)
        {
            if (xmlHttp.status == 200) 
            {
                
                document.getElementById('tel_none').style.display = 'none';
                document.getElementById('tel_display').style.display = 'block';
            }
        }    
    }
    xmlHttp.open("POST","http://"+window.location.host+"/maison/annonce_detail_stats_pack.php",true);
    xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    xmlHttp.send(data);
}