var bit = 1;

function createInput() {
	if (bit <= 10) { 
		var newtable = document.createElement("table");
		newtable.className = "table";
		newtable.cellPadding = "2";
		newtable.cellSpacing = "0";
		newtable.style.marginTop = "5px";
		
		var newtr = document.createElement("tr");
		newtr.className = "table_top";
		newtr.valign = "top";
		
		var newtd = document.createElement("td");
		newtd.className = "table_top";
		newtd.style.paddingLeft = "8px";
		newtd.style.borderLeft = "none";
		newtd.style.borderBottom = "none";
		newtd.style.background = "url(images/table_ol.jpg) no-repeat";
		
		var newtext = document.createTextNode(bit + ". Vorschoter");
		newtd.appendChild(newtext);
		
		var newimage = document.createElement("img");
		newimage.src = "images/del.jpg";
		newimage.width = "11px";
		newimage.height = "11px";
		newimage.alt = "Vorschoter entfernen";
		
		newtd.appendChild(newimage);
		
		newtr.appendChild(newtd);
		
		var newtd = document.createElement("td");
		newtd.className = "table_top";
		newtd.style.borderLeft = "none";
		newtd.style.borderBottom = "none";
		
		newtr.appendChild(newtd);
		
		var newtd = document.createElement("td");
		newtd.className = "table_top";
		newtd.style.borderLeft = "none";
		newtd.style.borderBottom = "none";
		
		newtr.appendChild(newtd);
		
		var newtd = document.createElement("td");
		newtd.className = "table_top";
		newtd.style.paddingRight = "8px";
		newtd.style.borderLeft = "none";
		newtd.style.borderBottom = "none";
		newtd.style.background = "url(images/table_or.jpg) no-repeat right";
		
		newtr.appendChild(newtd);
		
		newtable.appendChild(newtr);
		
		<!--2. Spalte-->
		
		var newtr = document.createElement("tr");
		newtr.valign = "top";
		
		var newtd = document.createElement("td");
		newtd.className = "table_main";
		newtd.style.paddingLeft = "8px";
		newtd.style.borderBottom = "none";
		
		var newtext = document.createTextNode("Name:");
		newtd.appendChild(newtext);
		
		newtr.appendChild(newtd);
		
		var newtd = document.createElement("td");
		newtd.className = "table_main";
		newtd.style.borderLeft = "none";
		newtd.style.borderBottom = "none";
		
		var newinput = document.createElement("input");
		newinput.name = "schot_name[]";
		newinput.type = "text";
		newinput.style.width = "120px";
		newinput.style.height = "12px";
		newinput.style.fontSize = "10px";
		
		newtd.appendChild(newinput);
		
		newtr.appendChild(newtd);
		
		var newtd = document.createElement("td");
		newtd.className = "table_main";
		newtd.style.borderLeft = "none";
		newtd.style.borderBottom = "none";
		
		var newtext = document.createTextNode("Vorname:");
		newtd.appendChild(newtext);
		
		newtr.appendChild(newtd);
		
		var newtd = document.createElement("td");
		newtd.className = "table_main";
		newtd.style.paddingRight = "8px";
		newtd.style.borderRight = "1px solid #b0b0b0";
		newtd.style.borderLeft = "none";
		newtd.style.borderBottom = "none";
		
		var newinput = document.createElement("input");
		newinput.name = "schot_vorname[]";
		newinput.type = "text";
		newinput.style.width = "120px";
		newinput.style.height = "12px";
		newinput.style.fontSize = "10px";
		
		newtd.appendChild(newinput);
		
		newtr.appendChild(newtd);
		
		newtable.appendChild(newtr);
		
		<!--3. Spalte-->
			
		var newtr = document.createElement("tr");
		newtr.valign = "top";
		
		var newtd = document.createElement("td");
		newtd.className = "table_main";
		newtd.style.paddingLeft = "8px";
		newtd.style.borderBottom = "none";
		
		var newtext = document.createTextNode("Geburtsdatum:");
		newtd.appendChild(newtext);
		
		newtr.appendChild(newtd);
		
		var newtd = document.createElement("td");
		newtd.className = "table_main";
		newtd.colSpan = "3";
		newtd.style.paddingRight = "8px";
		newtd.style.borderRight = "1px solid #b0b0b0";
		newtd.style.borderLeft = "none";
		newtd.style.borderBottom = "none";
		
		var newinput = document.createElement("input");
		newinput.name = "schot_geb_tag[]";
		newinput.type = "text";
		newinput.style.width = "14px";
		newinput.style.height = "12px";
		newinput.style.fontSize = "10px";
		
		newtd.appendChild(newinput);
		
		var newtext = document.createTextNode(".");
		newtd.appendChild(newtext);
		
		var newinput = document.createElement("input");
		newinput.name = "schot_geb_monat[]";
		newinput.type = "text";
		newinput.style.width = "14px";
		newinput.style.height = "12px";
		newinput.style.fontSize = "10px";
		
		newtd.appendChild(newinput);
		
		var newtext = document.createTextNode(".");
		newtd.appendChild(newtext);
		
		var newinput = document.createElement("input");
		newinput.name = "schot_geb_jahr[]";
		newinput.type = "text";
		newinput.style.width = "28px";
		newinput.style.height = "12px";
		newinput.style.fontSize = "10px";
		
		newtd.appendChild(newinput);
		
		newtr.appendChild(newtd);
		
		newtable.appendChild(newtr);
		
		<!--4. Spalte -->
			
		var newtr = document.createElement("tr");
		newtr.valign = "top";
		
		var newtd = document.createElement("td");
		newtd.className = "table_main_lastrow";
		newtd.style.paddingLeft = "8px";
		
		var newtext = document.createTextNode("Club:");
		newtd.appendChild(newtext);
		
		newtr.appendChild(newtd);
		
		var newtd = document.createElement("td");
		newtd.className = "table_main_lastrow";
		newtd.style.borderLeft = "none";
		
		var newinput = document.createElement("input");
		newinput.name = "schot_club[]";
		newinput.type = "text";
		newinput.style.width = "120px";
		newinput.style.height = "12px";
		newinput.style.fontSize = "10px";
		
		newtd.appendChild(newinput);
		
		newtr.appendChild(newtd);
		
		var newtd = document.createElement("td");
		newtd.className = "table_main_lastrow";
		newtd.style.borderLeft = "none";
		newtd.style.borderBottom = "none";
		
		var newtext = document.createTextNode("Kürzel:");
		newtd.appendChild(newtext);
		
		newtr.appendChild(newtd);
		
		var newtd = document.createElement("td");
		newtd.className = "table_main_lastrow";
		newtd.style.paddingRight = "8px";
		newtd.style.borderRight = "1px solid #b0b0b0";
		newtd.style.borderLeft = "none";
		
		var newinput = document.createElement("input");
		newinput.name = "schot_kuerzel[]";
		newinput.type = "text";
		newinput.style.width = "40px";
		newinput.style.height = "12px";
		newinput.style.fontSize = "10px";
		
		newtd.appendChild(newinput);
		
		newtr.appendChild(newtd);
		
		newtable.appendChild(newtr);
		
		<!-- 5. Spalte -->
		
		var newtr = document.createElement("tr");
		newtr.className = "table_bottom";
		newtr.valign = "top";
		
		var newtd = document.createElement("td");
		newtd.className = "table_bottom";
		newtd.style.borderLeft = "none";
		newtd.style.background = "url(images/news_ul.jpg) no-repeat";
		
		newtr.appendChild(newtd);
		
		var newtd = document.createElement("td");
		newtd.className = "table_bottom";
		newtd.style.borderLeft = "none";
		
		newtr.appendChild(newtd);
		
		var newtd = document.createElement("td");
		newtd.className = "table_bottom";
		newtd.style.borderLeft = "none";
		
		newtr.appendChild(newtd);
		
		var newtd = document.createElement("td");
		newtd.className = "table_bottom";
		newtd.style.borderLeft = "none";
		newtd.style.background = "url(images/news_ur.jpg) no-repeat right";
		
		newtr.appendChild(newtd);
		
		newtable.appendChild(newtr);
		
		var ausgabebereich = document.getElementById("container");
		ausgabebereich.appendChild(newtable);
		
		var ausgabebereich = document.getElementById("bit");
		ausgabebereich.value = bit;
		
		bit++;
	}
	else {
		alert("Sie dürfen max. zehn Vorschoter anmelden.");
	}
}

var path_formular = "formular";
var path_sub_selection = "sub_selection";

function deleteOptions() {
    var count_options = document.forms[path_formular].elements[path_sub_selection].length;

    for (i=0; i < count_options; i++) {
        document.forms[path_formular].elements[path_sub_selection].options[document.forms[path_formular].elements[path_sub_selection].length - 1] = null;
    }
}

function show_ergebnis(tmp_id) {
	document.getElementById(tmp_id).style.display = "block";
	document.getElementById("show_" + tmp_id).style.display = "none";
	document.getElementById("hide_" + tmp_id).style.display = "inline";
}

function hide_ergebnis(tmp_id) {
	document.getElementById(tmp_id).style.display = "none";
	document.getElementById("show_" + tmp_id).style.display = "inline";
	document.getElementById("hide_" + tmp_id).style.display = "none";
}

function fensterOeffnen (adresse) {
  meinFenster = window.open(adresse, "Segelclub J&uuml;lich e.V. (Woffelsbach, Rursee)", "width=500, height=629, menubar=no, left=75, top=150");
  meinFenster.focus();
}