function findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function ShowHideLayers() { //v6.0
  var i,p,v,obj,args=ShowHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}


function unblur() {
this.blur();
}

function blurLinks() {
if (!document.getElementById) return;
theLinks = document.getElementsByTagName("a");
for(i=0; i<theLinks.length; i++) { 
theLinks[i].onfocus = unblur;
}
}


function make_current() {
  if (!document.getElementsByTagName) return;
  var Datum = new Date();
  var Jahr = Datum.getFullYear().toString();
  var Monat = (Datum.getMonth()+1).toString();
    if (Monat.length == 1) Monat = "0" + Monat;
  var Tag = Datum.getDate().toString();
    if (Tag.length == 1) Tag = "0" + Tag;
  var aktuell = parseInt(Jahr + Monat + Tag);
  var Zeilen = document.getElementsByTagName("tr");
  var Obergrenze = 0; var Rest = Obergrenze;
  for (var i = 0; i < Zeilen.length; i++) {
    if (Zeilen[i].title) {
      if (parseInt(Zeilen[i].title) < aktuell) Zeilen[i].style.display = "none";
      else if(Obergrenze) {
        if(Rest) Rest--; else Zeilen[i].style.display = "none";
      }
    }
  }
}

function newImage(arg) {
        if (document.images) {
                rslt = new Image();
                rslt.src = arg;
                return rslt;
        }
}

function changeImages() {
        if (document.images) {
                for (var i=0; i<changeImages.arguments.length; i+=2) {
                        document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
                }
        }
}


var ie=(document.all)? true: false;

function rahmen(x)
{
if (ie) x.blur()
}


newWindow="";
function OpenNewWindow(Picture,Breit,Hoch,Alttext) {
xsize = Breit+1;
ysize = Hoch+25;

ScreenWidth = screen.width;
ScreenHeight = screen.height;

xpos = (ScreenWidth/2)+(xsize/2 - 200);
ypos = (ScreenHeight/2)-((ysize/2));

if (!newWindow.closed && newWindow.location) {newWindow.close();}

html = ('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de"><head><title>'+Alttext+' - Anja Lorenz - Kreative Leib- und Gestalttherapie</title><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" /><META http-equiv="imagetoolbar" content="no"><style type="text/css">html, body, p, img, a {margin:0; padding:0; border: 0; font-family: "Trebuchet MS",Verdana,Geneva,Arial,sans-serif; color:#000; text-align: center;} body {font-size:100.01%; 	background-attachment: fixed;background-image : url(../header/background.jpg); background-repeat : repeat; background-color: #F3F2DD} p {font-size: 0.8em;}</style></head><body onload="focus()"><p><img src="'+Picture+'" alt="'+Alttext+'" width="'+Breit+'" height="'+Hoch+'" name="fenster" /><br /><a href="javascript:self.close()">Fenster&nbsp;schlie&szlig;en (Close Window)</a>&nbsp;|&nbsp;<a href="javascript:window.print()">Drucken (Print)</a></p></body></html>');

newWindow=window.open("","Picture","height="+ysize+",width="+xsize+",resizable=yes,top="+ypos+",left="+xpos+"");

  newWindow.document.open("text/html", "replace")
  newWindow.document.write(html)
  newWindow.document.close()

  return false;
}
