var Msg_Error;
function validar(){
	Msg_Error="";
	validar_propio();
	if(Error_form==1){
		alert("No se ha validado correctamente el formulario:\n"+Msg_Error);
		}else{
			document.form.submit();	
		}
	}

function borrar(){
	if(confirm("Esto borrará el elemento actual. ¿Está seguro?")){
		document.form.accion.value="bor";
		document.form.submit();
		}
	}

/////////////////////////////////////////////////////////////////////////////
//FUNCIONES CARGA MM
function abre_mascara(){	
	oDIV=document.createElement('div');
	oDIV.setAttribute('id','mascara');
	document.getElementById("div_conte").appendChild(oDIV);
	}

function cierra_mascara(){
	document.getElementById("div_conte").removeChild(document.getElementById("mascara"));
	}

function ventana_inw(tipo){
	vars='./ins_MM.php?tipo='+tipo+'&id='+id+'&seccion='+seccion+'&tit_sec_web='+tit_sec_web;
	if(typeof fichero_conf!="undefined")
		vars+='&fichero_conf='+fichero_conf;
	/* Keda pendiente para cuando se cargue en la ventana

	abre_mascara();
	
	id=document.form.idDoc.value;

	oIFR=document.createElement('iframe');
	oIFR.setAttribute('id','iframe_cargador');
	document.getElementById("div_conte").appendChild(oIFR);
	document.getElementById('iframe_cargador').setAttribute('src',vars+'inw=1');
	*/

	window.location.href=vars;
	}

function cierra_inw(){
	document.getElementById("div_conte").removeChild(document.getElementById("iframe_cargador"));
	cierra_mascara();
	}
	
function cierrame(){
	window.parent.cierra_inw();
	}
/////////////////////////////////////////////////////////////////////////////