function Ajax(){this.url="";this.params="";this.method="GET";this.onSuccess=null;this.onError=function(msg){alert(msg)}}
Ajax.prototype.doRequest=function(){if(!this.url){this.onError("Es wurde kein URL angegeben. Der Request wird abgebrochen.");return false}if(!this.method)this.method="GET";else this.method=this.method.toUpperCase();var _this=this;var xmlHttpRequest=getXMLHttpRequest();if(!xmlHttpRequest){this.onError("Es konnte kein XMLHttpRequest-Objekt erstellt werden.");return false}switch(this.method){case "GET":xmlHttpRequest.open(this.method,this.url+"?"+this.params,true);xmlHttpRequest.onreadystatechange=readyStateHandler;
xmlHttpRequest.send(null);break;case "POST":xmlHttpRequest.open(this.method,this.url,true);xmlHttpRequest.onreadystatechange=readyStateHandler;xmlHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHttpRequest.send(this.params);break}function readyStateHandler(){if(xmlHttpRequest.readyState<4)return false;if(xmlHttpRequest.status==200||xmlHttpRequest.status==304){if(_this.onSuccess)_this.onSuccess(xmlHttpRequest.responseText,xmlHttpRequest.responseXML)}else if(_this.onError)_this.onError("["+
xmlHttpRequest.status+" "+xmlHttpRequest.statusText+"] Es trat ein Fehler bei der Datenbertragung auf.")}};function getXMLHttpRequest(){if(window.XMLHttpRequest)return new XMLHttpRequest;else if(window.ActiveXObject)try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){return null}}return false}var key_navi=null;
function load(suchbegriff,div_id,txt_id,e,sprache){var eingabe=suchbegriff.value;with(new Ajax){var taste=e.keyCode?e.keyCode:e.charCode;if(!(taste==37||taste==38||taste==39||taste==40)){url="http://www.halbleiter.org/suche/suggest.php";method="POST";params="eingabe="+eingabe+"&div_id="+div_id+"&txt_id="+txt_id+"&sprache="+sprache;onSuccess=successHandler;onError=errorHandler;doRequest()}}function successHandler(txt,xml){document.getElementById(div_id).innerHTML=txt;var suggest_div=document.getElementById(div_id);
var txt_div=document.getElementById(txt_id);var lis=document.getElementById(div_id).getElementsByTagName("li").length;var suggest_list=document.getElementById("suggest_list");if(!key_navi)key_navi=new keynavigation(suggest_list,div_id,txt_id);else key_navi.updateList(suggest_list);if(lis==0||eingabe==""||eingabe=="Suchbegriff")suggest_div.style.visibility="hidden";else if(suggest_div.innerHTML!="")suggest_div.style.visibility="visible"}function errorHandler(msg){document.getElementById(div_id).innerHTML=
msg}}
function abk(eingabe,span,buchstabe){var input=eingabe;var eingabe=document.getElementById(eingabe).value;with(new Ajax){method="POST";if(span=="span_akronym"){url="http://www.halbleiter.org/akronym/akronym.php";params="eingabe="+eingabe}else if(span=="span_akronym_liste"){url="http://www.halbleiter.org/akronym/tabelle_gefiltert.php";params="eingabe="+eingabe+"&buchstabe="+buchstabe}else{url="http://www.halbleiter.org/kontakt/check.php";params="eingabe="+eingabe+"&input="+input}onSuccess=successHandler;
onError=errorHandler;doRequest()}function successHandler(txt,xml){document.getElementById(span).innerHTML=txt}function errorHandler(msg){document.getElementById(span).innerHTML=msg}}function insert_eingabe(begriff,txt_id,div_id){var txt=document.getElementById(txt_id);var div=document.getElementById(div_id);if(txt&&div){txt.value=begriff;div.style.visibility="hidden"}}function eingabe(eingabe_id){var eingabe=document.getElementById(eingabe_id);eingabe.focus()}
function div_close(div){if(document.getElementById(div))document.getElementById(div).style.visibility="hidden"}
function eventHandling(element,type,callBack,returnParams){var returnParams=returnParams;if(document.addEventListener){if(type.match(/^on/))type=type.replace(/^on/,"");element.addEventListener(type,handleEvent,false)}else{if(!type.match(/^on/))type="on"+type;element.attachEvent(type,handleEvent)}function handleEvent(evt){var event=evt?evt:window.event?window.event:"";if(event.stopPropagation)event.stopPropagation();else event.cancelBubble=true;var target=event.srcElement||event.currentTarget;callBack.call(callBack,
event,target,returnParams?returnParams:null)}}
function keynavigation(obj,div_id,txt_id){var curElement=null;obj.innerHTML=clearSpaces(obj.innerHTML);var naviElement=obj;eventHandling(document,"keydown",keyPressed);function clearSpaces(strOut){strOut=strOut.replace(/li>\s+/gm,"li>");strOut=strOut.replace(/\s+<li/gm,"<li");strOut=strOut.replace(/li>\s+<li/gm,"li><li");return strOut}function keyPressed(evt){var curKey=evt.keyCode;switch(curKey){case 38:if(curElement&&!curElement.previousSibling){curElement=naviElement.lastChild.previousSibling;
document.getElementById(txt_id).value=curElement.firstChild.id;curElement.style.backgroundColor="#6990b6";curElement.firstChild.style.color="#FFF";firstElement=naviElement.firstChild;var farbe=naviElement.firstChild.className=="lev"?"#900":"#000";firstElement.style.backgroundColor="";firstElement.firstChild.style.color=farbe}else if(curElement&&curElement.previousSibling){curElement=curElement.previousSibling;document.getElementById(txt_id).value=curElement.firstChild.id;curElement.style.backgroundColor=
"#6990b6";curElement.firstChild.style.color="#FFF";if(curElement.nextSibling){var farbe=curElement.nextSibling.className=="lev"?"#900":"#000";curElement.nextSibling.firstChild.style.color=farbe;curElement.nextSibling.style.backgroundColor=""}}else if(!curElement){curElement=naviElement.lastChild.previousSibling;document.getElementById(txt_id).value=curElement.firstChild.id;curElement.style.backgroundColor="#6990b6";curElement.firstChild.style.color="#FFF"}break;case 40:if(curElement)if(!curElement.nextSibling){curElement=
naviElement.firstChild.nextSibling;document.getElementById(txt_id).value=curElement.firstChild.id;curElement.style.backgroundColor="#6990b6";curElement.firstChild.style.color="#FFF";var farbe=naviElement.lastChild.className=="lev"?"#900":"#000";lastElement=naviElement.lastChild;lastElement.style.backgroundColor="";lastElement.firstChild.style.color=farbe}else{if(curElement.nextSibling){curElement=curElement.nextSibling;document.getElementById(txt_id).value=curElement.firstChild.id;curElement.style.backgroundColor=
"#6990b6";curElement.firstChild.style.color="#FFF";if(curElement.previousSibling){var farbe=curElement.previousSibling.className=="lev"?"#900":"#000";curElement.previousSibling.firstChild.style.color=farbe;curElement.previousSibling.style.backgroundColor=""}}}else{curElement=naviElement.firstChild.nextSibling;document.getElementById(txt_id).value=curElement.firstChild.id;curElement.style.backgroundColor="#6990b6";curElement.firstChild.style.color="#FFF"}break;case 13:if(curElement)document.getElementById(div_id).style.visibility=
"hidden";break;case 9:if(curElement)document.getElementById(div_id).style.visibility="hidden";default:return}}this.updateList=function(obj_new_list){obj_new_list.innerHTML=clearSpaces(obj_new_list.innerHTML);naviElement=obj_new_list;curElement=null}}
function farbe(div_id){as=document.getElementById(div_id).getElementsByTagName("a").length-1;for(i=0;i<=as;i++){document.getElementById(div_id).getElementsByTagName("a")[i].style.color="";document.getElementById(div_id).getElementsByTagName("li")[i].style.backgroundColor=""}}function ac(eingabe){if(!document.getElementById)return false;var f=document.getElementById(eingabe);f.setAttribute("autocomplete","off")}
(function($){$.extend($.fx.step,{backgroundPosition:function(fx){if(fx.state===0&&typeof fx.end=="string"){var start=$.curCSS(fx.elem,"backgroundPosition");start=toArray(start);fx.start=[start[0],start[2]];var end=toArray(fx.end);fx.end=[end[0],end[2]];fx.unit=[end[1],end[3]]}var nowPosX=[];nowPosX[0]=(fx.end[0]-fx.start[0])*fx.pos+fx.start[0]+fx.unit[0];nowPosX[1]=(fx.end[1]-fx.start[1])*fx.pos+fx.start[1]+fx.unit[1];fx.elem.style.backgroundPosition=nowPosX[0]+" "+nowPosX[1];function toArray(strg){strg=
strg.replace(/left|top/g,"0px");strg=strg.replace(/right|bottom/g,"100%");strg=strg.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");var res=strg.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/);return[parseFloat(res[1],10),res[2],parseFloat(res[3],10),res[4]]}}})})(jQuery);
$(function(){$(".titelb").css({backgroundPosition:"0 0"});$("div.boxb").mouseover(function(){$(this).find(".titelb").stop().animate({backgroundPosition:"(-340px 0)"},{duration:300});$(this).find("ul").css("display","block");$(this).css("background","none")});$("div.boxb").mouseout(function(){$(this).find("ul").css("display","none");var pfad="url(/img/box/"+this.id+".png)";$(this).css({"background-image":pfad,"backgroundPosition":"50% 45%","backgroundRepeat":"no-repeat"});$(this).find(".titelb").stop().animate({backgroundPosition:"(-640px 0)"},
{duration:200,complete:function(){$(this).css({backgroundPosition:"0 0"})}})});$("#suchoptionen").click(function(){$("#suchtipps").toggle()});$("h5.haftung").click(function(){$("p.haftung").toggle()});$("h5.extern").click(function(){$("p.extern").toggle()});$("h5.urheber").click(function(){$("p.urheber").toggle()});$("h5.datenschutz").click(function(){$("p.datenschutz").toggle()});$("h5.nutzung").click(function(){$("p.nutzung").toggle()});$("h5.googleplus").click(function(){$("div.googleplus").toggle()});
$("ul#grt li[class*='lang_']").mouseenter(function(){var sprache=$(this).attr("class").split("_")[1];var oddeven=$(this).attr("class").split("_")[2];if(sprache=="en"){var laenge=230;var zeichen=5}else{var laenge=200;var zeichen=10}titel=$(this).children().attr("title");urspr=$(this).children().text();if(oddeven=="odd")urspu=$(this).next("li").children().text();else urspu=$(this).prev("li").children().text();if(urspu.length>zeichen+1)urspk=urspu.substr(0,zeichen)+"...";else urspk=urspu;if(oddeven==
"odd"){$(this).animate({"width":laenge+"px"},400).next("li").animate({"width":282-laenge+"px"},400);$(this).next("li").children().text(urspk)}else{$(this).animate({"width":laenge+"px"},400).prev("li").animate({"width":282-laenge+"px"},400);$(this).prev("li").children().text(urspk)}$(this).children().text(titel)});$("ul#grt li[class*='lang_']").mouseleave(function(){var oddeven=$(this).attr("class").split("_")[2];if(oddeven=="odd"){$(this).animate({"width":"141px"},400).next("li").animate({"width":"141px"},
400);$(this).next("li").children().text(urspu)}else{$(this).animate({"width":"141px"},400).prev("li").animate({"width":"141px"},400);$(this).prev("li").children().text(urspu)}$(this).children().text(urspr)});$(".star").mouseover(function(){klick="";var sprache=$(this).parent().attr("id").split("_")[3];frage=sprache=="en"?"Is this article correct, complete and well written?":"Ist dieser Artikel korrekt, vollst\u00e4ndig und gut verst\u00e4ndlich?";var star=$(this).index()+1;$(this).parent().css("background-position",
"0 -"+32*star+"px");$(".voteme").html(frage);$(".voteme").css({"background":"#eee","border":"1px solid #aaa"})});$(".star-rating").mouseout(function(){if(klick!="ok"){var originalresult=$(this).attr("id").split("_")[1];$(this).css("background-position","0 -"+32*originalresult+"px")}else{var id=$(this).attr("id").split("_")[0];var sp=$(this).attr("id").split("_")[3];$.post("/inf/vote.php",{id:id,sprache:sp,typ:"out"},function(result){$(".star-rating").css("background-position","0 -"+32*result+"px")})}$(".voteme").html("&nbsp;");
$(".voteme").css({"background":"#fff","border":"1px solid #fff"})});$(".star").click(function(){klick="ok";var id=$(this).parent().attr("id").split("_")[0];var ip=$(this).parent().attr("id").split("_")[2];var sp=$(this).parent().attr("id").split("_")[3];var vote=$(this).index()+1;var param="id="+id+"&vote="+vote+"&ip="+ip+"&sprache="+sp;$.ajax({type:"POST",url:"/inf/vote.php",data:param});$(".result").html("<img src='/img/loader.gif' alt='Loader' width='16' height='16' />");$(".result").load("/inf/vote.php",
{"value[]":[id,sp,"get"]})})});
