  var contentid;
  
  //Create a XMLHttpRequest Object.
  //
  if(window.XMLHttpRequest) 
  {
      xmlhttp = new XMLHttpRequest();
  } else {
      xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  }
  
  // Call this function with url of document to open as attribute and the id of the block to be replaced.
  //
  function requestContent(url, id)
  {
      contentid = id;
      
      xmlhttp.open("GET", url, true);
      xmlhttp.onreadystatechange = statusListener;
      xmlhttp.send(null);
  }

  // statusListener function is called automatically whenever readystate value of XMLHttpRequest Object changes.
  // see xmlhttp.onreadystatechange = statusListener; statement above.
  // if readystate == 1: loading.
  // if readystate == 4: loaded
  //
  function statusListener()
  {
      if (xmlhttp.readyState == 1)
      {
          document.getElementById(contentid).innerHTML = "wird geladen . . .";
      }
      
      if (xmlhttp.readyState == 4)
      {
          //xmlhttp.responseText is the content of document requested
          document.getElementById(contentid).innerHTML=xmlhttp.responseText;
      }
  }
  
  function centerOnWindow(elemID)
  {
  // Center a positionable element whose name is passed as 
  // a parameter in the current window/frame, and show it
  //
      // 'obj' is the positionable object
      var obj = getRawObject(elemID);
      // window scroll factors
      var scrollX = 0, scrollY = 0;
      if (document.body && typeof document.body.scrollTop != "undefined") {
          scrollX += document.body.scrollLeft;
          scrollY += document.body.scrollTop;
          if (document.body.parentNode && 
              typeof document.body.parentNode.scrollTop != "undefined") {
              scrollX += document.body.parentNode.scrollLeft;
              scrollY += document.body.parentNode.scrollTop;
          }
      } else if (typeof window.pageXOffset != "undefined") {
          scrollX += window.pageXOffset;
          scrollY += window.pageYOffset;
      }
      var x = Math.round((getInsideWindowWidth( )/2) - 
          (getObjectWidth(obj)/2)) + scrollX;
      var y = Math.round((getInsideWindowHeight( )/2) - 
          (getObjectHeight(obj)/2)) + scrollY;
      shiftTo(obj, x, y);
      show(obj);
  }
  
  function resize_viewport(minWidth, minHeight)
  {
    vp_width = Geometry.getViewportWidth();
    vp_height = Geometry.getViewportHeight();
    
    vp_height = vp_height * 0.96;
    vp_width  = vp_width  * 0.96;
    
    if (vp_height < 700)
      vp_height = 700;
    else
      vp_height = Math.floor(vp_height);
      
    if (vp_width < 800)
      vp_width = 800;
    else
      vp_width = Math.floor(vp_width);
      
//    document.height = vp_height;
//    alert("<p>" + vp_width + "x" + vp_height + "</p>");
    el = document.getElementById("page");
    el.height = vp_height;
    el.width  = vp_width;
  }
  
  function block_on(this_id)
  {
    document.getElementById(this_id).style.display = "block";
  }
    
  function block_off(this_id)
  {
    document.getElementById(this_id).style.display = "none";
  }
  
  var ie = document.all;
  var nn6 = document.getElementById &&! document.all;
  
  var isdrag = false;
  var x, y;
  var dobj;
  
  function movemouse( e )
  {
      if( isdrag ) {
          dobj.style.left = nn6 ? tx + e.clientX - x : tx + event.clientX - x;
          dobj.style.top  = nn6 ? ty + e.clientY - y : ty + event.clientY - y;
          return false;
      }
  }
  
  function styledPopupClose()
  {
      document.getElementById("styled_popup").style.display = "none";
  }
  
//  document.onmousedown=selectmouse;
//  document.onmouseup=new Function("isdrag=false");
  
  function photo_open(link, width, height)
  {
    var photoWindow = window.open(link, "photo", 'resizable=0, width=' + width + ',height=' + height);

    /*var photoWindow = window.open(link, "photo", 'toolbar=0, location=0, directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=' + width + ',height=' + height);*/
  }
  
  function cursorstyle(id2,style)
  {
     var v1 = document.getElementById(id2)
     v1.style.cursor = style;
  }
  
    function obfuscate(linktext, user, domain, tld)
  {
    mailer = "\mailto:";
    at = "@";
    dot = ".";
    refadr = mailer + String(user).toLowerCase() + at + domain + dot + tld;
    document.write("<a href=" + refadr + ">" + linktext + "<\/a>");
  }

