function fLimpiarBuscador (strIdioma){
	document.frmBuscar.txtFecha.value="";
	document.frmBuscar.cboIdioma.value=strIdioma;
}
//*************************************
function fValidarBuscar (){
	if (document.frmBuscar.txtFecha.value!=""){
		if(!fValidarDia(document.frmBuscar.txtFecha.value)){return;}
	}
	document.frmBuscar.submit();
}
//*************************************
function fValidarDatosApli(intNuevo){
	if (document.frmNuevo.txtNombre.value==""){alert(fM("IntroduzcaNombre"));return;}
	if (document.frmNuevo.txtFoto.value!="" || document.frmNuevo.hdnBorrarFoto.value!=""){
		if (document.frmNuevo.txtWai.value=="" || document.frmNuevo.txtDWai.value==""){
			alert(fM("IntroduzcaWaiFoto"));return;
		}
	}
	if (intNuevo == "1"){
		if (document.frmNuevo.txtFichero.value==""){alert(fM("IntroduzcaFichero"));return;}
	}
	document.frmNuevo.submit();
}
//*************************************
function fAseguraQuitarImagen(intCodAplicacion,strIdioma){
	if (confirm(fM("SeguroBorrarImagen"))){
		location.href='index.php?pg=14&CodAplicacion='+intCodAplicacion+'&CodIdioma='+strIdioma;
	}else{return;}
}
//*************************************
function fAseguraBorrarAplicaciones (){
	intCuantos=document.frmLista.Cuantos.value;
	i=0;
	sw=0;
	strAplicaciones="";
	if (intCuantos=="1"){
		if (document.frmLista.chkApli.checked){
			sw=1;
			strAplicaciones = document.frmLista.chkApli.value;
		}
	}else{
		while (i<intCuantos){
			if (document.frmLista.chkApli[i].checked){
				if (sw==0){
					strAplicaciones = document.frmLista.chkApli[i].value;
				}else{
					strAplicaciones = strAplicaciones + "," + document.frmLista.chkApli[i].value;
				}
				sw=1;
			}
			i++;
		}
	}
	document.frmLista.hdnAplicaciones.value = strAplicaciones;
	if (sw=="1"){
		if (confirm(fM("SeguroBorrarAplicacionesIdioma"))){document.frmLista.submit();}
		else{return;}
	}else{alert(fM("SeleccioneAplicacionesBorrar"));return;}	
}
//****************************************
function fAsegurarBorrarApli (intCodAplicacion,strIdioma){
	if (confirm(fM("SeguroBorrarAplicacion"))){
		location.href='index.php?pg=5&CodAplicacion='+intCodAplicacion+'&CodIdioma='+strIdioma;
	}else{return;}
}
//*************************************
//************************************* ACTUALIZACIONES APLICACION
function fValidarDatosAct(intNuevo){
	if (document.frmNuevo.txtNombre.value==""){alert(fM("IntroduzcaNombre"));return;}
	if (intNuevo == "1"){
		if (document.frmNuevo.txtFichero.value==""){alert(fM("IntroduzcaFichero"));return;}
	}
	document.frmNuevo.submit();
}
//*************************************
function fAseguraBorrarActualizaciones (){
	intCuantos=document.frmListaA.CuantosA.value;
	i=0;
	sw=0;
	strActualizaciones="";
	if (intCuantos=="1"){
		if (document.frmListaA.chkAct.checked){
			sw=1;
			strActualizaciones = document.frmListaA.chkAct.value;
		}
	}else{
		while (i<intCuantos){
			if (document.frmListaA.chkAct[i].checked){
				if (sw==0){
					strActualizaciones = document.frmListaA.chkAct[i].value;
				}else{
					strActualizaciones = strActualizaciones + "," + document.frmListaA.chkAct[i].value;
				}
				sw=1;
			}
			i++;
		}
	}
	document.frmListaA.hdnActualizaciones.value = strActualizaciones;
	if (sw=="1"){
		if (confirm(fM("SeguroBorrarActualizacionesIdioma"))){document.frmListaA.submit();}
		else{return;}
	}else{alert(fM("SeleccioneActualizacionesBorrar"));return;}	
}
//****************************************
function fAsegurarBorrarAct (intCodAplicacion,intCodActualizacion,strIdioma){
	if (confirm(fM("SeguroBorrarActualizacion"))){
		location.href='index.php?pg=9&CodActualizacion='+intCodActualizacion+'&CodAplicacion='+intCodAplicacion+'&CodIdioma='+strIdioma;
	}else{return;}
}
//*************************************
//************************************* DOCUMENTOS APLICACION
function fValidarDatosDoc(intNuevo){
	if (document.frmNuevo.txtNombre.value==""){alert(fM("IntroduzcaNombre"));return;}
	if (intNuevo == "1"){
		if (document.frmNuevo.txtFichero.value==""){alert(fM("IntroduzcaFichero"));return;}
	}
	document.frmNuevo.submit();
}
//*************************************
function fAseguraBorrarDocumentos (){
	intCuantos=document.frmListaD.CuantosD.value;
	i=0;
	sw=0;
	strDocumentos="";
	if (intCuantos=="1"){
		if (document.frmListaD.chkDoc.checked){
			sw=1;
			strDocumentos = document.frmListaD.chkDoc.value;
		}
	}else{
		while (i<intCuantos){
			if (document.frmListaD.chkDoc[i].checked){
				if (sw==0){
					strDocumentos = document.frmListaD.chkDoc[i].value;
				}else{
					strDocumentos = strDocumentos + "," + document.frmListaD.chkDoc[i].value;
				}
				sw=1;
			}
			i++;
		}
	}
	document.frmListaD.hdnDocumentos.value = strDocumentos;
	if (sw=="1"){
		if (confirm(fM("SeguroBorrarDocumentosIdioma"))){document.frmListaD.submit();}
		else{return;}
	}else{alert(fM("SeleccioneDocumentosBorrar"));return;}	
}
//****************************************
function fAsegurarBorrarDoc (intCodAplicacion,intCodDocumento,strIdioma){
	if (confirm(fM("SeguroBorrarDocumento"))){
		location.href='index.php?pg=13&CodDocumento='+intCodDocumento+'&CodAplicacion='+intCodAplicacion+'&CodIdioma='+strIdioma;
	}else{return;}
}
