<!--
function cleanit(thefield){
if(thefield.defaultValue==thefield.value){
thefield.value='';
}
}


opened='';
stop_options2='';

function options() {
if (opened == 'i') {
stop_options2=setTimeout("options2();",1500);
opened='';
}else{
clearTimeout(stop_options2);
var ne=document.getElementById("note_extras");

ne.style.height ='370px';
ne.style.width ='410px';
ne.style.overflow ='auto';
document.getElementById("info_extras").style.display = 'none';
opened='i';
}
}

function options2() {
document.getElementById("note_extras").style.height ='40px';
document.getElementById("note_extras").style.width ='40px';
document.getElementById("note_extras").style.overflow ='hidden';
}


function bookmarksite(title,url) {
if (window.sidebar) // firefox
window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
var elem = document.createElement('a');
elem.setAttribute('href',url);
elem.setAttribute('title',title);
elem.setAttribute('rel','sidebar');
elem.click();
} 
else if(document.all)// ie
window.external.AddFavorite(url, title);
}


function StopCopy() {
document.onselectstart=new Function ("return false");
document.getElementById('note_text').onmouseup=function(event){mouse(event);};

var ne=document.getElementById("note_extras");
ne.onmouseover=function(){options();};
ne.onmouseout=function(){options();};
}


function StopView() {
document.getElementById("note_text").style.width ='410px';
document.getElementById("gutscheincode").style.display = 'block';
stoptext='Der Inhalt wird dir auf Wunsch des Verfassers der Mitschrift im Sinne von "geben und nehmen" erst mit dem Eingeben eines gültigen Gutscheincodes angezeigt. Jeder erhält nach dem Veröffentlichen einer neuen Mitschrift einen einmaligen Gutscheincode.';
document.getElementById("note_text").innerHTML=stoptext;
}


function mouse(e){
var rightclick;
if (!e) var e = window.event;
if (e.which) rightclick = (e.which == 3);
else if (e.button) rightclick = (e.button == 2);
if(!rightclick) return true;

var interupt=true;
document.oncontextmenu = function(){if(interupt){interupt = false;return false;};};
}


function load(art) {
try {
xmlhttp = window.XMLHttpRequest?new XMLHttpRequest():
new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e) { /* do nothing */ }

xid = Math.random();
xid *= 10000000000000;
xid = Math.ceil(xid);

if (art == 'citys') {
StrLen = document.search.q_city.value.length;
if (document.search.q_city.value) {
xmlhttp.onreadystatechange = triggered;
xmlhttp.open("GET", 'search.pl?q='+document.search.q_city.value+'&art='+art+'&l='+StrLen+'&xid='+xid);
xmlhttp.send(null);
}
}

if (art == 'events') {
StrLen = document.search.q_event.value.length;
if (document.search.q_event.value) {
xmlhttp.onreadystatechange = triggered2;
xmlhttp.open("GET", 'search.pl?q='+document.search.q_event.value+'&art='+art+'&l='+StrLen+'&xid='+xid);
xmlhttp.send(null);
}
}
}


function triggered() {
if (xmlhttp.readyState == 4) if (xmlhttp.status == 200)
document.getElementById("results_city").innerHTML =xmlhttp.responseText;
document.getElementById("results_city").style.display = 'block';
}


function triggered2() {
if (xmlhttp.readyState == 4) if (xmlhttp.status == 200)
document.getElementById("results_event").innerHTML =xmlhttp.responseText;
document.getElementById("results_event").style.display = 'block';
}


function antispam() {
try {
xmlhttp=window.XMLHttpRequest?new XMLHttpRequest():
new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e) { /* do nothing */ }
xmlhttp.onreadystatechange=triggered3;
xmlhttp.open("GET",'antispam.pl?code='+authid);
xmlhttp.send(null);
}

function triggered3() {
document.search.auth.value=authid;
document.getElementById('search_submit').disabled=false;

if (xmlhttp.readyState == 4) if (xmlhttp.status == 200)
result=xmlhttp.responseText;
}


function setContent(id,thecontent,art) {
if (art == 'citys') {
document.search.cityid.value=id;
document.search.q_city.value='';
document.getElementById("city").innerHTML = thecontent;
document.getElementById("search_city").style.display = 'none';
antispam();
}

if (art == 'events') {
document.search.eventid.value=id;
document.search.q_event.value='';
document.getElementById("event").innerHTML = thecontent;
document.getElementById("search_event").style.display = 'none';
}

document.getElementById("save_note").style.display = 'block';
}


// number of days
var expDays = 1; 

// Wartezeit
var secs = 25; 
var wait = secs * 1000;


function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {

var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}

function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}

function DeleteCookie (name) {
var exp = new Date();
exp.setTime (exp.getTime() - 1);
var cval = GetCookie (name);
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}

var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));

function amt() {
var count = GetCookie('count')
if(count == null) {
SetCookie('count','1')
return 1
}
else {
var newcount = parseInt(count) + 1;
DeleteCookie('count')
SetCookie('count',newcount,exp)
return count
}
}

function getCookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}

function checkCount() {
var count = GetCookie('count');
if (count == null) {
count=1;
SetCookie('count', count, exp);

for(i=1;i<=secs;i++) {
window.setTimeout("update(" + i + ")", i * 1000);
}

document.getElementById("darkness").style.display = 'block';
document.getElementById("support").style.display = 'block';
window.setTimeout("closeall();",25*1000);
setInterval("moveR();",10);

}
else {
count++;
SetCookie('count', count, exp);
}
}


function moveR() {
bodyfrm = ( document.compatMode.toLowerCase()=="css1compat" ) ? document.documentElement : document.body;
dar = document.getElementById("darkness").style;
supp = document.getElementById("support").style;

dar_top=bodyfrm.scrollTop+160;
dar.top=dar_top+"px";

supp_top=bodyfrm.scrollTop+230;
supp.top=supp_top+"px";
}


function closeall() {
dar.display = 'none';
supp.display = 'none';
}


function update(num) {
printnr = (wait/1000)-num;
document.getElementById('countdown').innerHTML = ' '+printnr+' ';
}
//-->