
function fVerPermisosUsuario(idUsuario){
	document.form2.action="PermisosUsuario.jsp";
	if (idUsuario != null && idUsuario != ""){
		var input1;
		        input1 = document.createElement('INPUT');
		        input1.type = "hidden";
		        input1.value = idUsuario;
		        input1.name = 'ID_USUARIO_SELECCIONADO' ;
	        document.form2.appendChild(input1);
	}
	document.form2.submit();
}
/*
* Función que busca la página que se le pasa como parámetro
*/
function damePagina(pagina,jsp){
	document.form1.FUNCION.value = "buscar";
  	document.form1.action=jsp;
  	document.form1.pagina.value=pagina;
 	document.form1.submit();
}
function fBuscar(){
	document.form1.FUNCION.value = "buscar";
}

function changeCombo(){
	document.form1.ID_OBJETO_SELECCIONADO.value = document.form1.COMBO_OBJETO_SELECCIONADO[document.form1.COMBO_OBJETO_SELECCIONADO.selectedIndex].value;
	document.form1.CLASE_OBJETO_SELECCIONADO.value = document.form1.COMBO_OBJETO_SELECCIONADO[document.form1.COMBO_OBJETO_SELECCIONADO.selectedIndex].id;
	if(document.form1.ID_PERFIL_SELECCIONADO){
		document.form1.ID_PERFIL_SELECCIONADO.value = document.form1.COMBO_PERFIL_SELECCIONADO[document.form1.COMBO_PERFIL_SELECCIONADO.selectedIndex].id;
	}
	document.form1.submit();
}
	
function verHijos(){
	document.form1.FUNCION.value = "VerHijos";
	document.form1.ID_OBJETO_SELECCIONADO.value = document.form1.COMBO_OBJETO_SELECCIONADO[document.form1.COMBO_OBJETO_SELECCIONADO.selectedIndex].value;
	document.form1.CLASE_OBJETO_SELECCIONADO.value = document.form1.COMBO_OBJETO_SELECCIONADO[document.form1.COMBO_OBJETO_SELECCIONADO.selectedIndex].id;
	if(document.form1.ID_PERFIL_SELECCIONADO){
		document.form1.ID_PERFIL_SELECCIONADO.value = document.form1.COMBO_PERFIL_SELECCIONADO[document.form1.COMBO_PERFIL_SELECCIONADO.selectedIndex].id;
	}
	document.form1.submit();
}
function verPadre(idObjetoPadre, claseObjetoPadre){
	document.form1.ID_OBJETO_SELECCIONADO.value = idObjetoPadre;
	document.form1.CLASE_OBJETO_SELECCIONADO.value = claseObjetoPadre;
	if(document.form1.ID_PERFIL_SELECCIONADO){
		document.form1.ID_PERFIL_SELECCIONADO.value = document.form1.COMBO_PERFIL_SELECCIONADO[document.form1.COMBO_PERFIL_SELECCIONADO.selectedIndex].id;
	}
	document.form1.submit();
}
function fVerPermisosPerfil(){
	document.form2.action="PermisosPerfil.jsp";
	var input1;
	        input1 = document.createElement('INPUT');
	        input1.type = "hidden";
	        input1.value = document.form1.ID_USUARIO_SELECCIONADO.value;
	        input1.name = 'ID_USUARIO_SELECCIONADO' ;
        document.form2.appendChild(input1);
	document.form2.submit();
}

function fAsignarPermisosPerfil(){
	document.form2.action="PermisosPerfil.jsp";
		var input1;
		input1 = document.createElement('INPUT');
		input1.type = "hidden";
		input1.value = document.form1.COMBO_PERFIL_SELECCIONADO[document.form1.COMBO_PERFIL_SELECCIONADO.selectedIndex].id;
		input1.name = 'ID_PERFIL_SELECCIONADO' ;
	document.form2.appendChild(input1);
	document.form2.submit();
}

function verEsquemaObjetos(){
	var url = "EsquemaObjetos.jsp?FUNCION=verEsquema&ID_OBJETO_SELECCIONADO=" + document.form1.COMBO_OBJETO_SELECCIONADO[document.form1.COMBO_OBJETO_SELECCIONADO.selectedIndex].value + "&objeto_" + document.form1.COMBO_OBJETO_SELECCIONADO[document.form1.COMBO_OBJETO_SELECCIONADO.selectedIndex].value + "=" + document.form1.COMBO_OBJETO_SELECCIONADO[document.form1.COMBO_OBJETO_SELECCIONADO.selectedIndex].value;
	abrir_ventanaConScroll(url,800,500,"EsquemaObjetosFlotante");
}

function modify(){
	for(var i = 0;i<document.form1.elements.length;i++){
		if(document.form1.elements[i].type == "radio"){
			for(var j = 0;j<document.form1.elements[i].length;j++){
                 		if(document.form1.elements[i][j].checked){
                         		document.form1.elements[i].value = document.form1.elements[i][j].value;
                 		}
			}
		}
	}
	document.form1.ID_OBJETO_SELECCIONADO.value = document.form1.COMBO_OBJETO_SELECCIONADO[document.form1.COMBO_OBJETO_SELECCIONADO.selectedIndex].value;
	document.form1.CLASE_OBJETO_SELECCIONADO.value = document.form1.COMBO_OBJETO_SELECCIONADO[document.form1.COMBO_OBJETO_SELECCIONADO.selectedIndex].id;
	if(document.form1.ID_PERFIL_SELECCIONADO){
		document.form1.ID_PERFIL_SELECCIONADO.value = document.form1.COMBO_PERFIL_SELECCIONADO[document.form1.COMBO_PERFIL_SELECCIONADO.selectedIndex].id;
	}
	document.form1.FUNCION.value = "Modificar";
	document.form1.submit();
}

function fAsignacionPerfiles(){
	document.form2.action = 'asignacionPerfiles.jsp';
	var input1;
	        input1 = document.createElement('INPUT');
	        input1.type = "hidden";
	        input1.value = document.form1.ID_USUARIO_SELECCIONADO.value;
	        input1.name = 'ID_USUARIO';
        document.form2.appendChild(input1);
	document.form2.submit();
}

function fModificacionDatosUsuario(){
	document.form2.action = 'creacionUsuario.jsp';
	var input1;
	        input1 = document.createElement('INPUT');
	        input1.type = "hidden";
	        input1.value = document.form1.ID_USUARIO_SELECCIONADO.value;
	        input1.name = 'ID_USUARIO';
        document.form2.appendChild(input1);
	document.form2.submit();
}

function fModificacionDatosUsuario2(){
	document.form1.action = 'creacionUsuario.jsp';
	document.form1.submit();
}

function changeComboPerfiles(){
	document.form1.ID_OBJETO_SELECCIONADO.value = document.form1.COMBO_OBJETO_SELECCIONADO[document.form1.COMBO_OBJETO_SELECCIONADO.selectedIndex].value;
	document.form1.CLASE_OBJETO_SELECCIONADO.value = document.form1.COMBO_OBJETO_SELECCIONADO[document.form1.COMBO_OBJETO_SELECCIONADO.selectedIndex].id;
	document.form1.ID_PERFIL_SELECCIONADO.value = document.form1.COMBO_PERFIL_SELECCIONADO[document.form1.COMBO_PERFIL_SELECCIONADO.selectedIndex].id;
	document.form1.submit();
}

function verPerfilHijos(){
	document.form1.FUNCION.value = "VerPerfilHijos";
	if(document.form1.ID_OBJETO_SELECCIONADO)
		document.form1.ID_OBJETO_SELECCIONADO.value = document.form1.COMBO_OBJETO_SELECCIONADO[document.form1.COMBO_OBJETO_SELECCIONADO.selectedIndex].value;
	if(document.form1.CLASE_OBJETO_SELECCIONADO)
		document.form1.CLASE_OBJETO_SELECCIONADO.value = document.form1.COMBO_OBJETO_SELECCIONADO[document.form1.COMBO_OBJETO_SELECCIONADO.selectedIndex].id;
	document.form1.ID_PERFIL_SELECCIONADO.value = document.form1.COMBO_PERFIL_SELECCIONADO[document.form1.COMBO_PERFIL_SELECCIONADO.selectedIndex].id;
	if(document.form1.ID_ATRIBUTO_SELECCIONADO)
		document.form1.ID_ATRIBUTO_SELECCIONADO.value = "vacio";
	document.form1.submit();
}

function verPerfilPadre(idPerfilPadre){
	if(document.form1.ID_OBJETO_SELECCIONADO)
		document.form1.ID_OBJETO_SELECCIONADO.value = document.form1.COMBO_OBJETO_SELECCIONADO[document.form1.COMBO_OBJETO_SELECCIONADO.selectedIndex].value;
	if(document.form1.CLASE_OBJETO_SELECCIONADO)
		document.form1.CLASE_OBJETO_SELECCIONADO.value = document.form1.COMBO_OBJETO_SELECCIONADO[document.form1.COMBO_OBJETO_SELECCIONADO.selectedIndex].id;
	document.form1.ID_PERFIL_SELECCIONADO.value = idPerfilPadre;
	if(document.form1.ID_ATRIBUTO_SELECCIONADO)
		document.form1.ID_ATRIBUTO_SELECCIONADO.value = "vacio";
	document.form1.submit();
}

function verEsquemaPerfiles(){
	var url = "EsquemaPerfiles.jsp?FUNCION=verEsquema&ID_PERFIL_SELECCIONADO=" + document.form1.COMBO_PERFIL_SELECCIONADO[document.form1.COMBO_PERFIL_SELECCIONADO.selectedIndex].id + "&perfil_" + document.form1.COMBO_PERFIL_SELECCIONADO[document.form1.COMBO_PERFIL_SELECCIONADO.selectedIndex].id + "=" + document.form1.COMBO_PERFIL_SELECCIONADO[document.form1.COMBO_PERFIL_SELECCIONADO.selectedIndex].id;
	abrir_ventanaConScroll(url,550,500,"EsquemaPerfilesFlotante");
}

function fVerDatos(){
	document.form1.ID_PERFIL_SELECCIONADO.value = document.form1.COMBO_PERFIL_SELECCIONADO[document.form1.COMBO_PERFIL_SELECCIONADO.selectedIndex].id;
	document.form1.submit();
}
function fCrearPerfil(){
	document.form1.FUNCION.value = "CrearPerfil";
	document.form1.ID_PERFIL_SELECCIONADO.value = document.form1.COMBO_PERFIL_SELECCIONADO[document.form1.COMBO_PERFIL_SELECCIONADO.selectedIndex].id;
	document.form1.submit();
}

function fAddAtributo(){
	document.form1.FUNCION.value = "AddAtributo";
	document.form1.ID_PERFIL_SELECCIONADO.value = document.form1.COMBO_PERFIL_SELECCIONADO[document.form1.COMBO_PERFIL_SELECCIONADO.selectedIndex].id;
	document.form1.nombreAtributo.value = document.form1.ID_ATRIBUTO_SELECCIONADO[document.form1.ID_ATRIBUTO_SELECCIONADO.selectedIndex].id;
	document.form1.submit();
}

function fBorrarAtributos(){
	document.form1.FUNCION.value = "BorrarAtributos";
	document.form1.ID_PERFIL_SELECCIONADO.value = document.form1.COMBO_PERFIL_SELECCIONADO[document.form1.COMBO_PERFIL_SELECCIONADO.selectedIndex].id;
	document.form1.nombreAtributo.value = document.form1.ID_ATRIBUTO_SELECCIONADO[document.form1.ID_ATRIBUTO_SELECCIONADO.selectedIndex].id;
	document.form1.submit();
}

function comprobarDiferente(){
	var login="";
	var pwd="";
	if(document.getElementById("usuario") && document.getElementById("passw1")){
		login=document.getElementById("usuario").value;
		pwd=document.getElementById("passw1").value;
	}else{
		login=document.getElementById("LOGIN").value;
		pwd=document.getElementById("PASSWORD").value;
	}	
	login=trim(login.toUpperCase());
	pwd=trim(pwd.toUpperCase());
	if(!(login=="" && pwd=="") && login==pwd){
		if(document.getElementById("usuario"))
			document.getElementById("usuario").value='';
		else
			document.getElementById("LOGIN").value='';
		alert("Los valores de los campos USUARIO y PASSWORD deben ser distintos.");
		if(document.getElementById("usuario"))
			document.getElementById("usuario").focus();
		else
			document.getElementById("LOGIN").focus();
	}
}

function volverASolicitudes(){
	var re = "ListadoAdminSolicitudes";
	var re2 = "creacionUsuario";
	var str = document.referrer;
	if(str.indexOf(re)!=-1){
		window.history.go(-1);
	}else if(str.indexOf(re2)!=-1){
		window.history.go(-3);
	}
}

function validar(){
	var errors = '';
	if (!esNumeroValido(document.form1.TFNO.value)){
		document.form1.TFNO.focus();
		errors += '1.\n';
	}
	if (!esNumeroValido(document.form1.PREFTFNO.value)){
		document.form1.PREFTFNO.focus();
		errors += '1.\n';
	}
	if (!esNumeroValido(document.form1.MOVIL.value)){
		document.form1.MOVIL.focus();
		errors += '1.\n';
	}
	if (!esNumeroValido(document.form1.PREFMOVIL.value)){
		document.form1.PREFMOVIL.focus();
		errors += '1.\n';
	}
	if (!validarEntero3(document.form1.CP,document.form1.CP.value,'El campo C. Postal debe ser numérico.',5,'C. Postal')){
		document.form1.CP.focus();
		errors += '1.\n';
	}
	if (document.form1.EMAIL.value != "" &&!checkMail(document.form1.EMAIL)){
		document.form1.EMAIL.focus();
		errors += '1.\n';
	}
	/*if (document.form1.CIF.value != "" && !checkCIFOrNIF(document.form1.CIF)){
		document.form1.CIF.focus();
		errors += '1.\n';
	}*/
	document.MM_returnValue = (errors == '');
}

function fCrearUsuario(){
	if(document.form1.TIPOUSUARIO)
		document.form1.TIPOUSUARIO.disabled = false;
	document.form1.FUNCION.value = "CrearUsuario";
}

function fModificarUsuario(idUsuario){
	document.form1.FUNCION.value = "ModificarUsuario";
	document.form1.ID_USUARIO.value = idUsuario;
}

function fPermisosUsuario(idUsuario){
	document.form2.action="PermisosUsuario.jsp";
	document.form2.ID_USUARIO_SELECCIONADO.value = idUsuario;
	document.form2.submit();
}

function borrarFormulario(){
 if (document.form1){
    f = document.form1;
    for(var i=0; i<f.elements.length;i++){
        if (f.elements[i].type=='text' || f.elements[i].type=='hidden' || f.elements[i].type=='select-one'){
             f.elements[i].value='';
        }
    }
 }
}

function fModificacionUsuario(idUsuario){
	document.form1.action = 'creacionUsuario.jsp';
	var input1;
	        input1 = document.createElement('INPUT');
	        input1.type = "hidden";
		input1.value = idUsuario;
	        input1.name = 'ID_USUARIO';
	        document.form1.appendChild(input1);
	var input2;
	        input2 = document.createElement('INPUT');
	        input2.type = "hidden";
		input2.value = "SI";
	        input2.name = 'SOLICITUD';
	        document.form1.appendChild(input2);
	document.form1.submit();
}

function fCargarSolicitud(login){
	document.form1.FUNCION.value = "buscar";
	var input1;
	        input1 = document.createElement('INPUT');
	        input1.type = "hidden";
		input1.value = login;
	        input1.name = 'login';
        document.form1.appendChild(input1);
	document.form1.submit();
}

function fAutorizar(login,idUsuario,password,checkEmail,checkCarta,automatica,pendiente,envioEmail){
	document.form1.action = 'autorizacionSolicitud.jsp';
	var input1;
	        input1 = document.createElement('INPUT');
	        input1.type = "hidden";
		input1.value = login;
	        input1.name = 'login';
	        document.form1.appendChild(input1);
	var input2;
	        input2 = document.createElement('INPUT');
	        input2.type = "hidden";
		input2.value = idUsuario;
	        input2.name = 'idUsuario';
	        document.form1.appendChild(input2);
	var input3;
	        input3 = document.createElement('INPUT');
	        input3.type = "hidden";
		input3.value = password;
	        input3.name = 'password';
	        document.form1.appendChild(input3);
	var input4;
	        input4 = document.createElement('INPUT');
	        input4.type = "hidden";
		input4.value = checkEmail;
	        input4.name = 'checkEmail';
	        document.form1.appendChild(input4);
	var input5;
	        input5 = document.createElement('INPUT');
	        input5.type = "hidden";
		input5.value = checkCarta;
	        input5.name = 'checkCarta';
	        document.form1.appendChild(input5);
	var input6;
	        input6 = document.createElement('INPUT');
	        input6.type = "hidden";
		input6.value = automatica;
	        input6.name = 'automatica';
	        document.form1.appendChild(input6);
	var input7;
	        input7 = document.createElement('INPUT');
	        input7.type = "hidden";
		input7.value = pendiente;
	        input7.name = 'pendiente';
	        document.form1.appendChild(input7);
	var input8;
	        input8 = document.createElement('INPUT');
	        input8.type = "hidden";
		input8.value = envioEmail;
	        input8.name = 'envioEmail';
	        document.form1.appendChild(input8);
	document.form1.submit();
}

function imprimirExcel(valor,jsp) {
	document.form1.FUNCION.value = "buscar";
	document.form1.action = jsp+"?IMPRIMIR="+valor;
	document.form1.submit();
}

///////////////////////////////////////////


function fVerDatosCambioPerfil(){
	document.getElementById("form1").ID_PERFIL_SELECCIONADO.value = document.getElementById("form1").COMBO_PERFIL_SELECCIONADO[document.getElementById("form1").COMBO_PERFIL_SELECCIONADO.selectedIndex].id;
	document.getElementById("form1").ID_ATRIBUTO_SELECCIONADO.value = "vacio";
	document.form1.submit();
}

function fVerDatos(){
	if(document.getElementById("form1").ID_PROVINCIA_SELECCIONADO){
		document.getElementById("form1").ID_PROVINCIA_SELECCIONADO.value = "";
	}
	if(document.getElementById("form1").ID_DELEGACION_SELECCIONADO){
		document.getElementById("form1").ID_DELEGACION_SELECCIONADO.value = "";
	}
	if(document.getElementById("form1").ID_ZONA_SELECCIONADO){
		document.getElementById("form1").ID_ZONA_SELECCIONADO.value = "";
	}
	if(document.getElementById("form1").ID_SUBZONA_SELECCIONADO){
		document.getElementById("form1").ID_SUBZONA_SELECCIONADO.value = "";
	}
	document.getElementById("form1").ID_PERFIL_SELECCIONADO.value = document.getElementById("form1").COMBO_PERFIL_SELECCIONADO[document.getElementById("form1").COMBO_PERFIL_SELECCIONADO.selectedIndex].id;
	if(document.getElementById("form1").listaValores)
		document.getElementById("form1").listaValores.disabled = true;
	document.form1.submit();
}

function fVerDatos2(){
	document.getElementById("form1").ID_PERFIL_SELECCIONADO.value = document.getElementById("form1").COMBO_PERFIL_SELECCIONADO[document.getElementById("form1").COMBO_PERFIL_SELECCIONADO.selectedIndex].id;

	if (document.getElementById("form1").listaValores != null){
          for (var i=0;i<document.getElementById("form1").listaValores.length;i++){
                  document.getElementById("form1").listaValores.options[i].selected = true;
          }
	}

	document.form1.submit();
}

function fVerDatos3(){
	if(document.getElementById("form1").ID_ZONA_SELECCIONADO){
		document.getElementById("form1").ID_ZONA_SELECCIONADO.value = "";
	}
	if(document.getElementById("form1").ID_SUBZONA_SELECCIONADO){
		document.getElementById("form1").ID_SUBZONA_SELECCIONADO.value = "";
	}
	document.getElementById("form1").ID_PERFIL_SELECCIONADO.value = document.getElementById("form1").COMBO_PERFIL_SELECCIONADO[document.getElementById("form1").COMBO_PERFIL_SELECCIONADO.selectedIndex].id;

	if (document.getElementById("form1").listaValores != null){
          for (var i=0;i<document.getElementById("form1").listaValores.length;i++){
                  document.getElementById("form1").listaValores.options[i].selected = true;
          }
	}

	document.form1.submit();
}

function fVerDatos4(){
	if(document.getElementById("form1").ID_SUBZONA_SELECCIONADO){
		document.getElementById("form1").ID_SUBZONA_SELECCIONADO.value = "";
	}
	document.getElementById("form1").ID_PERFIL_SELECCIONADO.value = document.getElementById("form1").COMBO_PERFIL_SELECCIONADO[document.getElementById("form1").COMBO_PERFIL_SELECCIONADO.selectedIndex].id;

	if (document.getElementById("form1").listaValores != null){
          for (var i=0;i<document.getElementById("form1").listaValores.length;i++){
                  document.getElementById("form1").listaValores.options[i].selected = true;
          }
	}

	document.form1.submit();
}

function addValorALista(){
	var valorCampo = trim(document.getElementById("form1").valorIntroducido.value);
	if (valorCampo != '' && document.getElementById("form1").listaValores){
		var varOpcion2 = document.createElement("OPTION");
		varOpcion2.text = valorCampo;
		varOpcion2.value = valorCampo;
		document.getElementById("form1").listaValores.add(varOpcion2);
	}
	document.getElementById("form1").valorIntroducido.value="";
}

function addValorALista2(){
	var valorCampo = "";
	if(document.getElementById('ID_PROVINCIA_SELECCIONADO')){
		valorCampo = document.getElementById('ID_PROVINCIA_SELECCIONADO').value;
	}
	if(document.getElementById('ID_DELEGACION_SELECCIONADO')){
		valorCampo = document.getElementById('ID_DELEGACION_SELECCIONADO').value;
	}
	if(document.getElementById('ID_ZONA_SELECCIONADO') && document.getElementById('ID_ZONA_SELECCIONADO').value != ""){
		valorCampo = valorCampo + '_' + document.getElementById('ID_ZONA_SELECCIONADO').value;
	}
	if(document.getElementById('ID_SUBZONA_SELECCIONADO') && document.getElementById('ID_SUBZONA_SELECCIONADO').value != ""){
		valorCampo = valorCampo + '_' + document.getElementById('ID_SUBZONA_SELECCIONADO').value;
	}
	var existe = 'no';
	for(var i=0; i<document.getElementById('listaValores').length;i++){
		if(valorCampo == document.getElementById('listaValores')[i].value){
			existe = 'si';
		}
	}
	if(existe == 'no'){
		var varOpcion2 = document.createElement("OPTION");
		varOpcion2.text = valorCampo;
		varOpcion2.value = valorCampo;
		document.getElementById('listaValores').options.add(varOpcion2);
	}
}

function asignarAtributoPerfil(){
	document.getElementById("form1").FUNCION.value = "AsignarAtributo";
	document.getElementById("form1").ID_PERFIL_SELECCIONADO.value = document.getElementById("form1").COMBO_PERFIL_SELECCIONADO[document.getElementById("form1").COMBO_PERFIL_SELECCIONADO.selectedIndex].id;
	if (document.getElementById("form1").listaValores != null){
          for (var i=0;i<document.getElementById("form1").listaValores.length;i++){
                  document.getElementById("form1").listaValores.options[i].selected = true;
          }
	}
	document.form1.submit();
}

function fBorrarAtributosPerfil(){
	document.getElementById("form1").FUNCION.value = "BorrarAtributos";
	document.getElementById("form1").ID_PERFIL_SELECCIONADO.value = document.getElementById("form1").COMBO_PERFIL_SELECCIONADO[document.getElementById("form1").COMBO_PERFIL_SELECCIONADO.selectedIndex].id;
	document.form1.submit();
}

function removeValorALista(){
	var x=document.getElementById("listaValores");
	if (x.selectedIndex != -1){
		x.remove(x.selectedIndex);
	}
}

function fContinuarConPermisos(){
	if (document.getElementById("form1").ID_PERFIL_USUARIO == null){
		alert('El usuario no tiene perfil.');
	}else{
          document.getElementById("form1").ID_USUARIO_SELECCIONADO.value = document.getElementById("form1").ID_USUARIO.value;
          document.getElementById("form1").ID_PERFIL_SELECCIONADO.value = document.getElementById("form1").ID_PERFIL_USUARIO.value;
          document.getElementById("form1").action = 'PermisosUsuario.jsp';
          document.form1.submit();
	}
}

/*
* Método que llama a la jsp poder ver el contenido de un fichero
*/
function verDocumentoPDF(valor){
	addNewParameter('form2','ID',valor);
	document.form2.action="DocumentoServlet";
	document.form2.submit();
}


/* PARAMETROS:    nombrePantalla
   FUNCIONALIDAD: hace el href a la url que indicamos con el parametro nombrePantalla
*/
function irPantallaUsers(formu, nombrePantalla) {
	document.getElementById(formu).action = nombrePantalla;
	document.getElementById(formu).submit();
}
