var currentActiveDiv = '';
function showDivHide(id,disable)
{
	if(disable == '')
		disable = false;
	if (id == '_blank' && currentActiveDiv != '')
	{
		currentActiveObj = document.getElementById(currentActiveDiv);
		currentActiveObj.style.display = 'none';
		if(disable && currentActiveDiv != '')
			toggleDiv(currentActiveDiv,true);
		currentActiveDiv = '';
		return true;
	}else if(id == '_blank' && currentActiveDiv == '')
		return true;
		
	newActiveObj = document.getElementById(id);
	if (currentActiveDiv != '')
	{
		currentActiveObj = document.getElementById(currentActiveDiv);
		currentActiveObj.style.display = 'none';
	}
	newActiveObj.style.display = '';
	if(disable && currentActiveDiv != '')
		toggleDiv(currentActiveDiv,true);
	currentActiveDiv = id;	
	toggleDiv(currentActiveDiv,false);
	return true;
}

function toggleDiv(parent,status)
{
	parentObj = document.getElementById(parent);
	var len = parentObj.childNodes.length;
	for(var i = 0; i < len; i++)
	{         
		if(parentObj.childNodes[i].type != '')
		{
			try
			{
				parentObj.childNodes[i].disabled = status;
			}catch(err)
			{
				//do nothing
			};
		}
	}
}

function dropDownSelect(id,selectValue)
{
	drop = document.getElementById(id);
	drop.value = selectValue;
}

function radioCheck(id)
{
	radioObj = document.getElementById(id);
	radioObj.checked = true;
}

function changeText(id,text)
{
	textObj = document.getElementById(id);
	textObj.innerHTML = text;
}
