﻿// funzione giorno e ora
function ScriviDataOra() {

var mesi = new Array("Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre");
var nomeGiorno = new Array('Domenica','Lunedi','Martedi','Mercoledi','Giovedi','Venerdi','Sabato');

Data = new Date()
Giorno = Data.getDate()
Mese = Data.getMonth()
Anno = Data.getFullYear()
Ore = Data.getHours()
Minuti = Data.getMinutes()
Secondi = Data.getSeconds()
if (Ore < 10) Ore = "0" + Ore
if (Giorno < 10) Giorno = "0" + Giorno
if (Minuti < 10) Minuti = "0" + Minuti
if (Secondi < 10) Secondi = "0" + Secondi
messaggio = "Un fraterno saluto in Don Bosco alle ore " + Ore + ":" + Minuti + "." + Secondi + " di " + nomeGiorno[Data.getDay()] + " " + Giorno + " " + mesi[Mese] + " " + Anno + "<br>" 

if(!document.layers){+ " "
  aggsec = setTimeout("ScriviDataOra();",1000);}
if (document.getElementById){+ " "
    document.getElementById('clock').innerHTML=messaggio;}
else if (document.all){
    document.all.clock.innerHTML=messaggio;}
else if(document.layers){
    document.write(messaggio);}
}
// Prelevato su http://www.web-link.it
function TransposeW(String){
var email ='osteria-ilfrantoio.it@postmaster'
var TempBefore = '';
var TempAfter = '';
var NewString = '';
var Start = 0;
var WhereHash = email.indexOf ('@');
for (Count = 1; Count <= WhereHash; Count ++){
TempBefore += email.substring (Start, Count);
Start++
}
Start = WhereHash;
Start ++
WhereHash +=2;
for (Count = WhereHash; Count <=email.length; Count++){
TempAfter +=email.substring (Start, Count)
Start++
}
NewString = TempAfter +'@' + TempBefore;
parent.location = 'mailto:'+NewString;
}
function TransposeG(String){
var email ='osteria-ilfrantoio.it@gregorio'
var TempBefore = '';
var TempAfter = '';
var NewString = '';
var Start = 0;
var WhereHash = email.indexOf ('@');
for (Count = 1; Count <= WhereHash; Count ++){
TempBefore += email.substring (Start, Count);
Start++
}
Start = WhereHash;
Start ++
WhereHash +=2;
for (Count = WhereHash; Count <=email.length; Count++){
TempAfter +=email.substring (Start, Count)
Start++
}
NewString = TempAfter +'@' + TempBefore;
parent.location = 'mailto:'+NewString;
}
function TransposeP(String){
var email ='osteria-ilfrantoio.it@pietro'
var TempBefore = '';
var TempAfter = '';
var NewString = '';
var Start = 0;
var WhereHash = email.indexOf ('@');
for (Count = 1; Count <= WhereHash; Count ++){
TempBefore += email.substring (Start, Count);
Start++
}
Start = WhereHash;
Start ++
WhereHash +=2;
for (Count = WhereHash; Count <=email.length; Count++){
TempAfter +=email.substring (Start, Count)
Start++
}
NewString = TempAfter +'@' + TempBefore;
parent.location = 'mailto:'+NewString;
}


