
function getObjectById(sId)
{
	return(document.getElementById(sId));
}

function setValue(object_id, object_value)
{
	//alert(object_id +", "+ object_value);
	getObjectById(object_id).value = object_value;
}

function getValue(object_id)
{
	//alert(object_id );
	return(getObjectById(object_id).value);
}

function setAttrValue(object_id, object_attr_name, object_attr_value)
{
	getObjectById(object_id).setAttribute(object_attr_name, object_attr_value);
}


function getAttrValue(object_id, object_attr_name)
{
	return(getObjectById(object_id).getAttribute(object_attr_name));
}


function setSelectValue(object_id, object_value)
{
	objOptions = getObjectById(object_id);
	iOptionsNumber = objOptions.length;
	for(i=0; i<iOptionsNumber; i++)
	{
		if(getObjectById(object_id)[i].getAttribute("value") == object_value)
		{
			getObjectById(object_id).selectedIndex = i;
			break;
		}
	}
}

function getSelectValue(object_id)
{
	return(getObjectById(object_id).options[getObjectById(object_id).selectedIndex].getAttribute("value"));
}

function getSelectAttrValue(object_id, object_attr_name)
{
	return(getObjectById(object_id).options[getObjectById(object_id).selectedIndex].getAttribute(object_attr_name));
}

function isEmpty(sValue)
{
	if((sValue == "") || (sValue == null))
	{
		return true;
	}
	else
	{
		return false;
	}
}


function categoryClicked(sCategory, sSubCategories)
{
	if(getObjectById(sSubCategories).style.display == "none")
	{
		getObjectById(sCategory).style.backgroundColor = "#41AAD3";
		getObjectById(sSubCategories).style.display = "";
	}
	else
	{
		getObjectById(sCategory).style.backgroundColor = "";
		getObjectById(sSubCategories).style.display = "none";
	}
	
}



