/*var calendario;
window.addEvent('domready', 
function() { 
	calendario = new vlaDatePicker('calendar', { style: 'apple_widget', offset: { x:10, y: -65 }, format: 'm-y', ieTransitionColor: '' }); 		
  calendario.hide = function()
  {
    		if(this.visible) {
    			this.visible = false;
    			var _class = this;
    			if(Browser.Engine.trident5) this.picker.setStyle('background-color', this.ieTransitionColor); //Ugly transition fix for IE7
    			this.picker.set('tween', { onComplete: function() { _class.picker.setStyle('display', 'none'); _class.outsideHide = false; }, duration: this.toggleDuration }).fade('out');
    		}
        //Cambiamos la fecha
        var fech = this.getInputDate();
        var f = fech.split("/");                          
        var d = f[0];
        var my = f[1]+"/"+f[2];
      
        document.getElementById("myea").value = my;
        document.getElementById("dai").value = d;
        
  }
});*/
function openCalendar()
{
    //calendario = new vlaDatePicker('calendar', { style: 'apple_widget', offset: { x:10, y: -65 }, format: 'm-y', ieTransitionColor: '' });
    calendario.show();
}
function getBookOnline()
{
    var indice = document.formu.hotel_id.selectedIndex;
    var valor = document.formu.hotel_id.options[indice].value;
    var id_hotel = valor;
    var arr_hotel = id_hotel.split("-");
    id_hotel = arr_hotel[0];
    url_hotel = arr_hotel[1];
    
    indice = document.formu.myea.selectedIndex;
    valor = document.formu.myea.options[indice].value;
    var book_cal = valor;
    var m = book_cal.split('index.html');
    var book_month = m[0];    
    var book_year = m[1];
    indice = document.formu.day.selectedIndex;
    valor = document.formu.day.options[indice].value;
    var book_days = valor;   

    indice = document.formu.nights.selectedIndex;
    valor = document.formu.nights.options[indice].value;
    var book_nights = valor;   

    indice = document.formu.rooms.selectedIndex;
    valor = document.formu.rooms.options[indice].value;
    var book_rooms = valor;   

    indice = document.formu.adults.selectedIndex;
    valor = document.formu.adults.options[indice].value;
    var book_adults = valor;   
    
    indice = document.formu.childrens.selectedIndex;
    valor = document.formu.childrens.options[indice].value;
    var book_childrens = valor;   
    
    var string_ref = "http://"+url_hotel+"/"+book_year+"/"+book_month+"/"+book_days+"/"+book_rooms+"/"+book_nights+"/"+book_adults+"/"+book_childrens+"/reservations.hotels";
    location.href = string_ref;
}
