/* // +----------------------------------------------------------------------+ // | Copyright (c) 2004 Bitflux GmbH | // +----------------------------------------------------------------------+ // | Licensed under the Apache License, Version 2.0 (the "License"); | // | you may not use this file except in compliance with the License. | // | You may obtain a copy of the License at | // | http://www.apache.org/licenses/LICENSE-2.0 | // | Unless required by applicable law or agreed to in writing, software | // | distributed under the License is distributed on an "AS IS" BASIS, | // | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | // | implied. See the License for the specific language governing | // | permissions and limitations under the License. | // +----------------------------------------------------------------------+ // | Author: Bitflux GmbH | // +----------------------------------------------------------------------+ */ //Änderungen zum Original: stark gekürzt var liveSearchReq = false; var t = null; var liveSearchLast = ""; var div = "LSResult"; var div_top10 = "LSResult_top10"; var formular_id = "megasuche"; function liveSearchStartExt(param,param2) { div=param; formular_id=param2; liveSearchStart() }; function liveSearchHideDelayed(param,param2) { div=param; formular_id=param2; window.setTimeout("liveSearchHide()",400); } function liveSearchHide() { document.getElementById(div).style.display = "none"; var hm = document.getElementById("hidemely1"); if (hm != null) {hm.style.visibility = "visible"}; var hm = document.getElementById("cgiad"); if (hm != null) {hm.style.visibility = "visible"}; } function liveSearchStart() { if (t) { window.clearTimeout(t); } t = window.setTimeout("liveSearchDoSearch()",0); // vorher 200 } function liveSearchDoSearch() { var search_value; if (document.getElementById(formular_id).livesearch) { search_value = document.getElementById(formular_id).livesearch.value; } if (liveSearchLast != search_value) { if (liveSearchReq && liveSearchReq.readyState < 4) { liveSearchReq.abort(); } if (search_value == "") { liveSearchHide(); return false; } // if (window.XMLHttpRequest) { // // branch for IE/Windows ActiveX version // liveSearchReq = new XMLHttpRequest(); // } else if (window.ActiveXObject) { // liveSearchReq = new ActiveXObject("Microsoft.XMLHTTP"); // } try{ liveSearchReq=new ActiveXObject("Msxml2.XMLHTTP"); }catch(e){ try{ liveSearchReq=new ActiveXObject("Microsoft.XMLHTTP"); } catch(oc){ liveSearchReq=null; } } if(!liveSearchReq && typeof XMLHttpRequest != "undefined") { liveSearchReq=new XMLHttpRequest(); } if(!liveSearchReq) { return; } var res = document.getElementById(div); search_value = search_value.trim(); var search = escape(search_value); search = search.replace(/\+/g, "%2b"); res.style.display = "block"; res.innerHTML = '' } } function liveSearchProcessReqChange() { if (liveSearchReq.readyState == 4) { var hm = document.getElementById("hidemely1"); if (hm != null) {hm.style.visibility = "hidden"}; var hm = document.getElementById("cgiad"); if (hm != null) {hm.style.visibility = "hidden"}; var res = document.getElementById(div); res.style.display = "block"; res.innerHTML = '' + liveSearchReq.responseText; window.status = "Fertig"; } } function liveSearchShowTop10(param) { div_top10 = param; var res = document.getElementById(div_top10); res.style.display = "block"; res.innerHTML = '' } function liveSearchHideTop10Delayed(param) { div_top10 = param; window.setTimeout("liveSearchHideTop10()", 400); } function liveSearchHideTop10(param) { document.getElementById(div_top10).style.display = "none"; }
Häufige Suchanfragen