<!--  
//
//
//

// controllo decimali e migliaia ////////////////////////////

function decimal(num) {
        string = "" + num;
        if (string.indexOf('.') == -1)
return string + '';
               // return string + ',00';
        seperation = string.length - string.indexOf('.');
        if (seperation > 3)
                return string.substring(0,string.length-seperation+3);
        else if (seperation == 2)
                return string + '0';
        return string;
}

// Calcola i totali per singolo prodotto ////////////////////////////

function calculate(form) 
{

// document.order.prezzo.value = decimal(eval(document.order.qta.selectedIndex) * 2500)


valoreskillAM3 = 1;
if (eval(document.order.QTA_skill_am3.checked) == null) 
{
	valoreskillAM3 = 0;
}	
else if (eval(document.order.QTA_skill_am3.checked) == false) 
{
	valoreskillAM3 = 0;
}

document.order.TOT_skill_am3.value = decimal(valoreskillAM3 * 48.00);

valoreskillAM4 = 1;
if (eval(document.order.QTA_skill_am4.checked) == null) 
{
	valoreskillAM4 = 0;
}	
else if (eval(document.order.QTA_skill_am4.checked) == false) 
{
	valoreskillAM4 = 0;
}

document.order.TOT_skill_am4.value = decimal(valoreskillAM4 * 48.00);

valoreskillAM5 = 1;
if (eval(document.order.QTA_skill_am5.checked) == null) 
{
	valoreskillAM5 = 0;
}	
else if (eval(document.order.QTA_skill_am5.checked) == false) 
{
	valoreskillAM5 = 0;
}

document.order.TOT_skill_am5.value = decimal(valoreskillAM5 * 48.00);

valoreskillAM6 = 1;
if (eval(document.order.QTA_skill_am6.checked) == null) 
{
	valoreskillAM6 = 0;
}	
else if (eval(document.order.QTA_skill_am6.checked) == false) 
{
	valoreskillAM6 = 0;
}

document.order.TOT_skill_am6.value = decimal(valoreskillAM6 * 48.00);

valoreesameAM3 = 1;
if (eval(document.order.QTA_esame_am3.checked) == null) 
{
	valoreesameAM3 = 0;
}	
else if (eval(document.order.QTA_esame_am3.checked) == false) 
{
	valoreesameAM3 = 0;
}

document.order.TOT_esame_am3.value = decimal(valoreesameAM3 * 36.00);

valoreesameAM4 = 1;
if (eval(document.order.QTA_esame_am4.checked) == null) 
{
	valoreesameAM4 = 0;
}	
else if (eval(document.order.QTA_esame_am4.checked) == false) 
{
	valoreesameAM4 = 0;
}

document.order.TOT_esame_am4.value = decimal(valoreesameAM4 * 36.00);

valoreesameAM5 = 1;
if (eval(document.order.QTA_esame_am5.checked) == null) 
{
	valoreesameAM5 = 0;
}	
else if (eval(document.order.QTA_esame_am5.checked) == false) 
{
	valoreesameAM5 = 0;
}

document.order.TOT_esame_am5.value = decimal(valoreesameAM5 * 36.00);

valoreesameAM6 = 1;
if (eval(document.order.QTA_esame_am6.checked) == null) 
{
	valoreesameAM6 = 0;
}	
else if (eval(document.order.QTA_esame_am6.checked) == false) 
{
	valoreesameAM6 = 0;
}

document.order.TOT_esame_am6.value = decimal(valoreesameAM6 * 36.00);



////////////////////////////////////////////////

// SOMMA QUANTITA' ////////////////////////////'

document.order.TOT_QTA.value = 
(valoreskillAM3) +
(valoreskillAM4) +
(valoreskillAM5) +
(valoreskillAM6) +
(valoreesameAM3) +
(valoreesameAM4) +
(valoreesameAM5) +
(valoreesameAM6) ;
// somma il totale parziale ////////////////////////////

document.order.Totale.value =  
decimal(eval(document.order.TOT_skill_am3.value) +
eval(document.order.TOT_skill_am4.value) +
eval(document.order.TOT_skill_am5.value) +
eval(document.order.TOT_skill_am6.value) +
eval(document.order.TOT_esame_am3.value) +
eval(document.order.TOT_esame_am4.value) +
eval(document.order.TOT_esame_am5.value) +
eval(document.order.TOT_esame_am6.value));



}


// Calcola il trasporto ////////////////////////////

function trasporto(form) 
{


// Calcola il trasporto in base alla quantità ////////////////////////////




// -->
}