function URLencode(url) { return escape(url); } function i2buttonClick(form, field, value, confirm) { if ( (!confirm) || i2confirm() ) { form.elements[field].value = value; form.submit(); return true; } return false; } function i2submitClick(formid, field, value, confirm) { var form = document.getElementById(formid); return i2buttonClick(form, field, value, confirm); } function i2confirm(msg) { if (msg == undefined) { msg = 'Potvrďte akci.'; } return window.confirm(msg); } function activeRadioButton(id, numberid) { document.getElementById(id + numberid).checked = "1"; } function i2SwitchVisible(id) { var e = document.getElementById(id); if (e.style.display == 'none') { e.style.display = 'block'; } else { e.style.display = 'none'; } } function i2SwitchCheckBox(id) { var e = document.getElementById(id); e.checked = ! e.checked; } function i2_checkbox_click(cb) { cb.checked = ! cb.checked; } function i2_set_cookie(name, value) { document.cookie = name+"="+escape(value)+";path=/"; } function i2_get_cookie(name) { var start = document.cookie.indexOf(name+"="); var len = start+name.length+1; if ( (!start) && (name != document.cookie.substring(0, name.length)) ) { return null; } if ( start == -1 ) return null; var end = document.cookie.indexOf( ";", len ); if ( end == -1 ) end = document.cookie.length; return unescape(document.cookie.substring(len, end)); } function i2_check_upload(frm,rege){ var fn = frm.file.value; if ( fn == "" ) { alert('Není zadán žádný soubor.'); return false; } if ( fn.match(rege) || fn.match(/.zip$/i) ) { return true; } alert('Špatný typ souboru'); return false; } var menuids=["popupmenu"] function i2_popupmenu_horizontal(){ for (var i=0; i