
function myEDIT_openBrWindow(theURL,winName,features) { //v2.0
  win = window.open(theURL,winName,features);
  if (win.closed != true)		
	{
		win.focus();
	}
}
    
function myEDIT_swapImgRest() { //v3.0
  var i,x,a=document.myEDIT_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function myEDIT_preloadImg() { //v3.0
  var d=document; if(d.images){ if(!d.myEDIT_p) d.myEDIT_p=new Array();
    var i,j=d.myEDIT_p.length,a=myEDIT_preloadImg.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.myEDIT_p[j]=new Image; d.myEDIT_p[j++].src=a[i];}}
}

function myEDIT_findObj(n, d) { //v4.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=myEDIT_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function myEDIT_showHideLayers() { //v3.0
  var i,p,v,obj,args=myEDIT_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=myEDIT_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 myEDIT_showHideDisplay() { //v3.0
  var i,p,v,obj,args=myEDIT_showHideDisplay.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=myEDIT_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'block':(v='hide')?'none':v; }
    obj.display=v; }
}


function myEDIT_swapImg() { //v3.0
  var i,j=0,x,a=myEDIT_swapImg.arguments; document.myEDIT_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=myEDIT_findObj(a[i]))!=null){document.myEDIT_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

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 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,confirmtext)
	 {
	 	//var url = "" + url;
		if (url.indexOf("delpage") > -1)
		{
		var msg = "Moechten Sie die aktuelle Seite mit allen Elementen wirklich loeschen?";
		}
		
		else if (url.indexOf("katdelp2") > -1)
		{
		var msg = "Moechten Sie die aktuelle Kategorie wirklich loeschen?";
		}
		
		else 
		{
		var msg = confirmtext;
		}
		
	    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();
		}
	
