function gosvetlo() {
	var id = arguments[0];
	var lang = arguments[1]
    var element = document.getElementById('detail');
    element.innerHTML = '<div class="loaded"><img border="0" src="/_img/ajax-loader.gif"/></div>';
        var q = '';
        var msg = "blah";
       var rootdomain="http://"+window.location.hostname;
       var url = rootdomain+"/index/nacti_svetlo/id/"+id+'/lang/'+lang;
        if (url != 0)
        {
           if(navigator.appName == "Microsoft Internet Explorer") {
              httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
          } else {
              httpRequest = new XMLHttpRequest();
          } 
            if (httpRequest)
            {
                httpRequest.open("POST", url, true, "", "");
                httpRequest.onreadystatechange= function () {processRequest(); } ;
                httpRequest.send(msg);
            }
            else
            {
                document.getElementById('detail').innerHTML = "";
            }
      }
}
function processRequest()
{
  if (httpRequest.readyState == 4)
  {
    var str = "";
    if(httpRequest.status == 200)
    {
            str+=httpRequest.responseText;;
            document.getElementById('detail').innerHTML = str;
	jQuery("a[rel=example_group]").fancybox({
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic',
		'titlePosition' : 'over',
		'titleFormat'	: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
//            tb_init('a.thickbox, area.thickbox, input.thickbox');
    }
    else
    {
        alert("Chyba pri nacitani "+ httpRequest.status +":"+ httpRequest.statusText);
    }
  }
}

