var buttonNum_YC = "5"; var rowLastDivIDClicked = 1; var idButtonLast="0" function removeImage_0009800238_5623(elCell) { try { var newPreviewSpan = document.getElementById("preview"); newPreviewSpan.parentNode.removeChild(newPreviewSpan); } catch(e) { } } function previewImage_0009800238_5623(elCell, chartWidth, chartHeight) { if (typeof chartWidth == 'undefined') { chartWidth=260; } if (typeof chartHeight == 'undefined') { chartHeight=130; } try { var backgroundColor = getComputedStyle(document.querySelector('#chartTD')).backgroundColor } catch(e) { var backgroundColor = "#003366" } var newPreviewSpan= document.createElement('span'); newPreviewSpan.id='preview'; newPreviewSpan.class='preview_0009800238'; newPreviewSpan.backgroundColor=backgroundColor newPreviewSpan.style.position="absolute"; newPreviewSpan.style.display="none"; newPreviewSpan.style.padding="2px"; newPreviewSpan.style.margin="auto"; newPreviewSpan.style.zIndex="9999"; newPreviewSpan.innerHTML = "" var body = document.getElementsByTagName("body")[0]; body.parentNode.insertBefore(newPreviewSpan, body); } function moveImage_0009800238_5623(elCell, chartWidth, chartHeight) { if (typeof chartWidth == 'undefined') { chartWidth=260; } if (typeof chartHeight == 'undefined') { chartHeight=130; } chartWidth=chartWidth/2; var w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0); var h = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); var nWidthScrollbarAdjustment if (w > 600) { nWidthScrollbarAdjustment = 25; } else { nWidthScrollbarAdjustment = 5; } var nTop = event.pageY + 25; var nLeft = event.pageX - chartWidth; if (nLeft<0) { nLeft=0; } if (nTop + chartHeight + 2*nWidthScrollbarAdjustment > h) { var nTop = event.pageY - chartHeight - nWidthScrollbarAdjustment; } if (nLeft+(2*chartWidth)+nWidthScrollbarAdjustment>w) { nLeft=w - ((2*chartWidth)+nWidthScrollbarAdjustment); } var newPreviewSpan = document.getElementById("preview"); try { newPreviewSpan.style.top=nTop + "px"; newPreviewSpan.style.left=nLeft + "px"; newPreviewSpan.style.display="block"; } catch(e) { } } function resizeWidget_0009800238_5623() { try { widgetChart_0009800238_5623.src=chartURL_0009800238_5623 + "fb.jpg" } catch (e) { } var nMaxColumns = mainDiv_0009800238_5623.children["TableRows"].children['TableHeaderRow'].children.length //var nMaxRows = mainDiv_0009800238_5623.children["TableRows"].children.length; var nMaxRows = nNumRows_0009800238_5623; var divWidth = mainDiv_0009800238_5623.children["TableRows"].offsetWidth; if (bHasCharts_0009800238_5623) { try { var buttonsChart = mainDiv_0009800238_5623.children['chartContainer'].children['timeframeButtons'].children var buttonNum_Wk = 0; var buttonNum_Mo = 1; var buttonNum_Yr = 2; var buttonNum_3Yr = 3; var buttonNum_5Yr = 4; var buttonNum_YC = 5; } catch (e) { } nLastColToShow = nMaxColumns; try { for (var i = 0; i <= mainDiv_0009800238_5623.children.length; i++) { if (mainDiv_0009800238_5623.children[i].className=="chartTDContainer") { var chartDivWidth=mainDiv_0009800238_5623.children[i].offsetWidth; break; } } switch (true) { case (chartDivWidth < 191): buttonsChart[buttonNum_Wk].innerText="Wk"; buttonsChart[buttonNum_Mo].innerText="Mo"; buttonsChart[buttonNum_Yr].innerText="Yr"; buttonsChart[buttonNum_3Yr].innerText="3Yr"; buttonsChart[buttonNum_5Yr].innerText="5Yr"; buttonsChart[buttonNum_YC].innerText="YC"; break; case (chartDivWidth < 250): buttonsChart[buttonNum_Wk].innerText="Week"; buttonsChart[buttonNum_Mo].innerText="Month"; buttonsChart[buttonNum_Yr].innerText="Year"; buttonsChart[buttonNum_3Yr].innerText="3 Year"; buttonsChart[buttonNum_5Yr].innerText="5 Year"; buttonsChart[buttonNum_YC].innerText="Curve"; break; case (chartDivWidth < 400): buttonsChart[buttonNum_Wk].innerText="Week"; buttonsChart[buttonNum_Mo].innerText="Month"; buttonsChart[buttonNum_Yr].innerText="Year"; buttonsChart[buttonNum_3Yr].innerText="3 Yrs"; buttonsChart[buttonNum_5Yr].innerText="5 Yrs"; buttonsChart[buttonNum_YC].innerText="Yield Curve"; break; case (chartDivWidth < 520): buttonsChart[buttonNum_Wk].innerText="Week"; buttonsChart[buttonNum_Mo].innerText="Month"; buttonsChart[buttonNum_Yr].innerText="Year"; buttonsChart[buttonNum_3Yr].innerText="3 Years"; buttonsChart[buttonNum_5Yr].innerText="5 Years"; buttonsChart[buttonNum_YC].innerText="Yield Curve"; break; default: buttonsChart[buttonNum_Wk].innerText="1 Week"; buttonsChart[buttonNum_Mo].innerText="1 Month"; buttonsChart[buttonNum_Yr].innerText="1 Year"; buttonsChart[buttonNum_3Yr].innerText="3 Years"; buttonsChart[buttonNum_5Yr].innerText="5 Years"; buttonsChart[buttonNum_YC].innerText="Yield Curve"; break; } } catch (e) { } } switch (true) { case (divWidth < 150): nLastColToShow = 2; try { widgetChart_0009800238_5623.maxWidth="165px"; } catch (e) { } break; case (divWidth < 250): nLastColToShow = 3; try { widgetChart_0009800238_5623.maxWidth="290px"; } catch (e) { } break; case (divWidth < 350): nLastColToShow = 4; try { widgetChart_0009800238_5623.maxWidth="390px"; } catch (e) { } break; case (divWidth < 450): nLastColToShow = 6; try { widgetChart_0009800238_5623.maxWidth="500px"; } catch (e) { } break; case (divWidth < 550): nLastColToShow = 8; try { widgetChart_0009800238_5623.maxWidth="500px"; } catch (e) { } break; default: try { widgetChart_0009800238_5623.maxWidth="800px"; } catch (e) { } break; } if (bIsResponsive_0009800238_5623) { if (nLastColToShow > nMaxColumns) { nLastColToShow = nMaxColumns } var nForcedColumns=0; //hide/unhide headers/fields for (var i = 1; i <= nMaxColumns; i++) { if (i <= nLastColToShow) { if (nLastColToShow == 3 && i == 3) { if (mainDiv_0009800238_5623.getElementsByClassName("header" + i)[0].classList.contains("nohide")) { nForcedColumns++ } else { try { mainDiv_0009800238_5623.getElementsByClassName("header" + i)[0].style.display='none'; } catch (e) { } for (var f = 0; f < nMaxRows; f++) { try { mainDiv_0009800238_5623.getElementsByClassName("field" + i)[f].style.display='none'; } catch (e) { } } } } else { try { mainDiv_0009800238_5623.getElementsByClassName("header" + i)[0].style.display='inline-block'; } catch (e) { } for (var f = 0; f < nMaxRows; f++) { try { mainDiv_0009800238_5623.getElementsByClassName("field" + i)[f].style.display='inline-block'; } catch (e) { } } } } else { if (nLastColToShow == 3 && i == 4 && nForcedColumns == 0) { try { mainDiv_0009800238_5623.getElementsByClassName("header" + i)[0].style="display: inline-block;"; } catch (e) { } for (var f = 0; f < nMaxRows; f++) { try { mainDiv_0009800238_5623.getElementsByClassName("field" + i)[f].style="display: inline-block;"; } catch (e) { } } } else { try { mainDiv_0009800238_5623.getElementsByClassName("header" + i)[0].style.display='none'; } catch (e) { } for (var f = 0; f < nMaxRows; f++) { try { mainDiv_0009800238_5623.getElementsByClassName("field" + i)[f].style.display='none'; } catch (e) { } } } } } } } function GetChartName(nSelectedButtonID,sChartName_w, sChartName_m, sChartName_y, sChartName_3y, sChartName_5y, sChartName_YC) { var sChartName="0"; switch (nSelectedButtonID){ case "0" : sChartName=sChartName_w; break; case "1" : sChartName=sChartName_m; break; case "2" : sChartName=sChartName_y; break; case "3" : sChartName=sChartName_3y; break; case "4" : sChartName=sChartName_5y; break; case "5" : sChartName=sChartName_YC; break; default : } return sChartName } function LoadThumbnail_0009800238_5623(sChartName_w, sChartName_m, sChartName_y, sChartName_3y, sChartName_5y, sChartName_YC, sChartContainerName, rowDivIDClicked, sSymbolName) { rowLastDivIDClicked=rowDivIDClicked; removeImage_0009800238_5623(); var timeframeButtonsPushed = mainDiv_0009800238_5623.getElementsByClassName("pushed") var nSelectedButtonID=timeframeButtonsPushed[0].id if (nSelectedButtonID==buttonNum_YC) { nSelectedButtonID=idButtonLast; } var nIncrement=-1 do { sChartName=GetChartName(nSelectedButtonID,sChartName_w, sChartName_m, sChartName_y, sChartName_3y, sChartName_5y, sChartName_YC); if (sChartName == "i000000") { nSelectedButtonID=parseInt(nSelectedButtonID); if (nSelectedButtonID==0) { nIncrement=1 } nSelectedButtonID+=nIncrement; nSelectedButtonID="" + nSelectedButtonID + "" } } while (sChartName == "i000000") sChart1Props_0009800238_5623=sChartName_w+"_"+sChartName_m+"_"+sChartName_y+"_"+sChartName_3y+"_"+sChartName_5y+"_"+sChartName_YC asChart1Props_0009800238_5623=sChart1Props_0009800238_5623.split(/_/); sChartSuffix=document.images[sChartContainerName].src.split("."); sChartSuffix=sChartSuffix[sChartSuffix.length-2].substr(sChartSuffix[sChartSuffix.length-2].length-1,1); if (sChartSuffix=="b") { sChartSuffix="fb" } document.images[sChartContainerName].src='https://www.theFinancials.com/Charts/' + chartColor_0009800238_5623 + sChartName + sChartSuffix + '.jpg' document.images[sChartContainerName].alt=sSymbolName; try { // not all charts have Preview enabled document.getElementById("thumbChart_0009800238_5623").setAttribute("data-zoom","https://www.theFinancials.com/Charts/" + chartColor_0009800238_5623 + sChartName + "z.jpg") // document.getElementById("thumbChart_0009800238_5623").href = "https://www.theFinancials.com/Charts/" + chartColor_0009800238_5623 + sChartName + "f.jpg" } catch (e) { } //hide unavailable chart buttons var timeframeButtons = mainDiv_0009800238_5623.getElementsByClassName("timeframeButton") var span_lastVisible=0; var span_firstVisible=-1; var numTimeFrameButtons=timeframeButtons.length var maxGoodButtonID=-1 for (var span = 0; span < numTimeFrameButtons; span++) { if (asChart1Props_0009800238_5623[span]=='i000000') { if (span==nSelectedButtonID) { //currently selected button is hidden var nNewTimeFrameIndex = 0; for (nSelectedButtonID = 0; nSelectedButtonID < timeframeButtons.length; nSelectedButtonID++) { if (asChart1Props_0009800238_5623[nSelectedButtonID]=='i000000') { nNewTimeFrameIndex++ } } ChangeTimeframes_0009800238_5623(sChartImageName_0009800238_5623, nNewTimeFrameIndex) } timeframeButtons[span].style.display = "none"; } else { if (span > maxGoodButtonID && span != buttonNum_YC) { maxGoodButtonID=span } if (bIncludeYieldCurveChart_0009800238_5623 || span != buttonNum_YC) { span_lastVisible=span; timeframeButtons[span].style.display = "inline-block"; timeframeButtons[span_lastVisible].classList.remove('last'); } if (span_firstVisible<0) { span_firstVisible=span; timeframeButtons[span].classList.add('first'); } else { timeframeButtons[span].classList.remove('first'); } } ChangeTimeframes_0009800238_5623(sChartImageName_0009800238_5623, nSelectedButtonID) } timeframeButtons[span_lastVisible].classList.add('last'); //highlight row var rows = mainDiv_0009800238_5623.getElementsByClassName("TableRow") for (var r = 1; r <= rows.length; r++) { if (r == rowDivIDClicked) { if (bIncludeYieldCurveChart_0009800238_5623 && mainDiv_0009800238_5623.getElementsByClassName("pushed")[0].id != buttonNum_YC) { rows[r-1].className += " selected"; } } else { rows[r-1].classList.remove('selected'); } } return false; } function ChangeTimeframes_0009800238_5623(sChartContainerName,idButton) { sChartSuffix=document.images[sChartContainerName].src.split("."); sChartSuffix=sChartSuffix[sChartSuffix.length-2].substr(sChartSuffix[sChartSuffix.length-2].length-1,1); chartURL_0009800238_5623='https://www.theFinancials.com/charts/' + chartColor_0009800238_5623 + asChart1Props_0009800238_5623[idButton] //+ sChartSuffix + '.jpg' try { // not all charts have Zoom enabled document.getElementById("thumbChart_0009800238_5623").setAttribute("data-zoom","https://www.theFinancials.com/Charts/" + chartColor_0009800238_5623 + asChart1Props_0009800238_5623[idButton] + "z.jpg") // document.getElementById("thumbChart_0009800238_5623").href = chartURL_0009800238_5623 + "f.jpg" } catch (e) { } var timeframeButtons = mainDiv_0009800238_5623.getElementsByClassName("timeframeButton") for (var span = 0; span < timeframeButtons.length; span++) { if (timeframeButtons[span].id==idButton) { timeframeButtons[span].className += " pushed"; } else { timeframeButtons[span].classList.remove("pushed"); } } //de-select all rows is YieldCurve button is selected var rows = mainDiv_0009800238_5623.getElementsByClassName("TableRow") if (idButton==buttonNum_YC) { for (var r = 1; r <= rows.length; r++) { rows[r-1].classList.remove('selected'); } } else { for (var r = 1; r <= rows.length; r++) { if (r == rowLastDivIDClicked) { rows[r-1].className += " selected"; } } } resizeWidget_0009800238_5623(); if (idButton != buttonNum_YC) { idButtonLast=idButton; } return false; } function PopupCenter_0009800238_5623(url) { // Fixes dual-screen position Most browsers Firefox try { var dualScreenLeft = window.parent.screenLeft != undefined ? window.parent.screenLeft : window.parent.screenX; var dualScreenTop = window.parent.screenTop != undefined ? window.parent.screenTop : window.parent.screenY; } catch (e) { } var width = window.parent.innerWidth ? window.parent.innerWidth : parent.document.documentElement.clientWidth ? parent.document.documentElement.clientWidth : screen.width; var height = window.parent.innerHeight ? window.parent.innerHeight : parent.document.documentElement.clientHeight ? parent.document.documentElement.clientHeight : screen.height; var w = 820 var h = 400 var systemZoom = width / screen.availWidth; var left = (width - w) / 2 / systemZoom + dualScreenLeft var top = (height - h) / 2 / systemZoom + dualScreenTop var newWindow = window.open(url, 'theFinancials.com Chart', 'width=' + w / systemZoom + ', height=' + h / systemZoom + ', top=' + top + ', left=' + left + ''); // Puts focus on the newWindow //if (window.focus) newWindow.focus(); } function ZoomThumbnail_0009800238_5623(sthumbChart_0009800238_5623Name,sURL_0009800238_5623,sGetFreeWidgetLink) { if (typeof sGetFreeWidgetLink != 'undefined') { try { top.document.location=sGetFreeWidgetLink; } catch(e) { } } else { if (!sthumbChart_0009800238_5623Name) { var nCurChartID= sURL_0009800238_5623 } else { var nCurChartID= new String(document.images[sthumbChart_0009800238_5623Name].src); var nCurChartIDList=nCurChartID.split('/'); var nCurChartID=nCurChartIDList[nCurChartIDList.length-1]; var nCurChartID=nCurChartID.substring(0,7) + 'z.jpg'; } PopupCenter_0009800238_5623("https://www.theFinancials.com/charts" + chartColor_0009800238_5623 + nCurChartID) } return false; } function GetCSVData(sParnterID) { var sDataFileName=asChart1Props_0009800238_5623[3] + '.csv'; if (sParnterID=='DEM' | sParnterID=='B2C') { alert("The Private Label version of this Widget will download 3 years of Excel-compatible CSV data for the currently-selected item.") } else { top.document.location="//www.theFinancials.com/data/" + sDataFileName; } return false; } function PopupDisclaimer() { try { document.getElementById("DisclaimerPopup").style.display="block"; } catch(e) { var newPreviewSpan= document.createElement('span'); newPreviewSpan.id='DisclaimerPopup'; newPreviewSpan.style.backgroundColor = "#FFFFFF"; newPreviewSpan.style.position="absolute"; newPreviewSpan.style.padding="10px"; newPreviewSpan.style.margin="10px"; newPreviewSpan.style.zIndex="9999"; newPreviewSpan.style.fontFamily="Arial"; newPreviewSpan.style.fontSize="12px"; newPreviewSpan.style.display="block"; var w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0); var h = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); var nWidthScrollbarAdjustment = 25; var nTop = event.pageY; var nLeft = event.pageX var nLeft = event.pageX - 500; newPreviewSpan.style.top=nTop + "px"; newPreviewSpan.innerHTML = "The market data ('Information') contained herein: (i) includes the proprietary information of Chicago Mercantile Exchange Inc. or it's licensors, as applicable ; (ii) may not be copied, sold or further disseminated except as specifically authorized; (iii) does not constitute investment advice; (iv) is provided solely for informational purposes; (v) is not used for any commercial purpose; and (vi) is not warranted to be complete, accurate or timely. You may not develop or create any derivative work or other product that uses, is based on, or is developed in connection with any of the Information (including, without limitation, proprietary data, settlement data or indices) available on this site. In addition to the forgoing, to the fullest extent permitted by law, use of such Information (including associated metadata) in any manner for any machine learning and/or artificial intelligence, including without limitation for the purposes of training, coding, or development of artificial intelligence technologies, tools, or solutions or machine learning language models, or otherwise for the purposes of using or in connection with the use of such technologies, tools, or models to generate any information, material, data, derived works, content, or output, is expressly prohibited." var body = document.getElementsByTagName("body")[0]; body.parentNode.insertBefore(newPreviewSpan, body); } } function RemoveDisclaimer() { try { document.getElementById("DisclaimerPopup").style.display="none"; } catch (e) {} } var bodyExists=document.getElementsByTagName('body') if (bodyExists.length!=0) { var divIDFoud = true; var s = document.getElementById('WID0009800238'); if (!s) { divIDFoud = false;var s = document.getElementsByTagName('script'); var bFound=false; if (s.length==1) { s = s[s.length - 1]; var bFound=true; } else { for(var i=0; i 0 ) { s = s[i] var bFound=true; break; } } if(!bFound) { for(var i=0; i0 || s[i].src.search('www.thefinancials.com/syndicated')>0) { s = s[i]; var bFound=true; break; } } } } if(!bFound) { var s = document.getElementsByTagName('iframe'); for(var i=0; i0 || s[i].src.search('www.thefinancials.com/syndicated')>0) { s = s[i] var bFound=true; break; } } } } } var div = document.createElement('span'); div.hidden=true; div.className='tfcWidget'; div.style.padding=0; div.style.margin=0; div.style.width='100%'; div.id='resizeWidget_0009800238_5623();' div.innerHTML = "theFinancials.com: Forex Rates"; try { if (divIDFoud) { s.appendChild(div); } else { s.parentNode.insertBefore(div, s); } } catch(e) { document.body = document.createElement('body'); document.body.innerHTML = div.innerHTML; } var sWidgetID_0009800238_5623='TID0009800238';var mainDiv_0009800238_5623=document.getElementsByName('0009800238_5623')[0];var bHasCharts_0009800238_5623=false;var bIsResponsive_0009800238_5623=false;var nNumRows_0009800238_5623=9;try {window.onresize = resizeWidget_0009800238_5623;window.dispatchEvent(new Event('resize'));var RefererDomain = '';var RefererDomain_Native = '';setTimeout(function() { var divWidgets = document.getElementsByClassName('widgetContainer'); for (i = 0; i