function utf8_encode (argString) { // Encodes an ISO-8859-1 string to UTF-8 // // version: 1103.1210 // discuss at: http://phpjs.org/functions/utf8_encode // + original by: Webtoolkit.info (http://www.webtoolkit.info/) // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + improved by: sowberry // + tweaked by: Jack // + bugfixed by: Onno Marsman // + improved by: Yves Sucaet // + bugfixed by: Onno Marsman // + bugfixed by: Ulrich // * example 1: utf8_encode('Kevin van Zonneveld'); // * returns 1: 'Kevin van Zonneveld' var string = (argString + ''); // .replace(/\r\n/g, "\n").replace(/\r/g, "\n"); var utftext = "", start, end, stringl = 0; start = end = 0; stringl = string.length; for (var n = 0; n < stringl; n++) { var c1 = string.charCodeAt(n); var enc = null; if (c1 < 128) { end++; } else if (c1 > 127 && c1 < 2048) { enc = String.fromCharCode((c1 >> 6) | 192) + String.fromCharCode((c1 & 63) | 128); } else { enc = String.fromCharCode((c1 >> 12) | 224) + String.fromCharCode(((c1 >> 6) & 63) | 128) + String.fromCharCode((c1 & 63) | 128); } if (enc !== null) { if (end > start) { utftext += string.slice(start, end); } utftext += enc; start = end = n + 1; } } if (end > start) { utftext += string.slice(start, stringl); } return utftext; } /*@cc_on @if (@_win32 && @_jscript_version >= 5) if (!window.XMLHttpRequest) window.XMLHttpRequest = function() { return new ActiveXObject('Microsoft.XMLHTTP') } @end @*/ var tree = { table: '', disp: null, selNode: false, edit: null, order: false, attributes: false, classattr: false, nodis: false, show_node:function(pParent, pOpen, pLast) { var oMaster = document.getElementById(pParent); var cId = pParent.substr(2); var oNode = document.getElementById('n_'+cId); if (oNode) { var oParent = oNode.parentNode; oParent.removeChild(oNode); } var lOpen = true; if (oMaster.state == 'open' && pOpen == 1) { lOpen = false; } var oSym = document.getElementById('s_'+cId); if (lOpen) { oSym.className=oSym.className.replace(/_closed/, '_animation'); var oRq = new XMLHttpRequest(); var ajaxurl; ajaxurl='http://mallorca-ausfluege.net/wp-content/plugins/excursiones_ch_plugin/tree-ajax.php'; var datatosend="lang=de&type="+cId; oRq.open('POST', ajaxurl, true); oRq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); oRq.onreadystatechange = function() { if (oRq.readyState == 4) { if (oRq.status == 200) { if(oRq.responseText!="NULL"){ var resdatos = eval('(' +oRq.responseText+ ')'); var datos=resdatos.datos; var resultado=""; var nodeImage=""; resultado+="