function MarkIt(url)
{
        alert("Váš hlas byl zaznamenán!");
     if (url != 0)
     {
        if (window.ActiveXObject)
        {
          httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
        }
        else
        {
          httpRequest = new XMLHttpRequest();
        }
        httpRequest.open("GET", url, true);
        //httpRequest.onreadystatechange= function () {processRequest(elem); } ;
        httpRequest.send(null);
      }
      else
      {

        document.getElementById(elem).innerHTML = "";
        
      }
}
function processRequest(elem)
{
  if (httpRequest.readyState == 4)
  {
    if(httpRequest.status == 200)
    {
      var Place = document.getElementById(elem);
      Place.innerHTML = httpRequest.responseText;
    }
    else
    {
        alert('Stala se chyba (kontaktuj admina) '+ httpRequest.status +":"+ httpRequest.statusText);
    }
  }
}
function MarkClearAll(){
    for(i=1; i<=7; i++){
        document.getElementById('mark-'+i).src = '/styly/image/hod-u.jpg';
    }
}
function MarkClear(){
    for(i=1; i<=7; i++){
        if(document.getElementById('mark-'+i).name ==''){
            document.getElementById('mark-'+i).src = '/styly/image/hod-u.jpg';
        }
        if(document.getElementById('mark-'+i).name =='half'){
            document.getElementById('mark-'+i).src = '/styly/image/hod-h.jpg';
        }
        if(document.getElementById('mark-'+i).name =='done'){
            document.getElementById('mark-'+i).src = '/styly/image/hod-a.jpg';
        }
    }
}
function MarkMouseOn(num){
    var i;
    MarkClearAll();
    for(i=1; i<=num; i++){
        document.getElementById('mark-'+i).src = '/styly/image/hod-o.jpg';
    }
}
