function goTo( url ) {
	window.location.href = url;
}

function goToNew( url ) {
	window.open(url)
}

function navBar( tableCellRef, hoverFlag, navStyle, sTip) {
	if ( hoverFlag ) {
		switch ( navStyle ) {
			case 0:
				tableCellRef.style.backgroundColor = '#FFB200';
				break;
			case 1:
				tableCellRef.style.backgroundColor = '#FFB200';
				break;
			case 2:
				tableCellRef.style.backgroundColor = '#FFECBF';
				break;
		}
	} else {
		switch ( navStyle ) {
			case 0:
				tableCellRef.style.backgroundColor = '';
				break;
			case 1:
				tableCellRef.style.backgroundColor = '#2E2EB2';
				break;
			case 2:
				tableCellRef.style.backgroundColor = '#C0C0EC';
				break;
		}
	}
	
	window.status = sTip;
}

function navBarClick( tableCellRef, navStyle, url ) {
	navBar( tableCellRef, 0, navStyle );
	goTo( url );
}

function navBarClickNew( tableCellRef, navStyle, url ) {
	navBar( tableCellRef, 0, navStyle );
	goToNew( url );
}

function openPopup( url, name, widgets, openerUrl )
{
	var host = location.hostname;
	var popupWin = window.open( url, name, widgets );
	
	if ( popupWin && popupWin.opener ) {
		if ( openerUrl )
		{
			popupWin.opener.location = openerUrl;
			popupWin.focus();
		}
		popupWin.opener.top.name = "opener";
	}
}

function swapColours(oCell, nColour){
		oCell.style.backgroundColor = nColour;
	}
