function JE_EMAIL(txt){var x = new RegExp('^[^@]+@([a-z,A-Z,0-9,_,-]+[.]{1})+[a-z,A-Z,0-9]{2,5}$'); if (x.exec(txt.toLowerCase())==null) return 0; else return 1;} function show(id) {if (document.getElementById(id).style.display=='none') document.getElementById(id).style.display='block'; else document.getElementById(id).style.display='none';} function addEvent(elm, evType, fn, useCapture) {if (elm.addEventListener) {elm.addEventListener(evType, fn, useCapture); return true;} else if (elm.attachEvent) {var r = elm.attachEvent('on'+evType, fn); return r;} else {alert('Došlo k chybě při práci s event');}} function showk(id,dir) {show('kategorie-'+id); if (document.getElementById('kimg'+id).src.indexOf('ts-r-plus.gif')>-1) document.getElementById('kimg'+id).src=dir+'/ts-r-minus.gif'; else document.getElementById('kimg'+id).src=dir+'/ts-r-plus.gif';} function scrollit() {document.getElementById('message').style.top=document.body.scrollTop + top + 'px';} function regnews() {if(JE_EMAIL(document.getElementById('enov').value)==0) {alert('pre registráciu noviniek musí byť e-mail zadaný v správnom formáte'); return false;} else {return true;}} function myParseFloat(str){str=''+str+''; var value=str.match('[-]{0,1}(?:[1-9]+[0-9]*[,.]{0,1}[0-9]*)|(?:0[,.][0-9]*)'); if(value!=null && value.length>0){value[0]=value[0].replace(',','.'); value=parseFloat(value[0])*1; return value;}else{return 0;}} function testJavaScript() { try { document.getElementsByTagName('body')[0].className += ' testJavaScript'; } catch(e) { } } function pozadi(obj,obj2,akce) { var trida = 'inputDiv-'+akce; if (document.getElementById(obj2).value=='') document.getElementById(obj).className=trida; } function kniha_check() { var err = new Array(); if (JE_EMAIL(document.getElementById('id_stiz_mail').value)==0) err[err.length]='Zadajte prosím správny formát e-mailu' if (document.getElementById('id_stiz_text').value=='') err[err.length]='Vyplňte text s oznámením' if (err.length==0) document.getElementById('idknihaprani').submit(); else alert (err); } function simulateHover(obj,baseCN,typ){ var myCN=obj.className.split(' '); for(var i=0; i=image.length && i<0) || i==c ) || (cfg.option.disableWhenAnimated===true && ( $(anim[c]).is(':animated') || $(anim[i]).is(':animated') )) ) { return false; } //simple test Stop(); $(anim[c]).fadeOut(cfg.option.fadeDuration); $(anim[i]).fadeIn(cfg.option.fadeDuration); $(link[c]).removeClass(cfg.cssClass.linkActive); $(link[i]).addClass(cfg.cssClass.linkActive); c=i; Play(); } var AnimPrev=function(){ if (c<=0){ Anim(image.length-1); } else{ Anim(c-1); } } var AnimNext=function(){ if (c>=image.length-1){ Anim(0); } else{ Anim(c+1); } } var Play=function(){ tOut=setTimeout( AnimNext, cfg.option.interval ); } var Stop=function(){ if (tOut!==undefined){ clearTimeout(tOut); } } // functions end Play(); }, i: [] } $(function(){ $( slideShowBanner.selector.main ).each( function( i ){ slideShowBanner.i[i]=slideShowBanner.f($(this)); }); // make the show });