var emailAddress="";
function destin() {
var link = "http://www.apollosa.com/rubriche/musica";

var messaggio_iniziale = ""; 

var mittente = document.forms[0].elements[0].value;

var destinatario=document.forms[0].elements[1].value; 

document.forms[0].elements[2].name = messaggio_iniziale; 

funz_destinatario = "mailto:" + destinatario + "?subject=Sito da visitare!";

document.forms[0].action = funz_destinatario; 

document.forms[0].elements[2].value = " Salve! " + mittente + " pensa che questo sito ti potrebbe interessare " + link; // testo che segue il messaggio iniziale

} 

function submitForm() { 
if ( (nome() ) && (email()) ) 
if (confirm("\nIl form sarą spedito a :\n\n"+emailAddress+"\n\n Confermi l'invio?")) 
return true; 
else 
alert("\nHai interrotto l'invio"); 
return false; 
}


function nome() { 
var controlla = document.forms[0].elements[0].value; 
if (controlla == "") { 
alert("\nNon hai inserito il tuo nome.\n\nPer favore inseriscilo.") 
document.forms[0].elements[0].focus(); 
return false; 
} 
return true;
} 

function email() { 
emailAddress=document.forms[0].elements[1].value; 
if (document.forms[0].elements[1].value == ""){ 
alert("\nNon hai inserito l'email del distinatario.") 
document.forms[0].elements[1].focus(); 
return false; 
} 

if (document.forms[0].elements[1].value.indexOf ('@',0) == -1 || document.forms[0].elements[1].value.indexOf ('.',0) == -1) { 
alert("\nL' E-mail deve contenere \"@\" e uno o pił \".\"") 

document.forms[0].elements[1].select(); 
document.forms[0].elements[1].focus(); 
return false; 
} 
else
{ 
destin();
return true; 
} 
} 


function homepage() { 
if(document.all)
document.body.style.behavior='url(#default#homepage)';
document.body.setHomePage('http://www.apollosa.com/rubriche/musica/');
}

var bookmarkurl="http://www.apollosa.com/lapillusia/musica/"
var bookmarktitle="apollosa.com: rubrica musicale"
function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

var stile = "top=10, left=10, width=190, height=350, status=no, menubar=no, toolbar=no scrollbar=no";
function Popup(apri) {
window.open(apri, "", stile);
}


var flashlinks=new Array()

function changelinkcolor(){
for (i=0; i< flashlinks.length; i++){
var flashtype=document.getElementById? flashlinks[i].getAttribute("flashtype")*1 : flashlinks[i].flashtype*1
var flashcolor=document.getElementById? flashlinks[i].getAttribute("flashcolor") : flashlinks[i].flashcolor
if (flashtype==0){
if (flashlinks[i].style.color!=flashcolor)
flashlinks[i].style.color=flashcolor
else
flashlinks[i].style.color=''
}
else if (flashtype==1){
if (flashlinks[i].style.backgroundColor!=flashcolor)
flashlinks[i].style.backgroundColor=flashcolor
else
flashlinks[i].style.backgroundColor=''
}
}
}

function init(){
var i=0
if (document.all){
while (eval("document.all.flashlink"+i)!=null){
flashlinks[i]= eval("document.all.flashlink"+i)
i++
}
}
else if (document.getElementById){
while (document.getElementById("flashlink"+i)!=null){
flashlinks[i]= document.getElementById("flashlink"+i)
i++
}
}
setInterval("changelinkcolor()", 500)
}

if (window.addEventListener)
window.addEventListener("load", init, false)
else if (window.attachEvent)
window.attachEvent("onload", init)
else if (document.all)
window.onload=init

<!--
function expandingWindow(website) {
var windowprops='width=1,height=1,scrollbars=no,status=no,resizable=no,location=no'
var heightspeed = 2;
var widthspeed = 2; 
var leftdist = 20;   
var topdist = 20; 
var lunghezza = 500;
var altezza = 500;

if(lunghezza == 0){
lunghezza = window.screen.availWidth;
		}
if(altezza == 0){
altezza = window.screen.availHeight;
}

if (window.resizeTo&&navigator.userAgent.indexOf("Opera")==-1) {
var winwidth = lunghezza;
var winheight = altezza;
var sizer = window.open("","","left=" + leftdist + ",top=" + topdist +","+ windowprops);
for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed)
sizer.resizeTo("1", sizeheight);
for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed)
sizer.resizeTo(sizewidth, sizeheight);
sizer.location = website;
}
else
window.open(website,'mywindow');
}
// -->
