function get_total(){



    prix=parseFloat(document.getElementById("prix").value);
    tva=parseFloat(document.getElementById("tva").value);


    if(tva != 0){
      
      if(tva==1){
          tva = prix * 19.6/100;
           total = prix + tva;
      }
      if(tva==2){
        total = prix;
        tva = 0;
      }
    }else{
      tva = 0;
      total = prix;

    }
     document.getElementById("prix1").value = prix;
     document.getElementById("tva1").value = tva.toFixed(2);
     document.getElementById("total").value = total.toFixed(2);

 
 
 
}

/**
 * this is a sample javascript that demonstrates how the Rad UPload Plus
 * applet can interact with a javascript.
 *
 * If you set the jsnotify configuration property, the applet will call 
 * the upload completed method when the file upload has been completed.
 *
 * You can call the getUploadStatus() method to determine whether the
 * upload was successfull. Possible values are 1, for success, 0 when the 
 * user has cancelled the upload and -1 when the upload failed (error).
 * 
 */

/* a usefull variable */
var upload=0;


/**
 * the response returned by the server will be passed as a parameter (s) to this
 * function. However in the case of Netscape the parameter will be empty. When using
 * netscape call the getResponse()method of the applet to access this information.
 *
 */
function uploadCompleted()
{
	
	upload = document.rup.getUploadStatus();
	if(upload==1)
	{
		// location.href = "http://www.zoneftp.com/transfert,ok.html";
    // location.reload();
	}
	else
	{
		confirm("L'envoi a échoué");
	}
	
	return true;
}
function r_getFormData()
{
    if(document.forms[0] == undefined)
    {
        return;
    }
    for(i = 0 ; i < document.forms[0].elements.length ; i++)
    {
        document.rup.jsAddTextField(document.forms[0].elements[i].name,
                                    document.forms[0].elements[i].value);
    }
}
/*
function uploadCompleted()
{
	
	upload = document.rup.getUploadStatus();
	if(upload==1)
	{
		if(confirm("the upload was successfull do you wish to see the server response?"))
		{
			alert(document.rup.getResponse());
		}
	}
	else
	{
		confirm("The upload seems to have failed");
	}
	
	return true;
}*/

