<?php
include("kurs/datenbankanbindung.php");		// f&uuml;gt die Datenbankanbindung ein: Sys:\php\includes\kurs\datenbankanbindung.php
require("func_check_vertiefungsbereich.php");	// Prüft, ob doppelte Vertiefungsbereiche abgegeben werden. 
require("func_pflichtfelder.php");		// Prüft, ob Pflichtfelder ausgefüllt wurden
require("func_vertiefungsbereich.php");		// Prüft, ob vertiefungsbereich gewählt wurde, wenn Stellen erfasst sind.
$uid1=$_COOKIE["uid1"];
$uid1='schwaral';
if ($uid1 == ""){ include("kurs/anmeldefehler_subdir.php"); exit;} //Wenn man nicht angemeldet ist soll man nichts ausw&auml;hlen k&ouml;nnen


$db = dbconnect();
include("kurs/sta/stan_useronline_write.php");     // F&uuml;r Statistik, wieviele User online sind


// &Uuml;Berpr&uuml;fung, ob die Anmeldefrist &uuml;berschritten ist
$heute  = mktime(0, 0, 0, date("m"), date("d"), date("Y"));  // heutiges Datum
$heute_format = date("Y-m-d", $heute);  // ISO-8601 Format wie in der Datenbank: Formatierung f&uuml;r Vergleiche erforderlich

$res = $db->query("SELECT Jahrgang FROM stud WHERE uid='$uid1'");
$stud_jahr = $res->fetch_array();

$anm_schluss = $db->query("SELECT DATE_Format(anmeldebeginn, '%Y-%m-%d')AS beginndatum, DATE_Format(anmeldebeginn, '%d.%m.%Y um %H:%i:%s Uhr')AS beginnform, DATE_Format(anmeldeschluss, '%Y-%m-%d')AS enddatum 
                              FROM stan_frist
                             WHERE jahrgang=\"$stud_jahr[Jahrgang]\"");
$row_schluss = $anm_schluss->fetch_array(); // Herausfinden des Beginn- Schlussdatums

$a = strtotime ($heute_format); //Umrechnung des Fristgrenztages in eine Zahl
$b = strtotime ($row_schluss[enddatum]); // Umrechnung des Enddatums in eine Zahl
$c = strtotime ($row_schluss[beginndatum]); // Umrechnung des Beginndatums in eine Zahl

if ($a < $c){
echo "

<html>
<head>
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
<title>Anmeldungen noch nicht m&ouml;glich!</title>
</head>
<body>
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
    <tr>
        <td>
        <div align=\"center\">
            <table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
                <tr>
                    <td width=\"10\" background=\"../images/box_e1.gif\">
                    <img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
                    <td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
                    <td width=\"95%\" background=\"../images/box_top.gif\">
                    <img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
                    <span class=\"sh\">Anmeldungen noch nicht m&ouml;glich!</span><br>
                    <img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
                    <td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
                    <img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
                </tr>
                <tr>
                    <td width=\"1%\" background=\"../images/box_l.gif\">
                    <img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
                    <td colspan=\"2\"><br>
                    <p align=\"center\"><b>Antr&auml;ge sind erst ab $row_schluss[beginnform] m&ouml;glich!</b>
                    </p>
                    <p align=\"center\"><a href=\"hauptframe.php\">
                    <img border=\"0\" src=\"../images/zurueck.gif\" width=\"77\" height=\"22\"></a><br>
                    </p>
                    <p></p>
                    <p></p>
                    <p></p>
                    <p></p>
                    <p><br>
                    </p>
                    </td>
                    <td width=\"1%\" background=\"../images/box_r.gif\">
                    <img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
                </tr>
                <tr>
                    <td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
                    <img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
                    <td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
                    <img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
                    <td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
                    <img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
                </tr>
            </table>
        </div>
        </td>
    </tr>
</table>
</body>
</html>";
exit;
} // Ende &Uuml;berpr&uuml;fung der Zeit&uuml;berschreitung

if ($a >= $b){
echo "
<html>
<head>
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
<title>Anmeldezeit vertstrichen</title>
</head>
<body>
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
    <tr>
        <td>
        <div align=\"center\">
            <table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
                <tr>
                    <td width=\"10\" background=\"../images/box_e1.gif\">
                    <img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
                    <td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
                    <td width=\"95%\" background=\"../images/box_top.gif\">
                    <img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
                    <span class=\"sh\">Anmeldezeit vertstrichen</span><br>
                    <img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
                    <td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
                    <img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
                </tr>
                <tr>
                    <td width=\"1%\" background=\"../images/box_l.gif\">
                    <img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
                    <td colspan=\"2\"><br>
                    <p align=\"center\">Antr&auml;ge sind derzeit nicht m&ouml;glich!<br>Es sind nur noch <a href=\"antrag_aend.php\">Änderungsanträge</a> möglich
                    </p>
                    <p align=\"center\"><a href=\"hauptframe.php\">
                    <img border=\"0\" src=\"../images/zurueck.gif\" width=\"77\" height=\"22\"></a><br>
                    </p>
                    <p></p>
                    <p></p>
                    <p></p>
                    <p></p>
                    <p><br>
                    </p>
                    </td>
                    <td width=\"1%\" background=\"../images/box_r.gif\">
                    <img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
                </tr>
                <tr>
                    <td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
                    <img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
                    <td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
                    <img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
                    <td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
                    <img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
                </tr>
            </table>
        </div>
        </td>
    </tr>
</table>
</body>
</html>";
exit;
} // Ende &Uuml;berpr&uuml;fung der Zeit&uuml;berschreitung

/*
$res1 = $db->query("SELECT count(uid) anzahl FROM stan_antrag WHERE uid='$uid1'");
$anz_anm = $res1->fetch_array();

$result1 = $db->query("SELECT anzahl
                         FROM stan_anz_anm
                        WHERE uid ='$uid1'");
$row1 = $result1->fetch_array();

if($row1[anzahl] == ''){
 $anzahl = 4;
}else{
 $anzahl = $row1[anzahl];
}


if ($anz_anm[anzahl] > $anzahl){
echo "
<html>
<head>
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
<title>Anmeldezeit vertstrichen</title>
</head>
<body>
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
    <tr>
        <td>
        <div align=\"center\">
            <table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
                <tr>
                    <td width=\"10\" background=\"../images/box_e1.gif\">
                    <img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
                    <td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
                    <td width=\"95%\" background=\"../images/box_top.gif\">
                    <img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
                    <span class=\"sh\">Anmeldelimit</span><br>
                    <img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
                    <td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
                    <img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
                </tr>
                <tr>
                    <td width=\"1%\" background=\"../images/box_l.gif\">
                    <img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
                    <td colspan=\"2\"><br>
                    <p align=\"center\">Es sind maximal $anzahl Stellenanträge möglich!
                    </p>
                    <p align=\"center\"><a href=\"hauptframe.php\">
                    <img border=\"0\" src=\"../images/zurueck.gif\" width=\"77\" height=\"22\"></a><br>
                    </p>
                    <p></p>
                    <p></p>
                    <p></p>
                    <p></p>
                    <p><br>
                    </p>
                    </td>
                    <td width=\"1%\" background=\"../images/box_r.gif\">
                    <img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
                </tr>
                <tr>
                    <td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
                    <img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
                    <td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
                    <img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
                    <td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
                    <img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
                </tr>
            </table>
        </div>
        </td>
    </tr>
</table>
</body>
</html>";
exit;
} // Ende &Uuml;berpr&uuml;fung der Zeit&uuml;berschreitung
*/
#################






   if (isset($_GET['action']))
      $action = $_GET['action'];
   else
      $action = "";

   switch($action){
   default:

$db = dbconnect();
$result = $db->query("SELECT nachname, vorname, jahrgang, stg FROM stud where uid=\"$uid1\"");
$row = $result->fetch_array();

$anm_schluss = $db->query("SELECT DATE_Format(anmeldeschluss, '%d.%m.%Y um %H:%i:%s Uhr') anmeldeschluss, DATE_Format(antrag_von, '%d.%m.%Y') antrag_von, DATE_Format(antrag_bis, '%d.%m.%Y') antrag_bis
                              FROM stan_frist
                             WHERE jahrgang='$row[jahrgang]'");
$row_schluss = $anm_schluss->fetch_array(); // Auslesen des Datenbankdatum, um davon ein Tag abziehen zu k&ouml;nnen



echo"
<html>
<head>

<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
	<script type=\"text/javascript\" src=\"livesearch/ajax.js\"></script>
	<script type=\"text/javascript\" src=\"livesearch/ajax-dynamic-list.js\">
	/************************************************************************************************************
	(C) www.dhtmlgoodies.com, April 2006

	This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.

	Terms of use:
	You are free to use this script as long as the copyright message is kept intact. However, you may not
	redistribute, sell or repost it without our permission.

	Thank you!

	www.dhtmlgoodies.com
	Alf Magne Kalleland

	************************************************************************************************************/
	</script>
	
	

	<style type=\"text/css\">
select{
	width:325px;
}



	/* Big box with list of options */
	#ajax_listOfOptions{
		position:absolute;	/* Never change this one */
		width:324px;	/* Width of box */
		height:200px;	/* Height of box */
		overflow:auto;	/* Scrolling features */
		border:1px solid #6487DC;	/* Dark blue border */
		background-color:#FFF;	/* White background color */
		text-align:left;
		font-family		:	verdana, arial;
		z-index:10000;
	}
	#ajax_listOfOptions div{	/* General rule for both .optionDiv and .optionDivSelected */
		margin:1px;
		padding:1px;
		cursor:pointer;
		font-size:0.9em;
	}
	#ajax_listOfOptions .optionDiv{	/* Div for each item in list */

	}
	#ajax_listOfOptions .optionDivSelected{ /* Selected item in the list */
		background-color:#D6DFF7;
		color:#002276;
		font-family		:	verdana, arial;
		font-weight		:	bold;
	}
	#ajax_listOfOptions_iframe{
		background-color:#F00;
		position:absolute;
		z-index:500;
	}

	form{
		display:inline;
	}

	</style>

        <script type=\"text/javascript\">
          function start(){
            document.getElementById('DivName2').style.display='none';
            document.getElementById('DivName4').style.display='none';
            document.getElementById('DivName6').style.display='none';
            document.getElementById('DivName8').style.display='none';
            if(document.getElementById('stellenart2').value != '1'){return splitt1('stell1', 'DivName', '2');}
            if(document.getElementById('stellenart3').value != '1'){document.getElementById('DivName2').style.display='block';return splitt1('stell2', 'DivName2', '3');}
            if(document.getElementById('stellenart5').value != '1'){return splitt2('stell3', 'DivName3', '5');}
            if(document.getElementById('stellenart6').value != '1'){document.getElementById('DivName4').style.display='block';return splitt2('stell4', 'DivName4', '6');}
            if(document.getElementById('stellenart8').value != '1'){return splitt3('stell5', 'DivName5', '8');}
            if(document.getElementById('stellenart9').value != '1'){document.getElementById('DivName6').style.display='block';return splitt3('stell6', 'DivName6', '9');}
            if(document.getElementById('stellenart11').value != '1'){return splitt4('stell7', 'DivName7', '11');}
            if(document.getElementById('stellenart12').value != '1'){document.getElementById('DivName8').style.display='block';return splitt4('stell8', 'DivName8', '12');}
	    
	    // beim Seitenload pro Vertiefungsbereich den zweiten Splitt-Button ausblenden
	    // If Abfragen dienen dazu, wenn nach dem Absenden wieder zurück geklickt wird,
	    // dann wird geprüft, ob in den gesplitteten Zeiträumen eine Stellenart ausgewählt wurde.
	    // Wenn ja, wird der sonst(beim Seitenladen) ausgeblendete splittbereich eingeblendet und der ggf. Splittbutton angezeigt.
	  }
	</script>	
	
</head>
<body onload=\"start();\">




<script type=\"text/javascript\" language=\"JavaScript\">
<!--
function splitt1(a, b, c){
  var e=document.getElementById(a);
  if(!e)return true;
  if(e.style.display==\"none\"){
    e.style.display=\"block\"
    document.getElementById(b).innerHTML='<table width=10% bgcolor=#6487DC><tr><td onMouseOver=\"this.style.cursor=\"hand\";\" align=center><font color=\"#FFFFFF\"><b>löschen</b></font></td></tr></table>';
    if(b == 'DivName'){
     document.getElementById('DivName2').style.display='block';
    }
  } else {
    e.style.display=\"none\"
    document.getElementById(b).innerHTML='<table width=10% bgcolor=#6487DC><tr><td onMouseOver=\"this.style.cursor=\"hand\";\" align=center><font color=\"#FFFFFF\"><b>splitten</b></font></td></tr></table>';
    document.getElementById('stellenart'+c).selectedIndex = 0;
    document.getElementById('str'+c).value = '';
    document.getElementById('bezeichnung'+c).value = '';
    document.getElementById('postfach'+c).value = '';
    document.getElementById('plz'+c).value = '';
    document.getElementById('ort'+c).value = '';
    document.getElementById('bundesland'+c).value = '';
    document.getElementById('staat'+c).value = '';
    document.getElementById('beg_tag'+c).value = '';
    document.getElementById('beg_mon'+c).value = '';
    document.getElementById('beg_jahr'+c).value = '';
    document.getElementById('ende_tag'+c).value = '';
    document.getElementById('ende_mon'+c).value = '';
    document.getElementById('ende_jahr'+c).value = '';
    document.getElementById('abteilung'+c).value = '';
    document.getElementById('telabteilung'+c).value = '';
    
  }
  return true;
}



function splitt2(a, b, c){
  var e=document.getElementById(a);
  if(!e)return true;
  if(e.style.display==\"none\"){
    e.style.display=\"block\"
    document.getElementById(b).innerHTML='<table width=10% bgcolor=#6487DC><tr><td onMouseOver=\"this.style.cursor=\"hand\";\" align=center><font color=\"#FFFFFF\"><b>löschen</b></font></td></tr></table>';
    if(b == 'DivName3'){
     document.getElementById('DivName4').style.display='block';
    }
  } else {
    e.style.display=\"none\"
    document.getElementById(b).innerHTML='<table width=10% bgcolor=#6487DC><tr><td onMouseOver=\"this.style.cursor=\"hand\";\" align=center><font color=\"#FFFFFF\"><b>splitten</b></font></td></tr></table>';
    document.getElementById('stellenart'+c).selectedIndex = 0;
    document.getElementById('str'+c).value = '';
    document.getElementById('bezeichnung'+c).value = '';
    document.getElementById('postfach'+c).value = '';
    document.getElementById('plz'+c).value = '';
    document.getElementById('ort'+c).value = '';
    document.getElementById('bundesland'+c).value = '';
    document.getElementById('staat'+c).value = '';
    document.getElementById('beg_tag'+c).value = '';
    document.getElementById('beg_mon'+c).value = '';
    document.getElementById('beg_jahr'+c).value = '';
    document.getElementById('ende_tag'+c).value = '';
    document.getElementById('ende_mon'+c).value = '';
    document.getElementById('ende_jahr'+c).value = '';
    document.getElementById('abteilung'+c).value = '';
    document.getElementById('telabteilung'+c).value = '';
    
  }
  return true;
}


function splitt3(a, b, c){
  var e=document.getElementById(a);
  if(!e)return true;
  if(e.style.display==\"none\"){
    e.style.display=\"block\"
    document.getElementById(b).innerHTML='<table width=10% bgcolor=#6487DC><tr><td onMouseOver=\"this.style.cursor=\"hand\";\" align=center><font color=\"#FFFFFF\"><b>löschen</b></font></td></tr></table>';
    if(b == 'DivName5'){
     document.getElementById('DivName6').style.display='block';
    }
  } else {
    e.style.display=\"none\"
    document.getElementById(b).innerHTML='<table width=10% bgcolor=#6487DC><tr><td onMouseOver=\"this.style.cursor=\"hand\";\" align=center><font color=\"#FFFFFF\"><b>splitten</b></font></td></tr></table>';
    document.getElementById('stellenart'+c).selectedIndex = 0;
    document.getElementById('str'+c).value = '';
    document.getElementById('bezeichnung'+c).value = '';
    document.getElementById('postfach'+c).value = '';
    document.getElementById('plz'+c).value = '';
    document.getElementById('ort'+c).value = '';
    document.getElementById('bundesland'+c).value = '';
    document.getElementById('staat'+c).value = '';
    document.getElementById('beg_tag'+c).value = '';
    document.getElementById('beg_mon'+c).value = '';
    document.getElementById('beg_jahr'+c).value = '';
    document.getElementById('ende_tag'+c).value = '';
    document.getElementById('ende_mon'+c).value = '';
    document.getElementById('ende_jahr'+c).value = '';
    document.getElementById('abteilung'+c).value = '';
    document.getElementById('telabteilung'+c).value = '';
    
  }
  return true;
}



function splitt4(a, b, c){
  var e=document.getElementById(a);
  if(!e)return true;
  if(e.style.display==\"none\"){
    e.style.display=\"block\"
    document.getElementById(b).innerHTML='<table width=10% bgcolor=#6487DC><tr><td onMouseOver=\"this.style.cursor=\"hand\";\" align=center><font color=\"#FFFFFF\"><b>löschen</b></font></td></tr></table>';
    if(b == 'DivName7'){
     document.getElementById('DivName8').style.display='block';
    }
  } else {
    e.style.display=\"none\"
    document.getElementById(b).innerHTML='<table width=10% bgcolor=#6487DC><tr><td onMouseOver=\"this.style.cursor=\"hand\";\" align=center><font color=\"#FFFFFF\"><b>splitten</b></font></td></tr></table>';
    document.getElementById('stellenart'+c).selectedIndex = 0;
    document.getElementById('str'+c).value = '';
    document.getElementById('bezeichnung'+c).value = '';
    document.getElementById('postfach'+c).value = '';
    document.getElementById('plz'+c).value = '';
    document.getElementById('ort'+c).value = '';
    document.getElementById('bundesland'+c).value = '';
    document.getElementById('staat'+c).value = '';
    document.getElementById('beg_tag'+c).value = '';
    document.getElementById('beg_mon'+c).value = '';
    document.getElementById('beg_jahr'+c).value = '';
    document.getElementById('ende_tag'+c).value = '';
    document.getElementById('ende_mon'+c).value = '';
    document.getElementById('ende_jahr'+c).value = '';
    document.getElementById('abteilung'+c).value = '';
    document.getElementById('telabteilung'+c).value = '';
    
  }
  return true;
}

//-->
</script>


			<table cellspacing='0' cellpadding='0' width='100%' border='0'>
				<tr>
				
                                        <td width=\"10\" background=\"../images/box_e1.gif\">
                                        <img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
                                        <td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_top.gif\" valign=\"top\">
                                        <img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
                                        <font class=\"hd\">Stellenantrag für $row[vorname] $row[nachname]</font><br>
                                        <span class='sh'>Anträge können bis zum <font color='red'><b>$row_schluss[0]</b></font> abgegeben werden<br>
                                        Antragszeitraum: <font color='red'><b>$row_schluss[antrag_von] - $row_schluss[antrag_bis]</b></font>
                                        </span>
                                        <img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></font></td>
                                        <td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
                                        <img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
				</tr>
				<tr>
					<td width='1%' background='../images/box_l.gif'>
					  <img height='1' src='../images/blank.gif' width='22'>
					</td>
					<td>

<form action="; echo $_SERVER['PHP_SELF'] . "?action=persdat"; echo" method=\"POST\" name='searchform'>

<table width='100%' bgcolor=#6487DC> 
<tr>
  <td width='60%' style='border-style: none; border-width: medium' height='0'>
  <font color='#FFFFFF'><b>Vertiefungsbereich 1:</b></font>
  ";
        $db = dbconnect();

          $query1 = "SELECT vbid, bezeichnung
                      FROM stan_vertiefungsbereich
                     ORDER BY bezeichnung ASC
                   ";
                   
          $result1 = $db->query ($query1)
             or die ("Cannot execute query");
          echo "<select size=\"1\" name=\"vert1\">
          <option value='x'>Bitte wählen Sie ein Vertiefungsbereich&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>";
          while ($row1 = $result1->fetch_array()){
          echo "<option value='$row1[vbid]'>$row1[bezeichnung]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>\n";
          }
          echo"
  </td>
</tr>
</table>

        <table cellspacing='0' style='width:100%;'>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Art der Praxisstelle*</b>
            </td>
            <td width='60%' style='border-style: none; border-width: medium' height='0'>";
            $db = dbconnect();
    
              $query1 = "SELECT artid, bezeichnung
                          FROM stan_stellenart
                         ORDER BY artid ASC
                       ";
                       
              $result1 = $db->query ($query1)
                 or die ("Cannot execute query");
              echo "<select size=\"5\" name=\"stellenart1\" id='stellenart1'>";
              while ($row1 = $result1->fetch_array()){
              echo "<option value='$row1[artid]'";if($row1[artid] == 1){echo "selected";} echo">$row1[bezeichnung]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>\n";
              }
              
              echo"
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Bezeichnung der Praxisstelle*:</b>
            </td>
          <td width='60%' style='border-style: none; border-width: medium' height='0'>
            <!--<input type='text' name='bezeichnung1'id='bezeichnung1' size='50'>-->
  				<input type=\"text\" id=\"bezeichnung1\" name=\"bezeichnung1\" value=\"\" onkeyup=\"ajax_showOptions(this,'getStadt',event,1)\" size=\"50\">
  				<input type=\"hidden\" id=\"bezeichnung_hidden1\" name=\"bezeichnung_ID1\"><!-- THE ID OF the textstelle will be inserted into this hidden input -->
  	               
          </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Straße und Hausnummer der Praxisstelle*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' id='str1' name='str1' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Postfach*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='postfach1' id='postfach1' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>PLZ Ort*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='plz1' id='plz1' size='5'>&nbsp;<input type='text' name='ort1' id='ort1' size='40'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Bundesland*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='bundesland1' id='bundesland1' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Staat*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='staat1' id='staat1' size='50'>
            </td>
          </tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
             <b>Zeitraum der bei dieser Praxisstelle*: </b> 
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
             <input type=\"text\" name=\"beg_tag1\" id='beg_tag1' ID=\"text\" size=\"1\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"beg_mon1\" id='beg_mon1' value='MM' ID=\"text1\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name='beg_jahr1' id='beg_jahr1' ID=\"text1\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
             bis
             <input type=\"text\" name=\"ende_tag1\" id='ende_tag1' ID=\"text\" size=\"1\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"ende_mon1\" id='ende_mon1' value='MM' ID=\"text1\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name=\"ende_jahr1\" id='ende_jahr1' ID=\"text1\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
            </td>
          </tr>
        <tr>
          <td width='10%' style='border-style: none; border-width: medium' height='0'>
            &nbsp;
          </td>
          <td width='30%' style='border-style: none; border-width: medium' height='0'>
            <b>Abteilung:</b>
          </td>
          <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
            <input type='text' name='abteilung1' id='abteilung1' size='50'>
          </td>
        </tr>
        <tr>
          <td width='10%' style='border-style: none; border-width: medium' height='0'>
            &nbsp;
          </td>
          <td width='30%' style='border-style: none; border-width: medium' height='0'>
            <b>Tel. der Abteilung:</b>
          </td>
          <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
            <input type='text' name='telabteilung1' id='telabteilung1' size='50'>
          </td>
        </tr>
          </table>
        <br>


<p align=right>
<a onclick=\"return splitt1('stell1', 'DivName', '2')\" href=\"javascript:void(0)\"><div id='DivName' onMouseOver=\"this.style.cursor='hand'\"><table width=10% bgcolor=#6487DC><tr><td onMouseOver=\"this.style.cursor=\"hand\";\" align=center><font color=\"#FFFFFF\"><b>splitten</b></font></td></tr></table></div></a>
</p>
  <div id=\"stell1\" style=\"display: none;\">
  
        <table cellspacing='0' style='width:100%;'>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Art der Praxisstelle*</b>
            </td>
            <td width='60%' style='border-style: none; border-width: medium' height='0'>";
            $db = dbconnect();
    
              $query1 = "SELECT artid, bezeichnung
                          FROM stan_stellenart
                         ORDER BY artid ASC
                       ";
                       
              $result1 = $db->query ($query1)
                 or die ("Cannot execute query");
              echo "<select size=\"5\" name=\"stellenart2\" id='stellenart2'>";
              while ($row1 = $result1->fetch_array()){
              echo "<option value='$row1[artid]'";if($row1[artid] == 1){echo "selected";} echo">$row1[bezeichnung]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>\n";
              }
              
              echo"
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Bezeichnung der Praxisstelle*:</b>
            </td>
          <td width='60%' style='border-style: none; border-width: medium' height='0'>
            <!--<input type='text' name='bezeichnung2'id='bezeichnung2' size='50'>-->
  				<input type=\"text\" id=\"bezeichnung2\" name=\"bezeichnung2\" value=\"\" onkeyup=\"ajax_showOptions(this,'getStadt',event,2)\" size=\"50\">
  				<input type=\"hidden\" id=\"bezeichnung_hidden2\" name=\"bezeichnung_ID2\"><!-- THE ID OF the textstelle will be inserted into this hidden input -->
  	               
          </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Straße und Hausnummer der Praxisstelle*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' id='str2' name='str2' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Postfach*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='postfach2' id='postfach2' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>PLZ Ort*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='plz2' id='plz2' size='5'>&nbsp;<input type='text' name='ort2' id='ort2' size='40'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Bundesland*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='bundesland2' id='bundesland2' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Staat*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='staat2' id='staat2' size='50'>
            </td>
          </tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
             <b>Zeitraum der bei dieser Praxisstelle*: </b> 
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
             <input type=\"text\" name=\"beg_tag2\" id='beg_tag2' ID=\"text\" size=\"1\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"beg_mon2\" id='beg_mon2' value='MM' ID=\"text1\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name='beg_jahr2' id='beg_jahr2' ID=\"text2\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
             bis
             <input type=\"text\" name=\"ende_tag2\" id='ende_tag2' ID=\"text\" size=\"1\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"ende_mon2\" id='ende_mon2' value='MM' ID=\"text1\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name=\"ende_jahr2\" id='ende_jahr2' ID=\"text2\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
            </td>
          </tr>
        <tr>
          <td width='10%' style='border-style: none; border-width: medium' height='0'>
            &nbsp;
          </td>
          <td width='30%' style='border-style: none; border-width: medium' height='0'>
            <b>Abteilung:</b>
          </td>
          <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
            <input type='text' name='abteilung2' id='abteilung2' size='50'>
          </td>
        </tr>
        <tr>
          <td width='10%' style='border-style: none; border-width: medium' height='0'>
            &nbsp;
          </td>
          <td width='30%' style='border-style: none; border-width: medium' height='0'>
            <b>Tel. der Abteilung:</b>
          </td>
          <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
            <input type='text' name='telabteilung2' id='telabteilung2' size='50'>
          </td>
        </tr>
          </table>
        <br>
  </div>


<br><br>
<p align=right>
<a onclick=\"return splitt1('stell2', 'DivName2', '3')\" href=\"javascript:void(0)\"><div id='DivName2' onMouseOver=\"this.style.cursor='hand'\"><table width=10% bgcolor=#6487DC><tr><td onMouseOver=\"this.style.cursor=\"hand\";\" align=center><font color=\"#FFFFFF\"><b>splitten</b></font></td></tr></table></div></a>
</p>
  <div id=\"stell2\" style=\"display: none;\">
        <table cellspacing='0' style='width:100%;'>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Art der Praxisstelle*</b>
            </td>
            <td width='60%' style='border-style: none; border-width: medium' height='0'>";
            $db = dbconnect();
    
              $query1 = "SELECT artid, bezeichnung
                          FROM stan_stellenart
                         ORDER BY artid ASC
                       ";
                       
              $result1 = $db->query ($query1)
                 or die ("Cannot execute query");
              echo "<select size=\"5\" name=\"stellenart3\" id='stellenart3'>";
              while ($row1 = $result1->fetch_array()){
              echo "<option value='$row1[artid]'";if($row1[artid] == 1){echo "selected";} echo">$row1[bezeichnung]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>\n";
              }
              
              echo"
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Bezeichnung der Praxisstelle*:</b>
            </td>
          <td width='60%' style='border-style: none; border-width: medium' height='0'>
            <!--<input type='text' name='bezeichnung3'id='bezeichnung3' size='50'>-->
  				<input type=\"text\" id=\"bezeichnung3\" name=\"bezeichnung3\" value=\"\" onkeyup=\"ajax_showOptions(this,'getStadt',event,3)\" size=\"50\">
  				<input type=\"hidden\" id=\"bezeichnung_hidden3\" name=\"bezeichnung_ID3\"><!-- THE ID OF the textstelle will be inserted into this hidden input -->
  	               
          </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Straße und Hausnummer der Praxisstelle*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' id='str3' name='str3' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Postfach*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='postfach3' id='postfach3' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>PLZ Ort*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='plz3' id='plz3' size='5'>&nbsp;<input type='text' name='ort3' id='ort3' size='40'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Bundesland*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='bundesland3' id='bundesland3' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Staat*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='staat3' id='staat3' size='50'>
            </td>
          </tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
             <b>Zeitraum der bei dieser Praxisstelle*: </b> 
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
             <input type=\"text\" name=\"beg_tag3\" id='beg_tag3' ID=\"text\" size=\"1\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"beg_mon3\" id='beg_mon3' value='MM' ID=\"text1\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name='beg_jahr3' id='beg_jahr3' ID=\"text2\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
             bis
             <input type=\"text\" name=\"ende_tag3\" id='ende_tag3' ID=\"text\" size=\"1\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"ende_mon3\" id='ende_mon3' value='MM' ID=\"text1\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name=\"ende_jahr3\" id='ende_jahr3' ID=\"text2\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
            </td>
          </tr>
        <tr>
          <td width='10%' style='border-style: none; border-width: medium' height='0'>
            &nbsp;
          </td>
          <td width='30%' style='border-style: none; border-width: medium' height='0'>
            <b>Abteilung:</b>
          </td>
          <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
            <input type='text' name='abteilung3' id='abteilung3' size='50'>
          </td>
        </tr>
        <tr>
          <td width='10%' style='border-style: none; border-width: medium' height='0'>
            &nbsp;
          </td>
          <td width='30%' style='border-style: none; border-width: medium' height='0'>
            <b>Tel. der Abteilung:</b>
          </td>
          <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
            <input type='text' name='telabteilung3' id='telabteilung3' size='50'>
          </td>
        </tr>
          </table>
        <br>
  </div>

  
  <br>














<table width='100%' bgcolor=#6487DC> 
<tr>
  <td width='60%' style='border-style: none; border-width: medium' height='0'>
  <font color='#FFFFFF'><b>Vertiefungsbereich 2:</b></font>
  ";
        $db = dbconnect();

          $query1 = "SELECT vbid, bezeichnung
                      FROM stan_vertiefungsbereich
                     ORDER BY bezeichnung ASC
                   ";
                   
          $result1 = $db->query ($query1)
             or die ("Cannot execute query");
          echo "<select size=\"1\" name=\"vert2\">
          <option value='x'>Bitte wählen Sie ein Vertiefungsbereich&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>";
          while ($row1 = $result1->fetch_array()){
          echo "<option value='$row1[vbid]'>$row1[bezeichnung]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>\n";
          }
          echo"
  </td>
</tr>
</table>

        <table cellspacing='0' style='width:100%;'>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Art der Praxisstelle*</b>
            </td>
            <td width='60%' style='border-style: none; border-width: medium' height='0'>";
            $db = dbconnect();
    
              $query1 = "SELECT artid, bezeichnung
                          FROM stan_stellenart
                         ORDER BY artid ASC
                       ";
                       
              $result1 = $db->query ($query1)
                 or die ("Cannot execute query");
              echo "<select size=\"5\" name=\"stellenart4\" id='stellenart4'>";
              while ($row1 = $result1->fetch_array()){
              echo "<option value='$row1[artid]'";if($row1[artid] == 1){echo "selected";} echo">$row1[bezeichnung]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>\n";
              }
              
              echo"
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Bezeichnung der Praxisstelle*:</b>
            </td>
          <td width='60%' style='border-style: none; border-width: medium' height='0'>
            <!--<input type='text' name='bezeichnung4'id='bezeichnung4' size='50'>-->
  				<input type=\"text\" id=\"bezeichnung4\" name=\"bezeichnung4\" value=\"\" onkeyup=\"ajax_showOptions(this,'getStadt',event,4)\" size=\"50\">
  				<input type=\"hidden\" id=\"bezeichnung_hidden4\" name=\"bezeichnung_ID4\"><!-- THE ID OF the textstelle will be inserted into this hidden input -->
  	               
          </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Straße und Hausnummer der Praxisstelle*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' id='str4' name='str4' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Postfach*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='postfach4' id='postfach4' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>PLZ Ort*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='plz4' id='plz4' size='5'>&nbsp;<input type='text' name='ort4' id='ort4' size='40'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Bundesland*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='bundesland4' id='bundesland4' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Staat*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='staat4' id='staat4' size='50'>
            </td>
          </tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
             <b>Zeitraum der bei dieser Praxisstelle*: </b> 
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
             <input type=\"text\" name=\"beg_tag4\" id='beg_tag4' ID=\"text\" size=\"1\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"beg_mon4\" id='beg_mon4' value='MM' ID=\"text4\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name='beg_jahr4' id='beg_jahr4' ID=\"text1\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
             bis
             <input type=\"text\" name=\"ende_tag4\" id='ende_tag4' ID=\"text\" size=\"1\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"ende_mon4\" id='ende_mon4' value='MM' ID=\"text4\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name=\"ende_jahr4\" id='ende_jahr4' ID=\"text4\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
            </td>
          </tr>
        <tr>
          <td width='10%' style='border-style: none; border-width: medium' height='0'>
            &nbsp;
          </td>
          <td width='30%' style='border-style: none; border-width: medium' height='0'>
            <b>Abteilung:</b>
          </td>
          <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
            <input type='text' name='abteilung4' id='abteilung4' size='50'>
          </td>
        </tr>
        <tr>
          <td width='10%' style='border-style: none; border-width: medium' height='0'>
            &nbsp;
          </td>
          <td width='30%' style='border-style: none; border-width: medium' height='0'>
            <b>Tel. der Abteilung:</b>
          </td>
          <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
            <input type='text' name='telabteilung4' id='telabteilung4' size='50'>
          </td>
        </tr>
          </table>
        <br>


<p align=right>
<a onclick=\"return splitt2('stell3', 'DivName3', '5')\" href=\"javascript:void(0)\"><div id='DivName3' onMouseOver=\"this.style.cursor='hand'\"><table width=10% bgcolor=#6487DC><tr><td onMouseOver=\"this.style.cursor=\"hand\";\" align=center><font color=\"#FFFFFF\"><b>splitten</b></font></td></tr></table></div></a>
</p>
  <div id=\"stell3\" style=\"display: none;\">
  
        <table cellspacing='0' style='width:100%;'>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Art der Praxisstelle*</b>
            </td>
            <td width='60%' style='border-style: none; border-width: medium' height='0'>";
            $db = dbconnect();
    
              $query1 = "SELECT artid, bezeichnung
                          FROM stan_stellenart
                         ORDER BY artid ASC
                       ";
                       
              $result1 = $db->query ($query1)
                 or die ("Cannot execute query");
              echo "<select size=\"5\" name=\"stellenart5\" id='stellenart5'>";
              while ($row1 = $result1->fetch_array()){
              echo "<option value='$row1[artid]'";if($row1[artid] == 1){echo "selected";} echo">$row1[bezeichnung]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>\n";
              }
              
              echo"
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Bezeichnung der Praxisstelle*:</b>
            </td>
          <td width='60%' style='border-style: none; border-width: medium' height='0'>
            <!--<input type='text' name='bezeichnung5'id='bezeichnung5' size='50'>-->
  				<input type=\"text\" id=\"bezeichnung5\" name=\"bezeichnung5\" value=\"\" onkeyup=\"ajax_showOptions(this,'getStadt',event,5)\" size=\"50\">
  				<input type=\"hidden\" id=\"bezeichnung_hidden5\" name=\"bezeichnung_ID5\"><!-- THE ID OF the textstelle will be inserted into this hidden input -->
  	               
          </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Straße und Hausnummer der Praxisstelle*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' id='str5' name='str5' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Postfach*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='postfach5' id='postfach5' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>PLZ Ort*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='plz5' id='plz5' size='5'>&nbsp;<input type='text' name='ort5' id='ort5' size='40'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Bundesland*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='bundesland5' id='bundesland5' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Staat*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='staat5' id='staat5' size='50'>
            </td>
          </tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
             <b>Zeitraum der bei dieser Praxisstelle*: </b> 
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
             <input type=\"text\" name=\"beg_tag5\" id='beg_tag5' ID=\"text\" size=\"1\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"beg_mon5\" id='beg_mon5' value='MM' ID=\"text1\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name='beg_jahr5' id='beg_jahr5' ID=\"text5\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
             bis
             <input type=\"text\" name=\"ende_tag5\" id='ende_tag5' ID=\"text\" size=\"1\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"ende_mon5\" id='ende_mon5' value='MM' ID=\"text1\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name=\"ende_jahr5\" id='ende_jahr5' ID=\"text5\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
            </td>
          </tr>
        <tr>
          <td width='10%' style='border-style: none; border-width: medium' height='0'>
            &nbsp;
          </td>
          <td width='30%' style='border-style: none; border-width: medium' height='0'>
            <b>Abteilung:</b>
          </td>
          <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
            <input type='text' name='abteilung5' id='abteilung5' size='50'>
          </td>
        </tr>
        <tr>
          <td width='10%' style='border-style: none; border-width: medium' height='0'>
            &nbsp;
          </td>
          <td width='30%' style='border-style: none; border-width: medium' height='0'>
            <b>Tel. der Abteilung:</b>
          </td>
          <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
            <input type='text' name='telabteilung5' id='telabteilung5' size='50'>
          </td>
        </tr>
          </table>
        <br>
  </div>


<br><br>
<p align=right>
<a onclick=\"return splitt2('stell4', 'DivName4', '6')\" href=\"javascript:void(0)\"><div id='DivName4' onMouseOver=\"this.style.cursor='hand'\"><table width=10% bgcolor=#6487DC><tr><td onMouseOver=\"this.style.cursor=\"hand\";\" align=center><font color=\"#FFFFFF\"><b>splitten</b></font></td></tr></table></div></a>
</p>
  <div id=\"stell4\" style=\"display: none;\">
        <table cellspacing='0' style='width:100%;'>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Art der Praxisstelle*</b>
            </td>
            <td width='60%' style='border-style: none; border-width: medium' height='0'>";
            $db = dbconnect();
    
              $query1 = "SELECT artid, bezeichnung
                          FROM stan_stellenart
                         ORDER BY artid ASC
                       ";
                       
              $result1 = $db->query ($query1)
                 or die ("Cannot execute query");
              echo "<select size=\"5\" name=\"stellenart6\" id='stellenart6'>";
              while ($row1 = $result1->fetch_array()){
              echo "<option value='$row1[artid]'";if($row1[artid] == 1){echo "selected";} echo">$row1[bezeichnung]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>\n";
              }
              
              echo"
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Bezeichnung der Praxisstelle*:</b>
            </td>
          <td width='60%' style='border-style: none; border-width: medium' height='0'>
            <!--<input type='text' name='bezeichnung6'id='bezeichnung6' size='50'>-->
  				<input type=\"text\" id=\"bezeichnung6\" name=\"bezeichnung6\" value=\"\" onkeyup=\"ajax_showOptions(this,'getStadt',event,6)\" size=\"50\">
  				<input type=\"hidden\" id=\"bezeichnung_hidden6\" name=\"bezeichnung_ID6\"><!-- THE ID OF the textstelle will be inserted into this hidden input -->
  	               
          </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Straße und Hausnummer der Praxisstelle*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' id='str6' name='str6' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Postfach*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='postfach6' id='postfach6' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>PLZ Ort*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='plz6' id='plz6' size='5'>&nbsp;<input type='text' name='ort6' id='ort6' size='40'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Bundesland*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='bundesland6' id='bundesland6' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Staat*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='staat6' id='staat6' size='50'>
            </td>
          </tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
             <b>Zeitraum der bei dieser Praxisstelle*: </b> 
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
             <input type=\"text\" name=\"beg_tag6\" id='beg_tag6' ID=\"text\" size=\"1\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"beg_mon6\" id='beg_mon6' value='MM' ID=\"text1\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name='beg_jahr6' id='beg_jahr6' ID=\"text2\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
             bis
             <input type=\"text\" name=\"ende_tag6\" id='ende_tag6' ID=\"text\" size=\"1\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"ende_mon6\" id='ende_mon6' value='MM' ID=\"text1\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name=\"ende_jahr6\" id='ende_jahr6' ID=\"text2\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
            </td>
          </tr>
        <tr>
          <td width='10%' style='border-style: none; border-width: medium' height='0'>
            &nbsp;
          </td>
          <td width='30%' style='border-style: none; border-width: medium' height='0'>
            <b>Abteilung:</b>
          </td>
          <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
            <input type='text' name='abteilung6' id='abteilung6' size='50'>
          </td>
        </tr>
        <tr>
          <td width='10%' style='border-style: none; border-width: medium' height='0'>
            &nbsp;
          </td>
          <td width='30%' style='border-style: none; border-width: medium' height='0'>
            <b>Tel. der Abteilung:</b>
          </td>
          <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
            <input type='text' name='telabteilung6' id='telabteilung6' size='50'>
          </td>
        </tr>
          </table>
        <br>
  </div>

  
  <br>












<table width='100%' bgcolor=#6487DC> 
<tr>
  <td width='60%' style='border-style: none; border-width: medium' height='0'>
  <font color='#FFFFFF'><b>Vertiefungsbereich 3:</b></font>
  ";
        $db = dbconnect();

          $query1 = "SELECT vbid, bezeichnung
                      FROM stan_vertiefungsbereich
                     ORDER BY bezeichnung ASC
                   ";
                   
          $result1 = $db->query ($query1)
             or die ("Cannot execute query");
          echo "<select size=\"1\" name=\"vert3\">
          <option value='x'>Bitte wählen Sie ein Vertiefungsbereich&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>";
          while ($row1 = $result1->fetch_array()){
          echo "<option value='$row1[vbid]'>$row1[bezeichnung]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>\n";
          }
          echo"
  </td>
</tr>
</table>

        <table cellspacing='0' style='width:100%;'>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Art der Praxisstelle*</b>
            </td>
            <td width='60%' style='border-style: none; border-width: medium' height='0'>";
            $db = dbconnect();
    
              $query1 = "SELECT artid, bezeichnung
                          FROM stan_stellenart
                         ORDER BY artid ASC
                       ";
                       
              $result1 = $db->query ($query1)
                 or die ("Cannot execute query");
              echo "<select size=\"5\" name=\"stellenart7\" id='stellenart7'>";
              while ($row1 = $result1->fetch_array()){
              echo "<option value='$row1[artid]'";if($row1[artid] == 1){echo "selected";} echo">$row1[bezeichnung]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>\n";
              }
              
              echo"
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Bezeichnung der Praxisstelle*:</b>
            </td>
          <td width='60%' style='border-style: none; border-width: medium' height='0'>
            <!--<input type='text' name='bezeichnung7'id='bezeichnung7' size='50'>-->
  				<input type=\"text\" id=\"bezeichnung7\" name=\"bezeichnung7\" value=\"\" onkeyup=\"ajax_showOptions(this,'getStadt',event,7)\" size=\"50\">
  				<input type=\"hidden\" id=\"bezeichnung_hidden7\" name=\"bezeichnung_ID7\"><!-- THE ID OF the textstelle will be inserted into this hidden input -->
  	               
          </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Straße und Hausnummer der Praxisstelle*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' id='str7' name='str7' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Postfach*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='postfach7' id='postfach7' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>PLZ Ort*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='plz7' id='plz7' size='5'>&nbsp;<input type='text' name='ort7' id='ort7' size='40'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Bundesland*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='bundesland7' id='bundesland7' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Staat*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='staat7' id='staat7' size='50'>
            </td>
          </tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
             <b>Zeitraum der bei dieser Praxisstelle*: </b> 
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
             <input type=\"text\" name=\"beg_tag7\" id='beg_tag7' ID=\"text\" size=\"4\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"beg_mon7\" id='beg_mon7' value='MM' ID=\"text7\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name='beg_jahr7' id='beg_jahr7' ID=\"text4\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
             bis
             <input type=\"text\" name=\"ende_tag7\" id='ende_tag7' ID=\"text\" size=\"4\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"ende_mon7\" id='ende_mon7' value='MM' ID=\"text7\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name=\"ende_jahr7\" id='ende_jahr7' ID=\"text7\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
            </td>
          </tr>
        <tr>
          <td width='10%' style='border-style: none; border-width: medium' height='0'>
            &nbsp;
          </td>
          <td width='30%' style='border-style: none; border-width: medium' height='0'>
            <b>Abteilung:</b>
          </td>
          <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
            <input type='text' name='abteilung7' id='abteilung7' size='50'>
          </td>
        </tr>
        <tr>
          <td width='10%' style='border-style: none; border-width: medium' height='0'>
            &nbsp;
          </td>
          <td width='30%' style='border-style: none; border-width: medium' height='0'>
            <b>Tel. der Abteilung:</b>
          </td>
          <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
            <input type='text' name='telabteilung7' id='telabteilung7' size='50'>
          </td>
        </tr>
          </table>
        <br>



<p align=right>
<a onclick=\"return splitt3('stell5', 'DivName5', '8')\" href=\"javascript:void(0)\"><div id='DivName5' onMouseOver=\"this.style.cursor='hand'\"><table width=10% bgcolor=#6487DC><tr><td onMouseOver=\"this.style.cursor=\"hand\";\" align=center><font color=\"#FFFFFF\"><b>splitten</b></font></td></tr></table></div></a>
</p>

  <div id=\"stell5\" style=\"display: none;\">
  
        <table cellspacing='0' style='width:100%;'>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Art der Praxisstelle*</b>
            </td>
            <td width='60%' style='border-style: none; border-width: medium' height='0'>";
            $db = dbconnect();
    
              $query1 = "SELECT artid, bezeichnung
                          FROM stan_stellenart
                         ORDER BY artid ASC
                       ";
                       
              $result1 = $db->query ($query1)
                 or die ("Cannot execute query");
              echo "<select size=\"5\" name=\"stellenart8\" id='stellenart8'>";
              while ($row1 = $result1->fetch_array()){
              echo "<option value='$row1[artid]'";if($row1[artid] == 1){echo "selected";} echo">$row1[bezeichnung]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>\n";
              }
              
              echo"
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Bezeichnung der Praxisstelle*:</b>
            </td>
          <td width='60%' style='border-style: none; border-width: medium' height='0'>
            <!--<input type='text' name='bezeichnung8'id='bezeichnung8' size='50'>-->
  				<input type=\"text\" id=\"bezeichnung8\" name=\"bezeichnung8\" value=\"\" onkeyup=\"ajax_showOptions(this,'getStadt',event,8)\" size=\"50\">
  				<input type=\"hidden\" id=\"bezeichnung_hidden8\" name=\"bezeichnung_ID8\"><!-- THE ID OF the textstelle will be inserted into this hidden input -->
  	               
          </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Straße und Hausnummer der Praxisstelle*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' id='str8' name='str8' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Postfach*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='postfach8' id='postfach8' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>PLZ Ort*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='plz8' id='plz8' size='5'>&nbsp;<input type='text' name='ort8' id='ort8' size='40'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Bundesland*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='bundesland8' id='bundesland8' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Staat*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='staat8' id='staat8' size='50'>
            </td>
          </tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
             <b>Zeitraum der bei dieser Praxisstelle*: </b> 
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
             <input type=\"text\" name=\"beg_tag8\" id='beg_tag8' ID=\"text\" size=\"1\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"beg_mon8\" id='beg_mon8' value='MM' ID=\"text1\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name='beg_jahr8' id='beg_jahr8' ID=\"text8\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
             bis
             <input type=\"text\" name=\"ende_tag8\" id='ende_tag8' ID=\"text\" size=\"1\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"ende_mon8\" id='ende_mon8' value='MM' ID=\"text1\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name=\"ende_jahr8\" id='ende_jahr8' ID=\"text8\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
            </td>
          </tr>
        <tr>
          <td width='10%' style='border-style: none; border-width: medium' height='0'>
            &nbsp;
          </td>
          <td width='30%' style='border-style: none; border-width: medium' height='0'>
            <b>Abteilung:</b>
          </td>
          <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
            <input type='text' name='abteilung8' id='abteilung8' size='50'>
          </td>
        </tr>
        <tr>
          <td width='10%' style='border-style: none; border-width: medium' height='0'>
            &nbsp;
          </td>
          <td width='30%' style='border-style: none; border-width: medium' height='0'>
            <b>Tel. der Abteilung:</b>
          </td>
          <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
            <input type='text' name='telabteilung8' id='telabteilung8' size='50'>
          </td>
        </tr>
          </table>
        <br>
  </div>


<br><br>
<p align=right>
<a onclick=\"return splitt3('stell6', 'DivName6', '9')\" href=\"javascript:void(0)\"><div id='DivName6' onMouseOver=\"this.style.cursor='hand'\"><table width=10% bgcolor=#6487DC><tr><td onMouseOver=\"this.style.cursor=\"hand\";\" align=center><font color=\"#FFFFFF\"><b>splitten</b></font></td></tr></table></div></a>
</p>

  <div id=\"stell6\" style=\"display: none;\">
        <table cellspacing='0' style='width:100%;'>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Art der Praxisstelle*</b>
            </td>
            <td width='60%' style='border-style: none; border-width: medium' height='0'>";
            $db = dbconnect();
    
              $query1 = "SELECT artid, bezeichnung
                          FROM stan_stellenart
                         ORDER BY artid ASC
                       ";
                       
              $result1 = $db->query ($query1)
                 or die ("Cannot execute query");
              echo "<select size=\"5\" name=\"stellenart9\" id='stellenart9'>";
              while ($row1 = $result1->fetch_array()){
              echo "<option value='$row1[artid]'";if($row1[artid] == 1){echo "selected";} echo">$row1[bezeichnung]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>\n";
              }
              
              echo"
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Bezeichnung der Praxisstelle*:</b>
            </td>
          <td width='60%' style='border-style: none; border-width: medium' height='0'>
            <!--<input type='text' name='bezeichnung9'id='bezeichnung9' size='50'>-->
  				<input type=\"text\" id=\"bezeichnung9\" name=\"bezeichnung9\" value=\"\" onkeyup=\"ajax_showOptions(this,'getStadt',event,9)\" size=\"50\">
  				<input type=\"hidden\" id=\"bezeichnung_hidden9\" name=\"bezeichnung_ID9\"><!-- THE ID OF the textstelle will be inserted into this hidden input -->
  	               
          </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Straße und Hausnummer der Praxisstelle*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' id='str9' name='str9' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Postfach*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='postfach9' id='postfach9' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>PLZ Ort*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='plz9' id='plz9' size='5'>&nbsp;<input type='text' name='ort9' id='ort9' size='40'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Bundesland*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='bundesland9' id='bundesland9' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Staat*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='staat9' id='staat9' size='50'>
            </td>
          </tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
             <b>Zeitraum der bei dieser Praxisstelle*: </b> 
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
             <input type=\"text\" name=\"beg_tag9\" id='beg_tag9' ID=\"text\" size=\"1\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"beg_mon9\" id='beg_mon9' value='MM' ID=\"text1\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name='beg_jahr9' id='beg_jahr9' ID=\"text2\" value='JJJJ' size=\"6\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
             bis
             <input type=\"text\" name=\"ende_tag9\" id='ende_tag9' ID=\"text\" size=\"1\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"ende_mon9\" id='ende_mon9' value='MM' ID=\"text1\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name=\"ende_jahr9\" id='ende_jahr9' ID=\"text2\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
            </td>
          </tr>
        <tr>
          <td width='10%' style='border-style: none; border-width: medium' height='0'>
            &nbsp;
          </td>
          <td width='30%' style='border-style: none; border-width: medium' height='0'>
            <b>Abteilung:</b>
          </td>
          <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
            <input type='text' name='abteilung9' id='abteilung9' size='50'>
          </td>
        </tr>
        <tr>
          <td width='10%' style='border-style: none; border-width: medium' height='0'>
            &nbsp;
          </td>
          <td width='30%' style='border-style: none; border-width: medium' height='0'>
            <b>Tel. der Abteilung:</b>
          </td>
          <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
            <input type='text' name='telabteilung9' id='telabteilung9' size='50'>
          </td>
        </tr>
          </table>
        <br>
  </div>




<table width='100%' bgcolor=#6487DC> 
<tr>
  <td width='60%' style='border-style: none; border-width: medium' height='0'>
  <font color='#FFFFFF'><b>Vertiefungsbereich 4:</b></font>
  ";
        $db = dbconnect();

          $query1 = "SELECT vbid, bezeichnung
                      FROM stan_vertiefungsbereich
                     ORDER BY bezeichnung ASC
                   ";
                   
          $result1 = $db->query ($query1)
             or die ("Cannot execute query");
          echo "<select size=\"1\" name=\"vert4\">
          <option value='x'>Bitte wählen Sie ein Vertiefungsbereich&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>";
          while ($row1 = $result1->fetch_array()){
          echo "<option value='$row1[vbid]'>$row1[bezeichnung]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>\n";
          }
          echo"
  </td>
</tr>
</table>

        <table cellspacing='0' style='width:100%;'>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Art der Praxisstelle*</b>
            </td>
            <td width='60%' style='border-style: none; border-width: medium' height='0'>";
            $db = dbconnect();
    
              $query1 = "SELECT artid, bezeichnung
                          FROM stan_stellenart
                         ORDER BY artid ASC
                       ";
                       
              $result1 = $db->query ($query1)
                 or die ("Cannot execute query");
              echo "<select size=\"5\" name=\"stellenart10\" id='stellenart10'>";
              while ($row1 = $result1->fetch_array()){
              echo "<option value='$row1[artid]'";if($row1[artid] == 1){echo "selected";} echo">$row1[bezeichnung]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>\n";
              }
              
              echo"
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Bezeichnung der Praxisstelle*:</b>
            </td>
          <td width='60%' style='border-style: none; border-width: medium' height='0'>
            <!--<input type='text' name='bezeichnung10'id='bezeichnung10' size='50'>-->
  				<input type=\"text\" id=\"bezeichnung10\" name=\"bezeichnung10\" value=\"\" onkeyup=\"ajax_showOptions(this,'getStadt',event,10)\" size=\"50\">
  				<input type=\"hidden\" id=\"bezeichnung_hidden10\" name=\"bezeichnung_ID10\"><!-- THE ID OF the textstelle will be inserted into this hidden input -->
  	               
          </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Straße und Hausnummer der Praxisstelle*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' id='str10' name='str10' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Postfach*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='postfach10' id='postfach10' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>PLZ Ort*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='plz10' id='plz10' size='5'>&nbsp;<input type='text' name='ort10' id='ort10' size='40'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Bundesland*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='bundesland10' id='bundesland10' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Staat*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='staat10' id='staat10' size='50'>
            </td>
          </tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
             <b>Zeitraum der bei dieser Praxisstelle*: </b> 
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
             <input type=\"text\" name=\"beg_tag10\" id='beg_tag10' ID=\"text\" size=\"4\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"beg_mon10\" id='beg_mon10' value='MM' ID=\"text10\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name='beg_jahr10' id='beg_jahr10' ID=\"text4\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
             bis
             <input type=\"text\" name=\"ende_tag10\" id='ende_tag10' ID=\"text\" size=\"4\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"ende_mon10\" id='ende_mon10' value='MM' ID=\"text10\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name=\"ende_jahr10\" id='ende_jahr10' ID=\"text10\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
            </td>
          </tr>
        <tr>
          <td width='10%' style='border-style: none; border-width: medium' height='0'>
            &nbsp;
          </td>
          <td width='30%' style='border-style: none; border-width: medium' height='0'>
            <b>Abteilung:</b>
          </td>
          <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
            <input type='text' name='abteilung10' id='abteilung10' size='50'>
          </td>
        </tr>
        <tr>
          <td width='10%' style='border-style: none; border-width: medium' height='0'>
            &nbsp;
          </td>
          <td width='30%' style='border-style: none; border-width: medium' height='0'>
            <b>Tel. der Abteilung:</b>
          </td>
          <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
            <input type='text' name='telabteilung10' id='telabteilung10' size='50'>
          </td>
        </tr>
          </table>
        <br>



<p align=right>
<a onclick=\"return splitt4('stell7', 'DivName7', '11')\" href=\"javascript:void(0)\"><div id='DivName7' onMouseOver=\"this.style.cursor='hand'\"><table width=10% bgcolor=#6487DC><tr><td onMouseOver=\"this.style.cursor=\"hand\";\" align=center><font color=\"#FFFFFF\"><b>splitten</b></font></td></tr></table></div></a>
</p>

  <div id=\"stell7\" style=\"display: none;\">
  
        <table cellspacing='0' style='width:100%;'>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Art der Praxisstelle*</b>
            </td>
            <td width='60%' style='border-style: none; border-width: medium' height='0'>";
            $db = dbconnect();
    
              $query1 = "SELECT artid, bezeichnung
                          FROM stan_stellenart
                         ORDER BY artid ASC
                       ";
                       
              $result1 = $db->query ($query1)
                 or die ("Cannot execute query");
              echo "<select size=\"5\" name=\"stellenart11\" id='stellenart11'>";
              while ($row1 = $result1->fetch_array()){
              echo "<option value='$row1[artid]'";if($row1[artid] == 1){echo "selected";} echo">$row1[bezeichnung]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>\n";
              }
              
              echo"
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Bezeichnung der Praxisstelle*:</b>
            </td>
          <td width='60%' style='border-style: none; border-width: medium' height='0'>
            <!--<input type='text' name='bezeichnung11'id='bezeichnung11' size='50'>-->
  				<input type=\"text\" id=\"bezeichnung11\" name=\"bezeichnung11\" value=\"\" onkeyup=\"ajax_showOptions(this,'getStadt',event,11)\" size=\"50\">
  				<input type=\"hidden\" id=\"bezeichnung_hidden11\" name=\"bezeichnung_ID11\"><!-- THE ID OF the textstelle will be inserted into this hidden input -->
  	               
          </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Straße und Hausnummer der Praxisstelle*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' id='str11' name='str11' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Postfach*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='postfach11' id='postfach11' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>PLZ Ort*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='plz11' id='plz11' size='5'>&nbsp;<input type='text' name='ort11' id='ort11' size='40'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Bundesland*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='bundesland11' id='bundesland11' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Staat*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='staat11' id='staat11' size='50'>
            </td>
          </tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
             <b>Zeitraum der bei dieser Praxisstelle*: </b> 
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
             <input type=\"text\" name=\"beg_tag11\" id='beg_tag11' ID=\"text\" size=\"1\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"beg_mon11\" id='beg_mon11' value='MM' ID=\"text1\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name='beg_jahr11' id='beg_jahr11' ID=\"text11\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
             bis
             <input type=\"text\" name=\"ende_tag11\" id='ende_tag11' ID=\"text\" size=\"1\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"ende_mon11\" id='ende_mon11' value='MM' ID=\"text1\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name=\"ende_jahr11\" id='ende_jahr11' ID=\"text11\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
            </td>
          </tr>
        <tr>
          <td width='10%' style='border-style: none; border-width: medium' height='0'>
            &nbsp;
          </td>
          <td width='30%' style='border-style: none; border-width: medium' height='0'>
            <b>Abteilung:</b>
          </td>
          <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
            <input type='text' name='abteilung11' id='abteilung11' size='50'>
          </td>
        </tr>
        <tr>
          <td width='10%' style='border-style: none; border-width: medium' height='0'>
            &nbsp;
          </td>
          <td width='30%' style='border-style: none; border-width: medium' height='0'>
            <b>Tel. der Abteilung:</b>
          </td>
          <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
            <input type='text' name='telabteilung11' id='telabteilung11' size='50'>
          </td>
        </tr>
          </table>
        <br>
  </div>


<br><br>
<p align=right>
<a onclick=\"return splitt4('stell8', 'DivName8', '12')\" href=\"javascript:void(0)\"><div id='DivName8' onMouseOver=\"this.style.cursor='hand'\"><table width=10% bgcolor=#6487DC><tr><td onMouseOver=\"this.style.cursor=\"hand\";\" align=center><font color=\"#FFFFFF\"><b>splitten</b></font></td></tr></table></div></a>
</p>

  <div id=\"stell8\" style=\"display: none;\">
        <table cellspacing='0' style='width:100%;'>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Art der Praxisstelle*</b>
            </td>
            <td width='60%' style='border-style: none; border-width: medium' height='0'>";
            $db = dbconnect();
    
              $query1 = "SELECT artid, bezeichnung
                          FROM stan_stellenart
                         ORDER BY artid ASC
                       ";
                       
              $result1 = $db->query ($query1)
                 or die ("Cannot execute query");
              echo "<select size=\"5\" name=\"stellenart12\" id='stellenart12'>";
              while ($row1 = $result1->fetch_array()){
              echo "<option value='$row1[artid]'";if($row1[artid] == 1){echo "selected";} echo">$row1[bezeichnung]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>\n";
              }
              
              echo"
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Bezeichnung der Praxisstelle*:</b>
            </td>
          <td width='60%' style='border-style: none; border-width: medium' height='0'>
            <!--<input type='text' name='bezeichnung12'id='bezeichnung12' size='50'>-->
  				<input type=\"text\" id=\"bezeichnung12\" name=\"bezeichnung12\" value=\"\" onkeyup=\"ajax_showOptions(this,'getStadt',event,12)\" size=\"50\">
  				<input type=\"hidden\" id=\"bezeichnung_hidden12\" name=\"bezeichnung_ID12\"><!-- THE ID OF the textstelle will be inserted into this hidden input -->
  	               
          </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Straße und Hausnummer der Praxisstelle*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' id='str12' name='str12' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Postfach*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='postfach12' id='postfach12' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>PLZ Ort*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='plz12' id='plz12' size='5'>&nbsp;<input type='text' name='ort12' id='ort12' size='40'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Bundesland*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='bundesland12' id='bundesland12' size='50'>
            </td>
          </tr>
          <tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
              <b>Staat*:</b>
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
              <input type='text' name='staat12' id='staat12' size='50'>
            </td>
          </tr>
            <td width='10%' style='border-style: none; border-width: medium' height='0'>
              &nbsp;
            </td>
            <td width='30%' style='border-style: none; border-width: medium' height='0'>
             <b>Zeitraum der bei dieser Praxisstelle*: </b> 
            </td>
            <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
             <input type=\"text\" name=\"beg_tag12\" id='beg_tag12' ID=\"text\" size=\"1\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"beg_mon12\" id='beg_mon12' value='MM' ID=\"text1\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name='beg_jahr12' id='beg_jahr12' ID=\"text2\" value='JJJJ' size=\"6\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
             bis
             <input type=\"text\" name=\"ende_tag12\" id='ende_tag12' ID=\"text\" size=\"1\" value='TT' onFocus=\"if(this.value=='TT'){ this.value='';}\">.<input type=\"text\" name=\"ende_mon12\" id='ende_mon12' value='MM' ID=\"text1\" size=\"1\" onFocus=\"if(this.value=='MM'){ this.value='';}\">.<input type=\"text\" name=\"ende_jahr12\" id='ende_jahr12' ID=\"text2\" value='JJJJ' size=\"3\" onFocus=\"if(this.value=='JJJJ'){ this.value='';}\">
            </td>
          </tr>
        <tr>
          <td width='10%' style='border-style: none; border-width: medium' height='0'>
            &nbsp;
          </td>
          <td width='30%' style='border-style: none; border-width: medium' height='0'>
            <b>Abteilung:</b>
          </td>
          <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
            <input type='text' name='abteilung12' id='abteilung12' size='50'>
          </td>
        </tr>
        <tr>
          <td width='10%' style='border-style: none; border-width: medium' height='0'>
            &nbsp;
          </td>
          <td width='30%' style='border-style: none; border-width: medium' height='0'>
            <b>Tel. der Abteilung:</b>
          </td>
          <td width='60%' align='left' style='border-style: none; border-width: medium' height='0'>
            <input type='text' name='telabteilung12' id='telabteilung12' size='50'>
          </td>
        </tr>
          </table>
        <br>
  </div>


 <br>
 * = Pflichtfelder<br><br>
      <input type=\"submit\" value=\"Abschicken\" name=\"B1\" size=\"20\">
  </form>
					</td>
					<td width='1%' background='../images/box_r.gif'>
					<img height='1' src='../images/blank.gif' width='22'></td>
				</tr>
				<tr>
					<td nowrap='nowrap' align='left' width='1%' background='../images/box_e3.gif'>
					<img height='16' src='../images/blank.gif' width='22'></td>
					<td nowrap='nowrap' align='left' width='98%' background='../images/box_bottom.gif'>
					<img height='16' src='../images/blank.gif' width='8'></td>
					<td nowrap='nowrap' align='right' width='1%' background='../images/box_e4.gif'>
					<img height='16' src='../images/blank.gif' width='22'> </td>
				</tr>
			</table>
		</div>
		</td>
	</tr>
</table>
</body>
</html>";
break;
case "persdat":

### doppelte Vertiefungsbereiche prüfen ###
  check_vertiefungsbereich();
### Ende doppelte Vertiefungsbereiche prüfen ###


### Prüft, ob vertiefungsbereich gewählt wurde###
  vertiefungsbereich();
### Ende, ob vertiefungsbereich gewählt wurde###


### Pflichtfelder prüfen ###
  pflichtfelder();
### Ende Pflichtfelder prüfen ###



for ($i= 1;$i<= 12;$i++) // maximal 12 Felder können ausgefüllt werden
{
$stellenart	= $_POST[stellenart.$i]; // Vom Formular gesendetes Objekt in Variable schreiben
$bezeichnung	= $_POST[bezeichnung.$i];
$str		= $_POST[str.$i];
$postfach	= $_POST[postfach.$i];
$plz		= $_POST[plz.$i];
$ort		= $_POST[ort.$i];
$bundesland	= $_POST[bundesland.$i];
$staat		= $_POST[staat.$i];
$beginndatum	= $_POST[beg_jahr.$i].'-'.$_POST[beg_mon.$i].'-'.$_POST[beg_tag.$i];
$enddatum	= $_POST[ende_jahr.$i].'-'.$_POST[ende_mon.$i].'-'.$_POST[ende_tag.$i];
$abteilung	= $_POST[abteilung.$i];
$telabteilung	= $_POST[telabteilung.$i];


  if($stellenart != '1'){
      switch($i){
	case 1:
          	$vertiefungsbereich = $_POST[vert1];
		break;
	case 2:
		$vertiefungsbereich = $_POST[vert1];
		break;
	case 3:
		$vertiefungsbereich = $_POST[vert1];
		break;
	case 4:
		$vertiefungsbereich = $_POST[vert2];
		break;
	case 5:
		$vertiefungsbereich = $_POST[vert2];
		break;
	case 6:
		$vertiefungsbereich = $_POST[vert2];
		break;
	case 7:
		$vertiefungsbereich = $_POST[vert3];
		break;
	case 8:
		$vertiefungsbereich = $_POST[vert3];
		break;
	case 9:
		$vertiefungsbereich = $_POST[vert3];
		break;
	case 10:
		$vertiefungsbereich = $_POST[vert4];
		break;
	case 11:
		$vertiefungsbereich = $_POST[vert4];
		break;
	case 12:
		$vertiefungsbereich = $_POST[vert4];
		break;
      }
    
    ## Dienstellen prüfen, ob es eine eigeneist, oder ob sie aus der Datenbank übernommen wurde.  
    $res = $db->query("SELECT schluessel FROM stan_dienststellen WHERE bezeichnung='$bezeichnung' AND str='$str' AND plz='$plz' AND ort='$ort'");
    $row_key = $res->fetch_array();


    ## Entweder es gibt zur DSTS einen Schlüssel, oder es wird einer angelegt und DS in tmp Tabelle gespeichert, bis Admin sie umträgt
    if($row_key[schluessel]  == ''){
    
      $res2 = $db->query("SELECT schluessel FROM stan_dienststellen_tmp WHERE bezeichnung='$bezeichnung' AND str='$str' AND plz='$plz' AND ort='$ort'");
      $row_key2 = $res2->fetch_array();
      
      if($row_key2[schluessel] == ''){
        ## Herausfinden, welches die max Dienststellen ID ist. Simulation einer Sequence
        $res1 = $db->query("SELECT max(schluessel)+1 next FROM stan_dienststellen");
        $row_next1 = $res1->fetch_array();
        
        $res2 = $db->query("SELECT max(schluessel)+1 next FROM stan_dienststellen_tmp");
        $row_next2 = $res2->fetch_array();
        
        if($row_next1[next] >= $row_next2[next]){
          $dst_id = $row_next1[next];
        }else{
          $dst_id = $row_next2[next];
        }
    

        $sql = $db->query ("INSERT INTO stan_dienststellen_tmp (schluessel, bezeichnung, str, postfach, plz, ort) 
                             VALUES ($dst_id, '$bezeichnung', '$str', '$postfach', '$plz', '$ort')");
      }else{
        $dst_id = $row_key2[schluessel];  // wenn adresse in tmp Tabelle vorhanden ist.
      }
    }else{
      $dst_id = $row_key[schluessel];  // wenn adresse in dst Tabelle vorhanden ist.
    }




    
    $sql = $db->query ("INSERT INTO stan_antrag (uid, vert_bereich, art, dst_id, beginn, ende, abteilung, tel_abteilung, status, zuweisung
                                               ) VALUES (
                                                 '$uid1', '$vertiefungsbereich', '$stellenart', '$dst_id', '$beginndatum', '$enddatum', '$abteilung'
                                               , '$telabteilung','0', Null)");
    $aendid = $db->insert_id;
    $sql1 = $db->query ("update stan_antrag set aendid='$aendid' where saaid = '$aendid'");
    
    
    if($sql){
      echo"
      <html>
      <head>
      <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
      <link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
      <title>Antrag nicht gestellt</title>
      </head>
      <body>
      <table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
        <tr>
            <td>
            <div align=\"center\">
                <table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
                    <tr>
                        <td width=\"10\" background=\"../images/box_e1.gif\">
                        <img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
                        <td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
                        <td width=\"95%\" background=\"../images/box_top.gif\">
                        <img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
                        <span class=\"sh\">Antrag gestellt</span><br>
                        <img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
                        <td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
                        <img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
                    </tr>
                    <tr>
                        <td width=\"1%\" background=\"../images/box_l.gif\">
                        <img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
                        <td colspan=\"2\"><br>
                        <p align=\"center\"><b>Der Antrag wurde erfasst!</b>
                        </p>
                        <p align=\"center\"><a href=".$_SERVER['PHP_SELF'] .">
                        <img border=\"0\" src=\"../images/zurueck.gif\" width=\"77\" height=\"22\"></a><br>
                        </p>
                        <p></p>
                        <p></p>
                        <p></p>
                        <p></p>
                        <p><br>
                        </p>
                        </td>
                        <td width=\"1%\" background=\"../images/box_r.gif\">
                        <img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
                    </tr>
                    <tr>
                        <td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
                        <img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
                        <td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
                        <img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
                        <td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
                        <img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
                    </tr>
                </table>
            </div>
            </td>
        </tr>
      </table>
      </body>
      </html>
      ";
    }else{
      echo"
      <html>
      <head>
      <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
      <link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
      <title>Antrag nicht gestellt</title>
      </head>
      <body>
      <table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
        <tr>
            <td>
            <div align=\"center\">
                <table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
                    <tr>
                        <td width=\"10\" background=\"../images/box_e1.gif\">
                        <img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
                        <td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
                        <td width=\"95%\" background=\"../images/box_top.gif\">
                        <img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
                        <span class=\"sh\">Antrag nicht gestellt</span><br>
                        <img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
                        <td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
                        <img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
                    </tr>
                    <tr>
                        <td width=\"1%\" background=\"../images/box_l.gif\">
                        <img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
                        <td colspan=\"2\"><br>
                        <p align=\"center\"><b>Der Antrag konnte aufgrund eines Fehlers nicht erfasst werden!</b>
                        </p>
                        <p align=\"center\"><a href=".$_SERVER['PHP_SELF'] .">
                        <img border=\"0\" src=\"../images/zurueck.gif\" width=\"77\" height=\"22\"></a><br>
                        </p>
                        <p></p>
                        <p></p>
                        <p></p>
                        <p></p>
                        <p><br>
                        </p>
                        </td>
                        <td width=\"1%\" background=\"../images/box_r.gif\">
                        <img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
                    </tr>
                    <tr>
                        <td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
                        <img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
                        <td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
                        <img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
                        <td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
                        <img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
                    </tr>
                </table>
            </div>
            </td>
        </tr>
      </table>
      </body>
      </html>";
    }
  } // Ende Wenn Stellenantrag ausgewählt wurde
}  // Ende For-Schleife


} // Ende Action

?>