function LadImg() { //v2.0
  if (document.images) {
    var imgFiles = LadImg.arguments;
    if (document.preloadArray==null) document.preloadArray = new Array();
    var i = document.preloadArray.length;
    with (document) for (var j=0; j<imgFiles.length; j++) if (imgFiles[j].charAt(0)!="#"){
      preloadArray[i] = new Image;
      preloadArray[i++].src = imgFiles[j];
  } }
}

function MerkImg() { //v2.0
  if (document.ImgDef != null)
    for (var i=0; i<(document.ImgDef.length-1); i+=2)
      document.ImgDef[i].src = document.ImgDef[i+1];
}

function TauImg() { //v2.0
  var i,j=0,objStr,obj,TauArray=new Array,oldArray=document.ImgDef;
  for (i=0; i < (TauImg.arguments.length-2); i+=3) {
    objStr = TauImg.arguments[(navigator.appName == 'Netscape')?i:i+1];
    if ((objStr.indexOf('document.layers[')==0 && document.layers==null) ||
        (objStr.indexOf('document.all[')   ==0 && document.all   ==null))
      objStr = 'document'+objStr.substring(objStr.lastIndexOf('.'),objStr.length);
    obj = eval(objStr);
    if (obj != null) {
      TauArray[j++] = obj;
      TauArray[j++] = (oldArray==null || oldArray[j-1]!=obj)?obj.src:oldArray[j];
      obj.src = TauImg.arguments[i+2];
  } }
  document.ImgDef = TauArray; //used for restore
}

function MM_findObj(n, d) { //v3.0
  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=MM_findObj(n,d.layers[i].document); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_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 reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.pgW=innerWidth; document.pgH=innerHeight; onresize=reloadPage; }}
  else if (innerWidth!=document.pgW || innerHeight!=document.pgH) location.reload();
}
reloadPage(true);

if (window.name != "freigabe"){
	window.name = "main";
}
this.focus();
	
	
function calcHeight()
	{
	  if (document.layers) {
	    h=document.layers['Content'].document.height + 100;
	    if (h > document.height) {document.height = h;} 
	  }
	}
	

function movieWin(file,props)
{
movieWin = window.open(file,"movie",props);
}
	

var x
function fensterAuf (x,wid,hei)
{
if (document.layers)			// fuer netzcape
	{
	wid = parseInt(wid) + 8;
	hei = parseInt(hei) + 6;	
	}
else							// weil explorer behandelt die fenstergroessen anners
	{
	wid = parseInt(wid) + 20;
	hei = parseInt(hei) + 38;	
	}
props = 'width=' + wid + ',height=' + hei + ',resizable=no';
pictWin = window.open(x,"pict",props);
if (pictWin.closed != true)		
	{
	pictWin.resizeTo(wid,hei);
	}
}

function fensterAufDyn (x,wid,hei)
{
if (document.layers)			// fuer netzcape
	{
	wid = parseInt(wid) + 8;
	hei = parseInt(hei) + 6;	
	 if (wid > 800) {
	   wid = 800;
	 }
	 if (hei > 600) {
	   hei = 600;
	 }
	}
else							// weil explorer behandelt die fenstergroessen anners
	{
	wid = parseInt(wid) + 40;
	hei = parseInt(hei) + 38;	
	 if (wid > 800) {
	   wid = 800;
	 }
	 if (hei > 600) {
	   hei = 600;
	 }
	}
props = 'width=' + wid + ',height=' + hei + ',resizable=yes,scrollbars=yes';
pictWin = window.open(x,"pict",props);
if (pictWin.closed != true)		
	{
	pictWin.resizeTo(wid,hei);
	}
}

function helpAuf (x,wid,hei)
{
if (document.layers)			// fuer netzcape
	{
	wid = parseInt(wid) + 8;
	hei = parseInt(hei) + 6;	
	}
else							// weil explorer behandelt die fenstergroessen anners
	{
	wid = parseInt(wid) + 20;
	hei = parseInt(hei) + 38;	
	}
props = 'width=' + wid + ',height=' + hei + ',resizable=no, scrollbars';
pictWin = window.open(x,"pict",props);
if (pictWin.closed != true)		
	{
	pictWin.resizeTo(wid,hei);
	}
}

function fenster(name,ort,w,h,scroll)
{
	if (document.layers)			// fuer netzcape
	{
		w = parseInt(w) + 15;
		h = parseInt(h) + 14;	
	}
	else							// weil explorer behandelt die fenstergroessen anners
	{
		w = parseInt(w) + 30;
		h = parseInt(h) + 58;	
	}
  	win = window.open(ort, name, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars='+scroll+',resizable=yes,copyhistory=no,width='+w+',height='+h);
	if (win.closed != true)		
	{
		win.resizeTo(w,h);
	}
	win.focus();
	return false;
}

function chkSuchFormular()
   {
	if(document.formular.such.value == "")
     {
      alert("Bitte geben Sie einen Suchbegriff an!");
      document.formular.such.focus();
      return false;
     }
   }
   
   function checkDel(url)
	 {
	 	//var url = "" + url;
		if (url.indexOf("delpage") > -1)
		{
		var msg = "Moechten Sie die aktuelle Seite mit allen Elementen wirklich loeschen?";
		}
		
		if (url.indexOf("katdelp2") > -1)
		{
		var msg = "Moechten Sie die aktuelle Kategorie wirklich loeschen?";
		}
		
		if (url.indexOf("del_element") > -1)
		{
		var msg = "Moechten Sie das Element wirklich loeschen?";
		}
		
	    if(confirm(msg)) top.location.href = url;
	 }
	
	
			
		//PopUpfunktion
		function pop_up(url,name,breit,hoch,scroll,menubar)
		{
			if (document.layers)				// fuer netzcape
				{
					breit = parseInt(breit) + 8;
					hoch = parseInt(hoch) + 6;	
				}
				else							// weil explorer behandelt die fenstergroessen anners
				{
					breit = parseInt(breit) + 20;
					hoch = parseInt(hoch) + 38;	
				}
		fenster=window.open(url,name,'width='+breit+',height='+hoch+',toolbar=no,location=no,directories=no,status=no,menubar='+menubar+',scrollbars='+scroll+',resizable=yes,copyhistory=yes');
		fenster.focus();
		}
	