var Category=new Array();
var CLink=new Array();
var Desc=new Array();
var Finalist=new Array();
//var WLink=new Array();


Category[0]="<a href='/businessevents/awards/past/2008-awards/builder-developer-of-the-year' target='_self'>Builder/Developer <br>of the Year</a>";
CLink[0] = new Array("3","12","28W");
//WLink[0] = new Array("28");
Desc[0]="<span style='font-weight:800;text-transform: uppercase;'>Builder/Developer of the Year</span> recognizes the builder/developer that best champions Power Smart conservation programs and energy efficiency within their organization and community, and makes Power Smart part of their ongoing business practices.";

Category[1]="<a href='/businessevents/awards/past/2008-awards/energy-champion' target='_self'>Energy Champion</a>";
CLink[1] = new Array("1","18","34W");
//WLink[1] = new Array("19");
Desc[1]="<span style='font-weight:800;text-transform: uppercase;'>Energy Champion</span> recognizes the third-party contractor or energy manager who leads the way in energy management within an organization. The Energy Champion facilitates both energy efficiency projects and overall energy conservation culture change. ";

Category[2]="<a href='/businessevents/awards/past/2008-awards/excellence-in-energy-management/' target='_self'>Excellence in <br>Energy Management</a>";
CLink[2] = new Array("11","13","21W", "27W", "20W");
//WLink[2] = new Array("20","27");
Desc[2]="<span style='font-weight:800;text-transform: uppercase;'>Excellence in Energy Management</span> recognizes the organization that best leads the way in strategic energy management programs, demonstrating energy efficiency, a commitment to corporate culture, and company-wide staff education and awareness. ";

Category[3]="<a href='/businessevents/awards/past/2008-awards/innovation-in-sustainable-building-design/' target='_self'>Innovation in Sustainable <br>Building Design</a>";
CLink[3] = new Array("8W","9");
//WLink[3] = new Array("8");
Desc[3]="<span style='font-weight:800;text-transform: uppercase;'>Innovation in Sustainable Building Design</span> recognizes the developer and design team that best demonstrates innovation in sustainable building processes, strategies and technologies, with a goal of measurable electricity reduction and other non-energy benefits in new buildings. ";

Category[4]="<a href='/businessevents/awards/past/2008-awards/larry-bell-award-advancing-energy-conservation-within-bc' target='_self'>Larry Bell Award—<br>Advancing Energy<br>Conservation within B.C.</a>";
CLink[4] = new Array("25W");
//WLink[4] = new Array("25");
Desc[4]="<span style='font-weight:800;text-transform: uppercase;'>LARRY BELL AWARD</span> honours the commitment, vision and leadership of an individual who has promoted and made a significant impact in advancing energy conservation throughout British Columbia.";

Category[5]="<a href='/businessevents/awards/past/2008-awards/manufacturer-of-the-year' target='_self'>Manufacturer of the Year</a>";
CLink[5] = new Array("4W","6","15");
//WLink[5] = new Array("4");
Desc[5]="<span style='font-weight:800;text-transform: uppercase;'>Manufacturer of the Year</span> recognizes the manufacturing company that best champions Power Smart conservation programs and energy efficiency within their organization and community, and makes Power Smart part of their ongoing business practices.";

Category[6]="<a href='/businessevents/awards/past/2008-awards/marketing-partner-of-the-year' target='_self'>Marketing Partner <br>of the Year</a>";
CLink[6] = new Array("26W");
//WLink[6] = new Array("26");
Desc[6]="<span style='font-weight:800;text-transform: uppercase;'>Marketing Partner of the Year</span> recognizes the company and Power Smart marketing partner that best promotes energy conservation and efficiency through special promotional programs. ";

Category[7]="<a href='/businessevents/awards/past/2008-awards/new-technology-of-the-year' target='_self'>New Technology <br>of the Year</a>";
CLink[7] = new Array("17","19W");
//WLink[7] = new Array("19");
Desc[7]="<span style='font-weight:800;text-transform: uppercase;'>New Technology of the Year</span> recognizes the organization that has best used one or more new technologies and demonstrated electricity savings and/or other energy efficiency benefits, or has completed a demonstration project in any market sector. ";

Category[8]="<a href='/businessevents/awards/past/2008-awards/outstanding-energy-efficiency-project' target='_self'>Outstanding Energy <br>Efficiency Project</a>";
CLink[8] = new Array("24","23W","2","29W");
//WLink[8] = new Array("23","29");
Desc[8]="<span style='font-weight:800;text-transform: uppercase;'>Outstanding Energy Efficiency Project</span> recognizes the energy efficiency project that has generated the best results in energy savings in existing buildings. ";

Category[9]="<a href='/businessevents/awards/past/2008-awards/product-incentive-program-achievement' target='_self'>Product Incentive Program<br> Achievement</a>";
CLink[9] = new Array("10W","22W");
//WLink[9] = new Array("10","22");
Desc[9]="<span style='font-weight:800;text-transform: uppercase;'>Product Incentive Program Achievement</span> recognizes the small- or mid-sized business that has achieved the greatest percentage energy savings by replacing inefficient technologies with energy-efficient products offered through the Power Smart Product Incentive Program.";

Category[10]="<a href='/businessevents/awards/past/2008-awards/retailer-of-the-year' target='_self'>Retailer of the Year</a>";
CLink[10] = new Array("5","7W","31");
//WLink[10] = new Array("7");
Desc[10]="<span style='font-weight:800;text-transform: uppercase;'>Retailer of the Year</span> recognizes the retailer that best promotes the sale of energy saving products and champions Power Smart products and conservation programs to their customers.";

Category[11]="<a href='/businessevents/awards/past/2008-awards/workplace-conservation-leadership-award' target='_self'>Workplace Conservation<br> Leadership</a>";
CLink[11] = new Array("0","14W","16W", "30", "32","33W");
//WLink[11] = new Array("14","16", "25", "33");
Desc[11]="<span style='font-weight:800;text-transform: uppercase;'>Workplace Conservation Leadership</span> recognizes an individual(s) within an organization who has demonstrated leadership in both instilling a conservation ethic and developing and implementing an energy conservation campaign within the organization, even though energy management is not their primary role. ";



Finalist[0]="<a href='/businessevents/awards/past/2008-awards/workplace-conservation-leadership-award#newwest' target='_self'>City of New Westminster</a>";
Finalist[1]="<a href='/businessevents/awards/past/2008-awards/energy-champion#domtar' target='_self'>Domtar Pulp & Paper Products</a>";
Finalist[2]="<a href='/businessevents/awards/past/2008-awards/outstanding-energy-efficiency-project#shoppers' target='_self'>Shoppers Drug Mart</a>";
Finalist[3]="<a href='/businessevents/awards/past/2008-awards/builder-developer-of-the-year/#platinum' target='_self'>Platinum Group of Companies</a>";
Finalist[4]="<a href='/businessevents/awards/past/2008-awards/manufacturer-of-the-year#conglom' target='_self'>Conglom Inc.</a>";
Finalist[5]="<a href='/businessevents/awards/past/2008-awards/retailer-of-the-year#rona' target='_self'>RONA Inc.</a>";
Finalist[6]="<a href='/businessevents/awards/past/2008-awards/manufacturer-of-the-year#globe' target='_self'>Globe Electric Company Inc.</a>";
Finalist[7]="<a href='/businessevents/awards/past/2008-awards/retailer-of-the-year#trail' target='_self'>Trail Appliances</a>";
Finalist[8]="<a href='/businessevents/awards/past/2008-awards/innovation-in-sustainable-building-design/#discovery' target='_self'>Discovery Parks Trust</a>";
Finalist[9]="<a href='/businessevents/awards/past/2008-awards/innovation-in-sustainable-building-design#richmond' target='_self'>Richmond Olympic Oval - City of Richmond</a>";
Finalist[10]="<a href='/businessevents/awards/past/2008-awards/product-incentive-program-achievement#midland' target='_self'>Midland Liquidators</a>";
Finalist[11]="<a href='/businessevents/awards/past/2008-awards/excellence-in-energy-management/#victoria' target='_self'>School District #61<br> (Greater Victoria)</a>";
Finalist[12]="<a href='/businessevents/awards/past/2008-awards/builder-developer-of-the-year#ubc' target='_self'>UBC Properties Trust</a>";
Finalist[13]="<a href='/businessevents/awards/past/2008-awards/excellence-in-energy-management/#molson' target='_self'>Molson Canada<br> Vancouver Brewery</a>";
Finalist[14]="<a href='/businessevents/awards/past/2008-awards/workplace-conservation-leadership-award#victoria' target='_self'>City of Victoria</a>";
Finalist[15]="<a href='/businessevents/awards/past/2008-awards/manufacturer-of-the-year#gienow' target='_self'>Gienow Windows and<br> Doors Inc.</a>";
Finalist[16]="<a href='/businessevents/awards/past/2008-awards/workplace-conservation-leadership-award#vancouver' target='_self'>Vancouver Coastal Health Authority</a>";
Finalist[17]="<a href='/businessevents/awards/past/2008-awards/new-technology-of-the-year#ubc' target='_self'>The University of<br> British Columbia</a>";
Finalist[18]="<a href='/businessevents/awards/past/2008-awards/energy-champion#bchousing' target='_self'>BC Housing</a>";
Finalist[19]="<a href='/businessevents/awards/past/2008-awards/new-technology-of-the-year#phsa' target='_self'>Provincial Health Services<br> Authority - New Technology</a>";
Finalist[20]="<a href='/businessevents/awards/past/2008-awards/excellence-in-energy-management/#catalyst' target='_self'>Catalyst Paper<br> Crofton Division</a>";
Finalist[21]="<a href='/businessevents/awards/past/2008-awards/excellence-in-energy-management/#overwaitea' target='_self'>Overwaitea Food Group</a>";
Finalist[22]="<a href='/businessevents/awards/past/2008-awards/product-incentive-program-achievement#aberdeen' target='_self'>Aberdeen Poultry Ltd</a>";
Finalist[23]="<a href='/businessevents/awards/past/2008-awards/outstanding-energy-efficiency-project#taseko' target='_self'>Taseko's Gibraltar Mine</a>";
Finalist[24]="<a href='/businessevents/awards/past/2008-awards/outstanding-energy-efficiency-project#kinder' target='_self'>Kinder Morgan Canada Inc.</a>";
Finalist[25]="<a href='/businessevents/awards/past/2008-awards/larry-bell-award-advancing-energy-conservation-within-bc#ministry' target='_self'>Ministry of Energy, Mines and<br> Petroleum Resources</a>";
Finalist[26]="<a href='/businessevents/awards/past/2008-awards/marketing-partner-of-the-year#window' target='_self'>Window and Door<br> Manufacturers<br> Association of BC</a>";
Finalist[27]="<a href='/businessevents/awards/past/2008-awards/excellence-in-energy-management/#kwantlen' target='_self'>Kwantlen Polytechnic University</a>";
Finalist[28]="<a href='/businessevents/awards/past/2008-awards/builder-developer-of-the-year#limona' target='_self'>Limona Construction Ltd.</a>";
Finalist[29]="<a href='/businessevents/awards/past/2008-awards/outstanding-energy-efficiency-project#sears' target='_self'>Sears Canada Inc.</a>";
Finalist[30]="<a href='/businessevents/awards/past/2008-awards/workplace-conservation-leadership-award#delta' target='_self'>Corporation of Delta</a>";
Finalist[31]="<a href='/businessevents/awards/past/2008-awards/retailer-of-the-year#costco' target='_self'>Costco Wholesale</a>";
Finalist[32]="<a href='/businessevents/awards/past/2008-awards/workplace-conservation-leadership-award#centra' target='_self'>Centra Windows Ltd.</a>";
Finalist[33]="<a href='/businessevents/awards/past/2008-awards/workplace-conservation-leadership-award#catalyst' target='_self'>Catalyst Paper <br>Elk Falls Division</a>";
Finalist[34]="<a href='/businessevents/awards/past/2008-awards/energy-champion#phsa' target='_self'>Provincial Health Services<br> Authority</a>";

Array.prototype.find = function(searchStr) {
  var returnArray = false;
  for (i=0; i<this.length; i++) {
    if (typeof(searchStr) == 'function') {
      if (searchStr.test(this[i])) {
        if (!returnArray) { returnArray = [] }
        returnArray.push(i);
      }
    } else {
      if (this[i]===searchStr) {
        if (!returnArray) { returnArray = [] }
        returnArray.push(i);
      }
    }
  }
  return returnArray;
}

function highlight(x){
	document.getElementById("cat"+x).style.backgroundColor ="#00b383";
	document.getElementById("desc_long").innerHTML =Desc[x];
	for(y=0;y<CLink[x].length;y++){
	
		if(   CLink[x][y].charAt(CLink[x][y].length - 1) == 'W' )
			document.getElementById("finalist"+CLink[x][y].substring(0, CLink[x][y].length - 1)).style.backgroundColor ="#00b383";	
		else	
			document.getElementById("finalist"+CLink[x][y]).style.backgroundColor ="#00adef";
	}


}
function reset(x){
	document.getElementById("cat"+x).style.backgroundColor="#B9E5FB";
	document.getElementById("desc_long").innerHTML ="";
	for(y=0;y<CLink[x].length;y++){
		//document.getElementById("finalist"+CLink[x][y]).style.backgroundColor ="#dfe8e2";
		
		if(   CLink[x][y].charAt(CLink[x][y].length - 1) == 'W' )
			document.getElementById("finalist"+CLink[x][y].substring(0, CLink[x][y].length - 1)).style.backgroundColor ="#B9E5FB";	
		else	
			document.getElementById("finalist"+CLink[x][y]).style.backgroundColor ="#B9E5FB";
		
	}
	
	/*for(y=0;y<WLink[x].length;y++){
		document.getElementById("finalist"+WLink[x][y]).style.backgroundColor ="#dfe8e2";
	}*/
}


function highlightF(x){
	var found;
	for(a=0;a<Category.length;a++){

		for(y=0;y<CLink[a].length;y++){
			if(CLink[a][y]==x){
				found=a;
				highlight(found);
			}
			else if( (CLink[a][y].charAt(CLink[a][y].length - 1) == 'W') && (CLink[a][y].substring(0, CLink[a][y].length - 1) == x)       ){
				found=a;
				highlight(found);
			}
			
		}
		
		/*for(y=0;y<WLink[a].length;y++){
			if(WLink[a][y]==x){found=a;highlight(found);}
			
		}*/
	}
}

function resetF(x){
	var found;
	for(a=0;a<Category.length;a++){

		for(y=0;y<CLink[a].length;y++){
			if(CLink[a][y]==x){found=a;reset(found);}
			else if( (CLink[a][y].charAt(CLink[a][y].length - 1) == 'W') && (CLink[a][y].substring(0, CLink[a][y].length - 1) == x)       ){
				found=a;
				reset(found);
			}
		}
		/*for(y=0;y<WLink[a].length;y++){
			if(WLink[a][y]==x){found=a;reset(found);}
			
		}*/
	}
}


for(i=0;i<Category.length;i++){

	var mycel = document.getElementById("cat"+i);
	mycel.innerHTML=Category[i];
	//while( mycel.childNodes.length )
	//mycel.removeChild( mycel.childNodes[c] );

	//mycel.appendChild(document.createTextNode(Category[i-1]))

}

for(i=0;i<Finalist.length;i++){

	var mycel = document.getElementById("finalist"+i);
	mycel.innerHTML=Finalist[i];

}
