Så skulle den være der, men der mangler sikkert en detalje eller to !-)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<title>Tilmelding Minisport</title>
<style>
html,body{color:#000; font-size: 10px; font-family: verdana,sans-serif;}
#mainForm{width:428px;margin:0 auto;}
#mainForm form, #mainForm table{width:528px;border:0;border-collapse:collapse;backgound;#f2f2f2;}
#mainForm form .td1{width:159px;margin:2px;border:0;text-align:right;}
#mainForm form .td2{width:249px;margin:2px;border:0;}
.dontShow{display:none;}
.button {background-color: #777; color:#fff; /*font-size: 8px;*/}
/*.inputc {font-size: 8px;}*/
</style>
<script typee="text/javascript">
var ua = navigator.userAgent.toLowerCase();
var trDisplay = (ua.indexOf("msie") > 0 && ua.indexOf("opera") == -1) ? 'block' : 'table-row';
function showHideParentRow(elm){
document.getElementById(elm.value).style.display = elm.checked ? trDisplay : "none";
parentNames += elm.checked ? 1 : -1;
}
function showHideChildRow(elm){
var numChilds = +elm.value.replace(/^.*?(\d)$/,"$1");
if(numChilds != childNames + (elm.checked ? 1 : 0)){
elm.checked = !elm.checked;
return;
}
document.getElementById(elm.value).style.display = elm.checked ? trDisplay : "none";
childNames += elm.checked ? 1 : -1;
}
function showHideMailRows(elm){
document.getElementById(elm.value).style.display = elm.checked ? trDisplay : "none";
document.getElementById(elm.value + "x").style.display = elm.checked ? trDisplay : "none";
mailAddresses += elm.checked ? 1 : -1;
}
var parentNames = 1;
var childNames = 1;
var mailAddresses = 1;
function valider(f){
if(f.name1.value == ""){
alert("Udfyld venligst forældre navn");
f.name1.focus();
return false;
}
if(f.name2.value == "" && parentNames == 2){
alert("Udfyld venligst forældre navn");
f.name2.focus();
return false;
}
if(f.barn1.value == ""){
alert("Udfyld venligst barnets navn");
f.barn1.focus();
return false;
}
if(f.barn2.value == "" && childNames >= 2){
alert("Udfyld venligst barnets navn");
f.barn2.focus();
return false;
}
if(f.barn3.value == "" && childNames >= 3){
alert("Udfyld venligst barnets navn");
f.barn3.focus();
return false;
}
if(f.barn4.value == "" && childNames == 4){
alert("Udfyld venligst barnets navn");
f.barn4.focus();
return false;
}
if(f.adresse.value == ""){
alert("Udfyld venligst adressen");
f.adresse.focus();
return false;
}
if(!f.pnr.value.match(/^\d{4}$/)){
alert("Udfyld venligst postnummer med 4 cifre");
f.pnr.focus();
return false;
}
if(f.by.value == ""){
alert("Udfyld venligst by");
f.by.focus();
return false;
}
if(!f.tnr.value.match(/^\d{8}$/)){
alert("Udfyld venligst telefonnummer med 8 cifre");
f.tnr.focus();
return false;
}
if(!f.email1.value.match(/^.*@\w[\w.-]*\.[a-z]{2,6}$/) || f.email1.value != f.email1x.value){
alert("Udfyld venligst med en gyldig og ens mail-adresse");
f.email1.focus();
return false;
}
if(mailAddresses == 2 && (!f.email2.value.match(/^.*@\w[\w.-]*\.[a-z]{2,6}$/) || f.email2.value != f.email2x.value)){
alert("Udfyld venligst med en gyldig og ens mail-adresse");
f.email2.focus();
return false;
}
return true;
}
</script>
</head>
<body>
<div id="mainForm">
<form name="minisport" action="contact_bruges.php" method="post" onsubmit="return valider(this);">
<table>
<tr>
<td colspan="2" style="font-weight:bold;text-align:center;"><div style="font-style:italic;float:right;">Flere </div>Tilmelding til Minisport</td>
</tr>
<tr>
<td class="td1">Forældre Navn:</td>
<td class="td2"><input class="inputc" size="29" name="name1">
<input type="checkbox" value="parent2" name="parentNames[1]" onclick="showHideParentRow(this,'parent');"></td>
</tr>
<tr id="parent2" style="display:none;">
<td class="td1">Forældre2 Navn:</td>
<td class="td2"><input class="inputc" size="29" name="name2">
<input type="checkbox" style="visibility:hidden;"></td>
</tr>
<tr>
<td class="td1">Barnets Navn:</td>
<td class="td2"><input class="inputc" size="29" name="barn1">
<input type="checkbox" value="child2" name="childNames[1]" onclick="showHideChildRow(this);"></td>
</tr>
<tr id="child2" style="display:none;">
<td class="td1">Barn 2s Navn:</td>
<td class="td2"><input class="inputc" size="29" name="barn2">
<input type="checkbox" value="child3" name="childNames[2]" onclick="showHideChildRow(this);"></td>
</tr>
<tr id="child3" style="display:none;">
<td class="td1">Barn 3s Navn:</td>
<td class="td2"><input class="inputc" size="29" name="barn3">
<input type="checkbox" value="child4" name="childNames[3]" onclick="showHideChildRow(this);"></td>
</tr>
<tr id="child4" style="display:none;">
<td class="td1">Barn 4s Navn:</td>
<td class="td2"><input class="inputc" size="29" name="barn4">
<input type="checkbox" style="visibility:hidden;"></td>
</tr>
<tr>
<td class="td1">Adresse:</td>
<td class="td2"><input class="inputc" size="29" name="adresse"></td>
</tr>
<tr>
<td class="td1">Post nummer:</td>
<td class="td2"><input class="inputc" size="29" name="pnr"></td>
</tr>
<tr>
<td class="td1">By:</td>
<td class="td2"><input class="inputc" size="29" name="by"></td>
</tr>
<tr>
<td class="td1">Telefon nr.:</td>
<td class="td2"><input class="inputc" size="29" name="tnr"></td>
</tr>
<tr>
<td class="td1">Din E-mail:</td>
<td class="td2"><input class="inputc" size="29" name="email1">
<input type="checkbox" value="mail2" name="mailAddresses[2]" onclick="showHideMailRows(this);"></td>
</tr>
<tr>
<td class="td1">Gentag E-mail:</td>
<td class="td2"><input class="inputc" size="29" name="email1x">
<input type="checkbox" style="visibility:hidden;"></td>
</tr>
<tr id="mail2" style="display:none;">
<td class="td1">Den 2. E-mail:</td>
<td class="td2"><input class="inputc" size="29" name="email2">
<input type="checkbox" style="visibility:hidden;"></td>
</tr>
<tr id="mail2x" style="display:none;">
<td class="td1">Gentag 2. E-mail:</td>
<td class="td2"><input class="inputc" size="29" name="email2x">
<input type="checkbox" style="visibility:hidden;"></td>
</tr>
<tr>
<td class="td1"> </td>
<td class="td2"><input type="submit" class="button" value="Send" name="B1"> Alle felter skal udfyldes</td>
</tr>
</table>
</form>
</div>
</body>
</html>