function selClick(name,checked)	{

document.cookie= name + "=" + escape(checked);

}

function MyOpenWindow() {
  var MyURL = 'sponsors.html';
  var MyWindowName = 'Sponsors';
  var MyWindowOptions = 'width=860,height=350';
  window.open(MyURL, MyWindowName, MyWindowOptions);
}



function IsRole()
{
var x       = 0
var FormOk  = false

while (x < 6)
	{
	if (document.RoleAndPolicy.elements[x].checked == true)
		{
		FormOk = true		
		}
	x ++
	}


if (FormOk == false)
	{
	alert('Please select the Roles you wish to consider first')
	document.location.href = 'index.html'
	}
else

return true
}


function disObj(obname,checked,x,y)
{
var i
var obje
ObjArray = new Array("CO2FromBuildingEnergyUse", "CO2FromTransportToOrFromBuilding", "OtherEmissionsFromTheBuilding", "OtherEmissionsFromTransport", "WaterPollution", "Foodstuffs", "UseOfMaterials", "WaterUsAndManagement", "ElectricityUse", "EnergyUseAndManagement", "HeatingFuelUse", "NewRenewableEnergy", "WasteQuantityAndTypesGenerated", "WasteQuantityRecycled", "WasteCarefulDisposalOf", "ContaminatedLandManagement", "OilOrFuelLeaks", "Conduct", "EmployeeSatisfaction", "StaffAwarenessOfSustainableDevelopment", "EqualOpportunities", "OccupantHealthAndWellbeing", "QualityOfEmployment", "CommunityEngagement", "CommunityHealthAndWellbeing", "Neighbourliness", "ClientRelations", "EngagementWithSociety", "PeerRelations", "SupplierRelations", "StakeholderEngagementOnHumanRights", "LegislativeComplianceOnHumanRights", "SelectionOfNewBuildingMaterials", "DemolitionAndDecommissioning", "Species", "Habitat")

document.cookie= obname + "=" + escape(checked);


if (checked == false)
	for (i=x; i<(y+1); i++)
		{
		window.document.RoleAndPolicy.elements[ObjArray[i]].value=0;
		window.document.RoleAndPolicy.elements[ObjArray[i]].disabled=true;
		}
else
	for (i=x; i<(y+1); i++)
		{
		window.document.RoleAndPolicy.elements[ObjArray[i]].disabled=false;
		window.document.RoleAndPolicy.elements[ObjArray[i]].value=3;
		}


}

function enbObj(obname,checked,x,y)
{
var i
var obje

document.cookie= obname + "=" + escape(checked);


if (checked == true)
	for (i=x; i<(y+1); i++)
		{
		window.document.RoleAndPolicy.elements["po"+i].disabled=false;
		}
}

// chkChk(value, disabled)
// {
// if (value > 0)
// 	this.disabled=false;
// }

function checkform ()
{
var checkA
checkA = 0;

if (window.document.RoleAndPolicy.op(0).checked || window.document.RoleAndPolicy.op(2).checked)
	{
	for (i=0;i<document.RoleAndPolicy.pa.length;i++)
		{
		if (document.RoleAndPolicy.pa[i].checked)
			{
			checkA = 1;
			}
		//alert('This Action Plan Format Requires Property Activities to be selected under Step 5.');
		}
	 if (checkA == 0) 
	 	{
		alert('This Action Plan format requires property activities to be selected under step 5.');
		return false ;
		}
	 }

if (window.document.RoleAndPolicy.op(3).checked)
	{
	for (i=0;i<document.RoleAndPolicy.orole.length;i++)
		{
		if (document.RoleAndPolicy.orole[i].checked)
			{
			checkA = 1;
			}
		}
	 if (checkA == 0)
	 	{
		alert('This Action Plan format requires occupier roles to be selected under step 6.');
		return false ;
		}
	 }
return true ;
}