﻿
    var myArray = new Array();
    //array elements: Project name, Capacity, Type, 0 or 1 for is PGE Project
 myArray[1] = new Array("Orcas Solar (various projects)","98 KW","Solar",0);
	myArray[2] = new Array("Admiralty Inlet (various projects)","59-68 MW","Wave/Tidal",0);
	myArray[3] = new Array("Makah Bay demonstration","1.0 MW","Wave/Tidal",0);
	myArray[4] = new Array("Puget Sound Electrical JATC","16.65 KW","Solar",0);
	myArray[5] = new Array("Capitol Solar","20 KW","Solar",0);
	myArray[6] = new Array("Coyote Crest","120 MW","Wind",0);
	myArray[7] = new Array("CCAP Grayland Wind","6 MW","Wind",0);
	myArray[8] = new Array("Radar Ridge","82 MW","Wind",0);
	myArray[9] = new Array("Willapa Bay","1-2 MW","Wave/Tidal",0);
	myArray[10] = new Array("Lincoln Co/OSU Wave Ctr","20-180 MW","Wave/Tidal",0);
	myArray[11] = new Array("Newport","100 MW","Wave/Tidal",0);
	myArray[12] = new Array("Florence","10 MW","Wave/Tidal",0);
	myArray[13] = new Array("Reedsport","1.5 MW","Wave/Tidal",0);
	myArray[14] = new Array("Douglas Co.","20-180 MW","Wave/Tidal",0);
	myArray[15] = new Array("Coos Co.","100 MW","Wave/Tidal",0);
	myArray[16] = new Array("Coos Bay","100 MW","Wave/Tidal",0);	
	myArray[17] = new Array("Kittitas Valley","130 MW","Wind",0);
	myArray[18] = new Array("Ellensburg Solar","36 KW","Solar",0);
	myArray[19] = new Array("Windy Flats","190 MW","Wind",0);
	myArray[20] = new Array("White Creek","204.7 MW","Wind",0);
	myArray[21] = new Array("Klondike (various projects)","total projects: 399 MW","Solar",1);
	myArray[22] = new Array("Brewery Blocks","22.4 KW","Solar",0);
	myArray[23] = new Array("Kettle Foods","114 MW","Solar",1);
	myArray[24] = new Array("Kyle Electric","24 MW","Solar",0);
	myArray[25] = new Array("Guaranty RV","83 KW","Solar",0);
	myArray[26] = new Array("Pepsi-Eugene","252 KW","Solar",0);
	myArray[27] = new Array("Biglow Canyon Phase 3","174.8 MW combined","Wind",1);
   
   myArray[28] = new Array("Lanphier","21.3 KW","Solar",0);
	myArray[29] = new Array("Encore Ceramics","29 KW","Solar",0);
	myArray[30] = new Array("Jackson Co. Fairgrounds","24.75 KW","Solar",0);
	myArray[31] = new Array("Four Mile Hill - Glass Mt. area","55 MW","Propoased Geothermal",0);
	myArray[32] = new Array("Desert Claim","190 MW","Wind",0);
	myArray[33] = new Array("Goodnoe Hills","94 MW","Wind",0);
	myArray[34] = new Array("Rattlesnake","103 MW","Wind",0);
	myArray[35] = new Array("Leaping Juniper","100 MW","Wind",0);
	myArray[36] = new Array("Condon","49.8 MW","Wind",0);
	myArray[37] = new Array("Biglow Canyon Phases 1 & 2","275 MW combined","Wind",1);
   
  
   myArray[38] = new Array("Ray's Food","32 KW","Solar",0);
	myArray[39] = new Array("Newberry","143 MW","Geothermal",0);
	myArray[40] = new Array("United Bicycle","8.4 KW","Solar",0);
   
   myArray[41] = new Array("Ashland Munincipal","30 KW","Solar",0);
	myArray[42] = new Array("Pepsi","172 KW","Solar",0);
	myArray[43] = new Array("Chelan Solar","78 KW","Solar",0);
	myArray[44] = new Array("Wildhorse","500 KW","Solar",0);
	myArray[45] = new Array("Zillah","50 MW","Wind",0);
	
	myArray[46] = new Array("Wildhorse I and II","272.6 MW","Wind",0);
	myArray[47] = new Array("Vantage","103 MW","Wind",0);
	myArray[48] = new Array("Tuolumne","137 MW","Wind",0);
	myArray[49] = new Array("Juniper Canyon Phase I & II","250 MW","Wind",0);
	myArray[50] = new Array("Pebble Springs","98.7 MW","Wind",0);
	myArray[51] = new Array("Willow Creek","72 MW","Wind",0);
	myArray[52] = new Array("West Butte","104 MW","Wind",0);
	myArray[53] = new Array("OIT Campus",".28 MW","Geothermal",0);
	myArray[54] = new Array("Withrow","160 MW","Wind",0);
	myArray[55] = new Array("White Bluffs","38.7 KW","Solar",0);
	myArray[56] = new Array("Nine Canyon Phases I - III","145.9 MW","Wind",0);
	myArray[57] = new Array("Big Horn","199.5 MW","Wind",0);
	myArray[58] = new Array("Wheat Field Wind Farm","96.6 MW","Wind",0);
	myArray[59] = new Array("Three Mile Canyon","9.9 MW","Wind",0);
	myArray[60] = new Array("Twin Buttes","50 MW","Wind",0);
	
	myArray[61] = new Array("Marengo Phases I - II","210.6 MW","Wind",0);
	myArray[62] = new Array("Hopkins Ridge i & II","156.6 MW","Wind",0);
	myArray[63] = new Array("Stateline","299.64 MW","Wind",0);
	
	
	myArray[64] = new Array("Lincton Mountain Wind","199.5 MW","Wind",0);
	myArray[65] = new Array("Combine Hills - Eurus","41 MW","Wind",0);
	myArray[66] = new Array("Vansycle","25.08 MW","Wind",1);
	myArray[67] = new Array("Elkhorn","100.65 MW","Wind",0);
	myArray[68] = new Array("Antelope Ridge","300 MW","Wind",0);
	myArray[69] = new Array("Neal Hot Springs","32 MW","Geothermal",0);
	myArray[70] = new Array("Echanis","100 MW","Wind",0);
	myArray[71] = new Array("West Ridge","104 MW","Wind",0);
	myArray[72] = new Array("East Ridge","104 MW","Wind",0);
	myArray[73] = new Array("Alkali","18 MW","Wind",0);
	myArray[74] = new Array("Hot Springs Wind","21 MW","Wind",0);
	myArray[75] = new Array("Notch Butte","18 MW","Wind",0);
	myArray[76] = new Array("Thousand Springs (various projects)","10.5 MW","Wind",0);
	myArray[77] = new Array("Bennett","21 MW","Wind",0);
	myArray[78] = new Array("Milner Dam","18 MW","Wind",0);
	myArray[79] = new Array("Fossil Gulch","10.5 MW","Wind",0);
	myArray[80] = new Array("Magic Wind","20 MW","Wind",0);
	myArray[81] = new Array("Salmon Falls","21 MW","Wind",0);
	myArray[82] = new Array("Cassia & Cassia Gulch","29.4 MW","Wind",0);
	myArray[83] = new Array("China Mountain Wind","425 MW","Wind",0);
	myArray[84] = new Array("Burly Butte & Golden Valley","10.5 MW each","Wind",0);
	myArray[85] = new Array("Cotterel Mt.","200 MW","Wind",0);
	myArray[86] = new Array("Montana Solar","94.5 KW","Solar",0);
	myArray[87] = new Array("Schwendiman","20 MW","Wind",0);
	myArray[88] = new Array("Wolverine Creek","64.5 MW","Wind",0);
	myArray[89] = new Array("Lava Beds","18 KW","Wind",0);
	myArray[90] = new Array("Wolverine Creek","64.5 KW","Wind",0);
	myArray[91] = new Array("American Falls","100-200 MW","Wind",0);
	myArray[92] = new Array("Windland Shell","125 MW","Wind",0);
	myArray[93] = new Array("MT Marginal - Chester","19.5 MW","Wind",0);
	myArray[94] = new Array("Rim Rock","309 MW","Wind",0);
	myArray[95] = new Array("Glacier Wind","106.5 MW","Wind",0);
	myArray[96] = new Array("Montana Marginal","104 MW","Wind",0);
	myArray[97] = new Array("Teton Ridge Phase I & II","20 MW each","Wind",0);
	myArray[98] = new Array("Horseshoe Bend","9 MW","Wind",0);
	
	myArray[99] = new Array("Two Dot Wind LLC (various projects)","3.2 MW combined","Wind",0);
	
	myArray[100] = new Array("Judith Gap","135 MW","Wind",0);
	myArray[101] = new Array("Martinsdale Colony North & South","2.75 MW","Wind",0);
	myArray[102] = new Array("Sagebrush","20 MW","Wind",0);
	myArray[103] = new Array("West Wind","50 MW","Wind",0);
	myArray[104] = new Array("Coyote Energy","10 MW","Wind",0);
	myArray[105] = new Array("Zebuln","150 MW","Wind",0);
	myArray[106] = new Array("Valley County","50 MW","Wind",0);
	myArray[107] = new Array("Diamond Willow","19.5 MW","Wind",0);
	myArray[108] = new Array("Raft River: Units 1-3"," about 16 MW each","Geothermal",0);
	myArray[109] = new Array("Idaho Falls","100 MW","Geothermal",0);
	myArray[110] = new Array("Rock River","50 MW","Wind",0);
	myArray[111] = new Array("Willamette University/Kaneko Commons","9.8 KW","Solar",1);
	myArray[112] = new Array("Foote Creek Rim I, III, & IV","60 MW","Wind",0);
	myArray[113] = new Array("Glenrock (various projects)","99 MW","Wind",0);
	myArray[114] = new Array("Soda Springs","100 MW","Geothermal",0);
	myArray[115] = new Array("Telephone Flat - Glass Mt.","48. KW","Geothermal",0);
	myArray[116] = new Array("Sunny Hill Farms","11.5 KW","Solar",1);
	
	
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
    
    var cX = 0; var cY = 0;
    //keep track of the cursor
    document.onmousemove = UpdateCursorPosition;        
    function UpdateCursorPosition(e)
    {
        cX = getX(e);
        cY = getY(e);
        
        
        var myWrapper = document.getElementById("dataDivWrapper");
        
        if( myWrapper && myWrapper.style.visibility == "visible" ) 
        {
            myWrapper.style.left = (cX + 5) + "px";
            myWrapper.style.top = (cY + 5) + "px";
        }
    }
    
    function getIEscrollLeft() {
        var scrollX = 0;
        /*
        switch(navigator.appName)
        {
            case 'Microsoft Internet Explorer':
                var myregex = /MSIE 7\.0/i;
                var myArray = navigator.appVersion.match(myregex);
                if(myArray.length > 0) scrollX = document.documentElement.scrollLeft;
                else scrollX = document.body.scrollLeft;
                break;
            default:
                scrollX = window.pageXOffset;
        }
        */
        
        scrollX = document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft;
        
        return scrollX;
    }
    
    function getIEscrollTop() {
        var scrollY = 0;
        /*
        switch(navigator.appName)
        {
            case 'Microsoft Internet Explorer':
                var myregex = /MSIE 7\.0/i;
                var myArray = navigator.appVersion.match(myregex);
                if(myArray.length > 0) scrollY = document.documentElement.scrollTop;
                else scrollY = document.body.scrollTop;
                break;
            default:
              scrollY = window.pageYOffset;
        }
        */
        
        scrollY = document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;
        
        return scrollY;
    }
    
    function getX(e)
    {
        //Normalize the event object
        e = e || window.event;            
        //check for the non-IE position, then the IE position
        return e.pageX || event.clientX + getIEscrollLeft();
    }
    
    function getY(e)
    {
        //Normalize the event object
        e = e || window.event;            
        //check for the non-IE position, then the IE position
        return e.pageY || event.clientY + getIEscrollTop();
    }    
    
    function addLoadEvent(func)
    {
        var oldonload = window.onload;
        if (typeof window.onload != 'function')
        {
            window.onload = func;
        }
        else
        {   window.onload = function()
            {
                oldonload();
                func();
            }    
        }
    } 
    
    function prepMapRollovers()
    {
        //first check to see if we can run the code
        if (!document.getElementsByTagName) return false;
        
        if (!document.getElementById('map_test_Map')) return false;
        
        var arrHotSpots = document.getElementsByTagName("area");
        for (i=0; i < arrHotSpots.length; i++)
        {
            var strTitle = arrHotSpots[i].getAttribute("title");
            arrHotSpots[i].onmouseover = function()
            {
                showData(this.getAttribute("id"));
            }   
            arrHotSpots[i].onmouseout = function()
            {
                hideData();
            }                
        } 
        
        //now add the wrapper and datadiv for popups
        //these must be added through the code so that the divs are not placed inside
        //the relatively positioned page wrapper
        var outerwrap = document.createElement("div");
        outerwrap.setAttribute("id","dataDivWrapper");
        
        var datacell = document.createElement("div");
        datacell.setAttribute("id","dataDiv");
        
        outerwrap.appendChild(datacell);
        document.body.appendChild(outerwrap);
        hideData();             
    }
    
    function showData(id)
    {            
        var myDiv = document.getElementById("dataDiv");
        var myWrapper = document.getElementById("dataDivWrapper");
        myWrapper.style.left = (cX + 5) + "px";
        myWrapper.style.top = (cY + 5) + "px";
        var strPGEProject = myArray[id][3] == 1 ? "PGE Project" : "";
        myDiv.innerHTML =  "<h3>" + myArray[id][0] + "</h3>Capacity: " + myArray[id][1] + "<br />Type: " + myArray[id][2] + "<br > "+ strPGEProject; 
        myWrapper.style.visibility = "visible";
    }
    
    function hideData()
    {
        //clear the data and hide the popup
        document.getElementById("dataDivWrapper").style.visibility = "hidden";
    }        
            
   //addLoadEvent(prepRollovers);
