
function getXmlHttp()
{var xmlHttp;try
{xmlHttp=new XMLHttpRequest();}
catch(e)
{try
{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e)
{try
{xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}
catch(e)
{xmlHttp=0;}}}
return xmlHttp;}
function showKraje(stat,selected){var xmlHttp=getXmlHttp();xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){document.getElementById('kraje').innerHTML=xmlHttp.responseText;if(stat==-1){showOkresy(-1,-1);}}}
xmlHttp.open("GET","/ajax/getKraje?stat="+stat+"&sel="+selected,true);xmlHttp.send(null);document.getElementById('kraje').innerHTML='<select value="-1"><option>nahrávam...</option></select>';}
function showOkresy(kraj,selected){var xmlHttp=getXmlHttp();xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){document.getElementById('okresy').innerHTML=xmlHttp.responseText;if(kraj==-1){showObce(-1,-1);}}}
xmlHttp.open("GET","/ajax/getOkresy?kraj="+kraj+"&sel="+selected,true);xmlHttp.send(null);document.getElementById('okresy').innerHTML='<select value="-1"><option>nahrávam...</option></select>';}
function showObce(okres,selected){var xmlHttp=getXmlHttp();xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){document.getElementById('obce').innerHTML=xmlHttp.responseText;}}
xmlHttp.open("GET","/ajax/getObce?okres="+okres+"&sel="+selected,true);xmlHttp.send(null);document.getElementById('obce').innerHTML='<select value="-1"><option>nahrávam...</option></select>';}
