function effekt_out(id) {
   var theas = document.getElementById('ausgabe');
   K_opt = K_opt - 1;

    theas.style.filter = "alpha(opacity:"+K_opt+")"; // Safari<1.2, Konqueror
    theas.style.KHTMLOpacity = K_opt/100;  // Older Mozilla and Firefox
    theas.style.MozOpacity = K_opt/100; // Safari 1.2, newer Firefox and Mozilla, CSS3
    theas.style.opacity = K_opt/100;

   if(K_opt==0) { theas.style.display = 'none'; }
   setTimeout("effekt_out()",10);
}

var K_opt = 100;
function hover(imgID, mode) {
   var ImgRes = document.getElementById(imgID);

   if(lastMode!=mode) {
     if(mode==true) {
       thereplace = ImgRes.src.replace(/.gif/, "b.gif");
       thereplace = thereplace.replace(".jpg", "b.jpg");
       thereplace = thereplace.replace(".png", "b.png");

     } else {
        thereplace = ImgRes.src.replace(/b.gif/, ".gif");
        thereplace = thereplace.replace("b.jpg", ".jpg");
        thereplace = thereplace.replace("b.png", ".png");
     }
     ImgRes.src = thereplace;
   }

   lastMode = mode;

}

function login() {
   var autologin = document.getElementById('autologin');
   check = confirm('Möchtest du für immer eingeloggt bleiben?');
   if(check==true) { autologin.value = '1'; } else { autologin.value = '0'; }

   document.loginform.submit();
}
var lastMode;
var thereplace;
function link(url) {
    window.location.href = url;
}

function trano() {
   var ad_check = document.getElementById('anonym').checked;
   document.getElementById('tr-1').style.display=(ad_check?'none':'');
   document.getElementById('tr-2').style.display=(ad_check?'none':'');
}

function filter(id,opt) {
    var thelala = document.getElementById(id);

    thelala.style.filter = "alpha(opacity:"+opt+")"; // Safari<1.2, Konqueror
    thelala.style.KHTMLOpacity = opt/100;  // Older Mozilla and Firefox
    thelala.style.MozOpacity = opt/100; // Safari 1.2, newer Firefox and Mozilla, CSS3
    thelala.style.opacity = opt/100;

}
function setsmile(txt) {
    document.FormEntry.text.value+=' '+txt+' ';
    document.FormEntry.text.focus();
}
function foodertxt() {
    var addnew = document.getElementById('foodertxt');
    var Textfeldbreite = addnew.clientWidth;
    var FensterBreite = document.body.clientWidth;
    addnew.innerHTML = text + xleft;
    xleft = xleft + 4;
    addnew.style.marginLeft = FensterBreite - xleft;

    setTimeout("foodertxt()",400);
}
function adminask(lnk) {
   Check = confirm("Willst du den Beitrag wirklich löschen?");
   if(Check == true) {
      window.location = lnk;
   }
}
var xleft = 0;
var text = 'Willkommen im Frag-den-Doc.de-Portal für Jugendliche! Hier wird gleich etwas erscheinen';


function suche(id) {
    var thisid = document.getElementById(id);
    if(thisid.value=='Suche...') { this.value=''; }
}
