function kontrola()
{
var formular=document.hledac.string.value;
var textik="Nelze vyhledávat-formulář neobsahuje žádné znaky!\nVyplňte prosím formulář!";
if (formular==""){
alert(textik);
return (false);
}
else
{
return (true);
}
}
function wap(){
params = "width=300,height=350";
var wokena= window.open('http://wapway.cz/web/browser/n7110/?wapnikurl=www.esgas.cz/wap/','',params+',resizable=no,left=50,top=50');
}
function wokno(jaky){
window.open(jaky,'','width=482,height=361,resizable=no,left=50,top=50');
}

var selected;

function go(value){
var txtarea = document.all.text_add;
txtarea.createTextRange;

if(selected==value){
if(value=="bold") tag="</b>";
if(value=="italic") tag="</i>";
if(value=="underline") tag="</u>";
if(value=="big") tag="</big>";
if(value=="small") tag="</small>";
if(value=="color") {tag="</font>";document.all.offcolor.disabled=true;document.all.fontcolor.disabled=false;}
txtarea.value += tag;
selected=0;
document.all.help.innerHTML="<b>Nápověda:</b> &nbsp;";
}

else{
if(value=="bold") tag="<b>";
if(value=="italic") tag="<i>";
if(value=="underline") tag="<u>";
if(value=="color") {tag="<font color='"+document.all.fontcolor.options[document.all.fontcolor.selectedIndex].value+"'>";document.all.offcolor.disabled=false;document.all.fontcolor.disabled=true;}
if(value=="big") tag="<big>";
if(value=="small") tag="<small>";
txtarea.value += tag;
selected=value;

if(value=="bold") click="Tučný";
if(value=="italic") click="Kurzíva";
if(value=="underline") click="Podtržený";
if(value=="color") click="Uzavrit barvu";
if(value=="big") click="Velký";
if(value=="small") click="Malý";
document.all.help.innerHTML="<b>Nápověda:</b> &nbsp;Nyní pište Vaši zprávu, jenž má být formátována. <b>Poté uzavřete formátovací značky kliknutím na " + click + "!</b>";
}

function gethelp(val){
if(val=="jmeno") helptext="Zde napište jméno akce";
if(val=="text") helptext="Zde napište text akce";
if(val=="platnost") helptext="Zde napište do kdy akce platí (DD.MM.RRRR)";
if(val=="submit") helptext="Kliknutím odešlete data";
if(val=="reset") helptext="Kliknutím vymažete formulář";

document.all.help.innerHTML="<b>Nápověda:</b> &nbsp;" + helptext;
}

txtarea.focus();
}

function check()
{
if(document.post.text_add.value!="" && document.post.text_add.value!=null &&
document.post.jmeno_add.value!="" && document.post.jmeno_add.value!=null &&
document.post.platnost_add.value!="" && document.post.platnost_add.value!=null) return (true);
else{
alert("Nelze odeslat sdělení, některá políčka jsou prázdná!!!!");
return (false);
}
}

function ceniktest(cooo){
if(cooo=="1"){
document.all.ceny_file.disabled=true;
}
if(cooo=="2")
{
document.all.subcat.disabled=true;
document.all.typ.disabled=true;
document.all.objc.disabled=true;
document.all.cena.disabled=true;
document.all.pop.disabled=true;
document.all.prislus.disabled=true;
document.all.cena_dph.disabled=true;
}
if(cooo=="3"){
document.all.ceny_file.disabled=false;
document.all.subcat.disabled=false;
document.all.typ.disabled=false;
document.all.objc.disabled=false;
document.all.cena.disabled=false;
document.all.pop.disabled=false;
document.all.prislus.disabled=false;
document.all.cena_dph.disabled=false;
}
}
