/* Style-Switcher von: Aktion Mensch - Einfach fuer Alle */
/* Lizenzbedingungen zur freien Nutzung: */ 
/* http://www.einfachfueralle.de/lizenz/ */
/* http://barrierefrei.e-workers.de/intern_lizenz.php */

function setActiveStyleSheet(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel") && a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) {
	a.disabled = false;
	cookieManager.setCookie("style", title, 365);
      }
    }
  }
}

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;
}

var cookie = cookieManager.getCookie("style");
var title = cookie ? cookie : getPreferredStyleSheet();
setActiveStyleSheet(title);


function showToolbox()
{
document.write( "<form action=\"switch\">" );
document.write( "<select id=\"style\" size=\"1\" onchange=\"setActiveStyleSheet(value);\">" );
document.write( "<option id=\"show\" value=\"Standard\" title=\"Gestaltung f&uuml;r grafische Browser\"> Standard<\/option>" );
/*document.write( "<option id=\"show\" value=\"Schwarz/Weiß\" title=\"Schwarz/Weiß\" class=\"opt5\"> Schwarz/Weiß<\/option>" );	
document.write( "<option id=\"show\" value=\"Text\" title=\"Ansicht invertierter Schrift\" class=\"opt2\"> Text invertiert<\/option>" );*/
document.write( "<option id=\"show\" value=\"Ohne\" title=\"Kein Layout\" class=\"opt4\"> Kein Layout<\/option>" );
document.write( "<\/select>" );
document.write( "<\/form>" );
}

/* Paul Miller */
/* http://www.hypedup.co.uk */
/* Pseudo-Hover fuer Grafik-Buttons */

if ((navigator.appName.indexOf('Microsoft')+1)) {
document.write('<style type="text/css"> .opacity1 {filter:alpha(opacity=60)} .opacity2 {filter:alpha(opacity=99.999)} </style>'); }
if ((navigator.appName.indexOf('Netscape')+1)) {
document.write('<style type="text/css"> .opacity1 {-moz-opacity:0.6} .opacity2 {-moz-opacity:0.999} </style>'); }
else {
document.write(''); }

