//PrintLink

var path = window.location.pathname;
var print_link = "/tools2/print/print.php3?filepath=" + path + "&page=http://" + window.location.host + path;

// start PopUp-Window function
function openWindow(URL) {
	newWindow = window.open(URL, 'print', 'width=640,height=560,scrollbars=yes,resizable=yes,menubar=yes,statusbar=yes');
	newWindow.focus();
}
function openWindownew(which_url, which_name, features) {
	window.open(which_url, which_name, features);
//	popup.focus();
// 	return 1;
}
// end PopUp-Window function


//MouseOver

var restoreArray = new Array;
var restoreCount = 0;
var restoreTimer = 0;

function  preloadImages  ()
{
 if  (preloadArray == null)  return;
 var imageObject;
 var fileName;
 count = preloadArray.length;
 for (index=0; index<count; index++)
     {
     fileName = preloadArray [index];
     imageObject = new Image;
     imageObject.src = fileName;
     preloadArray [index] = imageObject;
     }
}

function  replaceImage  (ImageName, FileName)
 {
 imageObject = eval ('document.' + ImageName);
 if  ((imageObject == null) || (FileName == null) || (FileName == ''))  return;
 if  (restoreArray != null)
     {
     restoreArray [restoreCount++] = imageObject.src;
     restoreArray [restoreCount++] = imageObject;
     }
 imageObject.src = FileName;
 }

function  clearRestoreList  ()
 {
 restoreCount = 0;
 }

function  restoreImages  (DelaySeconds)
 {
 if  (restoreTimer > 0)
     {
     clearTimeout (restoreTimer);
     restoreTimer = 0;
     }
 if  ((restoreArray == null) || (restoreCount < 1))  return;
 if  (DelaySeconds > 0)
     {
     restoreTimer = window.setTimeout ('restoreImages ();', DelaySeconds * 1000);
     return;
     }
 while (restoreCount > 0)
     {
     imageObject = restoreArray [--restoreCount];
     fileName = restoreArray [--restoreCount];
     if  ((imageObject != null) && (fileName != null) && (fileName != ''))  imageObject.src = fileName;
     }
 }

//Aktualisierungsdatum
	    
function ladate ()
{
var jahr, monat, tag;
var datum = new Date();

  var jahr = datum.getYear();
  var monat = datum.getMonth() + 1;
  var tag = datum.getDate();
if (tag==1)
   {
   tag=tag-2;
   }
if (tag==0)
   {
   tag=tag-2;
   }
	else
	{
	tag=tag-1
	}
  if (jahr<=200) jahr += 1900;
  if (jahr<=1999) jahr += 100;
  
  tag = (tag < 10 ? "0" : "") + tag;
  monat = (monat < 10 ? "0" : 0) + monat;
  return (tag+ "." + monat+ "." + jahr);
}



var win = null;
function NewWindow(url,name,w,h,scroll,menu,rezi,tool,stat,direct){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  var settings  ='height='+h+',';
			settings +='width='+w+',';
			settings +='top='+wint+',';
			settings +='left='+winl+',';
			settings +='scrollbars='+scroll+',';
			settings +='menubar='+menu+',';
			settings +='resizable='+rezi+',';
			settings +='toolbar='+tool+',';
			settings +='status='+stat+',';
			settings +='directories='+direct+',';
			win=window.open(url,name,settings);
	if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}
