function doSubmit(str)
{
var ok=confirm(str);
if (ok)
	return true ;
else
	return false ;
}

  // otevreni noveho okna
function openWindow(url) 
{
	window.open(url,url,'toolbar=0,location=0,scrollbars=1,width=800,height=550,resizable=1,top=10,left=100');
	return false;
}

function reply(id)
{
  document.getElementById("replyid").value = id;
  document.getElementById("rere").style.display='block';
  document.getElementById("re_text").innerHTML = document.getElementById("com"+id).innerHTML; 
  document.getElementById("replytext").focus();
  return false;
}

function freply()
{
  document.getElementById("replyid").value = null;
  document.getElementById("rere").style.display='none';
  document.getElementById('replytext').focus(); 
  return false;
}

function WinGal(url)
{
  var win_size_x = 940;
  var win_size_y = 800;
  var win_pos_x = (screen.width-win_size_x)/2;
  var win_pos_y = (screen.height-win_size_y)/2;
  window.open(url,"IMG",'toolbar=0,location=0,scrollbars=1,directories=0,width=940,height=800,resizable=1,top=' + win_pos_y + ',left=' + win_pos_x);
  return false
}		

function pollanswer(id) 
{
  document.getElementById('proc'+id).value=prompt("A proč?", "");
} 

function zobrazSkryj(idecko)
{
  el=document.getElementById(idecko).style;
  el.display=(el.display == 'block')?'none':'block';
}


function Anketa()
{
    // odeslání požadavku na aktualizaci dat
    zobrazSkryj('ajax');
    document.getElementById('ajax').innerHTML = '<div id="w8"></div>';
    if (!send_xmlhttprequest('GET', 'anketa_result.php', anketa_obsluha))
    {
        return false;
    }
    return true;
}

function anketa_obsluha(xmlhttp)
{
  if (xmlhttp.readyState == 4)
  {
    document.getElementById('ajax').innerHTML = xmlhttp.responseXML.getElementsByTagName('txt')[0].firstChild.data;
  }
}

function send_xmlhttprequest(method, url, obsluha)
{
    var xmlhttp = (window.XMLHttpRequest ? new XMLHttpRequest : (window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : false));
    if (!xmlhttp) 
    {
      return false;
    }
    xmlhttp.open(method, url);
    xmlhttp.onreadystatechange = function() { obsluha(xmlhttp); };
    xmlhttp.send("");
    return true;
}

