function iniciar(nombres, precios_simple, precios_doble, formulario)
{
this.nombres=nombres;
this.precios_simple=precios_simple;
this.precios_doble=precios_doble;
}

function precios(hotel, habitaciones, noches, tipo)
{
	this.habitaciones=habitaciones;	
	this.noches=noches;
	this.hotel=hotel.selectedIndex;
	if (tipo[0].checked) this.tipohabitacion="simple";
	if (tipo[1].checked) this.tipohabitacion="doble";
	switch (this.tipohabitacion)
	{
		case "simple": precio=this.precios_simple[this.hotel-1];break;
		case "doble":  precio=this.precios_doble[this.hotel-1];break;		
	}
	var total=precio*this.habitaciones*this.noches;
	if (total>=0)
		return Math.round((total*100))/100;
	else
		return 0;
}