//*************************************************************************************************************
//	function blocking(i)
//		Description: Hides or show the Paragraph according to the number passed
//		Parameters:	i=Number of the Paragraph to hide or show
//		Sample Use: blocking(5)
//		Where Used: TransactionDetail, PendingTransactions
//*************************************************************************************************************
function blocking(i)
{
	shown[i] = (shown[i]) ? false : true;
	current = (shown[i]) ? 'block' : 'none';

	if (shown[i]) {
		eval("document.arrow_" + i + ".src='images/arrow_down_on.gif'")
		eval("document.arrow_" + i + ".alt='Click to Hide Detail'")
	}
	else {
		eval("document.arrow_" + i + ".src='images/arrow_right_off.gif'")
		eval("document.arrow_" + i + ".alt='Click to Show Detail'")
	}
	
	if (document.getElementById)
	{
		document.getElementById('number'+i).style.display = current;
	}
	else if (document.all)
	{
		document.all['number'+i].style.display = current;
	}
}

//*************************************************************************************************************
//	function arrow_onmouseover(i)
//		Description: Show the proper mouseover image depending on if the Paragraph is hidded or visible
//		Parameters:	i=Number of arrow image on the page
//		Sample Use: arrow_onmouseover(2)
//		Where Used: TransactionDetail, PendingTransactions
//*************************************************************************************************************
function arrow_onmouseover(i)
{
	if (shown[i]) {
		eval("document.arrow_" + i + ".src='images/arrow_down_on.gif'")
	}
	else {
		eval("document.arrow_" + i + ".src='images/arrow_right_on.gif'")
	}
}

//*************************************************************************************************************
//	function arrow_onmouseout(i)
//		Description: Show the proper mouseout image depending on if the Paragraph is hidded or visible
//		Parameters:	i=Number of arrow image on the page
//		Sample Use: arrow_onmouseout(2)
//		Where Used: TransactionDetail, PendingTransactions
//*************************************************************************************************************
function arrow_onmouseout(i)
{
	if (shown[i]) {
		eval("document.arrow_" + i + ".src='images/arrow_down_on.gif'")
	}
	else {
		eval("document.arrow_" + i + ".src='images/arrow_right_off.gif'")
	}
}

//*************************************************************************************************************
//	Need to define new window on every page for WindowPopUp and ClosePopUps to work properly.
//*************************************************************************************************************
var newWindow;

//*************************************************************************************************************
//	WindowPopUp(url, width, height)
//		Description: Opens a new window with the URL that is passed
//		Parameters:	url=URL that you wish to open.
// 					width=Width of the popup window
// 					height=Height of the popup window
//		Sample Use: WindowPopUp('www.yankeeinfo.com', '600', '800')
//		Where Used:
//*************************************************************************************************************
function WindowPopUp(url, toolbar, location, menubar, width, height, top, left) {
	ClosePopUps()
	newWindow = eval("window.open('" + url + "', 'popup', 'toolbar=" + toolbar + ", location=" + location + ", locationbar=0, personalbar=0, directories=0, status=1, menubar=" + menubar + ", scrollbars=1, resizable=1, width=" + width + ", height=" + height + ", top=" + top + ", left=" + left + "')");
}

//*************************************************************************************************************
//	ClosePopUps()
//		Description: Opens a new window with the URL that is passed
//		Parameters:	none
//		Sample Use: ClosePopUps()
//		Where Used:
//*************************************************************************************************************
function ClosePopUps() {
	if (newWindow) {
		if (newWindow.closed == false) {
			newWindow.close();
		}
	}
}