var lc=0; var vsti=1; var partni=1; var pl=new Array(97085,97079,97078,97077,97070,97069,97080,97083,97087,97075,97084,105728,114833,173546,173547,173548,173549,173550,173551,97082,173553,173556,173558,173560,173562,173564,173566,179771,187531,189866,97071,205374,205375,205376,231156,239027,97076,97074,97073,97072,97088); var pu=new Array('','http://www.vzs-kv.cz/','http://www.rozhlas.cz','http://www.liferescue.eu/','http://www.floriansdorf.de/','http://www.csicr.cz/','','http://www.rescue.sk/','http://www.sokolov.cz','http://www.army.cz/scripts/detail.php?id=6840','http://www.mpkv.cz','','http://www.ohkcheb.cz/','http://www.hzscb.cz','http://www.hzs-kvk.cz','http://www.hzszlk.eu','http://www.hzspk.cz','http://www.hzsoul.cz','http://www.hzskladno.cz','http://www.policie.cz/krajske-reditelstvi-policie-kvk.aspx','http://www.dh.cz','http://www.mestocheb.cz','http://www.azzs.cz','http://www.ibesip.cz','http://www.sikcz.cz','http://www.mediafax.cz','http://www.chmi.cz','www.hzspraha.cz','http://www.dsa.cz/cz/','http://www.asociacekraju.cz/','http://www.hscr.cz','www.senat.cz','www.muni.cz','www.skpz.cz','http://www.hasici-vysocina.cz/','http://www.prevence-info.cz','http://zbkkk.cz/','http://www.karlovyvary.cz','http://www.kr-karlovarsky.cz','http://www.hzs-kvk.cz','http://www.zachrankakv.cz'); var po=new Array(); for(i=0;i=pl.length) lc=0; } setTimeout('pch()',2000); } function xbuy(i,cnt,bskt) { var req=GetXMLHttpRequest(); if(req) { req.onreadystatechange = function () { if(req.readyState==4) { var d=req.responseText.split(/\|\|/) var b=document.getElementById('b'); var im=document.getElementById('im'+i); var mn=document.getElementById('main'); var p=findPos(im); var m=findPos(mn); b.style.left=(p[0]-m[0]+im.width+5)+'px'; b.style.top=(p[1]-m[1]+im.height-155)+'px'; b.innerHTML=d[1]; b.style.display='block'; //var kc=document.getElementById('kc'); //kc.innerHTML=d[0]; window.setTimeout('xbclose()',3000); } } req.open("GET","/badd.php?pidx="+i+"&pcnt="+cnt+"&bskt="+bskt,true); req.send(""); } } function xbclose() { document.getElementById('b').style.display='none'; } function hide(e) { document.getElementById(e).style.display='none'; } var amenu=1; var amenup=0; function mswitch(s) { var umc=$('#um'+amenu); var unc=$('#u'+amenu); if(s) { if(amenu==s) return; amenu=s; amenup=1; } else { if(amenup) return; amenu++; if(amenu>amenuc) amenu=1; } var um=$('#um'+amenu); var un=$('#u'+amenu); if(s) um.css({opacity:1.0}).addClass('a'); else um.css({opacity:0.0}).addClass('a').animate({opacity:1.0},1000); un.addClass('a'); if(s) umc.removeClass('a'); else umc.animate({opacity:0.0},1000).removeClass('a'); unc.removeClass('a'); } function mreturn() { amenup=0; } function mlreg() { if(!CheckEmailEntry(document.fn.mlemail,'Musíte zadat email!')) return false; return true; } function hlz(k,h,hl) { for(i=1;i<=5;i++) { var o=document.getElementById('hl'+k+'x'+i); if(h>=i) o.src='/img/hv1.png'; else o.src='/img/hv0.png'; } } function hlo(k,hl) { hlz(k,hl,hl); } function ohl(k,hl) { var req=GetXMLHttpRequest(); if(req) { req.onreadystatechange = function () { if(req.readyState==4) { var o=document.getElementById('hl'+k); if(!req.responseText) alert('Již jste hlasoval!'); else o.innerHTML=req.responseText; } } req.open("GET","/vote.php?k="+k+(hl ? '&hl='+hl : ''),true); req.send(""); if(hl) alert('Děkujeme za hlas.'); } } function vstrot() { document.getElementById('vys').innerHTML=vsts[vsti]; vsti++; if(vsti+1>=vsts.length) vsti=1; } function partnrot() { document.getElementById('partner').src='/image.php?idx='+partn[partni]+'&mw=220'; partni++; if(partni+1>partn.length) partni=1; } function zkonload() { if(vsti) setInterval('vstrot()',3000); if(typeof partn!='undefined') setInterval('partnrot()',3000); } function wlogin(p,c,i,s,a) { sb((s ? 'https://www.zachranny-kruh.cz' : '')+'/win.php?page=blogin&pg='+p+'&cat='+c+'&idx='+i+(a ? '&'+a : '')); } function esh(u) { sb('/win.php?page=poslatodkaz&su='+u); } function kom(d,o) { sb('/win.php?page=komentar&dsc='+d+(o ? '&odp='+o : '')); } function idopr(i) { sb('/win.php?page=info.doprava&dopr='+i); } function cb() { var b=document.getElementsByTagName('body'); b[0].style.overflow='auto'; document.getElementById('over').style.display='none'; document.getElementById('bb').style.display='none'; } function sb(u,h,x,v,f) { var bd=document.getElementsByTagName('body'); bd[0].style.overflow='hidden'; var b=document.getElementById('over'); b.style.display='block'; b.style.top=window.pageYOffset ? window.pageYOffset+'px': document.body.scrollTop+'px'; var b=document.getElementById('bb'); if(u) b.className=''; b.style.top=((window.pageYOffset ? window.pageYOffset:document.body.scrollTop)-(bd[0].className=='hp' ? 425 : 144))+'px'; if(x) { b.style.height='30px'; //b.style.top=((getWindowHeight()-50)/2+(window.pageYOffset ? window.pageYOffset:document.body.scrollTop)-(bd[0].className=='hp' ? 425 : 144))+'px'; b.innerHTML=x; document.activeElement.blur(); if(f) f(); } else { var wh=v ? v : getWindowHeight()-200; b.style.height=wh+'px'; if(u) { b.innerHTML='
'; if(f) f(); } else if(h) { var req=GetXMLHttpRequest(); if(req) { req.onreadystatechange=function() { if(req.readyState==4) { b.innerHTML='
'+req.responseText; if(f) f(); } } req.open("GET",h,true); req.send(""); } } } b.style.display='block'; b.style.top=((window.pageYOffset ? window.pageYOffset:document.body.scrollTop)+(getWindowHeight()-b.offsetHeight)/2-document.getElementById('main').offsetTop)+'px'; } function zpob(i,c,v) { sb('/map.odbmista.php?dp='+c+'&pi='+i+'&vaha='+v); } function zpobs(s,v) { var x=document.getElementById('pdopr'+s); for(var i=0;ittl) slp=ttl; } document.getElementById('slkf').innerHTML=d[3]; document.getElementById('slkb').style.display='none'; document.getElementById('slc').value=String(-slp)+' Kč'; cd(); } else alert('Kupón není platný!'); } } req.open("GET","/chcoupon.php?k="+k.value,false); req.send(""); } if(s) return false; } function cfav(i,t) { var req=GetXMLHttpRequest(); if(req) { req.onreadystatechange=function() { if(req.readyState==4) { var s=parseInt(req.responseText); document.getElementById('cfv'+i).innerHTML=s ? '-' : '+'; } } req.open("GET","/ajax/cfav.php?idx="+i+(t ? '&t='+t : ''),true); req.send(""); } } function mmi() { var p=findPos(document.getElementById('zb0')); window.scrollTo(0,p[1]-1); } var pdlp; function drcnt(s) { var d=0,p=0,b=0; for(var i=1;i1; for(var i=1;i' + (A_TCALCONF.yearscroll ? '' : '') + '' + A_TCALCONF.months[d_date.getMonth()] + ' ' + d_date.getFullYear() + '' + (A_TCALCONF.yearscroll ? '' : '') + ''; // print weekdays titles for (var i = 0; i < 7; i++) s_html += ''; s_html += '' ; // print calendar table var n_date, n_month, d_current = new Date(d_firstDay); while (d_current.getMonth() == d_date.getMonth() || d_current.getMonth() == d_firstDay.getMonth()) { s_html +=''; for (var n_wday = 0; n_wday < 7; n_wday++) { a_class = []; n_date = d_current.getDate(); n_month = d_current.getMonth(); if (d_current.getMonth() != d_date.getMonth()) a_class[a_class.length] = s_pfx + 'OtherMonth'; if (d_current.getDay() == 0 || d_current.getDay() == 6) a_class[a_class.length] = s_pfx + 'Weekend'; if (d_current.valueOf() == d_today.valueOf()) a_class[a_class.length] = s_pfx + 'Today'; if (d_current.valueOf() == d_selected.valueOf()) a_class[a_class.length] = s_pfx + 'Selected'; s_html += '' : '>') + n_date + ''; d_current.setDate(++n_date); } s_html +=''; } s_html +='
' + A_TCALCONF.weekdays[(A_TCALCONF.weekstart + i) % 7] + '
'; return s_html; } function f_tcalRelDate (d_date, d_diff, s_units) { var s_units = (s_units == 'y' ? 'FullYear' : 'Month'); var d_result = new Date(d_date); if (d_diff) { d_result['set' + s_units](d_date['get' + s_units]() + d_diff); if (d_result.getDate() != d_date.getDate()) d_result.setDate(0); } return ' onclick="f_tcalUpdate(' + d_result.valueOf() + (d_diff ? ',1' : '') + ')"'; } function f_tcalResetTime (d_date) { d_date.setMilliseconds(0); d_date.setSeconds(0); d_date.setMinutes(0); d_date.setHours(12); return d_date; } // closes calendar and returns all inputs to default state function f_tcalCancel () { var s_pfx = A_TCALCONF.cssprefix; var e_cal = document.getElementById(s_pfx); if (e_cal) e_cal.style.visibility = ''; var a_inputs = f_tcalGetInputs(); for (var n = 0; n < a_inputs.length; n++) f_tcalRemoveClass(a_inputs[n], s_pfx + 'Active'); } function f_tcalUpdate (n_date, b_keepOpen) { var e_input = f_tcalGetInputs(true); if (!e_input) return; d_date = new Date(n_date); var s_pfx = A_TCALCONF.cssprefix; if (b_keepOpen) { var e_cal = document.getElementById(s_pfx); if (!e_cal || e_cal.style.visibility != 'visible') return; e_cal.innerHTML = f_tcalGetHTML(d_date, e_input); } else { e_input.value = f_tcalGenerateDate(d_date, A_TCALCONF.format); f_tcalCancel(); } } function f_tcalOnClick (e,f) { if(!f) f=this; // see if already opened var s_pfx = A_TCALCONF.cssprefix; var s_activeClass = s_pfx + 'Active'; var b_close = f_tcalHasClass(f, s_activeClass); // close all clalendars f_tcalCancel(); if (b_close) return; // get position of input f_tcalAddClass(f, s_activeClass); var n_left = f_getPosition (f, 'Left'), n_top = f_getPosition (f, 'Top') + f.offsetHeight; var e_cal = document.getElementById(s_pfx); if (!e_cal) { e_cal = document.createElement('div'); e_cal.onselectstart = function () { return false }; e_cal.id = s_pfx; document.getElementsByTagName("body").item(0).appendChild(e_cal); } e_cal.innerHTML = f_tcalGetHTML(null); e_cal.style.top = n_top + 'px'; e_cal.style.left = (n_left + f.offsetWidth - e_cal.offsetWidth) + 'px'; e_cal.style.visibility = 'visible'; } function f_tcalParseDate (s_date, s_format) { if (!s_date) return; var s_char, s_regexp = '^', a_tokens = {}, a_options, n_token = 0; for (var n = 0; n < s_format.length; n++) { s_char = s_format.charAt(n); if (A_TCALTOKENS_IDX[s_char]) { a_tokens[s_char] = ++n_token; s_regexp += '(' + A_TCALTOKENS_IDX[s_char]['r'] + ')'; } else if (s_char == ' ') s_regexp += '\\s'; else s_regexp += (s_char.match(/[\w\d]/) ? '' : '\\') + s_char; } var r_date = new RegExp(s_regexp + '$'); if (!s_date.match(r_date)) return; var s_val, d_date = f_tcalResetTime(new Date()); d_date.setDate(1); for (n = 0; n < A_TCALTOKENS.length; n++) { s_char = A_TCALTOKENS[n]['t']; if (!a_tokens[s_char]) continue; s_val = RegExp['$' + a_tokens[s_char]]; d_date = A_TCALTOKENS[n]['p'](d_date, s_val); } return d_date; } function f_tcalGenerateDate (d_date, s_format) { var s_char, s_date = ''; for (var n = 0; n < s_format.length; n++) { s_char = s_format.charAt(n); s_date += A_TCALTOKENS_IDX[s_char] ? A_TCALTOKENS_IDX[s_char]['g'](d_date) : s_char; } return s_date; } function f_tcalGetInputs (b_active) { var a_inputs = document.getElementsByTagName('input'), e_input, s_rel, a_result = []; for (n = 0; n < a_inputs.length; n++) { e_input = a_inputs[n]; if (!e_input.type || e_input.type != 'text') continue; if (!f_tcalHasClass(e_input, 'tcal')) continue; if (b_active && f_tcalHasClass(e_input, A_TCALCONF.cssprefix + 'Active')) return e_input; a_result[a_result.length] = e_input; } return b_active ? null : a_result; } function f_tcalHasClass (e_elem, s_class) { var s_classes = e_elem.className; if (!s_classes) return false; var a_classes = s_classes.split(' '); for (var n = 0; n < a_classes.length; n++) if (a_classes[n] == s_class) return true; return false; } function f_tcalAddClass (e_elem, s_class) { if (f_tcalHasClass (e_elem, s_class)) return; var s_classes = e_elem.className; e_elem.className = (s_classes ? s_classes + ' ' : '') + s_class; } function f_tcalRemoveClass (e_elem, s_class) { var s_classes = e_elem.className; if (!s_classes || s_classes.indexOf(s_class) == -1) return false; var a_classes = s_classes.split(' '), a_newClasses = []; for (var n = 0; n < a_classes.length; n++) { if (a_classes[n] == s_class) continue; a_newClasses[a_newClasses.length] = a_classes[n]; } e_elem.className = a_newClasses.join(' '); return true; } function f_getPosition (e_elemRef, s_coord) { var n_pos = 0, n_offset, e_elem = e_elemRef; while (e_elem) { n_offset = e_elem["offset" + s_coord]; n_pos += n_offset; e_elem = e_elem.offsetParent; } e_elem = e_elemRef; while (e_elem != document.body) { n_offset = e_elem["scroll" + s_coord]; if (n_offset && e_elem.style.overflow == 'scroll') n_pos -= n_offset; e_elem = e_elem.parentNode; } return n_pos; } function f_tcalInit () { if (!document.getElementsByTagName) return; var e_input, a_inputs = f_tcalGetInputs(); for (var n = 0; n < a_inputs.length; n++) { e_input = a_inputs[n]; e_input.onclick = f_tcalOnClick; f_tcalAddClass(e_input, A_TCALCONF.cssprefix + 'Input'); } window.A_TCALTOKENS_IDX = {}; for (n = 0; n < A_TCALTOKENS.length; n++) A_TCALTOKENS_IDX[A_TCALTOKENS[n]['t']] = A_TCALTOKENS[n]; } function f_tcalAddOnload (f_func) { if (document.addEventListener) { window.addEventListener('load', f_func, false); } else if (window.attachEvent) { window.attachEvent('onload', f_func); } else { var f_onLoad = window.onload; if (typeof window.onload != 'function') { window.onload = f_func; } else { window.onload = function() { f_onLoad(); f_func(); } } } } f_tcalAddOnload (f_tcalInit);