		function setearFechaCurso($idCheckBox, $fecha)
		{
			$check = document.getElementById($idCheckBox);
			
			$posicion = $check.value.indexOf(" [");
			$adicional = " [" + $fecha + "]";
			
			if ($posicion != -1)
				$check.value = $check.value.substring(0, $posicion) + $adicional;
			else
				$check.value = $check.value + $adicional;
		}
		
		
		function cambiarPrecioPrograma(object){
		document.getElementById("programaInversoresIniciales").value = object.value + "^" + object.value + "^" + "Programa para Inversores Iniciales"+ "^" + "109";
		document.getElementById("programaAvanzado").value = object.value + "^" + object.value + "^" + "Programa Avanzado "+ "^" + "139";
	    /*document.getElementById("programaTrading").value = object.value + "^" + object.value + "^" + "Programa de Trading "+ "^" + "114";
	    document.getElementById("programaResearch").value = object.value + "^" + object.value + "^" + "Programa de Research "+ "^" + "113";*/		
	}
		var slide = new Fx.Slide('cardPayBox', {duration: 200});
		var slide2 = new Fx.Slide('otherPayBox', {duration: 200});
	
		function updatePaymentOptions()
		{
			if ($('pago_opcion_1').checked)
			{
				slide.slideIn();
				slide2.slideOut();
				$('medio_pago_1').checked = true;
				compras = document.getElementsByName('compra');
			}
			else
			{
				compras = document.getElementsByName('compra');
				slide.slideOut();
				slide2.slideIn();
				$('medio_pago_3').checked = true;
			}
		}
	
		function checkFormulario(unBoton)
		{
	
			if ((unBoton.name == "enviar") &&
				(document.getElementById('cursosADistancia').value.indexOf("--Seleccione--") != -1) &&
				(document.getElementById('programaOnline').value.indexOf("--Seleccione--") != -1))
				alert("Debe seleccionar un curso o programa.");
			else if (erpValidateFirstName($("nombre"), "Nombre") && erpValidateLastName($("apellido"), "Apellido") &&
				     erpValidateProvince($("provincia"), "Estado/Provincia") && erpValidateCity($("ciudad"), "Ciudad") &&
				     erpValidateSinglePhoneNumber($("telParticular"), "Tel. Particular", true) &&
				     erpValidateSinglePhoneNumber($("telCelular"), "Tel. Celular", false) &&
				     erpValidateSinglePhoneNumber($("telTrabajo"), "Tel. Trabajo", false) &&
				     erpValidateEmail($("email"), "E-Mail") && erpValidateEmail($("emailConfirmacion"), "Confirmacion de Mail"))
			{
				if (validarCoincidenciaEmails($("email").value, $("emailConfirmacion").value))
				{
					document.getElementById('sent').value = unBoton.name;
					document.getElementById('formulario').submit();
				}
				else
					mostrarError($("emailConfirmacion"), "El email ingresado y su confirmacion no coinciden.");
			}
		}
		
		window.addEvent('domready', function() {updatePaymentOptions()});
		cambiarPrecioPrograma(document.getElementById("pago3"));	