//Common definitions
//------------------

//Dynamic text using DIV/SPAN
	function displayElement(divName,textDesc,dummyRef) {
		//if (document.all) {
		//	tmp = eval('document.all.' + divName);
		//	tmp.innerHTML = textDesc;
		//}
		//else
		
		//IE5+ and NS6+
		if ((document.getElementById) && (document.getElementById(divName)) && (document.getElementById(divName))) {
				document.getElementById(divName).innerHTML = textDesc;
		}
		//NS4.*
		else if ((document.layers) && (document.layers[divName]) && (document.layers[dummyRef])) {
			refDiv = eval('document.layers.' + dummyRef);
			var refDivDoc = refDiv.document;
			tmp = eval('document.layers.' + divName);
			refDiv.left = tmp.pageX;
			refDiv.top = tmp.pageY;
				refDivDoc.open();
				refDivDoc.write(textDesc);
				refDivDoc.close();
			refDiv.visibility = 'visible';
			refDiv.style.color = 'red';
		}
	}

function showHelp(helpString) {	
	var helpWindow = window.open("","helpWindow", "width=300,height=50,status=no,resizable=no,scrollbars=no,screenX=100,left=100,screenY=200,top=200");	
	helpWindow.document.open();
	helpWindow.document.write('<html><head><title>TNT</title><link href="/corporate/css/global.css" rel="stylesheet" type="text/css" /></head>');
	helpWindow.document.write('<body bgcolor="#eeeeee" leftmargin="1" topmargin="0" marginheight="0" marginwidth="1" link="#cc4000" vlink="#660000" alink="#999999" text="#000000" onblur="window.close()">');
	helpWindow.document.write('<center><table border="0" width="300" height="100%" cellspacing="5" cellpadding="0" bgcolor="#eeeeee">');
	helpWindow.document.write('<tr valign="top" class="sectionheading">');
	helpWindow.document.write('<td><img src="/corporate/images/im_help.gif" width="40" height="40" alt="?" border="0" /></td>');
	helpWindow.document.write('<td>');
	helpWindow.document.write(helpString);
	helpWindow.document.write('</td></tr></table></center></body></html>');
	helpWindow.document.close();
}

//Rounding number (X) to decimal places (N)
function RoundToNdp(X, N) { 
	var T = Number('1e'+N)
  	return Math.round(X*T)/T 
}

