var sfHover = function() {
	var sfEls = document.getElementById("nav").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);

var para = location.search;
para = para.replace(/^\?/, "").split("&");

function getQuery(r){
var w='';
 for (var i = 0; i < para.length; i++){
	var split = para[i].split("=");
	var name = split[0];
	if(name.toUpperCase()==r.toUpperCase()){
	 split.splice(0, 1);
	 var wert = split.join("=");
	 try{
		w = decodeURIComponent(wert);
	 }
	 catch(e){
		w = '';
	 }
	}
 }
 return(w)
}

var tBild = new Image;
tBild.src= '/visit.asp?h='+window.location.hostname+'&p='+window.location.pathname+'&i='+window.location.search+'&c='+(Math.random()*100000);

function tiktak(){
   var now = new Date()
   var hours = now.getHours()
   var minutes = now.getMinutes()
   var seconds = now.getSeconds()
   var timeValue = "" + ((hours >9) ? hours : "0"+hours)
   timeValue += ((minutes < 10) ? ":0" : ":") + minutes
   timeValue += ((seconds < 10) ? ":0" : ":") + seconds
   dieUhr=document.getElementById("uhr")
   if(dieUhr) dieUhr.innerHTML = timeValue
   timerID = setTimeout("tiktak()",1000)
}

function getCookie(Name) {
   var search = Name + "="
   if (document.cookie.length > 0) {
      offset = document.cookie.indexOf(search) 
      if (offset != -1) {
         offset += search.length 
         end = document.cookie.indexOf(";", offset) 
         if (end == -1) 
            end = document.cookie.length
         return unescape(document.cookie.substring(offset, end))
      } 
   }
}

function setCookie(name, value, expire) {
   document.cookie = name + "=" + escape(value)
   + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()))
}

function setVerfall(d) {
if(d==null && d=='') d=0;
 var today = new Date();
 var expires = new Date();
 expires.setTime(today.getTime() + 1000*60*60*24*d);
return(expires);
}


