//Preload navigation rollover images

var myimages=new Array()
function preloadimages(){
	for (i=0;i<preloadimages.arguments.length;i++){
		myimages[i]=new Image()
		myimages[i].src="/pics/"+preloadimages.arguments[i]+".jpg";
	}
}

//	preloadimages("r1_1","r1_2","home","homeh","corpProfile","corpProfileh","finReports","finReportsh","inRelations","inRelationsh","contact","contacth","press","pressh","lcentre","lcentreh");

//simple rollover function

function roll_over(img_name, img_src) {
   document[img_name].src = "./pics/" + img_src + ".jpg";
}

function statusLine(msg)	{
	var statusMsg = msg;
	window.status = statusMsg;
}

function rdir(page)	{
	location = page;
}

function tsx(sym)	{
	window.open("http://www.tsx.com/HttpController?GetPage=QuotesLookupPage&DetailedView=DetailedPrices&Market=T&Language=en&QuoteSymbol_1=" + sym, "", "width=800,height=700,resizable=1,scrollbars=yes,left=50,top=50");
}

function pdfOpen(file)	{
		window.open("./documents/" + file, "", "width=800,height=700,resizable=1,scrollbars=yes,left=50,top=50");
}
function sedarOpen(file)	{
		window.open(file, "", "width=800,height=700,resizable=1,scrollbars=yes,left=50,top=50");
}

function highLightRow()	{
	if (document.getElementById)	{
		var tables=document.getElementsByTagName('table');
		for(var i=0;i<tables.length;i++)	{
			if (tables[i].className=='highlightTable')	{
				var trs=tables[i].getElementsByTagName('tr');
				for(var j=0;j<trs.length;j++)	{
					if(trs[j].parentNode.nodeName=='TBODY')	{
						if(j % 2 == 1)	{
							var highlightClass='highlightOffOdd';
						} else	{ 
							var highlightClass='highlightOffEven';

						}
						trs[j].className=highlightClass;
						trs[j].onmouseover=function()	{
								this.className='highlightOn';
								return false
							}
						if (highlightClass=='highlightOffOdd')	{
							trs[j].onmouseout=function()	{
								this.className='highlightOffOdd';
								return false
							}
						}
						if(highlightClass=='highlightOffEven')	{
							trs[j].onmouseout=function()	{
								this.className='highlightOffEven';
								return false
							}
						}
					}
				}
			}
		}
	}
}
function toggleMenu(currMenu)	{
	if(document.getElementById)	{
		thisMenu=document.getElementById(currMenu).style
		if (thisMenu.display=="block"){
			thisMenu.display="none"
		} else {
			thisMenu.display="block"
		}
		return false
	} else {
		return true
	}
}
