
function pocet_znaku(id,len){
			retezec = document.getElementById(id).value;
			
			strlength=retezec.length;
				if (strlength > len ) 
				{
	                alert("Text je poříliš dlouhý !");           
	                document.getElementById(id).value=retezec.substring(0,len);
				}
				else{
			document.getElementById(id+'znak').innerText = len-retezec.length;
				}
				
}


///////////// HTML EDITOR ////////////
function edit_mod_inic(val){
  HTMLEdit1.document.body.innerHTML =  window.edit_form.text.value;
}

function edit_mod_uloz(val){
  window.edit_form.text.value = HTMLEdit1.document.body.innerHTML;
  return true;
}

function nastav_hodnotu(x,y,z) {
  (HTMLEdit1.document.selection.createRange()).execCommand(x,y,z);
}

function ImageButton_MouseDown(q) 
{
  q.style.left = 2;
  q.style.top = 2;
}

function ImageButton_MouseOver(q) 
{
  q.style.left = -1;
  q.style.top = -1;
}

function ImageButton_MouseOut(q) 
{
  q.style.left = 0;
  q.style.top = 0;
}
/////////////////////// KONEC EDITORU /////////////////
