var brandCount = 9; //set number of brand logos to display //build brand lis brandList = new Array(); brandList[brandList.length] = {id: "adidas", name: "adidas", url: "http://www.adidasskateboarding.com", image_url: "http://images.ea.com/games/skate/img/logos/logo_adidas.gif"}; brandList[brandList.length] = {id: "Alien", name: "Alien", url: "http://aws.dnadistribution.com/intero/index.php", image_url: "http://images.ea.com/games/skate/img/logos/logo_alien.gif"}; brandList[brandList.length] = {id: "Almost", name: "Almost", url: "http://www.almostawebsite.com/", image_url: "http://images.ea.com/games/skate/img/logos/logo_almost.gif"}; brandList[brandList.length] = {id: "Baker", name: "Baker", url: "http://www.bakerskateboards.com/", image_url: "http://images.ea.com/games/skate/img/logos/logo_baker.gif"}; brandList[brandList.length] = {id: "Black Label", name: "Black Label", url: "http://www.blacklabelskates.com/", image_url: "http://images.ea.com/games/skate/img/logos/logo_blacklabel.gif"}; brandList[brandList.length] = {id: "Circa", name: "Circa", url: "http://c1rca.com/C1RCA_FALL06/", image_url: "http://images.ea.com/games/skate/img/logos/logo_circa.gif"}; brandList[brandList.length] = {id: "DC", name: "DC", url: "http://www.dcshoes.com/home.asp", image_url: "http://images.ea.com/games/skate/img/logos/logo_dc.gif"}; brandList[brandList.length] = {id: "Destructo", name: "Destructo", url: "http://www.destructotrucks.com/", image_url: "http://images.ea.com/games/skate/img/logos/logo_destructo.gif"}; brandList[brandList.length] = {id: "Emerica", name: "Emerica", url: "http://emericaskate.com/", image_url: "http://images.ea.com/games/skate/img/logos/logo_emerica.gif"}; brandList[brandList.length] = {id: "Enjoi", name: "Enjoi", url: "http://www.enjoico.com/", image_url: "http://images.ea.com/games/skate/img/logos/logo_enjoi.gif"}; brandList[brandList.length] = {id: "Enties", name: "Enties", url: "http://www.etnies.com", image_url: "http://images.ea.com/games/skate/img/logos/logo_etnies.gif"}; brandList[brandList.length] = {id: "Fallen", name: "Fallen", url: "http://www.fallenfootwear.com/", image_url: "http://images.ea.com/games/skate/img/logos/logo_fallen.gif"}; brandList[brandList.length] = {id: "Flip", name: "Flip", url: "http://www.flipskateboards.com/", image_url: "http://images.ea.com/games/skate/img/logos/logo_flip.gif"}; brandList[brandList.length] = {id: "Girl", name: "Girl", url: "http://www.girlskateboards.com/", image_url: "http://images.ea.com/games/skate/img/logos/logo_girl.gif"}; brandList[brandList.length] = {id: "Indy", name: "Indy", url: "http://www.independenttrucks.com/", image_url: "http://images.ea.com/games/skate/img/logos/logo_indy.gif"}; brandList[brandList.length] = {id: "Krew", name: "Krew", url: "http://www.kr3wapparel.com/", image_url: "http://images.ea.com/games/skate/img/logos/logo_krew2.gif"}; brandList[brandList.length] = {id: "Krooked", name: "Krooked", url: "http://www.krookedskateboarding.com/", image_url: "http://images.ea.com/games/skate/img/logos/logo_krooked.gif"}; brandList[brandList.length] = {id: "Lakia", name: "Lakia", url: "http://www.lakai.com/06/index.php", image_url: "http://images.ea.com/games/skate/img/logos/logo_lakai.gif"}; brandList[brandList.length] = {id: "Matix", name: "Matix", url: "http://www.matixclothing.com/", image_url: "http://images.ea.com/games/skate/img/logos/logo_matix.gif"}; brandList[brandList.length] = {id: "Momentum", name: "Momentum", url: "http://www.momentumskate.com/site/", image_url: "http://images.ea.com/games/skate/img/logos/logo_momentum.gif"}; brandList[brandList.length] = {id: "Mystery", name: "Mystery", url: "http://www.mysteryskateboards.com/", image_url: "http://images.ea.com/games/skate/img/logos/logo_mystery.gif"}; brandList[brandList.length] = {id: "Osiris Shoes", name: "Osiris Shoes", url: "http://www.osirisshoes.com/", image_url: "http://images.ea.com/games/skate/img/logos/logo_osirisshoes.gif"}; brandList[brandList.length] = {id: "Plan B", name: "Plan B", url: "http://www.planbskateboarding.com/", image_url: "http://images.ea.com/games/skate/img/logos/logo_planB.gif"}; brandList[brandList.length] = {id: "Real", name: "Real", url: "", image_url: "http://images.ea.com/games/skate/img/logos/logo_real.gif"}; brandList[brandList.length] = {id: "Royal", name: "Royal", url: "http://www.royalskateboardtruck.com/", image_url: "http://images.ea.com/games/skate/img/logos/logo_royal.gif"}; brandList[brandList.length] = {id: "Silver", name: "Silver", url: "http://www.silvertruckco.com/", image_url: "http://images.ea.com/games/skate/img/logos/logo_silver.gif"}; brandList[brandList.length] = {id: "Spitfire", name: "Spitfire", url: "", image_url: "http://images.ea.com/games/skate/img/logos/logo_spitfire.gif"}; brandList[brandList.length] = {id: "Thunder", name: "Thunder", url: "", image_url: "http://images.ea.com/games/skate/img/logos/logo_thunder.gif"}; brandList[brandList.length] = {id: "Volcom", name: "Volcom", url: "http://www.volcom.com/", image_url: "http://images.ea.com/games/skate/img/logos/logo_volcom.gif"}; brandList[brandList.length] = {id: "Zero", name: "Zero", url: "http://www.zeroskateboards.com/", image_url: "http://images.ea.com/games/skate/img/logos/logo_zero.gif"}; //get random intiger Math.randomMax = function(maxVal,asFloat){ var val = Math.random()*maxVal; return asFloat?val:Math.round(val); } //grab random keys from the array function getRandomKeys(keyCount) { randomFeed = new Array(); var i = 0; while (i < keyCount) { var theNumber = Math.randomMax(brandList.length-1); var find = function(needle,haystack) { for (var x = 0, length = haystack.length; x < length; x++) if (haystack[x] == needle) return x; return -1; } if (find(theNumber,randomFeed) == -1) { randomFeed[randomFeed.length] = theNumber; i++; } } return randomFeed } //write the feed to the page function writeBrandFeed(divId) { var output = "