/* - - - - - - - - - - - - - - - - - - - - - - -
 michal@bajer.net.pl
 2009-09-30
 - - - - - - - - - - - - - - - - - - - - - - - */
var xmlhttpList;
var timeRefreshView=60*1000;
var match=new Array();

function loadDataViews(id_newsa){
xmlhttpList=null;
if (window.XMLHttpRequest)
  {// code for Firefox, Opera, IE7, etc.
  xmlhttpList=new XMLHttpRequest();
  }
else if (window.ActiveXObject)
  {// code for IE6, IE5
  xmlhttpList=new ActiveXObject("Microsoft.XMLHTTP");
  }
if (xmlhttpList!=null)
  {
         xmlhttpList.onreadystatechange=stateChangeViews;
         xmlhttpList.open("GET",'/panel/plugins/newsy/ajax/views.php'+'?id_newsa='+id_newsa+'&sessid='+sessid+cmsUrlDatetime(),true);
         xmlhttpList.send(null);
         
  }
else
  {
  alert("Your browser does not support XMLHTTP.");
  }
}
function stateChangeViews()
{
if (xmlhttpList.readyState==4)
  {// 4 = "loaded"
  if (xmlhttpList.status==200)
    {// 200 = "OK"
            if (xmlhttpList.responseText.length==0||xmlhttpList.responseText=='null'){
                return;
            }//alert(xmlhttpList.responseText);
            _('views').innerHTML=xmlhttpList.responseText;

    }
  else
    {
    alert("Problem retrieving data:" + xmlhttpList.statusText);
    }
  }
}
