function mailpage()

{

  mail_str = "mailto:?subject=Mein Tipp: " + document.title;
  mail_str += "&body=Hallo, folgende Seite kann ich nur weiterempfehlen: " + document.title;
  mail_str += ". Zu finden ist sie unter " + location.href; 
  location.href = mail_str;

}


function openBrWindow(theURL,winName,features) {
 window.open(theURL,winName,features);
}

function bookmarken()
{ 
  var url = window.location.host;
  var urllink = "http://" + url;
  var urltitel = document.title;
  window.external.AddFavorite(urllink,urltitel); 
}

// check for ie5 mac
var bugRiddenCrashPronePieceOfJunk = (
    navigator.userAgent.indexOf('MSIE 5') != -1
    &&
    navigator.userAgent.indexOf('Mac') != -1
)

// check for W3CDOM compatibility
var W3CDOM = (!bugRiddenCrashPronePieceOfJunk &&
               document.getElementsByTagName &&
               document.createElement);

// cross browser function for registering event handlers
function registerEventListener(elem, event, func) {
    if (elem.addEventListener) {
        elem.addEventListener(event, func, false);
        return true;
    } else if (elem.attachEvent) {
        var result = elem.attachEvent("on"+event, func);
        return result;
    }
    // maybe we could implement something with an array
    return false;
}
function registerFunction(func) {
    // registers a function to fire onload.
    registerEventListener(window, "load", func);
}

/* ----- cookie_functions.js ----- */
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+"="+escape(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 unescape(c.substring(nameEQ.length,c.length));
        }
    }
    return null;
};

// StyleSwitcher functions written by Paul Sowden
function setActiveStyleSheet(title, reset) {
    // terminate if we hit a non-compliant DOM implementation
    if (!W3CDOM){return false};

    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;
            }
        }
    }
    if (reset == 1) {
        createCookie("wstyle", title, 365);
    }
};

function setStyle() {
    var style = readCookie("wstyle");
    if (style != null) {
        setActiveStyleSheet(style, 0);
    }
};
registerFunction(setStyle);



   if (document.getElementById) {
        document.write("<style type='text/css'>");
           document.write(".inlineJsRequired {display: inline}");
           document.write(".blockJsRequired {display: block}");
           document.write(".blocktoggle {display: none}");
        document.write("</"+"style>");
        var shown = new Array();
   }
   function blocktoggle(i) {
     if (document.getElementById) {
    shown[i] = (shown[i]) ? false : true;
          currentdisplay = (shown[i]) ? 'block' : 'none';
                document.getElementById('blocktoggle'+i).style.display = currentdisplay;
        }
   }
