function kontrola(forr){ if (forr.flogin.value=="") { alert ('Musíte zadat přihlašovací jméno.'); forr.flogin.focus(); return false; } else if (forr.fheslo.value=="") { alert ('Musíte zadat heslo.'); forr.fheslo.focus(); return false; } else if (forr.fheslo.value!=forr.fheslo2.value) { alert ('Hesla musí být stejná.'); forr.fheslo.focus(); return false; } else if (forr.fjmeno.value=="") { alert ('Musíte zadat své jméno.'); forr.fjmeno.focus(); return false; } else if (forr.fprijmeni.value=="") { alert ('Musíte zadat své příjmení.'); forr.fprijmeni.focus(); return false; } else if (forr.fulice.value=="") { alert ('Musíte zadat ulici.'); forr.fulice.focus(); return false; } else if (forr.fmesto.value=="") { alert ('Musíte zadat město.'); forr.fmesto.focus(); return false; } else if (forr.fpsc.value=="") { alert ('Musíte zadat psč.'); forr.fpsc.focus(); return false; } else if (forr.ftelefon.value=="") { alert ('Musíte zadat telefon.'); forr.ftelefon.focus(); return false; } else if (forr.femail.value=="") { alert ('Musíte zadat e-mail.'); forr.femail.focus(); return false; } else if (forr.fwww.value=="") { alert ('Musíte zadat www.'); forr.fwww.focus(); return false; } return true; } fott=''; function rezoom(nadid,sekceid,id,lng) { temp_fot=""; if (fott!="") temp_fot='&fot='+fott; temp='./index.php?a=zoom&nadid='+nadid+'&sekceid='+sekceid+'&id='+id+lng+temp_fot; location.replace(temp); return false; } function toggle(img,fotka,ii,fot) { if (document.getElementById("fot1")) document.getElementById("fot1").src='getimg.php?a=mininahled&fot=1&id='+ii; if (document.getElementById("fot2")) document.getElementById("fot2").src='getimg.php?a=mininahled&fot=2&id='+ii; if (document.getElementById("fot3")) document.getElementById("fot3").src='getimg.php?a=mininahled&fot=3&id='+ii; if (document.getElementById("fot4")) document.getElementById("fot4").src='getimg.php?a=mininahled&fot=4&id='+ii; if (fott!=fot) { fotka.src='getimg.php?a=mininahled&id='+ii; fott=fot; } else fott=""; temp_fot=""; if (fott!="") temp_fot='&fot='+fott; img.src='getimg.php?a=detail&id='+ii+temp_fot; return false; } function toggle2(img,fotka,ii,fot) { if (document.getElementById("fot1")) document.getElementById("fot1").src='getimg.php?a=mininahled&fot=1&id='+ii; if (document.getElementById("fot2")) document.getElementById("fot2").src='getimg.php?a=mininahled&fot=2&id='+ii; if (document.getElementById("fot3")) document.getElementById("fot3").src='getimg.php?a=mininahled&fot=3&id='+ii; if (document.getElementById("fot4")) document.getElementById("fot4").src='getimg.php?a=mininahled&fot=4&id='+ii; if (fott!=fot) { fotka.src='getimg.php?a=mininahled&fot=&id='+ii; fott=fot; } else fott=""; temp_fot=""; if (fott!="") temp_fot='&fot='+fott; img.src='getimg.php?a=zoom&id='+ii+temp_fot; return false; } function showsubmenu(submenuid,poc) { for (h1=1;h1<=poc;h1++) { o=document.getElementById("sub"+h1); o2=document.getElementById("suba"+h1); if (h1!=submenuid) { o.style.visibility="hidden"; o.style.position="absolute"; o.style.left="0px"; o.style.top="0px"; o.style.width="0px"; o.style.height="0px"; // o2.style.class="podmenua"; } else { o.style.visibility=""; o.style.position=""; o.style.left=""; o.style.top=""; o.style.width=""; o.style.height=""; // o2.style.class="podmenu"; } } } function trim(inputString) { if (typeof inputString != "string") return inputString; var retValue = inputString; var ch = retValue.substring(0, 1); while (ch == " ") { retValue = retValue.substring(1, retValue.length); ch = retValue.substring(0, 1); } ch = retValue.substring(retValue.length - 1, retValue.length); while (ch == " ") { retValue = retValue.substring(0, retValue.length - 1); ch = retValue.substring(retValue.length - 1, retValue.length); } while (retValue.indexOf(" ") != -1) retValue = retValue.substring(0, retValue.indexOf(" ")) + retValue.substring(retValue.indexOf(" ") + 1, retValue.length); return retValue; } function set_cookie ( name, value, exp_seconds, path, domain, secure ) { var cookie_string = name + "=" + escape ( value ); if ( exp_seconds ) { var expires = new Date (); ex=expires.valueOf()+exp_seconds*1000; expires = new Date (ex); cookie_string += "; expires=" + expires.toGMTString(); } if ( path ) cookie_string += "; path=" + escape ( path ); if ( domain ) cookie_string += "; domain=" + escape ( domain ); if ( secure ) cookie_string += "; secure"; document.cookie = cookie_string; } function delete_cookie ( cookie_name ) { var cookie_date = new Date ( ); // current date & time cookie_date.setTime ( cookie_date.getTime() - 1 ); document.cookie = cookie_name += "=; expires=" + cookie_date.toGMTString(); } function get_cookie ( cookie_name ) { var results = document.cookie.match ( cookie_name + '=(.*?)(;|$)' ); if ( results ) return ( unescape ( results[1] ) ); else return null; } function xx_switch_lang(xlang) { set_cookie("lang", xlang, 86400*30); window.location=window.location; } var definfoboxtext=""; var iboxfocused=false; function iboxsend() { if (!iboxfocused) iboxfocus() else { o=document.forms["infoboxform"]; if (o) o.submit(); } } function iboxfocus() { m=document.getElementById("defmail"); o=document.getElementById("infobox"); if ((o) && (!iboxfocused)) { o.style.cursor="text"; o.title=_infobox_hint; iboxfocused=true; definfoboxtext=o.value; xx=_infobox_inside; if (m) xx+=m.value; o.value=xx; o.focus(); } } function resetInfobox() { o=document.getElementById("infobox"); if ((o) && (iboxfocused)) { iboxfocused=false; o.value=definfoboxtext; } } function xzoom(a,xid) { window.open("getimage.php?a="+a+"&id="+xid,"_blank","width=300px,height=300px"); }