function favoritos() {if (navigator.appName=="Netscape") {window.sidebar.addPanel("Infaplic","http://www.infaplic.es",""); }if (navigator.appName=="Microsoft Internet Explorer"){window.external.AddFavorite("http://www.infaplic.es","Infaplic");}}
function inicio(este) {este.style.behavior='url(#default#homepage)';este.setHomePage('http://www.infaplic.es');}


function ampliar(pagina)
{
	var ventana = window.open( pagina , "" , " width=693 , height=543 , scrollbars=no , resizable=no , status=no" );
	ventana.focus();
}



function validar(thisform) 
{ 

	if (document.getElementById("entidad").value=="")
	{
		alert("Indique la entidad a la cual pertenece."); 
		document.getElementById("entidad").focus();
		return false;
	}
	if (document.getElementById("persona").value=="")
	{
		alert("Indique el nombre y apellido de la persona de contacto."); 
		document.getElementById("persona").focus();
		return false;
	}
	if (document.getElementById('email').value=="") 
	{ 
		alert("Indique un email o teléfono de contacto."); 
		document.getElementById('email').focus();
		return false;
	}
	/*else
	{
		if (echeck(document.getElementById('email').value)==false)
		{
		document.getElementById('email').value="";
		document.getElementById('email').focus();
		return false;
		}
	}*/
	if (document.getElementById("comentarios").value=="")
	{
		alert("Introduzca los comentarios que quiera hacernos llegar."); 
		document.getElementById("comentarios").focus();
		return false;
	}
	
	
document.getElementById('f').submit();
}//
		
		
		
		
function echeck(str) {
var mensajedeerror ="Por favor, introduzca un formato correcto de email";
var at="@" 
var dot="." 
var lat=str.indexOf(at) 
var lstr=str.length 
var ldot=str.indexOf(dot) 
if (str.indexOf(at)==-1){ 
   alert(mensajedeerror) ;
   return false ;
}
if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){ 
   alert(mensajedeerror) ;
   return false ;
}
if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr)
{
   alert(mensajedeerror) ;
   return false ;
}
 if (str.indexOf(at,(lat+1))!=-1){ 
   alert(mensajedeerror) ;
   return false ;
 } 
 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){ 
   alert(mensajedeerror) ;
   return false ;
 }
 if (str.indexOf(dot,(lat+2))==-1){ 
   alert(mensajedeerror) ;
   return false ;
 }
 if (str.indexOf(" ")!=-1){
   alert(mensajedeerror) ;
   return false ;
 }
 return true;
}		


function modulo (este)
{

	cajam = document.getElementById("caja_m");
	cajab = document.getElementById("caja_b");

 



	if		( cajam.style.display=="" ){cajam.style.display="block"  ; }
	else if	( cajam.style.display=="none" ){cajam.style.display="block"  ; }
	else if	( cajam.style.display=="block" ){cajam.style.display="none"  ; }

	if		( cajab.style.display=="" ){cajab.style.display="block"  ; }
	else if	( cajab.style.display=="none" ){cajab.style.display="block"  ; }
	else if	( cajab.style.display=="block" ){cajab.style.display="none"  ; }

}



