function getObject(objectId)
{
	if (document.all && !document.getElementById)
		return document.all(objectId);
	else
		return document.getElementById(objectId);
}

function changeClass()
{
    if (getObject("Terms").className=="hidden")
    {
        getObject("Terms").className="shown";
        getObject("Category").className="childExpanded";
        getObject("ShowLink").className="hideInline";
        getObject("HideLink").className="showInline";
    }
    else
    {
        getObject("Terms").className="hidden";
        getObject("Category").className="childExpandable";
        getObject("ShowLink").className="showInline";
        getObject("HideLink").className="hideInline";
    }
}
function enableFacilityType()
{
		//selectedIndex
        if (getObject("industrySegment").selectedIndex == 0)
		{
			getObject("facilityType").className="usrTextShown";
			getObject("facilityTypeGasProduction").className="usrTextHidden";
			getObject("facilityType").disabled=true;
			getObject("srcCategory").disabled=true;
		}
		/*
		else if (getObject("industrySegment").selectedIndex == 1)
		{
			//Gas Production
			getObject("facilityType").className="usrTextHidden";
			getObject("facilityTypeGasProduction").className="usrTextShown";
			//getObject("srcCategory").disabled=true;
		}
		*/
		else
		{
			getObject("facilityType").className="usrTextShown";
			getObject("facilityTypeGasProduction").className="usrTextHidden";
			getObject("facilityType").disabled=false;
			getObject("srcCategory").disabled=true;
		}
		//It is useless to aim <option> for IE
		//getObject("wells").style.display = "none";
}
function enableSourceCategory(){
	//var currentIndex = new Number();
	//currentIndex = getObject("facilityType").selectedIndex;
	//alert(currentIndex);
	//If value attribute is not set: IE shows nothing, FF shows text
	//If value attribute is set: IE shows value, FF shows value
	//alert(getObject("facilityType")[currentIndex].value);
	//Both IE and FF show text here
	//alert(getObject("facilityType")[currentIndex].text);
	if (getObject("facilityType").selectedIndex == 0)
	{
		getObject("srcCategory").disabled=true;
	}
	else
	{
		getObject("srcCategory").disabled=false;
	}
}











