function homepage() { 
if(document.all)
document.body.style.behavior='url(#default#homepage)';
document.body.isHomePage ('http://explora.altervista.org');
}



var bookmarkurl="http://explora.altervista.org"
var bookmarktitle="Explor@ Home Page"
function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}





// Prelevato su http://www.web-link.it
// (C) 2000 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this header
var good;
 var url = "http://explora.altervista.org";

function checkEmailAddress(field) {
var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);
if (goodEmail){
   good = true
} else {
   alert('Inserire un indirizzo e-mail valido.')
   field.focus();
   field.select();
   good = false;
  }
}

//u = window.location;
 u = url;
m = "Ti segnalo questo sito";
function mailThisUrl(){
   good = false
   checkEmailAddress(document.eMailer.address)
   if (good){
      //window.location = "mailto:"+document.eMailer.address.value+"?subject="+m+"&body="+document.title+" "+u;
      window.location = "mailto:"+document.eMailer.address.value+"?subject="+m+"&body="+"Ti segnalo il sito Explor@"+" "+u;

   }
}



function Email() {

var dest_email = document.modulo.dest_email.value;
var mitt_email = document.modulo.mitt_email.value;
var mitt_nome = document.modulo.mitt_nome.value;
var oggetto = document.modulo.oggetto.value; 
var messaggio = document.modulo.msg.value; 

if ((mitt_nome == "") || (mitt_nome == "undefined")) {
alert("Inserire nome.");
document.modulo.mitt_nome.focus();
}
else if ((mitt_email.indexOf("@") == (-1)) || (mitt_email == "") || (mitt_email == "undefined")) {
alert("Inserire un indirizzo email valido.");
document.modulo.mitt_email.focus();
}
else if ((oggetto == "") || (oggetto == "undefined")) {
alert("Inserire un oggetto.");
document.modulo.oggetto.focus();
}
else if ((messaggio == "") || (messaggio == "undefined")) {
alert("Inserire un messaggio.");
document.modulo.messaggio.focus();
}
else {
location.href = "mailto:" + dest_email + "?Subject=" + oggetto + "&Body=Messaggio: " + " [ mittente: " + mitt_nome + ", " + mitt_email + " ]"+ messaggio ;
}
}

