function UpdateDaysOfMonth( stringDate, workingString )

{
	var dayStartEl = document.reservationForm.day_start;
	var dayEndEl = document.reservationForm.day_end;

	//set the working element

	var workingEl = ( workingString == 'start' ) ? dayStartEl : dayEndEl;

	//save the currently selected day

	var day = workingEl.options[workingEl.selectedIndex].value;

	//get the selected month and year

	var dateArray = stringDate.split("-");
	var month = dateArray[0];
	var year = dateArray[1];

	//get the number of days in selected month

	var days =  32 - new Date(year, month-1, 32).getDate();

	//reset days select

	workingEl.options.length=0;

	//replace the days loop based on the new selection

	workingEl.options[0]= new Option( '-', 0, false, ( day == 0 ) ? true : false );
    for(i=1; i<days+1; i++)
	{
		// mentain previously selected day only if current month's no of days allows that
		var selected = ( (day <= days) && ( i == day ) ) ? true : false;
		workingEl.options[i]= new Option(i, i, false, selected);
    }
}


function loadXmlHttp( elementID, urlContent, preLoader )
{
	
	var updatedEl = document.getElementById( elementID );

    var contentHeight = updatedEl.offsetHeight
	var paddingImage = (contentHeight - 16 ) / 2;

    if ( preLoader )
	{
		this.d.innerHTML = '<div id="loading" style="text-align:center;height: ' + contentHeight + 'px;"><img src="' + myBaseURL + 'templates/ajl.gif" style="margin-top:' + parseInt(paddingImage)+ 'px"></div>';
	}
	
    var contentString = new String;
    contentString = urlContent.indexOf( "?" ) > 0 ? GetFileContent( urlContent + "&anticache=" + Math.random() ) : GetFileContent( urlContent + "?anticache=" + Math.random() );

	updatedEl.innerHTML = contentString;
	return ( true );
 }

