

      function getXmlHttp() {
        var xmlHttp;
        try {  // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
        } catch (e) {
          try {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
          } catch (e)  {
            try {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {
              alert("Your browser does not support AJAX!");
              return false;
            }
          }
        }
        return xmlHttp;
      }

      function sendMark(userId, movId, mark) {
        window.document.getElementById('mov'+movId+'_').style.visibility = 'hidden';
        xmlHttp = getXmlHttp();
        xmlHttp.onreadystatechange=function() {
          if(xmlHttp.readyState==4) {
            //alert("ok=" + xmlHttp.responseText);
            window.document.getElementById('marks_number').innerHTML = xmlHttp.responseText;

          }
        }
        url = 'mark.php?user_id=' + userId + '&movie_id=' + movId + '&mark=' + mark ;
        xmlHttp.open("GET", url, true);
        xmlHttp.send(null);

      }

