function showWindow( m_url, winname, winwidth, winheight, wndparams)
{
	if ((winname == null) || (winname == "")) winname = "lvs";
	
	winleft = (screen.availWidth / 2) - (winwidth / 2);
	wintop = (screen.availHeight / 2) - (winheight / 2);
	
	if (wndparams == null) wndparams = "scrollbars=no,resizable=no";
	oWinInfo=(window.open(m_url, winname,"left=" + winleft + ",top=" + wintop + ",width=" + winwidth + ",height=" + winheight + "," + wndparams));
	//	registerWindow(oWinInfo);
	if (!Browser.ie) {
		if(oWinInfo.self != null)  oWinInfo.focus();
	}
}

/**
 * When a Guest selects a month, refresh the ArrivalDay drop-down;
 * also called when a year changes, to account for the possibility
 * that a leap year was selecte/unselected
 */
function changeOfMonth(aSelect) {
	selectNextDate(aSelect);
	var month = (aSelect.value).substring(4,6);
	var day   = aSelect.form.arrivalDay.value;
	var year  = aSelect.value.substring(0,4);
	var numDays = getNumDaysInMonth(month,year);
	var aryDays = new Array();

	aryDays[0] = new Option("", "-1");

	for (var i=1; i <= numDays; i++) {
		aryDays[i] = new Option(i,i);
	}

	setOptions(aSelect.form.arrivalDay, aryDays);

	// restore the date, if one was selected and is valid
	if (day > 0 && day <= numDays) {
		aSelect.form.arrivalDay.options[day].selected = true;
	}
}

function selectNextDate(aSelect){
	var day	  = aSelect.form.arrivalDay.value;
	var month = (aSelect.form.arrivalMonthYear.value).substring(4,6);
	var year  = (aSelect.form.arrivalMonthYear.value).substring(0,4);
//	alert(day+month+year);
	var curDate		=new Date(year,month,day);
	var nextDate	=new Date(curDate);
	nextDate.setDate(nextDate.getDate()+1);
	var nextmonthyear = nextDate.getFullYear() +'' + (nextDate.getMonth() <10 ? '0'+ nextDate.getMonth() :nextDate.getMonth());
	
/*	if(	aSelect.form.departureDay.selectedIndex==0 && aSelect.form.departureMonthYear.selectedIndex==0)
	{
		aSelect.form.departureDay.value=nextDate.getDate();
		aSelect.form.departureMonthYear.value=nextmonthyear;
	}*/
	aSelect.form.departureDay.value=nextDate.getDate();
	aSelect.form.departureMonthYear.value=nextmonthyear;
}



