b1=new Image(93,32)
b1.src="/bottoni/bottonebianco1.gif"
b2=new Image(93,32)
b2.src="/bottoni/bottoneblu1.gif"
b4=new Image(93,32)
b4.src="/bottoni/bottonebianco2.gif"
b5=new Image(93,32)
b5.src="/bottoni/bottoneblu2.gif"
b7=new Image(93,32)
b7.src="/bottoni/bottonebianco3.gif"
b8=new Image(93,32)
b8.src="/bottoni/bottoneblu3.gif"
b10=new Image(93,32)
b10.src="/bottoni/bottonebianco4.gif"
b11=new Image(93,32)
b11.src="/bottoni/bottoneblu4.gif"
b13=new Image(93,32)
b13.src="/bottoni/bottonebianco5.gif"
b14=new Image(93,32)
b14.src="/bottoni/bottoneblu5.gif"

function filter(imagename,objectsrc){
if (document.images)
document.images[imagename].src=eval(objectsrc+".src")
}

function controllo0(){
if (document.form0.command.value.length < 3){
alert("Inserire almeno tre caratteri!")
return false
}
}
function controllo1(){
if (document.form1.command.value.length < 3){
alert("Inserire almeno tre caratteri!")
return false
}
}
function controllo2(){
if (document.form2.dominio.value.length < 3){
alert("Inserire almeno tre caratteri!")
return false
}
}
function controllo3(){
if (document.form3.dominio.value.length < 3){
alert("Inserire almeno tre caratteri!")
return false
}
}
function controllo4(){
if (document.form4.ut.value.length < 1){
alert("Inserire un username valido!")
return false
}
if (document.form4.pw.value.length < 1){
alert("Inserire una password valida!")
return false
}
}
function controllo4bis(){
if (document.form4bis.ut.value.length < 1){
alert("Inserire un username valido!")
return false
}
if (document.form4bis.pw.value.length < 1){
alert("Inserire una password valida!")
return false
}
}
function controllo5(){
if (document.form5.dominio.value.length < 3 || document.form5.dominio.value.length > 63){
alert("Inserire un nome di dominio valido!")
return false
}
}
function controllo6(){
if (document.form6.Nome_dominio.value.length < 1){
alert("Inserire un nome di dominio valido!")
return false
}
}
function controllo10(){
if (document.form10.ut.value.length < 1){
alert("Inserire un username valido!")
return false
}
if (document.form10.pw.value.length < 1){
alert("Inserire una password valida!")
return false
}
if (document.form10.dominio.value.length < 1){
alert("Inserire un dominio esistente!")
return false
}
}
function codiceFISCALE(cfins)
{
var cf = cfins.toUpperCase();
var cfReg = /^[A-Z]{6}\d{2}[A-Z]\d{2}[A-Z]\d{3}[A-Z]$/;
if (!cfReg.test(cf))
return false;
var set1 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
var set2 = "ABCDEFGHIJABCDEFGHIJKLMNOPQRSTUVWXYZ";
var setpari = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
var setdisp = "BAKPLCQDREVOSFTGUHMINJWZYX";
var s = 0;
for( i = 1; i <= 13; i += 2 )
s += setpari.indexOf( set2.charAt( set1.indexOf( cf.charAt(i) )));
for( i = 0; i <= 14; i += 2 )
s += setdisp.indexOf( set2.charAt( set1.indexOf( cf.charAt(i) )));
if ( s%26 != cf.charCodeAt(15)-'A'.charCodeAt(0) )
return false;
return true;
}
function controllo7()
{
var CFok=codiceFISCALE(document.form7.Codice_fiscale.value)
if (CFok==false)
{
alert("Inserisci il tuo Codice Fiscale corretto!");
return false;
}
else
return true;
}
function trasferimento0(){
if (document.form8.command.value.length < 3){
alert("Inserire almeno tre caratteri!")
return false
}
}
function domanda0(){
if (document.form9.domanda.value.length < 3){
alert("Inserire almeno tre caratteri!")
return false
}
}
function verifica0(){
if (document.form11.command.value.length < 3){
alert("Inserire almeno tre caratteri!")
return false
}
}
immagine01 = "/immagini/on.gif"  
immagine02 = "/immagini/off.gif"

function imgover(imgname){
imgname.src = immagine01
}

function imgout(imgname){
imgname.src = immagine02
}

function put(what) {
if (what == "choose a command") {
}
else
{
eval("ncirc = document.form3." + what + ".value")
ncirc = ncirc
old = form3.dominio.value
form3.dominio.value = old + ncirc
}
}

MaDate = new Date;
heure = MaDate.getHours();
function MessageParDate()
{
if (heure>=0 && heure<=4)
{
MessageB = '<img border="0" src="/loghi/logo_ore0.gif" width="301" height="75" alt="SoloDomini.it - L\'\Hosting fatto apposta per te!">';
}
if (heure>4 && heure<8)
{
MessageB = '<img border="0" src="/loghi/logo_ore8.gif" width="301" height="75" alt="SoloDomini.it - L\'\Hosting fatto apposta per te!">';
}
if (heure>=8 && heure<11)
{
MessageB = '<img border="0" src="/loghi/logo_ore10.gif" width="301" height="75" alt="SoloDomini.it - L\'\Hosting fatto apposta per te!">';
}
if (heure>=11 && heure<14)
{
MessageB = '<img border="0" src="/loghi/logo_ore12.gif" width="301" height="75" alt="SoloDomini.it - L\'\Hosting fatto apposta per te!">';
}
if (heure>=14 && heure<17)
{
MessageB = '<img border="0" src="/loghi/logo_ore15.gif" width="301" height="75" alt="SoloDomini.it - L\'\Hosting fatto apposta per te!">';
}
if (heure>=17 && heure<18)
{
MessageB = '<img border="0" src="/loghi/logo.gif" width="301" height="75" alt="SoloDomini.it - L\'\Hosting fatto apposta per te!">';
}
if (heure>=18 && heure<21)
{
MessageB = '<img border="0" src="/loghi/logo_ore19.gif" width="301" height="75" alt="SoloDomini.it - L\'\Hosting fatto apposta per te!">';
}
if (heure>=21 && heure<=23)
{
MessageB = '<img border="0" src="/loghi/logo_ore21.gif" width="301" height="75" alt="SoloDomini.it - L\'\Hosting fatto apposta per te!">';
}
return MessageB;
}

function help() {
window.confirm("___---***SERVIZIO DI REGISTRAZIONE DOMINI E HOSTING DI SOLODOMINI.IT***---___\n\nPer registrare o trasferire un dominio devi verificare se è disponibile o se è già stato registrato\nda una terza persona. Può accadere che domini disponibili al momento della ricerca siano, in\nrealtà, già in fase di registrazione poichè richiesti da terzi. Le richieste vengono evase secondo\nl'ordine cronologico di arrivo a SoloDomini.it. Inserisci il nome di dominio che intendi registrare\nnegli appositi campi di richiesta. La ricerca verrà effettuata in base all'estensione selezionata.\n\nIl tempo medio per l'attivazione del servizio richiesto è di 5 giorni lavorativi."); 
}
function helpdomini() {
window.confirm("Per selezionare un'offerta od un servizio clicca su 'ORDINA'.\nAd ogni passaggio puoi vedere i prodotti selezionati, relativo importo, subtotale, iva e totale.\nL'ordine deve rispettare questi passaggi:\n1) Conferma l'estensione (Classe) del dominio da registrare (Es. Domini P0, P1, P2, P3, P4, P5).\n2) Aggiungi UNA SOLA offerta al dominio scelto (Offerte D0, D1, R0, H0, W0, L0, WL) o procedi al pagamento.\n3) Aggiungi UNO o PIU' servizi aggiuntivi opzionali (Es. Servizi EM, VS, ST, MY, AD, GM) o procedi al pagamento.");
window.confirm("ES. PER REG.DOMINIO(.IT) + SPAZIO ILL. WINDOWS + 6 MAIL + EMAIL ILLIMITATE SCEGLI: P0, W0, e EM.\nTutte le offerte ed i servizi aggiuntivi opzionali selezionati hanno la stessa scadenza del dominio. Attivato il dominio potrai convertire un'offerta in un'altra al costo (UNA TANTUM) indicato nella sezione 'Cambio offerta'. Selezionate le offerte che vuoi acquistare compila il modulo con i tuoi dati, scegli la modalità di pagamento, e clicca su - ORDINA ORA! -");
}
