	$.fn.clearForm = function() { 
	  return this.each(function() {
		 
	    var type = this.type, tag = this.tagName.toLowerCase();
	    if (tag == 'form')
	      return $(':input',this).clearForm();
	    if (type == 'text' || type == 'password' || tag == 'textarea')
	      this.value = '';
	    else if (type == 'checkbox' || type == 'radio')
	      this.checked = false;
	    else if (tag == 'select')
	      this.selectedIndex = -1;
	  });
	};
	
	
	
	
	 $.fn.addAjaxLoader=function(absolute){
		var w = $(this).outerWidth();
		var h = $(this).outerHeight();
		absolute = absolute==undefined?false:absolute;
		
		
		if($(this).find(".ajax_loader").length==0){
			if(absolute){
				$(this).css("position","relative");
				$(this).prepend('<div class="ajax_loader" style="z-index:9999;position:absolute;left:0;margin:0px;padding:0px;width:'+w+'px;height:'+h+'px; background: url('+dir_img+'ajax-loader.gif) no-repeat center center  #FFFFFF;filter: alpha(opacity=60);opacity:0.6"></div>');
			}
			else{
				$(this).append('<div class="ajax_loader" style="margin:0px;padding:0px;margin-top:-'+h+'px;width:'+w+'px;height:'+h+'px; background: url('+dir_img+'ajax-loader.gif) no-repeat center center  #FFFFFF;filter: alpha(opacity=60);opacity:0.6"></div>');
			}
		}
	 };
	 
	 $.fn.removeAjaxLoader=function(absolute){
		 $(this).find(".ajax_loader").remove();
	 };
	 
	 $.fn.serializeForm = function() {
		var string = "";
		var value  = "";
		$(this).find("input,textarea,select").each(function(){
			if($(this).val()!=null){
				if(this.type == 'checkbox'){
					value = this.checked?1:0;
				}
				else{
					value = $(this).val().replace(/[\u00A0-\u2666]/g, function(c) { //Convert unicode to html entities
						return '&#'+c.charCodeAt(0)+';';
					});
					value = value.replace(/\+/g,'%2B'); //Url encode '+' symbol
				}
			}
			else{
				value="";
			}
			
			string += (string==''?"":"&")+($(this).attr("name")+"="+ encodeURIComponent(value) );
		});
		return string;
	};
	 
	 function showAlertMessage(message,icon,close_on_click){
			/* ICONS:ajax,info,alert,error */
			var img_icon="";
			close_on_click = close_on_click == '' || close_on_click == undefined  ? false: close_on_click;
			if(typeof(dir_img) == "undefined"){
				window.dir_img = '';
			}
			if(icon=='ajax'){img_icon=dir_img+"ajax-loader.gif";}
			else if (icon=='info'){img_icon=dir_img+"icon-dialog-info.png";}
			else if (icon=='error'){img_icon=dir_img+"icon-dialog-error.png";}
			else if (icon=='password'){img_icon=dir_img+"icon-dialog-password.png";}
			else if (icon=='warning'){img_icon=dir_img+"icon-dialog-warning.png";}
			else{img_icon=dir_img+"icon-dialog-warning.png";}
			
			var html ='<div id="alert_msg" style="width:600px;background-color:#FFFFFF;border: 1px solid #999999; cursor:pointer;float:left" onclick="MySimpleLightBox.close();">';
			html+='<div style="float:left"><img style="margin:10px" src="'+img_icon+'"></div>';
			html+='<div style="float:left"><div style="color:#000;font-size:12px;padding-top:30px;">'+message+'</div></div>';
			html+='</div>';
			
			MySimpleLightBox.border='1px solid #999999';
			MySimpleLightBox.loadHTML(html);
			
			$("#lbox").bind("click",function(){
				if(close_on_click){
					MySimpleLightBox.close();
				}	
			});
		}
	//  ----------------------------------------------------------- ::: - ::: - ::: ------------
	//  ----------------------------------------------------------- ::: - ::: - ::: ------------
	 
	function loadHabitacionesFecha(id_crucero,fecha){
			$.post(dir_inc + '_ajax-cruceros.php',{opc:"load_habitaciones_fecha",id_crucero: id_crucero,fecha: fecha},function(data){
				$('#div_tipo_habitacion').html(data);
			});		
	}
//  ----------------------------------------------------------- ::: - ::: - ::: ------------
//  ----------------------------------------------------------- ::: - ::: - ::: ------------

	function emailCheck (emailStr) {
			var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
			return reg.test(emailStr) == false?false:true;
	}
//  ----------------------------------------------------------- ::: - ::: - ::: ------------
//  ----------------------------------------------------------- ::: - ::: - ::: ------------
	
    function checkFormFields(frm,animate,animate_msg,field_font_color,field_background_color){ //(formulario, array de campos a validar,idioma,animar(1|0)?,mostrar alerta(1|0)?)
			var msg="";
			var verify = true;
			var show_alert  = false;
			$("#"+frm+" input,#"+frm+" select,#"+frm+" textarea,#"+frm+" div").each(function(){
				
				if($(this).hasClass("required")){
					
					if($(this).attr('id').indexOf('captcha')!=-1){
						verify = isCaptchaCodeCorrect($(this).val());
					}
					//If parent has "no_display" class, field check will be ignored
					if( (jQuery.trim($(this).val())=='' || ($(this).attr('id').toLowerCase().indexOf('email')!=-1 && !emailCheck($(this).val())) || ($(this).attr('type')=='checkbox' && !$(this).attr('checked')) ||  ($(this).attr('id').lastIndexOf("_confirmation")!=-1 && $(this).val()!= $("#"+$(this).attr('id').replace("_confirmation","")).val()) || verify==false) && ( $(this).parents(".no_display").length==0 ) ){
						show_alert = true;
						msg=msg+"\n"+$(this).attr('title');
						if($(this).attr('type')!='checkbox' && $(this).attr('type')!='radio'){
							if(animate==1){
								if(animate_msg!=1){   
									$(this).effect("highlight", {color:"#FF0000"},1000,function(){});
								}
								else{
									$(this).css("backgroundColor","#FF0000");
									$(this).css("color","#FFFFFF");
								}
							}
						}
						if(($(this).attr('type')=='checkbox' || $(this).attr('type')=='radio') && $(this).attr('checked')!=true){
							var type = $(this).attr('type');
							/*
							var w=$(this).outerWidth();
							var	h=$(this).outerHeight();
							*/
							var w=15;
							var	h=15;
							
							var style = $(this).attr("style");
							var className = $(this).attr("class");
							var title = $(this).attr("title");
							var chk_id = "chk_"+getMicrotime();
							var div = '<div onclick="$(this).replaceWith(\'<input title=&quot;'+$(this).attr('title')+'&quot; id=&quot;'+$(this).attr('id')+'&quot;  checked=&quot;checked&quot; class=&quot;'+className+'&quot; type=&quot;'+type+'&quot;/>\');" class="'+className+'" title="'+title+'" style="background-color:#FF0000;height:'+h+'px;width:'+w+'px"></div>';
							var div = '<div id="'+chk_id+'" class="'+className+'" title="'+title+'" style="background-color:#FF0000;height:'+h+'px;width:'+w+'px"></div>';
							$(this).replaceWith(div);
							$("#"+chk_id).click(function(){
								var chk = '<input checked="checked" type="'+type+'" class="'+className+'" style="'+style+'" title="'+title+'"/>';
								$(this).replaceWith(chk);
							});
						}
						$(this).one("click", function(){
							$(this).css("backgroundColor",field_background_color);
					   		$(this).css("color",field_font_color);
					   		//$(this).val("");
						});
						$(this).one("focus", function(){
							$(this).css("backgroundColor",field_background_color);
					   		$(this).css("color",field_font_color);
					   		//$(this).val("");
						});
						$(this).one("keypress", function(){
					   		$(this).css("backgroundColor",field_background_color);
						   	$(this).css("color",field_font_color);
						   	//$(this).val("");
					   		
						});
					}	
				}
			});
		  
		   if(show_alert){
				if(animate!=1){
					try{
						msg = getTranslateEntry("complete_following_fields")+": "+msg;	
					}
					catch(ex){
						msg = getDictionaryEntry("complete_following_fields")+": "+msg;
					}
					alert(msg);
			   	}
				else{
					if(animate_msg==1){
						try{
							showAlertMessage(getTranslateEntry("complete_required_fields"),"error",1);
						}
						catch(ex){
							showAlertMessage(getDictionaryEntry("complete_required_fields"),"error",1);
						}
					}
				}
				return false;
		   }
		   else{
				return true;
		   }	
		}	
//  ----------------------------------------------------------- ::: - ::: - ::: ------------
//  ----------------------------------------------------------- ::: - ::: - ::: ------------

	function in_array(mat,field){
			var i;
			for(i=0;i<mat.length;i++){
				if(mat[i].toLowerCase()==field.toLowerCase()){
					return true;
				}	
			}
			return false;	
	}	
//  ----------------------------------------------------------- ::: - ::: - ::: ------------
//  ----------------------------------------------------------- ::: - ::: - ::: ------------


    function ark_busquedaAvanzada_cruceros( ) {
      var panel                   = document.getElementById('busquedaAvanzada');
      var avanzada                = document.getElementById('avanzada');
      if ( panel ) {
        if ( panel.style.display == 'none' ) {
          estado                  = 'on';
          panel.style.display     = 'block';
          avanzada.value          = '1';
        }
        else {
          estado                  = 'off';
          panel.style.display     = 'none';
          avanzada.value          = '0';
        }
        var btn                   = document.getElementById('btnBusquedaAvanzada');
        btn.src                   = dir_img_lng + 'boton-busqueda_avanzada-' + estado + '.gif';
        btn.blur();
        $.ajax({
		   async: true,
		   type: "GET",
		   url: dir_inc+"_ajax-cruceros.php",
		   data: "opc=busquedaAvanzada&valor="+estado,
		   success: function(data){
	       }  
		});
      }
    }

//  ----------------------------------------------------------- ::: - ::: - ::: ------------
//  ----------------------------------------------------------- ::: - ::: - ::: ------------
    
	function ark_cambiarFoto_cruceros( tipo, el, id ) { 
    	  
    	  var description = el.find(".picture_description").val();
      	  var total = $("#navegador .pics_box a").length;
      
      	  $("#navegador .pics_box a").each(function(idx){
      		  
	      	  if($(this)[0]==el[0]){
	      		  $(this).attr("class",'off');
	    		  if(idx > 0){
	    			  $(".flechas .anterior").removeClass('disable');
	    			  if(idx < (total-1)){
	    				  $(".flechas .siguiente").removeClass('disable');
		    		  }
	    			  else{
	    				 
	    				  $(".flechas .siguiente").addClass('disable');
		    		  }
	    		  }
	    		  else{
	    			  $(".flechas .anterior").addClass('disable');
	    			  if(total<=1){
    				  	  $(".flechas .anterior").addClass('disable');
    					  $(".flechas .siguiente").addClass('disable');
		    		  }
	    			  else{
	    				  $(".flechas .siguiente").removeClass('disable');
	    			  }
	    		  }
	    	  }
	    	  else{
	    		  $(this).attr("class",'on');
	    	  }
      	  });

      $(".imagen").parent().addAjaxLoader(true);

      $.ajax({
	   async: true,
	   type: "POST",
	   url: dir_inc+"_ajax-cruceros.php",
	   data: "opc=getPictureSrc&t="+tipo+"&id="+id,
	   success: function(data){
    	  var img = new Image();
    	  img.onload = function(){
    		  $("#navegador .description_box").html(description);
    		  $(".imagen #foto").attr("src",data);
    		  $(".imagen").parent().removeAjaxLoader();
    	  };
    	  img.src = data;
	   }
	  });
    }
    
    function ark_cambiarFotoAnterior_cruceros(){
    	$("#navegador .off").prev("a").trigger("click");
    }
    
    function ark_cambiarFotoSiguiente_cruceros(){
    	$("#navegador .off").next("a").trigger("click");
    }

    function ark_actualizarNavegadorImagenes_cruceros(tipo,id,ref){
    	
		 $(".imagen").parent("div").addAjaxLoader(true);
		 $.ajax({
			   async: true,
			   type: "GET",
			   url: dir_inc+"_ajax-cruceros.php",
			   data: "opc=updateImageNavigator&t="+tipo+"&id="+id+"&ref="+ref,
			   success: function(data){
				  $("#navegador").html(data);
				  $(".imagen").parent("div").removeAjaxLoader();
				  $("#navegador .pics_box a:first").trigger("click");
		       }  
		  });
    }
    

  
    
    function ark_actualizarPlano_cruceros(id){
    	
      var src = dir_inc+"_imagen_cruceros.php?t=hpl&id="+id;
      var img = new Image();
	  img.onload = function(){
		  $("#plano").html('<img src="'+src+'" />');
		  
	  };
	  img.src = src;
    }
//  ----------------------------------------------------------- ::: - ::: - ::: ------------
//----------------------------------------------------------- ::: - ::: - ::: ------------

    function checkFinder_cruceros(el,clear_inputs){
		clear_inputs = clear_inputs==undefined?true:clear_inputs;
		var filters = new Array('destino','fecha','salida','compania','buque');
		if(el.val()==''){
			var item_idx=-1;
			$("#buscador select").each(function(idx){
				if($(this).attr("id") == el.attr("id")){
					item_idx = idx;
				}
				if(clear_inputs){
					if(item_idx !=-1 && idx > item_idx){
					  $(this).val("");
					}
				}
			});
		}
		var vars = el.parents("form").serialize()+"&selected="+el.attr("id")+"&selected_value="+el.val();
		el.parents("#buscador").addAjaxLoader(true);
		
		$(filters).each(function(){
			setFilter_cruceros(vars,filters,this);
		});
		
	}
	
	function setFilter_cruceros(vars,filters_array,filter){
		$.ajax({
		   async: true,
		   type: "POST",
		   url: dir_inc+"_ajax-cruceros.php",
		   data: "opc=updateFilter&"+vars+"&filter="+filter,
		   success: function(data){
				$("#"+filter).html(data);
		    	if(filter == filters_array[filters_array.length-1]){
		    		$("#"+filter).parents("#buscador").removeAjaxLoader();
		    	}
		   }
		 });
	}
	
//  ----------------------------------------------------------- ::: - ::: - ::: ------------
//  ----------------------------------------------------------- ::: - ::: - ::: ------------
	function ark_panel_cruceros( id_crucero, id_buque, seccion, id_ciudad ) {
      var data="";
      if ( seccion == 'ciu' ) {
        var pnl           = document.getElementById('itn');
        if ( pnl ) {
          data = 'opc=panel&nombre=' + seccion + '&id_ciudad=' + id_ciudad; 
        }
      }
      else {
    	 
        var paneles       = new Array();
        paneles[0]        = 'itn';
        paneles[1]        = 'det';
        paneles[2]        = 'pub';
        paneles[3]        = 'hab';
        paneles[4]        = 'pln';
        paneles[5]        = 'com';
        paneles[6]        = 'com-buq';
        for ( var i = 0; i < paneles.length; i++ ) {
          var pnl         = document.getElementById( paneles[i] );
          if ( pnl ) {
            if ( paneles[i] == seccion ){
              pnl.src     = dir_img_lng + 'boton_panel-' + paneles[i] + '-on.gif';
            } 
            else{
              pnl.src     = dir_img_lng + 'boton_panel-' + paneles[i] + '-off.gif';
            }  
            pnl.blur();
          }
        }
        data = 'opc=panel&nombre=' + seccion + '&id_crucero=' + id_crucero + '&id_buque=' + id_buque;
      }
      $.ajax({
		   async: true,
		   type: "POST",
		   url: dir_inc+"_ajax-cruceros.php",
		   data: data,
		   success: function(data){
    	  		if($("#contenedor").length > 0){
    	  			$("#contenedor").html(data);
    	  		}
		   }
	 });
    }
//  ----------------------------------------------------------- ::: - ::: - ::: ------------
//----------------------------------------------------------- ::: - ::: - ::: ------------	
    function ark_validarDatos( form ) {

      var error = false;
      var j     = -1;
      var chain = '';

      for ( var i = 0; i < form.elements.length; i++ ) {
        if ( form.elements[i].title != '' && ( form.elements[i].value == '' || ( form.elements[i].type == 'checkbox' && form.elements[i].checked == false ) ) ) {
          if ( j < 0 ) {
            j   = i;
          }
          chain = chain + '- ' + form.elements[i].title + '\n';
          error = true;
        }
      }

      if ( error ) {
        alert( txt_error_campos_vacios + ':\n' + chain );
        form.elements[j].focus();
        return false;
      }
      else {
        return true;
      }
    }
//  ----------------------------------------------------------- ::: - ::: - ::: ------------
//  ----------------------------------------------------------- ::: - ::: - ::: ------------
	function ark_newsletter(){
		if(!document.getElementById('newsletter_inscribirse').checked && !document.getElementById('newsletter_borrarse').checked){
			alert ('Seleccione una opción.');
			return;
		}
		if(!emailCheck(document.getElementById('newsletter_email').value)){
			alert ('Ingrese un email válido');	
			return;
		}
		if( document.getElementById('newsletter_password').value == 'Ingrese su contraseña' || document.getElementById('newsletter_password').value == ''){
			alert('Ingrese contraseña');
			return;
		}
		var email=document.getElementById('newsletter_email').value;
		var password=document.getElementById('newsletter_password').value;
		var opc = null;
		if(document.getElementById('newsletter_inscribirse').checked){
			var opc = 'inscribir';	
		}
		else if(document.getElementById('newsletter_borrarse').checked){
			var opc = 'borrar';
		}
		else{
			return;	
		}

		ark_do( dir_inc + '_ark.php?accion=newsletter&email=' + email + '&password=' + password + '&opc=' + opc);
	}
	
	
//  ----------------------------------------------------------- ::: - ::: - ::: ------------
//  ----------------------------------------------------------- ::: - ::: - ::: ------------
    function ark_busquedaAvanzada( ) {
      var panel                   = document.getElementById('busquedaAvanzada');
      var avanzada                = document.getElementById('avanzada');
      if ( panel ) {
        if ( panel.style.display == 'none' ) {
          estado                  = 'on';
          panel.style.display     = 'block';
          avanzada.value          = '1';
        }
        else {
          estado                  = 'off';
          panel.style.display     = 'none';
          avanzada.value          = '0';
        }
        var btn                   = document.getElementById('btnBusquedaAvanzada');
        btn.src                   = dir_img_lng + 'boton-busqueda_avanzada-' + estado + '.gif';
        btn.blur();
        ark_do( dir_inc + '_ark.php?accion=busquedaAvanzada&valor=' + estado );
      }
    }
	
	function ark_busquedaAvanzadaResort( ) {
      var panel                   = document.getElementById('busquedaAvanzadaResort');
      var avanzada                = document.getElementById('avanzadaResort');
      if ( panel ) {
        if ( panel.style.display == 'none' ) {
          estado                  = 'on';
          panel.style.display     = 'block';
          avanzada.value          = '1';
        }
        else {
          estado                  = 'off';
          panel.style.display     = 'none';
          avanzada.value          = '0';
        }
        var btn                   = document.getElementById('btnBusquedaAvanzadaResort');
        btn.src                   = dir_img_lng + 'boton-busqueda_avanzada-' + estado + '.gif';
        btn.blur();
        ark_do( dir_inc + '_ark.php?accion=busquedaAvanzada&valor=' + estado );
      }
    }



//  ----------------------------------------------------------- ::: - ::: - ::: ------------
//  ----------------------------------------------------------- ::: - ::: - ::: ------------
    function ark_chequearBusqueda( campo ) {
    	
      ark_do( dir_inc + '_ark.php?accion=chequearBusqueda&nombre=' + campo.name + '&valor=' + campo.value );
    }

	function ark_chequearBusquedaResort( campo ) {
	  
      ark_do( dir_inc + '_ark_resorts.php?accion=chequearBusquedaResort&nombre=' + campo.name + '&valor=' + campo.value );
    }


//  ----------------------------------------------------------- ::: - ::: - ::: ------------
//  ----------------------------------------------------------- ::: - ::: - ::: ------------
    function ark_cambiarFoto( tipo, id, indice ) {
      ark_do( dir_inc + '_ark.php?accion=cambiarFoto&tipo=' + tipo + '&id=' + id + '&indice=' + indice );
    }
  
    function ark_cambiarFotoResort( tipo, id, indice ) {
	  ark_do( dir_inc + '_ark_resorts.php?accion=cambiarFoto&tipo=' + tipo + '&id=' + id + '&indice=' + indice );
    }


//  ----------------------------------------------------------- ::: - ::: - ::: ------------
//  ----------------------------------------------------------- ::: - ::: - ::: ------------
    function ark_cambiarHabitacion( id_buque, id_tipo_habitacion ) {
      ark_do( dir_inc + '_ark.php?accion=cambiarHabitacion&id_buque=' + id_buque + '&id_tipo_habitacion=' + id_tipo_habitacion );
    }
	function ark_cambiarHabitacionResort( id_village, id_tipo_habitacion ) {
      ark_do( dir_inc + '_ark_resorts.php?accion=cambiarHabitacion&id_village=' + id_village + '&id_tipo_habitacion=' + id_tipo_habitacion );
    }

//  ----------------------------------------------------------- ::: - ::: - ::: ------------
//  ----------------------------------------------------------- ::: - ::: - ::: ------------
    function ark_cambiarGaleria( id ) {
      ark_do( dir_inc + '_ark.php?accion=cambiarGaleria&id=' + id );
    }
	
	function ark_cambiarGaleriaResort( id ) {
      ark_do( dir_inc + '_ark_resorts.php?accion=cambiarGaleria&id=' + id );
    }



//  ----------------------------------------------------------- ::: - ::: - ::: ------------
//  ----------------------------------------------------------- ::: - ::: - ::: ------------
    function ark_cambiarCodigoInternacional( index ) {
      if ( document.getElementById('telefono01') && codigos ) {
        document.getElementById('telefono01').value  = codigos[index];
      }
    }


//  ----------------------------------------------------------- ::: - ::: - ::: ------------
//  ----------------------------------------------------------- ::: - ::: - ::: ------------
    function ark_chequearPresupuesto( form ) {
      if ( ark_validarDatos( form ) ) {
        if ( !document.getElementById('email').value.match(/\b(^(\S+@).+((\.es)|(\.com)|(\.net)|(\.info)|(\.tv)|(\.biz)|(\.edu)|(\.sk)|(\.tk)|(\.cl)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi) ) {
          alert( txt_error_email_invalido );
          return false;
        }
        else {
          return true;
        }
      }
      else {
        return false;
      }
    }


//  ----------------------------------------------------------- ::: - ::: - ::: ------------
//  ----------------------------------------------------------- ::: - ::: - ::: ------------
    function ark_panel( id_crucero, id_buque, seccion, id_ciudad ) {
      
	  if ( seccion == 'ciu' ) {
        var pnl           = document.getElementById('itn');
        if ( pnl ) {
          ark_do( dir_inc + '_ark.php?accion=panel&nombre=' + seccion + '&id_ciudad=' + id_ciudad  );
        }
      }
      else {
        var paneles       = new Array();
        paneles[0]        = 'itn';
        paneles[1]        = 'det';
        paneles[2]        = 'pub';
        paneles[3]        = 'hab';
        paneles[4]        = 'pln';
        for ( var i = 0; i < paneles.length; i++ ) {
          var pnl         = document.getElementById( paneles[i] );
          if ( pnl ) {
            if ( paneles[i] == seccion )
              pnl.src     = dir_img_lng + 'boton_panel-' + paneles[i] + '-on.gif';
            else
              pnl.src     = dir_img_lng + 'boton_panel-' + paneles[i] + '-off.gif';
            pnl.blur();
          }
        }
        ark_do( dir_inc + '_ark.php?accion=panel&nombre=' + seccion + '&id_crucero=' + id_crucero + '&id_buque=' + id_buque );
      }
    }
	
	function ark_panel_resort( id_paquete, id_village, seccion, id_ciudad ) {
      if ( seccion == 'ciu' ) {
        var pnl           = document.getElementById('itn');
        if ( pnl ) {
          ark_do( dir_inc + '_ark_resorts.php?accion=panel&nombre=' + seccion + '&id_ciudad=' + id_ciudad  );
        }
      }
      else {
        var paneles       = new Array();
        paneles[0]        = 'det';
        paneles[1]        = 'pub';
        paneles[2]        = 'hab';
        for ( var i = 0; i < paneles.length; i++ ) {
          var pnl         = document.getElementById( paneles[i] );
          if ( pnl ) {
            if ( paneles[i] == seccion )
              pnl.src     = dir_img_lng + 'boton_panel-' + paneles[i] + (paneles[i]=='det' || paneles[i]=='hab' ?'Res':'') + '-on.gif';
            else
              pnl.src     = dir_img_lng + 'boton_panel-' + paneles[i] + (paneles[i]=='det' || paneles[i]=='hab' ?'Res':'') + '-off.gif';
            pnl.blur();
          }
        }
        ark_do( dir_inc + '_ark_resorts.php?accion=panel&nombre=' + seccion + '&id_paquete=' + id_paquete + '&id_village=' + id_village );
      }
    }
//  ----------------------------------------------------------- ::: - ::: - ::: ------------
//  ----------------------------------------------------------- ::: - ::: - ::: ------------
    function ark_marcarFecha( fecha, id_crucero, nombre ) {
      if ( id_crucero ) {
        document.location.href                        = dir_inc.replace('inc/','') + 'crucero/' + id_crucero + '/' + nombre + '/' + fecha + '#presupuesto';
      }
      else if ( document.getElementById('fecha_salida') ) {
        document.getElementById('fecha_salida').value = fecha;
        document.location.href                        = '#presupuesto';
      }
    }
	
	function ark_marcarFechaResort( fecha, id_resort, nombre ) {
      if ( id_resort ) {
        document.location.href                        = dir_inc.replace('inc/','') + 'resort/' + id_resort + '/' + nombre + '/' + fecha + '#presupuesto';
      }
      else if ( document.getElementById('fecha_salida') ) {
        document.getElementById('fecha_salida').value = fecha;
        document.location.href                        = '#presupuesto';
      }
    }


//  --------------------------------------------------------------------------- ::: - ::: - ::: -------
//  --------------------------------------------------------------------------- ::: - ::: - ::: -------
/*
    SWFObject v1.4.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
    SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
    http://www.opensource.org/licenses/mit-license.php
    SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for legal reasons.
*/
    if(typeof deconcept=="undefined"){var deconcept=new Object();}
    if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
    if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
    deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){return;}
    this.DETECT_KEY=_b?_b:"detectflash";
    this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
    this.params=new Object();
    this.variables=new Object();
    this.attributes=new Array();
    if(_1){this.setAttribute("swf",_1);}
    if(id){this.setAttribute("id",id);}
    if(w){this.setAttribute("width",w);}
    if(h){this.setAttribute("height",h);}
    if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
    this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
    if(c){this.addParam("bgcolor",c);}
    var q=_8?_8:"high";
    this.addParam("quality",q);
    this.setAttribute("useExpressInstall",_7);
    this.setAttribute("doExpressInstall",false);
    var _d=(_9)?_9:window.location;
    this.setAttribute("xiRedirectUrl",_d);
    this.setAttribute("redirectUrl","");
    if(_a){this.setAttribute("redirectUrl",_a);}};
    deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
    this.attributes[_e]=_f;
    },getAttribute:function(_10){
    return this.attributes[_10];
    },addParam:function(_11,_12){
    this.params[_11]=_12;
    },getParams:function(){
    return this.params;
    },addVariable:function(_13,_14){
    this.variables[_13]=_14;
    },getVariable:function(_15){
    return this.variables[_15];
    },getVariables:function(){
    return this.variables;
    },getVariablePairs:function(){
    var _16=new Array();
    var key;
    var _18=this.getVariables();
    for(key in _18){_16.push(key+"="+_18[key]);}
    return _16;},getSWFHTML:function(){var _19="";
    if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
    if(this.getAttribute("doExpressInstall")){
    this.addVariable("MMplayerType","PlugIn");}
    _19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
    _19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
    var _1a=this.getParams();
    for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
    var _1c=this.getVariablePairs().join("&");
    if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";
    }else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
    _19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
    _19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
    var _1d=this.getParams();
    for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
    var _1f=this.getVariablePairs().join("&");
    if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}
    return _19;
    },write:function(_20){
    if(this.getAttribute("useExpressInstall")){
    var _21=new deconcept.PlayerVersion([6,0,65]);
    if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
    this.setAttribute("doExpressInstall",true);
    this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
    document.title=document.title.slice(0,47)+" - Flash Player Installation";
    this.addVariable("MMdoctitle",document.title);}}
    if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
    var n=(typeof _20=="string")?document.getElementById(_20):_20;
    n.innerHTML=this.getSWFHTML();return true;
    }else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
    return false;}};
    deconcept.SWFObjectUtil.getPlayerVersion=function(){
    var _23=new deconcept.PlayerVersion([0,0,0]);
    if(navigator.plugins&&navigator.mimeTypes.length){
    var x=navigator.plugins["Shockwave Flash"];
    if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
    }else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}
    catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
    _23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}
    catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}
    catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}
    return _23;};
    deconcept.PlayerVersion=function(_27){
    this.major=_27[0]!=null?parseInt(_27[0]):0;
    this.minor=_27[1]!=null?parseInt(_27[1]):0;
    this.rev=_27[2]!=null?parseInt(_27[2]):0;
    };
    deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
    if(this.major<fv.major){return false;}
    if(this.major>fv.major){return true;}
    if(this.minor<fv.minor){return false;}
    if(this.minor>fv.minor){return true;}
    if(this.rev<fv.rev){
    return false;
    }return true;};
    deconcept.util={getRequestParameter:function(_29){
    var q=document.location.search||document.location.hash;
    if(q){var _2b=q.substring(1).split("&");
    for(var i=0;i<_2b.length;i++){
    if(_2b[i].substring(0,_2b[i].indexOf("="))==_29){
    return _2b[i].substring((_2b[i].indexOf("=")+1));}}}
    return "";}};
    deconcept.SWFObjectUtil.cleanupSWFs=function(){if(window.opera||!document.all){return;}
    var _2d=document.getElementsByTagName("OBJECT");
    for(var i=0;i<_2d.length;i++){_2d[i].style.display="none";for(var x in _2d[i]){
    if(typeof _2d[i][x]=="function"){_2d[i][x]=function(){};}}}};
    deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};
    __flash_savedUnloadHandler=function(){};
    if(typeof window.onunload=="function"){
    var _30=window.onunload;
    window.onunload=function(){
    deconcept.SWFObjectUtil.cleanupSWFs();_30();};
    }else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}};
    if(typeof window.onbeforeunload=="function"){
    var oldBeforeUnload=window.onbeforeunload;
    window.onbeforeunload=function(){
    deconcept.SWFObjectUtil.prepUnload();
    oldBeforeUnload();};
    }else{window.onbeforeunload=deconcept.SWFObjectUtil.prepUnload;}
    if(Array.prototype.push==null){
    Array.prototype.push=function(_31){
    this[this.length]=_31;
    return this.length;};}
    var getQueryParamValue=deconcept.util.getRequestParameter;
    var FlashObject=deconcept.SWFObject;
    var SWFObject=deconcept.SWFObject;
