var strCurrentImage = "frontElevation";
var intDiscountType = 0;
var intDiscountAmount = 0;
var fltDiscountRate = 0;

function changeSpotlight(strImageID)
{
	if (strCurrentImage != strImageID)
	{
		//Change the displayed image
		document.getElementById(strCurrentImage).style.display = 'none';
		document.getElementById(strImageID).style.display = 'block';
		
		//Change the links to match the selected image
		document.getElementById(strCurrentImage + "Title").style.display = 'none';
		document.getElementById(strCurrentImage + "Link").style.display = 'block';
		document.getElementById(strImageID + "Link").style.display = 'none';
		document.getElementById(strImageID + "Title").style.display = 'block';
		
		//Save the current image
		strCurrentImage = strImageID;
	}
}

function ShowMoreInfo(divID)
{
	if (document.getElementById("div" + divID).style.display == 'inline')
	{
		document.getElementById("div" + divID).style.display = 'none';
		document.getElementById("lnk" + divID).innerHTML = 'Show detail';
		document.getElementById("img" + divID).src = 'images/plandetails/blue_arrow.jpg';
	}
	else
	{
		document.getElementById("div" + divID).style.display = 'inline';
		document.getElementById("lnk" + divID).innerHTML = 'Hide detail';
		document.getElementById("img" + divID).src = 'images/plandetails/blue_arrow.jpg';
	}
}

function ReverseImages()
{
	var strImageID = "";
	
	for (var intIndex = 0; intIndex < document.images.length; intIndex++)
	{
		if (document.images[intIndex].id.length > 0)
		{
			strImageID = document.images[intIndex].id.toString();
			
			if (strImageID != "elevations")
			{
				if (document.getElementById(strImageID).className == "normal")
				{
					document.getElementById(strImageID).className = "reverse";
				}
				else if (document.getElementById(strImageID).className == "reverse")
				{
					document.getElementById(strImageID).className = "normal";
				}
			}
			else
			{
				if (document.getElementById(strImageID).className == "normal")
				{
					document.getElementById("elevations").className = "reverse";
				}
				else
				{
					document.getElementById("elevations").className = "normal";
				}
			}
		}
	}
}

function ShowQualityText(chrQuality)
{
	(chrQuality == "P") ? document.getElementById("divPremiumWarning").style.display = "block" : document.getElementById("divPremiumWarning").style.display = "none";
}

function SubmitPlanOrder()
{
	if (blnValidatePlanOrder())
	{
		document.frmPricing.submit();
	}
}

function blnValidatePlanOrder()
{
	var objPlanType = null;
	var intIndex = 0;
	var strErrorMsg = "";
	
	with (document.frmPricing)
	{
		if (PlanType.length > 0)
		{
			while ((objPlanType == null) && (intIndex < PlanType.length))
			{
				(PlanType[intIndex].checked) ? objPlanType = PlanType[intIndex] : intIndex++;
			}
		}
		else if (PlanType.checked)
		{
			objPlanType = PlanType;
		}
		
		if (objPlanType != null)
		{
			//Study Sets do not have foundations
			if (objPlanType.value.toLowerCase() != "studyset")
			{
				//If Construction Set selected, verify Mirror Reversed sets less than total number of sets selected
				if ((objPlanType.value.toLowerCase() == "constructionset") && (avntConstructionOptions.length > 1))
				{
					var intTotalSets = 5;
					intIndex = 0;
					
					for (intIndex = 0; intIndex < avntConstructionOptions.length; intIndex++)
					{
						var objConstructionOption = elements[avntConstructionOptions[intIndex][0]];
						
						//Additional Sets
						if (avntConstructionOptions[intIndex][0] == "additional_sets")
						{
							intTotalSets += parseInt(objConstructionOption[objConstructionOption.selectedIndex].value);
						}
						//Mirror Reversed Sets
						else if ((avntConstructionOptions[intIndex][0] == "mirror_read") && (objConstructionOption[objConstructionOption.selectedIndex].value >= intTotalSets))
						{
							strErrorMsg = "You have selected more Mirror Reversed Sets than Total Plan Sets.\nPlease select fewer Mirror Reversed Sets or more Additional Construction Sets.\n\n";
							objConstructionOption.focus();
						}
					}
				}
				
				//Verify a Foundation was selected
				var blnFoundationSelected = false;
				
				if (foundation.length > 0)
				{
					intIndex = 0;
					
					while ((! blnFoundationSelected) && (intIndex < foundation.length))
					{
						(foundation[intIndex].checked) ? blnFoundationSelected = true : intIndex++;
					}
				}
				else if (foundation.checked)
				{
					blnFoundationSelected = true;
				}
				
				if (! blnFoundationSelected)
				{
					if (strErrorMsg.length == 0)
					{
						(foundation.length > 1) ? foundation[0].focus() : foundation.focus();
					}
					
					strErrorMsg += "Please select a Foundation Option.\n";
				}
			}
		}
		else
		{
			strErrorMsg = "Please select a House Plan Package.\n";
			(PlanType.length > 1) ? PlanType[0].focus() : PlanType.focus();
		}
	}
	
	if (strErrorMsg.length == 0)
	{
		return true;
	}
	else
	{
		alert(strErrorMsg);
		return false;
	}
}

function ChangeIdClass(strId,strClass)
{
	if (document.getElementById(strId))
	{
		document.getElementById(strId).className=strClass;
	}
}

function CalculateTotal()
{
	var objPlanType = null;
	var blnStudySet = false;
	var intIndex = 0;
	var intTotal = 0;
	var CustFees = 0;
	var TempCustFees = CustomFee*1 + CustomPrintingFee*1;
	var printingTR = document.getElementById('printingTR');
	var CustFeeTR = document.getElementById('CustFeeTR');
		
	with (document.frmPricing)
	{
		/* Plan Type Price */
		// More than 1 plan type, find the selected value
			for (var i = 0; i < PlanType.length; i++)
			{
				if(PlanType[i].checked)
				{
					ChangeIdClass(PlanType[i].id+"P","PriceInc");
				}
				else
				{
					ChangeIdClass(PlanType[i].id+"P","PriceNotInc");
				}
			}
			if (document.getElementById("mirror_read")){
				if (mirror_read.selectedIndex > 0)
				{
					ChangeIdClass("mirror_readP","PriceInc");
				}
				else
				{
					ChangeIdClass("mirror_readP","PriceNotInc");		
				}
			}
			if (document.getElementById("additional_sets")){
				if (additional_sets.selectedIndex > 0)
				{
					ChangeIdClass("additional_setsP","PriceInc");
				}
				else
				{
					ChangeIdClass("additional_setsP","PriceNotInc");		
				}
			}	
			if (foundation.length)
			{		
				for (var i = 0; i < foundation.length; i++)
				{
					if(foundation[i].checked)
					{
						ChangeIdClass("foundation"+i+"P","PriceInc");
					}
					else
					{
						ChangeIdClass("foundation"+i+"P","PriceNotInc");
					}				
				}
			}
			else
			{
				if(foundation.checked)
				{
					ChangeIdClass("foundation0P","PriceInc");
				}
				else
				{
					ChangeIdClass("foundation0P","PriceNotInc");
				}	
			}
			if (document.getElementById("foundationCust"))
			{	
				if (foundationCust.length)
				{		
					for (var i = 0; i < foundationCust.length; i++)
					{
						if(foundationCust[i].checked)
						{
							ChangeIdClass("foundationCust"+i+"P","PriceInc");
						}
						else
						{
							ChangeIdClass("foundationCust"+i+"P","PriceNotInc");
						}				
					}
				}
				else
				{
						if(foundationCust.checked)
						{
							ChangeIdClass("foundationCust0P","PriceInc");
						}
						else
						{
							ChangeIdClass("foundationCust0P","PriceNotInc");
						}					
				}
			}
			if(document.getElementById("reverse_read"))
			{
				if (document.getElementById("reverse_read").checked)
				{
					ChangeIdClass("reverse_readP","PriceInc");
				}
				else
				{
					ChangeIdClass("reverse_readP","PriceNotInc");
				}
			}			
			if(document.getElementById("material_list"))
			{
				if (document.getElementById("material_list").checked)
				{
					ChangeIdClass("material_listP","PriceInc");
				}
				else
				{
					ChangeIdClass("material_listP","PriceNotInc");
				}
			}
			if(document.getElementById("scheduling_software"))
			{
				if (document.getElementById("scheduling_software").checked)
				{
					ChangeIdClass("scheduling_softwareP","PriceInc");
				}
				else
				{
					ChangeIdClass("scheduling_softwareP","PriceNotInc");
				}
			}	
			if (scheduling_software.length)
			{		
				for (var i = 0; i < scheduling_software.length; i++)
				{
					if(scheduling_software[i].checked)
					{
						ChangeIdClass("scheduling_software"+i+"P","PriceInc");
					}
					else
					{
						ChangeIdClass("scheduling_software"+i+"P","PriceNotInc");
					}				
				}
			}					

			if(document.getElementById("solar_design"))
			{
				if (document.getElementById("solar_design").checked)
				{
					ChangeIdClass("solar_designP","PriceInc");
				}
				else
				{
					ChangeIdClass("solar_designP","PriceNotInc");
				}
			}
			
		if (PlanType.length > 0)
		{

			
			while ((objPlanType == null) && (intIndex < PlanType.length))
			{
				if (PlanType[intIndex].checked)
				{
					objPlanType = PlanType[intIndex];
					if (PlanType[intIndex].id=="CADcust")
					{
						intTotal = cadPrice;
						CustFees = TempCustFees;						
					}
					else
					{
						intTotal = aintMediaPrices[intIndex];
					}
				}
				else
				{
					intIndex++;					
				}				
			}
		}		
		// Only 1 plan type, is it selected?
		else if (PlanType.checked)
		{
			objPlanType = PlanType;
			intTotal = aintMediaPrices[0];
			ChangeIdClass(PlanType.id+"P","PriceInc");
			
			
		}
		else
		{
			ChangeIdClass(PlanType.id+"P","PriceNotInc");
		}			
		
		// Plan type was selected, check for additional constraints
		if (objPlanType != null)
		{		    
			// Construction Set Option Price
			if ((objPlanType.value.toLowerCase() == "constructionset") || ((objPlanType.value.toLowerCase() == "eightset")))
			{
				(objPlanType.value.toLowerCase() == "eightset") ? document.getElementById("copyNumber").innerHTML = '8' : document.getElementById("copyNumber").innerHTML = '5';
				
				for (var intIndex2 = 0; intIndex2 < avntConstructionOptions.length; intIndex2++)
				{
					var objConstructionOption = elements[avntConstructionOptions[intIndex2][0]];
					
					// Mirror Reversed Sets
					if (avntConstructionOptions[intIndex2][0] == "mirror_read")
					{
						if (objConstructionOption[objConstructionOption.selectedIndex].value > 0)
						{
							intTotal += avntConstructionOptions[intIndex2][1];
							
						}
					}
					// Additional Sets
					else
					{
						intTotal += (objConstructionOption[objConstructionOption.selectedIndex].value * avntConstructionOptions[intIndex2][1]);
						
					}
				}
				
				EnableFoundations();
			}
			else if (objPlanType.value.toLowerCase() == "studyset")
			{
				blnStudySet = true;
				DisableFoundations();
			}
			else
			{
				EnableFoundations();
			}
			
		}
		
		/* Foundation Price */
		if (! blnStudySet)
		{
			if (foundation.length > 0)
			{
				blnValueFound = false;
				intIndex = 0;
				
				while ((! blnValueFound) && (intIndex < foundation.length))
				{
					if (foundation[intIndex].checked)
					{
						blnValueFound = true;
						if (foundation[intIndex].getAttribute("label")=="custopt")
						{
							intTotal = intTotal *1 + everyCustomFee*1;
							CustFees = TempCustFees;
						}
						else
						{
							intTotal = intTotal*1 + aintFoundationPrices[intIndex]*1;
							
						}
					}
					else
					{
						intIndex++;
					}
				}
			}
			else if (foundation.checked)
			{
				intTotal += aintFoundationPrices[0]*1;
			}
		}
		
		/* Other Options Price */
		for (intIndex = 0; intIndex < avntOtherOptions.length; intIndex++)
		{
			if (elements[avntOtherOptions[intIndex][0]].checked)
			{
				intTotal += avntOtherOptions[intIndex][1]*1;
			}
		}
		
		if (scheduling_software.length > 0)
		{
			blnValueFound = false;
			intIndex = 0;
			
			while ((! blnValueFound) && (intIndex < scheduling_software.length))
			{
				if (scheduling_software[intIndex].checked)
				{
					blnValueFound = true;
					intTotal = intTotal*1 + aintSchedulingSoftwarePrices[intIndex]*1;
				}
				else
				{
					intIndex++;
				}
			}
		}		
		
		/* Walls Customization*/
		if(document.getElementById("WallCust"))
		{
			if (document.getElementById("WallCust").checked)
			{
				intTotal = intTotal*1 + everyCustomFee*1;
				CustFees = TempCustFees;
				ChangeIdClass("WallCustP","PriceInc");
			}
			else
			{
				ChangeIdClass("WallCustP","PriceNotInc");
			}
		}
		
		/* Right-Reading Reverse Set Customization*/
		if(document.getElementById("reverse_readCust"))
		{
			if (document.getElementById("reverse_readCust").checked)
			{
				intTotal = intTotal*1 + everyCustomFee*1;
				CustFees = TempCustFees;
				ChangeIdClass("reverse_readCustP","PriceInc");
			}
			else
			{
				ChangeIdClass("reverse_readCustP","PriceNotInc");
			}
		}
		/* Ceiling Height Customization*/
		if(document.getElementById("CeilingCust"))
		{
			if (document.getElementById("CeilingCust").checked)
			{
				intTotal = intTotal*1 + everyCustomFee*1;
				CustFees = CustomPrintingFee*1 + CustomFee*1;
				ChangeIdClass("CeilingCustP","PriceInc");
			}
			else
			{
				ChangeIdClass("CeilingCustP","PriceNotInc");
			}
		}
		/* SIP_ICF Customization*/
		if(document.getElementById("SIP_ICFCust"))
		{
			if (document.getElementById("SIP_ICFCust").checked)
			{
				intTotal = intTotal*1 + everyCustomFee*1;
				CustFees = TempCustFees;
				ChangeIdClass("SIP_ICFCustP","PriceInc");
			}
			else
			{
				ChangeIdClass("SIP_ICFCustP","PriceNotInc");
			}
		}		
		
	}
	
	if (CustFees > 0)
	{	    
		intTotal = intTotal*1 + CustFees;
		CustFeeTR.className="EnableClass";
		printingTR.className="EnableClass";
		ChangeIdClass("CustFeeTRP","PriceInc");		
		ChangeIdClass("printingTRP","PriceInc");		
	}
	else 
	{	
	    if (document.getElementById("CustFeeTR") != null )
	    { 	    
		    CustFeeTR.className="DisableClass";			
		    printingTR.className="DisableClass";
			ChangeIdClass("CustFeeTRP","PriceNotInc");		
			ChangeIdClass("printingTRP","PriceNotInc");		
		}
	}

	/* Calculate the Discounted Price */
	if (intDiscountType > 0)
	{
		document.getElementById('spnSubtotal').innerHTML = strCurrency(intTotal);
		
		if (! blnStudySet)
		{
			if (intDiscountType == 1)
			{
				if (intTotal > intDiscountAmount)
				{
					intTotal -= intDiscountAmount;
					document.getElementById('spnDiscount').innerHTML = "- " + strCurrency(intDiscountAmount);
				}
			}
			else if (intDiscountType == 2)
			{
				var fltDiscount = intTotal * fltDiscountRate;
				
				intTotal -= fltDiscount;
				document.getElementById('spnDiscount').innerHTML = "- " + strCurrency(fltDiscount);
			}
		}
		else
		{
			document.getElementById('spnDiscount').innerHTML = "- " + strCurrency(0);
		}
	}
	document.getElementById('spnTotal').innerHTML = strCurrency(intTotal);
}

function strCurrency(fltValue)
{
	//Separate the parts of the Currency
	var intWholeNums = parseInt(fltValue);
	var fltDecimals = fltValue - intWholeNums;
	
	//Format the Whole Numbers
	var strValue = intWholeNums.toString();
	var objRegExp = new RegExp('(-?[0-9]+)([0-9]{3})');
	
	while(objRegExp.test(strValue))
	{
		//replace original string with first group match, a comma, then second group match
		strValue = strValue.replace(objRegExp, '$1,$2');
	}
	
	//Format the R
	if (fltDecimals == 0)
	{
		strValue += ".00";
	}
	else
	{
		fltDecimals *= 100;
		strValue += "." + Math.round(fltDecimals);
	}
	
	return "$" + strValue;
}

function SubmitCostToBuild()
{
	if (blnValidateCostToBuild())
	{
		document.frmCostToBuild.submit();
	}
}

function blnValidateCostToBuild()
{
	var blnErrorFound = false;
	var blnFoundationSelected = false;
	var blnQualitySelected = false;
	var intIndex = 0;
	var strErrorMsg = "";
	
	with (document.frmCostToBuild.ZipCode)
	{
		value = value.trim();
		
		if (value.length == 0)
		{
			focus();
			blnErrorFound = true;
			strErrorMsg = "Please enter the Zip or Postal Code of the construction location.\n";
		}
		else if ((! blnValidateZipCode(value)) && (! blnValidatePostalCode(value)))
		{
			focus();
			blnErrorFound = true;
			strErrorMsg = "Please enter a valid Zip or Postal Code of the construction location.\n";
		}
	}
	
	with (document.frmCostToBuild)
	{
		//Foundation Type
		if (foundation.length > 0)
		{
			while ((! blnFoundationSelected) && (intIndex < foundation.length))
			{
				(foundation[intIndex].checked) ? blnFoundationSelected = true : intIndex++;
			}
		}
		else if (foundation.checked)
		{
			blnFoundationSelected = true;
		}
		
		if (! blnFoundationSelected)
		{
			strErrorMsg += "Please select a Foundation Type.\n";
			
			if (! blnErrorFound)
			{
				(foundation.length > 1) ? foundation[0].focus() : foundation.focus();
				blnErrorFound = true;
			}
		}
		
		intIndex = 0;
		
		//Construction Quality
		while ((! blnQualitySelected) && (intIndex < quality.length))
		{
			(quality[intIndex].checked) ? blnQualitySelected = true : intIndex++;
		}
		
		if (! blnQualitySelected)
		{
			strErrorMsg += "Please select the Construction Quality.\n";
			
			if (! blnErrorFound)
			{
				quality[0].focus();
				blnErrorFound = true;
			}
		}
	}
	
	if (blnErrorFound)
	{
		alert(strErrorMsg);
	}
	
	return (! blnErrorFound);
}

function DisableFoundations()
{
	with (document.frmPricing)
	{
		if (foundation.length > 0)
		{
			for (var intIndex = 0; intIndex < foundation.length; intIndex++)
			{
				foundation[intIndex].checked = false;
				foundation[intIndex].disabled = true;
			}
		}
		else
		{
			foundation.checked = false;
			foundation.disabled = true;
		}
	}
}

function EnableFoundations()
{
	with (document.frmPricing)
	{
		if (foundation.length > 0)
		{
			for (var intIndex = 0; intIndex < foundation.length; intIndex++)
			{
				if (foundation[intIndex].id != "foundationCust")
				{
					foundation[intIndex].disabled = false;
				}
			}
		}
		else
		{
				foundation.checked = true;
				foundation.disabled = false;
		}
	}
}

function AdjustMirrorRevOptions()
{
	if (avntConstructionOptions.length > 1)
	{
		with (document.frmPricing)
		{
			var objPlanType = null;
			var intIndex = 0;
			var intConstructionSets = 5;
			
			// More than 1 plan type, find the selected value
			if (PlanType.length > 0)
			{
				while ((objPlanType == null) && (intIndex < PlanType.length))
				{
					(PlanType[intIndex].checked) ? objPlanType = PlanType[intIndex] : intIndex++;
				}
			}
			// Only 1 plan type, is it selected?
			else if (PlanType.checked)
			{
				objPlanType = PlanType;
			}
			
			// Plan type was selected, check if construction set is 8 or 5 set
			if (objPlanType != null)
			{
				(objPlanType.value.toLowerCase() == "eightset") ? intConstructionSets = 8 : intConstructionSets = 5;
			}
			
			intConstructionSets += additional_sets.selectedIndex;
			
			if (intConstructionSets != mirror_read.options.length)
			{
				var strValue = "";
				
				//How many Mirror Reversed sets are currently selected
				var intMirrorRevSelected = mirror_read.selectedIndex;
				
				if (intMirrorRevSelected >= intConstructionSets)
				{
					intMirrorRevSelected = intConstructionSets - 1
				}
				
				//Clear the current values in the select field
				mirror_read.length = 0;
				
				//Create the new options
				for (var intIndex = 0; intIndex < intConstructionSets; intIndex++)
				{
					if (intIndex == intMirrorRevSelected)
					{
						mirror_read[intIndex] = new Option(intIndex, intIndex, false, true);
					}
					else
					{
						mirror_read[intIndex] = new Option(intIndex, intIndex, false, false);
					}
				}
			}
		}
	}
}

function switchImage(imgName)
{
	if (imgName == "frontThumb")
	{
		document.getElementById("frontElevationImg").src = frontElevation.src;
		document.getElementById("frontElevationImg").alt = "Front Elevation";
	}
	else if (imgName == "rearThumb")
	{
		document.getElementById("frontElevationImg").src = 	rearElevation.src;
		document.getElementById("frontElevationImg").alt = "Rear Elevation";
	}
	else if (imgName == "altThumb")
	{
		document.getElementById("frontElevationImg").src = 	altElevation.src;
		document.getElementById("frontElevationImg").alt = "Alternative Elevation";
	}
}

function switchPhoto(img)
{	
	document.getElementById("frontElevationImg").src = 	img.src
	document.getElementById("frontElevationImg").alt = "Photo";
}

function slideRight()
{
	var pos = parseInt(document.getElementById("slider").style.left);
	if (pos < 0)
	{
		document.getElementById("slider").style.left = pos + 110;
	}
}

function slideLeft()
{
	var posLeft = parseInt(document.getElementById("slider").style.left);
	if (posLeft > rightLimit)
	{
		document.getElementById("slider").style.left = posLeft - 110;
	}
}

function showForm()
{
	document.getElementById("formTable").style.display = "inline";
}

function getCheckedPlanType()
{
	var formObj=document.getElementById("frmPricing");
	for (var i=0; i < formObj.elements.length; i++)
	{
		if(formObj.elements[i].name == "PlanType" && formObj.elements[i].checked == true)
		{
			custOptions(formObj.elements[i]);
		}
	}
}
function custOptions(obj)
{
	formObj=document.getElementById("frmPricing");
		for (var i=0; i < formObj.elements.length; i++)
		{
			if ((formObj.elements[i].name == "foundation" || formObj.elements[i].name == "WallCust" || formObj.elements[i].name == "reverse_readCust" || formObj.elements[i].name == "CeilingCust" || formObj.elements[i].name == "CeilingHeightChanges" || formObj.elements[i].name == "SIP_ICFCust") && formObj.elements[i].getAttribute("label")=="custopt")
			{	
				if ((obj.value == "CADSet" || obj.value == "ReproSet" || obj.value == "CADcust") &&  (obj.checked == true))
				{
					if(formObj.elements[i].name != "CeilingHeightChanges")
					{
						formObj.elements[i].disabled=false; 
						if(formObj.elements[i].name == "CeilingCust" && formObj.elements[i].checked)
						{
							document.getElementById("CeilingHeightChanges").disabled=false;						
						}
					}
				}
				else
				{
					if(formObj.elements[i].name == "CeilingHeightChanges")
					{
						formObj.elements[i].value="Describe Ceiling Height Changes(Height wanted, Rooms, Levels):";
						formObj.elements[i].innerHTML = "Describe Ceiling Height Changes(Height wanted, Rooms, Levels):";
						formObj.elements[i].disabled=true; 
					}
					else
					{
						formObj.elements[i].checked = false;
						formObj.elements[i].disabled=true; 
					}
				}
			}
		}
		
	var tableObj=document.getElementById("pricingTable");
	var trs=tableObj.getElementsByTagName("tr");
	for (var i=0; i < trs.length; i++)
	{
		if(trs[i].className== "DisableClass" && (obj.value == "CADSet" || obj.value == "ReproSet" || obj.value == "CADcust") && (obj.checked == true) && trs[i].id != "printingTR" && trs[i].id != "CustFeeTR")
		{ 
			trs[i].className="EnableClass";
		}
		else
		{
			if(trs[i].className== "EnableClass" && obj.value != "CADSet" && obj.value != "ReproSet" && obj.value != "CADcust")
			{
				trs[i].className="DisableClass";
			}
		}
	}
	

}

function enableCeilingHeightChanges(obj)
{
	if (obj.checked == true)
	{
		document.getElementById("CeilingHeightChanges").disabled=false; 	
		document.getElementById("CeilingHeightChanges").value="Describe Ceiling Height Changes(Height wanted, Rooms, Levels):";
		document.getElementById("CeilingHeightChanges").innerHTML = "Describe Ceiling Height Changes(Height wanted, Rooms, Levels):";
	}
	else
	{
		document.getElementById("CeilingHeightChanges").value = "Describe Ceiling Height Changes(Height wanted, Rooms, Levels):";
		document.getElementById("CeilingHeightChanges").innerHTML = "Describe Ceiling Height Changes(Height wanted, Rooms, Levels):";		
		document.getElementById("CeilingHeightChanges").disabled=true; 
	}
}
