
      var a = new Date();
      a = new Date(a.getTime() +1000*60*60*24*365);

      function run_menue (id) {
         var theidfield = document.getElementById(id);
         if ( theidfield.style.display == 'none' ) {
            document.cookie = id+'=on; expires='+a.toGMTString()+';';
            theidfield.style.display = 'block';
         } else {
            document.cookie = id+'=off; expires='+a.toGMTString()+';';
            theidfield.style.display = 'none';
         }
      }

      function clear_field ( id, delthisvalue ) {
         var field = document.getElementById(id);
         if ( field.value == delthisvalue ) {
            field.value = '';
         }
         return TRUE;
      }

      function hide_id ( id ) {
         var theidfield = document.getElementById(id);
         theidfield.style.display = 'none';
      }

      function show_id ( id ) {
         var theidfield = document.getElementById(id);
         theidfield.style.display = 'block';
      }

      function set_field ( id , setthis ) {
         var field = document.getElementById(id);
         field.value = setthis;
      }

var imageMaxWidth = 550;
var imageMaxHeight = 550;

function resizeImages() {
for (var i = 0; i < document.images.length ;i++){
if (document.images[i].className == 'resizeImage') {
var imageWidth = document.images[i].width;
var imageHeight = document.images[i].height;

if ((imageMaxWidth != 0 && imageWidth > imageMaxWidth) || (imageMaxHeight != 0 && imageHeight > imageMaxHeight)) {
if (imageMaxWidth != 0) var div1 = imageMaxWidth / imageWidth;
else var div1 = 1;
if (imageMaxHeight != 0) var div2 = imageMaxHeight / imageHeight;
else var div2 = 1;

if (div1 < div2) {
document.images[i].width = imageMaxWidth;
document.images[i].height = Math.round(imageHeight * div1);
}
else {
document.images[i].height = imageMaxHeight;
document.images[i].width = Math.round(imageWidth * div2);
}

if (!isLinked(document.images[i])) {
var popupLink = document.createElement("a");
popupLink.setAttribute('href', document.images[i].src);
popupLink.setAttribute('target', '_blank');
popupLink.appendChild(document.images[i].cloneNode(true));

document.images[i].parentNode.replaceChild(popupLink, document.images[i]);
}
}
}
}
}

function smilieIn(what) {
  if (document.formular.eingabe.createTextRange)
   {
    document.formular.eingabe.focus();
    document.selection.createRange().duplicate().text = what;
   }
  else if (document.getElementById && !document.all) // Mozilla
   {
    var tarea = document.forms['formular'].elements['eingabe'];
    var selEnd = tarea.selectionEnd;
    var txtLen = tarea.value.length;
    var txtbefore = tarea.value.substring(0,selEnd);
    var txtafter =  tarea.value.substring(selEnd, txtLen);
    tarea.value = txtbefore + what + txtafter;
   }
  else
   {
    document.formular.text.value += what;
   }


}


function isLinked(node) {
do {
node = node.parentNode;
if (node.nodeName == 'A') return true;
}
while (node.nodeName != 'TD' && node.nodeName != 'BODY');

return false;
}

function go_link (site)
{
   /*x = screen.availWidth/2-w/2;
   y = screen.availHeight/2-h/2;

   window.open("_out.php4?url="+site,"Bildergallerie","width=600,height=800,left='+x+',top="+y+",screenX="+x+",screenY="+y);

   var URL = "popup.html";
   var Name = "popup";
   var Fensteroptionen = "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0";
   var Breite = 800;
   var Hoehe = 600;


   window.open(URL, 'Name', Fensteroptionen + ',width=' + Breite + ',height=' + Hoehe);

        //popupWindow.document.write(site);           */

   var w = screen.availWidth -100;
   var h = screen.availHeight -100;

   NF=window.open("_out.php4?url="+site,"Bildergallerie","scrollbars=1,resizable=1,width="+w+",height="+h);
   NF.focus;

}



function go_pdf (site)
{

   var w = 650;
   var h = 350;
   x = screen.availWidth/2-w/2;
   y = screen.availHeight/2-h/2;

   NF=window.open("_pdf.php4?frame=true&k="+site,"PDF","width="+w+",height="+h+",left="+x+",top="+y+",screenX="+x+",screenY="+y);
   NF.focus;

}


function go_print (site)
{

   var w = 800;
   var h = 800;
   x = screen.availWidth/2-w/2;
   y = screen.availHeight/2-h/2;

   NF=window.open(site,"PDF","width="+w+",height="+h+",left="+x+",top="+y+",screenX="+x+",screenY="+y);
   NF.focus;

}

function found_error (site)
{

   var w = 650;
   var h = 500;
   x = screen.availWidth/2-w/2;
   y = screen.availHeight/2-h/2;

   NF=window.open("fehler.php?url="+site,"PDF","width="+w+",height="+h+",left="+x+",top="+y+",screenX="+x+",screenY="+y);
   NF.focus;

}


function ho ( divid )
{
   divid.style.cursor = 'hand';
   divid.style.background = '#FFFFFF';
}
function ou ( divid )
{
   divid.style.cursor = 'default';
   divid.style.background = '#EFF6FD';
}