function statter(theURL) {
  window.setTimeout("weiter('"+theURL+"')",1000);
}
function weiter(theURL) {
  window.open(theURL,'Statistik','width=1,height=1,menubar=no,scrollbars=no').focus();
}


function openWindow(theURL,winName,features) { //v2.0
  thiswin=window.open(theURL,winName,features);
  thiswin.focus();
}
movewindow = null;

function bild(url, width, height) {    
  var properties = "toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,copyhistory=no,width="+ width +",height="+ height;
  var html = "<HTML><HEAD>";
  html += "<TITLE>Bildvergrößerung</TITLE>";
  html += "</HEAD>";
   html += "<BODY onclick=\"window.close();return false\" leftmargin=0 topmargin=0 marginwidth=0 marginheight=0><img src="+ url +" alt='' border='0' >";
   html += "</BODY></HTML>";
   var bild=window.open('','Bildvergrößerung', properties);
   bild.document.open();
   bild.document.write(html);
   bild.document.close();
}


function openMove(theURL,winName,features) { //v2.0
  if (movewindow != null)
    if (!movewindow.closed)
      movewindow.close();
  movewindow=window.open(theURL,winName,features);
}

function openSlide(theURL) { //v2.0
  winName='';
  features='toolbar=1,location=0,directories=0,status=0,menubar=1,scrollbars=0,resizable=0,width=400,height=300';
  pos = theURL.lastIndexOf('/');
  theURL = theURL.substring(pos+1,theURL.length);
  theURL='bilder.php3?img='+theURL;
  window.open(theURL,winName,features);
}

function makeArray() {
  this.length = makeArray.arguments.length
  for (var i = 0; i < this.length; i++) this[i+1] = makeArray.arguments[i]
}

function wechsle(anzahl) {
  document.image.src = "img/galerie/"+pix[nummer];
  nummer += 1;
  if (nummer == anzahl+1) nummer = 1;
  setTimeout("wechsle("+anzahl+")", 4000);
}

function tourlink(link, width, height) {
height = height + 55;
link = link + "&width=" + width + "&height=" + height;
movewindow = window.open("leer.php?link="+link,"movewindow","scrollbar=no,toolbar=no,status=no,menubar=no,resizeable=0");
movewindow.resizeTo(width,height);
movewindow.moveTo(20,20);
movewindow.focus();
}
