//JS-Framework zur Dialogausgabe
//benötigt dfjsfw.js
//benötigt dfjsfw-maus.js
//müssen vorher eingebunden sein

//Browserweiche
var maxZindex=0;
var ButtonTplDefault="<input style='background-color:#E9E9CF;border-width:1;font-weight:bold' type='button' value='{titel}' onclick='{onclick}' onfocus='if(this.blur)this.blur()'>";
var dlgTplDefault=
	"<div style='border:1px solid #cccccc;'>"+
         "<table id='{dlgID}table' "+
         "style='font-family:Verdana,Arial; font-size:12px; border-style:outset; border-width:2px; border-color:#E6E6CD; background-color:#F5F5DC; width:{BoxWidth}px; height:{BoxHeight}px;' "+
         "cellpadding='2' cellspacing='1' >"+
		"<tr><td colspan=2 align=center bgcolor='#DEDEC5' onmousedown='getxyRelativ(\"{dlgID}\",0)' style='cursor:move; background-image:url(images/move.gif);background-position:left;background-repeat:no-repeat;height:25px;'><b>{dlgTitel}</b></td></tr>"+
		"<tr><td colspan=2 align=center height=99% valign=center>{dlgContent}</td></tr>"+
		"<tr><td height=10 bgcolor='#DEDEC5'><div onmousedown='getxyRelativ(\"{dlgID}\",1)' style='float:right;background-image:url(images/resize.gif);background-position:bottom right; background-repeat:no-repeat; width:15px;height:15px;cursor:nw-resize; '></div>{dlgFooter}</td></tr>"+
	"</table></div>";

var MenuTplDefault=
	"<style type='text/css'>"+
	  "#{dlgID}table {font-family:Verdana,Arial;font-size:80%;}"+
	  "#{dlgID}table a {text-decoration:none;display:block; height:15px; padding:3px;}"+
	  "#{dlgID}table a:link,#{dlgID}table a:visited {text-decoration:none;color:#803020}"+
	  "#{dlgID}table a:hover,#{dlgID}table a:active {text-decoration:none;background-color:#F1D154;color:#000040;}"+
	  "#{dlgID}table hr {border:0px;height:1px;background-color:#a0848E;color:#a0848E}</style>"+
         "<div style='border:1px solid #cccccc;'>"+
         "<table id='{dlgID}table' "+
         "style='border-style:outset; border-width:2px; border-color:#E6E6CD; background-color:#F5F5DC; width:{BoxWidth}px; height:{BoxHeight}px;' "+
         "cellpadding='2' cellspacing='1' >"+
		"<tr><td colspan=2 align=center height='10' bgcolor='#DEDEC5' onmousedown='getxyRelativ(\"{dlgID}\",0)' style='cursor:move; padding-left:15px;background-image:url(images/move.gif);background-position:left;background-repeat:no-repeat;'><img align=right src='images/close.gif' alt='Schließen' onclick=\"DialogBoxHide('{dlgID}');\" style='cursor: default;'><b>{dlgTitel}</b></td></tr>"+
                 "<tr><td valign=top align=left onmousedown=\"DialogBoxHide('{dlgID}');\">{dlgContent}</td></tr>"+
         "</table></div>";

var SuggestionTplDefault=
	"<style type='text/css'>"+
	  "#{dlgID}table {font-family:Verdana,Arial;font-size:80%;}"+
	  "#{dlgID}table a {text-decoration:none;display:block; height:15px; padding:3px;}"+
	  "#{dlgID}table a:link,#{dlgID}table a:visited {text-decoration:none;color:#803020}"+
	  "#{dlgID}table a:hover,#{dlgID}table a:active {text-decoration:none;background-color:#F1D154;color:#000040;}"+
	  "#{dlgID}table hr {border:0px;height:1px;background-color:#a0848E;color:#a0848E}</style>"+
         "<div style='border:1px solid #cccccc;'>"+
         "<table id='{dlgID}table' "+
         "style='border-style:outset; border-width:2px; border-color:#E6E6CD; background-color:#F5F5DC; width:{BoxWidth}px; height:{BoxHeight}px;' "+
         "cellpadding='2' cellspacing='1' >"+
         "<tr><td valign=top align=left>{dlgContent}</td></tr>"+
         "</table></div>";
                                //onclick="{TabJS}"
//Achtung, onclick="{TabJS}" soppelte Ausfürhungszeichen verwenden
//var selectedTabTplDefault='<div                   style="cursor:pointer;margin-left:5px;height:20px;padding:5px;border:1px solid #a04000;border-bottom:none; background-color:#FFF0E0;float:left;">{TabTitel}</div>';
//var TabTplDefault        ='<div onmouseover="{TabJS}" onclick="{TabJS}" style="cursor:pointer;margin-left:5px;height:15px;padding:5px;border:1px solid #a04000;                    background-color:#E9E0D0;float:left;margin-top:4px;">{TabTitel}</div>';
//var TabDivTplDefault='<div style="padding-left:30px;border-bottom:1px solid #a04000; height:30px;font-family:Verdana,Arial;font-size:80%;background-color:#ffffff;">{Tabs}</div><div style="clear:both;"></div>';
var selectedTabTplDefault='<div                   style="cursor:pointer;margin-left:5px;height:24px;padding:5px;padding-bottom:0px;border:1px solid #a04000;border-bottom:none; background-color:#FFF0E0;float:left;">{TabTitel}</div>';
var TabTplDefault        ='<div onmouseover="{TabJS}" onclick="{TabJS}" style="cursor:pointer;margin-left:5px;margin-top:5px;height:19px;padding:4px;padding-bottom:0px;border:1px solid #a04000; background-color:#E9E0D0;float:left;">{TabTitel}</div>';
var TabDivTplDefault='<div style="height:30px;padding-left:30px;background-image:url(images/tabBG.gif);background-position:bottom;background-repeat:repeat-x; font-family:Verdana,Arial;font-size:80%;">{Tabs}</div><div style="clear:both;"></div>';

//Erstellt eine Dialogbox
//  dlgID	über diese ID kann die neue Box angesprochen werden
//  dlgTpl	Template der neuen Box  {dlgContent} {dlgTitel} {BoxHeight} {BoxWidth}
//  dlgTitel	Titel der Box
//  dlgContent	Content der neuen Box
function DialogBoxInit(dlgID,dlgTpl,dlgTitel,dlgContent,dlgFooter,BoxWidth,BoxHeight,zIndex)
{ //Box erstellen
  var box=str_replace("{dlgTitel}",dlgTitel,dlgTpl);
  box=str_replace("{dlgContent}",dlgContent,box);
  box=str_replace("{dlgFooter}",dlgFooter,box);
  box=str_replace("{BoxHeight}",BoxHeight,box);
  box=str_replace("{BoxWidth}",BoxWidth,box);
  box=str_replace("{dlgID}",dlgID,box);

  if(ie5||nn6)
  {  document.write("<div onclick='dlgBoxToFront(this)' style='position:absolute;top:-10000px;left:0px;z-index:"+zIndex+"' id='"+dlgID+"'>"+box+"</div>");
  }
  if (zIndex>maxZindex){maxZindex=zIndex;}
}

//Anzeigen der erstellten Dialogbox
function DialogBoxShow(dlgID,PosX,PosY)
{
  var moveStatus=0;
  //xConfirm=xConfirmStart, yConfirm=yConfirmStart;

  if(ie5)
  { document.getElementById(dlgID).style.left=PosX+'px';
    document.getElementById(dlgID).style.top=PosY+'px';
  }
  else if(nn6)
  {  document.getElementById(dlgID).style.left=PosX+'px';
     document.getElementById(dlgID).style.top=PosY+'px';
  }
  else confirmAlternative();
  dlgBoxToFront($(dlgID));
}

function DialogBoxShowBildschimkoordinaten(dlgID,PosX,PosY)
{
  var moveStatus=0;
  //xConfirm=xConfirmStart, yConfirm=yConfirmStart;

  if(ie5)
  { //alert('d');
    document.getElementById(dlgID).style.left=PosX+getScrollPosX()+'px';
    document.getElementById(dlgID).style.top=PosY+getScrollPosY()+'px';
  }
  else if(nn6)
  {
     document.getElementById(dlgID).style.left=PosX+getScrollPosX()+'px';
     document.getElementById(dlgID).style.top=PosY+getScrollPosY()+'px';
  }
  else confirmAlternative();
  dlgBoxToFront($(dlgID));
}

function DialogBoxHide(dlgID)
{
  DialogBoxShow(dlgID,10000,0); //Aus dem Sichtfeld verschieben
}

//Box durch anklicken in den vordergrund bringen
function dlgBoxToFront(obj)
{ if (obj.style.zIndex<maxZindex)
  {  maxZindex++;
     obj.style.zIndex=maxZindex;
  }
}


//Für unser eigenes Drag and Drop
var OldMausX=0;
var OldMausY=0;
var moveStatus=0;
var MovDlgID='';
var MovType='';


//Relative Mausposition auf der Box ermitteln
function getxyRelativ(dlgID,typ)
{ moveStatus=1;
  MovDlgID=dlgID;
  MovType=typ;
  OldMausX=MausX;
  OldMausY=MausY;
}

//Maustaste loslassen, verschieben beenden!
if(typeof document.onmouseup == 'function'){var OldOnmouseupFuncIUZS=document.onmouseup;}
document.onmouseup=function (){moveStatus=0;if(typeof OldOnmouseupFuncIUZS == 'function'){ OldOnmouseupFuncIUZS(e);}}

//Verschieben der Boxen
if(typeof document.onmousemove == 'function'){var OldOnmousemoveFuncIUZS=document.onmousemove;}
document.onmousemove=function(e)
{ //Verschieben der DialogBoxen handhaben
  //alert('onmousemove in dialog.js');
  if(moveStatus>0)
  {  switch (MovType)
     { case 0 : //Move
                var oldX=parseInt(document.getElementById(MovDlgID).style.left);
                var oldY=parseInt(document.getElementById(MovDlgID).style.top);
                document.getElementById(MovDlgID).style.left=oldX+(MausX-OldMausX)+'px';
                if (oldY+(MausY-OldMausY)>-1)
                { document.getElementById(MovDlgID).style.top=oldY+(MausY-OldMausY)+'px';
                  OldMausY=MausY;
                }
                OldMausX=MausX;
                break;
       case 1 : //Resize
                var oldX=parseInt(document.getElementById(MovDlgID+"table").style.width);
                var oldY=parseInt(document.getElementById(MovDlgID+"table").style.height);
                document.getElementById(MovDlgID+"table").style.width=oldX+(MausX-OldMausX)+'px';
                document.getElementById(MovDlgID+"table").style.height=oldY+(MausY-OldMausY)+'px';
                OldMausX=MausX;
                OldMausY=MausY;
                break;
     }
  }
  //ggf.VorgängerEvent aufrufen
  if(typeof OldOnmousemoveFuncIUZS == 'function'){ OldOnmousemoveFuncIUZS(e);}
}

//#######################################################################################################################
function returnButton(Titel, onClickStr,ButtonTpl)
{ var button=str_replace("{titel}",Titel,ButtonTpl);
  button=str_replace("{onclick}",onClickStr,button);
  return button;
}

//#######################################################################################################################
//Erzeuge StandartMessagebox mit Templates für Button und Box
function MessageBoxInit(ButtonTpl,dlgTpl)
{ DialogBoxInit("okbox",dlgTpl,"<div id='okboxtitel'></div>","<div id='okboxcontent'></div><br>"+returnButton("Schließen", "DialogBoxHide(\"okbox\");",ButtonTpl),"",320,150,10);
}
//Füllt StandartMessagebox mit wechselndem Inhalt und Zeigt diese an
function ShowMessageBox(Titel,Message)
{ document.getElementById('okboxtitel').innerHTML=Titel;
  document.getElementById('okboxcontent').innerHTML=Message;
  DialogBoxShowBildschimkoordinaten('okbox',300,200);  //Bildschirmkoordinaten, damit immer sichtbar, egal wohin gescrollt wurde
}

//####################################################################################################################
//Suggestionbox für Eingaben anzeigen
//Konstuktion:
// <div id='suggestionwords'>Hallo Hans Hannes Hund Heim Herd Keller Kunde</div>
// <input onkeyup="suggestion(this,'suggestionwords');" type="Text" name="Suggestion" value="" size="" maxlength="">
//Initialisieren der benötigten Dialogbox
function suggestionInit(SuggestionTpl)
{
   DialogBoxInit('suggestionDLGID',SuggestionTpl,'',"<div id='Suggestioncontent'  style='overflow:auto; height:175px;'></div>","",'',175,10);

}
//Aufruf des Wortvorschlagers durch onkeyup / onfocus
//o = Object des Inputfelds
//words = Wortliste "wort1|Wort2|..."
function suggestion(o,words)
{
  o.onblur=function(){DialogBoxHide('suggestionDLGID');}
  var SBoxO=$('Suggestioncontent');
  var inputID=o.id;
  var pos=getPositionRelative(o);
  var Woerter=words.split("|");
  var WoerterArr=new Array();
  var i=0;
  for (var key in Woerter)
  {
    if (Woerter[key].toLowerCase().indexOf(o.value.toLowerCase())==0){ WoerterArr[i]=Woerter[key];i++;}
    if (i>30){break;}
  }
  if (WoerterArr.length>0){DialogBoxShow('suggestionDLGID',pos.x,pos.y+18);}
  else {DialogBoxHide('suggestionDLGID');}

  WoerterArr.sort();
  var s='';
  for (var key in WoerterArr)
  {s=s+'<a href="javascript:" onmousedown="suggestionSelect(\''+inputID+'\',\''+WoerterArr[key]+'\');return false;"><b>'+WoerterArr[key].substr(0,o.value.length)+'</b>'+WoerterArr[key].substr(o.value.length)+' &nbsp; &nbsp;</a>';
  }
  SBoxO.innerHTML=s;
}

function suggestionSelect(inputID,Wort)
{
 $(inputID).value=Wort;
 DialogBoxHide('suggestionDLGID');
}


//#########################################################################################
//UsedDivID = Tabset wird aus diesem DIV-Kontainer erzeugt
//Struktur:
//<div id='UsedDivID'>
//  <div id='tab1' title='Mein Tab 1'>Inhalt</div>
//  <div id='tab2' title='Tab 2'>Inhalt2</div>
//  <div id='tab3' title='Noch ein Tab'>Inhalt3</div>
//</div>
//TabTpl     = {TabTitel}{TabJS}  Formatierung der Tabs
//TabDivTpl  = {Tabs}  Formatierung um Tabs herum
//selectedTabNr = Laufende Nummer des Divs 1,2,...
//selectedTabTpl,TabTpl,TabDivTpl=Templates zur Ausgabe für Aktiven Tab,inAktiven Tab,Um Tabs herum
function MakeTabSet(UsedDivID,selectedTabNr,selectedTabTpl,TabTpl,TabDivTpl)
{
  var o=$(UsedDivID);
  if (!isset(o.selectedTabTpl))
  { o.innerHTML="<div id='"+UsedDivID+"MENU' title='Tabs'></div>"+o.innerHTML;
  }
  if (selectedTabTpl=='#') //Werte sind schon im Object hinterlegt!
  { selectedTabTpl=o.selectedTabTpl;
    TabTpl=o.TabTpl;
    TabDivTpl=o.TabDivTpl;
  }
  else
  { o.selectedTabTpl=selectedTabTpl;
    o.TabTpl=TabTpl;
    o.TabDivTpl=TabDivTpl;
  }

  var tabs='';
  var divs=o.firstChild;
  var i=0;
  while (divs != null)
  { if ((divs.tagName=="DIV")&&(divs.title!='Tabs'))
    { i++;
      if (i==selectedTabNr)
      { if (divs.style.display!='block')
        { StartAnimationOpacity(300,10,1,divs.id,0,100);//Optional mit FadeinAnimation
          divs.style.display='block';
        }
        divs.style.zIndex=10;
        var s=str_replace('{TabTitel}',divs.title,selectedTabTpl);
      }
      else
      { if (divs.style.display!='none')
        { divs.style.display='none';
        }
        divs.style.zIndex=8;
        var s=str_replace('{TabTitel}',divs.title,TabTpl);
      }
     // tabs=tabs+'<div title="'+i+'" onclick="o=this.parentNode.parentNode.parentNode;MakeTabSet(o.id,this.title,o.selectedTabTpl,o.TabTpl,o.TabDivTpl);">'+s+'</div>';
      var TabJS="MakeTabSet('"+UsedDivID+"',"+i+",'#','#','#');";
      tabs=tabs+str_replace('{TabJS}',TabJS,s);
    }
    divs = divs.nextSibling;
  }
  var MaxLayer=i;
  var m=$(UsedDivID+"MENU");
  m.innerHTML=str_replace('{Tabs}',tabs,TabDivTpl);
}
//##################################################################
//Erstellt aus u.g. Struktur eine ClipRegion mit dahinterliegender größerer Bildfläche
//Struktur
//<div id="slidepanel" style="border:1px solid; width:320px; height:200px;">
//    <div>Big Content <img src="t/karte.jpg" width="2508" height="1772" border="0" alt=""></div>
//</div>
//slidepanelID,PoxX,PosY -Startposition
function SlidePanelInit(slidepanelID,PosX,PosY)
{ var o=$(slidepanelID);
  var BigContent=o.firstChild;
  while (BigContent != null)
  { if (BigContent.tagName=="DIV"){break;}
     BigContent = BigContent.nextSibling;
  }
  if (BigContent.tagName!="DIV"){alert('SlidePanel:Childelement ist kein DIV');return;}
  BigContent.id=slidepanelID+"Content";
  o.style.overflow='hidden';
  o.style.position='relative';
  BigContent.style.position='relative';
  BigContent.Breite=o.scrollWidth
  BigContent.Hoehe=o.scrollHeight
  SlidePanelSetPos(slidepanelID,PosX,PosY);
}

//Bewege Ausschnitt zu Position
function SlidePanelMoveToPos(ObjektID,PosX,PosY,dauer,schritte)
{ var slidepanelObj=$(ObjektID);
  var LeinwandObj=$(ObjektID+"Content");
  if (PosX<0){PosX=0;}
  if (PosY<0){PosY=0;}
  var ViewPortBreite=parseInt(slidepanelObj.offsetWidth);
  var ViewPortHoehe=parseInt(slidepanelObj.offsetHeight);

  var LeinwandBreite=LeinwandObj.Breite;
  var LeinwandHoehe=LeinwandObj.Hoehe;
  if (PosX>LeinwandBreite-ViewPortBreite){PosX=LeinwandBreite-ViewPortBreite;}
  if (PosY>LeinwandHoehe-ViewPortHoehe){PosY=LeinwandHoehe-ViewPortHoehe;}
  //alert(LeinwandHoehe + "-"+LeinwandBreite );
  StartAnimation(dauer,schritte,1,ObjektID+"Content","style.left",-PosX,'px')
  StartAnimation(dauer,schritte,1,ObjektID+"Content","style.top",-PosY,'px')
}

//Bewege Ausschnitt durch Maus
//speed z.B. 0.5
function SlidePanelMausMove(slidepanelID,speed,PosXFallback,PosYFallback,dauer, schritte)
{ var o=$(slidepanelID);
  o.speed=speed;
  o.PosXFallback=PosXFallback;
  o.PosYFallback=PosYFallback;
  o.dauer=dauer;
  o.schritte=schritte;
  window.setInterval("SlidePanelMausMoveTimer('"+slidepanelID+"');", 30);
  o.onmouseout=function(e)
  {
    SlidePanelMoveToPos(this.id,this.PosXFallback,this.PosYFallback,this.dauer,this.schritte);
  }
}
function SlidePanelMausMoveTimer(slidepanelID)
{ var o=$(slidepanelID);
  var pos=getPositionRelative(o);
  var w=o.offsetWidth;
  var h=o.offsetHeight;
  if (MausY<pos.y){return;}//Mauswerte noch außerhalb des Objektes
  if (MausX<pos.x){return;}
  if (MausY>pos.y+h){return;}
  if (MausX>pos.x+w){return;}
  //Positionsmarken als Werte -50...+50
  var dx=(MausX-pos.x)*100/o.offsetWidth-50;
  var dy=(MausY-pos.y)*100/o.offsetHeight-50;

  var LeinwandObj=$(slidepanelID+"Content");
  var oldX=SlidePanelGetPosX(LeinwandObj);
  var oldY=SlidePanelGetPosY(LeinwandObj);
  var newX=oldX+parseInt(dx*o.speed);
  var newY=oldY+parseInt(dy*o.speed);
  //SlidePanelSetPos(o.id,newX,newY)
  SlidePanelMoveToPos(slidepanelID,newX,newY,1,1);
}



function SlidePanelSetPos(ObjektID,PosX,PosY)
{ var slidepanelObj=$(ObjektID);
  var LeinwandObj=$(ObjektID+"Content");
  if (PosX<0){PosX=0;}
  if (PosY<0){PosY=0;}
  var ViewPortBreite=parseInt(slidepanelObj.offsetWidth);
  var ViewPortHoehe=parseInt(slidepanelObj.offsetHeight);

  var LeinwandBreite=LeinwandObj.Breite;
  var LeinwandHoehe=LeinwandObj.Hoehe;
  if (PosX>LeinwandBreite-ViewPortBreite){PosX=LeinwandBreite-ViewPortBreite;}
  if (PosY>LeinwandHoehe-ViewPortHoehe){PosY=LeinwandHoehe-ViewPortHoehe;}

  LeinwandObj.style.left=-PosX+'px';
  LeinwandObj.style.top =-PosY+'px';
}

function SlidePanelGetPosX(slidepanelObj)
{ return -parseInt(slidepanelObj.style.left);
}
function SlidePanelGetPosY(slidepanelObj)
{ return -parseInt(slidepanelObj.style.top);
}
//##############################################################
//Erzeugt Verticale Header
//headerIDs=Arry of DivIDs der klickbaren Überschriften
//ContentIDs=Arry of DivIDs der Inhaltskontainer
//AktivElementNr=geöffnettes Element
//schliessbar=true/false ist das schlißen aller Schubladen erlaubt?
//NurEinsOffen=Öffnen eines zweiten Kontaiuners schiließt ersten
//fade=Fading verwenden?
//dauer, schritte für Animation
function VerticalTabsInit(headerIDs,ContentIDs,AktivElementNr,schliessbar,NurEinsOffen,fade,dauer, schritte)
{
  AktivElementNr--;
  for (var key in ContentIDs)
  { //alert(key);
    var c=$(ContentIDs[key]);
    var h=$(headerIDs[key]);
    c.style.overflow='hidden';
    //Versuche Höhe des Divs zu ermitteln - Probleme mit IE8-Kompatiblitätsansicht
    var hoehe=parseInt(c.offsetHeight);
    if ((isNaN(hoehe))||(hoehe<5)) hoehe=parseInt(c.height);
    if ((isNaN(hoehe))||(hoehe<5)) hoehe=parseInt(c.style.height);
    if ((isNaN(hoehe))||(hoehe<5)) hoehe=345; //Defaultwert, falls alles scheiter
    // alert(hoehe);
    c.hoehe=hoehe;

    h.schliessbar=schliessbar;
    h.NurEinsOffen=NurEinsOffen;
    h.fade=fade;
    h.dauer=dauer;
    h.Test='123Hallo';
    h.headerIDs=headerIDs;
    h.ContentIDs=ContentIDs;
    h.ContentID=key;
    h.dauer=dauer;
    h.schritte=schritte;
    if (AktivElementNr==key)
    {  c.style.height=c.hoehe+'px';
       h.aktiv=true;
    }
    else
    { c.style.height='0px';
      if (fade){setOpacity(c, 0);}
      h.aktiv=false;
    }

   /* alert (c.offsetHeight);
    alert (c.height);
    alert (c.style.height);
   */
    h.onclick=function(e)
    {
      for (var key in this.ContentIDs)
      {
        var h=$(headerIDs[key]);
        var c=$(ContentIDs[key]);
        var aktiv=h.aktiv;
        if ((h.schliessbar)&&(aktiv)&&(key==this.ContentID))
        { //Kontainer wird geschlossen
          h.aktiv=false;
          StartAnimation(h.dauer,h.schritte,1,c.id,"style.height",0,'px');
          if (h.fade){StartAnimationOpacity(h.dauer,h.schritte,1,c.id,100,0);}
        }
        if ((h.NurEinsOffen)&&(aktiv)&&(key!=this.ContentID))
        { //Kontainer wird geschlossen
          h.aktiv=false;
          StartAnimation(h.dauer,h.schritte,1,c.id,"style.height",0,'px');
          if (h.fade){StartAnimationOpacity(h.dauer,h.schritte,1,c.id,100,0);}
        }
        if ((!aktiv)&&(key==this.ContentID))
        { //Kontainer wird geöffnet
          h.aktiv=true;
          StartAnimation(h.dauer,h.schritte,1,c.id,"style.height",c.hoehe,'px');
          if (h.fade){StartAnimationOpacity(h.dauer,h.schritte,1,c.id,0,100);}
        }
      }
    }//enf eudfuction

  }

}