
<!--
$(document).ready(function() 
	{
		$('.horizontal_scroller').SetScroller({	
			velocity: 	 60,
			direction: 	 'horizontal',
			startfrom: 	 'right',
			loop:		 'infinite',
			movetype: 	 'linear',
			onmouseover: 'pause',
			onmouseout:  'play',
			onstartup: 	 'play',
			cursor: 	 'pointer'
		});
		
		$('#no_mouse_events').ResetScroller({	onmouseover: 'play', onmouseout: 'play'   });
		$('#scrollercontrol').ResetScroller({	velocity: 85, startfrom: 'left'   });

		$('#play_scrollercontrol').mouseover(function(){   $('#scrollercontrol').PlayScroller();   });
		$('#stop_scrollercontrol').mouseover(function(){   $('#scrollercontrol').PauseScroller();  });		

		$('.vertical_scroller').SetScroller({	velocity: 50, direction: 'vertical'  });		
	
		$('#soccer_ball_container').ResetScroller({	 velocity: 85, movetype: 'pingpong', onmouseover: 'play', onmouseout: 'play'  });

		$('#soccer_ball').bind('bouncer', function(){
		
		$(this).animate({top:42}, 500, 'linear').animate({top:5}, 500, 'linear', function(){$('#soccer_ball').trigger('bouncer');});			
		}).trigger('bouncer');


		$("#servicio").change(function(){
			if ($(this).val() == 0)
				{
					$("#box_desde").attr('disabled','disabled');
					$("#box_hasta").attr('disabled','disabled');
					$("#box_boto").attr('disabled','disabled');
				}
			else
				{	
					$.post("carga_desde.asp",{ servicio:$(this).val() },function(data){$("#box_desde").html(data);})
					$("#box_desde").attr('disabled','');
					$("#box_desde").focus();
				}

		});

		$("#box_desde").change(function(){
			if ($(this).val() == 0)
				{
					$("#box_hasta").attr('disabled','disabled');
					$("#box_boto").attr('disabled','disabled');
				}
			else
				{	
					if ($("#servicio").val() == 2)
						{
							$("#box_boto").attr('disabled','');
						}
					else
						{
							$.post("carga_hasta.asp",{ id:$(this).val(), servicio:$("#servicio").val() },function(data){$("#box_hasta").html(data);})
							$("#box_hasta").attr('disabled','');
							$("#box_hasta").focus();
						}
				}

		});

		$("#box_hasta").change(function(){
			if ($(this).val() == 0)
				{
					$("#box_boto").attr('disabled','disabled');
				}
			else
				{
					$("#box_boto").attr('disabled','');
				}
		});

		$("#box_boto").click(function(){
			if ($("#servicio").val() == 1)
				{
					desde=$("#box_desde").val().split("*");
					hasta=$("#box_hasta").val().split("*");
					if (desde[1]==1 && hasta[1]==2)
						{
							origen=desde[0];
							destino=hasta[0];
						}
					else
						{	
							origen=hasta[0];
							destino=desde[0];
						}
					window.open('pdf.asp?origen='+ origen+'&destino='+destino);
				}
			else if ($("#servicio").val() == 2)
				{
					location='corresponsales-agentes-terrestre-nacional.asp?deleg='+ $("#box_desde").val();
				}
			else if ($("#servicio").val() == 3)
				{
					location='corresponsales-agentes-aereo-maritimo.asp?origen='+ $("#box_desde").val()+'&destino='+$("#box_hasta").val()+'#result';
				}
		});


	});
//-->

