
function SelectEndDate(){
// ON selection of dtCheckIn this function will work

removeAllOptions(document.zoekformulier.dtCheckOut);

if(document.zoekformulier.dtCheckIn.value == '2009-12-01'){
addOption(document.zoekformulier.dtCheckOut,"2009-12-31", "2009-12-31");
}
if(document.zoekformulier.dtCheckIn.value == '2010-01-01'){
addOption(document.zoekformulier.dtCheckOut,"2010-01-31", "2010-01-31");
}
if(document.zoekformulier.dtCheckIn.value == '2010-02-01'){
addOption(document.zoekformulier.dtCheckOut,"2010-02-28", "2010-02-28");
}
if(document.zoekformulier.dtCheckIn.value == '2010-03-01'){
addOption(document.zoekformulier.dtCheckOut,"2010-03-31", "2010-03-31");
}
if(document.zoekformulier.dtCheckIn.value == '2010-04-01'){
addOption(document.zoekformulier.dtCheckOut,"2010-04-30", "2010-04-30");
}
if(document.zoekformulier.dtCheckIn.value == '2010-05-01'){
addOption(document.zoekformulier.dtCheckOut,"2010-05-31", "2010-05-31");
}
if(document.zoekformulier.dtCheckIn.value == '2010-06-01'){
addOption(document.zoekformulier.dtCheckOut,"2010-06-30", "2010-06-30");
}
if(document.zoekformulier.dtCheckIn.value == '2010-07-01'){
addOption(document.zoekformulier.dtCheckOut,"2010-07-31", "2010-07-31");
}
if(document.zoekformulier.dtCheckIn.value == '2010-08-01'){
addOption(document.zoekformulier.dtCheckOut,"2010-08-31", "2010-08-31");
}
if(document.zoekformulier.dtCheckIn.value == '2010-09-01'){
addOption(document.zoekformulier.dtCheckOut,"2010-09-30", "2010-09-30");
}
if(document.zoekformulier.dtCheckIn.value == '2010-10-01'){
addOption(document.zoekformulier.dtCheckOut,"2010-10-31", "2010-10-31");
}



}
function removeAllOptions(selectbox)
{
	var i;
	for(i=selectbox.options.length-1;i>=0;i--)
	{
		//selectbox.options.remove(i);
		selectbox.remove(i);
	}
}


function addOption(selectbox, value, text )
{
	var optn = document.createElement("OPTION");
	optn.text = text;
	optn.value = value;

	selectbox.options.add(optn);
}
