function fLimpiarBuscador (strIdioma){
	document.frmBuscar.txtTexto.value="";
	document.frmBuscar.cboTipo.value=0;
	document.frmBuscar.cboIdioma.value=strIdioma;
}
//*************************************
function fValidarDatosFeria (){
	if (document.frmCajitas.txtInicio.value == ""){alert(fM("IntroduzcaFechaInicio"));return;}
	else{ if(!fValidarDia(document.frmCajitas.txtInicio.value)){return;} }
	if (document.frmCajitas.txtFin.value != ""){
		if(!fValidarDia(document.frmCajitas.txtFin.value)){return;}
		else{
			if(!fValidarFechas(document.frmCajitas.txtInicio.value,document.frmCajitas.txtFin.value)){return;}
		}
	}
	if (document.frmCajitas.txtFeria.value == ""){alert(fM("IntroduzcaFeria"));return;}
	if (document.frmCajitas.txtFoto.value!="" || document.frmCajitas.hdnBorrar.value!=""){
		if (document.frmCajitas.txtWai.value=="" || document.frmCajitas.txtDWai.value==""){
			alert(fM("IntroduzcaWaiFoto"));return;
		}
	}
	if (document.frmCajitas.txtDescripcion.value == ""){alert(fM("IntroduzcaDescripcion"));return;}
	document.frmCajitas.submit();
}
//*************************************
function fAseguraQuitarImagen (intCodFeria,strIdioma){
	if (confirm(fM("SeguroBorrarImagen"))){
		location.href='index.php?pg=6&CodFeria='+intCodFeria+'&CodIdioma='+strIdioma;
	}else{return;}
}
//*************************************
function fAseguraBorrarFerias (){
	intCuantos=document.frmLista.Cuantos.value;
	i=0;
	sw=0;
	strFerias="";
	if (intCuantos=="1"){
		if (document.frmLista.chkFeria.checked){
			sw=1;
			strFerias = document.frmLista.chkFeria.value;
		}
	}else{
		while (i<intCuantos){
			if (document.frmLista.chkFeria[i].checked){
				if (sw==0){
					strFerias = document.frmLista.chkFeria[i].value;
				}else{
					strFerias = strFerias + "," + document.frmLista.chkFeria[i].value;
				}
				sw=1;
			}
			i++;
		}
	}
	document.frmLista.hdnFerias.value = strFerias;
	if (sw=="1"){
		if (confirm(fM("SeguroBorrarFeriasIdioma"))){document.frmLista.submit();}
		else{return;}
	}else{alert(fM("SeleccioneFeriasBorrar"));return;}	
}
//****************************************
function fAsegurarBorrarFeria (intCodFeria,strIdioma){
	if (confirm(fM("SeguroBorrarFeria"))){
		location.href='index.php?pg=5&CodFeria='+intCodFeria+'&CodIdioma='+strIdioma;
	}else{return;}
}
