try{
    xmlhttp = new XMLHttpRequest();
}catch(ee){
    try{
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    }catch(e){
        try{
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }catch(E){
            xmlhttp = false;
        }
    }
}

function popup(x,n,w,h,s) {
   var l = ((window.screen.width  - w) / 2);
   var t = ((window.screen.height - h) / 2);
   janelinha = window.open(x,n,'leftmargin=-15,topmargin=-15,marginheight=0,marginwidth=0,toolbar=no,location=no,locationbar=no,directories=no,status=no,menubar=no,scrollbars='+s+',resizable=no,top='+t+',left='+l+',screenX='+l+',screenY='+t+',copyhistory=no,height='+h+',width='+w+'');
}

function save_hit(var1,var2){
   xmlhttp.open("GET", "save_hit?v1=" + var1 + '&v2=' + var2,true);
   xmlhttp.setRequestHeader('Content-Type','text/xml');
   xmlhttp.setRequestHeader('encoding','ISO-8859-1');
   xmlhttp.send(null);
}

function save_midia(var1){
   xmlhttp.open("GET", "save_midia?v1=" + var1,true);
   xmlhttp.setRequestHeader('Content-Type','text/xml');
   xmlhttp.setRequestHeader('encoding','ISO-8859-1');
   xmlhttp.send(null);
}
