﻿var externWin;
function openPopupName(strName, strURL, intHeight, intWidth, intTop, intLeft, blnLocation, blnMenuBar, blnResizable, blnScrollbars, blnStatus, blnToolbar) {if (!externWin || externWin.closed){externWin = window.open(strURL, strName, "height=" + intHeight +  ",width=" + intWidth + ",top=" + intTop + ",left=" + intLeft + ",location=" + blnLocation + ",menubar=" + blnMenuBar + ",resizable=" + blnResizable + ",scrollbars=" + blnScrollbars + ",status=" + blnStatus + ",toolbar=" + blnToolbar);}else{externWin.location = strURL;externWin.focus();}}


var lastID = 0;

var chartWindow='';

function viewLargeChart(id){
	lastID = id;
	if (chartWindow.location && !chartWindow.closed){
    	chartWindow.focus();
   	}else{	
   		chartWindow = window.open("/sustainability/largeChart.htm","LargeChart")
   	}
}

function getLastChartTitle(){
	return document.getElementById("chartTitle_" + lastID).innerHTML;
}

function getLastChartFooter(){			
	return document.getElementById("chartFooter_" + lastID).innerHTML;
}

function getLastChartImage(){
	return document.getElementById("chartImage_" + lastID).src.replace("_s.gif","_l.gif");
}

function loadChart(){
	imgLg.src=window.opener.getLastChartImage();
	divTitle.innerHTML=window.opener.getLastChartTitle();
	FinancialTableCaption.innerHTML=window.opener.getLastChartFooter();
}



var tableWindow='';

function viewLargeTable(id){
	lastID = id;
	if (tableWindow.location && !tableWindow.closed){
    	tableWindow.focus();
   	}else{
		window.open("/sustainability/largeTable.htm","LargeTable")
	}
}
		
function getLastTableTitle(){
	return document.getElementById("tableTitle_" + lastID).innerHTML;
}
function getLastTableFooter(){
	return document.getElementById("tableFooter_" + lastID).innerHTML;
}
function getLastTableImage(){
	return document.getElementById("tableImage_" + lastID).src.replace("_s.gif","_l.gif");
}

function loadTable(){
	imgLg.src=window.opener.getLastTableImage();
	divTitle.innerHTML=window.opener.getLastTableTitle();
	tableFooter.innerHTML=window.opener.getLastTableFooter();
}


