
<!--
function MM_validateForm() { //v4.0
  if (document.getElementById){
    var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
    for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
      if (val) { nm=val.name; if ((val=val.value)!="") {
        if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
          if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
        } else if (test!='R') { num = parseFloat(val);
          if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
          if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
            min=test.substring(8,p); max=test.substring(p+1);
            if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
      } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
    } if (errors) alert('The following error(s) occurred:\n'+errors);
    document.MM_returnValue = (errors == '');
} }
function flvFPW1(){//v1.44
// Copyright 2002-2004, Marja Ribbers-de Vroed, FlevOOware (www.flevooware.nl/dreamweaver/)
var v1=arguments,v2=v1[2].split(","),v3=(v1.length>3)?v1[3]:false,v4=(v1.length>4)?parseInt(v1[4]):0,v5=(v1.length>5)?parseInt(v1[5]):0,v6,v7=0,v8,v9,v10,v11,v12,v13,v14,v15,v16;v11=new Array("width,left,"+v4,"height,top,"+v5);for (i=0;i<v11.length;i++){v12=v11[i].split(",");l_iTarget=parseInt(v12[2]);if (l_iTarget>1||v1[2].indexOf("%")>-1){v13=eval("screen."+v12[0]);for (v6=0;v6<v2.length;v6++){v10=v2[v6].split("=");if (v10[0]==v12[0]){v14=parseInt(v10[1]);if (v10[1].indexOf("%")>-1){v14=(v14/100)*v13;v2[v6]=v12[0]+"="+v14;}}if (v10[0]==v12[1]){v16=parseInt(v10[1]);v15=v6;}}if (l_iTarget==2){v7=(v13-v14)/2;v15=v2.length;}else if (l_iTarget==3){v7=v13-v14-v16;}v2[v15]=v12[1]+"="+v7;}}v8=v2.join(",");v9=window.open(v1[0],v1[1],v8);if (v3){v9.focus();}document.MM_returnValue=false;return v9;}
//-->
	//<script language="javascript">
	
	//funzione per controllare il campo vuoto
	function campoVuoto(campo,messaggio)
	{
		if(campo.value.trim() == ''){
			alert(messaggio);
			campo.focus();
			return (0);
		}
	}
	
	//funzione per controllare il valore con una regexp
	function campoRegExp(campo,exp,messaggio)
	{
		var reg = exp
		if(!reg.test(campo.value)){
			alert(messaggio);
			campo.focus();
			return (0);
		}
	}
	
	//funzione per controllare la selezione di una combo box
	function selectVuoto(campo,messaggio)
	{
		if(campo.value == "0"){
			alert(messaggio);
			campo.focus();
			return (0);
		}
	}
	
	//funzione per controllare la lunghezza di una textarea
	function maxChars(ogg,maxchars)
	{
		if (ogg.value.length > maxchars){
		  ogg.value=ogg.value.substr(0,maxchars);
		}
	}
	
	//funzione per il redirect temporizzato
	function redirect(url,secondi)
	{
		if(url!=''){
			if(secondi==''||isNaN(secondi)) secondi = 5;
			window.setTimeout("window.location='"+url+"'",secondi*1000);}
	}

	//trim di stringhe
	function stringTrim() 
	{
		return this.replace(/^\s+/, '').replace(/\s+$/, '');
	}
	
	String.prototype.trim = stringTrim;
	
	
		/*function : format_number()  
	version: 1.0.0  
	This function formats a numeric value passed in to it with specified number of  
	decimal values. numeric value will not be rounded.  
	pnumber : numeric value to be formatted.  
	decimals : number of decimal points desired.  

	Author: Buddhike de Silva  
	Date: 21-Nov-2002 11:16 AM*/  

	/*  
	revision: 1.1.0  
	Author: M. Cassim Farook  
	Date: 21-Nov-2002 10:16 PM  
	Notes: No offense buddhike...but i had to rewrite the code  
	works for ADT (any dam thing)  
	usage: x = format_number(123.999, 2)  
	*/  

	/*  
	revision: 1.2.0  
	Authors: Buddhike de Silva  
	Date: 22-Nov-2002 12:07 PM  
	Notes: Optimized for best performence.  
	usage: x = format_number(123.999, 2)  
	*/  

	/* 
	 * Revision: 1.3 
	 * Author: Mike Robb (JS-X.com) 
	 * Date: May 26, 2003 
	 * Notes:  Changed to deal with negative numbers. 
	 *         Fixed length of final answer. 
	 *         Work-around for javascript internal math problem with rounding negative numbers. 
	 */ 

	/*
	 * Revision 1.4
	 * Author: LeAnn Roberts
	 * Date: September, 2003
	 * Note: Modified the if logic: Math.pow()
	 */

	/*
	 * Revision 1.5
	 * Author: Robert Heggdal
	 * Date: February, 2004
	 * Note: Modified check for negative number by replacing parseInt with parseFloat so that negative numbers between zero and minus one are recognized as such.
	 */ 

	/*
	 * Revision 1.6
	 * Author: Naveen
	 * Date: February, 2004
	 * Note: Rewrote format_number to correct a logic problem.
	 */

	/*
	 * Revision 1.7
	 * Author: JS-X.com
	 * Date: February, 2004
	 * Note: Added wrapper around format_number as negative values were dropped from
	 *       the logic.
	 */

	function format_number(p,d) 
	{
	  var r;
	  if(p<0){p=-p;r=format_number2(p,d);r="-"+r;}
	  else   {r=format_number2(p,d);}
	  return r;
	}
	function format_number2(pnumber,decimals) 
	{
	  var strNumber = new String(pnumber);
	  var arrParts = strNumber.split('.');
	  var intWholePart = parseInt(arrParts[0],10);
	  var strResult = '';
	  if (isNaN(intWholePart))
	    intWholePart = '0';
	  if(arrParts.length > 1)
	  {
	    var decDecimalPart = new String(arrParts[1]);
	    var i = 0;
	    var intZeroCount = 0;
	     while ( i < String(arrParts[1]).length )
	     {
	       if( parseInt(String(arrParts[1]).charAt(i),10) == 0 )
	       {
	         intZeroCount += 1;
	         i += 1;
	       }
	       else
	         break;
	    }
	    decDecimalPart = parseInt(decDecimalPart,10)/Math.pow(10,parseInt(decDecimalPart.length-decimals-1)); 
	    Math.round(decDecimalPart); 
	    decDecimalPart = parseInt(decDecimalPart)/10; 
	    decDecimalPart = Math.round(decDecimalPart); 

	    //If the number was rounded up from 9 to 10, and it was for 1 'decimal' 
	    //then we need to add 1 to the 'intWholePart' and set the decDecimalPart to 0. 

	    if(decDecimalPart==Math.pow(10, parseInt(decimals)))
	    { 
	      intWholePart+=1; 
	      decDecimalPart="0"; 
	    } 
	    var stringOfZeros = new String('');
	    i=0;
	    if( decDecimalPart > 0 )
	    {
	      while( i < intZeroCount)
	      {
	        stringOfZeros += '0';
	        i += 1;
	      }
	    }
	    decDecimalPart = String(intWholePart) + "." + stringOfZeros + String(decDecimalPart); 
	    var dot = decDecimalPart.indexOf('.');
	    if(dot == -1)
	    {
	      decDecimalPart += '.'; 
	      dot = decDecimalPart.indexOf('.'); 
	    } 
	    var l=parseInt(dot)+parseInt(decimals); 
	    while(decDecimalPart.length <= l) 
	    {
	      decDecimalPart += '0'; 
	    }
	    strResult = decDecimalPart;
	  }
	  else
	  {
	    var dot; 
	    var decDecimalPart = new String(intWholePart); 

	    decDecimalPart += '.'; 
	    dot = decDecimalPart.indexOf('.'); 
	    var l=parseInt(dot)+parseInt(decimals); 
	    while(decDecimalPart.length <= l) 
	    {
	      decDecimalPart += '0'; 
	    }
	    strResult = decDecimalPart;
	  }
	  return strResult;
	}// JavaScript Document