<!-- // 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')
	}
	*/
	
	function generateFckArea(bCustomisedProject){
		if ((null != document.getElementById('textaBody')  && document.getElementById('textaBody').type == 'textarea')) {
			var oFCKeditor_textaBody = new FCKeditor('textaBody','','','NetDog');
			oFCKeditor_textaBody.BasePath = 'resources/fckEditor/';
			oFCKeditor_textaBody.Config["AutoDetectLanguage"] = false ;
			oFCKeditor_textaBody.Config["DefaultLanguage"] = fck_language;
			if (fck_custom_styles) {
				oFCKeditor_textaBody.Config["EditorAreaCSS"] = fck_editorarea_css ;
				oFCKeditor_textaBody.Config["StylesXmlPath"] = fck_styles_xml ;
				oFCKeditor_textaBody.Config["TemplatesXmlPath"] = fck_templates ;
			}
			
			if (bCustomisedProject) {
				oFCKeditor_textaBody.Config["PluginsPath"] = '../../../../resources/fckEditor/plugins/';
				oFCKeditor_textaBody.Config["LinkBrowserURL"] = '../../../../../../resources/fckEditor/browser/browser.html?Connector=connectors/connector.php';
			}
			
			oFCKeditor_textaBody.ReplaceTextarea() ;
		}
		
		if ((null != document.getElementById('textaDescription') && document.getElementById('textaDescription').type == 'textarea')){
			var oFCKeditor_textaDescription = new FCKeditor('textaDescription','','','NetDog');
			oFCKeditor_textaDescription.BasePath = 'resources/fckEditor/';
			oFCKeditor_textaDescription.Config["AutoDetectLanguage"] = false ;
			oFCKeditor_textaDescription.Config["DefaultLanguage"] = fck_language;
			if (fck_custom_styles) {
				oFCKeditor_textaDescription.Config["EditorAreaCSS"] = fck_editorarea_css ;
				oFCKeditor_textaDescription.Config["StylesXmlPath"] = fck_styles_xml ;
				oFCKeditor_textaDescription.Config["TemplatesXmlPath"] = fck_templates ;
			}
			
			if (bCustomisedProject) {
				oFCKeditor_textaDescription.Config["PluginsPath"] = '../../../../resources/fckEditor/plugins/';
				oFCKeditor_textaDescription.Config["LinkBrowserURL"] = '../../../../../../resources/fckEditor/browser/browser.html?Connector=connectors/connector.php';
			}
			
			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);  
}

/*pridavani hodnot volitelnych vlastnosti*/
function addAlternateValue() {
	var translatable = document.getElementById('selTranslatable');
	var translate = translatable.options[translatable.selectedIndex].value;
	var nazev = document.getElementById('txtName').value;
		
	window.opener.prepareFormAlternateValue(nazev, translate);
	
	window.close();
}

function prepareFormAlternateValue(nazev, kPrekladu) {
	var sel = document.getElementById('selAlternateValues[]');
	var newValues = document.getElementById('newAlternateValues');
	var count = document.getElementById('newValuesCount');
	
	count.value = parseInt(count.value) + 1;
	var newId = 'x' + count.value;
	appendOption(sel, newId, nazev);
	
	newValues.value += newId + '|' + nazev + '|' + kPrekladu + ';;';
	
	selectOneByValue(sel, newId);
}
/*konec pridavani*/

/*editace hodnot volitelnych vlastnosti*/
function editAlternateValue() {
	var nazev = document.getElementById('txtName').value;
	var id = document.getElementById('hidIdAlternateValue').value;
	
	window.opener.upateFormAlternateValue(id, nazev);
	
	window.close();
}

function upateFormAlternateValue(id, nazev){
	var sel = document.getElementById('selAlternateValues[]');
	for (i = 0; i < sel.options.length; i++) {
		if (sel.options[i].value == id) {
			sel.options[i].text = nazev;
		}
	}
	
	var editedValues = document.getElementById('editedAlternateValues');
	editedValues.value += id + '|' + nazev + ';;';
}
/*konec editace*/


/* 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);  
  }
}	
// -->
