var xmlHttp;

/* Functions */

function zhlednuti(tmp_url)
{
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 }
var url="/ajax/video_pridat_zhlednuti.php";
url=url+tmp_url;

//ctlName = "zdroj_banner";

     xmlHttp.onreadystatechange=function() {
     if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
            //document.getElementById(ctlName).innerHTML=xmlHttp.responseText;
        }
     };

xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function banner_zdroj(tmp_url)
{
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 }
var url="/ajax/admin/banner_zdroj.php";
url=url+tmp_url;

ctlName = "zdroj_banner";

     xmlHttp.onreadystatechange=function() {
     if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
            document.getElementById(ctlName).innerHTML=xmlHttp.responseText;
        }
     };

xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function changeBannerForm(tmp_url)
{
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 }
var url="/ajax/admin/change_banner_form.php";
url=url+tmp_url;

ctlName = "banner_form";

     xmlHttp.onreadystatechange=function() {
     if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
            document.getElementById(ctlName).innerHTML=xmlHttp.responseText;
        }
     };

xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function changeKategorieForm(tmp_url)
{
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 }
var url="/ajax/kategorie/change_kategorie_form.php";
url=url+tmp_url;

ctlName = "kategorie_form";

     xmlHttp.onreadystatechange=function() {
     if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
            document.getElementById(ctlName).innerHTML=xmlHttp.responseText;
        }
     };

xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function video_nahled(tmp_url)
{
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 }
var url="/ajax/video_nahled.php";
url=url+tmp_url;

ctlName = "video_nahled";

     xmlHttp.onreadystatechange=function() {
     if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
            document.getElementById(ctlName).innerHTML=xmlHttp.responseText;
        }
     };

xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function hodnotit(tmp_url)
{
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 }
var url="/ajax/hodnoceni.php";
url=url+tmp_url;

ctlName = "video_hodnoceni";

     xmlHttp.onreadystatechange=function() {
     if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
            document.getElementById(ctlName).innerHTML=xmlHttp.responseText;
        }
     };

xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function menuRight(tmp_url)
{
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 }
var url="/ajax/menu_right.php";
url=url+tmp_url;


//ctlName = "obsah_change";
ctlName = "right_change";

     xmlHttp.onreadystatechange=function() {
     if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
            document.getElementById(ctlName).innerHTML=xmlHttp.responseText;
        }
     };

xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function menuBottom(tmp_url)
{
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 }
var url="/ajax/menu_bottom.php";
url=url+tmp_url;
//actual.className = 'marked';

//ctlName = "bottom";
ctlName = "bottom_change";

/*d = document.getElementById('menu_items_bottom');
alert(d[0].className);*/
/*for(i=0;i<d.length;i++) {
  d[i].className == 'unmarked';  
}*/

     xmlHttp.onreadystatechange=function() {
     if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
            document.getElementById(ctlName).innerHTML=xmlHttp.responseText;
        }
     };

xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function menuFirmaRight(tmp_url)
{
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 }
var url="/ajax/menu_firma_right.php";
url=url+tmp_url;


//ctlName = "obsah_change";
ctlName = "firma_sloupec_right";

     xmlHttp.onreadystatechange=function() {
     if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
            document.getElementById(ctlName).innerHTML=xmlHttp.responseText;
        }
     };

xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function menuUzivatelRight(tmp_url)
{
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 }
var url="/ajax/menu_uzivatel_right.php";
url=url+tmp_url;


//ctlName = "obsah_change";
ctlName = "firma_sloupec_right";

     xmlHttp.onreadystatechange=function() {
     if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
            document.getElementById(ctlName).innerHTML=xmlHttp.responseText;
        }
     };

xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

/* Main */

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;
}

