	function completarCamposParaTest()
	{
			document.getElementById("nombre").value="TEST";
			document.getElementById("apellido").value="DESARROLLO";
			document.getElementById("provincia").value="Buenos Aires";
			document.getElementById("ciudad").value="La Plata";
			document.getElementById("telParticular").value="00000000";
			document.getElementById("email").value="dev@quanbit.com";
			document.getElementById("emailConfirmacion").value="dev@quanbit.com";
			document.getElementById("comentarios").value="test-ignorar";
	}
	
	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){
			var precioDeListaValorGlobal=768;
			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("112").value = precioDeListaValorGlobal + "^" + precioDeListaValorGlobal + "^" + "Valor Global "+ "^" + "112";
	
	}
		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) &&
				(document.getElementById('herramienta').value.indexOf("--Seleccione--") != -1))
				alert("Debe seleccionar un curso, programa o herramienta.");
			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 ($("email").value == $("emailConfirmacion").value)
				{
					document.getElementById('sent').value = unBoton.name;
					document.getElementById('formulario').submit();
				}
				else
					showErrorMessage($("emailConfirmacion"), "El email ingresado y su confirmacion no coinciden.");
			}
		}
		window.addEvent('domready', function() {updatePaymentOptions()});
		cambiarPrecioPrograma(document.getElementById("pago3"));
