 function loadinfo(){

     write_destinations()

	ifrm = window.frames['kralovna_iframe'] 

	htm = ifrm.document.body.innerHTML
	if (htm.length < 100) {	  
	  ifrm.document.body.innerHTML = "Kliknete prosim na Opakovat (Reload)"
	  alert("Kliknete prosim na Opakovat (Reload)")
	  //ifrm.location.reload()		  
	}

    if (ifrm.document.getElementById("x1"))
		ifrm.document.getElementById("x1").style.visibility='hidden';

	if (ifrm.document.getElementById("p1"))
        ifrm.document.getElementById("p1").parentNode.innerHTML = "";
    //ifrm.document.getElementById("p1").style.visibility='hidden';

	if (ifrm.document.getElementById("online_from_text")) {
		headTag = ifrm.document.documentElement.getElementsByTagName("HEAD")[0];

		var oScript = ifrm.document.createElement('script');
        oScript.setAttribute('type','text/javascript');
		oScript.setAttribute('src','http://x.kde.cz/proxyletenky-1/js/whisper.js');
		headTag.appendChild(oScript);
		//ifrm.document.getElementById("online_from_text").appendChild(oScript);

		var oScript = ifrm.document.createElement('link');
		oScript.setAttribute('rel','stylesheet');
		oScript.setAttribute('href','http://x.kde.cz/proxyletenky-1/css/whisper.css');
		headTag.appendChild(oScript);
		//ifrm.document.getElementById("online_from_text").appendChild(oScript);

		var oScript = ifrm.document.createElement('meta');
		oScript.setAttribute('http-equiv','cache-control');
		oScript.setAttribute('content','no-cache');
		headTag.appendChild(oScript);
		
		ifrm.document.getElementsByName("onlineFromSelect")[0].selectedIndex=1;

		//http://x.kde.cz/proxyletenky-1/css/whisper.css
		var ifrm_onlineTo = ifrm.document.getElementsByName("onlineTo")[0];
		ifrm_onlineTo.setAttribute('onkeydown','arrows(event.which,2)');
		ifrm_onlineTo.setAttribute('onkeyup','go(2);');
		ifrm_onlineTo.setAttribute('onblur','disp(0,2); allow_submit_fun(g_allow_submit);');
		ifrm_onlineTo.setAttribute('autocomplete','off');
		ifrm_onlineTo.setAttribute('id','q2');

		var oScript = ifrm.document.createElement('ul');
		oScript.setAttribute('id','suggest2');
		oScript.setAttribute('class','suggest');
		ifrm.document.getElementsByName("onlineTo")[0].parentNode.appendChild(ifrm.document.createElement('br'));
		ifrm.document.getElementsByName("onlineTo")[0].parentNode.appendChild(oScript);

		var ifrm_onlineFrom = ifrm.document.getElementsByName("onlineFromText")[0];
		ifrm_onlineFrom.setAttribute('onkeydown','arrows(event.which,1)');
		ifrm_onlineFrom.setAttribute('onkeyup','go(1);');
		ifrm_onlineFrom.setAttribute('onblur','disp(0,1)');
		ifrm_onlineFrom.setAttribute('autocomplete','off');
		ifrm_onlineFrom.setAttribute('id','q1');		

		var oScript = ifrm.document.createElement('ul');
		oScript.setAttribute('id','suggest1');
		oScript.setAttribute('class','suggest');
        ifrm.document.getElementsByName("onlineFromText")[0].parentNode.appendChild(ifrm.document.createElement('br'));
		ifrm.document.getElementsByName("onlineFromText")[0].parentNode.appendChild(oScript);
		ifrm.document.getElementsByName("onlineFromText")[0].value = "";

		forms = ifrm.document.documentElement.getElementsByTagName("form");
		forms[0].setAttribute('onSubmit', "return check_input(g_allow_submit)");
		var input = ifrm.document.documentElement.getElementsByTagName("input");		
		for (var j = 0; j < input.length; j++) {
		  if (input[j].type.toLowerCase() == 'submit') {
			//alert("OK");
			input[j].setAttribute('onFocus', "g_allow_submit=true");
		  }
		}
	}
}

