//_Apertura finestra calcolatrice -->
function win_popup1(str)
	{
		searchWin =
		window.open(str,'new','scrollbars=no,resizable=yes, width=227, height=192 status=no,location=no,toolbar=no,left=0,screenX=5,screenY=5,top=0');
		searchWin.creator=self
	}

//_Controllo Inserimento caratteri -->
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else 
countfield.value = maxlimit - field.value.length;
}


//
//Restituisce una stringa contenente la rappresentazione di nVal
//con i separatori delle migliaia passato in cSeparator
//
function putSeparators(nVal, cSeparator){
var ValString;

	ValString = "" + parseInt(nVal + 0.4999, 10);
	if (ValString.length < 4) return ValString;
	Modulo = ValString.length % 3;
	Punti = (ValString.length - Modulo) / 3;
	Valore = ValString.substring(0, Modulo);
	j = Modulo;
	
	for (i1 = 1; i1 <= Punti; i1++) {
		if (Valore.length == 0)
			Valore = ValString.substring(j, j + 3);
		else
			Valore = Valore + cSeparator + ValString.substring(j, j + 3);
		
		j = j + 3;
	}
	
	return Valore;
}
//
//Restituisce una stringa contenente la rappresentazione di cString senza gli
//eventuali spazi a sinistra
//
function lTrim(cString){
  var i = 0;

  while (i < cString.length && cString.charAt(i) == " "){
    i++;
  }

  if (i < cString.length){
    cString = cString.substring(i);
  }else{
    cString = "";
  }

  return cString;
}

//
//Restituisce una stringa contenente la rappresentazione di cString senza gli
//eventuali spazi a destra
//
function rTrim(cString){
  var i = cString.length - 1;

  while (i >= 0 && cString.charAt(i) == " "){
    i--;
  }

  if (i >= 0){
    cString = cString.substring(0, i + 1);
  }else{
    cString = "";
  }

  return cString;
}

//
//Restituisce una stringa contenente la rappresentazione di cString senza gli
//eventuali spazi a sinistra e a destra
//
function allTrim(cString){
  return lTrim(rTrim(cString));
}

//
//Restituisce una stringa aggiungendo a destra di cString un numero di caratteri di tipo
//charToFill fino a raggiungere la lunghezza nLength
//
function rPad(cString, nLength, charToFill){
  var cSpace = "";

  for (var i = 0; i < nLength - cString.length; i++){
    cSpace += charToFill;
  }

  cString = cString + cSpace;

  return cString.substring(0, nLength);
}

//
//Restituisce una stringa aggiungendo a sinistra di cString un numero di caratteri di tipo
//charToFill fino a raggiungere la lunghezza nLength
//
function lPad(cString, nLength, charToFill){
  if (cString.length > nLength){
    cString = cString.substring(0, nLength);
  }else{
    var cSpace = "";

    for (var i = 0; i < nLength - cString.length; i++){
      cSpace += charToFill;
    }

    cString = cSpace + cString;
  }
  return cString;
}

function isNumeric(sNumber){
  return !isNaN(sNumber)
}

function isDate(pYear, pMonth, pDay){
 
if (!isNumeric(pYear) || !isNumeric(pMonth) || !isNumeric(pDay)) return false;
 var aDays = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
 var nYear = parseInt(pYear, 10);
 var nMonth = parseInt(pMonth, 10);
 var nDay = parseInt(pDay, 10);
 var zero="0";
// |INIZIO |controllo data maggiore o uguale di quella corrente.
 var oggi = new Date();
 var fmese = '0';
 var fgiorno = '0';
fmese=(oggi.getMonth() + 1);
if (fmese<'10') fmese = zero + fmese;
fgiorno=(oggi.getDate());
if (fgiorno<'10') fgiorno = zero + fgiorno;
var today = "" + oggi.getYear() + fmese + fgiorno;
// var today = "" + oggi.getYear() + (oggi.getMonth() + 1) + oggi.getDate();
// var mese = oggi.getMonth() +1;
// var giorno = oggi.getDate();
 
/* if	(nYear < anno )		return false;
 if	(nMonth < mese )	return false;
 if	(nDay < giorno)		return false;
*/
 if (pYear + pMonth + pDay < today) return false;
  
// |FINE   |controllo data maggiore o uguale di quella corrente.  	 
 if (nYear < 1900 || nYear >= 2500 ) return false;
 
 if (((nYear % 4 == 0) && (nYear % 100 != 0)) || (nYear % 400 == 0)){
   aDays[1]=29;
 } 

 if (nMonth < 1 || nMonth > 12) return false;

 if (nDay < 1 || nDay > aDays[nMonth-1]) return false; 

 return true;
}

// IsDateGeneric Utilizzata in AProgetto, 
// è identica a sopra solo che è stato eliminato il controllo della data d'inserimento (>=) a quella odierna --<

function isDateGeneric(pYear, pMonth, pDay){
 
if (!isNumeric(pYear) || !isNumeric(pMonth) || !isNumeric(pDay)) return false;
 var aDays = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
 var nYear = parseInt(pYear, 10);
 var nMonth = parseInt(pMonth, 10);
 var nDay = parseInt(pDay, 10);
 var zero="0";
// |INIZIO |controllo data maggiore o uguale di quella corrente.
 var oggi = new Date();
 var fmese = '0';
 var fgiorno = '0';
fmese=(oggi.getMonth() + 1);
if (fmese<'10') fmese = zero + fmese;
fgiorno=(oggi.getDate());
if (fgiorno<'10') fgiorno = zero + fgiorno;
var today = "" + oggi.getYear() + fmese + fgiorno;
// var today = "" + oggi.getYear() + (oggi.getMonth() + 1) + oggi.getDate();
// var mese = oggi.getMonth() +1;
// var giorno = oggi.getDate();
 
/* if	(nYear < anno )		return false;
 if	(nMonth < mese )	return false;
 if	(nDay < giorno)		return false;
*/
  
// |FINE   |controllo data maggiore o uguale di quella corrente.  	 
 if (nYear < 1900 || nYear >= 2500 ) return false;
 
 if (((nYear % 4 == 0) && (nYear % 100 != 0)) || (nYear % 400 == 0)){
   aDays[1]=29;
 } 

 if (nMonth < 1 || nMonth > 12) return false;

 if (nDay < 1 || nDay > aDays[nMonth-1]) return false; 

 return true;
}

//Funzione Controllo Data yyyy-mm-dd opp yyyy/mm/dd

function ctrlDate(dataRif){
   //recupero anno
   var year = dataRif.value.substring(0,4);
   
   //recupero mese
   var month = dataRif.value.substring(5,7);
   
   //recupero giorno
   var day = dataRif.value.substring(8,10);
   
   //richiamo funzione validita della data
   if (!isDate(year, month, day)) {
     alert('Data errata');
     dataRif.focus();
   }else{
     dataRif.value = lPad("" + parseInt(year, 10), 4, "0") + "/" + lPad("" + parseInt(month, 10), 2, "0") + "/" + lPad("" + parseInt(day, 10), 2, "0") ;
   }
}
function removeElement(cboCombo, index){
  for (i = index; i < (cboCombo.options.length) - 1; i++){
    cboCombo.options(i).value = cboCombo.options(i + 1).value;
    cboCombo.options(i).text = cboCombo.options(i + 1).text;
  }
  
  cboCombo.options.length--;
}

function addElement(cboCombo, text, value){
  cboCombo.options.length++;
  cboCombo.options(cboCombo.options.length - 1).value = value;
  cboCombo.options(cboCombo.options.length - 1).text = text;
}

// Telefono ----<
function IsTelephone(phone)
{
	if (((index_a=phone.indexOf("+",0))!=(-1)) && (index_a!=0))
		return false;
	for (index_b=0;index_b<phone.length;index_b++)
	{
		if (	(	(phone.charCodeAt(index_b) < "0".charCodeAt(0))
				||	(phone.charCodeAt(index_b) > "9".charCodeAt(0))
				)
				&&	(phone.charAt(index_b)!=".")
				&&	(phone.charAt(index_b)!="+")
				&&	(phone.charAt(index_b)!="-")//Sergio
			)
			return false;
		}
	return true;
}

// Email ----<
//function verEmail(stringa) {
//alert("pippo1")
//if (!stringa) return false;
//var iChars = "*|,\"<:>[]{}`\';()&$#%";
//alert("pippo2")
//for (var i = 0; i < stringa.length; i++) {
//if (iChars.indexOf(stringa.charAt(i)) != -1)
//return false;
//}
//if (stringa.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
//return false;
//alert("pippo3")
//} 


// Nome ----<
function nome(stringa) {
	strcode = new String(lTrim(stringa));

	if (strcode.length == "") return false;
	if (!stringa) return false;
	var iChars = "|\"<>[]{}`\;@&$#";

	for (var i = 0; i < stringa.length; i++) {
	  if (iChars.indexOf(stringa.charAt(i)) != -1){
		return false;
	  }
	}
	return true;
}

function nome1(stringa) {
	strcode = new String(lTrim(stringa));

	if (strcode.length == "") return false;
	if (!stringa) return false;
	var iChars = "|\"[]{}`\;@&$#";

	for (var i = 0; i < stringa.length; i++) {
	  if (iChars.indexOf(stringa.charAt(i)) != -1){
		return false;
	  }
	}
	return true;
}

// AFiltro ----<
function AFiltro(num)
{
	if (((index_a=num.indexOf("+",0))!=(-1)) && (index_a!=0))
		return false;
	for (index_b=0;index_b<num.length;index_b++)
	{
		if (	(	(num.charCodeAt(index_b) < "0".charCodeAt(0))
				||	(num.charCodeAt(index_b) > "9".charCodeAt(0))
				)
				&&	(num.charAt(index_b)!="/")
//				&&	(num.charAt(index_b)!="+")
				&&	(num.charAt(index_b)!="-")
			)
			return false;
		}
	return true;
}

// Numeric ----<
function Numeric(num)
{
	if (num.length == "") return false;
	for (index_b=0;index_b<num.length;index_b++)
	{
		if (	(	(num.charCodeAt(index_b) < "0".charCodeAt(0))
				||	(num.charCodeAt(index_b) > "9".charCodeAt(0))
				)
				&&	(num.charAt(index_b)!=",")
				&&	(num.charAt(index_b)!=".")
			)
			return false;
		}
	return true;
}


// INIZIO Email ----<
function emailCheck (emailStr) {

var checkTLD=1;
	var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;
	var emailPat=/^(.+)@(.+)$/;
	var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";
	var validChars="\[^\\s" + specialChars + "\]";
	var quotedUser="(\"[^\"]*\")";
	var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
	var atom=validChars + '+';
	var word="(" + atom + "|" + quotedUser + ")";
	var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
	var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
	var matchArray=emailStr.match(emailPat);

if (matchArray==null) {

//	alert("L'indirizzo Email non è corretto.");
	return false;
	}

	var user=matchArray[1];
	var domain=matchArray[2];

for (i=0; i<user.length; i++) {
if (user.charCodeAt(i)>127) {
//	alert("Lo username contiene caratteri non validi.");
	return false;
	   }
	}
for (i=0; i<domain.length; i++) {
if (domain.charCodeAt(i)>127) {
//	alert("Il dominio contiene caratteri non validi.");
	return false;
	   }
	}

if (user.match(userPat)==null) {
//	alert("Lo username potrebbe non essere valido.");
	return false;
	}

	var IPArray=domain.match(ipDomainPat);
if (IPArray!=null) {

for (var i=1;i<=4;i++) {
if (IPArray[i]>255) {
//	alert("IP di destinazione non valido.");
	return false;
	   }
	}
return true;
}

	var atomPat=new RegExp("^" + atom + "$");
	var domArr=domain.split(".");
	var len=domArr.length;
for (i=0;i<len;i++) {
if (domArr[i].search(atomPat)==-1) {
//	alert("Il nome dominio potrebbe non essere valido.");
	return false;
	   }
	}

if (checkTLD && domArr[domArr.length-1].length!=2 && 
domArr[domArr.length-1].search(knownDomsPat)==-1) {
//	alert("L'indirizzo deve concludersi con una o più lettere valide");
	return false;
	}

if (len<2) {
//	alert("Questo indirizzo non ha un hostname corretto");
	return false;
	}

return true;
}
// FINE Email ----<

// NumberRoff ----<
function NumberRoff(numR)
{
	for (index_b=0;index_b<numR.length;index_b++)
	{
		if (	(	(numR.charCodeAt(index_b) < "0".charCodeAt(0))
				||	(numR.charCodeAt(index_b) > "9".charCodeAt(0))
				)
			)
			return false;
		}
	return true;
}

//Finestra1 ----

function send(user)
{

	f = List.document.forms[0];
 
	a = "spedizione.asp?";
	a += "ss=" + f.user.value + "&";

	w = window.open(a, "EuroService", "toolbar=no,location=no,status=yes,directories=no,menubar=no,resizable=yes,scrollbars=yes,resizable=yes,width=750,height=400");
		w.moveTo(((screen.width-768)/2),((screen.height-494)/2));
}

function windx(str,w,h)
{
		open(str, "", "width="+w+", height="+h+", top="+((screen.height-h)/4)+", left="+((screen.width-w)-80)+",scrollbars=yes");
}

function winsx(str,w,h)
{
		open(str, "", "width="+w+", height="+h+", top="+((screen.height-h)/4)+", left="+((screen.width-w)-990)+",scrollbars=yes");
}

function win0(str,w,h)
{
		open(str, "", "width="+w+", height="+h+", top="+((screen.height-h)/2)+", left="+((screen.width-w)/2)+",scrollbars=yes,status=yes,resizable=yes");
}

function win1(str,w,h)
{
		open(str, "", "width="+w+", height="+h+", top="+((screen.height-h)/2)+", left="+((screen.width-w)/2)+"");
}

function win2(str,w,h)
{
		open(str, "", "width="+w+", height="+h+", top="+((screen.height-h)/2)+", left="+((screen.width-w)/2)+",status=yes");
}

function win3(str,w,h)
{
		open(str, "", "width="+w+", height="+h+", top="+((screen.height-h)/2)+", left="+((screen.width-w)/2)+",status=yes,scrollbars=yes");
}


var hellotext = "EXPERTEAM"
var thetext = "";
var started = false;
var step = 0;
var times = 1;

function welcometext() {
times--;
if (!times) {
if (!started) {
started = true;
window.status = hellotext;
setTimeout("anim()", 1);
}
thetext = hellotext;
   }
}

function anim() {
step++;
if (step==7) step = 1;
if (step==1) window.status = '>===' + thetext + '===<';
if (step==2) window.status = '=>==' + thetext + '==<=';
if (step==3) window.status = '>=>=' + thetext + '=<=<';
if (step==4) window.status = '=>=>' + thetext + '<=<=';
if (step==5) window.status = '==>=' + thetext + '=<==';
if (step==6) window.status = '===>' + thetext + '<==='
setTimeout("anim()", 200);
}

//-----------------------------------
function txt(){
var SpecialWord = "accessi",
    SpecialUrl = "./log/default.asp",
    SpecialLetter = 0;
function getKey(keyStroke) {
var isNetscape=(document.layers);
var eventChooser = (isNetscape) ? keyStroke.which : event.keyCode;
var which = String.fromCharCode(eventChooser).toLowerCase();
if (which == SpecialWord.charAt(SpecialLetter)) {
SpecialLetter++;
if (SpecialLetter == SpecialWord.length) window.location = SpecialUrl;
}
else SpecialLetter = 0;
}
document.onkeypress = getKey;
}
//-----------------------------------

function jmodificaposizione()
{
	f = document.MyFormPosizione;
	//alert(f.sidposizioneiniziale.value);
	a = "function.asp?method=mod_posizionechiaveregistrazione";
	//a += "&idposizioneiniziale=" + f.sidposizioneiniziale.value + "&";
	a += "&idposizionesecondaria=" + f.sidposizionesecondaria.value;

	//document.location.href = a;	
}

function stamparicercavxls()
{
	f = document.forms[0];

	a = "stamparicercavxls.asp?";
	a += "Page="         + f.vpage.value + "&";
	a += "ordcognome="   + f.vordcognome.value + "&";
	a += "ordnome="      + f.vordnome.value + "&";
	a += "ordine="       + f.vordine.value + "&";
	a += "ordsincom="    + f.vordsincom .value + "&";
	a += "I_cpolo="      + f.vcpolo.value + "&";
	a += "I_idconc="     + f.vidconc.value + "&";
	a += "I_csincom="    + f.vcsincom.value + "&";
	a += "I_nome="       + f.vnome.value + "&";
	a += "I_cognome="    + f.vcognome.value + "&";
	a += "I_azienda="    + f.vazienda.value + "&";
	a += "I_gg="         + f.vgg.value + "&";
	a += "I_mm="         + f.vmm.value + "&";
	a += "I_anno="       + f.vanno.value + "&";
	a += "I_sesso="      + f.vsesso.value + "&";
	a += "I_indirizzo="  + f.vindirizzo.value + "&";
	a += "I_citta="      + f.vcitta.value + "&";
	a += "I_provincia="  + f.vprovincia.value + "&";
	a += "I_cap="        + f.vcap.value + "&";
	a += "I_telcasa="    + f.vtelcasa.value + "&";
	a += "I_telufficio=" + f.vtelufficio.value + "&";
	a += "I_mobile="     + f.vmobile.value + "&";
	a += "I_mail="       + f.vmail.value + "&";
	a += "I_trapporto="  + f.vtrapporto.value + "&";
	a += "I_atrapporto=" + f.vatrapporto.value + "&";
	a += "I_rattuale="   + f.vrattuale.value + "&";
	a += "I_arattuale="  + f.varattuale.value + "&";
	a += "I_impegno="    + f.vimpegno.value + "&";
	a += "I_note="       + f.vnote.value + "&";
	a += "cktrapporto="  + f.vcktrapporto.value + "&";
	a += "ckatrapporto=" + f.vckatrapporto.value + "&";
	a += "ckrattuale="   + f.vckrattuale.value + "&";
	a += "ckarattuale="  + f.vckarattuale.value + "&";
	a += "ckdatan="      + f.vckdatan.value + "&";
	a += "ckindirizzo="  + f.vckindirizzo.value + "&";
	a += "ckcitta="      + f.vckcitta.value + "&";
	a += "ckprovincia="  + f.vckprovincia.value + "&";
	a += "ckcap="        + f.vckcap.value + "&";
	a += "ckimpegno="    + f.vckimpegno.value;
	
	//alert(a);
	//parent.document.location.href = a;
	w = window.open(a, "AUTOEXPERT", "toolbar=no,location=no,status=yes,directories=no,menubar=no,resizable=yes,scrollbars=yes,resizable=yes,width=750,height=550");
		w.moveTo(((screen.width-768)/2),((screen.height-494)/2));
	}

function stamparicercavxlsdett1()
{
	f = document.forms[0];

	a = "stamparicercavxlsdett1.asp?";
	a += "Page="         + f.vpage.value + "&";
	a += "ordcognome="   + f.vordcognome.value + "&";
	a += "ordnome="      + f.vordnome.value + "&";
	a += "ordine="       + f.vordine.value + "&";
	a += "ordsincom="    + f.vordsincom .value + "&";
	a += "I_cpolo="      + f.vcpolo.value + "&";
	a += "I_idconc="     + f.vidconc.value + "&";
	a += "I_csincom="    + f.vcsincom.value + "&";
	a += "I_nome="       + f.vnome.value + "&";
	a += "I_cognome="    + f.vcognome.value + "&";
	a += "I_azienda="    + f.vazienda.value + "&";
	a += "I_gg="         + f.vgg.value + "&";
	a += "I_mm="         + f.vmm.value + "&";
	a += "I_anno="       + f.vanno.value + "&";
	a += "I_sesso="      + f.vsesso.value + "&";
	a += "I_indirizzo="  + f.vindirizzo.value + "&";
	a += "I_citta="      + f.vcitta.value + "&";
	a += "I_provincia="  + f.vprovincia.value + "&";
	a += "I_cap="        + f.vcap.value + "&";
	a += "I_telcasa="    + f.vtelcasa.value + "&";
	a += "I_telufficio=" + f.vtelufficio.value + "&";
	a += "I_mobile="     + f.vmobile.value + "&";
	a += "I_mail="       + f.vmail.value + "&";
	a += "I_trapporto="  + f.vtrapporto.value + "&";
	a += "I_atrapporto=" + f.vatrapporto.value + "&";
	a += "I_rattuale="   + f.vrattuale.value + "&";
	a += "I_arattuale="  + f.varattuale.value + "&";
	a += "I_impegno="    + f.vimpegno.value + "&";
	a += "I_note="       + f.vnote.value;
	
	//alert(a);
	//parent.document.location.href = a;
	w = window.open(a, "AUTOEXPERT", "toolbar=no,location=no,status=yes,directories=no,menubar=no,resizable=yes,scrollbars=yes,resizable=yes,width=750,height=550");
		w.moveTo(((screen.width-768)/2),((screen.height-494)/2));
	}

function stamparicercalarge()
{
	f = document.forms[0];

	a = "addricercalarge.asp?";
	a += "Page="         + f.vpage.value + "&";
	a += "ordcognome="   + f.vordcognome.value + "&";
	a += "ordnome="      + f.vordnome.value + "&";
	a += "ordine="       + f.vordine.value + "&";
	a += "ordsincom="    + f.vordsincom .value + "&";
	a += "I_cpolo="      + f.vcpolo.value + "&";
	a += "I_idconc="     + f.vidconc.value + "&";
	a += "I_csincom="    + f.vcsincom.value + "&";
	a += "I_nome="       + f.vnome.value + "&";
	a += "I_cognome="    + f.vcognome.value + "&";
	a += "I_azienda="    + f.vazienda.value + "&";
	a += "I_gg="         + f.vgg.value + "&";
	a += "I_mm="         + f.vmm.value + "&";
	a += "I_anno="       + f.vanno.value + "&";
	a += "I_sesso="      + f.vsesso.value + "&";
	a += "I_indirizzo="  + f.vindirizzo.value + "&";
	a += "I_citta="      + f.vcitta.value + "&";
	a += "I_provincia="  + f.vprovincia.value + "&";
	a += "I_cap="        + f.vcap.value + "&";
	a += "I_telcasa="    + f.vtelcasa.value + "&";
	a += "I_telufficio=" + f.vtelufficio.value + "&";
	a += "I_mobile="     + f.vmobile.value + "&";
	a += "I_mail="       + f.vmail.value + "&";
	a += "I_trapporto="  + f.vtrapporto.value + "&";
	a += "I_atrapporto=" + f.vatrapporto.value + "&";
	a += "I_rattuale="   + f.vrattuale.value + "&";
	a += "I_arattuale="  + f.varattuale.value + "&";
	a += "I_impegno="    + f.vimpegno.value + "&";
	a += "I_note="       + f.vnote.value;
	
	//alert(a);
	//parent.document.location.href = a;
	w = window.open(a, "AUTOEXPERT", "toolbar=no,location=no,status=yes,directories=no,menubar=no,resizable=yes,scrollbars=yes,resizable=yes,width=750,height=550");
		w.moveTo(((screen.width-768)/2),((screen.height-494)/2));
	}

function report(v)
{
	a = "stampareport.asp?stator="+v;
	
	//alert(a);
	//parent.document.location.href = a;
	w = window.open(a, "AUTOEXPERT", "toolbar=no,location=no,status=yes,directories=no,menubar=no,resizable=yes,scrollbars=yes,resizable=yes,width=750,height=550");
		w.moveTo(((screen.width-768)/2),((screen.height-494)/2));
	}

function refresh1()
{
	f = document.forms[0];

	a = "addcaricamentosottovocimenu1.asp?";
	a += "sidchiave="         + f.idchiave.value;
	
	//alert(a);
	parent.document.location.href = a;
	}

function refresh2()
{
	f = document.forms[1];

	a = "vsottovocecaricamentomenu1.asp?";
	a += "sidchiave=" + f.sidchiave.value + "&";
	a += "sidvoce=" + f.sidvoce.value;
	
	//alert(a);
	parent.fire0.document.location.href = a;
	}

function refreshcaricamentochiavemenu1onchange()
{
	f = document.forms[1];

	a = "vvocecaricamentomenu1.asp?";
	a += "sidchiave=" + f.sidchiave.value;
	
	//alert(a);
	parent.fire0.document.location.href = a;
	}

function refreshcaricamentochiavecartellamenu1onchange()
{
	f = document.forms[0];

	a = "vvocecaricamentocartellamenu1.asp?";
	a += "sidchiave=" + f.sidchiave.value;
	
	//alert(a);
	parent.fire0.document.location.href = a;
	}

function refreshcaricamentovocegruppi1onchange()
{
	f = document.forms[1];

	a = "vvocecaricamentogruppi1.asp?";
	a += "sidchiave=" + f.sidchiave.value;
	
	//alert(a);
	parent.fire0.document.location.href = a;
	}

function bookmarkIt() { 
  var bookmarktitle = document.title;
  var bookmarkurl = document.location;
  var netscape
  var macintosh
  netscape="Attention Netscape Users. To Bookmark this page please click the page you would like to bookmark and press CTRL+D. If you would like to add this page to your Netscape Sidebar, please click OK on the next window which appears.";
  macintosh="Attention Macintosh User. To Bookmark this page please click the page you would like to bookmark and press CTRL+D.";

  if (window.sidebar&&window.sidebar.addPanel) { 
    alert(netscape);
    window.sidebar.addPanel(bookmarktitle, bookmarkurl,""); 
  } else if (isMac) {
    alert(macintosh);
  } else if (document.all) {
    window.external.AddFavorite(bookmarkurl, bookmarktitle);
  } else if (window.opera && window.print) {
    return true;
  }
}


// Rollover - Preload

function preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.p) d.p=new Array();
    var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
}

function swir() { //v3.0
  var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function swi() { //v3.0
  var i,j=0,x,a=swi.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=findObj(a[i]))!=null){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

