function ChangePrixPreparationsUnitaires(Tag,Id)
{
	switch(Tag.options[Tag.selectedIndex].text)
	{
		case "30 ml" : {document.getElementById(Id).value = "7,85 $"; break;}
		case "50 ml" : {document.getElementById(Id).value = "10,90 $"; break;}
		case "125 ml" : {document.getElementById(Id).value = "21,05 $"; break;}
		case "250 ml" : {document.getElementById(Id).value = "35,60 $"; break;}
		case "500 ml" : {document.getElementById(Id).value = "63,75 $"; break;}
		case "1 L" : {document.getElementById(Id).value = "82,75 $"; break;}
	}
}

function ChangeFormatPreparationsUnitaires(Tag,Id)
{
	var a = Tag.options[Tag.selectedIndex];
	var b = document.getElementById("DtListeProduits__ctl2_Dropdownlist2");

	if (a.text == "Granules" || a.text == "Globules" )
	{
		b.selectedIndex = "0"; //Aucun format pour ces types 
		b.disabled = true;		
		if (a.text == "Granules")
		{
			document.getElementById(Id).value = "7,25 $";
		}

		if (a.text == "Globules")
		{
			document.getElementById(Id).value = "5,45 $";
		}
	}
	else //Ce sont des gouttes
	{
		b.selectedIndex = "1"; //Mettre à 30 ml
		b.disabled = false;
		
		//Mettre prix du 30 ml
		document.getElementById(Id).value = "7,85 $";
	}	
}

function ChangePrixPreparationsComposes(Tag,Id)
{
	var Presentations = document.getElementById("DDLPresentations");
	var a = Tag.options[Tag.selectedIndex];
	var Prix = document.getElementById(Id);
	
	if (Presentations.value == "Gouttes")
	{
		switch(a.value)
		{
			case "30 ml" : {Prix.value = "15,35 $"; break;}
			case "50 ml" : {Prix.value = "20,15 $"; break;}
			case "125 ml" : {Prix.value = "26,90 $"; break;}
			case "250 ml" : {Prix.value = "43,75 $"; break;}
			case "500 ml" : {Prix.value = "80,80 $"; break;}
			case "1 L" : {Prix.value = "144,85 $"; break;}
		}
	}
	else if (Presentations.value == "Teintures m\u00E8res")//utilisation d'unicode pour l'accent
	{
		switch(a.value)
		{
			case "30 ml" : {Prix.value = "18,85 $"; break;}
			case "50 ml" : {Prix.value = "21,05 $"; break;}
			case "125 ml" : {Prix.value = "33,80 $"; break;}
			case "250 ml" : {Prix.value = "58,60 $"; break;}
			case "500 ml" : {Prix.value = "113,95 $"; break;}
			case "1 L" : {Prix.value = "227,95 $"; break;}
		}
	
	}
	else{
		switch(a.value)
		{   //suppositoires
			case "12" : {Prix.value = "18,85 $"; break;}
			case "30" : {Prix.value = "41,80 $"; break;}
			//Ovules
			case "6" : {Prix.value = "14,25 $"; break;}
			//Triturations
			case "30 g" : {Prix.value = "29,35 $"; break;}
			case "50 g" : {Prix.value = "44,25 $"; break;}
		}
	}
}
function ChangeFormatPreparationsComposes(Tag,Id)
{
	var a = Tag.options[Tag.selectedIndex];
	var DDLFormats = document.getElementById("DDLFormats");
	var DDLFormatsSuppositoires = document.getElementById("DDLFormatsSuppositoires");
	var DDLFormatsOvules = document.getElementById("DDLFormatsOvules");
	var DDLPommade = document.getElementById("DDLPommade");
	var DDLTriturations = document.getElementById("DDLTriturations");
	var Prix = document.getElementById(Id);

	switch (a.value)
	{
	case "Granules": 
		DDLFormats.selectedIndex = "0"; //Aucun format
		DDLFormats.disabled = true;	
		DDLFormats.className = "visible";
		DDLFormatsSuppositoires.className = "hidden";
		DDLFormatsOvules.className = "hidden";	
		DDLPommade.className = "hidden";
		DDLTriturations.className = "hidden";
		Prix.value = "8,35 $";
		break;
	case "Globules":
		DDLFormats.selectedIndex = "0"; //Aucun format 
		DDLFormats.disabled = true;	
		DDLFormats.className = "visible";
		DDLFormatsSuppositoires.className = "hidden";
		DDLFormatsOvules.className = "hidden";	
		DDLPommade.className = "hidden";
		DDLTriturations.className = "hidden";
		Prix.value = "6,50 $";
		break;
	case "Gouttes":
		DDLFormats.disabled = false;
		DDLFormats.selectedIndex = "1"; //Mettre à 30 ml
		DDLFormats.className = "visible";
		DDLFormatsSuppositoires.className = "hidden";
		DDLFormatsOvules.className = "hidden";	
		DDLPommade.className = "hidden";
		DDLTriturations.className = "hidden";
		Prix.value = "15,35 $"; 	//Mettre prix du 30 ml
		break;
	case "Suppositoires":
		DDLFormats.className = "hidden";
		DDLFormatsSuppositoires.className = "visible";
		DDLFormatsOvules.className = "hidden";	
		DDLPommade.className = "hidden";
		DDLTriturations.className = "hidden";
		Prix.value = "18,85 $";  //Prix pour 12
		break;
	case "Ovules":
		DDLFormats.className = "hidden";
		DDLFormatsSuppositoires.className = "hidden";
		DDLFormatsOvules.className = "visible";	
		DDLPommade.className = "hidden";
		DDLTriturations.className = "hidden";
		Prix.value = "14,25 $";  //Prix pour 6
		break;	
	case "Pommade":
		DDLFormats.className = "hidden";
		DDLFormatsSuppositoires.className = "hidden";
		DDLFormatsOvules.className = "hidden";	
		DDLPommade.className = "visible";
		DDLTriturations.className = "hidden";
		Prix.value = "20,30 $";  //Prix pour 30 ml
		break;	


	case "Triturations":
		DDLFormats.className = "hidden";
		DDLFormatsSuppositoires.className = "hidden";
		DDLFormatsOvules.className = "hidden";	
		DDLPommade.className = "hidden";
		DDLTriturations.className = "visible";
		Prix.value = "29,35 $";  //Prix pour 30 g
		break;	

	case "Teintures m\u00E8res":
		DDLFormats.disabled = false;
		DDLFormats.selectedIndex = "1"; //Mettre à 30 ml
		DDLFormats.className = "visible";
		DDLFormatsSuppositoires.className = "hidden";
		DDLFormatsOvules.className = "hidden";	
		DDLPommade.className = "hidden";
		DDLTriturations.className = "hidden";
		Prix.value = "18,85 $";  //Prix pour 30 ml
		break;			
	}
}
function ChangeDilutionPreparationsUnitaires(Tag,Id)
{}
