// JavaScript Document
function ValidateShower()
{
	//alert(document.frmeasyspec.hidshower.value);
	if (document.frmeasyspec.hidshower.value == 1)
	{
		var arr = new Array(6);
		arr[0] = "0";
		arr[1] = "A";
		arr[2] = "B";
		arr[3] = "C";
		arr[4] = "D";
		arr[5] = "E";
		arr[6] = "F";		
		
		//0
		if (document.frmeasyspec.s_cubicletype.selectedIndex == 0)
		{
			alert ("Choose Cubicles > Shower type"); return false;
		}
		//3	Splash
		if (document.frmeasyspec.s_cubicletype.selectedIndex == 1)
		{
			if (document.frmeasyspec.s_selsplash.selectedIndex == 0)
			{alert ("Choose Cubicles > Shower > Splash options");return false}
			else
			{
				document.frmeasyspec.frmshowervalues.value = "SH3" + arr[document.frmeasyspec.s_selsplash.selectedIndex];
			}
		}
		
		//5	Minima
		if (document.frmeasyspec.s_cubicletype.selectedIndex == 2)
		{
			if (((document.frmeasyspec.s_selminima1.selectedIndex == 0) || (document.frmeasyspec.s_selminima3.selectedIndex == 0)) || ((document.frmeasyspec.s_selminima1.selectedIndex == 1) && (document.frmeasyspec.s_selminima2.selectedIndex == 0)))
			{alert ("Choose Cubicles > Shower > All Minima options");return false}
			else
			{
				if (document.frmeasyspec.s_selminima1.selectedIndex == 1) 
				{
				document.frmeasyspec.frmshowervalues.value = "SH5" + arr[document.frmeasyspec.s_selminima1.selectedIndex]+ arr[document.frmeasyspec.s_selminima2.selectedIndex]+ arr[document.frmeasyspec.s_selminima3.selectedIndex];
				}
				else
				{
				document.frmeasyspec.frmshowervalues.value = "SH5" + arr[document.frmeasyspec.s_selminima1.selectedIndex]+ arr[document.frmeasyspec.s_selminima3.selectedIndex];
				}
				
			}
		}
		
		//6	Linea
		if (document.frmeasyspec.s_cubicletype.selectedIndex == 3)
		{
			if (((document.frmeasyspec.s_sellinea1.selectedIndex == 0) || (document.frmeasyspec.s_sellinea3.selectedIndex == 0)) || ((document.frmeasyspec.s_sellinea1.selectedIndex == 1) && (document.frmeasyspec.s_sellinea2.selectedIndex == 0)))
			{alert ("Choose Cubicles > Shower > All Linea options");return false}
			else
			{
				if (document.frmeasyspec.s_sellinea1.selectedIndex == 1) 
				{
				document.frmeasyspec.frmshowervalues.value = "SH6" + arr[document.frmeasyspec.s_sellinea1.selectedIndex]+ arr[document.frmeasyspec.s_sellinea2.selectedIndex]+ arr[document.frmeasyspec.s_sellinea3.selectedIndex];
				}
				else
				{
				document.frmeasyspec.frmshowervalues.value = "SH6" + arr[document.frmeasyspec.s_sellinea1.selectedIndex]+ arr[document.frmeasyspec.s_sellinea3.selectedIndex];
				}
				
			}
		}
		
		//7	Truline
		if (document.frmeasyspec.s_cubicletype.selectedIndex == 4)
		{
			if (((document.frmeasyspec.s_seltruline1.selectedIndex == 0) || (document.frmeasyspec.s_seltruline3.selectedIndex == 0)) || ((document.frmeasyspec.s_seltruline1.selectedIndex == 1) && (document.frmeasyspec.s_seltruline2.selectedIndex == 0)))
			{alert ("Choose Cubicles > Shower > All Truline options");return false}
			else
			{
				if (document.frmeasyspec.s_seltruline1.selectedIndex == 1) 
				{
				//document.frmeasyspec.frmshowervalues.value = "SH7" + arr[document.frmeasyspec.s_seltruline1.selectedIndex]+ arr[document.frmeasyspec.s_seltruline2.selectedIndex]+ arr[document.frmeasyspec.s_seltruline3.selectedIndex];
				document.frmeasyspec.frmshowervalues.value = "SH7" + arr[document.frmeasyspec.s_seltruline1.selectedIndex]+ arr[document.frmeasyspec.s_seltruline2.selectedIndex];
				}
				else
				{
				//document.frmeasyspec.frmshowervalues.value = "SH7" + arr[document.frmeasyspec.s_seltruline1.selectedIndex]+ arr[document.frmeasyspec.s_seltruline3.selectedIndex];
				document.frmeasyspec.frmshowervalues.value = "SH7" + arr[document.frmeasyspec.s_seltruline1.selectedIndex];
				}
				
			}
		}
	
	//8	Coolite

		if (document.frmeasyspec.s_cubicletype.selectedIndex == 5)
		{
			if (document.frmeasyspec.s_selcoolite.selectedIndex == 0)
			{alert ("Choose Cubicles > Shower > Coolite options");return false}
			else
			{
				document.frmeasyspec.frmshowervalues.value = "SH8" + arr[document.frmeasyspec.s_selcoolite.selectedIndex];
			}
		}
	
	//9	Aqualine

		if (document.frmeasyspec.s_cubicletype.selectedIndex == 6)
		{
			if (document.frmeasyspec.s_selaqualine1.selectedIndex == 0)
			{alert ("Choose Cubicles > Shower > Aqualine options");return false}
			else
			{
				document.frmeasyspec.frmshowervalues.value = "SH9" + arr[document.frmeasyspec.s_selaqualine1.selectedIndex];
			}
		}
	
	//13 Acorn

		if (document.frmeasyspec.s_cubicletype.selectedIndex == 7)
		{
			if (document.frmeasyspec.s_selacorn1.selectedIndex == 0)
			{alert ("Choose Cubicles > Shower > Acron options");return false}
			else
			{
				document.frmeasyspec.frmshowervalues.value = "SH13" + arr[document.frmeasyspec.s_selacorn1.selectedIndex];
			}
		}
		
	
	//alert (document.frmeasyspec.frmshowervalues.value);	

	}
	else
	{
		document.frmeasyspec.frmshowervalues.value = "";
	}
	return true;
}
