


function bye()
{ 


    var xhr; 
	var rep;
    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) 
               { rep= xhr.responseText; 
			   alert(rep);}
              else 
                {rep= "ERR " + xhr.status;}
				
		}
    }; 

   xhr.open( "GET", "o.php?cmd=bye",  true); 
   xhr.send(null); 
  
} 

function cleandb()
{ 

//alert('OK');
    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('dbcpt').innerHTML ="<span style='font-size:0.8em;color:#DDDDDD'>"+ xhr.responseText+"</span>"; 
              else 
            			document.getElementById('dbcpt').innerHTML = "<span style='font-size:0.8em;color:#DDDDDD'>"+"ERR " + xhr.status+"</span>";
 */ 
 }
		
    }; 

   xhr.open( "GET", "o.php?cmd=clean",  true); 
   xhr.send(null); 
} 

window.onunload = bye;


