function setSelectedTop(id){
	document.getElementById(id).style.backgroundImage = "url(images/anchorbg-selected.jpg)";
}
function setSelectedSub(id){
	document.getElementById(id).style.color = "#C10009";
	document.getElementById(id).parentNode.style.borderBottomColor = "#C10009";
}
function setSelectedChild(id){
	var child = document.getElementById(id);
	child.parentNode.parentNode.style.display = "block";
	child.style.color = "#C10009";
	child.parentNode.style.borderBottomColor = "#C10009";
}
function showSub(id){
	document.getElementById(id).style.display = "block";
}

var noOfSeparators = 5;
var separatorWidth = 6;
var width = 876 - noOfSeparators * separatorWidth;
var columns = 6;
var leftOffset = 5;
var columnPositions = new Array();
for(var i = 0; i < columns; i++){
	columnPositions[i] = i == 0 ?
		0 : 
		(width / columns + separatorWidth) * (i - 1) + width / columns + separatorWidth + leftOffset;
}

function positionToColumn(id, column, colSpan, setWidth){
	document.getElementById(id).style.left = columnPositions[column] + "px";
	if(setWidth)
		document.getElementById(id).style.width = column == 0 ? 
			(width / columns + separatorWidth) * colSpan - separatorWidth + "px" : 
			(width / columns + separatorWidth) * colSpan - separatorWidth - leftOffset + "px";
}
function setPosition(id, top, left){
	document.getElementById(id).style.top = top + "px";
	document.getElementById(id).style.left = left + "px";
}
function openNew(path){
	window.open(path, 'myWindow', 'status = 1, height = 450, width = 500, resizable = 1, scrollbars = 1');
}