_menuCloseDelay=500           // The time delay for menus to remain visible on mouse out
_menuOpenDelay=150            // The time delay before menus open on mouse over
_followSpeed=5                // Follow scrolling speed
_followRate=50                // Follow scrolling Rate
_subOffsetTop=0             // Sub menu top offset
_subOffsetLeft=1            // Sub menu left offset
_scrollAmount=3               // Only needed for Netscape 4.x
_scrollDelay=20               // Only needed for Netcsape 4.x

//  This is added TransCanada Code to prevent having to have different menu files for the different
//   levels of the website so that links work properly.
//var relativePathToRoot = get_relativePathToRoot(); // set the relative path to the root of the web.


with(menuStyle=new mm_style()){
onbgcolor="#4F8EB6";
oncolor="#ffffff";
offbgcolor="#DCE9F0";
offcolor="#515151";
bordercolor="transparent";
borderstyle="solid";
borderwidth=0;
separatorcolor="transparent";
separatorsize="0";
padding=0;
fontsize="11px";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
pagecolor="black";
pagebgcolor="transparent";
headercolor="transparent";
headerbgcolor="transparent";
subimage="";
subimagepadding="2";
overfilter="";
outfilter="";
}

with(subMenuStyle=new mm_style()){
onbgcolor="#336699";
oncolor="#ffffff";
offbgcolor="#999999";
offcolor="#ffffff";
bordercolor="transparent";
borderstyle="solid";
borderwidth=0;
separatorcolor="transparent";
separatorsize="1";
padding=0;
fontsize="11px";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
//pagecolor="black";
pagebgcolor="transparent";
headercolor="transparent";
headerbgcolor="transparent";
subimage="";
subimagepadding="2";
overfilter="";
outfilter="";
rawcss="padding-left: 10px; padding-right: 10px;";
itemwidth="200";
}

with(milonic=new menuname("main_nav")){
style=menuStyle;
top=100;
left=16;
alwaysvisible=1;
overflow="scroll";
aI("text=;image=" + relativePathToRoot + "images/main_nav/nav_top_image.gif;");
aI("text=;url=" + relativePathToRoot + "company/index.html;showmenu=company;image=" + relativePathToRoot + "images/main_nav/nav_about_tc.gif;overimage=" + relativePathToRoot + "images/main_nav/nav_about_tc_f2.gif;pageimage=" + relativePathToRoot + "images/main_nav/nav_about_tc_f3.gif;status=About TransCanada;");
aI("text=;url=" + relativePathToRoot + "gas_transmission/index.html;showmenu=transmission;image=" + relativePathToRoot + "images/main_nav/nav_transmission.gif;overimage=" + relativePathToRoot + "images/main_nav/nav_transmission_f2.gif;status=Gas Transmission;");
aI("text=;url=" + relativePathToRoot + "power/index.html;showmenu=power;image=" + relativePathToRoot + "images/main_nav/nav_power.gif;overimage=" + relativePathToRoot + "images/main_nav/nav_power_f2.gif;status=Power;");
aI("text=;url=" + relativePathToRoot + "investor/index.html;showmenu=investor;image=" + relativePathToRoot + "images/main_nav/nav_investor.gif;overimage=" + relativePathToRoot + "images/main_nav/nav_investor_f2.gif;status=Investor Centre;");
aI("text=;url=" + relativePathToRoot + "news/index.html;showmenu=news;image=" + relativePathToRoot + "images/main_nav/nav_news.gif;overimage=" + relativePathToRoot + "images/main_nav/nav_news_f2.gif;status=News;");
aI("text=;url=" + relativePathToRoot + "social/index.html;showmenu=social;image=" + relativePathToRoot + "images/main_nav/nav_social.gif;overimage=" + relativePathToRoot + "images/main_nav/nav_social_f2.gif;status=Social Responsibility;");
aI("text=;url=" + relativePathToRoot + "careers/index.html;showmenu=careers;image=" + relativePathToRoot + "images/main_nav/nav_careers.gif;overimage=" + relativePathToRoot + "images/main_nav/nav_careers_f2.gif;status=Careers;");
aI("text=;image=" + relativePathToRoot + "images/main_nav/nav_bttm_image.gif;");
}

with(milonic=new menuname("company")){
style=subMenuStyle;
top=119;
aI("text=About TransCanada;url=" + relativePathToRoot + "company/index.html");
aI("text=Quick Facts;url=" + relativePathToRoot + "company/facts.html");
aI("text=Operations Map;url=" + relativePathToRoot + "company/operations_map.html;");
aI("text=Vision and Strategies;url=" + relativePathToRoot + "company/corp_strategy.html;");
aI("text=Corporate Governance;url=" + relativePathToRoot + "company/governance.html;");
aI("text=Board of Directors;url=" + relativePathToRoot + "company/board_directors.html");
aI("text=Leadership Team;url=" + relativePathToRoot + "company/team.html;");
aI("text=Logos;url=" + relativePathToRoot + "company/logos.html");
// aI("text=Photo Library;url=" + relativePathToRoot + "company/library_bridge.html");
aI("text=Projects and Initiatives</div>;pageimage=" + relativePathToRoot + "images/main_nav/nav_bttm_image.gif;url=" + relativePathToRoot + "company/projects_initiatives.html");

}


with(milonic=new menuname("transmission")){
style=subMenuStyle;
top=139;
aI("text=Overview;url=" + relativePathToRoot + "gas_transmission/index.html;");
aI("text=Customer Express;url=" + relativePathToRoot + "Customer_Express/;");
aI("text=Alberta System;url=" + relativePathToRoot + "Alberta/;");
//aI("text=BC System;url=" + relativePathToRoot + "BC_System/;");
aI("text=Canadian Mainline;url=" + relativePathToRoot + "Mainline/;");
aI("text=Foothills System;url=" + relativePathToRoot + "Foothills/;");
aI("text=ANR Pipeline;url=http://www.anrpl.com;target=anrpipe;targetfeatures=width=700,height=425,toolbar,location,status,scrollbars,resizable");
aI("text=GTN System;url=http://www.gastransmissionnw.com/;target=gtntrans;targetfeatures=width=700,height=425,toolbar,location,status,scrollbars,resizable");
aI("text=North Baja System;url=http://www.northbajapipeline.com/;target=bajapipe;targetfeatures=width=700,height=425,toolbar,location,status,scrollbars,resizable");
aI("text=Tamazunchale Pipeline;url=" + relativePathToRoot + "gas_transmission/tamazunchale.html;");
aI("text=TC PipeLines, LP;url=" + relativePathToRoot + "gas_transmission/pipelineslp.html;");
aI("text=FERC Order 690;url=" + relativePathToRoot + "gas_transmission/ferc.html;");
}

with(milonic=new menuname("power")){
style=subMenuStyle;
top=159;
aI("text=Overview;url=" + relativePathToRoot + "power/index.html;");
aI("text=Power Generation;url=" + relativePathToRoot + "power/power.html;");
aI("text=Non-regulated Gas Storage;url=" + relativePathToRoot + "gas_storage.html;");
aI("text=Liquefied Natural Gas;url=" + relativePathToRoot + "lng.html;");
//aI("text=Power Assets;url=" + relativePathToRoot + "power/facilities.html;");
//aI("text=U.S. Northeast;url=" + relativePathToRoot + "power/usne.html;");
//aI("text=U.S. Midwest;url=" + relativePathToRoot + "power/usmw.html;");
//aI("text=Ontario;url=" + relativePathToRoot + "power/ontario.html;");
//aI("text=West;url=" + relativePathToRoot + "power/west.html;");
//aI("text=Power LP;url=" + relativePathToRoot + "power/powerlp.html;");
}


with(milonic=new menuname("investor")){
style=subMenuStyle;
top=179;
aI("text=Investor Centre;url=" + relativePathToRoot + "investor/index.html;");
aI("text=Financial Information;url=" + relativePathToRoot + "investor/financial.html;");
aI("text=Stock Information;url=" + relativePathToRoot + "investor/stock.html;");
aI("text=Conference Calls<br>and Presentations;url=" + relativePathToRoot + "investor/conference.html;");
aI("text=Dividend Information;url=" + relativePathToRoot + "investor/dividend_information.html;");
aI("text=Shareholder Information<br>and Services;url=" + relativePathToRoot + "investor/shareholder.html;");
aI("text=Events Calendar;url=" + relativePathToRoot + "investor/events.html;");
aI("text=Analyst Coverage;url=" + relativePathToRoot + "investor/analyst.html;");
}


with(milonic=new menuname("news")){
style=subMenuStyle;
top=199;
aI("text=News Centre;url=" + relativePathToRoot + "news/index.html;");
aI("text=2008 News Releases;url=" + relativePathToRoot + "news/2008.html;");
aI("text=2007 News Releases;url=" + relativePathToRoot + "news/2007.html;");
aI("text=2006 News Releases;url=" + relativePathToRoot + "news/2006.html;");
aI("text=2005 News Releases;url=" + relativePathToRoot + "news/2005.html;");
aI("text=2004 News Releases;url=" + relativePathToRoot + "news/2004.html;");
aI("text=2003 News Releases;url=" + relativePathToRoot + "news/2003.html;");
aI("text=2002 News Releases;url=" + relativePathToRoot + "news/2002.html;");
aI("text=2001 News Releases;url=" + relativePathToRoot + "news/2001.html;");
aI("text=2000 News Releases;url=" + relativePathToRoot + "news/2000.html;");
}

with(milonic=new menuname("social")){
style=subMenuStyle;
top=219;
aI("text=Community Connections;url=" + relativePathToRoot + "social/connections.html;");
aI("text=Community Investment;url=" + relativePathToRoot + "social/connections_investment.html;");
aI("text=Environment;url=" + relativePathToRoot + "social/environment.html;");
aI("text=Employee Health<br>and Safety;url=" + relativePathToRoot + "social/health.html;");
aI("text=Public Safety;url=" + relativePathToRoot + "social/safety.html;");
aI("text=Reports Publications<br>and Policies;url=" + relativePathToRoot + "social/reports.html;");
}

with(milonic=new menuname("careers")){
style=subMenuStyle;
top=239;
aI("text=Current Opportunities;url=" + relativePathToRoot + "careers/index.html;");
aI("text=Working At TransCanada;url=" + relativePathToRoot + "careers/transcanada.html;");
aI("text=Respectful Workplace;url=" + relativePathToRoot + "careers/workplace.html;");
aI("text=Opportunities for Students;url=" + relativePathToRoot + "careers/students.html;");
}

drawMenus();





// Added TransCanada Function (CBS FST Trevor Churchill)
function get_relativePathToRoot(){
	
	// By default, a default assumption that the site starts at level 1 
	var environmentRootLevel = 1;
	
	var wl = "" + window.location;
	var wlArray = wl.split("/");
	var pathLevel = wlArray.length - 3;
	var temp = ""; // set the relative path to the root of the web site

	// Assumption that dev/prod environments start at root level
	//  If an environment doesn't start at the root of the web server
	//            ie. http;//pf2d7.tcpl.ca/testnewsite/
	// then modify the environmentRoot to 2, etc.
	// The below is just a 'sample entry'
	// if (wl.indexOf("/qual") != -1){environmentRootLevel = 2; }

	// adjust the pathLevel if environmentRoot isn't 1, etc.
	pathLevel = pathLevel - (environmentRootLevel - 1);

	if (wl.indexOf("Y:") != -1) {
		pathLevel = pathLevel - 2;
	}
	
	if (wl.indexOf("C:") != -1) {
		pathLevel = pathLevel - 5;
	}
	
	for (i = 1; i < pathLevel; i++){
		temp = temp + "../";
	}
	
	return temp;

}
