var prevScreenId = 0; var prevVideoId = 0; var downloadHref; var prevTrackIDSelector = ""; var prevTrackID = ""; var currSection = ""; function getHref(){ popWallpaper(downloadHref, 715,385); return false; } function loadAssets(filePath,fileDownload,tab,currentId,element){ //download link downloadHref = fileDownload; //four cornered yellow borders if(tab=="screen"){ getElm("yellow_"+tab+"_"+prevScreenId).className = ""; getElm("yellow_"+tab+"_"+currentId).className = "on"; prevScreenId = currentId; }else{ getElm("yellow_"+tab+"_"+prevVideoId).className = ""; getElm("yellow_"+tab+"_"+currentId).className = "on"; prevVideoId = currentId; } //to flash video loadFlash(filePath,"flash_1",tab); //change image captions getElm("mediaCaption").innerHTML = element.title; // showCaption(element,'mediaPersistent'); } function loadDownloads(filePath,fileDownload,tab,currentId,title,elementDesc){ //four cornered yellow borders if(tab=="screen"){ getElm("yellow_"+tab+"_"+prevScreenId).className = ""; getElm("yellow_"+tab+"_"+currentId).className = "on"; prevScreenId = currentId; }else{ getElm("yellow_"+tab+"_"+prevVideoId).className = ""; getElm("yellow_"+tab+"_"+currentId).className = "on"; prevVideoId = currentId; } //to flash video loadFlash(filePath,"flash_1",tab); //change image captions var longdesc = getElm(elementDesc).innerHTML; getElm("mediaCaption").innerHTML = longdesc; getElm("mediaTitle").innerHTML = title; try { getElm("downloadLink").href = fileDownload; } catch (err) { } } /* used to communicate with flash */ function loadFlash(param,flashId,tab){ if(tab=="screen"){thisMovie(flashId).loadScreenshot(param);} else{ thisMovie(flashId).loadFlashVideo(param);} return false; } function sendNewAudioTrack(filePath, trackID, section) { thisMovie("musicPlayer").loadAudioTrack(filePath); var tId = section+"-"+trackID; currSection = section; if (prevTrackIDSelector != ""){ document.getElementById(prevTrackIDSelector).className=''; } document.getElementById(tId).className='selected'; prevTrackID = trackID; prevTrackIDSelector = tId; return false; } function loadNextTrack() { if (currSection == 'soundtrack') { var newTrackID = parseInt(prevTrackID) + 1; var section = currSection; var nextTrackElement = document.getElementById(section+"-"+newTrackID); if (nextTrackElement == null) { newTrackID = 1; nextTrackElement = document.getElementById(section+"-"+newTrackID); } var filepath = nextTrackElement.getElementsByTagName('a')[0].id; sendNewAudioTrack(filepath,newTrackID,section); } } function thisMovie(movieName) { if (navigator.appName.indexOf("Microsoft") != -1) { return window[movieName] } else { return document[movieName] } } /* syndicators */ var THE_DOMAIN; // new syndicator('Del.icio.us','http://deliciousicon',function(title,url){return "http://therighturl"}) function syndicator(name,img,post_url) { THE_DOMAIN = location.href; this.name = name; this.img = img; this.post_url = post_url; this.button = function(){ document.write(''); }; this.click = function(title,url,link){ var confirmStatus = confirm("You are about to leave Electronic Arts' website and go to a website owned by a third party.\n\nElectronic Arts is not responsible for content on third party sites,\nand our privacy policy does not apply to their information collection practices.\n\nPress OK to access the linked site or press CANCEL to return to your original page."); if(confirmStatus == false) { return false; } var doit = true; /* TEST / DEVELOPER BEWARE!! var confirms = new Array("ARE YOU SURE YOU WANT TO POST A LINK TO THIS DOMAIN: "+THE_DOMAIN,"TITLE: "+title+"\nURL: "+THE_DOMAIN+url+"\n\n ARE YOU CERTAIN?"); doit = ((THE_DOMAIN == "http://ea.com/") ? true : confirm(confirms.shift()) && confirm(confirms.shift())); */ if (doit) { openCenteredOnOpenerWindow(this.post_url(title,url), "Syndication",800,600); } else { alert("I WON'T...\nopen, in a little window:\n"+this.post_url(title,url)); } return false; }; } var Delicious = new syndicator("Del.icio.us","http://images.ea.com/ea/_img/buttons/delicious.gif",function(title,url){ return 'http://del.icio.us/post?v=4;url='+encodeURIComponent(THE_DOMAIN)+';title='+encodeURIComponent(title.replace(/^\s*|\s*$/g,'')) }); var Facebook = new syndicator("Facebook","http://images.ea.com/ea/_img/buttons/fb.gif",function(title,url){ // it wants to window.open(post_url,'sharer','toolbar=0,status=0,width=626,height=436'); return 'http://www.facebook.com/sharer.php?u='+encodeURIComponent(THE_DOMAIN)+'&t='+encodeURIComponent(title) }); var Digg = new syndicator("Digg","http://images.ea.com/ea/_img/buttons/digg.gif",function(title,url){ return 'http://digg.com/submit?phase=2&url='+encodeURIComponent(THE_DOMAIN)+'&title='+encodeURIComponent(title); }); function showCaption(element,targetID) { document.getElementById(targetID).style.display = "block"; document.getElementById(targetID).innerHTML = element.title; return false; } function hideCaption(targetID) { document.getElementById(targetID).innerHTML = ""; document.getElementById(targetID).style.display = "none"; } function showOperator(layerID) { document.getElementById(layerID).style.display = "block"; } function hideOperator(layerID) { document.getElementById(layerID).style.display = "none"; }