function confirmSubmitOwn(url,hlaska) { var agree=confirm(hlaska); if (agree) location.href=url; else return false ; } var Fokus; function OpenJSWindow(url, jmeno, w, h) { Fokus = window.open(url, jmeno,'scrollbars=1,resizable=0,top=20,left=20,menubar=0,width=' + w + ',height=' + h); Fokus.focus() if (!Fokus.opener) Fokus.opener = self; } /* Thx to JimX and his zumpa_foto gallery */ function showPic (jmeno,file,w,h) { sw=screen.availWidth-8; sh=screen.availHeight-48; if (w>sw) { h=Math.round(sw*h/w); w=sw; } if (h>sh) { w=Math.round(sh*w/h); h=sh; } l=(sw-w)/2; t=(sh-h)/2; wh=h+16; url='http://%HTTP_HOST%/blog/detailphoto.php?jmeno='+jmeno+'&w='+w+'&h='+h+'&file='+file; prvky='width='+w+',height='+wh+',left='+l+',top='+t+',resizable=no,scrollbars=no,titlebar=no,toolbar=no,fullscreen=no'; pic=file.substr(file.lastIndexOf('/')+1,file.length); v = window.open (url,file.substr(0,file.indexOf('.')),prvky); v.focus(); } function wmReplace(string,text,by) { // Replaces text with by in string var strLength = string.length, txtLength = text.length; if ((strLength == 0) || (txtLength == 0)) return string; var i = string.indexOf(text); if ((!i) && (text != string.substring(0,txtLength))) return string; if (i == -1) return string; var newstr = string.substring(0,i) + by; if (i+txtLength < strLength) newstr += wmReplace(string.substring(i+txtLength,strLength),text,by); return newstr; }