			function actuar(peso, anchura, altura)	{
				this.peso.value = peso;
				this.ancho.value = anchura;
				this.alto.value = altura;
			}

			function ini()	{
				document.forms.formu.actualizar = actuar;
				//window.frames.ver.location.href = "gwPrevisor.php";
				document.forms.formu.actualizar(0, 0, 0);

			}

			function validar(f)	{
				enviar = /\.(gif|jpg|png|ico|bmp)$/i.test(f.archivo.value);
				if (!enviar)	alert("seleccione imagen");
				return enviar;
			}

			function limpiar(nomF)	{
				document.forms.formu.actualizar(0, 0, 0);
				f = document.getElementById(nomF);
				nuevoFile = document.createElement("input");
				nuevoFile.id = f.id;
				nuevoFile.type = "file";
				nuevoFile.name = nomF;
				nuevoFile.value = "";
				nuevoFile.onchange = f.onchange;
				nodoPadre = f.parentNode;
				nodoSiguiente = f.nextSibling;
				nodoPadre.removeChild(f);
				(nodoSiguiente == null) ? nodoPadre.appendChild(nuevoFile):
					nodoPadre.insertBefore(nuevoFile, nodoSiguiente);
			}

			function checkear(f, numid)	{
				function no_prever() {
					alert("El fichero seleccionado no es válido...");
					limpiar('archivo' + numid);
				}
				function prever() {
					var campos = new Array("maxpeso", "maxalto", "maxancho");
					for (i = 0, total = campos.length; i < total; i ++)
						f.form[campos[i]].disabled = false;
					actionActual = f.form.action;
					targetActual = f.form.target;
					f.form.action = "gwPrevisor.php?qq=webmaster.gif&num=" + numid;
					f.form.target = 'ver' + numid;
					f.form.submit();
					for (i = 0, total = campos.length; i < total; i ++)
						f.form[campos[i]].disabled = true;
					f.form.action = actionActual;
					f.form.target = targetActual;
				}

				(/\.(gif|jpg|png|ico|bmp)$/i.test(f.value)) ? prever() : no_prever();
			}

			function datosImagen(peso, ancho, alto, error)	{
				function mostrar_error()	{
					enviar = false;					
					mensaje = "Ha habido un error (error nº " + error + "):";
					if (error % 2 == 1) // tipo incorrecto
						mensaje += "\nel fichero no es válido";
					error = parseInt(error / 2);
					if (error % 2 == 1) // excede en peso
						mensaje += "\nla imagen excede en peso (" + peso + ").";
					error = parseInt(error / 2);
					if (error % 2 == 1) // excede en anchura
						mensaje += "\nla imagen excede en anchura (" + ancho + ").";
					error = parseInt(error / 2);
					if (error % 2 == 1) // excede en altura
						mensaje += "\nla imagen excede en altura (" + alto + ").";
					error = parseInt(error / 2);
					alert (mensaje);
					limpiar();
				}
				if (error == 0)
					document.forms.formu.actualizar(peso, ancho, alto);
				else
					mostrar_error();
			}
