{if $action == ''}
<html>
<head>
<title>{$edit_titel}</title>
<link type="text/css" rel="stylesheet" href="templates/{$global_template}/css/styles_refill.css">
  <style type='text/css'>
    select { width:267px;}
  </style>
  <link rel="stylesheet" type="text/css" href="fancybox/jquery.fancybox-1.3.4.css" media="screen" />
  <script type="text/javascript" src="./fancybox/jquery-1.5.1.min.js"></script>
  <!-- DATEI GIBTS NICHT   <script>!window.jQuery && document.write('<script src="jquery-1.4.3.min.js"><\/script>');</script>-->
  <script type="text/javascript" src="./fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
  <script type="text/javascript" src="./fancybox/jquery.fancybox-1.3.4.pack.js"></script>

  <script type="text/javascript">
  {literal}
    $(document).ready(function() {
        $(".box").fancybox({
            'width'                : '100%',
            'height'               : '100%',
            'autoScale'            : true,
            'transitionIn'         : 'elastic',
            'transitionOut'        : 'elastic',
            'type'                 : 'iframe'
        });
    });
    {/literal}
  </script>
  <script language='javascript' type='text/javascript' src='tinymce/jscripts/tiny_mce/tiny_mce.js'></script>
  <script type='text/javascript'>
  {literal}
          function myCustomInitInstance(inst) {
             if(inst.editorId != 'mce_fullscreen')
               inst.execCommand('mceFullScreen');
          }
  tinyMCE.init({
          // General options
          language: 'de',
          mode : 'textareas',
          theme : 'advanced',
          plugins : 'save,autosave,safari,style,table,advhr,advimage,advlink,iespell,insertdatetime,preview,searchreplace,contextmenu,paste,fullscreen,visualchars,nonbreaking,xhtmlxtras,template',
          remove_linebreaks : true,
          force_br_newlines : true,
          force_p_newlines : false,
          forced_root_block : '',
          apply_source_formatting : true,
          convert_newlines_to_brs : true,
          // init_instance_callback : 'myCustomInitInstance',

          // Theme options
          theme_advanced_buttons1 : 'undo,redo,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,cut,copy,paste,pastetext,pasteword,|,bullist,numlist,preview,|,link,unlink,anchor',
          theme_advanced_buttons2 : 'tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,|,fullscreen',
          theme_advanced_buttons3 : '',
          theme_advanced_toolbar_location : 'top',
          theme_advanced_toolbar_align : 'left',
          theme_advanced_statusbar_location : 'bottom',
          theme_advanced_resizing : true,


          // Example content CSS (should be your site CSS)
          content_css : 'css/example.css',

          // Drop lists for link/image/media/template dialogs
          template_external_list_url : 'js/template_list.js',
          external_link_list_url : 'js/link_list.js',
          external_image_list_url : 'js/image_list.js',
          media_external_list_url : 'js/media_list.js',


          autosave_ask_before_unload : false
  });
  {/literal}
  </script>

  <script type="text/javascript">
  {literal}
    function senden_aktiv(){
      if ( document.erfassen.versicherung.checked == true ){
         document.erfassen.senden.disabled = false;
      }else{
          document.erfassen.senden.disabled = true;
      }
    }
  {/literal}
  </script>


   <script type="text/javascript">
   {literal}
     function checkStat(wahl){

       if(wahl == "8"){
         document.getElementById('entschieden1').style.display = (document.getElementById('entschieden1').style.display == 'none')?'none':'none';
         document.getElementById('entschieden2').style.display = (document.getElementById('entschieden2').style.display == 'none')?'none':'none';

         document.getElementById('ausschluss1').style.display = (document.getElementById('ausschluss1').style.display == 'none')?'block':'block';
         document.getElementById('ausschluss2').style.display = (document.getElementById('ausschluss2').style.display == 'none')?'block':'block';
       }

       if(wahl == "7"){
         document.getElementById('ausschluss1').style.display = (document.getElementById('ausschluss1').style.display == 'none')?'none':'none';
         document.getElementById('ausschluss2').style.display = (document.getElementById('ausschluss2').style.display == 'none')?'none':'none';

         document.getElementById('entschieden1').style.display = (document.getElementById('entschieden1').style.display == 'none')?'block':'block';
         document.getElementById('entschieden2').style.display = (document.getElementById('entschieden2').style.display == 'none')?'block':'block';
       }


       if(wahl == "1" || wahl == "2" || wahl == "3" || wahl == "4" || wahl == "5" || wahl == "6"){
         document.getElementById('ausschluss1').style.display = (document.getElementById('ausschluss1').style.display == 'none')?'none':'none';
         document.getElementById('ausschluss2').style.display = (document.getElementById('ausschluss2').style.display == 'none')?'none':'none';

         document.getElementById('entschieden1').style.display = (document.getElementById('entschieden1').style.display == 'none')?'none':'none';
         document.getElementById('entschieden2').style.display = (document.getElementById('entschieden2').style.display == 'none')?'none':'none';
       }
     }
  {/literal}
  </script>


</head>

<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">




	<p>
	<form action="?action=save" method='post' name='erfassen'>

    {if $edit_pflichtfelder == '1'}
      <table width="100%" class="errorTable">
        <tr>
          <td>
            <img src="templates/{$global_template}/images/pflichtfelder/achtung_gross.gif">
          </td>
          <td><b>Achtung!</b><br>
               {$edit_mandatory_text}
          </td>
        </tr>
      </table><br>
    {/if}

    <table valign="top" border="0" bordercolordark="white" bordercolorlight="lightgray" cellspacing="0" width="100%" height="90%">
        <tr>
            <td width="50%">
              <strong>{$edit_field_id}</strong>
            </td>
            <td>
              {$edit_id}
            </td>
        </tr>

        <tr>
            <td width="50%">
              <strong>{$edit_field_ersteller}</strong>
            </td>
            <td>
              {$edit_vorname} {$edit_nachname}
            </td>
        </tr>

        <tr>
            <td width="50%">
              <strong>{$edit_field_mailadresse}</strong>
            </td>
            <td>
              {$edit_mail}
            </td>
        </tr>

        <tr>
            <td width="50%">
              <strong>{$edit_field_gruppe}</strong>
            </td>
            <td>
              {$edit_beziehung}
            </td>
        </tr>

        <tr>
            <td width="50%">
              <strong>{$edit_field_gruppenmitglieder}</strong>
            </td>
            <td>
              {section name=table_data1 loop=$table_data1}
                <a href="mailto:{$table_data1[table_data1].mail}">{$table_data1[table_data1].name}</a><br />
              {/section}
            </td>
        </tr>

        <tr>
            <td width="50%">
              &nbsp;
            </td>
            <td>
              &nbsp;
            </td>
        </tr>

        <tr>
            <td width="50%">
                 <strong>{$edit_field_betreff}</strong>
            </td>
            <td>
              {$edit_betreff}
            </td>
        </tr>

        <tr>
            <td width="50%">
              &nbsp;
            </td>
            <td>
              &nbsp;
            </td>
        </tr>

        <tr>
            <td width="50%">
                <strong>{$edit_field_beschreibung}</strong>
            </td>
            <td>
              {$edit_beschreibung}
            </td>
        </tr>

        <tr>
            <td width="50%">
              &nbsp;
            </td>
            <td>
              &nbsp;
            </td>
        </tr>

        <tr>
            <td width="50%">
                <strong>{$edit_field_vorschlag}</strong>
            </td>
            <td>
              {$edit_vorschlag}
            </td>
        </tr>

        <tr>
            <td width="50%">
              &nbsp;
            </td>
            <td>
              &nbsp;
            </td>
        </tr>

        <tr>
            <td width="50%">
                <strong>{$edit_field_nutzen}</strong>
            </td>
            <td>
              {$edit_nutzen}
            </td>
        </tr>

        <tr>
            <td width="50%">
              &nbsp;
            </td>
            <td>
              &nbsp;
            </td>
        </tr>

        <tr>
            <td width="50%">
              <strong>{$edit_field_public}</strong>
            </td>
            <td>
              {$edit_public}
            </td>
        </tr>

        <tr>
            <td width="50%">
              &nbsp;
            </td>
            <td>
              &nbsp;
            </td>
        </tr>

        <tr>
            <td width="50%">
              <strong>{$edit_field_hinweiseigen}</strong>
            </td>
            <td>
              {$edit_hinweis_eigen}
            </td>
        </tr>


        <tr>
            <td width="50%">
              &nbsp;
            </td>
            <td>
              &nbsp;
            </td>
        </tr>

        <tr>
            <td width="50%">
              <strong>{$edit_field_hinweisadmin}</strong>
            </td>
            <td>
              <textarea name='edit_hinweis_admin' style='width:100%' rows='10' cols='5'>{$edit_hinweis_admin}</textarea>
            </td>
        </tr>


        <tr>
            <td width="50%">
              &nbsp;
            </td>
            <td>
              &nbsp;
            </td>
        </tr>

        <tr>
            <td width="50%">
              <strong>{$edit_field_category}</strong>
            </td>
            <td>

              <select size="1" name="edit_kategorie">
                {section name=table_data2 loop=$table_data2}
                  <option value="{$table_data2[table_data2].kid}" {if $table_data2[table_data2].selected == '1'} selected {/if}>{$table_data2[table_data2].kategorie}</option>
                {/section}
              </select>

            </td>
        </tr>



        <tr>
            <td width="50%">
              &nbsp;
            </td>
            <td>
              &nbsp;
            </td>
        </tr>



        <tr>
            <td width="50%">
              <div id="ausschluss1" style="display: none">
                  <strong>{$edit_field_ausschlgrund}</strong>
 	          </div>

              <div id="entschieden1" style="display: none">
                  <strong>{$edit_field_entschiedengrund}</strong>
 	          </div>
            </td>
            <td>
              <div id="ausschluss2" style="display: none">
 	              <input type="text" name="edit_schliessgrund" value="" size="40">
 	         </div>

              <div id="entschieden2" style="display: none">
 	              <input type="text" name="edit_schliessgrund" value="" size="40">
 	         </div>
            </td>
        </tr>

        <tr>
            <td width="50%">
              &nbsp;
            </td>
            <td>
              &nbsp;
            </td>
        </tr>

        <tr>
            <td width="50%">
              &nbsp;
            </td>
            <td>
	  		   <input type="submit" name="senden" value="Speichern">
	  		</td>
	   </tr>

        {if $edit_ablehnen_bttn == '1'}
        <tr>
            <td width="50%">
              &nbsp;
            </td>
            <td>
              &nbsp;
            </td>
        </tr>
        <tr>
            <td width="50%">
              &nbsp;
            </td>
            <td>
              <a href="?action=ablehnung&vid={$edit_ablehnen_vid}">{$edit_ablehnen_bttn_text}</a>
            </td>
        </tr>
        {/if}
	</table>
	<br />
	<br />
      <fieldset>
      <legend><b>Statusdetails</b></legend>

	      <table valign="top" border="0" bordercolordark="white" bordercolorlight="lightgray" cellspacing="0" width="90%">
	        <tr>
	          <td width="50%">
	            <strong>{$edit_field_datum}</strong>
	          </td>
	          <td>
	            <strong>{$edit_field_status}</strong>
	          </td>
            </tr>


            {section name=table_data3 loop=$table_data3}
            {if $table_data3[table_data3].status != ''}
            <tr>
	          <td width="50%">
	            {$table_data3[table_data3].datum1}
	          </td>
	          <td>
	            {$table_data3[table_data3].status} {if $table_data3[table_data3].info == '1'}<a class="box" href="info_entscheid.php?vid={$table_data3[table_data3].edit_id}"><img src="templates/{$global_template}/images/i.jpg" title="Informationen zur Entscheidung" border="0"></a>{/if}
	          </td>
            </tr>
            {/if}
            {/section}

          </table>
      </fieldset>

    </form>


</body>
</html>
{/if}


{if $action == 'save1'}


<html>
<head>
<title>{$edit_abgeschlossen_titel}</title>
<link type="text/css" rel="stylesheet" href="templates/{$global_template}/css/styles_refill.css">
</head>

<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">

<div class="header">
   <div>
      <div>{$edit_abgeschlossen_titel}</div>
   </div>
</div>

<div class="pat_list_box">
	<p>
    <table border="0" bordercolordark="white" bordercolorlight="lightgray" cellspacing="0" width="100%" height="90%">
        <tr>
            <td align="center">

              <table class="vvsuccess" width="40%" height="200" border="0">
                <tr>
                  <td align="center">
                    <h3>{$edit_abgeschlossen_text1}</h3>
                    <br />
                    <br />
                    {$edit_abgeschlossen_text2} <strong>{$edit_id}</strong>
                  </td>
                </tr>
              </table>
            </td>
        </tr>
    </table>
</div>

</body>
</html>
{/if}



{if $action == 'ablehnung'}

  <html>
	<head>
	<link type="text/css" rel="stylesheet" href="templates/{$global_template}/css/styles_refill.css">
    <script language='javascript' type='text/javascript' src='tinymce/jscripts/tiny_mce/tiny_mce.js'></script>
    <script type='text/javascript'>
            function myCustomInitInstance(inst) {
               if(inst.editorId != 'mce_fullscreen')
                 inst.execCommand('mceFullScreen');
            }
    tinyMCE.init({
            // General options
            language: 'de',
            mode : 'textareas',
            theme : 'advanced',
            plugins : 'save,autosave,safari,style,table,advhr,advimage,advlink,iespell,insertdatetime,preview,searchreplace,contextmenu,paste,fullscreen,visualchars,nonbreaking,xhtmlxtras,template',
            remove_linebreaks : true,
            force_br_newlines : true,
            force_p_newlines : false,
            forced_root_block : '',
            apply_source_formatting : true,
            convert_newlines_to_brs : true,
            // init_instance_callback : 'myCustomInitInstance',

            // Theme options
            theme_advanced_buttons1 : 'undo,redo,|,bold,italic,underline,strikethrough,|,forecolor,|,justifyleft,justifycenter,justifyright,justifyfull,|,cut,copy,paste,pastetext,pasteword,|,bullist,numlist,preview,|,link,unlink,anchor',
            theme_advanced_buttons2 : 'tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,|,fullscreen',
            theme_advanced_buttons3 : '',
            theme_advanced_toolbar_location : 'top',
            theme_advanced_toolbar_align : 'left',
            theme_advanced_statusbar_location : 'bottom',
            theme_advanced_resizing : true,


            // Example content CSS (should be your site CSS)
            content_css : 'css/example.css',

            // Drop lists for link/image/media/template dialogs
            template_external_list_url : 'js/template_list.js',
            external_link_list_url : 'js/link_list.js',
            external_image_list_url : 'js/image_list.js',
            media_external_list_url : 'js/media_list.js',


            autosave_ask_before_unload : false
    });
    </script>
	</head>

	<body>
	<br />
	<br />

      <form action="?action=ablehnung2" method='post' name='ldap'>
	  <div class="header">
	     <div>
	        <div>{$edit_ablehnung_field_begruendung}</div>
	     </div>
	  </div>

	  <div class="pat_list_box">

	   	     <br>
	   	     <textarea name='edit_ablehnung_bemerkung' style='width:90%' rows='20' cols='5'></textarea>

	         <p align="center">
                 <input type="button" value="Zur&uuml;ck" onclick="window.location.href='?'">
                  &nbsp;
	             <input type="submit" name="senden" value="Vorschlag ablehnen">
	         </p>


	  </div>

	</body>
    </html>

{/if}

{if $action == 'ablehnung2'}
  <html>
  <head>
  <title>{$edit_ablehnung_titel}</title>
  <link type="text/css" rel="stylesheet" href="templates/{$global_template}/css/styles_refill.css">
  </head>

  <body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">

  <div class="header">
     <div>
        <div>{$edit_ablehnung_titel}</div>
     </div>
  </div>

  <div class="pat_list_box">
  	<p>
      <table border="0" bordercolordark="white" bordercolorlight="lightgray" cellspacing="0" width="100%" height="60%">
          <tr>
              <td align="center">
                <b>{$edit_ablehnung_text}</b>
                <br />
                <br />
                <br />
              </td>
          </tr>
      </table>
  </div>

  </body>
  </html>
{/if}