
<!--- Zobrazi detaily stranky --->
function ShowDetails(Object, isHTMLMode) {

     if (isHTMLMode) {
		wrongModeMsg();
		return;}
		
     Object.ShowDetails = !Object.ShowDetails;
	try{Object.DOM.focus();}
	catch(e){Object.focus();}
}
<!--- Zobrazi okraje --->

  function ShowBorders(Object, isHTMLMode) {

	if (isHTMLMode) {
		wrongModeMsg();
		return;}

	Object.ShowBorders= !Object.ShowBorders;
	try{Object.DOM.focus();}
	catch(e){Object.focus();}
   }

<!--- vklada HTML tag do pola --->
function insertHTMLTag(Object, isHTMLMode, cdHTMLTagBefore, cdHTMLTagAfter)
{

	if(typeof cdHTMLTagBefore == "undefined" || typeof cdHTMLTagAfter == "undefined")
		return;
	if (isHTMLMode) {
		wrongModeMsg();
		return;
	}

	var sel = Object.DOM.selection;
	if (sel != null) {
		var rng = sel.createRange();
    	if (rng != null)
		try{
    		rng.pasteHTML(cdHTMLTagBefore + rng.htmlText + cdHTMLTagAfter);
			}
		catch(e){alert("This function is not available here!");}
	}
	try{Object.DOM.focus();}
	catch(e){Object.focus();}
}


<!--- vklada HTML do pola --->
function insertHTML(Object, isHTMLMode, cdHTML)
{

var i=0;
	if(typeof cdHTML == "undefined")
		return;
		
	if (isHTMLMode) {
		wrongModeMsg();
		return;
	}
	var sel = Object.DOM.selection;
	if (sel != null) {
		var rng = sel.createRange();
		if (rng != null)
		try{
			rng.pasteHTML(cdHTML);
			}
		catch(e){alert("This function is not available here!");}	
	}
	try{Object.DOM.focus();}
	catch(e){Object.focus();}
}

<!--- funkcia na prepinanie medzi HTML a WYSIWYG --->
function changeMode(Object, isHTMLMode, bMode)
{

	var sTmp;
  	if (bMode == "HTMLMode") {
		isHTMLMode = true;
		sTmp = Object.DOM.body.innerHTML;

		// remove base url added automatically to the code by DHTML editor
		sTmp = sTmp.replace(reBaseURL, '');
		
		Object.DOM.body.innerText = sTmp;
	}
	else {
		isHTMLMode = false;
		sTmp = Object.DOM.body.innerText;
		
		// remove base url added automatically to the code by DHTML editor
		sTmp = sTmp.replace(reBaseURL, '');
		
		Object.DOM.body.innerHTML = sTmp;
	}
	try{Object.DOM.focus();}
	catch(e){Object.focus();}
	return isHTMLMode;
}

<!---return 5, 5.5, 6 etc or 0 (for NN)--->
function IEVersion()
{
    ua=window.navigator.userAgent;
    msie=ua.indexOf("MSIE ");
    if (msie>0)
        return parseFloat(ua.substring(msie+5,ua.indexOf(".",msie)+2));
    else
        return 0;
}


