<!--   hide this script from non-javascript-enabled browsers



// root location. "/" for bchydro.com, "../web_resources/bchext/" for rx, "" for search

// ---------------------------------------------



root = '/';



// ---------------------------------------------



DOM = (document.getElementById) ? true : false;

NS4 = (document.layers) ? true : false;

IE = (document.all) ? true : false;

IE4 = IE && !DOM;

NS = (navigator.appName=="Netscape") ? true : false;

NS6 = NS && DOM;

MAC = (navigator.appVersion.indexOf("Mac") != -1);

 

function preload(imgObj,imgSrc) {

	if (document.images) {

		eval(imgObj + 'On = new Image()')

		eval(imgObj + 'On.src = imgSrc + "roll.gif"')

		eval(imgObj + 'Off = new Image()')

		eval(imgObj + 'Off.src = imgSrc + ".gif"')

	}

}



preload('head_index',root + 'images/global/index');

preload('head_contact',root + 'images/global/contact');

preload('a',root + 'images/global/button_1');

preload('b',root + 'images/global/button_2');

preload('c',root + 'images/global/button_3');

preload('d',root + 'images/global/button_4');

preload('e',root + 'images/global/button_5');

preload('f',root + 'images/global/button_6');

preload('g',root + 'images/global/button_7');

preload('h',root + 'images/global/button_8');

preload('i',root + 'images/global/button_9');



isActive = ""; //for active nav item

fadeTimeNav = 300; //for mouseout on nav item

fadeTime = 900; //for mouseout on menu item

hideItem = ""; //for active nav item

imageStay = ""; //for current section	



//is this a printpage

theurl = top.location.href;

printver = false;

if (theurl.indexOf("?") != -1) {

	printver = (theurl.indexOf("printnow") != -1) ? true : false;

}

if (DOM && !printver) {	

	preload('printbutt',root + 'images/global/print');

	if (theurl.indexOf("?") != -1) {

		printnow = "&printnow"

	} else {

		printnow = "?printnow"

	}

	printpage = '<p><a href="'+theurl+''+printnow+'" onmouseover="img_act(\'printbutt\')" onmouseout="img_inact(\'printbutt\')" target="_blank"><img class="inline" name="printbutt" src="' + root + 'images/global/print.gif" width="149" height="14" alt="" border="0" /></a></p>';

}

if (DOM && printver) {

	printhead = '<div id="copyright"><table cellpadding="0" cellspacing="0" border="0" width="650"><tr><td style="padding-left:5px;"><img class="inline" src="/images/global/print_logo.gif" width="139" height="25" alt="" border="0"></td><td style="text-align:right;font-size:9pt;">Copyright &#169; 2003 BC Hydro<br />All rights reserved.</td></tr></table></div>';

	document.write('<link rel="stylesheet" href="' + root + 'includes/css/bch_print5.css" type="text/css" />');

} 



function img_act(imgName) {

	if (imageStay != imgName){

		if (isActive != "") {

			if (isActive != imgName) {

		  		document[imgName].src = eval(imgName + "On.src");

				img_inact(isActive,"no");

				clearTimeout(hideItem);

			} else {

				clearTimeout(hideItem);

			}	

		} else {

		  	document[imgName].src = eval(imgName + "On.src");

		}

	} else if (isActive != "") {

		img_inact(isActive,"no");

	}

	isActive = imgName;

}



function img_inact(imgName,reset) {

	if (imageStay != imgName){

	  	document[imgName].src = eval(imgName + "Off.src");

		if (reset != "no") {

			isActive = "";

		}

	}

}



function checkActive() {

	if (isActive != "") {

		clearTimeout(hideItem);	//for navbar rollovers

		hideItem = setTimeout('img_inact(isActive)',fadeTimeNav);

	}

}



function img_stay(imgName){

    document[imgName].src = eval(imgName + "On.src");

    imageStay = imgName;

}



function changeImages() {

	if (document.images) {

    	for (var i=0; i<changeImages.arguments.length; i+=2) {

      		document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");

    		}

		}

}



function getfont() {

	if (MAC && NS) {

		return 10;

	} else {

		return 8;

	}

}



function thedate() {

	// date for homepage

	var y = new Date();

	var mName=new Array("January","February","March","April","May","June","July","August","September","October","November","December");

	document.write(mName[y.getMonth()] + " " + y.getDate() + ", " + y.getFullYear() + "<br />");

}



function openWindow(windowURL,windowName,windowWidth,windowHeight,scroll) {

  newWindow = window.open(windowURL,windowName,'width='+windowWidth+',height='+windowHeight+',toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollbars='+scroll+',resizable=0');

  newWindow.focus(); 

}



function getHeight(sec) {

	// height workaround...not being used as of now.

	var padding = sec ? 126 : 153;

	var theheight = NS ? window.innerHeight - padding : document.body.clientHeight - padding;

	document.write("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"748\" height=\""+theheight+"\">");

}

 

if(window.event + "" == "undefined") event = null;

function HM_f_PopUp(){return false};

function HM_f_PopDown(){return false};

popUp = HM_f_PopUp;

popDown = HM_f_PopDown;

  

HM_PG_MenuWidth = 250;

HM_PG_FontFamily = "arial,helvetica,geneva";

HM_PG_FontSize = getfont();

HM_PG_FontBold = 0;

HM_PG_FontItalic = 0;

HM_PG_FontColor = "#ffffff";

HM_PG_FontColorOver = "#000066";

HM_PG_BGColor = "#000066";

HM_PG_BGColorOver = "#4c98da";

HM_PG_ItemPadding = 3;



HM_PG_BorderWidth = 1;

HM_PG_BorderColor = "#000066";

HM_PG_BorderStyle = "solid";

HM_PG_SeparatorSize = 1;

HM_PG_SeparatorColor = "#000066";



HM_PG_ImageSrc = "";

HM_PG_ImageSrcOver = "";

HM_PG_ImageSrcLeft = "";

HM_PG_ImageSrcLeftOver = "";



HM_PG_ImageSize = 5;

HM_PG_ImageHorizSpace = 0;

HM_PG_ImageVertSpace = 2;



HM_PG_KeepHilite = true; 

HM_PG_ClickStart = 0;

HM_PG_ClickKill = false;

HM_PG_ChildOverlap = 1;

HM_PG_ChildOffset = -1;

HM_PG_ChildPerCentOver = null;

HM_PG_TopSecondsVisible = .5;

HM_PG_StatusDisplayBuild =0;

HM_PG_StatusDisplayLink = 0;

HM_PG_UponDisplay = null;

HM_PG_UponHide = null;

HM_PG_RightToLeft = 0;



HM_PG_CreateTopOnly = 0;

HM_PG_ShowLinkCursor = 1;

HM_PG_NSFontOver = true;

	

// stop hiding -->