var xmlHttp;
function vratiprogram(str)
{

if( str == 'veceras'  )
{
  document.getElementById('prog').style.backgroundColor="#FFFFFF";
  document.getElementById('prog2').style.backgroundColor="#999999";
  
}
else
{  
  document.getElementById('prog').style.backgroundColor="#999999";
  document.getElementById('prog2').style.backgroundColor="#FFFFFF";
  
}

xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Browser does not support HTTP Request");
  return;
  } 
var url="/ajax/tvodic/q/"+str;
url=url+"/sid/"+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.setRequestHeader("Content-Type", "text/plain;charset=UTF-8");
xmlHttp.send(null);
} 

function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("belt").innerHTML = xmlHttp.responseText;
 }
if(xmlHttp.readyState==3 || xmlHttp.readyState==2 )
 {
 document.getElementById("belt").style.left="0px";
 document.getElementById("belt").innerHTML='<div class="panel" style="width: 680px;"><img src="/images/ajax.gif" style="margin: 80px 300px;"></img></div>';
 }   
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 // Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}