	//--------------------------------------------------
	//Avisos fancybox
	//--------------------------------------------------
	function avisoCarrito_1(){}
	function avisoCarrito_2(){}
	function avisoCarrito_3(){}




	//--------------------------------------------------
	//funcion swit capas
	//--------------------------------------------------
	function switchSection(vs_layerShow, vs_layerHide)
	{
		var lu_layerShow = document.getElementById(vs_layerShow);
		var lu_layerHide = document.getElementById(vs_layerHide);
		if (lu_layerShow && lu_layerHide)
		{
			lu_layerHide.style.display = 'none';
			lu_layerShow.style.display = 'block';
		}
	}
	
	
	
	//--------------------------------------------------
	//funcion cambia el precio
	//--------------------------------------------------
	function change_precio_noutiizada (producto, n){
		 
		 var txt_tamanyo = document.forms[n].tamanyo.value;
		 if (txt_tamanyo == '') precio = 0;
		 else {
			 txt_tamanyo = txt_tamanyo.split("_"); 
			 precio = txt_tamanyo[1];
			 idobjetototal=String('span_precio'+ n);
		 }
		 document.all(idobjetototal).innerHTML = precio; 
		 document.forms[n].preuProducto.value = precio; 
		 
		 
	 } 	
	 

	//--------------------------------------------------
	//Cambiamos el precio 
	//-------------------------------------------------- 

	function change_precio(nombre, n){
		 //alert(nombre + 'n ' + n);
		 var d5,d6;
		 d5 = document.getElementById('tamanyo_' + n).value;
		 var txt_tamanyo = d5;

		 if (txt_tamanyo == '') precio = 0;
		 else {
			 txt_tamanyo = txt_tamanyo.split("_"); 
			 precio = txt_tamanyo[1];
			 medida = txt_tamanyo[0];
			 idobjetototal=String('span_precio'+ n);
			 
		 }
		
		 document.getElementById(idobjetototal).innerHTML = precio;
		 document.getElementById('preuProducto_' + n).value = precio;
		 document.getElementById('nomProducto_' + n).value = nombre + ' - Medida:' + medida;
		 document.getElementById('medProducto_' + n).value = 'Medida:' + medida;
		 
	 } 	
	
	
	
	//--------------------------------------------------
	//Cambiamos el precio 
	//-------------------------------------------------- 

	function change_precio_chexbox(nombre, n){
		 //alert(nombre + ' nombre ' + n);
		 var d5,d6;
		 d5 = document.getElementById('tamanyo_' + n).value;
		 // alert(d5);
		 var txt_tamanyo = d5;

		 if (txt_tamanyo == '') precio = 0;
		 else {
			 txt_tamanyo = txt_tamanyo.split("_"); 
			 precio = txt_tamanyo[1];
			 medida = txt_tamanyo[0];
			 //idobjetototal=String('span_precio'+ n);
			 
		 }
		
		 //document.getElementById(idobjetototal).innerHTML = precio;
		 document.getElementById('preuProducto_' + n).value = precio;
		 document.getElementById('nomProducto_' + n).value = nombre + ' - Medida:' + medida;
		 document.getElementById('medProducto_' + n).value = 'Medida:' + medida;
		 
	 } 	
	
	
	//--------------------------------------------------
	//Enviar Formulario articulos (eliminada)
	//-------------------------------------------------- 
		 
	 function submitRepasar (n){
		//alert('d');
		var d3, d4;
		d3 = document.getElementById('tamanyo_' + n);
		d4 = document.getElementById('comprar_' + n);
		//alert (d3.value);
		if (d3.value == '' ){
			alert ('Deberá seleccionar una medida.');
		}
		else
		{
		
		d4.submit();
		}

	}			   


	//--------------------------------------------------
	//Enviar Formulario Actualizar articulo de carrito
	//-------------------------------------------------- 
		 
	 function submitActualizar (n){
		var d3, d4;
		d3 = document.getElementById('tamanyo_' + n);
		d4 = document.getElementById('actualizar_' + n);
		if (d3.value == '' ){
			alert ('Deberá seleccionar una medida.');
		}
		else
		{
		d4.submit();
		}

	}	 
	

	$("#formCuenta").validate({
	
	 submitHandler: function(form) {
		 
	   form.submit();
	 }
	});

