

function changeParentHeight(div_id, parent_id)
{	

	var childDivH = document.getElementById(div_id).clientHeight;
	var parentDivH = document.getElementById(parent_id).clientHeight;

	var tempElement = document.getElementById(parent_id);

	if(childDivH < parentDivH)
		tempElement.style.height = parentDivH;
	else
		tempElement.style.height = (childDivH + 15)+'px';
	
	var finalH = tempElement.clientHeight;
	return finalH;

}

function getHeight(ID)
{
	var parentDivH = document.getElementById(ID).clientHeight;
	return (parentDivH);
}

function changeHeight(div_id, parent_id, original)
{
	var childDivH = document.getElementById(div_id).clientHeight;
	var parentDivH = document.getElementById(parent_id).clientHeight;
	
	var tempElement = document.getElementById(parent_id);

	if(childDivH<parentDivH)
	{
		if((childDivH + 175) < original)
			tempElement.style.height = original;
		else
			tempElement.style.height = childDivH + 175;
	}	
	else
		tempElement.style.height = childDivH + 175;
	
	var finalH = document.getElementById(parent_id).clientHeight;	
	return finalH;

}


function rowChange(type, ID)
{

	var contentRow = type+"_"+ID;
	var isVisible = document.getElementById(contentRow).style.display;
	
	if(isVisible == "none")
	{
		document.getElementById(contentRow).style.display = "inline";
	}
	else
	{
		document.getElementById(contentRow).style.display = "none";
	}
}

function changeTotal(ID, Total)
{
	var div = document.getElementById(ID);
	var divValue = div.innerHTML;
	
	div.innerHTML = "<h2 class='text'>Total = " + Total + "</h2>";
}

function ChangeHolderHeight(div_ID, parent_ID, isIncrease){
	//alert(div_ID);
	//alert(parent_ID);
	
	var childDivH = document.getElementById(div_ID).clientHeight;
	var parentDivH = document.getElementById(parent_ID).clientHeight;
	
	var tempElement = document.getElementById(parent_ID);
	
	if(isIncrease == 1){
		tempElement.style.height = (parentDivH + childDivH - 5);
	} else {
		//alert("inElse");
		tempElement.style.height = (parentDivH - childDivH + 5);
	}
	
}
