function MM_swapImgRestore() { //v3.0
	var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
	var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
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_swapImage() { //v3.0.0
    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) 
    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} 
}



  // opens a new window for the image. scrolling=yes, resizing=true
  function MBImagePopup( URL, width, height )
  {

    var my_height, my_width, my_style, newwin;
    my_height = height;
    my_width = width;

    my_style = "menubar=no,status=no,scrollbars=yes,resizable=yes";

    if(my_height<=0) my_height=400;
    if(my_height>750) my_height = 750;
    if(my_width<=0) my_width=600;
    if(my_width>1000) my_width = 1000;

    if( width>0 ) // use given width
      my_style += ",width=" + my_width;

    if( height>0 ) // use given height
      my_style += ",height=" + my_height;

     newwin = window.open(URL , 'mbimagepopup', my_style );
     newwin.focus();

    //return newwin;
  }

function winOpen(URL, target, options)
{
    var newwin; 
    window.open( URL, target, options);
    return newwin; 
}

  // opens a new window for storing conditions
  function MBConditionPopup( URL )
  {
    var newwin; 
    window.open( URL, 'mbconditionpopup', 'menubar=no,status=no,scrollbars=yes,resizable=yes,width=520,height=250' );
    return newwin; 
  }



function openTab(theDivId){
	var theid=document.getElementById(theDivId);
	var theidP=document.getElementById(theDivId + 'p');
	var theidM=document.getElementById(theDivId + 'm');
	if (theid.style.display=="block")
	{
		theid.style.display="none";
		theidP.style.display="block";
		theidM.style.display="none";
	}
	else
	{
		theid.style.display="block";
		theidP.style.display="none";
		theidM.style.display="block";
	}
}


function openTab1(theDivId){
	var theid=document.getElementById(theDivId);
	if (theid.style.display=="block")
	{
		theid.style.display="none";
	}
	else
	{
		theid.style.display="block";
	}
}

function openButton(theDivId, maxID){
         var theid=document.getElementById(theDivId);
	var i;
         for(i=1;i<=maxID;i++)
         {

             	if (theDivId == i) document.getElementById(i  + 'a').className = 'drop_td_active';
    	         if (theDivId != i) document.getElementById(i  + 'a').className = 'drop_td';

    	    	if (theDivId == i) document.getElementById(i).style.display="block";
    	    	if (theDivId != i) document.getElementById(i).style.display="none";

         }
}

function openParent(page) {
	window.open(page, '_parent');
}

function HideElement(idStart, idEnd){
         for(i=idStart;i<=idEnd;i++) document.getElementById(i).style.display = 'none';
}

function getPlusMinus(tagId) {
	var strPM;
//	var thePMid;
//	var thePMid=document.getElementById(tagId);
//	thePMid=document.getElementById(2);



	if (document.getElementById(tagId).style.display=="block")
	{
		strPM = "Block";
	}
	else
	{
		strPM = "Nicht da";
	} 
	
//	strPM = "Block";

 	return strPM;
}

function setPlus(id, pm) {
	var strPlus;
	if (pm == "minus")
	{
		strPlus = "x";
	}
	else
	{
		strPlus = "-";
	}
 	return strPlus;
}


function openTabnoPics(theStemId, maxId){
	var theid=document.getElementById(theStemId);
	var i;
	theidA = new Array(); 
	
	for(i=1;i<=maxId;i++)
	{
	    theidA[i]=document.getElementById(i);
    	if (theStemId != i) theidA[i].style.display="none";
	    
    	if (theStemId == i) document.getElementById(i + 'a').className = 'folder_link_active';
    	if (theStemId != i) document.getElementById(i + 'a').className = 'folder_link';
	}

	if (theid.style.display=="block")
	{
//		theid.style.display="none";
	}
	else
	{
		theid.style.display="block";
	} 
	
}

function openTabAbout(theStemId, maxId){
	var theid=document.getElementById(theStemId);
	var i;
	theidA = new Array(); 
	
	for(i=1;i<=maxId;i++)
	{
	    theidA[i]=document.getElementById(i);
    	if (theStemId != i) theidA[i].style.display="none";
	    
    	if (theStemId == i) document.getElementById(i + 'a').className = 'folder_link_active';
    	if (theStemId != i) document.getElementById(i + 'a').className = 'folder_link';
    	if (theStemId == i) document.getElementById(i + 'p').style.display="block";
    	if (theStemId != i) document.getElementById(i + 'p').style.display="none";
	}

	if (theid.style.display=="block")
	{
//		theid.style.display="none";
	}
	else
	{
		theid.style.display="block";
	} 
	
}



function openImageButtonImage(theStemId, maxId){
	var theid=document.getElementById(theStemId);
	var i;
	theidA = new Array(); 
	
	for(i=1;i<=maxId;i++)
	{
	    theidA[i]=document.getElementById(i);
    	if (theStemId != i) theidA[i].style.display="block";
    	if (theStemId == i) theidA[i].style.display="none";
	    
    	if (theStemId == i) document.getElementById(i + 'p').style.display="block";
    	if (theStemId != i) document.getElementById(i + 'p').style.display="none";

    	if (theStemId == i) document.getElementById(i + 'i').style.display="block";
    	if (theStemId != i) document.getElementById(i + 'i').style.display="none";

	}
}

function openSub(theStemId, maxId){
	var theid=document.getElementById(theStemId);
	var i;
	theidA = new Array(); 
	
	for(i=1;i<=maxId;i++)
	{
	    theidA[i]=document.getElementById(i);
//    	if (theStemId != i) theidA[i].style.display="block";
//    	if (theStemId == i) theidA[i].style.display="none";
	    
    	if (theStemId == i) document.getElementById(i + '_tabactive').style.display="block";
    	if (theStemId != i) document.getElementById(i + '_tabactive').style.display="none";

    	if (theStemId == i) document.getElementById(i + '_tabinactive').style.display="none";
    	if (theStemId != i) document.getElementById(i + '_tabinactive').style.display="block";

    	if (theStemId == i) document.getElementById(i + '_content').style.display="block";
    	if (theStemId != i) document.getElementById(i + '_content').style.display="none";

	}
}



function openSubMouseOut(theStemId){

    	if (document.getElementById(theStemId + '_tabactive').style.display=="none")
         {

       	    document.getElementById(theStemId + '_tabactive').style.display="none";
    	    document.getElementById(theStemId + '_tabinactive').style.display="block";
    	    document.getElementById(theStemId + '_tabmouseover').style.display="none";
         }

}

function closeSub(theStemId){

    	if (document.getElementById(theStemId + '_tabactive').style.display=="block")
         {
       	    document.getElementById(theStemId + '_tabactive').style.display="none";
    	    document.getElementById(theStemId + '_tabinactive').style.display="block";
         }

}



function openSubMouseOpen(theStemId, maxId){
	var theid=document.getElementById(theStemId);
	var i;
	theidA = new Array(); 
	
	for(i=1;i<=maxId;i++)
	{
	    theidA[i]=document.getElementById(i);
	    
    	document.getElementById(i + '_tabmouseover').style.display="none";

    	if (theStemId == i) document.getElementById(i + '_tabactive').style.display="block";
    	if (theStemId != i) document.getElementById(i + '_tabactive').style.display="none";

    	if (theStemId == i) document.getElementById(i + '_tabinactive').style.display="none";
    	if (theStemId != i) document.getElementById(i + '_tabinactive').style.display="block";

    	if (theStemId == i) document.getElementById(i + '_content').style.display="block";
    	if (theStemId != i) document.getElementById(i + '_content').style.display="none";

	}
}


function openSubMouseOver2(theStemId, maxId){
	var theid=document.getElementById(theStemId);
	var i;
	var i2;
	var i_active;
	theidA = new Array(); 

	for(i2=1;i2<=maxId;i2++)
	{
             if(document.getElementById(i2 + '_tabactive').style.display=="block")
             { 
                i_active = i2;
              }
         }

	for(i=1;i<=maxId;i++)
	{


          theidA[i]=document.getElementById(i);
         if (i != i_active)
         {	    


    	   if (theStemId == i) document.getElementById(i + '_tabmouseover').style.display="block";
      	   if (theStemId != i) document.getElementById(i + '_tabmouseover').style.display="none";

     	   if (theStemId == i) document.getElementById(i + '_tabinactive').style.display="none";
     	    if (theStemId != i) document.getElementById(i + '_tabinactive').style.display="block";
          }

     }
}


function ButtonMouseover(theStemId, maxId){
	var theid=document.getElementById(theStemId);
	var i;
	theidA = new Array(); 
	
	for(i=1;i<=maxId;i++)
	{
	    theidA[i]=document.getElementById(i);
	    
    	if (theStemId == i) document.getElementById(i + '_content').style.display="block";
    	if (theStemId != i) document.getElementById(i + '_content').style.display="none";


    	if (theStemId == i) document.getElementById(i + '_link').className = 'block-button-active';
    	if (theStemId != i) document.getElementById(i + '_link').className = 'block-button-inactive';


	}
}
