function HighlightStatusItem(button)
{
	button.className = 'status_item_selected';
}
function UnhighlightStatusItem(button)
{
	button.className = 'status_item_normal';
}
function HighlightMenuItem(menu)
{
	menu.className = 'menu_item_selected';
}
function UnhighlightMenuItem(menu)
{
	menu.className = 'menu_item_normal';
}

// Calculates the absolute position of the left side of the control
// Params:
//	oNode - control to get the position of
// Returns:
//	left position of the control
function GetAbsoluteLeft(oNode)
{
	var oCurrentNode=oNode;
	var iLeft=0;

	while(oCurrentNode.tagName!='BODY'){
		iLeft+=oCurrentNode.offsetLeft;

		oCurrentNode=oCurrentNode.offsetParent;
	}

	return iLeft;
}

// Calculates the absolute position of the top of the control
// Params:
//	oNode - control to get the position of
// Returns:
//	top position of the control
function GetAbsoluteTop(oNode)
{
	var oCurrentNode=oNode;
	var iTop=0;

	while(oCurrentNode.tagName!='BODY'){
		iTop+=oCurrentNode.offsetTop;

		oCurrentNode=oCurrentNode.offsetParent;
	}

	return iTop;
}

// Script for improved dropdown box
function ShowSeries()
{
	layer = document.getElementById('series_dd');
	layer.style.top = (GetAbsoluteTop(document.srs_frm.series_name) + document.srs_frm.series_name.clientHeight + 1) + 'px';
	layer.style.left = GetAbsoluteLeft(document.srs_frm.series_name) + 'px';
	layer.style.position = 'absolute';
	layer.style.visibility = 'visible';	
	document.srs_frm.series_name.disabled = true;
}

function HighlightDropDown(control, highlight)
{
	if (highlight)
	{
		control.className = 'DropDownItemHighlight';
	}
	else
	{
		
		control.className = 'DropDownItemNormal';
	}
}

function PopulateDropDownBox(value, name)
{	
	layer = document.getElementById('series_dd');
	document.srs_frm.srs_id_search.value = value;
	document.srs_frm.series_name.value = name.innerHTML;
	layer.style.visibility = 'hidden';	
	document.srs_frm.series_name.disabled = false;
}

function ShowProductSummary()
{
	summaryButton = document.getElementById('productSummaryButton');
	summaryButton.className = 'ProductSummaryButtonSelected';
	
	detailsButton = document.getElementById('productDetailsButton');
	detailsButton.className = 'ProductDetailsButtonNormal';
}

function ShowProductDetails()
{
	summaryButton = document.getElementById('productSummaryButton');
	summaryButton.className = 'ProductSummaryButtonNormal';
	
	detailsButton = document.getElementById('productDetailsButton');
	detailsButton.className = 'ProductDetailsButtonSelected';
}