
function evaluatesite()
{
	getUserInput();
	
	// Validate the user input
	if(SiteName=="")
	{
		alert("Please enter a Site Name.");
		return;
	}
	if(DevelopmentType1a==0 && DevelopmentType1b==0 && DevelopmentType1c==0 && DevelopmentType1d==0)
	{
		alert("Please enter at least one Site Development option.");
		return;
	}
	if(DrainageOwnership2a==0 && DrainageOwnership2b==0)
	{
		alert("Please enter at least one Drainage Ownership option.");
		return;
	}
	
	updateXML();
	launchReport();
}

function getUserInput()
{
	SiteName=EvaluationForm.sitename.value;
	if (EvaluationForm.development[0].checked){DevelopmentType1a=1;}
	else {DevelopmentType1a=0;}
	if (EvaluationForm.development[1].checked){DevelopmentType1b=1;}
	else {DevelopmentType1b=0;}
	if (EvaluationForm.development[2].checked){DevelopmentType1c=1;}
	else {DevelopmentType1c=0;}
	if (EvaluationForm.development[3].checked){DevelopmentType1d=1;}
	else {DevelopmentType1d=0;}
	if (EvaluationForm.drainage[0].checked){DrainageOwnership2a=1;}
	else {DrainageOwnership2a=0;}
	if (EvaluationForm.drainage[1].checked){DrainageOwnership2b=1;}
	else {DrainageOwnership2b=0;}
	if (EvaluationForm.sitesize.value=="3a"){SiteSize3="3a";}
	else if (EvaluationForm.sitesize.value=="3b"){SiteSize3="3b";}
	else if (EvaluationForm.sitesize.value=="3c"){SiteSize3="3c";}
	else {SiteSize3="3d";}
	if (EvaluationForm.soiltype.value=="4a"){SoilType4="4a";}
	else if (EvaluationForm.soiltype.value=="4b"){SoilType4="4b";}
	else {SoilType4="4c";}
	if (EvaluationForm.landuse.value=="5a"){LandUse5="5a";}
	else {LandUse5="5b";}
	if (EvaluationForm.location.value=="6a"){Location6="6a";}
	else if (EvaluationForm.location.value=="6b"){Location6="6b";}
	else if (EvaluationForm.location.value=="6c"){Location6="6c";}
	else {Location6="6d";}
	if (EvaluationForm.land[0].checked){ContaminatedLand7=1;}
	else {ContaminatedLand7=0;}
	if (EvaluationForm.land[1].checked){AquiferHigh8a=1;}
	else {AquiferHigh8a=0;}
	if (EvaluationForm.land[2].checked){ScarceWater10=1;}
	else {ScarceWater10=0;}
	if (EvaluationForm.groundwater.value=="9a"){GroundWater9="9a";}
	else {GroundWater9="9b";}
		
}

function updateXML()
{
	// Update Site Name
	pathSiteName.childNodes[0].text = SiteName;
	
	// Find out which SuDS are appropriate for this site based on the user input
	
	// Are Ponds suitable?
	if (SiteSize3=="3a"){pathPonds.childNodes[0].text="no";}
	else if  (LandUse5=="5b"){pathPonds.childNodes[0].text="no";}
	else {pathPonds.childNodes[0].text="yes";}
	
	// Are Basins suitable?
	if (SiteSize3=="3a"){pathBasins.childNodes[0].text="no";}
	else if  (LandUse5=="5b"){pathBasins.childNodes[0].text="no";}
	else if  (GroundWater9=="9a"){pathBasins.childNodes[0].text="no";}
	else {pathBasins.childNodes[0].text="yes";}
	
	// Pervious Pavements are always suitable.
	pathPerviousPavements.childNodes[0].text="yes";
	
	// Swales are always suitable.
	pathSwales.childNodes[0].text="yes";
	
	// Are Infiltration Trenches suitable?
	if (SoilType4=="4c"){pathInfiltrationTrenches.childNodes[0].text="no";}
	else if  (ContaminatedLand7==1){pathInfiltrationTrenches.childNodes[0].text="no";}
	else {pathInfiltrationTrenches.childNodes[0].text="yes";}
	
	// Are Soakaways suitable?
	if (SoilType4=="4c"){pathSoakaways.childNodes[0].text="no";}
	else if  (ContaminatedLand7==1){pathSoakaways.childNodes[0].text="no";}
	else if  (GroundWater9=="9a"){pathSoakaways.childNodes[0].text="no";}
	else {pathSoakaways.childNodes[0].text="yes";}
	
	// Greenroofs are always suitable.
	pathGreenroofs.childNodes[0].text="yes";
	
	// Rainwater Harvesting is always suitable.
	pathRainwaterHarvesting.childNodes[0].text="yes";
	
	// Is Bio-retention suitable?
	if (ContaminatedLand7==1){pathBioretention.childNodes[0].text="no";}
	else if  (AquiferHigh8a==1){pathBioretention.childNodes[0].text="no";}
	else {pathBioretention.childNodes[0].text="yes";}
	
	// Set Infiltration Text Which Applies
	
	// Reset Infiltration Text
		pathInfiltration.childNodes[0].childNodes[0].text="Off";
		pathInfiltration.childNodes[1].childNodes[0].text="Off";
		pathInfiltration.childNodes[2].childNodes[0].text="Off";
		pathInfiltration.childNodes[3].childNodes[0].text="Off";
		pathInfiltration.childNodes[4].childNodes[0].text="Off";
		pathInfiltration.childNodes[5].childNodes[0].text="Off";
		pathInfiltration.childNodes[6].childNodes[0].text="Off";
		pathInfiltration.childNodes[7].childNodes[0].text="Off";
	
	if (	SoilType4!="4c" 
		&& ContaminatedLand7==0 
		&& DevelopmentType1d==0 
		&& LandUse5!="5b"
		&& Location6!="6a"
		&& AquiferHigh8a==0
		&& GroundWater9!="9a")
	{
		pathInfiltration.childNodes[0].childNodes[0].text="On";
		pathInfiltration.childNodes[1].childNodes[0].text="Off";
		pathInfiltration.childNodes[2].childNodes[0].text="Off";
		pathInfiltration.childNodes[3].childNodes[0].text="Off";
		pathInfiltration.childNodes[4].childNodes[0].text="Off";
		pathInfiltration.childNodes[5].childNodes[0].text="Off";
		pathInfiltration.childNodes[6].childNodes[0].text="Off";
		pathInfiltration.childNodes[7].childNodes[0].text="Off";
	}
	
	else if (SoilType4=="4c")
	{
		pathInfiltration.childNodes[0].childNodes[0].text="Off";
		pathInfiltration.childNodes[1].childNodes[0].text="On";
		pathInfiltration.childNodes[2].childNodes[0].text="Off";
		pathInfiltration.childNodes[3].childNodes[0].text="Off";
		pathInfiltration.childNodes[4].childNodes[0].text="Off";
		pathInfiltration.childNodes[5].childNodes[0].text="Off";
		pathInfiltration.childNodes[6].childNodes[0].text="Off";
		pathInfiltration.childNodes[7].childNodes[0].text="Off";
	}
	
	else if (ContaminatedLand7==1)
	{
		pathInfiltration.childNodes[0].childNodes[0].text="Off";
		pathInfiltration.childNodes[1].childNodes[0].text="Off";
		pathInfiltration.childNodes[2].childNodes[0].text="On";
		pathInfiltration.childNodes[3].childNodes[0].text="Off";
		pathInfiltration.childNodes[4].childNodes[0].text="Off";
		pathInfiltration.childNodes[5].childNodes[0].text="Off";
		pathInfiltration.childNodes[6].childNodes[0].text="Off";
		pathInfiltration.childNodes[7].childNodes[0].text="Off";
	}
	
	else
	{
		if (DevelopmentType1d==1)	{pathInfiltration.childNodes[3].childNodes[0].text="On";}
		if (LandUse5=="5b")		{pathInfiltration.childNodes[4].childNodes[0].text="On";}
		if (Location6=="6a")		{pathInfiltration.childNodes[5].childNodes[0].text="On";}
		if (AquiferHigh8a==1)		{pathInfiltration.childNodes[6].childNodes[0].text="On";}
		if (GroundWater9=="9a")		{pathInfiltration.childNodes[7].childNodes[0].text="On";}
	}
	
	// Set Treatment Train Text Which Applies
	
	// Reset Treatment Train Text
		pathTreatmentTrain.childNodes[0].childNodes[0].text="On";
		pathTreatmentTrain.childNodes[1].childNodes[0].text="Off";
		pathTreatmentTrain.childNodes[2].childNodes[0].text="Off";
		pathTreatmentTrain.childNodes[3].childNodes[0].text="Off";
		
	if (DevelopmentType1c==1 || DevelopmentType1d==1) {pathTreatmentTrain.childNodes[1].childNodes[0].text="On";}
	if (SiteSize3=="3c" || SiteSize3=="3d") {pathTreatmentTrain.childNodes[2].childNodes[0].text="On";}
	if (Location6=="6a") {pathTreatmentTrain.childNodes[3].childNodes[0].text="On";}
	
	// Set Ponds Text Which Applies
	
	// Reset Ponds Text
		pathPonds.childNodes[3].childNodes[0].text="Off";
		pathPonds.childNodes[4].childNodes[0].text="Off";
		pathPonds.childNodes[5].childNodes[0].text="Off";
		pathPonds.childNodes[6].childNodes[0].text="Off";
		pathPonds.childNodes[7].childNodes[0].text="Off";
		pathPonds.childNodes[8].childNodes[0].text="Off";
		pathPonds.childNodes[9].childNodes[0].text="Off";
		pathPonds.childNodes[10].childNodes[0].text="Off";
		pathPonds.childNodes[11].childNodes[0].text="Off";
	
	if (SiteSize3=="3a")
	{
		pathPonds.childNodes[4].childNodes[0].text="On";
		pathPonds.childNodes[5].childNodes[0].text="Off";
		pathPonds.childNodes[7].childNodes[0].text="Off";
	}
		
	else
	{
		if (SiteSize3=="3b")	{pathPonds.childNodes[5].childNodes[0].text="On";}
		if (LandUse5=="5b")	{pathPonds.childNodes[7].childNodes[0].text="On";}
	}
	
	if (DevelopmentType1d==1)		{pathPonds.childNodes[3].childNodes[0].text="On";}
	if (SoilType4=="4a")			{pathPonds.childNodes[6].childNodes[0].text="On";}
	if (Location6=="6c" || Location6=="6d")	{pathPonds.childNodes[8].childNodes[0].text="On";}
	if (ContaminatedLand7==1)		{pathPonds.childNodes[9].childNodes[0].text="On";}
	if (AquiferHigh8a==1)			{pathPonds.childNodes[10].childNodes[0].text="On";}
	if (GroundWater9=="9a")			{pathPonds.childNodes[11].childNodes[0].text="On";}
	
	// Set Basins Text Which Applies
		
	// Reset Basins Text
		pathBasins.childNodes[3].childNodes[0].text="Off";
		pathBasins.childNodes[4].childNodes[0].text="Off";
		pathBasins.childNodes[5].childNodes[0].text="Off";
		pathBasins.childNodes[6].childNodes[0].text="Off";
		pathBasins.childNodes[7].childNodes[0].text="Off";
		pathBasins.childNodes[8].childNodes[0].text="Off";
		pathBasins.childNodes[9].childNodes[0].text="Off";
		pathBasins.childNodes[10].childNodes[0].text="Off";
		
	if (SiteSize3=="3a")
	{
		pathBasins.childNodes[4].childNodes[0].text="On";
		pathBasins.childNodes[5].childNodes[0].text="Off";
		pathBasins.childNodes[10].childNodes[0].text="Off";
	}
			
	else
	{
		if (GroundWater9=="9a")	{pathBasins.childNodes[10].childNodes[0].text="On";}
		if (LandUse5=="5b")	{pathBasins.childNodes[6].childNodes[0].text="On";}
	}
	
	if (SiteSize3=="3b")			{pathBasins.childNodes[5].childNodes[0].text="On";}
	if (DevelopmentType1d==1)		{pathBasins.childNodes[3].childNodes[0].text="On";}
	if (Location6=="6c" || Location6=="6d")	{pathBasins.childNodes[7].childNodes[0].text="On";}
	if (ContaminatedLand7==1)		{pathBasins.childNodes[8].childNodes[0].text="On";}
	if (AquiferHigh8a==1)			{pathBasins.childNodes[9].childNodes[0].text="On";}
	
	// Set Pervious Pavements Text Which Applies
			
	// Reset Pervious Pavements Text
	pathPerviousPavements.childNodes[3].childNodes[0].text="Off";
	pathPerviousPavements.childNodes[4].childNodes[0].text="Off";
	
	if (DevelopmentType1d==1)	{pathPerviousPavements.childNodes[3].childNodes[0].text="On";}
	if (DrainageOwnership2b==1)	{pathPerviousPavements.childNodes[4].childNodes[0].text="On";}
		
	// Set Swales Text Which Applies
				
	// Reset Swales Text
	pathSwales.childNodes[3].childNodes[0].text="Off";
	pathSwales.childNodes[4].childNodes[0].text="Off";
	pathSwales.childNodes[5].childNodes[0].text="Off";
	pathSwales.childNodes[6].childNodes[0].text="Off";
		
	if (DevelopmentType1a==1 || DevelopmentType1b==1 || DevelopmentType1c==1 || DevelopmentType1d==1)	
		{pathSwales.childNodes[3].childNodes[0].text="On";}
	if (DevelopmentType1d==1)	{pathSwales.childNodes[4].childNodes[0].text="On";}
	if (ContaminatedLand7==1)	{pathSwales.childNodes[5].childNodes[0].text="On";}
	if (AquiferHigh8a==1)		{pathSwales.childNodes[6].childNodes[0].text="On";}
	
	// Set Infiltration Trenches Text Which Applies
	
	// Reset Infiltration Trenches Text
	pathInfiltrationTrenches.childNodes[3].childNodes[0].text="Off";
	pathInfiltrationTrenches.childNodes[4].childNodes[0].text="Off";
	pathInfiltrationTrenches.childNodes[5].childNodes[0].text="Off";
	pathInfiltrationTrenches.childNodes[6].childNodes[0].text="Off";
	pathInfiltrationTrenches.childNodes[7].childNodes[0].text="Off";
	pathInfiltrationTrenches.childNodes[8].childNodes[0].text="Off";
	pathInfiltrationTrenches.childNodes[9].childNodes[0].text="Off";
	pathInfiltrationTrenches.childNodes[10].childNodes[0].text="Off";
	pathInfiltrationTrenches.childNodes[11].childNodes[0].text="Off";
	
	if (SoilType4=="4c")
	{
		pathInfiltrationTrenches.childNodes[8].childNodes[0].text="On";
		pathInfiltrationTrenches.childNodes[9].childNodes[0].text="Off";
		pathInfiltrationTrenches.childNodes[5].childNodes[0].text="Off";
		pathInfiltrationTrenches.childNodes[6].childNodes[0].text="Off";
	}
	
	else if (ContaminatedLand7==1)
	{
		pathInfiltrationTrenches.childNodes[9].childNodes[0].text="On";
		pathInfiltrationTrenches.childNodes[5].childNodes[0].text="Off";
		pathInfiltrationTrenches.childNodes[6].childNodes[0].text="Off";
	}
	
	else
	{
		if (DevelopmentType1d==1){pathInfiltrationTrenches.childNodes[5].childNodes[0].text="On";}
		if (DrainageOwnership2b==1){pathInfiltrationTrenches.childNodes[6].childNodes[0].text="On";}
	}
	
	// if (DevelopmentType1b==1)	{pathInfiltrationTrenches.childNodes[3].childNodes[0].text="On";}
	if (DevelopmentType1c==1)	{pathInfiltrationTrenches.childNodes[4].childNodes[0].text="On";}
	if (SoilType4=="4b")		{pathInfiltrationTrenches.childNodes[7].childNodes[0].text="On";}
	if (AquiferHigh8a==1)		{pathInfiltrationTrenches.childNodes[10].childNodes[0].text="On";}
	if (GroundWater9=="9a")		{pathInfiltrationTrenches.childNodes[11].childNodes[0].text="On";}
	
	// Set Soakaways Text Which Applies
		
	// Reset Soakaways Text
	pathSoakaways.childNodes[3].childNodes[0].text="Off";
	pathSoakaways.childNodes[4].childNodes[0].text="Off";
	pathSoakaways.childNodes[5].childNodes[0].text="Off";
	pathSoakaways.childNodes[6].childNodes[0].text="Off";
	pathSoakaways.childNodes[7].childNodes[0].text="Off";
	pathSoakaways.childNodes[8].childNodes[0].text="Off";
	pathSoakaways.childNodes[9].childNodes[0].text="Off";
	pathSoakaways.childNodes[10].childNodes[0].text="Off";
	pathSoakaways.childNodes[11].childNodes[0].text="Off";
	pathSoakaways.childNodes[12].childNodes[0].text="Off";
		
	if (SoilType4=="4c")
	{
		pathSoakaways.childNodes[8].childNodes[0].text="On";
		pathSoakaways.childNodes[9].childNodes[0].text="Off";
		pathSoakaways.childNodes[5].childNodes[0].text="Off";
		pathSoakaways.childNodes[6].childNodes[0].text="Off";
		pathSoakaways.childNodes[12].childNodes[0].text="Off";
	}
		
	else if (ContaminatedLand7==1)
	{
		pathSoakaways.childNodes[9].childNodes[0].text="On";
		pathSoakaways.childNodes[5].childNodes[0].text="Off";
		pathSoakaways.childNodes[6].childNodes[0].text="Off";
		pathSoakaways.childNodes[12].childNodes[0].text="Off";
	}
		
	else if (GroundWater9=="9a")
	{
		pathSoakaways.childNodes[12].childNodes[0].text="On";
		pathSoakaways.childNodes[5].childNodes[0].text="Off";
		pathSoakaways.childNodes[6].childNodes[0].text="Off";
	}
		
	else
	{
		if (DevelopmentType1c==1 || DevelopmentType1d==1){pathSoakaways.childNodes[5].childNodes[0].text="On";}
		if (DrainageOwnership2b==1){pathSoakaways.childNodes[6].childNodes[0].text="On";}
	}
		
	if (DevelopmentType1b==1)	{pathSoakaways.childNodes[3].childNodes[0].text="On";}
	// if (DevelopmentType1c==1)	{pathSoakaways.childNodes[4].childNodes[0].text="On";}
	if (SoilType4=="4b")		{pathSoakaways.childNodes[7].childNodes[0].text="On";}
	if (AquiferHigh8a==1)		{pathSoakaways.childNodes[10].childNodes[0].text="On";}
	// if (GroundWater9=="9a")		{pathSoakaways.childNodes[11].childNodes[0].text="On";}
	
	// Set Greenroofs Text Which Applies
			
	// Reset Greenroofs Text
	pathGreenroofs.childNodes[3].childNodes[0].text="Off";
	pathGreenroofs.childNodes[4].childNodes[0].text="Off";
	pathGreenroofs.childNodes[5].childNodes[0].text="Off";
	pathGreenroofs.childNodes[6].childNodes[0].text="Off";
	
	if (DrainageOwnership2b==1){pathGreenroofs.childNodes[4].childNodes[0].text="On";}
	if (ScarceWater10==1)
	{
		if (DevelopmentType1a==1 || DevelopmentType1b==1){pathGreenroofs.childNodes[5].childNodes[0].text="On";}
		else {pathGreenroofs.childNodes[6].childNodes[0].text="On";}
	}	
	if (DevelopmentType1a==1 || DevelopmentType1b==1 || DevelopmentType1c==1 || DevelopmentType1d==1)
		{pathGreenroofs.childNodes[3].childNodes[0].text="On";}
	
	// Set Rainwater Harvesting Text Which Applies
				
	// Reset Rainwater Harvesting Text
	pathRainwaterHarvesting.childNodes[3].childNodes[0].text="Off";
	pathRainwaterHarvesting.childNodes[4].childNodes[0].text="Off";
	pathRainwaterHarvesting.childNodes[5].childNodes[0].text="Off";
	pathRainwaterHarvesting.childNodes[6].childNodes[0].text="Off";
		
	if (DrainageOwnership2b==1){pathRainwaterHarvesting.childNodes[5].childNodes[0].text="On";}
	else	{pathRainwaterHarvesting.childNodes[6].childNodes[0].text="On";}
	if (DevelopmentType1a==1 || DevelopmentType1b==1){pathRainwaterHarvesting.childNodes[3].childNodes[0].text="On";}
	if (DevelopmentType1c==1 || DevelopmentType1d==1){pathRainwaterHarvesting.childNodes[4].childNodes[0].text="On";}
	
	// Set Bio-retention Text Which Applies
					
	// Reset Bio-retention Text
	pathBioretention.childNodes[3].childNodes[0].text="Off";
	pathBioretention.childNodes[4].childNodes[0].text="Off";
	pathBioretention.childNodes[5].childNodes[0].text="Off";
	pathBioretention.childNodes[6].childNodes[0].text="Off";
	pathBioretention.childNodes[7].childNodes[0].text="Off";
	pathBioretention.childNodes[8].childNodes[0].text="Off";
	
	if (ContaminatedLand7==1)
	{
		pathBioretention.childNodes[5].childNodes[0].text="On";
		pathBioretention.childNodes[7].childNodes[0].text="Off";
		pathBioretention.childNodes[4].childNodes[0].text="Off";
		pathBioretention.childNodes[8].childNodes[0].text="Off";
	}
			
	else if (AquiferHigh8a==1)
	{
		pathBioretention.childNodes[7].childNodes[0].text="On";
		pathBioretention.childNodes[4].childNodes[0].text="Off";
		pathBioretention.childNodes[8].childNodes[0].text="Off";
	}
			
	else
	{
		if (DevelopmentType1d==1)	{pathBioretention.childNodes[4].childNodes[0].text="On";}
		if (GroundWater9=="9a")		{pathBioretention.childNodes[8].childNodes[0].text="On";}
	}
	
	// User Input
	
	// Reset User Input
	pathInput.childNodes[0].childNodes[0].childNodes[0].text="Off";
	pathInput.childNodes[0].childNodes[1].childNodes[0].text="Off";
	pathInput.childNodes[0].childNodes[2].childNodes[0].text="Off";
	pathInput.childNodes[0].childNodes[3].childNodes[0].text="Off";
	
	pathInput.childNodes[1].childNodes[0].childNodes[0].text="Off";
	pathInput.childNodes[1].childNodes[1].childNodes[0].text="Off";
	
	pathInput.childNodes[2].childNodes[0].childNodes[1].text="";
	pathInput.childNodes[3].childNodes[0].childNodes[1].text="";
	pathInput.childNodes[4].childNodes[0].childNodes[1].text="";
	pathInput.childNodes[5].childNodes[0].childNodes[1].text="";
	
	pathInput.childNodes[6].childNodes[0].childNodes[0].text="Off";
	pathInput.childNodes[6].childNodes[1].childNodes[0].text="Off";
	pathInput.childNodes[6].childNodes[2].childNodes[0].text="Off";
	
	pathInput.childNodes[7].childNodes[0].childNodes[1].text="";
	
	// Record User Input
	
	if (DevelopmentType1a==1) {pathInput.childNodes[0].childNodes[0].childNodes[0].text="On";}
	if (DevelopmentType1b==1) {pathInput.childNodes[0].childNodes[1].childNodes[0].text="On";}
	if (DevelopmentType1c==1) {pathInput.childNodes[0].childNodes[2].childNodes[0].text="On";}
	if (DevelopmentType1d==1) {pathInput.childNodes[0].childNodes[3].childNodes[0].text="On";}
	
	if (DrainageOwnership2a==1) {pathInput.childNodes[1].childNodes[0].childNodes[0].text="On";}
	if (DrainageOwnership2b==1) {pathInput.childNodes[1].childNodes[1].childNodes[0].text="On";}
	
	if (SiteSize3=="3a")  {pathInput.childNodes[2].childNodes[0].childNodes[1].text="Less than 1 ha.";}
	if (SiteSize3=="3b")  {pathInput.childNodes[2].childNodes[0].childNodes[1].text="Between 1 ha and 3 ha.";}
	if (SiteSize3=="3c")  {pathInput.childNodes[2].childNodes[0].childNodes[1].text="Between 3 ha and 50 ha.";}
	if (SiteSize3=="3d")  {pathInput.childNodes[2].childNodes[0].childNodes[1].text="Greater than 50 ha.";}
	
	if (SoilType4=="4a")  {pathInput.childNodes[3].childNodes[0].childNodes[1].text="1 and 2.";}
	if (SoilType4=="4b")  {pathInput.childNodes[3].childNodes[0].childNodes[1].text="3.";}
	if (SoilType4=="4c")  {pathInput.childNodes[3].childNodes[0].childNodes[1].text="4 and 5.";}
	
	if (LandUse5=="5a")   {pathInput.childNodes[4].childNodes[0].childNodes[1].text="Greenfield Development.";}
	if (LandUse5=="5b")   {pathInput.childNodes[4].childNodes[0].childNodes[1].text="Urban Infill.";}
	
	if (Location6=="6a")  {pathInput.childNodes[5].childNodes[0].childNodes[1].text="Uplands.";}
	if (Location6=="6b")  {pathInput.childNodes[5].childNodes[0].childNodes[1].text="Lowlands.";}
	if (Location6=="6c")  {pathInput.childNodes[5].childNodes[0].childNodes[1].text="Floodplain.";}
	if (Location6=="6d")  {pathInput.childNodes[5].childNodes[0].childNodes[1].text="Estuary / Coastal.";}
	
	if (ContaminatedLand7==1) {pathInput.childNodes[6].childNodes[0].childNodes[0].text="On";}
	if (AquiferHigh8a==1) {pathInput.childNodes[6].childNodes[1].childNodes[0].text="On";}
	if (ScarceWater10==1) {pathInput.childNodes[6].childNodes[2].childNodes[0].text="On";}
	
	if (GroundWater9=="9a")  {pathInput.childNodes[7].childNodes[0].childNodes[1].text="Less than 2m below surface.";}
	if (GroundWater9=="9b")  {pathInput.childNodes[7].childNodes[0].childNodes[1].text="More than 2m below surface.";}
	
}

function launchReport()
{
	var newWind=window.open('SuDSReport.html','','status=no,toolbar=no,menubar=yes,scrollbars=yes,width=700');
	var xslReportView = new ActiveXObject("Microsoft.XMLDOM");
	xslReportView.async = false;
	xslReportView.load("SuDSReport.xsl");
	newWind.document.write(xml.transformNode(xslReportView));
}
