/* common js stuff */ $(function() { $("input.DatePick").datepick( $.extend({ constrainInput: false }, $.datepick.regional['cs'])); $('.accounts li:not(.active)').css('cursor', 'pointer') .mousedown(function(e) { $(this).attr('key', e.offsetX + ':' + e.offsetY) }).click(function(e) { $this = $(this); if ($this.attr('key') !== undefined && $this.attr('key') === e.offsetX + ':' + e.offsetY) { window.location = $this.find('a')[0].href; }; }); }); function okno( height, width, cil ) { var w; w=window.open ( "/ib/empty.html", cil, "toolbar=n,height="+height+",width="+width+",resizable=1,scrollbars=1" ); w.focus(this); } function manual( height, width, cil, URL_z ) { var w; w=window.open ( URL_z, cil, "toolbar=n,height="+height+",width="+width+",resizable=1,scrollbars=1" ); w.focus(this); } function VytvorDavku( pocet_prikazu, lng, ID_ucet ) { oznacene = "pp="+ pocet_prikazu; var pocet_oznacenych = 0; for ( i = 0; i < pocet_prikazu; i++ ) { var POMname = "sel" + i; var pokyny = document.getElementsByName( POMname ); for ( var j = 0; j < pokyny.length; j++ ) if ( pokyny[j] && pokyny[j].checked ) { oznacene = oznacene + "&" + POMname + "=" + pokyny[j].value; pocet_oznacenych++; } } if ( pocet_oznacenych > 1 ) { var w = window.open ( "/scgi-bin/hermes/dz-form.cgi?FormID=DAVKA&lng="+ lng + "&ID_ucet=" + ID_ucet + "&" + oznacene, "dz_orders", "toolbar=n,height=650,width=450,resizable=1,scrollbars=1" ); setTimeout("var x=1;",500);//zdrzujeme w.focus(this); } else alert( "Označte nejméně dva pokyny k vytvoření dávky." ); } function checkedAll( checkOnOff ) { var aa = document.getElementById('frm1'); for ( var i =0; i < aa.elements.length; i++ ) { aa.elements[i].checked = checkOnOff; } } function checkSimilar( checkbox_name, checkOnOff ) { var aa = document.getElementsByName(checkbox_name); for ( var i =0; i < aa.length; i++ ) { aa[i].checked = checkOnOff; } } function isEmail(email) { var regex = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; return regex.test(email); }