var qmc_chscale = '1y'; var qmc_chsymbol = '^TSX'; var qmc_currentActiveRow = 0; var qmc_nameString = ['TSX','TSX Venture','VIXC','Energy','Financials','Health Care','Industrials','Info Tech','Metals & Mining','Telecom','Utilities']; function qmc_isIE() { var qmc_ua = navigator.userAgent.toLowerCase(); var qmc_isIE = ( (qmc_ua.indexOf("msie") != -1) && (qmc_ua.indexOf("opera") == -1) && (qmc_ua.indexOf("webtv") == -1) ); return (qmc_isIE); } function qmc_enableTab(qmc_obj, qmc_symbol) { if (qmc_currentActiveRow != qmc_obj) { var qmc_row = document.getElementById('qmmt_miniQuotes_row_' + qmc_obj); qmc_row.className = qmc_row.className + " qmmt_miniQuotes_activeRow"; var qmc_activeRow = document.getElementById('qmmt_miniQuotes_row_' + qmc_currentActiveRow); if (qmc_currentActiveRow % 2 == 0) { qmc_activeRow.className = 'qmmt_cycle'; } else { qmc_activeRow.className = ''; } qmc_currentActiveRow = qmc_obj; } qmc_chsymbol=qmc_symbol; document.getElementById('qmc_chartimg' + '').src = 'https://app.quotemedia.com/quotetools/getChart?webmasterId=101020&snap=true&locale=en' + '&chtype=AreaChart&chwid=298&chhig=165&chbdr=d8dce5&chfill=cc6d9641&chfill2=6d9641&chgrd=d8dce5&chln=313942&chpccol=ff0000&chfrmon=false&chton=off&chdon=false&chpcon=true&chlgdon=false&chaaon=true&chscale=' + qmc_chscale + '&symbol=' + qmc_chsymbol + ''; qmc_changeHeader(qmc_obj); } function qmc_enableScaleTab(qmc_obj, qmc_scale) { qmc_chscale = qmc_scale; for (qmc_i = 0; qmc_i < 7; qmc_i++) { document.getElementById('qm_ch_tab' + qmc_i + '').className = (qmc_i == qmc_obj) ? 'qmmt_tabactive' : 'qmmt_tab'; document.getElementById('qm_ch_tab' + qmc_i + '').style.cursor = (qmc_i == qmc_obj) ? 'default' : (qmc_isIE()) ? 'hand': 'pointer'; document.getElementById('qm_ch_tab' + qmc_i + '').style.borderTopWidth = (qmc_i == qmc_obj) ? '0px' : '1px'; } document.getElementById('qmc_chartimg').src = 'https://app.quotemedia.com/quotetools/getChart?webmasterId=101020&snap=true&chscale=' + qmc_chscale + '&symbol=' + qmc_chsymbol + '&locale=en' + '&chtype=' + 'AreaChart&chwid=298&chhig=165&chbdr=d8dce5&chfill=cc6d9641&chfill2=6d9641&chgrd=d8dce5&chln=313942&chpccol=ff0000&chfrmon=false&chton=off&chdon=false&chpcon=true&chlgdon=false&chaaon=true'; qmc_changeHeader(qmc_obj); } function qmc_changeHeader() { var qmc_symbol = document.getElementById("qmc_headerSymbol"); qmc_symbol.innerHTML=qmc_nameString[qmc_currentActiveRow]; var qmc_chartLabel = 'Intraday Chart'; if (qmc_chscale == '5d') { qmc_chartLabel = '5 Day Chart'; } else if (qmc_chscale == '1m') { qmc_chartLabel = '1 Month Chart'; } else if (qmc_chscale == '3m') { qmc_chartLabel = '3 Month Chart'; } else if (qmc_chscale == '6m') { qmc_chartLabel = '6 Month Chart'; } else if (qmc_chscale == '1y') { qmc_chartLabel = '1 Year Chart'; } else if (qmc_chscale == '2y') { qmc_chartLabel = '2 Year Chart'; } else if (qmc_chscale == '3y') { qmc_chartLabel = '3 Year Chart'; } else if (qmc_chscale == '5y') { qmc_chartLabel = '5 Year Chart'; } else if (qmc_chscale == '10y') { qmc_chartLabel = '10 Year Chart '; } var qmc_scaleHeader = document.getElementById("qmc_headerScale"); qmc_scaleHeader.innerHTML = ' - ' + qmc_chartLabel; } function qmc_chartForward() { window.location.href='https://app.quotemedia.com/quotetools/clientForward?targetsym=qm_symbol&targetURL=https://web.tmxmoney.com/quote.php&symbol=' + qmc_chsymbol; }