function getGlobalNav(){
document.write('<ul id="globalNavigation">'+'\n'+
'<li><a href="http://www.tmxmoney.com/en/index.html">Home</a> |</li>'+'\n'+
'<li><a href="http://www.tmx.com/en/index.html">TMX Group Home</a> |</li>'+'\n'+
'<li><a href="http://www.tmxmoney.com/HttpController?GetPage=ListedCompanyDirectory&Language=en&Market=T">Listed Company Directory</a> |</li>'+'\n'+
'<li><a href="http://www.tmxmoney.com/en/contact_us.html">Contact Us</a> |</li>'+'\n'+
'<li><a href="http://www.tmxmoney.com/en/sitemap.html">Site Map</a> |</li>'+'\n'+
'<li>');

// Language Toggle
// Home page is special case.
var switchURL;

if( document.location.pathname == "http://www.tmxmoney.com/index.html" )
{
	switchURL = "http://www.tmxmoney.com/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 = "http://www.tmxmoney.com/fr/knowledge/zoomer/index.html";
	}
	else if(switchURL.match(/\/en\/knowledge\/index.html/))
	{
		// Redirect knowledge index directly to knowledge tax
		switchURL = "http://www.tmxmoney.com/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( /\/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 = "http://www.tmxmoney.com/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://cxa.marketwatch.com/TSX/en/Market/marketactivitycan.aspx">TSX MARKET ACTIVITY</a>\n'+
				'<ul>\n'+
					'<li><a href="http://cxa.marketwatch.com/TSX/en/Market/marketactivitycan.aspx">Current Market</a></li>\n'+
					'<li><a href="http://www.tmxmoney.com/HttpController?GetPage=ClosingSummary&DetailedView=DetailedPrices&Market=T&MarketView=MostActive&Language=en">Closing Summary</a></li>\n'+
					'<li><a href="http://www.tmxmoney.com/HttpController?GetPage=InsiderTradeMarker&Market=T&Language=en">Insider Trade Summaries</a></li>\n'+
					'<li><a href="http://www.tmxmoney.com/HttpController?GetPage=BondsAndRates&Language=en">Bonds &amp; Rates</a></li>\n'+
					'<li><a href="http://www.tmxmoney.com/HttpController?GetPage=EquityIndices&SelectedIndex=0000&IndexID=0000&Exchange=T&SelectedTab=QuoteResults&Language=en">Indices &amp; Constituents</a></li>\n'+
					'<li><a href="http://www.tmxmoney.com/en/market_activity/top_tens.html">Professional Market Indicators</a></li>\n'+
					'<li><a href="http://www.tmxmoney.com/en/market_activity/new_listings_tsx_current.html">New Company Listings</a></li>\n'+
					'<li><a href="http://www.tmxmoney.com/HttpController?GetPage=ListedCompanyDirectory&Language=en&Market=T">Listed Company Directory</a></li>\n'+
					'<li><a href="http://www.tmxmoney.com/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.</li>\n'+
				'</ul>\n'+
			'</li>\n'+
			'<li id="navUSMarket"><a href="http://cxa.marketwatch.com/tsx/en/market/marketactivityus.aspx">US MARKET ACTIVITY</a>\n'+
				'<ul>\n'+
					'<li><a href="http://cxa.marketwatch.com/tsx/en/market/marketactivityus.aspx">US Market Summary</a></li>\n'+
					'<li class="information">Get current market, index and company information for U.S. markets including NYSE, NASDAQ and AMEX.</li>\n'+
				'</ul>\n'+
			'</li>\n'+
			'<li id="navQuotes"><a href="http://cxa.marketwatch.com/tsx/en/market/getquote.aspx">QUOTES &amp; CHARTS</a>\n'+
				'<ul>\n'+
					'<li><a href="http://cxa.marketwatch.com/tsx/en/market/getquote.aspx">Get Quotes</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="http://www.tmxmoney.com/en/market_activity/nex.html">NEX</a></li>\n'+
					'<li><a href="http://www.tmxmoney.com/en/market_access_program/index.html">S&amp;P Market Access Company Profiles</a></li>\n'+
					'<li><a href="http://www.tmxmoney.com/en/on_the_radar/index.html">On the Radar Investor Presentations</a></li>\n'+
					//'<li><a href="http://www.tmxmoney.com/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 U.S. 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="http://www.tmxmoney.com/en/news/index.html">NEWS</a>\n'+
				'<ul>\n'+
					'<li><a href="http://www.tmxmoney.com/en/news/business_news.html">Business News</a></li>\n'+
					'<li><a href="http://www.tmxmoney.com/en/news/blogs/index.html">NEW! Globe and Mail Blogs</a></li>\n'+
					'<li><a href="http://www.tmxmoney.com/en/news/company_releases.html">Company Releases</a></li>\n'+
					'<li><a href="http://www.tmxmoney.com/en/news/ceo_interviews.html">CEO Interviews</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="http://www.tmxmoney.com/en/research/index.html">RESEARCH &amp; TOOLS</a>\n'+
				'<ul>\n'+
					'<li><a href="http://custom.marketwatch.com/custom/tsx/en/portfolio/view.asp">My Portfolio</a></li>\n'+
					'<li><a href="http://custom.marketwatch.com/custom/tsx/en/alerts/html-summary.asp">Alerts</a></li>\n'+
					'<li><a href="http://custom.marketwatch.com/custom/tsx/en/screener/screener.asp">Stock Screener</a></li>\n'+
					'<li><a href="http://custom.marketwatch.com/custom/tsx/en/javaticker/html-tickeredit.asp">Stock Ticker</a></li>\n'+
					'<li><a href="http://custom.marketwatch.com/custom/tsx/en/calculators/index.asp">Financial Calculators</a></li>\n'+
					'<li><a href="http://www.tmxmoney.com/en/research/resources.html">Resources &amp; Links</a></li>\n'+
					'<li><a href="http://www.tmxmoney.com/en/research/tsxventure50.html">TSX Venture 50</a></li>\n'+
					'<li><a href="http://www.tmxmoney.com/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 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="http://www.tmxmoney.com/en/sector_profiles/index.html">SECTORS &amp; ETFS</a>\n'+
				'<ul>\n'+
					'<li><a href="http://www.tmxmoney.com/en/sector_profiles/exchange_traded_funds/index.html">Exchange Traded Funds</a></li>\n'+
					'<li><a href="http://www.tmxmoney.com/en/sector_profiles/mining.html">Mining</a></li>\n'+
					'<li><a href="http://www.tmxmoney.com/en/sector_profiles/energy.html">Energy</a></li>\n'+
					'<li><a href="http://www.tmxmoney.com/en/sector_profiles/diversified_industries.html">Diversified Industries</a></li>\n'+
					'<li><a href="http://www.tmxmoney.com/en/sector_profiles/life_sciences.html">Life Sciences</a></li>\n'+
					'<li><a href="http://www.tmxmoney.com/en/sector_profiles/technology.html">Technology</a></li>\n'+
					'<li><a href="http://www.tmxmoney.com/en/sector_profiles/cleantech.html">Clean Technology</a></li>\n'+
					'<li><a href="http://www.tmxmoney.com/en/sector_profiles/income_trusts/index.html">Income Trusts</a></li>\n'+
					'<li><a href="http://www.tmxmoney.com/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://www.tmxmoney.com/en/knowledge/index.html">Knowledge</a>\n'+
				'<ul>\n'+
					'<li><a href="http://www.tmxmoney.com/en/knowledge/tax/index.html">Tax Facts &amp; Planning</a></li>\n'+
					'<li><a href="http://www.tmxmoney.com/en/knowledge/zoomer/index.html">Zoomer Life</a></li>\n'+
				'<li class="information">Access information beyond investing with Tax Facts & Planning, with noted tax expert Evelyn Jacks. You can also access Zoomer Life, a section devoted to the broader topics of health, lifestyle, money and travel.</li>\n'+
				'</ul>\n'+
			'</li>\n'+

		'</ul>');
}

function getQuote(){
document.write('<form name="quickQuote" id="quickQuote" action="http://cxa.marketwatch.com/tsx/en/market/quote.aspx?" 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="http://www.tmxmoney.com/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://cxa.marketwatch.com/tsx/en/market/quote.aspx?" 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="http://www.tmxmoney.com/en/images/quote_go.gif" alt="Get a Stock Quote" value="GO" />\n'+
				'</fieldset>\n'+
				'<p><a class="data" href="javascript:openWindow(\'http://www.tmxmoney.com/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://cxa.marketwatch.com/tsx/en/market/quote.aspx?" 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="http://www.tmxmoney.com/en/images/quote_go.gif" alt="Get a Stock Quote" value="GO" />\n'+
				'</fieldset>\n'+
				'<p><a class="data" href="javascript:openWindow(\'http://www.tmxmoney.com/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>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'+
				//'<br/>\n'+
				//'<p><a href="http://search.tsx.com/query.html?ql=a&qt=&charset=iso-8859-1&la=en&style=TsxEnglish&col=tsxen">Advanced Search</a></p>\n'+
				//'<h2>SEARCH all of 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 TMX.COM</legend>\n'+
				//	'<input type="text" id="qt" name="qt"/>&#160;<input src="/en/images/search_go.gif" name="searchSubmit" id="searchSubmit" type="image" value="GO"/>\n'+
				//'</fieldset>\n'+
				//'<p><a href="http://search.tsx.com/query.html?ql=a&qt=&charset=iso-8859-1&la=en&style=TsxEnglish&col=tsxen">Advanced Search</a></p>\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://custom.marketwatch.com/custom/tsx/en/portfolio/login.asp?returnurl=%2Fcustom%2Ftsx%2Fen%2Fportfolio%2Fview%2Easp%3F">Login to My Portfolio</option>\n'+
		'<option value="http://custom.marketwatch.com/custom/tsx/en/portfolio/register.asp?returnurl=%2Fcustom%2Ftsx%2Fen%2Fportfolio%2Fview%2Easp%3F">Register for My Portfolio</option>\n'+
		'<option value="http://custom.marketwatch.com/custom/tsx/en/portfolio/login.asp?returnurl=%2Fcustom%2Ftsx%2Fen%2Fportfolio%2Fview%2Easp%3F">Login to My Alerts</option>\n'+
	'</select>\n'+
	'<a href="javascript: signOnGo();"><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="http://www.tmxmoney.com/en/knowledge/tax/index.html">> Visit Now</a><br /><br /></p>\n'+
	'</div></div>\n'+
'</form>');
}

function paralympic(){
document.write('<div>' +
				'<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="http://www.tmxmoney.com/en/flash/paralympic_money.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="http://www.tmxmoney.com/en/flash/paralympic_money.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>' +
				'<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" onmouseover="show(\'freeAnnRepOver\');hide(\'freeAnnRep\');" onmouseout="show(\'freeAnnRep\');hide(\'freeAnnRepOver\');" target="_blank"><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>');
}

/*****************************************
 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)

}

function getFooter(){
document.write('<div id="footer">\n'+
		'<ul>\n'+
			'<li><a href="http://www.tmxmoney.com/en/contact_us.html">Contact Us</a> |</li>\n'+
			'<li><a href="http://www.tmxmoney.com/en/sitemap.html">Site Map</a> |</li>\n'+
			'<li><a href="http://www.tmxmoney.com/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="http://www.tmxmoney.com/en/contact_us.html">Contact Us</a> |</li>\n'+
			'<li><a href="http://www.tmxmoney.com/en/sitemap.html">Site Map</a> |</li>\n'+
			'<li><a href="http://www.tmxmoney.com/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 are recommended to 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.tmxmoney.com &C5=&C6=&C7=" + escape(window.location.href) + "&C8=" + escape(document.title) + "&C9=" + escape(document.referrer) + "&rn=" + Math.floor(Math.random()*99999999);

}
