<!--

// ----------------------------------------------
// StyleSwitcher functions 
///////////////////////////////////////////////////////////////////////////////////////
//Dateikopf html.datei
//<link rel="home" title="home" href="http://www.domain.de/" />
//<link rel="contents" title="archives" href="http://www.domain.de/archives/" />
//<link rel="stylesheet" type="text/css" media="screen" //href="http://www.domain.de/css/lofi.css" />
//<link rel="stylesheet" type="text/css" media="screen" //href="http://www.domain.de/css/style.css"/>
//<link rel="alternate stylesheet" type="text/css" media="screen" //href="http://www.domain.de/css/classic.css" title="classic" />
//<link rel="alternate stylesheet" type="text/css" media="screen" //href="http://www.domain.de/css/slate.css" title="slate" />
//<link rel="alternate" type="application/rss+xml" title="RSS" //href="http://www.www.domain.de/xml/rss.xml" />
//<script type="text/javascript" src="http://www.www.domain.de/js/scripts.js"></script>

//////////////////////////////////////////////////////////////////////////////////////
//Aufruf im Quelltext

//<a href="#" onclick="setActiveStyleSheet('', 1);return false;" title="Switch to default theme" //class="noline"><img src="/images/theme_default.gif" width="19" height="17" alt="Change to //default theme" border="0" /></a>
//                <a href="#" onclick="setActiveStyleSheet('slate', 1);return false;" //title="Switch to slate theme" class="noline"><img src="/images/theme_slate.gif" width="19" //height="17" alt="Change to slate theme" border="0" /></a>
//                <a href="#" onclick="setActiveStyleSheet('classic', 1);return false;" //title="Switch to classic theme" class="noline"><img src="/images/theme_classic.gif" width="19" //height="17" alt="Change to classic theme" border="0" /></a>

//////////////////////////////////////////////////////////////////////////////////////


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;
}

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;
}

window.onload = function(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);


//highlight///////////////////////////////////////////////////////////
function high(which2)
{
theobject=which2;
which2.filters.alpha.opacity=25;
highlighting=setInterval("highlightit(theobject)",1)
}
function low(which2)
{
clearInterval(highlighting)
which2.filters.alpha.opacity=100
}
function highlightit(cur2)
{
if (cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=2
else if (window.highlighting)
clearInterval(highlighting)
}



// Random hp image

function randomImg() {
        var thePics = new Array()

        thePics[1] = "electric.jpg"
        thePics[2] = "nantucket.jpg"
        thePics[3] = "firerings.jpg"
        thePics[4] = "ice.jpg"
        thePics[6] = "robot.jpg"
        thePics[7] = "stormy_sky.jpg"
        thePics[8] = "az_road.jpg"
        thePics[9] = "train_ride.jpg"
        thePics[10] = "wheat_field.jpg"
        thePics[11] = "birch.jpg"
        thePics[11] = "cactus.jpg"

        var rn = Math.floor(Math.random() * thePics.length)
        if (rn == 0) {
          rn = 1
        }
        document.write("<img src=\"/photos/hp/"+thePics[rn]+"\" width=\"194\" height=\"146\" border=\"0\" />")
}

// MT functions

function OpenTrackback (c) {
    window.open(c,
                    'trackback',
                    'width=480,height=480,scrollbars=yes,status=yes');
}

var HOST = 'www.simplebits.com';

// Copyright (c) 1996-1997 Athenia Associates.
// http://www.webreference.com/js/
// License is granted if and only if this entire
// copyright notice is included. By Tomer Shiran.

function setCookie (name, value, expires, path, domain, secure) {
    var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : "");
    document.cookie = curCookie;
}

function getCookie (name) {
    var prefix = name + '=';
    var c = document.cookie;
    var nullstring = '';
    var cookieStartIndex = c.indexOf(prefix);
    if (cookieStartIndex == -1)
        return nullstring;
    var cookieEndIndex = c.indexOf(";", cookieStartIndex + prefix.length);
    if (cookieEndIndex == -1)
        cookieEndIndex = c.length;
    return unescape(c.substring(cookieStartIndex + prefix.length, cookieEndIndex));
}

function deleteCookie (name, path, domain) {
    if (getCookie(name))
        document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
}

function fixDate (date) {
    var base = new Date(0);
    var skew = base.getTime();
    if (skew > 0)
        date.setTime(date.getTime() - skew);
}

function rememberMe (f) {
    var now = new Date();
    fixDate(now);
    now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
    setCookie('mtcmtauth', f.author.value, now, '', HOST, '');
    setCookie('mtcmtmail', f.email.value, now, '', HOST, '');
    setCookie('mtcmthome', f.url.value, now, '', HOST, '');
}

function forgetMe (f) {
    deleteCookie('mtcmtmail', '', HOST);
    deleteCookie('mtcmthome', '', HOST);
    deleteCookie('mtcmtauth', '', HOST);
    f.email.value = '';
    f.author.value = '';
    f.url.value = '';
}




function chkFormular()
{
 if(document.mail.Name.value == "")  {
   alert("Bitte Ihren Namen eingeben!");
   document.mail.Name.focus();
   return false;
  }
  if(document.mail.Email.value == "") {
   alert("Bitte Ihre E-Mail-Adresse eingeben!");
   document.mail.Email.focus();
   return false;
  }
  
}




//-->