
var base="http://www.tmxmoney.com";

function getGlobalNav(){
document.write('<ul id="globalNavigation">'+'\n'+
 
'<li><a href="'+base+'/en/index.html">Home</a> |</li>'+'\n'+
'<li><a href="http://www.tmx.com/en/index.html">TMX.com</a> |</li>'+'\n'+
'<li><a href="'+base+'/HttpController?GetPage=ListedCompanyDirectory&Language=en&Market=T">Listed Company Directory</a> |</li>'+'\n'+
'<li><a href="'+base+'/en/contact_us.html">Contact Us</a> |</li>'+'\n'+
'<li>');

// Language Toggle
// Home page is special case.
var switchURL;

if( document.location.pathname == "/index.html" )
{
	switchURL = "/fr/index.html";
}
else
{
	switchURL = new String( document.URL );

	if (switchURL.match(/\/en\/knowledge\/zoomer/)) {
		// Redirect fr pages under zoomer to zoomer index.html
		switchURL = "/fr/knowledge/zoomer/index.html";
	}
	else if(switchURL.match(/\/en\/knowledge\/index.html/))
	{
		// Redirect knowledge index directly to knowledge tax
		switchURL = "/fr/knowledge/tax/index.html";
	}
	else if( switchURL.match( /\/en\// ))
	{
		// Switch and replace for static pages
		switchURL = switchURL.replace("/en/", "/fr/");
	}
	else if (switchURL.match(/quotemedia\.com/i)) {
		if (switchURL.match(/locale=EN/i)) {
			// Search and replace for the locale in the get URL to switch for dynamic pages
			switchURL = switchURL.replace(/locale=EN/i, "locale=FR");
		} else {
			var q = switchURL.match(/\?/) ? "&locale=FR" : "?locale=FR";
			switchURL = switchURL + q;
		}
	}
	else if( switchURL.match( /\/query.html\?/ ))
	{
        	switchURL = switchURL.replace( "style=TsxEnglish", "style=TsxFrench" );
        	switchURL = switchURL.replace( "la=en", "la=fr" );
        	switchURL = switchURL.replace( "col=tsxen", "col=tsxfr" );
	}
	else if( switchURL.match( /\/HttpController\?/ ))
	{
		if( switchURL.match( "Language=en" ))
		{
			// Search and replace for the language in the get URL to switch for dynamic pages
			switchURL = switchURL.replace("Language=en", "Language=fr");
		}
		else
		{
			switchURL += "&Language=fr";
		}

                // Search and replace for the SaveView in the get URL to fix Remedy ticket # 141265
		if( switchURL.match( "SaveView=true" ))
		{
			switchURL = switchURL.replace("SaveView=true", "SaveView=false");
		}

		// Search and replace special language-specific file names
		// Go from EN to FR.
		if( switchURL.match( "GetPage=EventBookingFormOk" ))
		{
			switchURL = switchURL.replace("EventBookingFormOk", "EventBookingFormOkFR");
		}
		else if( switchURL.match( "GetPage=EventBookingForm" ))
		{
			switchURL = switchURL.replace("EventBookingForm", "EventBookingFormFR");
		}
		else if( switchURL.match( "GetPage=questions" ))
		{
			switchURL = switchURL.replace("questions", "questionsFR");
		}
		else if( switchURL.match( "GetPage=TSXVentureLogoFormOk" ))
		{
			switchURL = switchURL.replace("TSXVentureLogoFormOk", "TSXVentureLogoFormOkFR");
		}
		else if( switchURL.match( "GetPage=TSXVentureLogoForm" ))
		{
			switchURL = switchURL.replace("TSXVentureLogoForm", "TSXVentureLogoFormFR");
		}
		else if( switchURL.match( "GetPage=TradingCanadianForm" ))
		{
			switchURL = switchURL.replace("TradingCanadianForm", "TradingCanadianFormFR");
		}
		else if( switchURL.match( "GetPage=TradingCanadianForm" ))
		{
			switchURL = switchURL.replace("TradingCanadianForm", "TradingCanadianFormFR");
		}
	}
	else
	{
		switchURL = "/fr/index.html";
	}
}


document.write('<a href="' + switchURL + '" >');

document.write('<span lang="fr-ca">Fran&ccedil;ais</span></a></li>'+'\n'+
' </ul>');
}



function getMainNav(){
document.write ('<ul id="nav">\n'+
			'<li id="navTSXMarket"><a href="http://tmx.quotemedia.com/marketsca.php?locale=EN">TSX Market Activity</a>\n'+
				'<ul style="z-index:100;">\n'+
					'<li><a href="http://tmx.quotemedia.com/marketsca.php?locale=EN">Canadian Market Summary</a></li>\n'+
					'<li><a href="'+base+'/HttpController?GetPage=ClosingSummary&DetailedView=DetailedPrices&Market=T&MarketView=MostActive&Language=en">Canadian Closing Summary</a></li>\n'+
					'<li><a href="http://tmx.quotemedia.com/marketsus.php?locale=EN">US Market Summary</a></li>\n'+
					'<li><a href="'+base+'/HttpController?GetPage=InsiderTradeMarker&Market=T&Language=en">Insider Trade Summaries</a></li>\n'+
					'<li><a href="'+base+'/HttpController?GetPage=BondsAndRates&Language=en">Bonds &amp; Rates</a></li>\n'+
					'<li><a href="'+base+'/HttpController?GetPage=EquityIndices&SelectedIndex=0000&IndexID=0000&Exchange=T&SelectedTab=QuoteResults&Language=en">Indices &amp; Constituents</a></li>\n'+
					'<li><a href="'+base+'/en/market_activity/top_tens.html">Professional Market Indicators</a></li>\n'+
					'<li><a href="'+base+'/en/market_activity/new_listings_tsx_current.html">New Company Listings</a></li>\n'+
					'<li><a href="'+base+'/HttpController?GetPage=ListedCompanyDirectory&Language=en&Market=T">Listed Company Directory</a></li>\n'+
					'<li><a href="'+base+'/en/market_activity/market_hours.html">Market Hours &amp; Holidays</a></li>\n'+
					'<li class="information">Get current market, index and company information for Toronto Stock Exchange and TSX Venture Exchange, and US markets including NYSE, NASDAQ and AMEX.</li>\n'+
				'</ul>\n'+
			'</li>\n'+
			
			
			
			
			
			'<li id="navQuotes"><a href="http://tmx.quotemedia.com/getquote.php?locale=EN">Quotes &amp; Charts</a>\n'+
				'<ul>\n'+
					'<li><a href="http://tmx.quotemedia.com/getquote.php?locale=EN">Get Quotes</a></li>\n'+
					//'<li><a href="'+base+'/en/mutual_funds/index.html">Mutual Funds Education</a></li>\n'+
					'<li><a href="http://tmx.quotemedia.com/derivatives.php?locale=EN">Canadian Derivatives</a></li>\n'+
					'<li><a href="http://tmx.quotemedia.com/fundscreener.php?locale=EN">Mutual Fund Screener and Quotes</a></li>\n'+
					'<li><a href="http://tmx.quotemedia.com/futures.php?locale=EN">Commodities and Futures</a></li>\n'+
					'<li><a href="http://micro.newswire.ca/70886-0.html" target="_blank">List of TSX Halted Securities</a></li>\n'+
					'<li><a href="'+base+'/en/market_activity/nex.html">NEX</a></li>\n'+
					
					//'<li><a href="'+base+'/en/quotes/eAnnual_reports.html">e-Annual Reports by Equicom</a></li>\n'+
					'<li class="information">Get quotes, company information, financials and price history for Canadian and US securities. Access a list of halted securities for Toronto Stock Exchange and TSX Venture Exchange, and information on the NEX board of TSX Venture Exchange.</li>\n'+
				'</ul>\n'+
			'</li>\n'+
			'<li id="navNews"><a href="'+base+'/en/news/index.html">News</a>\n'+
				'<ul>\n'+
					'<li><a href="'+base+'/en/news/business_news.html">Business News</a></li>\n'+
					'<li><a href="'+base+'/en/news/blogs/index.html">Globe and Mail Blogs</a></li>\n'+
					'<li><a href="'+base+'/en/news/company_releases/index.html">Company Releases</a></li>\n'+
					'<li><a href="'+base+'/en/news/ceo_interviews.html">CEO Interviews</a></li>\n'+
					'<li><a href="http://www.tmx.com/en/listings/products_services/social_media/waggle.html" target="waggle">Waggle</a></li>\n'+
					'<li class="information">Access Canadian news and company releases from The Canadian Press and CNW Group.</li>\n'+
				'</ul>\n'+
			'</li>\n'+
			'<li id="navResearch"><a href="'+base+'/en/research/index.html">Research &amp; Tools</a>\n'+
				'<ul>\n'+
					'<li><a href="http://tmx.quotemedia.com/login.php?qmLoginType=portfolio" target="_blank">My TMXmoney Portfolio & Alerts</a></li>\n'+
					'<li><a href="http://tmx.quotemedia.com/screener.php?locale=EN">Stock Screener</a></li>\n'+
					'<li><a href="http://tmx.quotemedia.com/calculators.php?locale=EN">Financial Calculators</a></li>\n'+
					'<li><a href="'+base+'/en/research/resources.html">Resources &amp; Links</a></li>\n'+
					'<li><a href="'+base+'/en/research/investor_scorecards.html">Investor Scorecards</a></li>\n'+
					'<li><a href="'+base+'/en/research/tsxventure50.html">TSX Venture 50</a></li>\n'+
					'<li><a href="'+base+'/en/research/glossary.html">Stock Market Terms</a></li>\n'+
					'<li><a href="http://tsx.ar.wilink.com/asp/A565_search_ENG.asp" target="_blank">Free Annual Reports</a></li>\n'+
					'<li><a href="'+base+'/en/market_access_program/index.html">S&amp;P Market Access Company Profiles</a></li>\n'+
					'<li><a href="'+base+'/en/on_the_radar/index.html">On the Radar Investor Presentations</a></li>\n'+
						'<li><a href="'+base+'/en/knowledge/tax/index.html">Tax Facts &amp; Planning</a></li>\n'+
					'<li class="information">Access a host of investment research and tools, including a portfolio tracker, stock screener, customizable ticker and financial calculators. Also includes investment resources and links, and a comprehensive glossary of stock market terms.</li>\n'+
				'</ul>\n'+
			'</li>\n'+
			'<li id="navSector"><a href="'+base+'/en/sector_profiles/index.html">Sectors &amp; ETFs</a>\n'+
				'<ul style="z-index:100;">\n'+
					'<li><a href="'+base+'/en/sector_profiles/exchange_traded_funds/index.html">Exchange Traded Funds</a></li>\n'+
					'<li><a href="'+base+'/en/sector_profiles/mining.html">Mining</a></li>\n'+
					'<li><a href="'+base+'/en/sector_profiles/energy.html">Energy</a></li>\n'+
					'<li><a href="'+base+'/en/sector_profiles/diversified_industries.html">Diversified Industries</a></li>\n'+
					'<li><a href="'+base+'/en/sector_profiles/life_sciences.html">Life Sciences</a></li>\n'+
					'<li><a href="'+base+'/en/sector_profiles/technology.html">Technology</a></li>\n'+
					'<li><a href="'+base+'/en/sector_profiles/cleantech.html">Clean Technology</a></li>\n'+
					'<li><a href="'+base+'/en/sector_profiles/income_trusts/index.html">Income Trusts</a></li>\n'+
					'<li><a href="'+base+'/en/sector_profiles/structured_products/index.html">Structured Products</a></li>\n'+
					'<li class="information">Find information on the various industry sectors represented on Toronto Stock Exchange and TSX Venture Exchange.</li>\n'+
				'</ul>\n'+
			'</li>\n'+
			'<li id="navLists"><a href="http://tmx.quotemedia.com/account/login-register.php?qmLoginType=portfolio" target="_blank">My Portfolio & Alerts</a>\n'+
				/*'<ul>\n'+
					
					/*'<li><a href="http://tmx.quotemedia.com/account/login-register.php?qmLoginType=portfolio">My Portfolio</a></li>\n'+
				'<li class="information">Access timely and topical articles on investing, tax, financial planning and lifestyle topics.</li>\n'+
				'</ul>\n'+*/
			'</li>\n'+

'<li id="navUSMarket"><a href="http://www.tmxpowerstream.com/"  target="_blank">Real-Time Quotes</a>\n'+
				/*'<ul>\n'+
				'<li><a href="http://tmx.quotemedia.com/marketsus.php?locale=EN">US Market Summary</a></li>\n'+
					'<li class="information">Get realtime quotes in this section </li>\n'+
				'</ul>\n'+
				*/
			'</li>\n'+

'<li style="margin:0; padding:0"><a style="margin:0; padding:0" href="http://twitter.com/TMXmoney" onclick="dcsMultiTrack(\'DCS.dcssip\', \'twitter.com/\',\'DCS.dcsuri\', \'/TMXmoney\',\'WT.ti\', \'Navigation_Twitter-TMXmoney\');" target="_blank"><img src="http://www.tmx.com/icons/twitter_bird_blue.png"/></a></li>\n'+

		'</ul>');
}

function getQuote(){
document.write('<form name="quickQuote" id="quickQuote" action="http://tmx.quotemedia.com/quote.php?qm_symbol=" onsubmit="clearDefault();commacheck();" method="get">\n'+
			'<div id="getQuote">\n'+
				'<h2>GET QUOTE</h2>\n'+
				'<fieldset>\n'+
					'<legend>Get Quote</legend>\n'+
					'<input onfocus="clearDefault()" onblur="targetfield=\'symbol\'" maxLength="30" value="Enter Symbol" name="symbol" id="QuoteSymbol_1"/>&#160;<input type="image" id="quickQuoteSubmit" src="/en/images/quote_go.gif" alt="Get a Stock Quote" value="GO" />\n'+
				'</fieldset>\n'+
				'<p><a class="data" href="javascript:openWindow(FundLookupURL+\'?callerid=QuoteSymbol_1\',620,600);">Mutual Fund Lookup</a></p>\n'+
				'<div id="symbolResultsList"></div>\n'+
			'</div>\n'+
			'</form>');
}

function getQuote2(){
document.write('<form name="quickQuote" id="quickQuote" action="http://tmx.quotemedia.com/quote.php?qm_symbol=" onsubmit="clearDefault();commacheck();" method="get">\n'+
			'<div id="getQuote">\n'+
				'<h2>GET QUOTE</h2>\n'+
				'<fieldset>\n'+
					'<legend>Get Quote</legend>\n'+
					'<input onfocus="clearDefault()" onblur="targetfield=\'symbol\'" maxLength="30" value="Enter Symbol" name="symbol" id="QuoteSymbol_1"/>&#160;<input type="image" id="quickQuoteSubmit" src="/en/images/quote_go.gif" alt="Get a Stock Quote" value="GO" />\n'+
				'</fieldset>\n'+
				'<p><a class="data" href="javascript:openWindow(\'/en/mutual_fund/FundLookup.html\',620,600);">Mutual Fund Lookup</a></p>\n'+
				'<div id="symbolResultsList"></div>\n'+
			'</div>\n'+
			'</form>');
}

// For Rogers Lists and Rankings pages
function getQuote3(){
document.write('<form name="quickQuote" id="quickQuote" action="http://tmx.quotemedia.com/quote.php?qm_symbol=" onsubmit="clearDefault();commacheck();" method="get">\n'+
			'<div id="getQuote">\n'+
				'<h2>GET QUOTE</h2>\n'+
				'<fieldset>\n'+
					'<legend>Get Quote</legend>\n'+
					'<input onfocus="clearDefault()" onblur="targetfield=\'symbol\'" maxLength="30" value="Enter Symbol" name="symbol" id="QuoteSymbol_1"/>&#160;<input type="image" id="quickQuoteSubmit" src="/en/images/quote_go.gif" alt="Get a Stock Quote" value="GO" />\n'+
				'</fieldset>\n'+
				'<p><a class="data" href="javascript:openWindow(\'/en/mutual_fund/FundLookup.html\',620,600);"> </a></p>\n'+
				'<div id="symbolResultsList"></div>\n'+
			'</div>\n'+
			'</form>');
}

function prepare_submit() {

	var symbols = document.quickQuote.QuoteSymbol_1.value;
	if (symbols.indexOf(",") != -1) {
		symbols = symbols.substr(0,symbols.indexOf(","));
	}
	document.getElementById("quickQuote").action = symbols;
}

function commacheck() {
	var symbols = document.quickQuote.symbol.value;
	if (symbols.indexOf(",") != -1) {
		symbols = symbols.substr(0,symbols.indexOf(","));
	}
	document.quickQuote.symbol.value = symbols;
}

function getSearch(){
document.write('<form name="searchForm" id="searchForm" action="http://search.tsx.com/query.html" method="get">\n'+
			'<div id="searchTSX">\n'+
				'<h2 style="font-weight:bold;letter-spacing:0px;">SEARCH TMXmoney.com and TMX.com:</h2>\n'+
				'<input type="hidden" value="TsxEnglish" name="style"/>\n'+
				'<input type="hidden" value="en" name="la"/>\n'+
				'<input type="hidden" value="tsxen" name="col"/>\n'+
				'<fieldset>\n'+
					'<legend>Search Market Activity</legend>\n'+
					'<input type="text" id="qt" name="qt"/>&#160;<input src="http://www.tmxmoney.com/en/images/search_go.gif" name="searchSubmit" id="searchSubmit" type="image" value="GO"/>\n'+
				'</fieldset>\n'+
			'</div>\n'+
			'</form>')
}

function getSignOnTo(){
document.write('<form id="signOnForm">\n'+
'<div class="sidebar1BoxWrapper">\n'+
'<div id="signOnTo">\n'+
	'<h2>I want to:</h2>\n'+
	//'<label for="stockList">Choose a site:</label>\n'+
	'<select id="signOnSelect" name="signOnSelect">\n'+
		'<option value="http://tmx.quotemedia.com/login.php?qmLoginType=portfolio">Login to My Portfolio</option>\n'+
		'<option value="http://tmx.quotemedia.com/login.php?qmLoginType=portfolio">Register for My Portfolio</option>\n'+
		'<option value="http://tmx.quotemedia.com/login.php?qmLoginType=portfolio">Login to My Alerts</option>\n'+
	'</select>\n'+
	'<a href="http://tmx.quotemedia.com/login.php?qmLoginType=portfolio" target="_blank"><img src="http://www.tmxmoney.com/en/images/search_go.gif" alt="GO"></a>\n'+
'</div>\n'+
	//'<div id="features">\n'+
	//'<h4 style="padding-left:16px;">Try This Feature - Tax Facts &amp; Planning</h4>\n'+
	//'<p style="padding:0 16px;">The new Tax Facts & Planning section on TMXmoney.com, under the Knowledge tab, provides timely and topical articles on tax planning and preparation from noted tax expert Evelyn Jacks.<br /><br />\n'+
	//'<a style="padding:0;" href="'+base+'/en/knowledge/tax/index.html">> Visit Now</a><br /><br /></p>\n'+
	//'</div>\n'+
'</div>\n'+
'</form>');
}

function paralympic(){
document.write('<div>' +
				//'<center><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="216" height="120" id="TSXvideo" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="/en/flash/tmx_blog_button.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="/en/flash/tmx_blog_button.swf" quality="high" bgcolor="#ffffff" width="216" height="120" name="TSXvideo" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object></center>' +
				//'<img style="display:block" src="http://www.tmx.com/en/images/space_line.gif"/>' +
			'</div>');
}

function freeAnnualReport(){
document.write('<div id="annRepWrapper">' +
				'<div id="annRep">' +
				'<a href="http://tsx.ar.wilink.com/asp/A565_search_ENG.asp" alt="Free Annual Reports" target="_blank" onmouseover="show(\'freeAnnRepOver\');hide(\'freeAnnRep\');" onmouseout="show(\'freeAnnRep\');hide(\'freeAnnRepOver\');" onclick="dcsMultiTrack(\'DCS.dcssip\', \'https://www.orderannualreports.com\',\'DCS.dcsuri\', \'/Annual-Reports\',\'WT.ti\', \'Annual-Reports_TMXmoney\');"><img src="http://www.tmxmoney.com/en/images/wilink_annrep.gif" id="freeAnnRep"/><img src="http://www.tmxmoney.com//en/images/wilink_annrep_over.gif" id="freeAnnRepOver" style="display:none;"/></a>' +
				
				
				
				'</div>'+
			'</div>');
}

//Annualreport rollover removed - //    





function getFooter(){
document.write('<div id="footer">\n'+
		'<ul>\n'+
			'<li><a href="'+base+'/en/contact_us.html">Contact Us</a> |</li>\n'+
			'<li><a href="'+base+'/en/sitemap.html">Site Map</a> |</li>\n'+
			'<li><a href="'+base+'/en/advertise/index.html">Advertise</a> |</li>\n'+
			'<li><a href="http://www.tmx.com/en/tos.html" target="_blank">Terms of Use</a> |</li>\n'+
			'<li><a href="http://www.tmx.com/en/priv_policy.html" target="_blank">Privacy Policy</a></li>\n'+
		'</ul>\n'+
	'</div>');

}

function getFooter2(){
document.write('<div id="footer">\n'+
		'<ul>\n'+
			'<li><a href="'+base+'/en/contact_us.html">Contact Us</a> |</li>\n'+
			'<li><a href="'+base+'/en/sitemap.html">Site Map</a> |</li>\n'+
			'<li><a href="'+base+'/en/advertise/rogers.html">Advertise on Lists &amp; Rankings</a> |</li>\n'+
			'<li><a href="http://www.tmx.com/en/tos.html" target="_blank">Terms of Use</a> |</li>\n'+
			'<li><a href="http://www.tmx.com/en/priv_policy.html" target="_blank">Privacy Policy</a></li>\n'+
		'</ul>\n'+
	'</div>');
}

function getDisclaimer(){
document.write('<p id="disclaimer">&copy; TSX Inc., a wholly owned subsidiary of TMX Group Inc.<br />For full optimization and view of this web site, users should have Internet Explorer 7 or higher, or Firefox 3 or higher, and set their screen display at 1024x768 pixels.<br />TMX Group Inc. and its affiliates do not endorse or recommend any securities issued by any companies identified on, or linked through, this site. Please seek professional advice to evaluate specific securities or other content on this site. All content (including any links to third party sites) is provided for informational purposes only (and not for trading purposes), and is not intended to provide legal, accounting, tax, investment, financial or other advice and should not be relied upon for such advice. The views, opinions and advice of any third party reflect those of the individual authors and are not endorsed by TMX Group Inc. or its affiliates. TMX Group Inc. and it affiliates have not prepared, reviewed or updated the content of third parties on this site or the content of any third party sites, and assume no responsibility for such information.</p>');

document.write("<img id='img1' height='1' width='1'>");document.getElementById("img1").src="http://beacon.securestudies.com/scripts/beacon.dll?C1=2&C2=3005671&C3=3005671&C4=www.tmxmoneyacc.com &C5=&C6=&C7=" + escape(window.location.href) + "&C8=" + escape(document.title) + "&C9=" + escape(document.referrer) + "&rn=" + Math.floor(Math.random()*99999999);

}

/*****************************************
 Function: resize_iframe
 Description: Resize the height of iFrame used for Daily Photo
 	on tsx.com homepage according the amount of content
 Input Params: none
 Return Value: none
******************************************/
function resize_iframe() {

	moz=document.getElementById&&!document.all
	mozHeightOffset=20

	document.getElementById("sizeframe").height=100 // required for Moz bug, value can be "", null, or integer
	document.getElementById('sizeframe').height=window.frames["sizeframe"].document.body.scrollHeight+(moz?mozHeightOffset:0)

}


	
