// JavaScript Document
function abrir(url) 
{
location.href = url;
}


 
function vacio(q) {   
        for ( i = 0; i < q.length; i++ ) {   
                if ( q.charAt(i) != " " ) {   
                        return true   
                }   
        }   
        return false   
}   
  
 
function valida(F) {   
           
      if( vacio(F.nombre.value) == false ) 
			{   
			alert("Debe indicarnos su NOMBRE para que podamos contestarle")   
			return false   
        	} 
 
	  if( vacio(F.apellidos.value) == false ) 
			{   
			alert("Debe indicarnos sus APELLIDOS para que podamos contestarle")   
			return false   
        	}   
	  
	  if( vacio(F.correo.value) == false ) 
			{   
			alert("Debe indicarnos su CORREO ELECTRONICO para que podamos contestarle")   
			return false   
        	}             
	 
	  if( vacio(F.telefono.value) == false ) 
			{   
			alert("Debe indicarnos su TELEFONO para que podamos contestarle")   
			return false   
        	}  		   
}  


function agregar(){
   if ((navigator.appName=="Microsoft Internet Explorer") && 
         (parseInt(navigator.appVersion)>=4)) {
      var url="http://www.ElTomatito.com/"; 
      var titulo="www.ElTomatito.com";
      window.external.AddFavorite(url,titulo);
   } else { 
      if(navigator.appName == "Netscape") 
         alert("Presione Crtl+D para agregar este sitio en sus Bookmarks"); 
   }
} 


function activa(id,dif)
{
document.getElementById('img'+id).src='imagenes/difActiva_'+dif+'.gif';
}


function desactiva(id,dif)
{
document.getElementById('img'+id).src='imagenes/dif_'+dif+'.gif';
}


function activaRct(id,dif)
{
document.getElementById('img'+id).src='../imagenes/difActiva_'+dif+'.gif';
}


function desactivaRct(id,dif)
{
document.getElementById('img'+id).src='../imagenes/dif_'+dif+'.gif';
}
