//precarga

 

brillo2=new Image(48, 38);
brillo2.src="images/brillo2.png";

brillo8=new Image(48, 38);
brillo8.src="images/brillo8.gif";

flag_brillo2=false, flag_brillo8=false;

startList = function() 
	{
	precarga();
	} 

window.onload = startList;

function precarga()
	{
	if (brillo2.complete) flag_brillo2=true; 
	if (brillo8.complete) flag_brillo8=true; 

	if (flag_brillo2 && flag_brillo8)
		{

		brillo2.src="images/brillo2.png";
		brillo8.src="images/brillo8.gif";
		
		tiempo=1;
		clearTimeout(tiempo); 
		} 
	else tiempo=setTimeout('precarga()',800); 

	}










	function validar( campo )
	{
		valido = false;
		if( campo.length != 0 )
		{
			for( var i = 0; i < campo.length; i++ )
				if( campo.charAt(i) != ' ' && campo.charAt(i) != '\n' )
					valido = true;
		}
		return valido;
	}
	function comprobar()
	{
		id = document.loginusuario.login.value;
		pwd = document.loginusuario.passwd.value;
		if( validar( id ) )
		{
			if( validar( pwd ) )
				document.loginusuario.submit();
			else
			{
				window.alert("Please, introduce your password       ");
				document.loginusuario.reset();
			}
		}
		else
		{
			window.alert("Please, introduce your user");
			document.loginusuario.reset();
		}
	}

	function comprobar2()
	{
		id = document.lista.ciudad_id.value;

		if( id==0 )
		{
			window.alert("Please, choose a town ");
			document.lista.reset();
		}
		else
		{
			document.lista.submit();
		}
	}








	function nueva(id) 
		{ 
		

		window.open('ventana.php?id=' + id, 'Sizewindow', 'top=100, left=200, width=600,height=575')
		} 


	function reg()
		{

		todobien=true;
		
		var checkOK = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZÁÉÍÓÚ" + "abcdefghijklmnñopqrstuvwxyzáéíóú" + "0123456789_-";
  		var checkStr = document.registro.nick.value;
  		var allValid = true; 
  		for (i = 0; i < checkStr.length; i++) 
			{
    			ch = checkStr.charAt(i); 
    			for (j = 0; j < checkOK.length; j++)
      				if (ch == checkOK.charAt(j))
        				break;
    			if (j == checkOK.length) 
				{ 
      				allValid = false; 
      				break; 
    				}
  			}

		if (!allValid) 
			{ 
    			alert("Character are not valid in the nick section"); 
    			document.registro.nick.focus(); 
			todobien=false;
    			return (false); 
 			} 

		if (document.registro.passwd.value.length < 6) 
			{
   			alert(" the Password section must have least 6 characters.");
    			document.registro.passwd.focus();
			todobien=false;
    			return (false);
	  		}
		
		var checkOK = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZÁÉÍÓÚ" + "abcdefghijklmnñopqrstuvwxyzáéíóú" + "0123456789_";
  		var checkStr = document.registro.passwd.value;
  		var allValid = true; 
  		for (i = 0; i < checkStr.length; i++) 
			{
    			ch = checkStr.charAt(i); 
    			for (j = 0; j < checkOK.length; j++)
      				if (ch == checkOK.charAt(j))
        				break;
    			if (j == checkOK.length) 
				{ 
      				allValid = false; 
      				break; 
    				}
  			}
		if (!allValid) 
			{ 
    			alert("Character are not valid in the Password section."); 
    			document.registro.passwd.focus(); 
			document.registro.passwd.value="";
			document.registro.passwd2.value="";
			todobien=false;
    			return (false); 
 			} 

		clave1 = document.registro.passwd.value;
		clave2 = document.registro.passwd2.value;
	
		if (clave1 != clave2)
			{
			alert("The  passwords are not the same ")
			document.registro.passwd.value="";
			document.registro.passwd2.value="";
			todobien=false;
			return (false); 
			}

		

		var checkOK = "0123456789"; 
 	 	var checkStr = document.registro.tlf1.value; 
  		var allValid = true; 
  		var decPoints = 0; 
  		var allNum = ""; 
  		for (i = 0; i < checkStr.length; i++) 
			{ 
    			ch = checkStr.charAt(i); 
    			for (j = 0; j < checkOK.length; j++) 
      				if (ch == checkOK.charAt(j))
        				break; 
    			if (j == checkOK.length) 
				{ 
      				allValid = false; 
      				break; 
    				} 
    			allNum += ch; 
  			} 

  		if (!allValid) 
			{ 
    			alert("Write only digits in this Phone 1º section");
    			document.registro.tlf1.focus(); 
    			return (false); 
			todobien=false;
  			} 

 	 	var checkStr = document.registro.tlf2.value; 
  		var allValid = true; 
  		var decPoints = 0; 
  		var allNum = ""; 
  		for (i = 0; i < checkStr.length; i++) 
			{ 
    			ch = checkStr.charAt(i); 
    			for (j = 0; j < checkOK.length; j++) 
      				if (ch == checkOK.charAt(j))
        				break; 
    			if (j == checkOK.length) 
				{ 
      				allValid = false; 
      				break; 
    				} 
    			allNum += ch; 
  			} 

  		if (!allValid) 
			{ 
    			alert("Write only digits in this Phone 2º section");
    			document.registro.tlf2.focus(); 
    			return (false); 
			todobien=false;
  			} 

		
		
		ni = document.registro.nick.value;
		em = document.registro.mail.value;
		t1 = document.registro.tlf1.value;
		t2 = document.registro.tlf2.value;
		ch = document.registro.acepto.checked;

		if (ch == false)
			{
			alert("You must accept the privacy policy  in order to continue ");
			todobien=false;
			}
		
		if( validar( em )  )
			{
			//alert("no hay mail");
			if(document.registro.mail.value.search(/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/ig))
				{
   	    			alert("Incorrect e-mail address, you have to write it this way: name@server.domain      ");
	       		 	document.registro.mail.select();
       			 	document.registro.mail.focus();
				todobien=false;
			       	return (false); 
    				}
			}

		


		if( validar( ni ) )
			{
			if( ( validar( em ) || validar(t1) || validar(t2) ) && todobien)
				document.registro.submit();
			else
				{
				if (ch==true)
					{
			window.alert("You have to introduce at least one of these three items: Email, phone 1, phone 2");
				//document.registro.reset();
					}
				}
			}
		else
			{
			window.alert("introduce a nick .");
			document.registro.reset();
			}		


		}


function aviso(ruta) 
		{ 
		
		var id = ruta + 'avisolegal.php';
		
		window.open(id, 'Sizewindow', 'top=100, left=200, width=600,height=475, scrollbars=YES' )
		} 


function contactar(ruta) 
		{ 
		
		var id = ruta + 'contactar.php';
		
		window.open(id, 'Sizewindow', 'top=200, left=300, width=300, height=200, scrollbars=no, menubar=no, location=no, resizable=no, toolbar=no, directories=no, status=no' )
		}


function combo()
{
   		
	var indice=document.forms.form1.menu1.value;
	
	
	var pagina="usuario.php?sw=ac&ind=";	

	
	window.location.href=pagina + indice;	


 }  




var supportsKeys = false

function calcCharLeft(f) {
		lenUSig = f.lenSSig.value
		maxLength = 200 - f.lenSysSig.value - lenUSig
        if (f.msgText.value.length > maxLength) {
	        f.msgText.value = f.msgText.value.substring(0,maxLength)
		    charleft = 0
        } else {
			charleft = maxLength - f.msgText.value.length
		}

        f.msgCL.value = charleft
}

function textKey(f) {
	supportsKeys = true
	calcCharLeft(f)
}


function comprobar3()
	{
		id = document.form1.menu1.value;
		id2 = document.form1.menu2.value;
		sw=true;

		if( id==0 )
		{
			sw=false;
			window.alert("please, select a province ");
			document.form1.reset();
		}
		else 
			{
		
			if( id2==0 )
				{
				sw=false;
				window.alert("please, select a town");
				document.form1.reset();
				}
			}
		
		var checkOK = "0123456789.";
		var checkOK2 = "0123456789";
		var checkOK3 = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZÁÉÍÓÚ" + "abcdefghijklmnñopqrstuvwxyzáéíóú" + "0123456789ºª ";	
		var checkStr = document.form1.preven.value; 
  		var allValid = true; 
  		var decPoints = 0; 
  		var allNum = ""; 
  		for (i = 0; i < checkStr.length; i++) 
			{ 
    			ch = checkStr.charAt(i); 
    			for (j = 0; j < checkOK.length; j++) 
      				if (ch == checkOK.charAt(j))
        				break; 
    			if (j == checkOK.length) 
				{ 
      				allValid = false; 
      				break; 
    				} 
    			allNum += ch; 
  			} 

  		if (!allValid) 
			{ 
    			alert("Write only digits in \"sale price \" \n (use the point (.) if you want to put decimals )");
    			document.form1.preven.focus(); 
    			return (false); 
			sw=false;
  			} 
		
		var checkStr = document.form1.prealq.value; 
  		var allValid = true; 
  		var decPoints = 0; 
  		var allNum = ""; 
  		for (i = 0; i < checkStr.length; i++) 
			{ 
    			ch = checkStr.charAt(i); 
    			for (j = 0; j < checkOK.length; j++) 
      				if (ch == checkOK.charAt(j))
        				break; 
    			if (j == checkOK.length) 
				{ 
      				allValid = false; 
      				break; 
    				} 
    			allNum += ch; 
  			} 

  		if (!allValid) 
			{ 
    			alert("Write only digits in \"rental price \" \n (use the point (.) if you want to put decimals )");
    			document.form1.prealq.focus(); 
    			return (false); 
			sw=false;
  			} 
		
		var checkStr = document.form1.met.value; 
  		var allValid = true; 
  		var decPoints = 0; 
  		var allNum = ""; 
  		for (i = 0; i < checkStr.length; i++) 
			{ 
    			ch = checkStr.charAt(i); 
    			for (j = 0; j < checkOK.length; j++) 
      				if (ch == checkOK.charAt(j))
        				break; 
    			if (j == checkOK2.length) 
				{ 
      				allValid = false; 
      				break; 
    				} 
    			allNum += ch; 
  			} 

  		if (!allValid) 
			{ 
    			alert("Write only digits in \"built area  \" \n (use the point (.) if you want to put decimals )");
    			document.form1.met.focus(); 
    			return (false); 
			sw=false;
  			} 

		var checkStr = document.form1.n_dor.value; 
  		var allValid = true; 
  		var decPoints = 0; 
  		var allNum = ""; 
  		for (i = 0; i < checkStr.length; i++) 
			{ 
    			ch = checkStr.charAt(i); 
    			for (j = 0; j < checkOK2.length; j++) 
      				if (ch == checkOK2.charAt(j))
        				break; 
    			if (j == checkOK2.length) 
				{ 
      				allValid = false; 
      				break; 
    				} 
    			allNum += ch; 
  			} 

  		if (!allValid) 
			{ 
    			alert("Write only digits in \"number of  bedrooms   \" ");
    			document.form1.n_dor.focus(); 
    			return (false); 
			sw=false;
  			} 
		
		var checkStr = document.form1.n_ban.value; 
  		var allValid = true; 
  		var decPoints = 0; 
  		var allNum = ""; 
  		for (i = 0; i < checkStr.length; i++) 
			{ 
    			ch = checkStr.charAt(i); 
    			for (j = 0; j < checkOK2.length; j++) 
      				if (ch == checkOK2.charAt(j))
        				break; 
    			if (j == checkOK2.length) 
				{ 
      				allValid = false; 
      				break; 
    				} 
    			allNum += ch; 
  			} 

  		if (!allValid) 
			{ 
    			alert("Write only digits in \"number of  bathrooms   \"  ");
    			document.form1.n_ban.focus(); 
    			return (false); 
			sw=false;
  			} 

		var checkStr = document.form1.altu.value; 
  		var allValid = true; 
  		var decPoints = 0; 
  		var allNum = ""; 
  		for (i = 0; i < checkStr.length; i++) 
			{ 
    			ch = checkStr.charAt(i); 
    			for (j = 0; j < checkOK3.length; j++) 
      				if (ch == checkOK3.charAt(j))
        				break; 
    			if (j == checkOK3.length) 
				{ 
      				allValid = false; 
      				break; 
    				} 
    			allNum += ch; 
  			} 

  		if (!allValid) 
			{ 
    			alert("You have introduced an incorrect carácter in the section  \"floor\" ");
    			document.form1.altu.focus(); 
    			return (false); 
			sw=false;
  			} 

		ch = document.form1.acept.checked;

		if (ch == false)
			{
			alert("You must accept the privacy policy  in order to continue ");
			sw=false;
			}


		if (sw==true)
		{
			document.form1.submit();
		}
	}

var commsupportsKeys = false;


function commcalcCharLeft(f) 
	{
		commlenUSig = f.commlenSSig.value
		maxLength = 200 - f.commlenSysSig.value - commlenUSig
	
        if (f.commmsgText.value.length > maxLength) {
	        f.commmsgText.value = f.commmsgText.value.substring(0,maxLength)
		    charleft = 0
        } else {
			charleft = maxLength - f.commmsgText.value.length
		}

        f.commmsgCL.value = charleft

}

function commtextKey(f) {
	
	commsupportsKeys = true
	commcalcCharLeft(f)
}


//******************************************************************************************************************
// funcion que comprueba la actualizacion del perfil de un usuario.
//******************************************************************************************************************
function comprobar4()
		{

		todobien=true;
		
		
		var checkOK = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZÁÉÍÓÚ" + "abcdefghijklmnñopqrstuvwxyzáéíóú" + "0123456789_";
  		var checkStr = document.perfil.passwd.value;
  		var allValid = true; 
  		for (i = 0; i < checkStr.length; i++) 
			{
    			ch = checkStr.charAt(i); 
    			for (j = 0; j < checkOK.length; j++)
      				if (ch == checkOK.charAt(j))
        				break;
    			if (j == checkOK.length) 
				{ 
      				allValid = false; 
      				break; 
    				}
  			}
		if (!allValid) 
			{ 
    			alert("You have introduced an incorrect carácter in the section \"actual password \"."); 
    			document.perfil.passwd.focus(); 
			document.perfil.passwd.value="";
			todobien=false;
    			return (false); 
 			} 

		


  		var checkStr = document.perfil.newpasswd.value;
  		var allValid = true; 
  		for (i = 0; i < checkStr.length; i++) 
			{
    			ch = checkStr.charAt(i); 
    			for (j = 0; j < checkOK.length; j++)
      				if (ch == checkOK.charAt(j))
        				break;
    			if (j == checkOK.length) 
				{ 
      				allValid = false; 
      				break; 
    				}
  			}
		if (!allValid) 
			{ 
    			alert("You have introduced an incorrect carácter in the section \"new password \"."); 
    			document.perfil.newpasswd.focus(); 
			document.perfil.newpasswd.value="";
			document.perfil.newpasswd2.value="";
			todobien=false;
    			return (false); 
 			} 


		clave1 = document.perfil.newpasswd.value;
		clave2 = document.perfil.newpasswd2.value;
	
		if (clave1 != clave2)
			{
			alert("The  passwords are not the same .")
			document.perfil.newpasswd.value="";
			document.perfil.newpasswd2.value="";
			todobien=false;
			return (false); 
			}

		

		var checkOK = "0123456789"; 
 	 	var checkStr = document.perfil.tlf1.value; 
  		var allValid = true; 
  		var decPoints = 0; 
  		var allNum = ""; 
  		for (i = 0; i < checkStr.length; i++) 
			{ 
    			ch = checkStr.charAt(i); 
    			for (j = 0; j < checkOK.length; j++) 
      				if (ch == checkOK.charAt(j))
        				break; 
    			if (j == checkOK.length) 
				{ 
      				allValid = false; 
      				break; 
    				} 
    			allNum += ch; 
  			} 

  		if (!allValid) 
			{ 
    			alert("Write only digits in \"Phone 1º\".");
    			document.perfil.tlf1.focus(); 
    			return (false); 
			todobien=false;
  			} 

 	 	var checkStr = document.perfil.tlf2.value; 
  		var allValid = true; 
  		var decPoints = 0; 
  		var allNum = ""; 
  		for (i = 0; i < checkStr.length; i++) 
			{ 
    			ch = checkStr.charAt(i); 
    			for (j = 0; j < checkOK.length; j++) 
      				if (ch == checkOK.charAt(j))
        				break; 
    			if (j == checkOK.length) 
				{ 
      				allValid = false; 
      				break; 
    				} 
    			allNum += ch; 
  			} 

  		if (!allValid) 
			{ 
    			alert("Write only digits in \"Phone 2º\".");
    			document.perfil.tlf2.focus(); 
    			return (false); 
			todobien=false;
  			} 

		
		psac = document.perfil.passwd.value;
		ps1 = document.perfil.newpasswd.value;
		ps2 = document.perfil.newpasswd2.value;
		em = document.perfil.mail.value;
		t1 = document.perfil.tlf1.value;
		t2 = document.perfil.tlf2.value;
		ch = document.perfil.acepto.checked;

		if (ch == false)
			{
			alert("You must accept the privacy policy  in order to continue ");
			todobien=false;
			}
		
		if( validar( em )  )
			{
			//alert("no hay mail");
			if(document.perfil.mail.value.search(/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/ig))
				{
   	    			alert("Incorrect e-mail address, you have to write it this way: name@server.domain");
	       		 	document.perfil.mail.select();
       			 	document.perfil.mail.focus();
				todobien=false;
			       	return (false); 
    				}
			}

		
		
			if( ( validar( em ) || validar(t1) || validar(t2) ) && todobien)
				{
				//alert("aqui");
				if ( validar(psac) || validar(ps1) || validar(ps2) )
					{
					//alert("aqui2");
					if (validar(psac) && validar(ps1) && validar(ps2) )
						{
						//alert("aqui3");
						
						if (document.perfil.newpasswd.value.length < 6) 
							{
   							alert(" the new password section must have least 6 characters");
    							document.perfil.newpasswd.focus();
							todobien=false;
    							return (false);
	  						}
						else
							{
							document.perfil.submit();
							}
						}
					else
						{
						window.alert("If  you would like to change the password, first you have to introduce the actual password, then you have to write the new password and  finally you have to write again the new password.");
						}
					}
				else
					{
					document.perfil.submit();
					}

				}
			else
				{
				if (ch==true)
					{
			window.alert("you have to introduce at least one of these three items: Email, phone 1, phone 2");
				//document.perfil.reset();
					}
				}
			

		}


function elim(id) 
		{ 


		window.open('eliminaroferta.php?id=' + id, 'Sizewindow', 'top=100, left=300, width=500,height=210')
		} 


function elimin(id)
		{
		
		window.open('eliminarusuario.php?id=' + id, 'Sizewindow', 'top=100, left=300, width=500,height=210')
		}


function combo2(id)
{
   		
	var indice=document.forms.f_upd.men1.value;
	
	var idcasa="&idca=";

	var pagina="usuario.php?updca=ok&ind=";	

	
	window.location.href=pagina + indice + idcasa + id;	


 } 



function combo3()
{
   		
	var indice=document.forms.f.men1.value;
	

	var pagina="adm.php?sw=liol&pro=";	

	
	window.location.href=pagina + indice;	


 } 

function combo4()
{
   		
	var indice=document.forms.f.men1.value;
	var indice2=document.forms.f.men2.value;

	var pagina="adm.php?sw=liol&pro=";	
	
	var idpue="&idpue=";
		
	
	window.location.href=pagina + indice + idpue + indice2;	


 } 


function combo5()
{
	id = document.lista.ciudad_id.value;

		if( id==0 )
		{
			document.lista.reset();
		}
		else
		{
			document.lista.submit();
		}
}


//******************************************************************************************************************
// funcion que comprueba la actualizacion de una oferta
//******************************************************************************************************************


function comprobar5()
	{
		id = document.f_upd.men1.value;
		id2 = document.f_upd.men2.value;
		sw=true;

		if( id==0 )
		{
			sw=false;
			window.alert("please, select a province ");
			document.f_upd.reset();
		}
		else 
			{
		
			if( id2==0 )
				{
				sw=false;
				window.alert("please, select a town");
				document.f_upd.reset();
				}
			}
		
		var checkOK = "0123456789.";
		var checkOK2 = "0123456789";
		var checkOK3 = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZÁÉÍÓÚ" + "abcdefghijklmnñopqrstuvwxyzáéíóú" + "0123456789ºª ";	
		var checkStr = document.f_upd.preven.value; 
  		var allValid = true; 
  		var decPoints = 0; 
  		var allNum = ""; 
  		for (i = 0; i < checkStr.length; i++) 
			{ 
    			ch = checkStr.charAt(i); 
    			for (j = 0; j < checkOK.length; j++) 
      				if (ch == checkOK.charAt(j))
        				break; 
    			if (j == checkOK.length) 
				{ 
      				allValid = false; 
      				break; 
    				} 
    			allNum += ch; 
  			} 

  		if (!allValid) 
			{ 
    			alert("Write only digits in \"sale price \" \n (use the point (.) if you want to put decimals )");
    			document.f_upd.preven.focus(); 
    			return (false); 
			sw=false;
  			} 
		
		var checkStr = document.f_upd.prealq.value; 
  		var allValid = true; 
  		var decPoints = 0; 
  		var allNum = ""; 
  		for (i = 0; i < checkStr.length; i++) 
			{ 
    			ch = checkStr.charAt(i); 
    			for (j = 0; j < checkOK.length; j++) 
      				if (ch == checkOK.charAt(j))
        				break; 
    			if (j == checkOK.length) 
				{ 
      				allValid = false; 
      				break; 
    				} 
    			allNum += ch; 
  			} 

  		if (!allValid) 
			{ 
    			alert("Write only digits in \"rental price \" \n (use the point (.) if you want to put decimals )");
    			document.f_upd.prealq.focus(); 
    			return (false); 
			sw=false;
  			} 
		
		var checkStr = document.f_upd.met.value; 
  		var allValid = true; 
  		var decPoints = 0; 
  		var allNum = ""; 
  		for (i = 0; i < checkStr.length; i++) 
			{ 
    			ch = checkStr.charAt(i); 
    			for (j = 0; j < checkOK.length; j++) 
      				if (ch == checkOK.charAt(j))
        				break; 
    			if (j == checkOK2.length) 
				{ 
      				allValid = false; 
      				break; 
    				} 
    			allNum += ch; 
  			} 

  		if (!allValid) 
			{ 
    			alert("Write only digits in \"built area  \" \n (use the point (.) if you want to put decimals )");
    			document.f_upd.met.focus(); 
    			return (false); 
			sw=false;
  			} 

		var checkStr = document.f_upd.n_dor.value; 
  		var allValid = true; 
  		var decPoints = 0; 
  		var allNum = ""; 
  		for (i = 0; i < checkStr.length; i++) 
			{ 
    			ch = checkStr.charAt(i); 
    			for (j = 0; j < checkOK2.length; j++) 
      				if (ch == checkOK2.charAt(j))
        				break; 
    			if (j == checkOK2.length) 
				{ 
      				allValid = false; 
      				break; 
    				} 
    			allNum += ch; 
  			} 

  		if (!allValid) 
			{ 
    			alert("Write only digits in \"number of  bedrooms   \"");
    			document.f_upd.n_dor.focus(); 
    			return (false); 
			sw=false;
  			} 
		
		var checkStr = document.f_upd.n_ban.value; 
  		var allValid = true; 
  		var decPoints = 0; 
  		var allNum = ""; 
  		for (i = 0; i < checkStr.length; i++) 
			{ 
    			ch = checkStr.charAt(i); 
    			for (j = 0; j < checkOK2.length; j++) 
      				if (ch == checkOK2.charAt(j))
        				break; 
    			if (j == checkOK2.length) 
				{ 
      				allValid = false; 
      				break; 
    				} 
    			allNum += ch; 
  			} 

  		if (!allValid) 
			{ 
    			alert("Write only digits in \"number of  bathrooms   \"");
    			document.f_upd.n_ban.focus(); 
    			return (false); 
			sw=false;
  			} 

		var checkStr = document.f_upd.altu.value; 
  		var allValid = true; 
  		var decPoints = 0; 
  		var allNum = ""; 
  		for (i = 0; i < checkStr.length; i++) 
			{ 
    			ch = checkStr.charAt(i); 
    			for (j = 0; j < checkOK3.length; j++) 
      				if (ch == checkOK3.charAt(j))
        				break; 
    			if (j == checkOK3.length) 
				{ 
      				allValid = false; 
      				break; 
    				} 
    			allNum += ch; 
  			} 

  		if (!allValid) 
			{ 
    			alert("You have introduced an incorrect carácter in the section  \"floor\"  ");
    			document.f_upd.altu.focus(); 
    			return (false); 
			sw=false;
  			} 

		ch = document.f_upd.acept.checked;

		if (ch == false)
			{
			alert("You must accept the privacy policy  in order to continue ");
			sw=false;
			}


		if (sw==true)
		{
			document.f_upd.submit();
		}
	}
