/********************************* gameplay.js for EA.com code by Allan Chang *********************************/ function changeFlash(swfBase, gameSwf) { var playerInfo = ""; var tempName = ''; if (playerName != "") { if (scoutName != "") { tempName = scoutName; } else { tempName = playerName; } } else { if (scoutName != "") { tempName = scoutName; } } playerInfo = "?playerName=" + tempName; //madden has no news if ((swfBase == 'profile_news') && (gameSwf == 'news_madden07.swf')) { swfBase = 'profile_leaderboards'; gameSwf = 'madden07leaderBoard.swf'; } var fo = new FlashObject("/downloads/easports/_swf/" + swfBase + "/" + gameSwf + playerInfo, "gameplayFlash", "100%", "100%", "8.0.22", "#000000", true, "high"); fo.addParam("quality", "high"); fo.addParam("wmode", "transparent"); fo.addParam("allowScriptAccess", "sameDomain"); fo.addParam("base", "/downloads/easports/_swf/" + swfBase + "/"); fo.write("C_Flash_Feature"); addEvent(window, 'onunload', function() { document.getElementById('C_Flash_Feature').innerHTML = ''; } ); resetGameList('player-games'); } function showLeaderboards(gameID) { changeFlash('profile_leaderboards', gameID + "leaderBoard.swf"); document.getElementById('gameID_' + gameID).className = 'On'; } function showSnapshot(gameID) { changeFlash('profile_snapshots', "snapshot_" + gameID + ".swf"); document.getElementById('gameID_' + gameID).className = 'On'; } function showNews(gameID) { changeFlash('profile_news', "news_" + gameID + ".swf"); document.getElementById('gameID_' + gameID).className = 'On'; } function resetGameList(targetElm) { var gameBlock = getElm(targetElm); var gameHtml = ''; var strTmp = ''; var availableGames = 0; clearElm(gameBlock); // check how many loops for (var i=0;i<10;i++) { if ((gameplayID[i] != "") && (gameplayTitle[i] != "")) { availableGames += 1; } } for (var j=0;j'; } else { strTmp += '>'; } // write event if (gameplayEvent[j] != "") { strTmp += '' + gameplayTitle[j] + ''; } else { strTmp += ''; } // write closing strTmp += ''; } gameHtml = strTmp; if ((playerName != "") || (scoutName != "")) { writeHTML(gameBlock,gameHtml); } }