//Indirizzo mail criptato
function sendmail(){var u_c2="cal";var u_a="mail";var u_c="mas";var u_e="mascal";var u_d="@";var u_f=".it";var u_b="to:";parent.location=u_a + u_b + u_c + u_c2 + u_d + u_e + u_f;}
//Carica le novità del sito dal feed rss
function LoadNews(){if (window.XMLHttpRequest){xmlhttp=new XMLHttpRequest();}else{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}xmlhttp.open("GET","http://www.mascal.it/news.xml",false);xmlhttp.send();xmlDoc=xmlhttp.responseXML;var html = 'Ultimo aggiornamento ';var dats = xmlDoc.documentElement.getElementsByTagName('lastBuildDate');var dt = new Date(dats[0].childNodes[0].nodeValue);html += dt.toLocaleString();var nodes = xmlDoc.documentElement.getElementsByTagName('item');for (var i=0; i < nodes.length;  i++)  {for (var j=0; j<nodes[i].childNodes.length; j++) {if (nodes[i].childNodes[j].nodeName=="title") {var tit=nodes[i].childNodes[j].childNodes[0].nodeValue;}if (nodes[i].childNodes[j].nodeName=="link") {var lnk=nodes[i].childNodes[j].childNodes[0].nodeValue;}}html+=' - - - <a href="' + lnk + '">' + tit + '</a>';}document.getElementById('news').innerHTML=html;}
//Carica il filmato specificato nel blocco scelto
function LoadVideo(filmato) {var so = new SWFObject('scripts/player.swf','mpl','320','240','8');so.addParam('allowscriptaccess','always');so.addParam('allowfullscreen','true');so.addVariable('height','240');so.addVariable('width','320');so.addVariable('file','../video/'+filmato+'.flv');so.addVariable('image','video/'+filmato+'.jpg');so.addVariable('searchbar','false');so.addVariable('autostart','false');so.write(filmato);}
//Gestione degli eventi da calendario
function CheckDate(dataevento,descrizione){now = new Date();tst = new Date(dataevento.substr(6,4),dataevento.substr(3,2)-1,dataevento.substr(0,2));t1 = now.getTime();t2 = tst.getTime()+(24*60*60*1000);if (t1<t2) {found=1; document.write('<b>'+dataevento+'</b> - '+descrizione+'<br/>');}}
