<!-- CSS Dropdown IE -->
sfHover = function() {
	var sfEls = document.getElementById("navi").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
<!-- CSS Dropdown IE end -->

<!-- Cookiereader -->
/* changed by andiriad */
function createCookie(name,value,days) {
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
  }
  else expires = "";
  document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
  var nameEQ = name + "=";
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) 
      return c.substring(nameEQ.length,c.length);
  }
  return null;
}
<!-- Cookiereader end -->

<!-- Print -->
/*@author andiriad */
function setPrintPreview (wert)
{
  createCookie("print", wert);
}

function getPrintPreview ()
{
   var wert = readCookie ('print');
   return wert;
}

function printPreview() 
{ 
      var wert = getPrintPreview(); 
      var lastknownstyle = readCookie("style");
     
      if (wert == 'true') 
         { 
           setPrintPreview('false');
           setActiveStyleSheet('printpreview'); return false; 
           createCookie ("style", 'lastknownstyle', '10');
         }
      else if (lastknownstyle == 'printpreview')
         {
           setActiveStyleSheet('default'); return false; 
           createCookie ("style", 'default', '10');
         }
} 
<!-- Print end -->

<!--Fontsizer-->
/*@author andiriad */
var classarray=['container-center-content','content-bottom','fontsizer'];

function smallFontSize() {
     for(var i=0; i<classarray.length; i++)
     {
     document.getElementById(classarray[i]).className = 'small';
     }  
     //Werden keine days mitübergeben, bleibt das Cookie bis zum Ende der Session aktiv
     createCookie("size", "small", "10");
}

function normalFontSize() {
     for(var i=0; i<classarray.length; i++)
     {
     document.getElementById(classarray[i]).className = 'normal';
     }  
     createCookie("size", "normal", "10");
}

function largeFontSize() {
     for(var i=0; i<classarray.length; i++)
     {
     document.getElementById(classarray[i]).className = 'large';
     }  
     createCookie("size", "large", "10");  
}

function sizeLoader()
{
     if(document.cookie)
     {
     var wert = readCookie('size');
     if(wert == 'small')
     { smallFontSize();}
     else if(wert == 'normal')
     { normalFontSize(); }
     else if (wert == 'large')
     { largeFontSize(); }
     else {normalFontSize();}
     } //if Ende
}
<!--Fontsizer end -->

<!--Styleswitcher-->
function setActiveStyleSheet(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}

function getActiveStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
  }
  return null;
}

function getPreferredStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1
       && a.getAttribute("rel").indexOf("alt") == -1
       && a.getAttribute("title")
       ) return a.getAttribute("title");
  }
  return null;
}


/* changed by andiriad */
  function styleLoader(e) {
  var cookie = readCookie("style");
  var title = cookie ? cookie : getPreferredStyleSheet();
  setActiveStyleSheet(title);
}

window.onunload = function(e) {
  var title = getActiveStyleSheet();
  createCookie("style", title, 365);
}

var cookie = readCookie("style");
var title = cookie ? cookie : getPreferredStyleSheet();
setActiveStyleSheet(title);
<!--Styleswitcher end -->

<!-- fastest onloadHandler -->
var FastInit = {
	onload : function() {
		if (FastInit.done) { return; }
		FastInit.done = true;
		for(var x = 0, al = FastInit.f.length; x < al; x++) {
			FastInit.f[x]();
		}
	},
	addOnLoad : function() {
		var a = arguments;
		for(var x = 0, al = a.length; x < al; x++) {
			if(typeof a[x] === 'function') {
				if (FastInit.done ) {
					a[x]();
				} else {
					FastInit.f.push(a[x]);
				}
			}
		}
	},
	listen : function() {
		if (/WebKit|khtml/i.test(navigator.userAgent)) {
			FastInit.timer = setInterval(function() {
				if (/loaded|complete/.test(document.readyState)) {
					clearInterval(FastInit.timer);
					delete FastInit.timer;
					FastInit.onload();
				}}, 10);
		} else if (document.addEventListener) {
			document.addEventListener('DOMContentLoaded', FastInit.onload, false);
		} else if(!FastInit.iew32) {
			if(window.addEventListener) {
				window.addEventListener('load', FastInit.onload, false);
			} else if (window.attachEvent) {
				return window.attachEvent('onload', FastInit.onload);
			}
		}
	},
	f:[],done:false,timer:null,iew32:false
};
/*@cc_on @*/
/*@if (@_win32)
FastInit.iew32 = true;
document.write('<script id="__ie_onload" defer src="' + ((location.protocol == 'https:') ? '//0' : 'javascript:void(0)') + '"><\/script>');
document.getElementById('__ie_onload').onreadystatechange = function(){if (this.readyState == 'complete') { FastInit.onload(); }};
/*@end @*/
FastInit.listen();
<!-- fastest onloadHandler end -->

<!-- Searchfield -->
/* 

    SearchField 
    written by Alen Grakalic, provided by Css Globe (cssglobe.com)
    please visit http://cssglobe.com/post/1202/style-your-websites-search-field-with-jscss/ for more info

    changed by Andiriad 
*/

searchfield = function(suggestioninput, defaultText){
    
    // CONFIG 
    
    // this is id of the search field you want to add this script to. 
    // You can use your own id just make sure that it matches the search field in your html file.
    var id = "searchterm";
    
    // Text you want to set as a default value of your search field.
    //var defaultText = "Seite durchsuchen..";  
    
    // set to either true or false
    // when set to true it will generate search suggestions list for search field based on content of variable below
    var suggestion = true;
    
    // static list of suggestion options, separated by comma
    // replace with your own
    var suggestionText = suggestioninput; 
    
    // END CONFIG (do not edit below this line, well unless you really, really want to change something :) )
    
    // Peace, 
    // Alen

    var field = document.getElementById(id);    
    var classInactive = "sf_inactive";
    var classActive = "sf_active";
    var classText = "sf_text";
    var classSuggestion = "sf_suggestion";
    this.safari = ((parseInt(navigator.productSub)>=20020000)&&(navigator.vendor.indexOf("Apple Computer")!=-1));
    if(field){
        field.value = defaultText;
        field.c = field.className;      
        field.className = field.c + " " + classInactive;
        field.onfocus = function(){
            this.className = this.c + " "  + classActive;
            this.value = (this.value == "" || this.value == defaultText) ?  "" : this.value;
        };
        field.onblur = function(){
            this.className = (this.value != "" && this.value != defaultText) ? this.c + " " +  classText : this.c + " " +  classInactive;
            this.value = (this.value != "" && this.value != defaultText) ?  this.value : defaultText;
            clearList();
        };
        if (suggestion){
            
            var selectedIndex = 0;
                        
            field.setAttribute("autocomplete", "off");
            var div = document.createElement("div");
            var list = document.createElement("ul");
            list.style.display = "none";
            div.className = classSuggestion;
            list.style.width = field.offsetWidth + "px";
            div.appendChild(list);
            field.parentNode.appendChild(div);  

            field.onkeypress = function(e){
                
                var key = getKeyCode(e);
        
                if(key == 13){ // enter
                    selectList();
                    selectedIndex = 0;
                    return false;
                };  
            };
                
            field.onkeyup = function(e){
            
                var key = getKeyCode(e);
        
                switch(key){
                case 13:
                    return false;
                    break;          
                case 27:  // esc
                    field.value = "";
                    selectedIndex = 0;
                    clearList();
                    break;              
                case 38: // up
                    navList("up");
                    break;
                case 40: // down
                    navList("down");        
                    break;
                default:
                    startList();            
                    break;
                };
            };
            
            this.startList = function(){
                var arr = getListItems(field.value);
                if(field.value.length > 0){
                    createList(arr);
                } else {
                    clearList();
                };  
            };
            
            this.getListItems = function(value){
                var arr = new Array();
                var src = suggestionText;
                var src = src.replace(/, /g, ",");
                var arrSrc = src.split(",");
                for(i=0;i<arrSrc.length;i++){
                    if(arrSrc[i].substring(0,value.length).toLowerCase() == value.toLowerCase()){
                        arr.push(arrSrc[i]);
                    };
                };              
                return arr;
            };
            
            this.createList = function(arr){                
                resetList();            
                if(arr.length > 0) {
                    for(i=0;i<arr.length;i++){              
                        li = document.createElement("li");
                        a = document.createElement("a");
                        a.href = "javascript:void(0);";
                        a.i = i+1;
                        a.innerHTML = arr[i];
                        li.i = i+1;
                        li.onmouseover = function(){
                            navListItem(this.i);
                        };
                        a.onmousedown = function(){
                            selectedIndex = this.i;
                            selectList(this.i);     
                            return false;
                        };                  
                        li.appendChild(a);
                        list.setAttribute("tabindex", "-1");
                        list.appendChild(li);   
                    };  
                    list.style.display = "block";               
                } else {
                    clearList();
                };
            };  
            
            this.resetList = function(){
                var li = list.getElementsByTagName("li");
                var len = li.length;
                for(var i=0;i<len;i++){
                    list.removeChild(li[0]);
                };
            };
            
            this.navList = function(dir){           
                selectedIndex += (dir == "down") ? 1 : -1;
                li = list.getElementsByTagName("li");
                if (selectedIndex < 1) selectedIndex =  li.length;
                if (selectedIndex > li.length) selectedIndex =  1;
                navListItem(selectedIndex);
            };
            
            this.navListItem = function(index){ 
                selectedIndex = index;
                li = list.getElementsByTagName("li");
                for(var i=0;i<li.length;i++){
                    li[i].className = (i==(selectedIndex-1)) ? "selected" : "";
                };
            };
            
            this.selectList = function(){
                li = list.getElementsByTagName("li");   
                a = li[selectedIndex-1].getElementsByTagName("a")[0];
                field.value = a.innerHTML;
                clearList();
            };          
            
        };
    };
    
    this.clearList = function(){
        if(list){
            list.style.display = "none";
            selectedIndex = 0;
        };
    };      
    this.getKeyCode = function(e){
        var code;
        if (!e) var e = window.event;
        if (e.keyCode) code = e.keyCode;
        return code;
    };
    
};

// script initiates on page load. 

//this.addEvent = function(obj,type,fn){
//  if(obj.attachEvent){
//      obj['e'+type+fn] = fn;
//      obj[type+fn] = function(){obj['e'+type+fn](window.event );}
//      obj.attachEvent('on'+type, obj[type+fn]);
//  } else {
//      obj.addEventListener(type,fn,false);
//  };
//};
//addEvent(window,"load",searchfield);
<!-- Searchfield end -->

<!-- readerSpeaker -->
function readpage(br_url,br_post) {
  brcall=escape(br_url);
  br_player="<table style='border:1px solid #aeaeae;'><tr><td style='border-style: none;'>"+"<object type='application/x-shockwave-flash'  classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' height='20' width='250'><param name='movie' value='http://media.readspeaker.com/flash/wrplayer.swf?mp3="+brcall+"&bgcolor=FFFFFF&autoplay=1&text_play=Play&text_pause=Pause&text_stop=Stop&text_vol=Volume'><param name='quality' value='high'><param name='SCALE' value='exactfit'><param name='wmode' value='transparent'><embed wmode='transparent' src='http://media.readspeaker.com/flash/wrplayer.swf?mp3="+brcall+"&autoplay=1&text_play=Play&text_pause=Pause&text_stop=Stop&text_vol=Volume' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwaveflash' autostart='true' scale='exactfit' height='20' width='250'></embed></object>";
  br_html="<br><span style='font-size: 10px; font-face: verdana,arial;'>Sprachwiedergabe durch <a target='rs' href='http://www.readspeaker.com/?ref=webreader'>ReadSpeaker</a></span>";
  br_html+="<br><span style='font-size: 10px; font-face: verdana,arial;'><a href='"+br_url+"'>Keine Sprachwiedergabe?</a></span></td>";
  c_html="<td style='vertical-align: top; border-style: none;' ><a href='javascript:closebr("+br_post+");'><img style='border-style: none;' id='closebr' src='http://media.readspeaker.com/images/webreader/close.gif' alt='Player schlie&szlig;en' title='Player schlie&szlig;en'></a></td></tr>";
  ad_html="<tr><td colspan='2' style='border-style: none;'><a href='http://app.readspeaker.com/adserver/adserver.php?cid=fd8445bb2d3e7aa42513b04ae70316b2&t=2&l=de_de&c=8&r=AT&p=200' target='_blank'><img style='margin-left: 14px; border-style: none' src='http://app.readspeaker.com/adserver/adserver.php?cid=fd8445bb2d3e7aa42513b04ae70316b2&t=1&l=de_de&c=8&r=AT&p=200'></td></tr>";
  if (br_post!='') {
    WR="WR_"+br_post;
  }
  else {
    WR="WR";
  }
  var x=document.getElementById(WR);
  if (x) {
    x.innerHTML=br_player+br_html+c_html+ad_html+"</table>";
  }
}

function closebr(br_post) {
  if (br_post!='') {
    WR="WR_"+br_post;
  }
  else {
    WR="WR";
  }
  var x=document.getElementById(WR);
  if (x) {
    x.innerHTML="";
  }
}
<!-- readerSpeaker end -->






