<script type="text/javascript">
function opmerkingtoevoegen(){
if(confirm('Naam: ' + document.form.menu.options[document.form.menu.selectedIndex].text + ' uit ' + document.form.klas.options[document.form.klas.selectedIndex].text + ' \nOpmerking: ' + document.form.itemlist.options[document.form.itemlist.selectedIndex].text + '\nDagdeel: ' + document.form.uren.options[document.form.uren.selectedIndex].text + '\n\nWeet u zeker dat u deze opmerking wilt toevoegen?')){
document.opmerkingen.kopiemenu.options[document.opmerkingen.kopiemenu.options.length] = new Option(document.form.menu.options[document.form.menu.selectedIndex].text);
document.opmerkingen.kopieklas.options[document.opmerkingen.kopieklas.options.length] = new Option(document.form.klas.options[document.form.klas.selectedIndex].text);
document.opmerkingen.kopieuren.options[document.opmerkingen.kopieuren.options.length] = new Option(document.form.uren.options[document.form.uren.selectedIndex].text);
document.opmerkingen.kopieitemlist.options[document.opmerkingen.kopieitemlist.options.length] = new Option(document.form.itemlist.options[document.form.itemlist.selectedIndex].text);
for(i = 0; i < document.getElementById("aantalpertype").childNodes.length; i++){
document.getElementById("aantalpertype").childNodes[i].style.display = "none";
};
if(document.getElementById("aantalpertype" + document.form.itemlist.selectedIndex)){
document.getElementById("aantalpertype" + document.form.itemlist.selectedIndex).firstChild.nextSibling.nextSibling.innerHTML++;
document.getElementById("aantalpertype" + document.form.itemlist.selectedIndex).style.display = "block";
} else {
document.getElementById("aantalpertype").innerHTML += '<div id="aantalpertype' + document.form.itemlist.selectedIndex + '"><span>' + document.form.itemlist.options[document.form.itemlist.selectedIndex].text + '</span>: <span>1</span>x</div>';
};
};
};
function opmerkingafhandelen(){
if(document.opmerkingen.kopiemenu.options.length > 0){
if(document.opmerkingen.kopiemenu.selectedIndex > -1){
if(confirm('Naam: ' + document.opmerkingen.kopiemenu.options[document.opmerkingen.kopiemenu.selectedIndex].text + ' uit ' + document.opmerkingen.kopieklas.options[document.opmerkingen.kopiemenu.selectedIndex].text + ' \nOpmerking: ' + document.opmerkingen.kopieitemlist.options[document.opmerkingen.kopiemenu.selectedIndex].text + '\nDagdeel: ' + document.opmerkingen.kopieuren.options[document.opmerkingen.kopiemenu.selectedIndex].text + '\n\nWeet u zeker dat u deze opmerking wilt verwijderen?')){
for(i = 0; i < document.getElementById("aantalpertype").childNodes.length; i++){
if(document.getElementById("aantalpertype").childNodes[i].firstChild.innerHTML == document.opmerkingen.kopieitemlist.options[document.opmerkingen.kopiemenu.selectedIndex].text){
document.getElementById("aantalpertype").childNodes[i].firstChild.nextSibling.nextSibling.innerHTML--;
if(document.getElementById("aantalpertype").childNodes[i].firstChild.nextSibling.nextSibling.innerHTML < 1){
document.getElementById("aantalpertype").removeChild(document.getElementById("aantalpertype").childNodes[i]);
};
};
};
document.opmerkingen.kopieklas.options[document.opmerkingen.kopiemenu.selectedIndex] = null;
document.opmerkingen.kopieuren.options[document.opmerkingen.kopiemenu.selectedIndex] = null;
document.opmerkingen.kopieitemlist.options[document.opmerkingen.kopiemenu.selectedIndex] = null;
document.opmerkingen.kopiemenu.options[document.opmerkingen.kopiemenu.selectedIndex] = null;
};
} else {
alert("Er is geen opmerking geselecteerd.");
};
} else {
alert("Er zijn geen opmerkingen.");
};
};
</script>
<form name="form">
<SELECT NAME="menu" size="11">
<OPTION VALUE="Mestrom, Bart" selected>Mestrom, Bart</OPTION>
</SELECT>
<SELECT NAME="klas" size="11">
<OPTION VALUE="CC01" selected>CC01</OPTION>
<OPTION VALUE="CC02">CC02</OPTION>
<OPTION VALUE="WC01">WC01</OPTION>
</SELECT>
<SELECT NAME="uren" SIZE="11" MULTIPLE>
<OPTION VALUE="het 1e uur" selected>1e uur
<OPTION VALUE="het 2e uur">2e uur
<OPTION VALUE="het 3e uur">3e uur
<OPTION VALUE="het 4e uur">4e uur
<OPTION VALUE="het 5e uur">5e uur
<OPTION VALUE="het 6e uur">6e uur
<OPTION VALUE="het 7e uur">7e uur
<OPTION VALUE="het 8e uur">8e uur
<OPTION VALUE="de hele dag">Hele dag
<OPTION VALUE="Ochtend">Ochtend
<OPTION VALUE="Middag">Middag
</SELECT>
<SELECT NAME="itemlist" SIZE="11">
<OPTION VALUE="Afwezig i.v.m. familie-omstandigheden" selected>Afwezig i.v.m. familie-omstandigheden
<OPTION VALUE="begrafenis">Begrafenis
<OPTION VALUE="familiefeest">Familiefeest
<OPTION VALUE="bruiloft">Bruiloft
<OPTION VALUE="Verlof akkoort vestigingsdirecteur">Verlof akkoort vestigingsdirecteur
</SELECT>
<br><button onClick="opmerkingtoevoegen();"><img src="goed.gif"> Voeg opmerking toe</button>
</form><form name="opmerkingen">
<SELECT NAME="kopiemenu" size="11">
</SELECT>
<SELECT NAME="kopieklas" size="11">
</SELECT>
<SELECT NAME="kopieuren" SIZE="11" MULTIPLE>
</SELECT>
<SELECT NAME="kopieitemlist" SIZE="11">
</SELECT><br />
<button onClick="opmerkingafhandelen();">Afhandelen</button>
</form>
<div id="aantalpertype">
</div>