<!-- // load htmlarea
	_editor_url = "./resources/htmlArea/";                     // URL to htmlarea files
	
	var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
	if (navigator.userAgent.indexOf('Mac')        >= 0) { win_ie_ver = 0; }
	if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
	if (navigator.userAgent.indexOf('Opera')      >= 0) { win_ie_ver = 0; }
	
	if (win_ie_ver >= 5.5) {
  	  document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
  	  document.write(' language="Javascript1.2"></scr' + 'ipt>');  
	} else { 
		document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); 
	}
	
	
	/* Vygenerovani HtmlArey pokud prvek existuje
	*
	*/
	function generateHtmlArea() {
	  //generovani pro telo pokud existuje
	  if (null != document.getElementById('textaBody'))
	    editor_generate('textaBody');
		
  	  //generovani pro popis pokud existuje	
	  if (null != document.getElementById('textaDescription'))	
		editor_generate('textaDescription')
	}
	
	/*var oFCKeditor_".$nadpis." = new FCKeditor('".$nadpis."','580','300','Default');
	oFCKeditor_".$nadpis.".Value = '".addslashes(str_replace("\n"," ",str_replace("\r"," ",$form_value)))."';
    oFCKeditor_".$nadpis.".BasePath = 'dhtml/fckeditor/';
    oFCKeditor_".$nadpis.".Config["AutoDetectLanguage"] = false ;
     oFCKeditor_".$nadpis.".Create();*/
	function generateFckArea(){
		if (null != document.getElementById('textaBody')){
			var oFCKeditor_textaBody = new FCKeditor('textaBody','','','NetDog');
			oFCKeditor_textaBody.BasePath = 'resources/fckEditor/';
			oFCKeditor_textaBody.Config["AutoDetectLanguage"] = true ;
			if (fck_custom_styles) {
				oFCKeditor_textaBody.Config["EditorAreaCSS"] = fck_editorarea_css ;
				oFCKeditor_textaBody.Config["StylesXmlPath"] = fck_styles_xml ;
			}
			oFCKeditor_textaBody.ReplaceTextarea() ;
		}
		
		if (null != document.getElementById('textaDescription')){
			var oFCKeditor_textaDescription = new FCKeditor('textaDescription','','','NetDog');
			oFCKeditor_textaDescription.BasePath = 'resources/fckEditor/';
			oFCKeditor_textaDescription.Config["AutoDetectLanguage"] = true ;
			if (fck_custom_styles) {
				oFCKeditor_textaDescription.Config["EditorAreaCSS"] = fck_editorarea_css ;
				oFCKeditor_textaDescription.Config["StylesXmlPath"] = fck_styles_xml ;
			}
			//oFCKeditor_textaDescription.ReplaceTextarea() ;
			setTimeout(function() { oFCKeditor_textaDescription.ReplaceTextarea();}, 200);
		}
	}
	
    function addAuthor() {
    	var sel = document.getElementById('selAuthors');
		var klic = sel.options[sel.selectedIndex].value;
		var hodnota = sel.options[sel.selectedIndex].text;
	    
		var upperSel = window.opener.document.getElementById('selAuthors[]');;

		if(window.opener.findByValue(upperSel,klic) == -1)
	  	    window.opener.appendOption(upperSel,klic,hodnota);
			window.opener.selectOneByValue(upperSel,klic);  
		}
		
		
/* Funkce zmeni oznaceni variant podle vybrane moznosti.
* @param aSelect Odkaz na HTML prvek <SELECT>
* @param aSize Pocet variant ke zmene.
* pozor Pro Netscape a Mozillu je nutne mit u prvku
*/
function zmenOznaceniVariant(aSelect, aSize) {
  selectedValue = aSelect.options[aSelect.selectedIndex].value;

  if (selectedValue == 'ciselne') 
    start = 49;
  if (selectedValue == 'velkaPismena') 
    start = 65;	
  if (selectedValue == 'malaPismena') 
    start = 97;		
  
  var str = "";
  var oznaceni = 0;
  for (var i = 0; i < aSize; i++) {

	  var elem = document.getElementById('oznaceni['+i+']');
	  
	  if (elem != null) {
	    elem.value = String.fromCharCode(oznaceni + start);
		oznaceni++; 
	  } else {
	    aSize++;
	  }
  }
 
}	

/* 
* Nastvuje metodu akce a popripade jeji parametr
*
*/
function runMethod(aMethodName, aParametr){
  element = changeElementValue('method',aMethodName);
  if (aParametr != null)
  	changeElementValue('methodParametr', aParametr);
  
  if(element != null) 
    element.form.submit();
}


function runMethodDelete(aMethodName, aParametr, aText) {
  if (confirmDialog(aText)) {
	  runMethod(aMethodName, aParametr);  
  }
}	
// -->