// FILTER VALUE ARRAYS var allARR = new Array() ; var accesstofinanceARR = new Array() ; var philanthropicmarketsARR = new Array() ; var openinnovationARR = new Array() ; var participatorymediaARR = new Array() ; var otherARR = new Array() ; var nonprofitARR = new Array() ; var forprofitARR = new Array() ; // SOME MORE VARIABLES var displayARR = new Array() ; var interestArea = "allareas" ; var sector = "allsectors" ; var current_interestarea = "allareas" ; var current_sector = "allsectors" ; // POPULATE THE ARRAYS allARR[allARR.length] = "13" ; accesstofinanceARR[accesstofinanceARR.length] = "13" ; forprofitARR[forprofitARR.length] = "13" ; allARR[allARR.length] = "9" ; philanthropicmarketsARR[philanthropicmarketsARR.length] = "9" ; nonprofitARR[nonprofitARR.length] = "9" ; allARR[allARR.length] = "85" ; accesstofinanceARR[accesstofinanceARR.length] = "85" ; nonprofitARR[nonprofitARR.length] = "85" ; allARR[allARR.length] = "11" ; accesstofinanceARR[accesstofinanceARR.length] = "11" ; forprofitARR[forprofitARR.length] = "11" ; allARR[allARR.length] = "12" ; otherARR[otherARR.length] = "12" ; nonprofitARR[nonprofitARR.length] = "12" ; allARR[allARR.length] = "14" ; accesstofinanceARR[accesstofinanceARR.length] = "14" ; forprofitARR[forprofitARR.length] = "14" ; allARR[allARR.length] = "15" ; philanthropicmarketsARR[philanthropicmarketsARR.length] = "15" ; nonprofitARR[nonprofitARR.length] = "15" ; allARR[allARR.length] = "16" ; accesstofinanceARR[accesstofinanceARR.length] = "16" ; forprofitARR[forprofitARR.length] = "16" ; allARR[allARR.length] = "17" ; openinnovationARR[openinnovationARR.length] = "17" ; forprofitARR[forprofitARR.length] = "17" ; allARR[allARR.length] = "18" ; participatorymediaARR[participatorymediaARR.length] = "18" ; nonprofitARR[nonprofitARR.length] = "18" ; allARR[allARR.length] = "19" ; openinnovationARR[openinnovationARR.length] = "19" ; nonprofitARR[nonprofitARR.length] = "19" ; allARR[allARR.length] = "20" ; participatorymediaARR[participatorymediaARR.length] = "20" ; nonprofitARR[nonprofitARR.length] = "20" ; allARR[allARR.length] = "21" ; participatorymediaARR[participatorymediaARR.length] = "21" ; forprofitARR[forprofitARR.length] = "21" ; allARR[allARR.length] = "22" ; philanthropicmarketsARR[philanthropicmarketsARR.length] = "22" ; nonprofitARR[nonprofitARR.length] = "22" ; allARR[allARR.length] = "84" ; otherARR[otherARR.length] = "84" ; nonprofitARR[nonprofitARR.length] = "84" ; allARR[allARR.length] = "24" ; otherARR[otherARR.length] = "24" ; forprofitARR[forprofitARR.length] = "24" ; allARR[allARR.length] = "26" ; participatorymediaARR[participatorymediaARR.length] = "26" ; forprofitARR[forprofitARR.length] = "26" ; allARR[allARR.length] = "27" ; participatorymediaARR[participatorymediaARR.length] = "27" ; forprofitARR[forprofitARR.length] = "27" ; allARR[allARR.length] = "86" ; accesstofinanceARR[accesstofinanceARR.length] = "86" ; nonprofitARR[nonprofitARR.length] = "86" ; allARR[allARR.length] = "29" ; otherARR[otherARR.length] = "29" ; nonprofitARR[nonprofitARR.length] = "29" ; allARR[allARR.length] = "30" ; accesstofinanceARR[accesstofinanceARR.length] = "30" ; forprofitARR[forprofitARR.length] = "30" ; allARR[allARR.length] = "31" ; otherARR[otherARR.length] = "31" ; nonprofitARR[nonprofitARR.length] = "31" ; allARR[allARR.length] = "32" ; philanthropicmarketsARR[philanthropicmarketsARR.length] = "32" ; nonprofitARR[nonprofitARR.length] = "32" ; allARR[allARR.length] = "33" ; accesstofinanceARR[accesstofinanceARR.length] = "33" ; nonprofitARR[nonprofitARR.length] = "33" ; allARR[allARR.length] = "34" ; participatorymediaARR[participatorymediaARR.length] = "34" ; nonprofitARR[nonprofitARR.length] = "34" ; allARR[allARR.length] = "35" ; otherARR[otherARR.length] = "35" ; nonprofitARR[nonprofitARR.length] = "35" ; allARR[allARR.length] = "36" ; otherARR[otherARR.length] = "36" ; nonprofitARR[nonprofitARR.length] = "36" ; allARR[allARR.length] = "37" ; openinnovationARR[openinnovationARR.length] = "37" ; forprofitARR[forprofitARR.length] = "37" ; allARR[allARR.length] = "38" ; accesstofinanceARR[accesstofinanceARR.length] = "38" ; nonprofitARR[nonprofitARR.length] = "38" ; allARR[allARR.length] = "39" ; philanthropicmarketsARR[philanthropicmarketsARR.length] = "39" ; nonprofitARR[nonprofitARR.length] = "39" ; allARR[allARR.length] = "40" ; philanthropicmarketsARR[philanthropicmarketsARR.length] = "40" ; nonprofitARR[nonprofitARR.length] = "40" ; allARR[allARR.length] = "41" ; openinnovationARR[openinnovationARR.length] = "41" ; forprofitARR[forprofitARR.length] = "41" ; allARR[allARR.length] = "42" ; participatorymediaARR[participatorymediaARR.length] = "42" ; forprofitARR[forprofitARR.length] = "42" ; allARR[allARR.length] = "43" ; participatorymediaARR[participatorymediaARR.length] = "43" ; forprofitARR[forprofitARR.length] = "43" ; allARR[allARR.length] = "44" ; participatorymediaARR[participatorymediaARR.length] = "44" ; forprofitARR[forprofitARR.length] = "44" ; allARR[allARR.length] = "45" ; accesstofinanceARR[accesstofinanceARR.length] = "45" ; nonprofitARR[nonprofitARR.length] = "45" ; allARR[allARR.length] = "46" ; accesstofinanceARR[accesstofinanceARR.length] = "46" ; nonprofitARR[nonprofitARR.length] = "46" ; allARR[allARR.length] = "47" ; accesstofinanceARR[accesstofinanceARR.length] = "47" ; forprofitARR[forprofitARR.length] = "47" ; allARR[allARR.length] = "48" ; accesstofinanceARR[accesstofinanceARR.length] = "48" ; nonprofitARR[nonprofitARR.length] = "48" ; allARR[allARR.length] = "49" ; philanthropicmarketsARR[philanthropicmarketsARR.length] = "49" ; nonprofitARR[nonprofitARR.length] = "49" ; allARR[allARR.length] = "50" ; openinnovationARR[openinnovationARR.length] = "50" ; nonprofitARR[nonprofitARR.length] = "50" ; allARR[allARR.length] = "51" ; openinnovationARR[openinnovationARR.length] = "51" ; forprofitARR[forprofitARR.length] = "51" ; allARR[allARR.length] = "52" ; accesstofinanceARR[accesstofinanceARR.length] = "52" ; forprofitARR[forprofitARR.length] = "52" ; allARR[allARR.length] = "53" ; participatorymediaARR[participatorymediaARR.length] = "53" ; forprofitARR[forprofitARR.length] = "53" ; allARR[allARR.length] = "54" ; accesstofinanceARR[accesstofinanceARR.length] = "54" ; forprofitARR[forprofitARR.length] = "54" ; allARR[allARR.length] = "55" ; participatorymediaARR[participatorymediaARR.length] = "55" ; nonprofitARR[nonprofitARR.length] = "55" ; allARR[allARR.length] = "56" ; accesstofinanceARR[accesstofinanceARR.length] = "56" ; nonprofitARR[nonprofitARR.length] = "56" ; allARR[allARR.length] = "57" ; openinnovationARR[openinnovationARR.length] = "57" ; nonprofitARR[nonprofitARR.length] = "57" ; allARR[allARR.length] = "58" ; participatorymediaARR[participatorymediaARR.length] = "58" ; forprofitARR[forprofitARR.length] = "58" ; allARR[allARR.length] = "59" ; otherARR[otherARR.length] = "59" ; nonprofitARR[nonprofitARR.length] = "59" ; allARR[allARR.length] = "60" ; accesstofinanceARR[accesstofinanceARR.length] = "60" ; forprofitARR[forprofitARR.length] = "60" ; allARR[allARR.length] = "61" ; otherARR[otherARR.length] = "61" ; forprofitARR[forprofitARR.length] = "61" ; allARR[allARR.length] = "62" ; otherARR[otherARR.length] = "62" ; nonprofitARR[nonprofitARR.length] = "62" ; allARR[allARR.length] = "63" ; otherARR[otherARR.length] = "63" ; nonprofitARR[nonprofitARR.length] = "63" ; allARR[allARR.length] = "64" ; participatorymediaARR[participatorymediaARR.length] = "64" ; forprofitARR[forprofitARR.length] = "64" ; allARR[allARR.length] = "65" ; accesstofinanceARR[accesstofinanceARR.length] = "65" ; nonprofitARR[nonprofitARR.length] = "65" ; allARR[allARR.length] = "66" ; accesstofinanceARR[accesstofinanceARR.length] = "66" ; forprofitARR[forprofitARR.length] = "66" ; allARR[allARR.length] = "67" ; philanthropicmarketsARR[philanthropicmarketsARR.length] = "67" ; nonprofitARR[nonprofitARR.length] = "67" ; allARR[allARR.length] = "68" ; participatorymediaARR[participatorymediaARR.length] = "68" ; forprofitARR[forprofitARR.length] = "68" ; allARR[allARR.length] = "69" ; participatorymediaARR[participatorymediaARR.length] = "69" ; forprofitARR[forprofitARR.length] = "69" ; allARR[allARR.length] = "70" ; participatorymediaARR[participatorymediaARR.length] = "70" ; nonprofitARR[nonprofitARR.length] = "70" ; allARR[allARR.length] = "71" ; accesstofinanceARR[accesstofinanceARR.length] = "71" ; forprofitARR[forprofitARR.length] = "71" ; allARR[allARR.length] = "72" ; participatorymediaARR[participatorymediaARR.length] = "72" ; nonprofitARR[nonprofitARR.length] = "72" ; allARR[allARR.length] = "75" ; accesstofinanceARR[accesstofinanceARR.length] = "75" ; nonprofitARR[nonprofitARR.length] = "75" ; allARR[allARR.length] = "76" ; philanthropicmarketsARR[philanthropicmarketsARR.length] = "76" ; nonprofitARR[nonprofitARR.length] = "76" ; allARR[allARR.length] = "77" ; accesstofinanceARR[accesstofinanceARR.length] = "77" ; nonprofitARR[nonprofitARR.length] = "77" ; allARR[allARR.length] = "78" ; philanthropicmarketsARR[philanthropicmarketsARR.length] = "78" ; nonprofitARR[nonprofitARR.length] = "78" ; allARR[allARR.length] = "80" ; accesstofinanceARR[accesstofinanceARR.length] = "80" ; nonprofitARR[nonprofitARR.length] = "80" ; allARR[allARR.length] = "82" ; accesstofinanceARR[accesstofinanceARR.length] = "82" ; nonprofitARR[nonprofitARR.length] = "82" ; allARR[allARR.length] = "83" ; accesstofinanceARR[accesstofinanceARR.length] = "83" ; nonprofitARR[nonprofitARR.length] = "83" ; // ======================================================= PUBLIC FUNCTIONS ===================================================== function setInterestAreaTo(input) { // first: investments interestArea = input ; refresh() ; // second: show description showAreaDescription(input) ; // third: swap the buttons selectAreaButton(input) ; // and then: set the little summary line setAreaSummary(input) ; } function setSectorTo(input) { // first: investments sector = input ; refresh() ; // then: description showSectorDescription(input) ; // and then: swap the buttons selectSectorButton(input) ; // and then: set the summary setSectorSummary(input) ; } // PORTFOLIO BUTTON MOUSE OVER SCRIPTS function pMouseOver(input) { if(input != current_interestarea && input != current_sector) obj('btn_' + input).src = "http://home.omidyar.net/resources/images/portfolio/btn_" + input + "_sel.gif" ; } function pMouseOut(input) { if(input != current_interestarea && input != current_sector) obj('btn_' + input).src = "http://home.omidyar.net/resources/images/portfolio/btn_" + input + ".gif" ; } // ================================================================ PRIVATE FUNCTIONS ========================================================================= // INVESTMENT FUNCTIONS function refresh() { // clear display for (var i = 0 ; i < allARR.length ; i++ ) objFromID("investment_" + allARR[i]).css.display = "none" ; displayARR = [] ; // populate displayARR if (interestArea == "allareas" && sector == "allsectors") { displayARR = allARR ; } else if (interestArea == "allareas") { displayARR = eval(sector + "ARR") ; } else if (sector == "allsectors") { displayARR = eval(interestArea + "ARR") ; } else if (interestArea != "allareas" && sector != "allsectors") { for (var i = 0 ; i < eval(interestArea + "ARR").length ; i++) for (var j = 0 ; j < eval(sector + "ARR").length ; j++) if (eval(interestArea + "ARR")[i] == eval(sector + "ARR")[j]) displayARR[displayARR.length] = eval(interestArea + "ARR")[i] ; } // display for (var i = 0 ; i < displayARR.length ; i++ ) obj("investment_" + displayARR[i]).css.display = "block" ; } // INTEREST AREA FUNCTIONS function showAreaDescription(input) { obj('interestarea_allareas').css.display = "none" ; obj('interestarea_accesstofinance').css.display = "none" ; obj('interestarea_philanthropicmarkets').css.display = "none" ; obj('interestarea_openinnovation').css.display = "none" ; obj('interestarea_participatorymedia').css.display = "none" ; obj('interestarea_' + input).css.display = "block" ; } function selectAreaButton(input) { obj('btn_allareas').src = "http://home.omidyar.net/resources/images/portfolio/btn_allareas.gif" ; obj('btn_accesstofinance').src = "http://home.omidyar.net/resources/images/portfolio/btn_accesstofinance.gif" ; obj('btn_philanthropicmarkets').src = "http://home.omidyar.net/resources/images/portfolio/btn_philanthropicmarkets.gif" ; obj('btn_openinnovation').src = "http://home.omidyar.net/resources/images/portfolio/btn_openinnovation.gif" ; obj('btn_participatorymedia').src = "http://home.omidyar.net/resources/images/portfolio/btn_participatorymedia.gif" ; obj('btn_' + input).src = "http://home.omidyar.net/resources/images/portfolio/btn_" + input + "_sel.gif" ; current_interestarea = input ; } function setAreaSummary(input) { switch(input) { case "allareas": obj('t_interestarea').innerHTML = "All Interest Areas" ; break ; case "accesstofinance": obj('t_interestarea').innerHTML = "Access to Finance" ; break ; case "philanthropicmarkets": obj('t_interestarea').innerHTML = "Philanthropic Markets" ; break ; case "openinnovation": obj('t_interestarea').innerHTML = "Open Innovation" ; break ; case "participatorymedia": obj('t_interestarea').innerHTML = "Participatory Media" ; } } // SECTOR FUNCTIONS function showSectorDescription(input) { obj('sector_allsectors').css.display = "none" ; obj('sector_nonprofit').css.display = "none" ; obj('sector_forprofit').css.display = "none" ; obj('sector_' + input).css.display = "block" ; } function selectSectorButton(input) { obj('btn_allsectors').src = "http://home.omidyar.net/resources/images/portfolio/btn_allsectors.gif" ; obj('btn_forprofit').src = "http://home.omidyar.net/resources/images/portfolio/btn_forprofit.gif" ; obj('btn_nonprofit').src = "http://home.omidyar.net/resources/images/portfolio/btn_nonprofit.gif" ; obj('btn_' + input).src = "http://home.omidyar.net/resources/images/portfolio/btn_" + input + "_sel.gif" ; current_sector = input ; } function setSectorSummary(input) { switch(input) { case "allsectors": obj('t_sector').innerHTML = "All Sectors" ; break ; case "forprofit": obj('t_sector').innerHTML = "For Profit" ; break ; case "nonprofit": obj('t_sector').innerHTML = "Nonprofit" ; } } // FEATURED INVESTEE FUNCTIONS var current_investee = "1" ; function showInvestee(input) { obj('investee_1').css.display = "none" ; //obj('investee_2').css.display = "none" ; obj('investee_3').css.display = "none" ; obj('investee_4').css.display = "none" ; obj('investee_' + input).css.display = "block" ; obj('btn_1').src = "http://home.omidyar.net/resources/images/featured_investee/_1.gif" ; obj('btn_2').src = "http://home.omidyar.net/resources/images/featured_investee/_2.gif" ; obj('btn_3').src = "http://home.omidyar.net/resources/images/featured_investee/_3.gif" ; //obj('btn_4').src = "http://home.omidyar.net/resources/images/featured_investee/_4.gif" ; //obj('btn_' + input).src = "http://home.omidyar.net/resources/images/featured_investee/_" + input + "_sel.gif" ; // fixes button problem caused by the removal of Linden Lab if(input != 1) input-- ; obj('btn_' + input).src = "http://home.omidyar.net/resources/images/featured_investee/_" + input + "_sel.gif" ; current_investee = input ; } function FiMouseOver(input) { if(input != current_investee) obj('btn_' + input).src = "http://home.omidyar.net/resources/images/featured_investee/_" + input + "_sel.gif" ; } function FiMouseOut(input) { if(input != current_investee) obj('btn_' + input).src = "http://home.omidyar.net/resources/images/featured_investee/_" + input + ".gif" ; }