//===========================================================================
//ESPRESSIONI REGOLARI UTILIZZATE NELLE FUNZIONI DI VALIDAZIONE
//===========================================================================
var re_emptyall = new RegExp("^[ ]*$");
var re_emptyfirst = new RegExp("^[ ]");
var re_emptylast = new RegExp("[ ]$");
var re_empty = new RegExp("[ ]");
var re_number = new RegExp("[0-9]");
var re_not_number = new RegExp("[^0-9]");
var re_login_pwd = new RegExp("[^a-zA-Z0-9\_\.]");
var re_year = new RegExp("[0-9]{4}");
var re_prov = new RegExp("([a-z]|[A-Z]){2}");
var re_numcell1 = new RegExp("[0-9]{7}");
var re_numcell2 = new RegExp("[0-9]{8}");
var re_not_isAlpha = new RegExp("[^a-zA-Z ]");
var re_not_isAlphaNum = new RegExp("[^a-zA-Z0-9 ]");
var re_val_price = new RegExp("[^0-9\,]");
//===========================================================================
//*
//*
//===========================================================================
//CONTROLLI SUL FORM REGISTRAZIONE CLIENTI 
//===========================================================================

function  FORMCLIENTI()
{
if (document.ModuloClienti.Nome.value=="") 
	{
	alert("Inserisci nome");
	document.ModuloClienti.Nome.focus();
	return false;
	}
if (document.ModuloClienti.Cognome.value=="") 
	{
	alert("Inserisci cognome");
	document.ModuloClienti.Cognome.focus();
	return false;
	}
if (document.ModuloClienti.Indirizzo.value=="") 
	{
	alert("Inserisci indirizzo");
	document.ModuloClienti.Indirizzo.focus();
	return false;
	}
if (document.ModuloClienti.Citta.value=="") 
	{
	alert("Inserisci citta");
	document.ModuloClienti.Citta.focus();
	return false;
	}
if (document.ModuloClienti.Provincia.value=="") 
	{
	alert("inserisci Provincia");
	document.ModuloClienti.Provincia.focus();
	return false;
	}	
var Cap = document.ModuloClienti.Cap.value;
  if((re_not_number.Cap || Cap.length < 5)) {
  alert("Il CAP inserito deve contenere 5 numeri");
  document.ModuloClienti.Cap.focus();
  return false;
  }
var Telefono = document.ModuloClienti.Telefono.value;
   if((re_not_number.Telefono || Telefono.length < 7)) {
  alert("Inserire un numero valido per il Telefono");
  document.ModuloClienti.Telefono.focus();
  return false;
  }	
if (document.ModuloClienti.Email=="")
    {
	alert("Inserisci email.");
	document.ModuloClienti.Email.focus();
	return false;
    }
if (document.ModuloClienti.Email.value.indexOf("@") == -1)
   {
   alert("Email non valida");
   document.ModuloClienti.Email.focus();            
   return false;
   }
if (document.ModuloClienti.Email.value.indexOf(".") == -1)
   {
   alert("Email non valida");
   document.ModuloClienti.Email.focus();            
   return false;
   }   
var User = document.ModuloClienti.User.value;
if (re_empty.User || User.length < 5 || User.length > 20) {
alert("Il Nome Utente deve essere min 5 e max 20 caratteri");
document.ModuloClienti.User.focus();
return false;
}
if(re_login_pwd.User){
alert("Il Nome Utente puo\' contenere solo lettere, numeri, \"_\" o \".\"");
document.ModuloClienti.User.focus();
return false;
}
var PasswordUno = document.ModuloClienti.PasswordUno.value;
if (re_empty.PasswordUno || PasswordUno.length < 4 || PasswordUno.length > 8) {
alert("La password deve essere min 4 max 8 caratteri ");
document.ModuloClienti.PasswordUno.focus();
return false;
}
if(re_login_pwd.PasswordUno){
alert("La password puo\' contenere solo lettere, numeri, \"_\" o \".\"");
document.ModuloClienti.PasswordUno.focus();
return false;
}
//Controllo sulla Password2
var PasswordDue = document.ModuloClienti.PasswordDue.value;
if (PasswordDue != PasswordUno) {
alert("Le due Password inserite non corrispondono");
document.ModuloClienti.PasswordDue.focus();
return false;
}
}	
//===========================================================================
//*
//*	
//===========================================================================
//===========================================================================
//CONTROLLI SUL FORM REGISTRAZIONE CLIENTI MODIFICA
//===========================================================================

function  FORMCLIENTIMOD()
{
if (document.ModuloClienti.Nome.value=="") 
	{
	alert("Inserisci nome");
	document.ModuloClienti.Nome.focus();
	return false;
	}
if (document.ModuloClienti.Cognome.value=="") 
	{
	alert("Inserisci cognome");
	document.ModuloClienti.Cognome.focus();
	return false;
	}
if (document.ModuloClienti.Indirizzo.value=="") 
	{
	alert("Inserisci indirizzo");
	document.ModuloClienti.Indirizzo.focus();
	return false;
	}
if (document.ModuloClienti.Citta.value=="") 
	{
	alert("Inserisci citta");
	document.ModuloClienti.Citta.focus();
	return false;
	}
if (document.ModuloClienti.Provincia.value=="") 
	{
	alert("inserisci Provincia");
	document.ModuloClienti.Provincia.focus();
	return false;
	}	
var Cap = document.ModuloClienti.Cap.value;
  if((re_not_number.Cap || Cap.length < 5)) {
  alert("Il CAP inserito deve contenere 5 numeri");
  document.ModuloClienti.Cap.focus();
  return false;
  }
var Telefono = document.ModuloClienti.Telefono.value;
   if((re_not_number.Telefono || Telefono.length < 7)) {
  alert("Inserire un numero valido per il Telefono");
  document.ModuloClienti.Telefono.focus();
  return false;
  }	
if (document.ModuloClienti.Email=="")
    {
	alert("Inserisci email.");
	document.ModuloClienti.Email.focus();
	return false;
    }
if (document.ModuloClienti.Email.value.indexOf("@") == -1)
   {
   alert("Email non valida");
   document.ModuloClienti.Email.focus();            
   return false;
   }
if (document.ModuloClienti.Email.value.indexOf(".") == -1)
   {
   alert("Email non valida");
   document.ModuloClienti.Email.focus();            
   return false;
   }   
}	
//===========================================================================
//*
//*
//===========================================================================
//CONTROLLI SUL FORM REGISTRAZIONE CLIENTI MODIFICA
//===========================================================================

function  FORMCLIENTIPASS()
{
 var User = document.ModuloClienti.User.value;
 if (re_empty.User || User.length < 5 || User.length > 20) {
    alert("Il Nome Utente deve essere min 5 e max 20 caratteri");
    document.ModuloClienti.User.focus();
 return false;
 }
var PasswordNew = document.ModuloClienti.PasswordNew.value;
if (re_empty.PasswordNew || PasswordNew.length < 4 || PasswordNew.length > 8) {
alert("La nuova password deve essere min 4 max 8 caratteri ");
document.ModuloClienti.PasswordNew.focus();
return false;
}


}	
//===========================================================================
//*
//*	
//===========================================================================
//===========================================================================
//CONTROLLI SUL FORM REGISTRAZIONE CLIENTI AZIENDA 
//===========================================================================
function  FORMCLIENTIAZIENDA()
{
if (document.ModuloClienti.RagioneSociale.value=="") 
	{
	alert("Inserisci Ragione Sociale");
	document.ModuloClienti.RagioneSociale.focus();
	return false;
	}
if (document.ModuloClienti.Nome.value=="") 
	{
	alert("Inserisci nome");
	document.ModuloClienti.Nome.focus();
	return false;
	}
if (document.ModuloClienti.Cognome.value=="") 
	{
	alert("Inserisci cognome");
	document.ModuloClienti.Cognome.focus();
	return false;
	}
if (document.ModuloClienti.Indirizzo.value=="") 
	{
	alert("Inserisci indirizzo");
	document.ModuloClienti.Indirizzo.focus();
	return false;
	}
if (document.ModuloClienti.Citta.value=="") 
	{
	alert("Inserisci citta");
	document.ModuloClienti.Citta.focus();
	return false;
	}
if (document.ModuloClienti.Provincia.value=="") 
	{
	alert("inserisci Provincia");
	document.ModuloClienti.Provincia.focus();
	return false;
	}	
var Cap = document.ModuloClienti.Cap.value;
  if((re_not_number.Cap || Cap.length < 5)) {
  alert("Il CAP inserito deve contenere 5 numeri");
  document.ModuloClienti.Cap.focus();
  return false;
  }
var Telefono = document.ModuloClienti.Telefono.value;
   if((re_not_number.Telefono || Telefono.length < 7)) {
  alert("Inserire un numero valido per il Telefono");
  document.ModuloClienti.Telefono.focus();
  return false;
  }
var iva = document.ModuloClienti.Piva.value;
   if((re_not_number.iva || iva.length < 11)) {
  alert("Inserire un numero valido per la Partita Iva");
  document.ModuloClienti.Piva.focus();
  return false;
  }

if (document.ModuloClienti.Email=="")
    {
	alert("Inserisci email.");
	document.ModuloClienti.Email.focus();
	return false;
    }
if (document.ModuloClienti.Email.value.indexOf("@") == -1)
   {
   alert("Email non valida");
   document.ModuloClienti.Email.focus();            
   return false;
   }
if (document.ModuloClienti.Email.value.indexOf(".") == -1)
   {
   alert("Email non valida");
   document.ModuloClienti.Email.focus();            
   return false;
   }   
var User = document.ModuloClienti.User.value;
if (re_empty.User || User.length < 5 || User.length > 20) {
alert("Il Nome Utente deve essere min 5 e max 20 caratteri");
document.ModuloClienti.User.focus();
return false;
}
if(re_login_pwd.User){
alert("Il Nome Utente puo\' contenere solo lettere, numeri, \"_\" o \".\"");
document.ModuloClienti.User.focus();
return false;
}
var PasswordUno = document.ModuloClienti.PasswordUno.value;
if (re_empty.PasswordUno || PasswordUno.length < 4 || PasswordUno.length > 8) {
alert("La password deve essere min 4 max 8 caratteri ");
document.ModuloClienti.PasswordUno.focus();
return false;
}
if(re_login_pwd.PasswordUno){
alert("La password puo\' contenere solo lettere, numeri, \"_\" o \".\"");
document.ModuloClienti.PasswordUno.focus();
return false;
}
//Controllo sulla Password2
var PasswordDue = document.ModuloClienti.PasswordDue.value;
if (PasswordDue != PasswordUno) {
alert("Le due Password inserite non corrispondono");
document.ModuloClienti.PasswordDue.focus();
return false;
}
}	
//===========================================================================
//*
//*
//===========================================================================
//CONTROLLI SUL FORM REGISTRAZIONE CLIENTI AZIENDA MODIFICA
//===========================================================================
function  FORMCLIENTIAZIENDAMOD()
{
if (document.ModuloClienti.RagioneSociale.value=="") 
	{
	alert("Inserisci Ragione Sociale");
	document.ModuloClienti.RagioneSociale.focus();
	return false;
	}
if (document.ModuloClienti.Nome.value=="") 
	{
	alert("Inserisci nome");
	document.ModuloClienti.Nome.focus();
	return false;
	}
if (document.ModuloClienti.Cognome.value=="") 
	{
	alert("Inserisci cognome");
	document.ModuloClienti.Cognome.focus();
	return false;
	}
if (document.ModuloClienti.Indirizzo.value=="") 
	{
	alert("Inserisci indirizzo");
	document.ModuloClienti.Indirizzo.focus();
	return false;
	}
if (document.ModuloClienti.Citta.value=="") 
	{
	alert("Inserisci citta");
	document.ModuloClienti.Citta.focus();
	return false;
	}
if (document.ModuloClienti.Provincia.value=="") 
	{
	alert("inserisci Provincia");
	document.ModuloClienti.Provincia.focus();
	return false;
	}	
var Cap = document.ModuloClienti.Cap.value;
  if((re_not_number.Cap || Cap.length < 5)) {
  alert("Il CAP inserito deve contenere 5 numeri");
  document.ModuloClienti.Cap.focus();
  return false;
  }
var Telefono = document.ModuloClienti.Telefono.value;
   if((re_not_number.Telefono || Telefono.length < 7)) {
  alert("Inserire un numero valido per il Telefono");
  document.ModuloClienti.Telefono.focus();
  return false;
  }
var iva = document.ModuloClienti.Piva.value;
   if((re_not_number.iva || iva.length < 11)) {
  alert("Inserire un numero valido per la Partita Iva");
  document.ModuloClienti.Piva.focus();
  return false;
  }
if (document.ModuloClienti.Email=="")
    {
	alert("Inserisci email.");
	document.ModuloClienti.Email.focus();
	return false;
    }
if (document.ModuloClienti.Email.value.indexOf("@") == -1)
   {
   alert("Email non valida");
   document.ModuloClienti.Email.focus();            
   return false;
   }
if (document.ModuloClienti.Email.value.indexOf(".") == -1)
   {
   alert("Email non valida");
   document.ModuloClienti.Email.focus();            
   return false;
   }   
}	
//===========================================================================
//*
//*
//===========================================================================
//POPUP INFORMATIVA PRIVACY
//===========================================================================
function PopUpInfo(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=yes,location=0,statusbar=0,menubar=0,resizable=0,width=479,height=200');");
}
//===========================================================================
//===========================================================================
//CONTROLLI SUL FORM INSERISCI MODALITA PAGAMENTO 
//===========================================================================	
function  FORMPAGAMENTI()
{
 if (document.Modulo_Pagamenti.FrmNomePagamento.value=="") 
	{
	alert("Inserisci nome pagamento");
	document.Modulo_Pagamenti.FrmNomePagamento.focus();
	return false;
	}
}
//===========================================================================
//*
//*	
//===========================================================================
//CONTROLLI SUL FORM INSERISCI MODALITA SPEDIZIONI 
//===========================================================================	
function  FORMSPEDIZIONI()
{
 if (document.Modulo_Spedizioni.FrmNomeSpedizione.value=="") 
	{
	alert("Inserisci nome spedizione");
	document.Modulo_Spedizioni.FrmNomeSpedizione.focus();
	return false;
	}
}
//===========================================================================
//*
//*	
//===========================================================================
//CONTROLLI SUL FORM CATEGORIE PRODOTTI
//===========================================================================	
function  FORMCATEGORIEPRODOTTI()
{
 if (document.Modulo_Categoria_Prodotti.FrmNomeCategoria.value=="") 
	{
	alert("Inserisci nome categoria !");
	document.Modulo_Categoria_Prodotti.FrmNomeCategoria.focus();
	return false;
	}
}
//===========================================================================
//CONTROLLI SUL FORM STORE
//===========================================================================	
function  FORMSTORE()
{
 if (document.Modulo_Tipologia_Store.FrmNomeStore.value=="") 
	{
	alert("Inserisci tipologia negozio !");
	document.Modulo_Tipologia_Store.FrmNomeStore.focus();
	return false;
	}
}

//===========================================================================
//*
//*
//===========================================================================
//CONTROLLI SUL FORM MARCA PRODOTTI
//===========================================================================	
function  FORMMARCAPRODOTTI()
{
 if (document.Modulo_Marca_Prodotti.FrmNomeMarca.value=="") 
	{
	alert("Inserisci nome marca !");
	document.Modulo_Marca_Prodotti.FrmNomeMarca.focus();
	return false;
	}
}
//===========================================================================
//*
//*	
//===========================================================================
//CONTROLLI SUL FORM SOTTO CATEGORIE PRODOTTI
//===========================================================================	
function  FORMSOTTOCATEGORIEPRODOTTI()
{
 if (document.Modulo_SottoCategoria_Prodotti.FrmNomeSottoCategoria.value=="") 
	{
	alert("Inserisci nome sotto categoria !");
	document.Modulo_SottoCategoria_Prodotti.FrmNomeSottoCategoria.focus();
	return false;
	}
}
//===========================================================================
//*
//*	
//===========================================================================
//POPUP INSERISCI IMMAGINE PRODOTTO
//===========================================================================
function PopUpAddImageProduct(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=no,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=200');");
}
//===========================================================================
//*
//*
//===========================================================================
//CONTROLLI SUL FORM INSERISCI IMMAGINE PRODOTTO
//===========================================================================
function  FORMIMGPRODOTTO()
{
	if (document.img.blob.value=="") 
	{
	alert("Devi scegliere un'immagine.");
	document.img.blob.focus();
	return false;
	}
}
//===========================================================================
//*
//*	
//===========================================================================
//POPUP INSERISCI ALLEGATO PRODOTTO
//===========================================================================
function PopUpAddAttachProduct(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=no,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=200');");
}
//===========================================================================
//*
//*
//===========================================================================
//CONTROLLI SUL FORM INSERISCI ALLEGATO PRODOTTO
//===========================================================================
function  FORMATTACHPRODOTTO()
{
	if (document.Attach.blob.value=="") 
	{
	alert("Devi scegliere un allegato.");
	document.Attach.blob.focus();
	return false;
	}
}
//===========================================================================
//*
//*	
//===========================================================================
//POPUP INSERISCI DESCRIZIONE PRODOTTO
//===========================================================================
function PopUpAddDescriptionProduct(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=no,location=0,statusbar=0,menubar=0,resizable=0,width=800,height=700');");
}
//===========================================================================
//*
//*
//===========================================================================
//*
//*	
//===========================================================================
//CONTROLLI SUL FORM INSERISCI  PRODOTTO
//===========================================================================
function  FORMPRODOTTI()
{
 if (document.Modulo_Prodotti.FrmNomeProdotto.value=="") 
	{
	alert("Inserisci nome prodotto !");
	document.Modulo_Prodotti.FrmNomeProdotto.focus();
	return false;
	}
 if (document.Modulo_Prodotti.FrmCodiceProdotto.value=="") 
	{
	alert("Inserisci codice prodotto !");
	document.Modulo_Prodotti.FrmCodiceProdotto.focus();
	return false;
	}
 if (document.Modulo_Prodotti.FrmPrezzoProdotto.value=="") 
	{
	alert("Inserisci prezzo prodotto !");
	document.Modulo_Prodotti.FrmPrezzoProdotto.focus();
	return false;
	}
 var PrezzoProdotto = document.Modulo_Prodotti.FrmPrezzoProdotto;	
 if(re_val_price.test(PrezzoProdotto.value))
   {
   alert("Il campo prezzo prodotto può contenere solo numeri e l'uso della virgola come separatore di cifra !");
   PrezzoProdotto.focus();
   return false;
   };
 if (document.Modulo_Prodotti.FrmRicaricoProdotto.value=="") 
	{
	alert("Inserisci ricarico prodotto! Nessun ricarico inserire il valore 0 (Zero)");
	document.Modulo_Prodotti.FrmRicaricoProdotto.focus();
	return false;
	}

 var RicaricoProdotto = document.Modulo_Prodotti.FrmRicaricoProdotto;
 if(re_val_price.test(RicaricoProdotto.value))
   {
   alert("Inserisci una percentuale RICARICO valida !");
   RicaricoProdotto.focus();
   return false;
   };
 if (document.Modulo_Prodotti.FrmIvaProdotto.value=="") 
	{
	alert("Inserisci iva prodotto! Nessuna iva inserire il valore 0 (Zero)");
	document.Modulo_Prodotti.FrmIvaProdotto.focus();
	return false;
	}
	
 var IvaProdotto = document.Modulo_Prodotti.FrmIvaProdotto;	
 if(IvaProdotto.value == "" || re_not_number.test(IvaProdotto.value))
   {
   alert("Inserisci una percentuale IVA valida !");
   IvaProdotto.focus();
   return false;
   };
   
   
 var PrezzoOffertaProdotto = document.Modulo_Prodotti.FrmPrezzoOffertaProdotto;	
 if(re_val_price.test(PrezzoOffertaProdotto.value))
   {
   alert(" Il campo prezzo offerta prodotto può contenere solo numeri e l'uso della virgola come separatore di cifra !");
   PrezzoOffertaProdotto.focus();
   return false;
   };
   
 var GiacenzaProdotto = document.Modulo_Prodotti.FrmGiacenzaProdotto;	
 if(GiacenzaProdotto.value == "" || re_not_number.test(GiacenzaProdotto.value))
   {
   alert("Inserisci giacenza prodotto !");
   GiacenzaProdotto.focus();
   return false;
   };
 var QuantitaMinimaProdotto = document.Modulo_Prodotti.FrmQuantitaMinimaProdotto;	
 if(QuantitaMinimaProdotto.value == "" || re_not_number.test(QuantitaMinimaProdotto.value))
   {
   alert("Inserisci quantità minima oridinabile per il  prodotto !");
   QuantitaMinimaProdotto.focus();
   return false;
   };
 var PesoProdotto = document.Modulo_Prodotti.FrmPesoProdotto;	
 if(PesoProdotto.value == "" || re_not_number.test(PesoProdotto.value))
   {
   alert("Inserisci peso prodotto !");
   PesoProdotto.focus();
   return false;
   };
}
//===========================================================================
//*
//*
//===========================================================================
//POPUP INSERISCI DESCRIZIONE PRODOTTO
//===========================================================================

function RiempiCampoCaratteristicaProdotto()
{
 if (document.Modulo_Caratteristiche_Prodotto.FrmNomeCaratteristicaProdotto.value == " Nome caratteristica")
	document.Modulo_Caratteristiche_Prodotto.FrmNomeCaratteristicaProdotto.value = "";
}
//===========================================================================
//POPUP DELETE TOOLS PRODUCTS
//===========================================================================
function PopUpDeleteTools(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=no,location=0,statusbar=0,menubar=0,resizable=0,width=550,height=118');");
}
//===========================================================================
//*
//*
//===========================================================================
//CONTROLLI SUL FORM RICERCA PRODOTTO
//===========================================================================
function  FORMRICERCAPRODOTTI()
{
 var PrezzoDa = document.Modulo_Ricerca_Prodotti.FrmSearchprezzoDa;	
 if(re_val_price.test(PrezzoDa.value))
   {
   alert("Il campo prezzo [ Da ]  può contenere solo numeri e l'uso della virgola come separatore di cifra !");
   PrezzoDa.focus();
   return false;
   };
 var PrezzoA = document.Modulo_Ricerca_Prodotti.FrmSearchprezzoA;	
 if(re_val_price.test(PrezzoA.value))
   {
   alert("Il campo prezzo [ A ]  può contenere solo numeri e l'uso della virgola come separatore di cifra !");
   PrezzoA.focus();
   return false;
   };
}
//===========================================================================
//*
//*
//===========================================================================
//CONTROLLI SUL FORM LISTINO PRODOTTI
//===========================================================================
function  FORMLISTINOPRODOTTI()
{
 if (document.Modulo_Listino_Prodotti.FrmCodeListino.value=="") 
	{
	alert("Inserisci codice listino !");
	document.Modulo_Listino_Prodotti.FrmCodeListino.focus();
	return false;
	}
 if (document.Modulo_Listino_Prodotti.FrmNomeListino.value=="") 
	{
	alert("Inserisci nome listino !");
	document.Modulo_Listino_Prodotti.FrmNomeListino.focus();
	return false;
	}
}
//===========================================================================
//*
//*
//===========================================================================
//POPUP ZOOM PRODOTTO
//===========================================================================
function PopUpZoomProduct(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=yes,location=0,statusbar=0,menubar=0,resizable=0,width=479,height=452');");
}
//===========================================================================
//*
//*
//===========================================================================
//*
//*
//===========================================================================
//POPUP PASSWORD DIMENTICATA
//===========================================================================
 function Password() {
   var w = 400;
   var h = 207;
   var l = Math.floor((screen.width-w)/2);
   var t = Math.floor((screen.height-h)/2);
      window.open("Pass.asp?Section=email","","width=" + w + ",height=" + h + ",top=" + t + ",left=" + l);
 }
//===========================================================================
//*
//*
//===========================================================================
//POPUP FILE BANCA SELLA
//===========================================================================
function PopUpAddFileSella(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=no,location=0,statusbar=0,menubar=0,resizable=0,width=465,height=188');");
}
//===========================================================================
//*
//*
//===========================================================================
//===========================================================================
//CONTROLLI SUL FORM INSERISCI FILE BANCA SELLA
//===========================================================================
function  FORMFILESELLA()
{
	if (document.img.blob.value=="") 
	{
	alert("Devi scegliere un file.");
	document.img.blob.focus();
	return false;
	}
}
//===========================================================================
//*
//*	
//===========================================================================
//POPUP INSERISCI PREZZO ALTRI LISTINI
//===========================================================================
function PopUpAddPriceList(URL) {
day = new Date();
id = day.getTime();
larghezza=400;
altezza=200;
LeftPosition=(screen.height-altezza)/ 2 ;
TopPosition=(screen.width-larghezza) / 2 ;
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=no,location=0,statusbar=0,menubar=0,resizable=0,width='+larghezza+',height='+altezza+',top='+TopPosition+',left='+LeftPosition+'');");

}
//===========================================================================
//*
//*
//===========================================================================
//CONTROLLI MODULO PREZZI ALTRI LISTINI
//===========================================================================
function  FORMRICARICOPRODOTTI()
{
 var RicaricoProdotto = document.Modulo_Listini_Prodotti.FrmRicaricoProdotto;	
 if(re_val_price.test(RicaricoProdotto.value))
   {
   alert("Inserisci una percentuale RICARICO valida !");
   RicaricoProdotto.focus();
   return false;
   };
}
//===========================================================================
//*
//*
//===========================================================================
//CONTROLLI SUL FORM RECUPERA PASSWORD
//===========================================================================
function  FORMPWDREMINDER()
{
if (document.PwdReminder.Email=="")
    {
	alert("Inserisci email.");
	document.PwdReminder.Email.focus();
	return false;
    }
if (document.PwdReminder.Email.value.indexOf("@") == -1)
   {
   alert("Email non valida.");
   document.PwdReminder.Email.focus();            
   return false;
   }
if (document.PwdReminder.Email.value.indexOf(".") == -1)
   {
   alert("Email non valida.");
   document.PwdReminder.Email.focus();            
   return false;
   }   
}
//===========================================================================
//*
//*	
//===========================================================================
//POPUP TAGLIE E COLORI
//===========================================================================
function PopUpPluginSizeSize(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=no,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=200');");
}
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
