function showhide1(what, what2, basisurl)
{
	if (document.getElementById( what ).style.display == "none")
	{
    		document.getElementById( what ).style.display= "block";
    		document.getElementById( what2 ).src= basisurl + "/admin/images/uparrowweiss.gif";
	}
   	else
	{
    		document.getElementById( what ).style.display= "none";
    		document.getElementById( what2 ).src= basisurl + "/admin/images/downarrowweiss.gif";
	}
}	
function showhide3(what, what2, basisurl)
{
	if (document.getElementById( what ).style.display == "none")
	{
    		document.getElementById( what ).style.display= "block";
    		document.getElementById( what2 ).src= basisurl + "/admin/images/uparrow.gif";
	}
   	else
	{
    		document.getElementById( what ).style.display= "none";
    		document.getElementById( what2 ).src= basisurl + "/admin/images/downarrow.gif";
	}
}	
function minmax(what, what2, basisurl, table_row)
{
	if (document.getElementById( what ).style.display == "none")
	{
    		document.getElementById( what ).style.display= "block";
    		document.getElementById( what2 ).src= basisurl + "/admin/images/minimieren.gif";
			document.getElementById( table_row ).className= "content_header1";
	}
   	else
	{
    		document.getElementById( what ).style.display= "none";
    		document.getElementById( what2 ).src= basisurl + "/admin/images/maximieren.gif";
			document.getElementById( table_row ).className= "content_header";
	}
}
function minmax1(what, what2, basisurl, table_row)
{
	if (document.getElementById( what ).style.display == "none")
	{
    		document.getElementById( what ).style.display= "block";
    		document.getElementById( what2 ).src= basisurl + "/admin/images/minimieren.gif";
			document.getElementById( table_row ).className= "content_header3";
	}
   	else
	{
    		document.getElementById( what ).style.display= "none";
    		document.getElementById( what2 ).src= basisurl + "/admin/images/maximieren.gif";
			document.getElementById( table_row ).className= "content_header2";
	}
}
function showtab(what, table_row)
{
	if (document.getElementById( what ).style.display == "none" && document.getElementById( table_row ).className== "1")
	{
    		document.getElementById( what ).style.display= "block";
    		document.getElementById( table_row ).className= "current_tab";
			if(document.all.className == "1")
			{
				document.all.style.display= "none";
			}
	}
   	else
	{
    		document.getElementById( what ).style.display= "none";    		
			document.getElementById( table_row ).className= "1";
	}
}
function showhideverz(what, what2)
{	
	
   	if (document.getElementById(what).style.display == "none")
   	{			
    	document.getElementById(what).style.display = "block";
    	document.getElementById(what2).src= "images/downarroww.gif";
	}
   	else
   	{
   		document.getElementById(what).style.display = "none";
   		document.getElementById(what2).src= "images/rightarroww.gif";
  	}
}



function cancelClick() {   window.close();   } 
function color_insert1(form,ntbackcolor)
{
   document.ns_config.ntbackcolor.select();
   document.ns_config.ntbackcolor.focus(); 
   var colornt = showModalDialog('../admin/wedit/dialogs/colorpicker.php','','dialogHeight:420px; dialogWidth:420px; resizable:no; status:no');    
   if(colornt != null)
   {    
      this.document.ns_config.ntbackcolor.value = colornt;
   }
}
function color_insert2(form,ntfontcolor)
{
   document.ns_config.ntfontcolor.select();
   document.ns_config.ntfontcolor.focus(); 
   var colornt = showModalDialog('../admin/wedit/dialogs/colorpicker.php','','dialogHeight:420px; dialogWidth:420px; resizable:no; status:no');    
   if(colornt != null)
   {    
      this.document.ns_config.ntfontcolor.value = colornt;
   }
}
function color_insert3(form,ntbordercolor)
{
   document.ns_config.ntbordercolor.select();
   document.ns_config.ntbordercolor.focus(); 
   var colornt = showModalDialog('../admin/wedit/dialogs/colorpicker.php','','dialogHeight:420px; dialogWidth:420px; resizable:no; status:no');    
   if(colornt != null)
   {    
      this.document.ns_config.ntbordercolor.value = colornt;
   }
}
function color_insert4(form,ntlinkcolor)
{
   document.ns_config.ntlinkcolor.select();
   document.ns_config.ntlinkcolor.focus(); 
   var colornt = showModalDialog('../admin/wedit/dialogs/colorpicker.php','','dialogHeight:420px; dialogWidth:420px; resizable:no; status:no');    
   if(colornt != null)
   {    
      this.document.ns_config.ntlinkcolor.value = colornt;
   }
}
function color_insert5(form,ntlinkcolorhover)
{
   document.ns_config.ntlinkcolorhover.select();
   document.ns_config.ntlinkcolorhover.focus(); 
   var colornt = showModalDialog('../admin/wedit/dialogs/colorpicker.php','','dialogHeight:420px; dialogWidth:420px; resizable:no; status:no');    
   if(colornt != null)
   {    
      this.document.ns_config.ntlinkcolorhover.value = colornt;
   }
}
/* eingefügt am 03.08.2005 */
/* Frontend druckansicht öffnen */
function printing(datei) 
{
	Fenster = window.open(datei,"Fenster","width=680,height=460,resizable=yes,menubar=no,scrollbars=yes");
	Fenster.moveTo(50,50);
	Fenster.focus();
}
/* eingefügt am 04.08.2005 */
/* Sicherheitsabfrage 'wirklich löschen' */
function del_sure(message)
{
	if(confirm(message))
	return true;
	return false;
}
/* eingefügt am 07.08.2005 */
/* Popup Bildauswahl öffnen und ausgewählte Bildurl zurückgeben */
function insert_image(formname, input, image) 
{
	var newwin = window.open('../inc/image.php?formname='+formname+'&feldname='+input+'&bildname='+image+'','','top=150,left=150,width=400,height=300');
	if (newwin.opener == null) newwin.opener = window;
	newwin.opener.name = "InsertImage";	
}

/* eingefügt am 07.08.2005 */
/* Bild in Originalgröße anzeigen */
function openPicture(url,pic,title,width,height,wheight)
{
	opup=window.open("inhalt/picture.php?img="+url+"/"+pic+"&titel="+title+"&width="+width+"&height="+height+"", title,'width='+width+',height='+wheight+',toolbar=no,directories=no,status=no,scrollbars=no,resizable=no,menubar=no');
	popup.moveTo(((screen.availWidth-width)/2),((screen.availHeight-height-100)/2))
	popup.focus();
}
/* eingefügt am 12.08.2005 */
/* Baumstruktur im Menü */
function tree(what,classname)
{
	if (document.getElementById(what).style.display == "none")
   	{			
    	document.getElementById(what).style.display = "block";		
    	document.getElementById(classname).className= "section-open";		
	}
   	else
   	{
   		document.getElementById(what).style.display = "none";   		
		document.getElementById(classname).className= "section";		
  	}
}
/* eingefügt am 12.08.2005 */
/* Baumstruktur im Menü  */
function tree_lastnode(what,classname)
{
	if (document.getElementById(what).style.display == "none")
   	{			
    	document.getElementById(what).style.display = "block";
    	document.getElementById(classname).className= "section-open-lastnode";
	}
   	else
   	{
   		document.getElementById(what).style.display = "none";
   		document.getElementById(classname).className= "section-lastnode";
  	}
}
/* eingefügt am 14.08.2005 */
/* horizontale Listennavigation öffnen bei hover*/
function opennav(what)
{
	document.getElementById(what).style.display = "block";	
}
function closenav(what)
{
	document.getElementById(what).style.display = "none"; 	
}

/* eingefügt am 03.03.2006 */
/* Ceckboxen für Multilöschabfrage */
function setCheckboxes(the_form, do_check)
{
    var elts      = (typeof(document.forms[the_form].elements['selected_db[]']) != 'undefined')
                  ? document.forms[the_form].elements['selected_db[]']
                  : (typeof(document.forms[the_form].elements['multi_del[]']) != 'undefined')
          ? document.forms[the_form].elements['multi_del[]']
          : document.forms[the_form].elements['selected_fld[]'];
    var elts_cnt  = (typeof(elts.length) != 'undefined')
                  ? elts.length
                  : 0;

    if (elts_cnt) {
        for (var i = 0; i < elts_cnt; i++) {
            elts[i].checked = do_check;
        } // end for
    } else {
        elts.checked        = do_check;
    } // end if... else

    return true;
}


