function dateRange(date) {
var now = new Date();
return (date.getTime() <= now.getTime() )
}

function catcalc_rtr(cal){
var date = cal.date;
document.formPresupuesto.day_rtr.options.selectedIndex=date.getDate();
document.formPresupuesto.msn_rtr.options.selectedIndex= mes_ano(date.getMonth(),date.getFullYear());
DeshabilitaPresupuesto();
}

function catcalc_ent(cal){
var date = cal.date;
document.formPresupuesto.day_ent.options.selectedIndex=date.getDate();
document.formPresupuesto.msn_ent.options.selectedIndex= mes_ano(date.getMonth(),date.getFullYear());
DeshabilitaPresupuesto();
}
function mes_ano(mes,ano){
	var total=mes+(12*ano);

	for(var index = 0; 
    index < document.formPresupuesto.msn_rtr.options.length; 
    index++) {
   if(document.formPresupuesto.msn_rtr.options[index].value == total){
     return index;
   }
	}
}
function DeshabilitaPresupuesto() {

	// Lo primero se oculta el presupuesto ya antiguo
	// pero SOLO si la página no es "reserva.htm" 
	var path = location.pathname;
	if ( (path.match("reserva") != null) || (path.match("marriott") != null) ) {

		
		// Se ponen a 'none' para que no ocupen espacio
		document.getElementById('Reserva').style.display = 'none';
		document.getElementById('Reservaoffline').style.display = 'none';
/*
		str = new String(document.getElementById("Presupuesto").innerHTML);
		str = str.replace("!disabled","disabled");
		document.getElementById("Presupuesto").innerHTML = str;
*/
		document.getElementById("Presupuesto").innerHTML = '<h3>s`il vous plaît, Cliquer  sur « nouveau devis »</h3>';

		// NUEVO: Se oculta el campo del "supercodigo"
//		document.getElementById('codediv').style.display = 'none';

		// NUEVO: Se oculta el campo del "book and join"
//		document.getElementById('bookandjoin').style.display = 'none';

		// NUEVO: Se vacia el cuadro de los upgrades
		document.getElementById("Upgrade").innerHTML = '';
		
	}

}


