/* --- javascript.lib.js (legacy helper library, hardened) --- */ var JSLIBBOOT = new Array(); function isbootlib(lib) { if (typeof JSLIBBOOT[lib] != 'undefined') { return true; } else { return false; } } function getURLParameter(name) { if (!isNaN(name)) return getURLPathParameter(name); var sPageURL = window.location.search.substring(1); var sURLVariables = sPageURL.split('&'); for (var i = 0; i < sURLVariables.length; i++) { var sParameterName = sURLVariables[i].split('='); if (sParameterName[0] == name) { // decode safely try { return decodeURIComponent((sParameterName[1] || '').replace(/\+/g, ' ')); } catch (e) { return sParameterName[1]; } } } } function first_split(str, char) { var str1 = str.toString(); var str2 = str1.split(char); var str3 = str2[0].toString(); return str3; } function getURLPathParameter(pathnr) { var url = window.location.toString(); var sURLVariables = url.split('//'); url = sURLVariables[1]; sURLVariables = url.split('/'); for (var i = 0; i < sURLVariables.length; i++) { if (i == pathnr) { return sURLVariables[i]; } } return null; } function mydecode(html) { html = str_replace('<', '<', html); html = str_replace('>', '>', html); html = str_replace(''', "'", html); html = str_replace('"', '"', html); html = str_replace(''', "'", html); return html; } function str_replace(search, replace, subject) { var result = ""; var oldi = 0; for (var i = subject.indexOf(search) ; i > -1 ; i = subject.indexOf(search, i)) { result += subject.substring(oldi, i); result += replace; i += search.length; oldi = i; } return result + subject.substring(oldi, subject.length); } /* Modern event helper (replaces legacy on* chaining) */ function addEvent(element, type, fn) { if (!element) return; element.addEventListener(type, fn, false); } function getPosition(element) { const rect = element.getBoundingClientRect(); return { x: rect.left + window.scrollX, y: rect.top + window.scrollY }; } function getMyObjectInfo(obj) { var r = { top:0, left:0, width:0, height:0 }; var oldobj = obj; if(!obj) { oldobj.getmy_top = r.top; oldobj.getmy_left = r.left; oldobj.getmy_width = r.width; oldobj.getmy_height = r.height; return false; } else if(typeof obj == 'string') obj = document.getElementById(obj); if(typeof obj != 'object') { oldobj.getmy_top = r.top; oldobj.getmy_left = r.left; oldobj.getmy_width = r.width; oldobj.getmy_height = r.height; return false; } if(typeof obj.offsetTop != 'undefined') { r.height = obj.offsetHeight; r.width = obj.offsetWidth; r.left = r.top = 0; while (obj && obj.tagName != 'BODY') { r.top += parseInt(obj.offsetTop); r.left += parseInt(obj.offsetLeft); obj = obj.offsetParent; } } oldobj.getmy_top = r.top; oldobj.getmy_left = r.left; oldobj.getmy_width = r.width; oldobj.getmy_height = r.height; return true; } /* ------------------------- SAFE onload queue (no eval) ------------------------- */ const wbOnloadQueue = []; var my_loaded_document = 0; function wb_js_onload_func(fn /*, p1..pn */) { var args = Array.prototype.slice.call(arguments, 1); wbOnloadQueue.push({ fn: fn, args: args }); } function wb_js_onload_do() { while (wbOnloadQueue.length) { var item = wbOnloadQueue.shift(); try { var f = (typeof item.fn === "function") ? item.fn : window[item.fn]; if (typeof f === "function") { f.apply(null, item.args); } else { console.warn("wb_js_onload: function not found:", item.fn); } } catch (e) { console.error("wb_js_onload error:", e); } } } /* No busy-wait. Provide async sleep helper. */ function sleep(ms) { return new Promise(function(resolve){ setTimeout(resolve, ms); }); } var mouse_X = 0, mouse_Y = 0; document.addEventListener('mousemove', function(e) { mouse_X = e.pageX || (e.clientX + document.body.scrollLeft); mouse_Y = e.pageY || (e.clientY + document.body.scrollTop); }, false); window.addEventListener('load', function() { wb_js_onload_do(); my_loaded_document = 1; // Keep draining queue for late registrations setInterval(wb_js_onload_do, 500); }); /* Fade-out helper for .erfolg / .fehler */ function aufloesenUndEntfernen(divElement, timeout) { setTimeout(function() { divElement.style.transition = 'opacity 5s'; divElement.style.opacity = '0'; var transitionEndListener = function() { if (divElement.style.opacity === '0') { divElement.removeEventListener('transitionend', transitionEndListener); divElement.style.display = 'none'; divElement.remove(); } }; divElement.addEventListener('transitionend', transitionEndListener); }, timeout * 1000); } window.addEventListener('load', function() { var divElemente = document.querySelectorAll('.erfolg, .fehler'); divElemente.forEach(function(divElement) { aufloesenUndEntfernen(divElement, 5); }); }); var pageParams = [ { key: 'page', value: '1' }, { key: 'seite', value: '2' } ]; function removeAllURLParameters() { var url = new URL(window.location.href); var newURL = url.origin + url.pathname + '?'; window.history.replaceState({ path: newURL }, '', newURL); } function removeURLParametersExcept(pageParams) { var url = new URL(window.location.href); var searchParams = new URLSearchParams(url.search); var paramsToKeep = ['page', 'seite']; // remove everything except keep-list Array.from(searchParams.keys()).forEach(function(key) { if (!paramsToKeep.includes(key)) { searchParams.delete(key); } }); // set (not append) to avoid duplicates pageParams.forEach(function(param) { searchParams.set(param.key, param.value); }); var newURL = url.origin + url.pathname + '?' + searchParams.toString(); window.history.replaceState({ path: newURL }, '', newURL); } JSLIBBOOT['JAVASCRIPT'] = 1; function lib_highlight_back(urlaj) { const highlighter = document.getElementById('highlighter'); const highlighterin = document.getElementById('highlighterin'); if (highlighter) { highlighter.classList.remove('highlighterinaniin'); highlighter.style.position = 'absolute'; highlighter.style.left = '-10000px'; highlighter.style.top = '-10000px'; } if (urlaj) { ajaxrequerstabort(); } if (highlighterin) { highlighterin.innerHTML = ''; } } function lib_highlight(obj, text, urlaj, copyobjid, autoclose = 1) { const highlighter = document.getElementById('highlighterin'); if (document.readyState !== 'complete' || !highlighter) return false; highlighter.innerHTML = 'Daten werden geladen

'; lib_highlight_position(obj); if (autoclose === 1) { obj.onmouseout = () => lib_highlight_back(urlaj); addEvent(obj, "click", () => lib_highlight_back(urlaj)); } let showin = 1; if (!text && urlaj) { setRequest(urlaj, 1, 'highlighterin', 1, 'lib_highlight_position', obj); showin = 0; } else if (copyobjid && document.getElementById(copyobjid)) { text = document.getElementById(copyobjid).innerHTML; } else if (!text && obj.title !== 'undefined' && obj.title !== '') { text = obj.title; } else if (!text && obj.alt !== 'undefined' && obj.alt !== '') { text = obj.alt; } if (showin === 1) { highlighter.innerHTML = text; } lib_highlight_position(obj); } function lib_highlight_position(obj) { document.getElementById('highlighter').classList.add('highlighterinaniin'); var a,element; element=obj; a=getPosition(element); var vx = (a.x - Math.round(document.getElementById('highlighter').offsetWidth /2) + Math.round(obj.offsetWidth / 2)); if(vx < 1) vx = 1; document.getElementById('highlighter').style.left = vx+"px"; document.getElementById('highlighter').style.top = (a.y - document.getElementById('highlighter').offsetHeight) + "px"; } function init_lib_highlight() { var newO = document.createElement("div"); newO.setAttribute("id",'highlighter'); document.body.appendChild(newO); document.getElementById('highlighter').innerHTML = mydecode('<div id="highlighterin"></div><div style="margin-top: -1px; width:100%; height: 11px; background: url('https://www.wohnmobil-markisen.de/images/nabe.png'); background-repeat: no-repeat; background-position: center top; z-index: 1002;"></div>'); lib_highlight_back(); } wb_js_onload_func('init_lib_highlight'); function setCookie(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); var expires = "expires="+ d.toUTCString(); document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; } JSLIBBOOT['COOKIE'] = 1; init_form_kalender_function_after_dat = new Array(); function init_form_kalender_str_replace(search, replace, subject) { var result = ""; var oldi = 0; for (i = subject.indexOf (search) ; i > -1 ; i = subject.indexOf (search, i)) { result += subject.substring (oldi, i); result += replace; i += search.length; oldi = i; } return result + subject.substring (oldi, subject.length); } function init_form_kalender_set_jd(tag, monat, jahr, id) { if(!isbootlib('AJAX')) return false; jahr = jahr -1; tag = 1; document.getElementById(id+'_tag').value = tag; document.getElementById(id+'_monat').value = monat; document.getElementById(id+'_jahr').value = jahr; if(document.getElementById(id).childNodes[4].innerHTML.length > 0) document.getElementById(id).childNodes[4].innerHTML = tag+'.'+monat+'.'+jahr; setRequest('https://www.wohnmobil-markisen.de/ajax/calender.php?id='+id+'&atag='+document.getElementById(id+'_tag').value+'&amonat='+document.getElementById(id+'_monat').value+'&ajahr='+document.getElementById(id+'_jahr').value,1,id+'_kalenderanzeige'); } function init_form_kalender_set_ju(tag, monat, jahr, id) { if(!isbootlib('AJAX')) return false; jahr++; tag=1; document.getElementById(id+'_tag').value = tag; document.getElementById(id+'_monat').value = monat; document.getElementById(id+'_jahr').value = jahr; if(document.getElementById(id).childNodes[4].innerHTML.length > 0) document.getElementById(id).childNodes[4].innerHTML = tag+'.'+monat+'.'+jahr; setRequest('https://www.wohnmobil-markisen.de/ajax/calender.php?id='+id+'&atag='+document.getElementById(id+'_tag').value+'&amonat='+document.getElementById(id+'_monat').value+'&ajahr='+document.getElementById(id+'_jahr').value,1,id+'_kalenderanzeige'); } function init_form_kalender_set_md(tag, monat, jahr, id) { if(!isbootlib('AJAX')) return false; monat = monat -1; tag=1; if(monat < 1) { monat = 12; jahr = jahr -1; } document.getElementById(id+'_tag').value = tag; document.getElementById(id+'_monat').value = monat; document.getElementById(id+'_jahr').value = jahr; if(document.getElementById(id).childNodes[4].innerHTML.length > 0) document.getElementById(id).childNodes[4].innerHTML = tag+'.'+monat+'.'+jahr; setRequest('https://www.wohnmobil-markisen.de/ajax/calender.php?id='+id+'&atag='+document.getElementById(id+'_tag').value+'&amonat='+document.getElementById(id+'_monat').value+'&ajahr='+document.getElementById(id+'_jahr').value,1,id+'_kalenderanzeige'); } function init_form_kalender_set_mu(tag, monat, jahr, id) { if(!isbootlib('AJAX')) return false; monat++; tag=1; if(monat > 12) { monat = 1; jahr++; } document.getElementById(id+'_tag').value = tag; document.getElementById(id+'_monat').value = monat; document.getElementById(id+'_jahr').value = jahr; if(document.getElementById(id).childNodes[4].innerHTML.length > 0) document.getElementById(id).childNodes[4].innerHTML = tag+'.'+monat+'.'+jahr; setRequest('https://www.wohnmobil-markisen.de/ajax/calender.php?id='+id+'&atag='+document.getElementById(id+'_tag').value+'&amonat='+document.getElementById(id+'_monat').value+'&ajahr='+document.getElementById(id+'_jahr').value,1,id+'_kalenderanzeige'); } function init_form_kalender_set_dat(tag,monat,jahr, id) { //alert(id+' '+tag+' '+monat+' '+jahr); document.getElementById(id+'_tag').value = tag; document.getElementById(id+'_monat').value = monat; document.getElementById(id+'_jahr').value = jahr; if(document.getElementById(id).childNodes[4].innerHTML.length > 0) document.getElementById(id).childNodes[4].innerHTML = tag+'.'+monat+'.'+jahr; document.getElementById(id+'_kalenderanzeige').innerHTML = ''; if(init_form_kalender_function_after_dat[id] != null) { eval(init_form_kalender_function_after_dat[id] + '();'); } } function init_form_kalender(obj,atag,amonat,ajahr,text,function_after) { init_form_kalender_function_after_dat[obj.id] = function_after; var oldid = obj.id; getMyObjectInfo(obj); var oldTop = obj.getmy_top; var oldLeft = obj.getmy_left; var oldonmouseover = obj.onmouseover; var oldonmouseout = obj.onmouseoout; tag = '<font id="((id))" class="form_kalender_button" onclick="setRequest('https://www.wohnmobil-markisen.de/ajax/calender_from.php',1,'details');" onmouseover=" this.style.cursor = 'pointer';" onmouseout=""><img src="https://www.wohnmobil-markisen.de/images/myicons/kalender.png" class="icon"> <b></b> <font></font></font>'; tag = init_form_kalender_str_replace('((id))',oldid+'_create',tag); tag = init_form_kalender_str_replace('"','"',tag); tag = init_form_kalender_str_replace('<','<',tag); tag = init_form_kalender_str_replace('>','>',tag); tag = init_form_kalender_str_replace(''',"'",tag); obj.onerror = null; obj.removeAttribute("onerror"); document.getElementById('dataholder').innerHTML += tag; var tag = document.getElementById(oldid+'_create'); eltern = obj.parentNode; eltern.replaceChild(document.getElementById(oldid+'_create'),obj); obj = document.getElementById(oldid+'_create'); obj.id = oldid; if(text.length > 0) { obj.childNodes[4].innerHTML = atag+'.'+amonat+'.'+ajahr; obj.childNodes[2].innerHTML = text; } var newTextfield = document.createElement("textarea"); newTextfield.setAttribute("id",oldid+'_tag'); newTextfield.setAttribute("name",oldid+'_tag'); newTextfield.setAttribute("class",'form_noshow'); obj.appendChild(newTextfield); document.getElementById(oldid+'_tag').value=atag; var newTextfield = document.createElement("textarea"); newTextfield.setAttribute("id",oldid+'_monat'); newTextfield.setAttribute("name",oldid+'_monat'); newTextfield.setAttribute("class",'form_noshow'); obj.appendChild(newTextfield); document.getElementById(oldid+'_monat').value=amonat; var newTextfield = document.createElement("textarea"); newTextfield.setAttribute("id",oldid+'_jahr'); newTextfield.setAttribute("name",oldid+'_jahr'); newTextfield.setAttribute("class",'form_noshow'); obj.appendChild(newTextfield); document.getElementById(oldid+'_jahr').value=ajahr; document.getElementById('dataholder').innerHTML += '
<'+''+'/div>'; obj.onmouseover = oldonmouseover; obj.onmouseout = oldonmouseout; obj.onclick = function() { setRequest('https://www.wohnmobil-markisen.de/ajax/calender.php?id='+oldid+'&atag='+document.getElementById(oldid+'_tag').value+'&amonat='+document.getElementById(oldid+'_monat').value+'&ajahr='+document.getElementById(oldid+'_jahr').value,1,oldid+'_kalenderanzeige'); getMyObjectInfo(document.getElementById(oldid+'_tag')); //-----> Herausgenommen nun per CSS //document.getElementById(oldid+'_kalenderanzeige').style.left = ((window.innerWidth/2) - (document.getElementById(oldid+'_kalenderanzeige').offsetWidth/2))+"px"; //document.getElementById(oldid+'_kalenderanzeige').style.top = (oldTop+5)+"px"; }; } var rampel = 0; var lastrequesttime; var request; var lastrequesturl; function ajaxrequerstabort() { if(request) { if(request.readyState != 4) { request.abort(); } } } function substr_count (haystack, needle, offset, length) { var cnt = 0; haystack += ''; needle += ''; if (isNaN(offset)) { offset = 0; } if (isNaN(length)) { length = 0; } if (needle.length == 0) { return false; } offset = offset-1; while ((offset = haystack.indexOf(needle, offset + 1)) != -1) { if (length > 0 && (offset + needle.length) > length) { return false; } cnt++; } return cnt; } var ajaxrequestmemory = new Array(); function setRequest_warteschleife(url,giveback,idname,usejs,function_after,function_after_param1,function_after_param2,function_after_param3,sendpost,myhash) { if(request) { if(request.readyState != 4) { setTimeout(function(){ setRequest_warteschleife(url,giveback,idname,usejs,function_after,function_after_param1,function_after_param2,function_after_param3,sendpost,myhash); },1000); } else { setRequest(url,giveback,idname,usejs,function_after,function_after_param1,function_after_param2,function_after_param3,sendpost,myhash); } } else { setRequest(url,giveback,idname,usejs,function_after,function_after_param1,function_after_param2,function_after_param3,sendpost,myhash); } } function setRequest(url,giveback,idname,usejs,function_after,function_after_param1,function_after_param2,function_after_param3,sendpost,myhash) { idname = idname || ''; if(null == myhash) myhash = new Date().getTime(); ajaxrequestmemory[myhash] = idname; ajaxrequestmemory[22] = idname; if(!isbootlib('JAVASCRIPT')) return false; if(typeof url == 'undefined') { return 0; } if(null == giveback) giveback = 1; jetzt = new Date(); if(typeof lastrequesttime=='undefined') lastrequesttime = jetzt.getTime(); if(giveback==1) { const iterator = Object.keys(ajaxrequestmemory); for(var i = 0; i myhash) { request.abort(); return 0; } } } rampel = 1; lastrequesturl = url; lastrequesttime = jetzt.getTime(); if(request && request.readyState && request.readyState > 0) { request.abort(); delete request; } if (window.XMLHttpRequest) { request = new XMLHttpRequest(); // Mozilla, Safari, Opera request.timeout = 17000; request.ontimeout = function (e) { if(giveback==1) { document.getElementById(idname).innerHTML = 'timeout'; rampel = 0; } }; } else if (window.ActiveXObject) { try { request = new ActiveXObject('Msxml2.XMLHTTP'); // IE 5 } catch (e) { try { request = new ActiveXObject('Microsoft.XMLHTTP'); // IE 6 } catch (e) { } } } else { alert('No AJAX USE!'); } if (!request) { rampel = 0; return false; } else { if(substr_count (url, '?') > 0) { if(sendpost == 1) { request.open('POST', url+'&jetzt='+jetzt.getTime(), true); } else { request.open('GET', url+'&jetzt='+jetzt.getTime(), true); } } else { if(sendpost == 1) { request.open('POST', url+'?jetzt='+jetzt.getTime(), true); } else { request.open('GET', url+'?jetzt='+jetzt.getTime(), true); } } // Request senden if(sendpost ==1) { if(document.forms['ajaxpost']) { var stranhang = ''; var files = 0; var formData = new FormData(); formData.set('ajaxform','yes'); for(var z = 0;z<=document.forms['ajaxpost'].elements.length - 1;z++) { //alert(document.forms['ajaxpost'].elements[z].type +' # '+ document.forms['ajaxpost'].elements[z].name + '=' + document.forms['ajaxpost'].elements[z].value ); if(document.forms['ajaxpost'].elements[z].type == 'radio') { if(document.forms['ajaxpost'].elements[z].checked == true) formData.set(document.forms['ajaxpost'].elements[z].name, document.forms['ajaxpost'].elements[z].value); } else if(document.forms['ajaxpost'].elements[z].type == 'file') { formData.set(document.forms['ajaxpost'].elements[z].name, document.forms['ajaxpost'].elements[z].files[0],document.forms['ajaxpost'].elements[z].files[0].name); files++; } else { formData.set(document.forms['ajaxpost'].elements[z].name, document.forms['ajaxpost'].elements[z].value); } } if(files > 1) { //request.setRequestHeader('Content-type', 'multipart/form-data'); } else { //request.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); } request.send(formData); } else { request.send(null); } } else { request.send(null); } // Request auswerten request.onreadystatechange = function() { // Request auswerten switch (request.readyState) { case 4: if(request.status == 404) { rampel = 0; } else if (request.status != 200 ) { rampel = 0; } else { rampel = 0; var content = request.responseText; // den Inhalt des Requests in das
schreiben if(giveback==1) { document.getElementById(idname).innerHTML = content; //location.hash = "#" + idname; } if(giveback==1&&typeof usejs != 'undefined' && usejs == 1 && document.getElementById('ajaxjs')) { eval(document.getElementById('ajaxjs').innerHTML); } if(typeof function_after != 'undefined') { if(typeof window[function_after] == 'function') window[function_after](function_after_param1,function_after_param2,function_after_param3,sendpost,myhash); } } break; case 3: rampel = 0; break; case 0: { rampel = 0; return false; } default: { break; } } ;} } } JSLIBBOOT['AJAX'] = 1; function dsvgoconfirm() { var anzeigen = 1; if(document.cookie) { if (document.cookie.split(';').filter(function(item) { return item.indexOf('dsgvo=') >= 0 }).length) { anzeigen = 0; } } if(anzeigen==1) { document.body.innerHTML += '
Wichtiger Hinweis! Sie benutzen die Internetseite von Wohnmobil Markisen.de! Hiermit erklärern Wir Ihnen unsere Dateschutzerklärung! Indem Sie auf "Akzeptieren" klicken, stimmen Sie bis auf Widerruf der Verarbeitung Ihrer Daten gemäß unserer Datenschutzerklärung zu, und akzeptieren gleichzeitig den Einsatz von Cookies. Wenn Sie dies ablehnen möchten, klicken Sie auf "Ablehnen". Sie werden dann von unserer Webseite wegeleitet. Die Nutzung unserer Webseite wird dadurch eingestellt.

AkzeptierenAblehnen & Webseite verlassen
'; } } function setdsvgocookie() { document.cookie = 'dsgvo=zugestimmt; max-age=2592000; path=/;'; document.getElementById('dsvgobar').remove(); } wb_js_onload_func('dsvgoconfirm'); var lib_textfield_suggest_Taby_id = 0; var lastlib_textfield_suggest_Taby_id = 0; var allowTabySubmit = 0; function getRect (o) { var r = { top:0, left:0, width:0, height:0 }; if(!o) return r; else if(typeof o == 'string' ) o = document.getElementById(o); if( typeof o != 'object' ) return r; if(typeof o.offsetTop != 'undefined') { r.height = o.offsetHeight; r.width = o.offsetWidth; r.left = r.top = 0; while (o && o.tagName != 'BODY') { r.top += parseInt( o.offsetTop ); r.left += parseInt( o.offsetLeft ); o = o.offsetParent; } } return r; } function submok() { if(allowTabySubmit == 1) { return true; } else { return false; } } function allowsbm() { allowTabySubmit = 1; } var SUGGESTTIMEOUT = 0; //document.onkeydown = TasteGedrueckt; function lib_TEXTFIELD_SUGGEST(obj,url,Ereignis,insertintoid) { if(obj.value.length == 0) { if(insertintoid) { document.getElementById(insertintoid).innerHTML = ''; } else { document.getElementById('lib_textfield_suggest').innerHTML = ''; document.getElementById('lib_textfield_suggest').remove(); } return false; } if(!document.getElementById('lib_textfield_suggest')) { var newO = document.createElement("div"); document.body.appendChild(newO); newO.setAttribute("id",'lib_textfield_suggest'); newO.setAttribute("class",'lib_textfield_suggest'); } var d = obj.id; //alert(Tastencode); str = obj.value; var s_pos = getRect(obj); document.getElementById('lib_textfield_suggest').style.top = (s_pos.top+obj.offsetHeight) +'px'; document.getElementById('lib_textfield_suggest').style.left = s_pos.left + 'px'; if(insertintoid) { document.getElementById(insertintoid).innerHTML = mydecode('Eingabe wird abgewartet<br><br><img src="https://www.wohnmobil-markisen.de/images/svgicons/rep_ffffff_question.svg" class="scicon loadingicon" style="height: 1.5em; width: auto;" >'); } else { document.getElementById('lib_textfield_suggest').innerHTML = mydecode('Eingabe wird abgewartet<br><br><img src="https://www.wohnmobil-markisen.de/images/svgicons/rep_ffffff_question.svg" class="scicon loadingicon" style="height: 1.5em; width: auto;" >'); } if (!Ereignis) Ereignis = window.event; if (Ereignis.which) { Tastencode = Ereignis.which; } else if (Ereignis.keyCode) { Tastencode = Ereignis.keyCode; } window.clearTimeout(SUGGESTTIMEOUT); SUGGESTTIMEOUT = setTimeout(lib_TEXTFIELD_SUGGEST2,1000,obj,url,Ereignis,insertintoid,Tastencode); } function lib_TEXTFIELD_SUGGEST2(obj,url,Ereignis,insertintoid,Tastencode) { if('undefined' == obj.id || obj.id == '') { alert('LIB TEXTFIELD_SUGGEST ERR: This textfiled has not ID but need!'); return false; } var d = obj.id; if(Tastencode != 40 && Tastencode != 38 && Tastencode != 13) { if(insertintoid) { document.getElementById(insertintoid).innerHTML = mydecode('Daten werden gesucht<br><br><img src="https://www.wohnmobil-markisen.de/images/svgicons/rep_ffffff_loading.svg" class="scicon loadingicon" style="height: 2em; width: auto;" >'); setRequest(url+'?str='+str+'&div='+d,1,insertintoid); } else { document.getElementById('lib_textfield_suggest').innerHTML = mydecode('Daten werden gesucht<br><br><img src="https://www.wohnmobil-markisen.de/images/svgicons/rep_ffffff_loading.svg" class="scicon loadingicon" style="height: 2em; width: auto;" >'); setRequest(url+'?str='+str+'&div='+d,1,'lib_textfield_suggest'); } } if(lib_textfield_suggest_Taby_id != 0 && !document.getElementById('taby_'+lib_textfield_suggest_Taby_id)) { lib_textfield_suggest_Taby_id = 0; } if(Tastencode == 40) { if(document.getElementById('taby_'+lastlib_textfield_suggest_Taby_id)) document.getElementById('taby_'+(lastlib_textfield_suggest_Taby_id)).style.border = '1px solid #e3e3e3'; lib_textfield_suggest_Taby_id++; if(!document.getElementById('taby_'+lib_textfield_suggest_Taby_id)) { lib_textfield_suggest_Taby_id = 0; } else { document.getElementById('taby_'+lib_textfield_suggest_Taby_id).style.border = '2px solid #e3e3e3'; lastlib_textfield_suggest_Taby_id = lib_textfield_suggest_Taby_id; } //alert(lib_textfield_suggest_Taby_id); } else if(Tastencode == 38) { if(document.getElementById('taby_'+lastlib_textfield_suggest_Taby_id)) document.getElementById('taby_'+(lastlib_textfield_suggest_Taby_id)).style.border = '1px solid #e3e3e3'; lib_textfield_suggest_Taby_id--; if(!document.getElementById('taby_'+lib_textfield_suggest_Taby_id)) { lib_textfield_suggest_Taby_id = 0; } else { document.getElementById('taby_'+lib_textfield_suggest_Taby_id).style.border = '2px solid #e3e3e3'; lastlib_textfield_suggest_Taby_id = lib_textfield_suggest_Taby_id; } //alert(lib_textfield_suggest_Taby_id); } else if(Tastencode == 13) { if(document.getElementById('taby_'+lib_textfield_suggest_Taby_id)) { a = document.getElementById('old').innerHTML + document.getElementById('taby_'+(lib_textfield_suggest_Taby_id)).innerHTML; obj.value = a; obj.focus(); document.getElementById('lib_textfield_suggest').innerHTML = ''; } } } setInterval(function(){ if(document.getElementById('taby_1') && (lib_textfield_suggest_Taby_id == 0||lib_textfield_suggest_Taby_id == 1)) { lib_textfield_suggest_Taby_id = 1; document.getElementById('taby_1').style.border = '2px solid #e3e3e3'; lastlib_textfield_suggest_Taby_id = lib_textfield_suggest_Taby_id; } }, 100); function take_tag_to_input(obj) { if(typeof obj.firstChild.value != 'undefined') return false; t_id = obj.id; obj.innerHTML = ''; obj.onclick = null; all = t_id+'_bf'; //setRequest('https://www.wohnmobil-markisen.de/ajax/_evt_admin_set_speisekarte_attribut.php?e='+t_id+'&g=no',1,t_id); //t_value = obj.innerHTML; //obj.innerHTML = ''; } function reset_to_input(t_id) { //obj.innerHTML = ''; obj = document.getElementById(t_id); //alert('ok'); //obj.onclick = addEventListener('click',function(){take_tag_to_input(obj);}, false); }