function writeTop(){
	// alert(pfad + "\n" + depth + "\n" + icon);
	// alert(verortung[0][0] + "\n" + verortung[0][1]);
	
	document.write('<table border=0 cellpadding=0 cellspacing=0 width=100%>\n');
	document.write('  <tr><td bgColor="#336699"><img src="' + pfad + 'pics/spacer.gif" width=1 height=1 border=0></td></tr>\n');
	document.write('  <tr>\n');
	document.write('    <td>\n');
	document.write('      <table border=0 cellpadding=0 cellspacing=0 width=100%>\n');
	document.write('        <tr>\n');
	document.write('          <td><img src="' + pfad + 'pics/navchristus.gif" width=35 height=24 border=0></td>\n');
	document.write('          <td align=left nowrap><span class=shortLinks><nobr> Kościół Jezusa Chrystusa Świętych w Dniach Ostatnich</nobr></span></td>\n');
	document.write('          <td><img src="' + pfad + 'pics/spacer.gif" width=20 height=1 border=0></td>\n');
	document.write('          <td align=right nowrap>\n');
	
	writeShortlinks();
	
	document.write('          </td>\n');
	document.write('        </tr>\n');
	document.write('      </table>\n');
	document.write('    </td>\n');
	document.write('  </tr>\n');
	document.write('  <tr><td bgColor="#000000"><img src="' + pfad + 'pics/spacer.gif" width=1 height=1 border=0></td></tr>\n');
  	document.write('  <tr><td bgColor="#999966"><img src="' + pfad + 'pics/spacer.gif" width=1 height=1 border=0></td></tr>\n');
	document.write('  <tr>\n');
	document.write('    <td bgColor="#CCCC99">\n');
	
	document.write('      <table border=0 cellpadding=0 cellspacing=0>\n');
	document.write('        <tr>\n');
	document.write('          <td><img src="' + pfad + 'pics/spacer.gif" width=5 height=14 border=0></td>\n');
	document.write('          <td><a href="' + pfad + '" class=trailLink>Strona startowa</a></td>\n');
	for(z=0;z<depth;z++){
		document.write('          <td><img src="' + pfad + 'pics/arrow_olive.gif" width=13 height=14 border=0></td>\n');
		if(z!=depth-1){
			document.write('          <td><a class=trailLink href="' + verortung[z][1] +'">' + verortung[z][0] +'</a></td>\n');
		} else {
			document.write('          <td><span class=trailLink>' + verortung[z][0] +'</span></td>\n');
		}
	}
	document.write('        </tr>\n');
	document.write('      </table>\n');
	
	document.write('    </td>\n');
	document.write('  </tr>\n');
	document.write('  <tr><td bgColor="#999966"><img src="' + pfad + 'pics/spacer.gif" width=1 height=1 border=0></td></tr>\n');
	document.write('</table>\n');
	
	document.write('<table border=0 cellpadding=0 cellspacing=0 width=100%>\n');
	document.write('<tr>\n');
	document.write('<td width=20% valign=top>\n');
	
	document.write('  <img src="' + pfad + 'pics/channelIcon_' + icon + '.gif" width=152 height=57 border=0><br>\n');
	document.write('  <table border=0 cellpadding=0 cellspacing=0 width=100%>\n');
	document.write('    <tr>\n');
	document.write('      <td width=1><img src="' + pfad + 'pics/spacer.gif" width=15 height=1 border=0></td>\n');
	document.write('      <td width=100% align=left>\n');
	document.write('        <br>\n');
	
	writeChannelTitle();
	
	document.write('        <br>\n');
	document.write('        <table cellpadding=0 cellspacing=0 border=0 width=100%>\n');
	
	writeChannelNavi();
	
	document.write('        </table>\n');
	document.write('      </td>\n');
	document.write('      <td width=1><img src="' + pfad + 'pics/spacer.gif" width=15 height=1 border=0></td>\n');
	document.write('    </tr>\n');
	document.write('  </table>\n');
	
	document.write('</td>\n');
	document.write('<td width=80% bgColor=white valign=top>\n');
	
	document.write('  <table border=0 cellpadding=0 cellspacing=0 width=100%>\n');
	document.write('    <tr><td bgColor="#003366"><img src="' + pfad + 'pics/spacer.gif" width=620 height=20 border=0></td></tr>\n');
	document.write('    <tr><td align=left valign=top><img src="' + pfad + 'pics/topcurve.gif" width=26 height=22 border=0></td></tr>\n');
	document.write('  </table>\n');
	
	document.write('  <table border="0" cellpadding="0" cellspacing="0" width="100%">\n');
	document.write('    <tr>\n');
	document.write('      <td width="10"><img src="' + pfad + 'pics/spacer.gif" width="10" height="1" border="0"></td>\n');
	document.write('      <td width="5000">\n');
}	
	

function writeBot(){
	document.write('      </td>\n');
	document.write('      <td width="10"><img src="' + pfad + 'pics/spacer.gif" width="10" height="1" border="0"></td>\n');
	document.write('    </tr>\n');
	document.write('  </table>\n');
	document.write('</td>\n');
	document.write('</tr>\n');
	document.write('<tr>\n');
	document.write('<td></td>\n');
	document.write('<td bgcolor=white align=left valign=bottom><img src="' + pfad + 'pics/bottomcurve.gif" width=26 height=22 border=0></td>\n');
	document.write('</tr>\n');
	
	writeDisclaimer();
	
	document.write('</table>\n');
}

function writeUnitsearch(){
	document.write('  <div style="width:400px;border:1px solid #003366;padding:5px;background-color:#F1F1CD;">\n');
	document.write('  <form name="suchformular" action="javascript:sucheStarten();" method=POST>\n');
	document.write('    <table border=0 cellpadding=0 cellspacing=0 width=100%>\n');
	document.write('      <tr>\n');
	document.write('        <td class=formLabels width=60%>Suchbegriff</td>\n');
	document.write('        <td class=formLabels width=40% align=right>Kategorie</td>\n');
	document.write('      </tr>\n');
	document.write('      <tr>\n');
	document.write('        <td><input type=text name="suchStr" class=formElements style="width:100%;"></td>\n');
	document.write('        <td align=right>\n');
	document.write('          <select name="kat" class=formElements>\n');
	document.write('            <option value="kat=all&sort=city">gesamte Datenbank</option>\n');
	document.write('            <option value="kat=state&sort=city">Bundesland</option>\n');
	document.write('            <option value="kat=city&sort=zip">Ort</option>\n');
	document.write('            <option value="kat=zip&sort=zip">PLZ</option>\n');
	document.write('            <option value="kat=stake&sort=unit_name">Pfahl</option>\n');
	document.write('            <option value="kat=unit_name&sort=state">Gemeinde</option>\n');
	document.write('            <option value="kat=street&sort=zip">Stra&szlig;e</option>\n');
	document.write('          </select>\n');
        document.write('        </td>\n');
	document.write('      </tr>\n');
	document.write('    </table>\n');
	document.write('    <p style="margin-top:10px;margin-bottom:10px;border-top:1px solid #666633;font-size:1px;">&nbsp;</p>\n');
	document.write('    <table border=0 cellpadding=0 cellspacing=0 width=100%>\n');
	document.write('      <tr>\n');
	document.write('        <td class=formLabels width=50% align=center><input type=submit value="Suche starten"></td>\n');
	document.write('      <td class=formLabels width=50% align=center><input type=reset value="zur&uuml;cksetzen"></td>\n');
	document.write('      </tr>\n');
	document.write('    </table>\n');
	document.write('  </form>\n');
	document.write('  </div>\n');
}