
<!-- 


var stringa_cliente=""

function apri_privacy(){
var scheda=document.forms.area_psw
var url="info_privacy.html"
stringa="width=600px,height=480px,toolbar=no,location=no,status=no,menuBar=no,scrollBars=yes,resizable=yes,top=100px,left=100px"
window.open(url,'',stringa);

}




function test_email(tag_form){

if(true_email(tag_form)){return}
var scheda=eval(tag_form)//document.forms.info_richiesta


var head = document.getElementsByTagName('head').item(0);
	var scriptTag = document.getElementById('loadScript');
	if (scriptTag) head.removeChild(scriptTag);
	script = document.createElement('script');

	script.src ='get_test_email.asp?email='+scheda.value;
	script.type = 'text/javascript';
	script.id = 'loadScript';
	head.appendChild(script);
alert("controlla la posta se l'indirizzo\n inserito è corretto")
}


function controllo_richiesta(){

stringa_cliente=""
scheda=document.forms.info_richiesta
scheda_email=document.forms.info_richiesta.email

if(scheda.nome.value == "" && scheda.rag_sociale.value == ""){
alert("Il campo 'Nome e Cognome' o 'Ragione Sociale'  è obbligatorio")
scheda.nome.focus()
return
}

if(scheda.nome.value ==""){
scheda.nome.value="-"
}
stringa_cliente+=scheda.nome.value +"|"



if(scheda.cod_fiscale.value ==""){
alert("Codice Fiscale  è obbligatorio")
scheda.cod_fiscale.focus()
return
}


stringa_cliente+=scheda.cod_fiscale.value +"|"

if(scheda.rag_sociale.value != "" && scheda.partita_iva.value == "" ){
alert("Con la Ragione Sociale la Partita Iva è obbligatoria")
scheda.partita_iva.value.focus()
return
}


if(scheda.partita_iva.value == "" ){
scheda.partita_iva.value=" "
}
stringa_cliente+=scheda.partita_iva.value +"|"

if(scheda.rag_sociale.value == "" ){
scheda.rag_sociale.value="-"
}
stringa_cliente+=scheda.rag_sociale.value +"|"



if(scheda.indirizzo.value==""){
alert("Il campo 'Indirizzo' è obbligatorio")
scheda.indirizzo.focus()
return
}
stringa_cliente+=scheda.indirizzo.value +"|"



if(scheda.cap.value==""){
scheda.cap.value=" "

}
stringa_cliente+=scheda.cap.value +"|"



if(scheda.citta.value==""){
alert("Il campo 'citta' è obbligatorio")
scheda.citta.focus()
return
}

stringa_cliente+=scheda.citta.value +"|"


if(scheda.provincia.value==""){
alert("Il campo 'Provincia' è obbligatorio")
scheda.provincia.focus()
return
}
stringa_cliente+=scheda.provincia.value +"|"

if(scheda.nazione.value==""){
scheda.nazione.value="IT"

}
stringa_cliente+=scheda.nazione.value +"|"

if(scheda.telefono.value==""){
scheda.telefono.value=" "
}
stringa_cliente+=scheda.telefono.value +"|"



if(true_email(scheda_email)){return}
stringa_cliente+=scheda.email.value +"|"


if(scheda.nome_sped.value !="" || scheda.indirizzo_sped.value !=""){

if(scheda.nome_sped.value==""){
alert("Nome e Cognome spedizione\n se indirizzo diverso da fattura\n è obbligatorio")
scheda.nome_sped.focus()
return
}


stringa_cliente+=scheda.nome_sped.value +"|"

if(scheda.indirizzo_sped.value==""){
alert("Il campo 'Indirizzo spedizione' è obbligatorio")
scheda.indirizzo_sped.focus()
return
}
stringa_cliente+=scheda.indirizzo_sped.value +"|"


if(scheda.cap_sped.value==""){
scheda.cap_sped.value=" "
stringa_cliente+=" |"
}
stringa_cliente+=scheda.cap_sped.value +"|"


if(scheda.citta_sped.value==""){
alert("Il campo 'Citta spedizione' è obbligatorio")
scheda.citta_sped.focus()
return
}
stringa_cliente+=scheda.citta_sped.value +"|"

if(scheda.provincia_sped.value==""){
alert("Il campo 'Provincia spedizione' è obbligatorio")
scheda.provincia.focus()
return
}
stringa_cliente+=scheda.provincia_sped.value +"|"

if(scheda.nazione_sped.value==""){
scheda.nazione_sped.value="IT"
}
stringa_cliente+=scheda.nazione.value +"|"


}else{
stringa_cliente+= "-|" + "-|" + "-|" + "-|" + "-|" + "-|" 
}

	
if(!scheda.leggi.checked){
alert("Devi acconsentire il trattamento dei dati")
return
}
stringa_cliente+="^"

callServer_paga_ora()

}

var stringa=""

function callServer_paga_ora(){
stringa=""
if( carrello_articoli.length == 0 ){
alert("nessun articolo nel carrello")
return
}

for(var a=0;a < carrello_articoli.length;a++){
stringa+=carrello_articoli[a]+"@"
}
stringa+="^"
for(var a=0;a < carrello_quantita.length;a++){
stringa+=carrello_quantita[a]+"@"
}
stringa+="^"
for(var a=0;a < carrello_prezzo.length;a++){
stringa+=carrello_prezzo[a]+"@"
}
stringa+="^"+stringa_cliente
var obj=""
obj=getLayerObj("olio_8")
moveLayerTo(obj,0,-2000)
var head = document.getElementsByTagName('head').item(0);
	var scriptTag = document.getElementById('loadScript');
	if (scriptTag) head.removeChild(scriptTag);
	script = document.createElement('script');
	
	var asp='articoli='+ stringa +'&sconto='+sconto+'&iva='+iva+"&range_sconto="+ range_sconto +"&spedizione="+spedizione+'&range_spedizione='+range_spedizione;
	
	script.src ='get_dati_riepilogo.asp?'+asp;
	script.type = 'text/javascript';
	script.id = 'loadScript';
	head.appendChild(script);

}

function paga_subito(){

var value=""

var scheda=document.forms.tipo_pago
for(var a=0; a < scheda.carta_bonifico.length;a++){
if(scheda.carta_bonifico[a].checked){
value=scheda.carta_bonifico[a].value
break
}}
if(value== ""){
alert("Selezionare il tipo di pagamento")
return
}
var asp='articoli='+ stringa +'&sconto='+sconto+'&iva='+iva+"&range_sconto="+ range_sconto +"&spedizione="+spedizione+'&range_spedizione='+range_spedizione;

//if (value == "get_paga_postepay.asp?"){return}

var head = document.getElementsByTagName('head').item(0);
	var scriptTag = document.getElementById('loadScript');
	if (scriptTag) head.removeChild(scriptTag);
	script = document.createElement('script');
	
	script.src =value+asp;
	
	
	//script.src ='get_paga_ora.asp?'+asp;
	script.type = 'text/javascript';
	script.id = 'loadScript';
	head.appendChild(script);
	
	
	
}


function paga_subito_con_bonifico(){
var scheda=document.forms.tipo_pago
if (scheda.bonifico.value == ""){
alert("Numero del Bonifico")
scheda.bonifico.focus()
return
}

if (scheda.banca.value == ""){
alert("Nome Istituto Finanziario che ha emesso il bonifico")
scheda.banca.focus()
return
}


var asp='articoli='+ stringa +'&sconto='+sconto+'&iva='+iva+"&range_sconto="+ range_sconto +"&spedizione="+spedizione+'&range_spedizione='+range_spedizione;
	asp+="&bonifico="+ scheda.bonifico.value+"&banca="+scheda.banca.value;

var head = document.getElementsByTagName('head').item(0);
	var scriptTag = document.getElementById('loadScript');
	if (scriptTag) head.removeChild(scriptTag);
	script = document.createElement('script');
	
	script.src ="get_paga_ora_con_bonifico.asp?"+asp;
	
	
	//script.src ='get_paga_ora.asp?'+asp;
	script.type = 'text/javascript';
	script.id = 'loadScript';
	head.appendChild(script);

}



function paga_seguito_con_bonifico(){

var asp='articoli='+ stringa +'&sconto='+sconto+'&iva='+iva+"&range_sconto="+ range_sconto +"&spedizione="+spedizione+'&range_spedizione='+range_spedizione;
	

var head = document.getElementsByTagName('head').item(0);
	var scriptTag = document.getElementById('loadScript');
	if (scriptTag) head.removeChild(scriptTag);
	script = document.createElement('script');
	
	script.src ="get_paga_seguito_con_bonifico.asp?"+asp;
	
	
	//script.src ='get_paga_ora.asp?'+asp;
	script.type = 'text/javascript';
	script.id = 'loadScript';
	head.appendChild(script);

}

function richiama_ordine(url){
var scheda=document.forms.ordine_bonifico
if (scheda.ordine.value == ""){
alert("Codice per richiamare l' ordine")
scheda.ordine.focus()
return
}
scheda.ordine_hidden.value=scheda.ordine.value

var head = document.getElementsByTagName('head').item(0);
	var scriptTag = document.getElementById('loadScript');
	if (scriptTag) head.removeChild(scriptTag);
	script = document.createElement('script');
	
	script.src =url+"?ordine="+scheda.ordine.value;
	
	
	//script.src ='get_paga_ora.asp?'+asp;
	script.type = 'text/javascript';
	script.id = 'loadScript';
	head.appendChild(script);

}

function paga_dopo_con_bonifico(){

var scheda=document.forms.tipo_pago
if (scheda.bonifico.value == ""){
alert("Numero del Bonifico")
scheda.bonifico.focus()
return
}

if (scheda.banca.value == ""){
alert("Nome Istituto Finanziario che ha emesso il bonifico")
scheda.banca.focus()
return
}
var ordine=document.forms.ordine_bonifico.ordine_hidden.value 

var head = document.getElementsByTagName('head').item(0);
	var scriptTag = document.getElementById('loadScript');
	if (scriptTag) head.removeChild(scriptTag);
	script = document.createElement('script');
	
	script.src ="get_paga_dopo_con_bonifico.asp?bonifico="+ scheda.bonifico.value+"&banca="+scheda.banca.value+ "&ordine="+ordine;
	
	
	//script.src ='get_paga_ora.asp?'+asp;
	script.type = 'text/javascript';
	script.id = 'loadScript';
	head.appendChild(script);

}



function paga_dopo_con_postepay(){

var scheda=document.forms.tipo_pago
if (scheda.ufficio_posta.value == ""){
alert("Ufficio postale dove é stato fatto il versamento sulla Carta PostePay")
scheda.ufficio_posta.focus()
return
}


var ordine=document.forms.ordine_bonifico.ordine_hidden.value 

var head = document.getElementsByTagName('head').item(0);
	var scriptTag = document.getElementById('loadScript');
	if (scriptTag) head.removeChild(scriptTag);
	script = document.createElement('script');
	
	script.src ="get_paga_dopo_con_postepay.asp?ufficio_posta="+ scheda.ufficio_posta.value+ "&ordine="+ordine;
	
	
	//script.src ='get_paga_ora.asp?'+asp;
	script.type = 'text/javascript';
	script.id = 'loadScript';
	head.appendChild(script);

}





function reset_form(){
scheda=document.forms.info_richiesta
scheda.nome.value=""  
scheda.cognome.value=""
scheda.email.value=""
scheda.telefono.value=""
scheda.cellulare.value=""
scheda.info.value=""
scheda.leggi.checked=false
alert("controlla la tua posta elettronica,\n se l'indirizzo email è valido\n hai ricvuto un avviso da agenziaimmobilareglobo.it")
}


var alias_w="WEWEWE"
var importo_w=""
var codTrans_w=""
var email_w=""
var mac_w=""

function inserisci_dati(){

var scheda=document.forms.commerce
scheda.alias.value=alias_w
scheda.importo.value=importo_w
scheda.codTrans.value=codTrans_w
scheda.mail.value=document.forms.info_richiesta.email.value
scheda.mac.value=mac_w
scheda.submit()
}



//-->

