var xmlhttp
       /*@cc_on @*/
       /*@if (@_jscript_version >= 5)
         try {
         xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")
        } catch (e) {
         try {
           xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
         } catch (E) {
          xmlhttp=false
         }
        }
       @else
        xmlhttp=false
       @end @*/
       if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
        try {
         xmlhttp = new XMLHttpRequest();
        } catch (e) {
         xmlhttp=false
        }
       }
       function myXMLHttpRequest() {
         var xmlhttplocal;
         try {
           xmlhttplocal= new ActiveXObject("Msxml2.XMLHTTP")
        } catch (e) {
         try {
           xmlhttplocal= new ActiveXObject("Microsoft.XMLHTTP")
         } catch (E) {
           xmlhttplocal=false;
         }
        }

       if (!xmlhttplocal && typeof XMLHttpRequest!='undefined') {
        try {
         var xmlhttplocal = new XMLHttpRequest();
        } catch (e) {
         var xmlhttplocal=false;
         alert('couldn\'t create xmlhttp object');
        }
       }
       return(xmlhttplocal);
}

function handleResponse() {
  if(xmlhttp.readyState == 4){
              if (xmlhttp.status == 200){
                    var response = xmlhttp.responseText;
              }
    }
}

function lesson_click(id, user, where, promo) {
    random_number=parseInt(Math.random()*99999999);
    xmlhttp.open('get', '/click.php?what=lesson&id='+id+'&user='+user+'&where='+where+'&promo='+promo+'&r='+random_number);
    xmlhttp.onreadystatechange = handleResponse;
    xmlhttp.send(null);
}

