function ChangeTimeframes(sChartName,fname) {
	asChart1Props=sChart1Props.split(/_/);
	sChartSuffix=document.images[sChartName].src.split(".");
	sChartSuffix=sChartSuffix[sChartSuffix.length-2].substr(sChartSuffix[sChartSuffix.length-2].length-1,1);

	for (i=0; i < document.forms[fname].optTimeframe.length; i++) {
		if (document.forms[fname].optTimeframe[i].checked) {
			nTimeFrameIndex=document.forms[fname].optTimeframe[i].value.split(/-/);
			nTimeFrameIndex=nTimeFrameIndex[1];
			break;
		}
	}
	document.images[sChartName].src='http://www.theFinancials.com/charts/' + asChart1Props[nTimeFrameIndex] + sChartSuffix + '.jpg'
	return false;
}

function ZoomThumbnail(sDir, sThumbChartName, sTarget) {
	if (!sDir) {
		sDir="vortex";
	}
	if (typeof(sTarget)=='undefined') {
		sTarget="_top";
	} else {
		if (!sTarget) {
			sTarget="_top";
		}
	}
	var nCurChartID= new String(document.images[sThumbChartName].src);
	var nCurChartIDList=nCurChartID.split('/');
	var nCurChartID=nCurChartIDList[nCurChartIDList.length-1];
	var nCurChartID=nCurChartID.substring(0,7) + 'v.PDF';
	window.open("http://www.theFinancials.com/charts/" + nCurChartID);
	return false;
}

function GetCSVData(sChartName, bNewWindow) {
	if (typeof(bNewWindow)=='undefined') {
		bNewWindow=true;
	}
	if (typeof(sChart1Props)=='undefined') {
		asChart1Props=initChart1Props.split(/_/);
	} else {
		asChart1Props=sChart1Props.split(/_/);
	}
	var sMaxTimeFrameChart=asChart1Props[asChart1Props.length-1] + '.csv';
	if (bNewWindow) {
		window.open("http://www.theFinancials.com/data/" + sMaxTimeFrameChart);
	} else {
		top.document.location="http://www.theFinancials.com/data/" + sMaxTimeFrameChart;
	}
	return false;
}
