<?xml version="1.0" encoding="utf-8"?>
<mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml" 
    xmlns:geotag="geotag.*" xmlns:ns1="db.*"
    layout="absolute" width="100%" height="100%" backgroundGradientAlphas="[0.5, 0.25]" backgroundGradientColors="[#7700AA, #9900DD]" themeColor="#7700AA" 
    viewSourceURL="srcview/index.html"
     creationComplete="init()"  >
     
<!-- SCRIPT Start  jeweils über include Datei, Komponenten haben jeweils ein eigenes Include --> 
<mx:Script source="app_pfo.as" />

<!-- Farbe und Dicke für Charts -->
<mx:Stroke color="0xDDBBEE" weight="2" id="axis"/>

<!-- Steuerung für Links in Fusszeile -->
<mx:states>
    <mx:State name="karteAnzeigen">
       <mx:SetProperty     target="{karte}" name="visible" value="true" />
       <mx:SetProperty     target="{karte}" name="label"   value="Karte anzeigen" />
       <mx:SetEventHandler target="{karte}" name="click"   handler="main_navi.selectedChild=gmap;
                                                                       currentState='karteSchliessen';" />
       <mx:SetProperty name="minWidth" value="800"/>
       <mx:SetProperty name="minHeight" value="600"/>
    </mx:State>
    <mx:State name="karteSchliessen">
       <mx:SetProperty     target="{karte}" name="visible" value="true" />
       <mx:SetProperty     target="{karte}" name="label"   value="zurück" />
       <mx:SetEventHandler target="{karte}" name="click"   handler="main_navi.selectedChild=main;
                                                                       currentState='karteAnzeigen';" />
    </mx:State>
</mx:states>

  
<!-- äusserer Rahmen-->
<mx:Canvas id="app"
    width="98%" height="98%" horizontalCenter="0" verticalCenter="0" 
    borderStyle="solid" cornerRadius="10" borderColor="#DDDDDD" borderThickness="2" 
    backgroundColor="#FFFFFF" backgroundAlpha="0.95" themeColor="#DDBBEE">

<!-- umgebende Box mit Kopfzeile, Fusszeile und Inhaltscontainer-->        
    <mx:VBox height="100%" width="100%" horizontalCenter="0" verticalCenter="0" paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10">
<!--*************-->
<!--  Kopfzeile  -->
<!--*************-->
        <mx:HBox width="100%" horizontalCenter="0" borderStyle="solid" cornerRadius="7" borderColor="#DDDDDD" borderThickness="1" alpha="1.0" backgroundColor="#DDBBEE"  horizontalAlign="center" verticalAlign="middle">
            <mx:Spacer width="10" /> 
            <mx:Label id="adminText" visible="{admin}" text="A D M I N - Modus" fontSize="14" fontWeight="bold" color="#FF1111"  textAlign="center"/>
            <mx:Label text="   Projekte, Fortbildung, Organisation" fontSize="14" fontWeight="bold" textAlign="center" width="100%"/>
            <mx:Label id="labelTest" visible="{admin}" text="eigener User: " />
             <mx:ComboBox id="cbPersEinzel" dataProvider="{user}"  selectedIndex="{cbUser.selectedIndex}" visible="{admin}" 
                          change="proZeitPers=cbPersEinzel.selectedItem.label;
                          userMa_id=cbPersEinzel.selectedItem.ma_id;
                          holeOrgIdUser();
                          loadXMLpro();
                          holeFlist()"/> 
             <mx:LinkButton id="lbUser" visible="false"
                fontWeight="bold" fontSize="12" themeColor="#7700AA" textDecoration="underline" alpha="1.0" 
                click="abmelden()" />
            <mx:LinkButton id="hilfe" label="Hilfe" 
                fontWeight="bold" fontSize="12" themeColor="#7700AA" textDecoration="underline" alpha="1.0" 
                click="navigateToURL(new URLRequest('help_pfo.html'), '_blank')" />
            <mx:Spacer width="10" />
        </mx:HBox> 
<!--*************-->
<!-- I N H A L T -->
<!--*************-->
<mx:ViewStack id="main_navi" width="100%" height="100%" creationPolicy="all">
        
<!-- LOGIN -->
    <mx:Canvas id="login" width="100%" height="100%" creationComplete="cbUser.setFocus()" show="cbUser.setFocus()">
        <mx:Label text="pfo(S)" fontWeight="bold" fontSize="36" color="#7700AA" horizontalCenter="13" top="30"/>
        <mx:Label text="Projekte, Fortbildungen und Organisation von IT-KlinsSys in der StKM" top="100" horizontalCenter="0" fontSize="14" fontWeight="bold" color="#7700AA"/>
        <mx:Text  text="Web-Projektarbeit mit Adobe Flex3, php und MySQL&#xa;Dr. Felix v. Festenberg&#xa;Masterstudiengang Medizinische Informatik an der Beuth-Hochschule Berlin&#xa;Wintersemester 2009 / 2010 " 
            horizontalCenter="0" top="150" textAlign="center" fontSize="12"/>
        <mx:Form id="loginForm" horizontalCenter="0" top="250" width="270">
            <mx:FormItem label="Benutzer:">
                <mx:ComboBox id="cbUser" width="160" editable="false"
                    change="pass.setFocus();messLogin.text=''"
                    dataProvider="{user}"/>
            </mx:FormItem>
            <mx:FormItem label="Passwort:">
                <mx:TextInput id="pass" displayAsPassword="true" width="100%"
                    enter="anmelden(pass.text)"/>
            </mx:FormItem>
            <mx:Button label="Anmelden"
                    click="anmelden(pass.text)" textAlign="center" width="98%"/>
        </mx:Form>            
        <mx:Label id="messLogin" horizontalCenter="0" top="360" color="#FF11AA" fontSize="12" fontWeight="bold" textAlign="center"/>
        <mx:LinkButton top="400" label="Eine ausführliche interaktive Anleitung (Text, Video, Animation) gibt es hier." 
            horizontalCenter="0" fontSize="12" textDecoration="underline" themeColor="#7700AA" 
            click="navigateToURL(new URLRequest('help_pfo.html'), '_blank')" />
    </mx:Canvas>
            
<!-- MAIN -->
<mx:Canvas id="main" width="100%" height="100%">        

<!-- Tabs -->        
<mx:TabNavigator id="mainTab" width="100%" height="100%" paddingBottom="10" paddingTop="10" horizontalCenter="0" verticalCenter="0" fontSize="12" borderColor="#DDBBEE" cornerRadius="5">

<!--###############-->    
<!-- Projekte -->
<!--###############-->
<mx:Canvas id="proTab" label="Projekte" width="100%" height="100%" 
     show="holePstatus();rbProSelectLauf.selected=true;cbProNurEigene.selected=true;cbProSelectStatus.enabled=false;loadXMLpro();"
     creationComplete="holePstatus();rbProSelectLauf.selected=true;cbProNurEigene.selected=true">
    <mx:HBox width="100%" height="100%" >
    <mx:Spacer width="5" />
    <mx:VBox height="100%" width="100%" horizontalCenter="0" verticalCenter="0">
        <mx:Spacer width="10" />
        <mx:HBox width="100%" paddingTop="5" paddingBottom="5" paddingLeft="10" paddingRight="10" borderStyle="solid" borderColor="#DDBBEE" cornerRadius="5"  borderThickness="2">
              <mx:Label text="welche:"  fontWeight="bold" fontSize="11" paddingTop="3"/>
            <mx:RadioButtonGroup id="rbProSelect"/>
             <mx:RadioButton id="rbProSelectLauf" groupName="rbProSelect" label="laufende" selected="true"
                 click="cbProSelectStatus.enabled=false;loadXMLpro()"/>
              <mx:RadioButton id="rbProSelectAlle" groupName="rbProSelect" label="alle" 
                 click="cbProSelectStatus.enabled=false;loadXMLpro()"/>
              <mx:RadioButton id="rbProSelectStatus" groupName="rbProSelect" label="mit Status"
                 click="cbProSelectStatus.enabled=true;loadXMLpro()"/>
              <mx:ComboBox id="cbProSelectStatus" dataProvider="{pstatus}" enabled="false" fontSize="10" fontWeight="normal" 
                  change="loadXMLpro()" />
             <mx:Spacer width="50" />
             <mx:CheckBox id="cbProNurEigene"  label="nur EIGENE"  
                 click="loadXMLpro()"/>
         </mx:HBox>
         <mx:Spacer width="10" />
        <mx:HDividedBox width="100%" height="100%" dividerColor="#DDBBEE" dividerAlpha="1.0" dividerThickness="5" id="fobHDB">
<!-- pro Baumauswahl -->                    
            <mx:VBox height="100%" borderStyle="solid" borderColor="#DDBBEE" cornerRadius="5" borderThickness="2"  verticalGap="0" >
                <mx:HBox width="100%"  backgroundColor="#DDBBEE" backgroundAlpha="0.2">
                    <mx:Label text="Auswahl" textAlign="center" width="100%" fontWeight="bold"/>
                </mx:HBox>
                <mx:HRule  width="100%"/>
                <mx:Tree id="proTree" height="100%" width="100%" verticalCenter="0" borderStyle="none"  themeColor="#7700AA"
                    dataProvider="{proXML}" 
                    allowMultipleSelection="false"
                    labelField="@titel"
                    showRoot="false"
                    change="proAuswaehlen(event)"
                    />
            <mx:HRule  width="100%"/>
            <mx:HBox width="100%" backgroundColor="#DDBBEE" backgroundAlpha="0.2">
                <mx:LinkButton label="alle auf"  fontWeight="normal" textDecoration="underline" fontSize="10"
                     click="proTree.openItems=proXML.child('*').parent().descendants();"/>
                <mx:Spacer width="50%" />
                <mx:LinkButton label="1.auf"  fontWeight="normal" textDecoration="underline" fontSize="10"
                     click="proTree.openItems=proXML.child('*')"/>
                <mx:Spacer width="50%" />
                <mx:LinkButton label="alle zu"  fontWeight="normal" textDecoration="underline" fontSize="10"
                     click="proTree.openItems=''"/>                
            </mx:HBox>

            </mx:VBox>
            <mx:VDividedBox width="50%" height="100%" dividerColor="#DDBBEE" dividerAlpha="1.0" dividerThickness="5" >
                <mx:VBox height="50%" width="100%" verticalScrollPolicy="off" borderStyle="solid" borderColor="#DDBBEE" cornerRadius="5" borderThickness="2"  verticalGap="0">
<!-- pro Detail -->    
                    <mx:HBox width="100%"  backgroundColor="#DDBBEE" backgroundAlpha="0.2">
                        <mx:Spacer width="50%" />
                        <mx:Label text="Beschreibung" textAlign="left" fontWeight="bold"/>
                        <mx:Spacer width="50%" />
                    </mx:HBox>
                <mx:HRule  width="100%"/>
                    <mx:Form id="proForm" fontSize="10" horizontalCenter="0" width="100%" paddingBottom="5" paddingLeft="5" paddingRight="5" paddingTop="5" verticalGap="2">
                        <mx:FormItem label="Titel:" fontWeight="bold" width="100%">
                            <mx:TextInput id="proTitel" text="{proTitelCont}"  editable="false" maxChars="45" width="100%" textAlign="center"/>
                        </mx:FormItem>
                        <mx:FormItem label="Link:" width="100%">
                            <mx:TextInput id="proLink"  text="{proLinkCont}" editable="false" maxChars="45" width="100%"
                                 click="if(proLink.text!='')navigateToURL(new URLRequest('http://'+proLink.text), '_blank')" textDecoration="underline"/>
                        </mx:FormItem>
                        <mx:FormItem label="Status, Beginn:" width="100%" horizontalAlign="right">
                          <mx:HBox width="100%">
                            <mx:TextInput id="proStatus"  text="{proStatusCont}" editable="false" maxChars="45" width="50%" textAlign="center"/>
                            <mx:TextInput id="proBeginn" text="{proBeginnCont}" editable="false" maxChars="10" width="50%" textAlign="center"/>
                          </mx:HBox>
                        </mx:FormItem>            
                        <mx:FormItem label="Ende Plan/Real:" width="100%" horizontalAlign="right">
                          <mx:HBox width="100%">
                            <mx:TextInput id="proEndePlan" text="{proEndePlanCont}" editable="false" maxChars="10" width="50%" textAlign="center"/>
                            <mx:TextInput id="proEndeReal" text="{proEndeRealCont}" editable="false" maxChars="10" width="50%" textAlign="center"/>
                          </mx:HBox>
                        </mx:FormItem>                            
                    </mx:Form>
                    <mx:HBox horizontalGap="1" width="100%" height="100%">
                        <mx:Spacer width="5" />                             
                        <mx:TextArea id="proBeschreibung"  verticalScrollPolicy="on" text="{proBeschreibungCont}" width="100%" height="100%" borderStyle="solid" editable="false" wordWrap="true" fontSize="10"/>
                        <mx:Spacer width="5" />                             
                    </mx:HBox>    
                    <mx:Spacer height="5" />                                
                </mx:VBox>
                <mx:VBox height="50%" width="100%" borderStyle="solid" borderColor="#DDBBEE" cornerRadius="5" borderThickness="2" verticalGap="0">
<!-- pro Personen -->                    
                    <mx:HBox width="100%"  backgroundColor="#DDBBEE" backgroundAlpha="0.2">
                        <mx:Spacer width="10" />
                        <mx:Label text="Projektteam" textAlign="center" fontWeight="bold"/>                                    
                        <mx:Spacer width="50%" />
                        <mx:Label text="{proTitelCont}" textAlign="center" fontWeight="bold"/>                                    
                        <mx:Spacer width="50%" />
                        <mx:LinkButton id="proPersNew" label="neu" visible="{admin}" enabled="false" fontSize="10" textDecoration="underline" fontWeight="normal"
                             click="proPersAnzeige.selectedChild=proPersNeu; proPersDelete.enabled=false;holeOrgIdAlle();holePauf();"/>
                        <mx:LinkButton id="proPersDelete" label="löschen" visible="{admin}" enabled="false" fontSize="10" textDecoration="underline" fontWeight="normal"
                             click="pmaDelete();"/>                    
                        <mx:Spacer width="10" />
                    </mx:HBox>
                    <mx:HRule  width="100%"/>
                    <mx:Spacer height="5" />
                    <mx:ViewStack id="proPersAnzeige" width="100%" height="100%">
                        <mx:Canvas id="proPersTab"  width="100%" height="100%" >
                            <mx:HBox  width="100%" height="100%" horizontalGap="0">
                                <mx:Spacer width="5" />
                                <mx:DataGrid id="proPers" enabled="{proSelected}" dataProvider="{pma}" height="100%" width="100%" verticalScrollPolicy="on"  borderStyle="none" alternatingItemColors="[#FFFFFF, #FFFFFF]" borderColor="#FFFFFF" headerColors="[#F2F2F2, #F2F2F2]" verticalGridLines="false" horizontalGridLines="true" themeColor="#7700AA"
                                     click="if(proSelected)proPersDelete.enabled=true;">
                                    <mx:columns>
                                        <mx:DataGridColumn dataField="Name" minWidth="150" />
                                        <mx:DataGridColumn dataField="Funktion" />
                                        <mx:DataGridColumn dataField="Abteilung" />    
                                    </mx:columns>
                                </mx:DataGrid>    
                                <mx:Spacer width="5" />                                                            
                            </mx:HBox>                            
                        </mx:Canvas>
                        <mx:Canvas id="proPersNeu"  width="100%" height="100%" >
                            <mx:HBox  width="100%" height="100%" horizontalGap="0">
                                <mx:Spacer width="5" />    
                                <mx:VBox width="100%" height="100%"  verticalGap="8">
                                    <mx:Spacer height="5" />
                                    <mx:Label text="neue Zuordnung" id="proPersTitel"  textAlign="center" width="100%" fontWeight="bold"/>
                                    <mx:ComboBox id="cbUserAlle" width="100%" dataProvider="{orgAlle}"/>
                                    <mx:ComboBox id="cbPauf" width="100%" dataProvider="{pauf}"/>
                                    <mx:HBox width="100%">
                                        <mx:Button id="btProPersSpeichern" width="50%" label="Speichern" 
                                             click="pmaSave();proPersAnzeige.selectedChild=proPersTab"/>
                                        <mx:Button id="btProPersAbbrechen" width="50%" label="Abbrechen" 
                                             click="proPersAnzeige.selectedChild=proPersTab"/>                                    
                                    </mx:HBox>
                                    <mx:Spacer height="5" />                                    
                                </mx:VBox>            
                                <mx:Spacer width="5" />                                                                                            
                            </mx:HBox>
                        </mx:Canvas>                                                
                    </mx:ViewStack>    
                    <mx:Spacer height="5" />
                </mx:VBox>
            </mx:VDividedBox>
            <mx:VDividedBox width="50%" height="100%" dividerColor="#DDBBEE" dividerAlpha="1.0" dividerThickness="5" >
                <mx:VBox height="50%" width="100%" borderStyle="solid" borderColor="#DDBBEE" cornerRadius="5" borderThickness="2" verticalGap="0">
<!-- pro Zeit erfassen -->                    
                    <mx:HBox width="100%"  backgroundColor="#DDBBEE" backgroundAlpha="0.2" horizontalGap="0">
                        <mx:Spacer width="18" />
                        <mx:Label text="Zeit für" fontWeight="bold"/>
                        <mx:Label text="{proZeitPers}" fontWeight="bold"/>
                        <mx:Spacer width="100%" />
                        <mx:LinkButton label="speichern" id="proZeitSave" visible="false" enabled="false" fontSize="10" textDecoration="underline" fontWeight="bold"
                             click="pverSave();"/>                    
                        <mx:LinkButton label="löschen"   id="proZeitDelete" visible="false" enabled="false" fontSize="10" textDecoration="underline" fontWeight="bold"
                             click="pverDelete();"/>                    
                        <mx:Spacer width="18" />
                    </mx:HBox>
                    <mx:HRule  width="100%"/>    
                    <mx:Spacer height="5"/>
                    <mx:HBox  horizontalGap="0" width="100%" >
                    <mx:Spacer width="25%" />
                        <mx:VBox verticalGap="0">
                          <mx:HBox  width="100%" horizontalGap="0" >
                              <mx:Label text="Wann:"  width="50" paddingTop="3" fontSize="10"/>
                            <mx:DateField  id="proZeitWann" showToday="true" selectedDate="{new Date()}" fontWeight="normal" formatString="DD.MM.YYYY"
                                monthNames="['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November','Dezember']"
                                 dayNames="['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa']"
                                 firstDayOfWeek="1"
                                 fontSize="10"
                                 enabled="{proSelected}"
                                 change="proZeitDelete.enabled=false;proZeitListe.selectedItem='';proZeitSave.enabled=true;"/>
                          </mx:HBox>
                          <mx:Spacer height="1" />    
                          <mx:HBox  width="100%" fontSize="10" horizontalGap="0">
                            <mx:LinkButton label="&lt;&lt;&lt;" enabled="{proSelected}" click="proZeitWann.selectedDate=new Date(proZeitWann.selectedDate.getTime()-(1000 * 60 * 60 * 24));proZeitDelete.enabled=false;proZeitListe.selectedItem='';proZeitSave.enabled=true;" textAlign="center" fontWeight="normal" textDecoration="underline"/>
                            <mx:LinkButton label="heute"        enabled="{proSelected}" click="proZeitWann.selectedDate=new Date();proZeitDelete.enabled=false;proZeitListe.selectedItem='';proZeitSave.enabled=true;" width="100%" textDecoration="underline" fontWeight="normal"/>
                              <mx:LinkButton label="&gt;&gt;&gt;" enabled="{proSelected}" click="proZeitWann.selectedDate=proZeitWann.selectedDate=new Date(proZeitWann.selectedDate.getTime()+(1000 * 60 * 60 * 24));proZeitDelete.enabled=false;proZeitListe.selectedItem='';proZeitSave.enabled=true;" fontWeight="normal" textAlign="left" textDecoration="underline"/>                    
                          </mx:HBox>
                        </mx:VBox>
                        <mx:Spacer width="50%" />                              
                        <mx:VBox verticalGap="0" width="50%">
                          <mx:HBox  width="100%" horizontalGap="0">
                              <mx:Label text="Wieviel:" paddingTop="3" fontSize="10"/>
                            <mx:NumericStepper id="proZeitInput" enabled="{proSelected}" value="{proZeitWieviel}" minimum="1" maximum="24" stepSize="1" fontWeight="normal" fontSize="10"
                                 change="proZeitWieviel=proZeitInput.value;rbZeit1.selected=false;rbZeit2.selected=false;rbZeit3.selected=false;rbZeit4.selected=false;rbZeit5.selected=false;
                                         proZeitDelete.enabled=false;proZeitListe.selectedItem='';proZeitSave.enabled=true;" />
                              <mx:Label text=" h" fontWeight="normal" paddingTop="3" fontSize="10"/>
                          </mx:HBox>
                          <mx:Spacer height="1" />    
                          <mx:RadioButtonGroup id="proZeitStunden" change="proZeitDelete.enabled=false;proZeitListe.selectedItem='';proZeitSave.enabled=true;"/>
                          <mx:HBox  width="100%" fontSize="10" fontWeight="bold" horizontalGap="2" height="20">
                            <mx:RadioButton id="rbZeit1" label="1" groupName="proZeitStunden" enabled="{proSelected}" selected="true" click="proZeitWieviel=1"/>
                            <mx:RadioButton id="rbZeit2" label="2" groupName="proZeitStunden" enabled="{proSelected}" click="proZeitWieviel=2"/>
                            <mx:RadioButton id="rbZeit3" label="3" groupName="proZeitStunden" enabled="{proSelected}" click="proZeitWieviel=3"/>
                            <mx:RadioButton id="rbZeit4" label="4" groupName="proZeitStunden" enabled="{proSelected}" click="proZeitWieviel=4"/>
                            <mx:RadioButton id="rbZeit5" label="5" groupName="proZeitStunden" enabled="{proSelected}" click="proZeitWieviel=5"/>                              
                          </mx:HBox>                            
                      </mx:VBox>
                      <mx:Spacer width="25%" />
                    </mx:HBox>    
                    <mx:Spacer height="5"/>
                    <mx:HBox width="100%"  horizontalGap="0">
                        <mx:Spacer width="5" />
                        <mx:Label text="Bemerkung:"  fontSize="10" paddingTop="2"/>
                        <mx:TextInput  id="proZeitBem" text="{proZeitBemerkung}" width="100%"  fontSize="10"
                             change="proZeitDelete.enabled=false;proZeitListe.selectedItem='';proZeitSave.enabled=true;"
                             enter="pverSave()"/>
                        <mx:Spacer width="5" />
                    </mx:HBox>                                    
                    <mx:Spacer height="5"/>
                    <mx:HBox width="100%" height="100%" horizontalGap="0">
                        <mx:Spacer width="5" />                        
                        <mx:DataGrid id="proZeitListe" enabled="{proSelected}" dataProvider="{pverEigene}" height="100%" width="100%" verticalScrollPolicy="on"  borderStyle="none" alternatingItemColors="[#FFFFFF, #FFFFFF]" borderColor="#FFFFFF" headerColors="[#F2F2F2, #F2F2F2]" verticalGridLines="false" horizontalGridLines="true" themeColor="#7700AA"
                             click="proZeitDelete.enabled=true;proZeitSave.enabled=false;" textAlign="center">
                            <mx:columns>
                                <mx:DataGridColumn dataField="Datum" width="80"  sortDescending="true"/>
                                <mx:DataGridColumn dataField="h" width="30"/>
                                <mx:DataGridColumn dataField="Bemerkung" />
                            </mx:columns>
                        </mx:DataGrid>    
                        <mx:Spacer width="5" />
                    </mx:HBox>
                    <mx:Spacer height="5" />
                </mx:VBox>
                <mx:VBox height="50%" width="100%" borderStyle="solid" borderColor="#DDBBEE" cornerRadius="5" borderThickness="2" verticalGap="0">
<!-- pro Zeit auswerten -->                    
                    <mx:HBox width="100%"  backgroundColor="#DDBBEE" backgroundAlpha="0.2" horizontalGap="0">
                        <mx:Spacer width="18" />
                        <mx:Label text="Zeitauswertung" fontWeight="bold"/>                    
                        <mx:Spacer width="50%" />
                        <mx:Label text="{proTitelCont}" textAlign="center" fontWeight="bold"/>                                    
                        <mx:Spacer width="50%" />
                    </mx:HBox>
                    <mx:HRule  width="100%"/>
                    <mx:Spacer height="3" />
                        <mx:HBox width="100%" horizontalGap="0">
                            <mx:Spacer width="5" />
                            <mx:RadioButtonGroup id="rbZeitAuswerten"/>
                            <mx:RadioButton label="einzeln" enabled="{proSelected}" groupName="rbZeitAuswerten" fontSize="10" selected="true"
                                 click="proAuswertung.selectedIndex=0;holePverEigene()" />
                            <mx:Spacer width="5" />
                            <mx:RadioButton label="Summe" enabled="{proSelected}" groupName="rbZeitAuswerten" fontSize="10"
                                 click="proAuswertung.selectedIndex=1;holePverEigene()" />
                            <mx:Spacer width="100%" />    
                              <mx:Label text="von " paddingTop="3" fontSize="10"/>
                            <mx:DateField  id="proChartVon" enabled="{proSelected}" fontWeight="normal" fontSize="10" formatString="DD.MM.YYYY"
                                monthNames="['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November','Dezember']"
                                 dayNames="['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa']"
                                 firstDayOfWeek="1" 
                                 change="holePverEigene()"/>
                              <mx:Label text="bis " paddingTop="3" fontSize="10"/>
                            <mx:DateField  id="proChartBis" enabled="{proSelected}" selectedDate="{new Date()}" fontWeight="normal"  fontSize="10" formatString="DD.MM.YYYY"
                                monthNames="['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November','Dezember']"
                                 dayNames="['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa']"
                                 firstDayOfWeek="1"
                                 change="holePverEigene()"/>
                             <mx:Spacer width="5" />
                        </mx:HBox>                        
                    <mx:ViewStack id="proAuswertung" width="100%" height="100%">
        <!-- Balkenanzeige Zeiten -->
                        <mx:Canvas width="100%" height="100%" >
                          <mx:VBox width="100%" height="100%" verticalGap="0">
                            <mx:ColumnChart  id="chartCol" width="100%" height="100%" 
                                dataProvider="{pverAlleChartSelect}" 
                                showDataTips="true"
                                 dataTipFunction="ColChart_dataTipFunction">
                                <mx:seriesFilters>
                                   <mx:Array/>
                                </mx:seriesFilters>
                                <mx:horizontalAxis >
                                   <mx:CategoryAxis id="xAxis"
                                        dataProvider="{pverAlleChartSelect}" 
                                        categoryField="Datum"
                                        displayName="Tag"
                                        labelFunction="chartAxisLabel"/>
                                </mx:horizontalAxis>
                                <mx:horizontalAxisRenderers>
                                    <mx:AxisRenderer
                                        axis="{xAxis}"
                                        axisStroke="{axis}" 
                                        placement="bottom"
                                        minorTickPlacement="outside" 
                                        minorTickLength="0" 
                                        tickLength="3"
                                        tickPlacement="outside"
                                        canDropLabels="true">
                                       <mx:tickStroke>{axis}</mx:tickStroke>
                                       <mx:minorTickStroke>{axis}</mx:minorTickStroke>
                                    </mx:AxisRenderer>
                                 </mx:horizontalAxisRenderers>                                 
                                 <mx:verticalAxis >
                                    <mx:LinearAxis id="yAxis" displayName="Stunden"/>
                                 </mx:verticalAxis>
                                <mx:verticalAxisRenderers>
                                    <mx:AxisRenderer
                                        axis="{yAxis}"
                                        axisStroke="{axis}" 
                                        placement="bottom"
                                        minorTickPlacement="outside" 
                                        minorTickLength="0" 
                                        tickLength="3"
                                        tickPlacement="outside"
                                        canDropLabels="true">
                                       <mx:tickStroke>{axis}</mx:tickStroke>
                                       <mx:minorTickStroke>{axis}</mx:minorTickStroke>
                                    </mx:AxisRenderer>
                                 </mx:verticalAxisRenderers>
                                <mx:series>
                                   <mx:ColumnSeries 
                                           dataProvider="{pverEigeneChartSelect}"
                                        xField="Datum" 
                                        yField="h" 
                                        displayName="EIGENE">
                                       <mx:fill>
                                            <mx:SolidColor color="0x7700AA" />
                                         </mx:fill>                                       
                                   </mx:ColumnSeries>
                                   <mx:ColumnSeries 
                                           dataProvider="{pverAlleChartSelect}"
                                        xField="Datum" 
                                        yField="h" 
                                        displayName="Team">
                                       <mx:fill>
                                            <mx:SolidColor color="0xDDBBEE"/>
                                         </mx:fill>                                       
                                   </mx:ColumnSeries>  
                                </mx:series>                                
                            </mx:ColumnChart>
                              <mx:Legend dataProvider="{chartCol}"  direction="horizontal" fontWeight="normal" fontSize="10" width="100%" />
                          </mx:VBox>                
                        </mx:Canvas>
        <!-- Summenanzeige Zeiten (Linechart) -->
                        <mx:Canvas width="100%" height="100%" >
                          <mx:VBox width="100%" height="100%" verticalGap="0">
                            <mx:LineChart  id="chartLine" width="100%" height="100%" 
                                dataProvider="{pverAlleChartSelect}"
                                showDataTips="true">
                                <mx:seriesFilters>
                                   <mx:Array/>
                                </mx:seriesFilters>
                                <mx:horizontalAxis >
                                   <mx:CategoryAxis id="xAxisLine"
                                        dataProvider="{pverAlleChartSelect}" 
                                        categoryField="Datum"
                                        displayName="Tag"
                                        labelFunction="chartAxisLabel"/>
                                </mx:horizontalAxis>
                                <mx:horizontalAxisRenderers>
                                    <mx:AxisRenderer
                                        axis="{xAxisLine}"
                                        axisStroke="{axis}" 
                                        placement="bottom"
                                        minorTickPlacement="outside" 
                                        minorTickLength="0" 
                                        tickLength="3"
                                        tickPlacement="outside"
                                        canDropLabels="true">
                                       <mx:tickStroke>{axis}</mx:tickStroke>
                                       <mx:minorTickStroke>{axis}</mx:minorTickStroke>
                                    </mx:AxisRenderer>
                                 </mx:horizontalAxisRenderers>                                 
                                 <mx:verticalAxis >
                                    <mx:LinearAxis id="yAxisLine" displayName="Stunden"/>
                                 </mx:verticalAxis>
                                <mx:verticalAxisRenderers>
                                    <mx:AxisRenderer
                                        axis="{yAxisLine}"
                                        axisStroke="{axis}" 
                                        placement="bottom"
                                        minorTickPlacement="outside" 
                                        minorTickLength="0" 
                                        tickLength="3"
                                        tickPlacement="outside">
                                       <mx:tickStroke>{axis}</mx:tickStroke>
                                       <mx:minorTickStroke>{axis}</mx:minorTickStroke>
                                    </mx:AxisRenderer>
                                 </mx:verticalAxisRenderers>
                                <mx:series>
                                   <mx:LineSeries 
                                           dataProvider="{pverAlleChartSelect}"
                                        xField="Datum" 
                                        yField="sumH" 
                                        displayName="Projektteam Summe">
                                        <mx:lineStroke>
                                            <mx:Stroke color="0x7DDBBEE" weight="2" />
                                        </mx:lineStroke>                               
                                   </mx:LineSeries>
                                   <mx:LineSeries 
                                           dataProvider="{pverEigeneChartSelect}"
                                        xField="Datum" 
                                        yField="sumH" 
                                        displayName="EIGENE Summe">                                        
                                        <mx:lineStroke>
                                            <mx:Stroke color="0x7700AA" weight="2"/>
                                        </mx:lineStroke>
                                   </mx:LineSeries>
                                </mx:series>                                
                            </mx:LineChart>
                              <mx:Legend dataProvider="{chartLine}"  direction="horizontal" fontWeight="normal" fontSize="10" width="100%" />
                          </mx:VBox>
                        </mx:Canvas>
                    </mx:ViewStack>                                    
                </mx:VBox>
            </mx:VDividedBox>
        </mx:HDividedBox>
        <mx:Spacer width="10" />
    </mx:VBox>
    <mx:Spacer width="5" />
    </mx:HBox>
</mx:Canvas>

<!--###############-->
<!-- Fortbildungen -->
<!--###############-->
<mx:Canvas id="fobTab" label="Fortbildungen" width="100%" height="100%" fontSize="12" show="rbFobSelectZukunft.selected=true;fobEigene.selected=false;holeFlist()">
    <mx:HBox width="100%" height="100%" >
    <mx:Spacer width="5" />
    <mx:VBox height="100%" width="100%" horizontalCenter="0" verticalCenter="0">
        <mx:Spacer width="10" />
        
<!-- Fob Vorauswahl (oben) -->
        <mx:HBox width="100%" borderStyle="solid" borderColor="#DDBBEE" cornerRadius="5" borderThickness="2">
            <mx:Spacer width="10" />
              <mx:Label text="welche:"  fontWeight="bold" paddingTop="3" fontSize="11"/>
              <mx:RadioButtonGroup id="rbFobSelect"/>
             <mx:RadioButton id="rbFobSelectZukunft" groupName="rbFobSelect" label="zukünftige" width="100" selected="true" 
                 click="holeFlist();"/>
              <mx:RadioButton id="rbFobSelectVergangenheit" groupName="rbFobSelect" label="ehemalige" width="100"
                 click="holeFlist();"/>
              <mx:RadioButton id="rbFobSelectAlle" groupName="rbFobSelect" label="alle" 
                 click="holeFlist();"/>
            <mx:Spacer width="50" />
             <mx:CheckBox id="fobEigene" label="nur EIGENE" selected="false" 
                 change="holeFlist()"/>
            <mx:Spacer width="50" />
        </mx:HBox>
        <mx:Spacer width="10" />
        <mx:HDividedBox width="100%" height="100%" dividerColor="#DDBBEE" dividerAlpha="1.0" dividerThickness="5" >

<!-- Fob Tabelle (links unten) -->                
            <mx:DataGrid id="flistTab" dataProvider="{flist}" height="100%" width="400" verticalScrollPolicy="on"
                    itemClick="btFobLoeschenEnabled=false;fobDetailsAnzeigen(event);" themeColor="#7700AA" >
                <mx:columns>
                    <mx:DataGridColumn dataField="Titel" minWidth="200"/>
                    <mx:DataGridColumn dataField="Datum" minWidth="80" textAlign="center" />
                    <mx:DataGridColumn dataField="Zeit"  textAlign="center" />
                    <mx:DataGridColumn dataField="Dauer" textAlign="center"  />
                </mx:columns>
            </mx:DataGrid>

<!-- Fob Details (Mitte unten) -->
            <mx:VBox height="100%" width="100%" borderStyle="solid" borderColor="#DDBBEE" cornerRadius="5" borderThickness="2"  verticalGap="0">
                <mx:HBox width="100%"  backgroundColor="#DDBBEE" backgroundAlpha="0.2">
                    <mx:Label text="Beschreibung" textAlign="center" width="100%" fontWeight="bold"/>
                </mx:HBox>
                <mx:HRule  width="100%"/>
                <mx:Form id="fobForm" horizontalCenter="0" width="100%" paddingBottom="5" paddingLeft="10" paddingRight="10" paddingTop="10" verticalGap="2">
                    <mx:FormItem label="Titel:" fontWeight="bold" width="100%">
                        <mx:TextInput id="fobTitel" text="{fobTitelCont}"  editable="false" maxChars="45" width="100%" textAlign="center"/>
                    </mx:FormItem>
                    <mx:FormItem label="Internet:" width="100%" textDecoration="underline" fontSize="10">
                        <mx:TextInput id="fobLink"  text="{fobLinkCont}" editable="false" maxChars="45" width="100%"
                            click="if(fobLink.text!='')navigateToURL(new URLRequest('http://'+fobLink.text), '_blank');"/>
                    </mx:FormItem>
                    <mx:FormItem label="Datum:">
                        <mx:TextInput id="fobBeginn_datum" text="{fobDatumCont}" editable="false" maxChars="10" width="125" textAlign="center"/>
                    </mx:FormItem>
                    <mx:FormItem label="Startzeit:" >
                        <mx:TextInput id="fobBeginn_zeit" text="{fobZeitCont}" editable="false" maxChars="5"  width="125" textAlign="center"/>
                    </mx:FormItem>
                    <mx:FormItem label="Dauer in h:" >
                      <mx:HBox>
                        <mx:TextInput id="fobDauer_h" text="{fobDauerCont}" editable="false" maxChars="5"  width="125" textAlign="center"/>
                        <mx:CheckBox id="fobIntern" selected="{fobInternCont}" label="intern"  enabled="false"/>
                      </mx:HBox>
                    </mx:FormItem>
                    <mx:FormItem label="Kosten in €:">
                      <mx:HBox>
                        <mx:TextInput id="fobKosten" text="{fobKostenCont}" editable="false" maxChars="5" width="125" textAlign="center"/>
                        <mx:CheckBox id="fobProperson" selected="{fobPropersonCont}"  label="pro Person"  enabled="false"/>
                      </mx:HBox>
                    </mx:FormItem>
                    <mx:FormItem label="Adresse:" width="100%">
                        <mx:TextInput id="fobAdresse" text="{fobAdresseCont}" editable="false" maxChars="200" width="100%"/>
                    </mx:FormItem>
                    <mx:FormItem label="Kontakt:" width="100%">
                        <mx:TextInput id="fobKontakt" text="{fobKontaktCont}" editable="false" maxChars="200" width="100%"/>
                    </mx:FormItem>
                </mx:Form>                            
                <mx:TextArea id="fobBeschreibung" text="{fobBeschreibungCont}" width="100%" height="100%" borderStyle="none" editable="false" wordWrap="true" paddingRight="10" paddingLeft="10" fontSize="10"/>
                <mx:Spacer height="10" />
                  <mx:HBox width="100%">
                    <mx:Spacer width="50%" />                      
                    <mx:Button label="auf Karte anzeigen" paddingRight="10" paddingLeft="10" enabled="{btFobKarteEnabled}"
                            click="main_map.showInMap(fobAdresse.text);
                                   main_navi.selectedChild=gmap;
                                   currentState='karteSchliessen';"/>                                      
                    <mx:Spacer width="50%" />                      
                  </mx:HBox>                
                <mx:Spacer height="10" />
            </mx:VBox>        

<!-- Fob Anmeldung (rechts unten) -->    
            <mx:VBox width="270" height="100%" borderStyle="solid" borderThickness="2" borderColor="#DDBBEE" cornerRadius="5" verticalGap="0">
                <mx:HBox width="100%"  backgroundColor="#DDBBEE" backgroundAlpha="0.2">
                    <mx:Label text="angemeldet" textAlign="center" width="100%" fontWeight="bold"/>
                </mx:HBox>
                <mx:HRule  width="100%"/>
                <mx:Spacer height="10" />
                <mx:HBox width="100%" height="100%" horizontalGap="0">
                    <mx:Spacer width="10" />
                    <mx:DataGrid id="forgTab" dataProvider="{forg}" height="100%"  width="100%" verticalScrollPolicy="on" themeColor="#7700AA"
                         itemClick="btFobLoeschenEnabled=true;btFobAnmeldenEnabled=false" >
                        <mx:columns>
                            <mx:DataGridColumn dataField="Name"      width="170" />
                            <mx:DataGridColumn dataField="Abteilung" width="100" />
                        </mx:columns>
                    </mx:DataGrid>
                    <mx:Spacer width="10" />
                </mx:HBox>
                <mx:Spacer height="10" />
                  <mx:HBox width="100%" horizontalGap="0">
                    <mx:Spacer width="10" />                      
                    <mx:ComboBox id="cbFobAnmelden" dataProvider="{UserOrg_id}" selectedIndex="0" width="100%" enabled="{btFobAnmeldenEnabled}" />
                    <mx:Spacer width="10" />                       
                  </mx:HBox>    <mx:Spacer height="10" />
                  <mx:HBox width="100%" horizontalGap="0">
                    <mx:Spacer width="10" />                      
                    <mx:Button label="anmelden" id="btFobAnmelden" width="100%" enabled="{btFobAnmeldenEnabled}"
                        click="fobAnmelden(flist[flistTab.selectedIndex].flist_id,UserOrg_id[cbFobAnmelden.selectedIndex].org_id)" />
                    <mx:Spacer width="10" />                      
                    <mx:Button label="löschen" enabled="{btFobLoeschenEnabled}" visible="{admin}" fontWeight="bold" fontSize="10" paddingRight="10" paddingLeft="10"  height="100%"
                        click="fobLoeschen(forgTab.selectedItem,forgTab.selectedIndex)"/>
                    <mx:Spacer width="10" />                       
                  </mx:HBox>            
                <mx:Spacer height="10" />
            </mx:VBox>
        </mx:HDividedBox>
        <mx:Spacer width="10" />
    </mx:VBox>
    <mx:Spacer width="5" />
    </mx:HBox>
</mx:Canvas>
 
 
<!--###############-->
<!-- Organisation -->
<!--###############-->
<mx:Canvas id="orgTab" label="Organisation" width="100%" height="100%" 
    show="rbOrgSelectAkt.selected=true;cbOrgSelect.selected=true;loadXMLorg();">
    <mx:HBox width="100%" height="100%" >
    <mx:Spacer width="5" />
    <mx:VBox height="100%" width="100%" horizontalCenter="0" verticalCenter="0">
        <mx:Spacer width="10" />
        <mx:HBox width="100%" borderStyle="solid" borderColor="#DDBBEE" cornerRadius="5" borderThickness="2">
            <mx:Spacer width="10" />
              <mx:Label text="welche:"  fontWeight="bold" paddingTop="3" fontSize="11"/>
              <mx:RadioButtonGroup id="rbOrgSelect" enabled="false"/>
             <mx:RadioButton id="rbOrgSelectAkt"  groupName="rbOrgSelect" label="aktuelle"  selected="true" 
                 click="loadXMLorg()"/>
              <mx:RadioButton id="rbOrgSelectEhe" groupName="rbOrgSelect" label="ehemalige" 
                 click="loadXMLorg()"/>
              <mx:RadioButton id="rbOrgSelectZuk" groupName="rbOrgSelect" label="zukünftige" 
                 click="loadXMLorg()"/>
              <mx:RadioButton id="rbOrgSelectAll" groupName="rbOrgSelect" label="alle" 
                 click="loadXMLorg()"/>
            <mx:Spacer width="50" />
             <mx:CheckBox id="cbOrgSelect" label="nur INTERNE" selected="true"
                 change="loadXMLorg()"/>
            <mx:Spacer width="50%" />
              <mx:Label text="{orgTelefonliste}"  fontWeight="bold" paddingTop="3" fontSize="11"/>
            <mx:Spacer width="50%" />
        </mx:HBox>
        <mx:Spacer width="10" />
        <mx:HDividedBox width="100%" height="100%" dividerColor="#DDBBEE" dividerAlpha="1.0" dividerThickness="5" id="orgHDB">
    <!-- Organisationsbaum -->    
        <mx:VBox height="100%" width="250" borderStyle="solid" borderColor="#DDBBEE" cornerRadius="5" borderThickness="2"  verticalGap="0" >
            <mx:HBox width="100%"  backgroundColor="#DDBBEE" backgroundAlpha="0.2">
                <mx:Label text="Auswahl" textAlign="center" width="100%" fontWeight="bold"/>
            </mx:HBox>
            <mx:HRule  width="100%"/>
            <mx:Tree id="orgTree" width="100%" height="100%" verticalCenter="0"  borderStyle="none" themeColor="#7700AA"
                dataProvider="{orgXML}"
                labelField="@titel"
                allowMultipleSelection="false"
                showRoot="false"    
                change="zeigeOrgDetail(event);"
                />
            <mx:HRule  width="100%"/>
            <mx:HBox width="100%" backgroundColor="#DDBBEE" backgroundAlpha="0.2">
                <mx:Spacer width="10" />
                <mx:LinkButton label="alle auf"  fontWeight="normal" textDecoration="underline" fontSize="10"
                     click="orgTree.openItems=orgTree.dataProvider[0].child('*').parent().descendants();"/>
                <mx:Spacer width="50%" />
                <mx:LinkButton label="1.auf"  fontWeight="normal" textDecoration="underline" fontSize="10"
                     click="orgTree.openItems=orgTree.dataProvider[0].child('*');"/>
                <mx:Spacer width="50%" />
                <mx:LinkButton label="alle zu"  fontWeight="normal" textDecoration="underline" fontSize="10"
                     click="orgTree.openItems=''"/>                
                <mx:Spacer width="10" />
            </mx:HBox>
        </mx:VBox>
    <!-- Anzeigefläche Organisation -->                
    <mx:ViewStack id="org_content" width="100%" height="100%" horizontalCenter="0" verticalCenter="0" creationPolicy="all">
 
    <!-- Adressliste Organisation  -->
        <mx:Canvas id="orgList" label="Adressliste" width="100%" height="100%" >
            <mx:AdvancedDataGrid dataProvider="{orgListe}"  id="orgListeGrid"
                 horizontalScrollPolicy="off" verticalScrollPolicy="auto" width="100%" height="100%" borderStyle="solid" borderColor="#DDBBEE"          
                  click="org_content.selectedChild=orgDetail;
                         holeOrgDetails(orgListeGrid.selectedItem.ma_id,0);">
                <mx:columns>
                    <mx:AdvancedDataGridColumn dataField="Nachname" width="90"/>
                    <mx:AdvancedDataGridColumn dataField="Vorname"  width="90"/>
                    <mx:AdvancedDataGridColumn dataField="Telefon"  width="105"/>
                    <mx:AdvancedDataGridColumn dataField="email"    width="280"/>
                    <mx:AdvancedDataGridColumn dataField="Fax"      width="105"/>
                    <mx:AdvancedDataGridColumn dataField="Adresse"  width="200"/>
                </mx:columns>
            </mx:AdvancedDataGrid>            
        </mx:Canvas>
        
    <!-- Detail Person  -->    
            <mx:Canvas id="orgDetail" label="Struktur" width="100%" height="100%" >
                <mx:VDividedBox width="100%" height="100%">
                    <mx:HDividedBox width="100%">
                        <mx:VBox width="50%" height="100%" borderStyle="solid" borderThickness="2" borderColor="#DDBBEE" cornerRadius="5" verticalGap="0">
                            <mx:HBox width="100%"  backgroundColor="#DDBBEE" backgroundAlpha="0.2">
                                <mx:Label text="Person" textAlign="center" width="100%" fontWeight="bold"/>
                            </mx:HBox>
                            <mx:HRule  width="100%"/>
                            <mx:Form id="orgPersForm" fontSize="10" horizontalCenter="0" width="100%" paddingBottom="5" paddingLeft="10" paddingRight="10" paddingTop="10" verticalGap="2" height="100%" cornerRadius="5">
                                <mx:FormItem label="Benutzername:" fontWeight="bold" width="100%">
                                    <mx:TextInput id="orgBenutzer" text="{orgBenutzerCont}"  editable="false" maxChars="45" width="100%" textAlign="center"/>
                                </mx:FormItem>
                                <mx:FormItem width="100%">
                                  <mx:HBox>
                                    <mx:CheckBox id="orgInt" selected="{orgIntCont}" label="intern" width="50%" enabled="false"/>
                                    <mx:CheckBox id="orgAdmin" selected="{orgAdminCont}" label="Admin" width="50%" enabled="false"/>
                                  </mx:HBox>        
                                </mx:FormItem>
                                <mx:FormItem label="Nachname:" width="100%">
                                    <mx:TextInput id="orgNachname" text="{orgNachnameCont}"  editable="false" maxChars="45" width="100%" textAlign="left"/>
                                </mx:FormItem>
                                <mx:FormItem label="Vorname:" width="100%">
                                    <mx:TextInput id="orgVorname" text="{orgVornameCont}" editable="false" maxChars="45" width="100%"/>
                                </mx:FormItem>
                                <mx:FormItem label="Titel, Zusatz:" width="100%">
                                  <mx:HBox width="100%">
                                    <mx:TextInput id="orgTitel" text="{orgTitelCont}"  editable="false" maxChars="45" textAlign="center" width="50%"/>
                                    <mx:TextInput id="orgZusatz" text="{orgZusatzCont}"  editable="false" maxChars="45" textAlign="center" width="50%"/>
                                  </mx:HBox>
                                </mx:FormItem>
                                <mx:FormItem label="Beginn:" width="100%">
                                    <mx:TextInput id="orgVon" text="{orgVonCont}" editable="false" maxChars="45" width="100%"/>
                                </mx:FormItem>
                                <mx:FormItem label="Ende:" width="100%">
                                    <mx:TextInput id="orgBis" text="{orgBisCont}" editable="false" maxChars="45" width="100%"/>
                                </mx:FormItem>
                                <mx:FormItem label="Passwort:" width="100%" visible="{passMode}">
                                  <mx:HBox width="100%">
                                    <mx:TextInput id="orgPasswort" text="{orgPasswortCont}" visible="{passMode}" maxChars="45" width="100%" displayAsPassword="true"
                                         enter="orgPasswortCont=orgPasswort.text;aendernPasswort()"/>
                                    <mx:LinkButton  label="ändern" visible="{passMode}"  fontWeight="normal" textDecoration="underline"
                                         click="orgPasswortCont=orgPasswort.text;aendernPasswort()"/>
                                  </mx:HBox>
                                </mx:FormItem>
                            </mx:Form>
                        </mx:VBox>                        
                        <mx:VBox width="50%" height="100%" borderStyle="solid" borderThickness="2" borderColor="#DDBBEE" cornerRadius="5" verticalGap="0">
                            <mx:HBox width="100%"  backgroundColor="#DDBBEE" backgroundAlpha="0.2">
                                <mx:Label text="Kontakt" textAlign="center" width="100%" fontWeight="bold"/>
                            </mx:HBox>
                            <mx:HRule  width="100%"/>
                                <mx:Form id="orgOrtForm" fontSize="10" horizontalCenter="0" width="100%" paddingBottom="5" paddingLeft="10" paddingRight="10" paddingTop="10" verticalGap="2" height="100%" cornerRadius="5">
                                    <mx:FormItem label="Raum:" width="100%">
                                        <mx:TextInput id="orgRaum" text="{orgRaumCont}"  editable="false" maxChars="45" width="100%" />
                                    </mx:FormItem>
                                    <mx:FormItem label="email:" width="100%">
                                        <mx:TextInput id="orgEmail" text="{orgEmailCont}"  editable="false" maxChars="45" width="100%" />
                                    </mx:FormItem>
                                    <mx:FormItem label="Telefon:" width="100%">
                                        <mx:TextInput id="orgTelefon" text="{orgTelefonCont}" editable="false" maxChars="45" width="100%"/>
                                    </mx:FormItem>
                                    <mx:FormItem label="Fax:"  width="100%">
                                        <mx:TextInput id="orgFax" text="{orgFaxCont}" editable="false" maxChars="45" width="100%"/>
                                    </mx:FormItem>
                                    <mx:FormItem label="Strasse:" width="100%">
                                        <mx:TextInput id="orgStrasse" text="{orgStrasseCont}" editable="false" maxChars="45" width="100%"/>
                                    </mx:FormItem>
                                    <mx:FormItem label="PLZ, Ort:" width="100%">
                                      <mx:HBox width="100%">
                                        <mx:TextInput id="orgPlz" text="{orgPlzCont}"  editable="false" maxChars="45" textAlign="center" width="60"/>
                                        <mx:TextInput id="orgOrt" text="{orgOrtCont}"  editable="false" maxChars="45" textAlign="left" width="100%"/>
                                      </mx:HBox>
                                    </mx:FormItem>
                                    <mx:FormItem label="Tel.privat:" width="100%" visible="{admin}" >
                                        <mx:TextInput id="orgPrivat" text="{orgPrivatCont}" editable="false" visible="{admin}" maxChars="45" width="100%"/>
                                    </mx:FormItem>
                                    <mx:FormItem label="Mobil:" width="100%" visible="{admin}" >
                                        <mx:TextInput id="orgMobil" text="{orgMobilCont}" editable="false" visible="{admin}" maxChars="45" width="100%"/>
                                    </mx:FormItem>
                                </mx:Form>
                            </mx:VBox>        
                    </mx:HDividedBox>
                      <mx:ViewStack id="orgZuord" width="100%" height="100%" >
                        <mx:Canvas width="100%" height="100%" id="orgZuordTab">
                          <mx:HBox width="100%" fontSize="10" borderStyle="none" borderThickness="2" borderColor="#DDBBEE" paddingBottom="5" paddingTop="5" paddingLeft="5" paddingRight="5" cornerRadius="5" height="130">
                            <mx:DataGrid dataProvider="{orgZuordnung}" id="orgZuordTabAnz"
                                 horizontalScrollPolicy="off" verticalScrollPolicy="on" width="100%" height="100%" borderStyle="solid" borderColor="#DDBBEE" textAlign="center"
                                  click="btOrgZuordDelete.enabled=true;" themeColor="#7700AA">
                                <mx:columns>
                                    <mx:DataGridColumn dataField="Abteilung" minWidth="80"/>
                                    <mx:DataGridColumn dataField="von"  minWidth="80"   />
                                    <mx:DataGridColumn dataField="bis"  minWidth="80"   />
                                    <mx:DataGridColumn dataField="Wochenstd"  minWidth="80" />
                                    <mx:DataGridColumn dataField="Tarif" minWidth="60"  visible="{admin}"/>
                                    <mx:DataGridColumn dataField="proStunde" minWidth="60"  visible="{admin}"/>
                                    <mx:DataGridColumn dataField="proMonat" minWidth="60" visible="{admin}"/>
                                    <mx:DataGridColumn dataField="proJahr" minWidth="60" visible="{admin}"/>
                                </mx:columns>
                            </mx:DataGrid>
                            <mx:VBox width="80"  height="100%">
                                <mx:Spacer height="50%" />
                                <mx:Button id="btOrgZuordNeu" label="neu" visible="{admin}" enabled="true" fontWeight="normal" fontSize="10" paddingRight="10" paddingLeft="10"  width="70" height="18"
                                      click="orgZuord.selectedChild=orgZuordDetail;holeAbt();holeTarif();"/>
                                <mx:Button id="btOrgZuordDelete" label="löschen" visible="{admin}" enabled="false" fontWeight="normal" fontSize="10" paddingRight="10" paddingLeft="10"  height="18" width="70" 
                                      click="orgDelete(orgZuordTabAnz.selectedItem);"/>
                                <mx:Spacer height="50%" />
                            </mx:VBox>    
                          </mx:HBox>                    
                        </mx:Canvas>
                        <mx:Canvas width="100%" height="100%" id="orgZuordDetail">
                            <mx:HBox  width="100%" height="100%" horizontalGap="0">
                                <mx:VBox width="100%" height="100%"  verticalGap="4">
                                    <mx:Label text="neue Zuordnung" textAlign="center" width="100%" fontWeight="bold"/>
                                      <mx:HBox  width="100%" horizontalGap="0" >
                                          <mx:Spacer width="10" />
                                          <mx:Label text="Abteilung: "  width="120" paddingTop="3" fontSize="10" textAlign="right"/>
                                        <mx:ComboBox id="cbOrgZuordAbt" width="150" dataProvider="{abt}" fontWeight="normal" fontSize="10"/>
                                        <mx:Spacer width="20" />                              
                                          <mx:Label text="von: "  width="50" paddingTop="3" fontSize="10" textAlign="right"/>
                                        <mx:DateField  id="orgZuordVon" showToday="true" selectedDate="{new Date()}" fontWeight="normal" enabled="true" formatString="DD.MM.YYYY"
                                            monthNames="['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November','Dezember']"
                                             dayNames="['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa']"
                                             firstDayOfWeek="1"
                                              fontSize="10" width="100"  textAlign="center"/>
                                        <mx:Spacer width="10" />
                                          <mx:Label text="bis: "  width="50" paddingTop="3" fontSize="10" textAlign="right"/>
                                        <mx:DateField  id="orgZuordBis" showToday="true" fontWeight="normal" enabled="true" formatString="DD.MM.YYYY"
                                            monthNames="['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November','Dezember']"
                                             dayNames="['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa']"
                                             firstDayOfWeek="1"
                                              fontSize="10" width="100"  textAlign="center"/>
                                          <mx:Spacer width="100%" />
                                      </mx:HBox>                                    
                                      <mx:HBox  width="100%" horizontalGap="0" >
                                          <mx:Spacer width="10" />
                                          <mx:Label text="Wochenstunden: "  width="120" paddingTop="3" fontSize="10" textAlign="right"/>
                                        <mx:NumericStepper id="OrgZuordWochenstunden" width="50" value="39" minimum="1" maximum="42" stepSize="1" fontWeight="normal" fontSize="10" />
                                          <mx:Spacer width="120" />
                                          <mx:Label text="Tarif: "  width="50" paddingTop="3" fontSize="10" textAlign="right"/>
                                          <mx:ComboBox id="cbOrgZuordTarif" width="260" dataProvider="{tarif}" fontWeight="normal" fontSize="10"/>
                                          <mx:Spacer width="50%" />                              
                                      </mx:HBox>
                                      <mx:Spacer height="5" />        
                                      <mx:HBox width="100%">
                                            <mx:Spacer width="20" />
                                            <mx:Button id="btOrgZuordSpeichern" label="Speichern" width="100"
                                                 click="orgSave();orgZuord.selectedChild=orgZuordTab" fontSize="10"/>
                                            <mx:Spacer width="20" />
                                            <mx:Button id="btOrgZuordAbbrechen" label="Abbrechen"  width="100"
                                                 click="orgZuord.selectedChild=orgZuordTab" fontSize="10"/>                                    
                                            <mx:Spacer width="100%" />
                                      </mx:HBox>
                                    <mx:Spacer height="5" />                                    
                                </mx:VBox>            
                                <mx:Spacer width="5" />                                                                                            
                            </mx:HBox>
                        </mx:Canvas>                  
                    </mx:ViewStack>
                </mx:VDividedBox>
            </mx:Canvas>
        </mx:ViewStack>                
        </mx:HDividedBox>
        <mx:Spacer width="10" />
    </mx:VBox>
    <mx:Spacer width="5" />
    </mx:HBox>
</mx:Canvas>

<!--###############-->
<!-- Stammdaten -->
<!--###############-->
<mx:Canvas id="staTab" label="Stammdaten" width="100%" height="100%"  enabled="{admin}" >
    <mx:HBox width="100%" height="100%" paddingBottom="5" paddingLeft="5" paddingRight="5" paddingTop="5">
    <mx:VBox height="100%" width="150">
        <mx:Spacer height="33%" />
        <mx:LinkBar dataProvider="s_content" width="100%" direction="vertical" disabledColor="#FF1111"  height="100%" verticalAlign="middle" horizontalAlign="center" verticalGap="10"/>
        <mx:Spacer height="67%" />
    </mx:VBox>    
    <mx:ViewStack id="s_content" width="100%" height="100%" >        
        <mx:Canvas id="s_p"         label="Projektliste"         width="100%" height="100%">    <ns1:p />        </mx:Canvas>
        <mx:Canvas id="s_pstatus"    label="Projektstatus"         width="100%" height="100%">    <ns1:pstatus />    </mx:Canvas>
        <!-- läuft über Projekte >> zugeordnete Personen <mx:Canvas id="s_pma"         label="Zuord. Projekt-MA"     width="100%" height="100%">     <ns1:pma /> </mx:Canvas> -->
        <mx:Canvas id="s_pauf"         label="Projektaufgaben"        width="100%" height="100%">    <ns1:pauf />    </mx:Canvas>        
        <!-- läuft über Projekte >> Zeit erfassen <mx:Canvas id="s_pver"         label="Zeit MA-Projekt"     width="100%" height="100%">    <ns1:pver />    </mx:Canvas> -->

        <mx:Canvas id="s_flist"     label="Fortbildungen"         width="100%" height="100%">    <ns1:flist />    </mx:Canvas>
        <!-- läuft über Fortbildung >> angemeldete Personen <mx:Canvas id="s_forg"         label="Fobi-Anmeldungen"     width="100%" height="100%">    <ns1:forg /> >/mx:Canvas> -->

        <mx:Canvas id="s_ma"         label="Mitarbeiter"         width="100%" height="100%">    <ns1:_ma/>        </mx:Canvas>
        <mx:Canvas id="s_abt"         label="Abteilungen"         width="100%" height="100%">    <ns1:_abt />    </mx:Canvas>
        <mx:Canvas id="s_ort"         label="Orte"                  width="100%" height="100%">    <ns1:_ort />    </mx:Canvas>
        <mx:Canvas id="s_tarif"     label="Tarife"                 width="100%" height="100%">    <ns1:_tarif />    </mx:Canvas>
        <!-- läuft über Organisation >> Abteilungszuordnung<mx:Canvas id="s_org"       label="Zuordnung MA-Abt"      width="100%" height="100%">  </mx:Canvas> -->
    </mx:ViewStack>
    </mx:HBox>
</mx:Canvas>
<!-- Ende Content Main  -->
</mx:TabNavigator>
</mx:Canvas>

<!-- MAP -->    
    <mx:Canvas id="gmap" width="100%" height="100%" >
        <geotag:googleMaps id="main_map"  
            ort="Bonner Str.3 München" 
            key="ABQIAAAAroW6Aw_GFUiFCrVuyp3uQRT6qWKOXpcXHWsWbmvhpLoikI5i1hSzUiDUktpMl-SeHpzfDC-0AiGK6Q"
         y="10"/>
    </mx:Canvas>
        
</mx:ViewStack>
<!-- Ende I N H A L T -->

    <!-- Fusszeile -->
    <mx:HBox width="100%" horizontalCenter="0" bottom="5" borderStyle="solid" cornerRadius="7" alpha="1.0" backgroundColor="#DDBBEE"  verticalAlign="middle" horizontalAlign="center">
        <!-- hier wird über ViewStates mit setProperty die Aufrufsteuerung der GoogleMap gesteuert -->
          <mx:LinkButton  id="karte"  visible="false" 
            fontWeight="bold" fontSize="12" color="#FF1111" themeColor="#7700AA" textDecoration="underline" alpha="1.0" 
            />            
        <mx:Spacer width="50%"/>
        <mx:Label text="Projektarbeit - Medizinische Informatik Wintersemester 2009/2010 von Dr. Felix v. Festenberg " 
            fontSize="10"  textAlign="center" color="#000000" alpha="0.0" fontWeight="normal" paddingLeft="15"/>
        <mx:Spacer width="50%"/>
        <mx:Label text="{version}" 
            fontSize="10"  textAlign="center" color="#000000" alpha="0.0" fontWeight="bold"/>
        <mx:Spacer width="10"/>
    </mx:HBox>
    </mx:VBox>
</mx:Canvas>
</mx:Application>