try{Cufon.replace("h1",{fontFamily:"f1"});Cufon.replace("span.txtWrap > span",{fontFamily:"f2",textShadow:"#333 1px 1px, #000 2px 2px"});Cufon.replace("h2",{fontFamily:"f2",hover:true});Cufon.replace("h2.articleHeading",{fontFamily:"f1",hover:true});Cufon.replace("h3.headingGames",{fontFamily:"f2",hover:true});Cufon.replace("div.itemContent h3",{fontFamily:"f2",hover:true});Cufon.replace("span.gameText",{fontFamily:"f2",hover:true,hoverables:{span:true}});Cufon.replace("a.butCom span.linkText",{fontFamily:"f2",hover:true,hoverables:{span:true}})}catch(e){}if(typeof deconcept=="undefined"){var deconcept=new Object()}if(typeof deconcept.util=="undefined"){deconcept.util=new Object()}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object()}var stDocTitle=document.title;deconcept.SWFObject=function(swf,id,w,h,ver,c,useExpressInstall,quality,xiRedirectUrl,redirectUrl,detectKey){if(!document.getElementById){return}this.DETECT_KEY=detectKey?detectKey:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(swf){this.setAttribute("swf",swf)}if(id){this.setAttribute("id",id)}if(w){this.setAttribute("width",w)}if(h){this.setAttribute("height",h)}if(ver){this.setAttribute("version",new deconcept.PlayerVersion(ver.toString().split(".")))}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(c){this.addParam("bgcolor",c)}var q=quality?quality:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",useExpressInstall);this.setAttribute("doExpressInstall",false);var xir=(xiRedirectUrl)?xiRedirectUrl:window.location;this.setAttribute("xiRedirectUrl",xir);this.setAttribute("redirectUrl","");if(redirectUrl){this.setAttribute("redirectUrl",redirectUrl)}};deconcept.SWFObject.prototype={setAttribute:function(name,value){this.attributes[name]=value},getAttribute:function(name){return this.attributes[name]},addParam:function(name,value){this.params[name]=value},getParams:function(){return this.params},addVariable:function(name,value){this.variables[name]=value},getVariable:function(name){return this.variables[name]},getVariables:function(){return this.variables},getVariablePairs:function(){var variablePairs=new Array();var key;var variables=this.getVariables();for(key in variables){variablePairs.push(key+"="+variables[key])}return variablePairs},getSWFHTML:function(){var swfNode="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn")}swfNode='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'"';swfNode+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var params=this.getParams();for(var key in params){swfNode+=[key]+'="'+params[key]+'" '}var pairs=this.getVariablePairs().join("&");if(pairs.length>0){swfNode+='flashvars="'+pairs+'"'}swfNode+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX")}swfNode='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'">';swfNode+='<param name="movie" value="'+this.getAttribute("swf")+'" />';var params=this.getParams();for(var key in params){swfNode+='<param name="'+key+'" value="'+params[key]+'" />'}var pairs=this.getVariablePairs().join("&");if(pairs.length>0){swfNode+='<param name="flashvars" value="'+pairs+'" />'}swfNode+="</object>"}return swfNode},write:function(elementId){if(this.getAttribute("useExpressInstall")){var expressInstallReqVer=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(expressInstallReqVer)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof elementId=="string")?document.getElementById(elementId):elementId;n.innerHTML=this.getSWFHTML();if(!(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length)){document.title=stDocTitle}return true}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"))}}return false}};deconcept.SWFObjectUtil.getPlayerVersion=function(){if(window.flashPlayerVersion){return window.flashPlayerVersion}var PlayerVersion=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){PlayerVersion=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");PlayerVersion=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always"}catch(e){if(PlayerVersion.major==6){return PlayerVersion}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){}}if(axo!=null){PlayerVersion=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","))}}window.flashPlayerVersion=PlayerVersion;return PlayerVersion};deconcept.PlayerVersion=function(arrVersion){this.major=arrVersion[0]!=null?parseInt(arrVersion[0]):0;this.minor=arrVersion[1]!=null?parseInt(arrVersion[1]):0;this.rev=arrVersion[2]!=null?parseInt(arrVersion[2]):0};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false}if(this.major>fv.major){return true}if(this.minor<fv.minor){return false}if(this.minor>fv.minor){return true}if(this.rev<fv.rev){return false}return true};deconcept.util={getRequestParameter:function(param){var q=document.location.search||document.location.hash;if(q){var pairs=q.substring(1).split("&");for(var i=0;i<pairs.length;i++){if(pairs[i].substring(0,pairs[i].indexOf("="))==param){return pairs[i].substring((pairs[i].indexOf("=")+1))}}}return""}};deconcept.SWFObjectUtil.cleanupSWFs=function(){if(window.opera||!document.all){return}var objects=document.getElementsByTagName("OBJECT");for(var i=0;i<objects.length;i++){objects[i].style.display="none";for(var x in objects[i]){if(typeof objects[i][x]=="function"){objects[i][x]=function(){}}}}};deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};if(typeof window.onunload=="function"){var oldUnload=window.onunload;window.onunload=function(){deconcept.SWFObjectUtil.cleanupSWFs();oldUnload()}}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs}};if(typeof window.onbeforeunload=="function"){var oldBeforeUnload=window.onbeforeunload;window.onbeforeunload=function(){deconcept.SWFObjectUtil.prepUnload();oldBeforeUnload()}}else{window.onbeforeunload=deconcept.SWFObjectUtil.prepUnload}if(Array.prototype.push==null){Array.prototype.push=function(item){this[this.length]=item;return this.length}}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;window.domReadyQueue=[];window.drqflag=false;G_activeGalleries=[];if(document.getElementById("noJsSpotlight")!=null){document.getElementById("noJsSpotlight").style.visibility="hidden"}if(document.getElementById("headerCarousel")!=null){document.getElementById("headerCarousel").style.visibility="hidden"}AddDOMReadyEvent(galleryInit);AddDOMReadyEvent(imageViewerInit);AddWindowOnload(repositionBgImgFF);AddWindowOnload(repositionLogoSony);AddWindowOnresize(resizeIE);AddWindowOnresize(repositionBgImgFF);AddWindowOnresize(repositionLogoSony);function AddWindowOnresize(function_in){if(window.attachEvent){window.attachEvent("onresize",function_in)}else{if(window.addEventListener){window.addEventListener("resize",function_in,false)}}}function resizeIE(){if(document.getElementById("flash_background")){var browserWidth=((navigator.userAgent.indexOf("MSIE 6")!=-1)&&(document.body.clientWidth<=1004))?"1004px":"100%";var el=document.getElementById("flash_background");with(el.style){height=document.getElementById("wrapper").scrollHeight+40+"px",width=browserWidth;minWidth="1004px"}}}function repositionBgImgFF(){if(document.getElementById("flash_background")){if(navigator.userAgent.indexOf("Firefox")!=-1){var bodyElem=document.body;var compStyle=document.defaultView.getComputedStyle(bodyElem,"");if(compStyle.backgroundImage.indexOf("bg_generic.gif")==-1){var bodyTagBgImgPos=(document.body.clientWidth<=970)?"-315px 0":"50% 0";document.body.style.backgroundPosition=bodyTagBgImgPos}}}}function repositionLogoSony(){if(document.getElementById("logoSony")){if(!/Macintosh/i.test(navigator.userAgent)){if(document.body.clientWidth<1066){document.getElementById("logoSony").style.width="1006px"}else{document.getElementById("logoSony").style.width="1066px"}}}}function updatePsnStyle(stGen){switch(stGen){case"psp":document.getElementById("psnBar").className="psnBarWhite";break;default:document.getElementById("psnBar").className="psnBarBlack";break}return false}var conceal='<style type="text/css">UL#headerCarousel {display: none;}</style>';if(deconcept.SWFObjectUtil.getPlayerVersion().major>=8){document.write(conceal)}window.liData=new Array();function AddWindowOnload(function_in){if(window.attachEvent){window.attachEvent("onload",function_in)}else{if(window.addEventListener){window.addEventListener("load",function_in,false)}}}function AddDOMReadyEvent(f){window.domReadyQueue.push(f)}function InsertDOMReadyEvent(f){window.domReadyQueue.unshift(f)}function queueJumpDOMReadyEvent(function_in){window.domReadyQueue.unshift(function_in)}if(document.addEventListener){document.addEventListener("DOMContentLoaded",initdr,false);
/*@cc_on @*/
/*@if (@_win32)

window.onload=function(){
  initdr();
}
/*
document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");

	var script = document.getElementById("__ie_onload");
	script.onreadystatechange = function() {
		if (this.readyState == "complete") {
			initdr(); // call the onload handler
		}
	};
*/
/*@end @*/
}if(/WebKit/i.test(navigator.userAgent)){var _timer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){initdr()}},10)}AddWindowOnload(initdr);function initdr(){if(!window.drqflag){for(a=0;a<window.domReadyQueue.length;a++){setTimeout(window.domReadyQueue[a],a*5)}window.drqflag=true}}function checkBrowserSupport(not_supported){var ua=navigator.userAgent;var r=true;for(var i=0;i<not_supported.length;i++){var s=not_supported[i];var a=s.split(",");var b=a[0];var os=a[1];if(ua.indexOf(b)>-1&&ua.indexOf(os)>-1){r=false}}return r}function imageViewerInit(){var image_viewer=new ImageViewer("imageViewer")}function ImageViewer(target_id){if(document.getElementById(target_id)){el=document.getElementById(target_id);var imt=el.getElementsByTagName("img");if(imt.length>0){var altcontent=imt[0].className;if(altcontent.indexOf("altimages:")==0){var images=altcontent.substring(10,altcontent.length).split("|");var item=0;var maxitems=images.length;render()}}}function render(){if(item==0&&item<(maxitems-1)){out=mediaControls("01")}else{if(item<(maxitems-1)){out=mediaControls("11")}else{if(item=(maxitems-1)){out=mediaControls("10")}else{out=mediaControls("00")}}}el=document.getElementById(target_id);var imt=el.getElementsByTagName("img");be=$(".mediaButtonsPlaceholder",el)[0];be.innerHTML=out;var prev=$(".previous",be);var next=$(".next",be);if(next.length>0){next[0].onclick=function(){nextitem();return false}}if(prev.length>0){prev[0].onclick=function(){previtem();return false}}imt[0].src=images[item];if(imt[0].alt.substr(imt[0].alt.length-2,1)==" "){imt[0].alt=imt[0].alt.substr(0,imt[0].alt.length-2)+" "+(item+1)}else{imt[0].alt=imt[0].alt+" "+(item+1)}}function nextitem(){if(item<=maxitems){item++}render()}function previtem(){if(item>0){item--}render()}}function galleryInit(){var wrappingEls=$("#doubleColumn .mediaSection");var j=0;for(var i=0;i<wrappingEls.length;i++){var innerObj=innerObject(wrappingEls[i]);var items=countItems(innerObj);domLinkLayer(innerObj);if(items>4){wrappingEls[i].id="dynId"+(j);G_activeGalleries[j]=new slidingGallery(wrappingEls[i].id,j);j++}}}function slidingGallery(id,num){this.el=document.getElementById(id);this.offset=0;var inWr=$("#"+id+" .slideMount")[0];inWr.className=inWr.className+" interactive";this.innerObj=innerObject(this.el);this.numItems=countItems(this.innerObj);inWr.style.height=internalHeight(this.innerObj)+"px";updateControls(num,0);fixImagePosition(inWr);function internalHeight(innerObj){var ul=innerObj.getElementsByTagName("UL")[0];var listItems=ul.getElementsByTagName("LI");var listHeight=0;for(var n=0;n<listItems.length;n++){if(listItems[n].scrollHeight>listHeight){listHeight=listItems[n].scrollHeight}}return listHeight}}function fixImagePosition(inWr){if(inWr){inWr.className=inWr.className}}function domLinkLayer(innerObj){if(innerObj){var ul=innerObj.getElementsByTagName("UL")[0];var isVideo=(ul.className.indexOf("video")==-1)?true:false;var listItems=ul.getElementsByTagName("A")}}function countItems(innerObj){if(innerObj){var ul=innerObj.getElementsByTagName("UL")[0];return(ul.getElementsByTagName("LI")).length}}function innerObject(el){return $(".slideMountInner",el)[0]}function buildGalleryButtons(secNum,content){var be=buttonArea(document.getElementById("dynId"+secNum));be.innerHTML=content;var prev=$(".previous",be);var next=$(".next",be);if(next.length>0){next[0].onclick=function(){shiftGallery(secNum,"left");return false}}if(prev.length>0){prev[0].onclick=function(){shiftGallery(secNum,"right");return false}}}function shiftGallery(secNum,direction){var el=G_activeGalleries[secNum].el;var newel=innerObject(el);if(direction=="left"&&countItems(newel)>G_activeGalleries[secNum].offset+4){G_activeGalleries[secNum].offset++}if(direction=="right"&&G_activeGalleries[secNum].offset>0){G_activeGalleries[secNum].offset--}thisOffset=0-(G_activeGalleries[secNum].offset*112);newel.style.left=thisOffset+"px";updateControls(secNum,G_activeGalleries[secNum].offset)}function updateControls(num,offsetNumber){var out="";if(offsetNumber==0){out=mediaControls("01")}else{if(offsetNumber<G_activeGalleries[num].numItems-4){out=mediaControls("11")}else{if(offsetNumber==(G_activeGalleries[num].numItems-4)){out=mediaControls("10")}}}buildGalleryButtons(num,out)}function mediaControls(type){var p='<a class="previous"><span>previous</span></a>';var pd='<span class="previousDisabled"><span>previous</span></span>';var n='<a class="next"><span>next</span></a>';var nd='<span class="nextDisabled"><span>next</span></span>';switch(type){case"01":out=pd+n;break;case"11":out=p+n;break;case"10":out=p+nd;break;default:out=pd+nd;break}return out}function buttonArea(el){return $(".mediaButtonsPlaceholder",el)[0]}function playVideo(video){var so=new SWFObject("/static/other_files/portal/common/flash/videoplayerlarge.swf","video","430","260","7","#000000");so.addVariable("video_url",video);so.addVariable("paused","false");so.addParam("wmode","transparent");so.write("mediaContentPlaceholder")}function pDestroyer(){var el=document.getElementById("contentContainer");var ps=el.getElementsByTagName("p");for(var a=ps.length-1;a>0;a--){if(ps[a].innerHTML==""){ps[a].parentNode.removeChild(ps[a])}}}function labelWrappers(){var wr=document.getElementById("rightColumn");var pwraps=$(".portlet-wrapper",wr);for(var j=1;j<=pwraps.length;j++){pwraps[j-1].className=pwraps[j-1].className+" p-w"+j}}function toggleVisibility(){for(var i=0;i<arguments.length;i++){visibility(arguments[i])}}function visibility(id){if(document.getElementById(id)){var visiTarget=document.getElementById(id);if(visiTarget.style.display=="none"){visiTarget.style.display="inline"}else{visiTarget.style.display="none"}}}function adjustAbsPos(id,unit,top,right,bottom,left){if(document.getElementById(id)){var elemId=document.getElementById(id);if(top!=null){elemId.style.top=top+unit}if(right!=null){elemId.style.right=right+unit}if(bottom!=null){elemId.style.bottom=bottom+unit}if(left!=null){elemId.style.left=left+unit}}}function copyContent(from,to){if(document.getElementById(to)&&document.getElementById(from)){document.getElementById(to).innerHTML=document.getElementById(from).innerHTML}}function toggleClassName(id,class1,class2){if(document.getElementById(id)){if(document.getElementById(id).className==class1){document.getElementById(id).className=class2}else{document.getElementById(id).className=class1}}}function disableInputFields(fields){var emailField=document.getElementById("email");var confirmEmailField=document.getElementById("confirmEmail");var newPasswordField=document.getElementById("newPassword");var confirmPasswordField=document.getElementById("confirmPassword");if(fields=="emailFields"){clearFields(fields);styleFields(fields);disableFields(fields)}else{clearFields(fields);styleFields(fields);disableFields(fields)}function clearFields(fields){if(fields=="emailFields"){emailField.value="";confirmEmailField.value=""}else{newPasswordField.value="";confirmPasswordField.value=""}}function disableFields(fields){if(fields=="emailFields"){emailField.disabled=true;confirmEmailField.disabled=true;newPasswordField.disabled=false;confirmPasswordField.disabled=false}else{emailField.disabled=false;confirmEmailField.disabled=false;newPasswordField.disabled=true;confirmPasswordField.disabled=true}}function styleFields(fields){if(fields=="emailFields"){emailField.className="disabled";confirmEmailField.className="disabled";newPasswordField.className="";confirmPasswordField.className=""}else{emailField.className="";confirmEmailField.className="";newPasswordField.className="disabled";confirmPasswordField.className="disabled"}}}function smsFieldCheck(){var smsField=document.pdcMarcomsForm.receiveSMS;var mobileNoField=document.getElementById("mobilePhoneNumber");if(smsField.checked==true){mobileNoField.disabled=false;mobileNoField.className="text"}else{mobileNoField.disabled=true;mobileNoField.className="disabled";mobileNoField.value=""}}function changeCalendarMonth(currShownMonth,change){var monthToShow=currShownMonth+change;document.getElementById("teaserCalMonth"+currShownMonth).className="hide";document.getElementById("teaserCalMonth"+monthToShow).className="show"}function toggleAddConsole(shownPSConsole,hiddenPSConsole1,hiddenPSConsole2){document.getElementById(shownPSConsole).style.display="block";if(document.getElementById(hiddenPSConsole1)){document.getElementById(hiddenPSConsole1).style.display="none"}if(document.getElementById(hiddenPSConsole2)){document.getElementById(hiddenPSConsole2).style.display="none"}}function insertIframeIntoDOM(parentId,childId,childSrc){var childIdEl=document.getElementById(childId);if(childIdEl==null){var parentIdEl=document.getElementById(parentId);var iframe=document.createElement("iframe");iframe.id=childId;iframe.src=childSrc;iframe.setAttribute("frameBorder","0");parentIdEl.appendChild(iframe)}}function popupWin(url,winName,winOptions){this.url=url;this.winName=winName;this.winOptions=winOptions;var win;this.openWin=function(){win=window.open(url,winName,winOptions)};this.closeWin=function(){if(win&&win.open&&!win.closed){win.close()}}}function sysSoftBtnStateTgl(id,state){var allDownloadBtns=document.getElementById("downloadBtns").getElementsByTagName("input");switch(state){case"enabled":for(i=1;i<=allDownloadBtns.length;i++){var downloadBtnId=id+i;document.getElementById(downloadBtnId).disabled=false;toggleClassName(downloadBtnId,"cssbtn","cssbtnAlt disabled")}break;case"disabled":for(i=1;i<=allDownloadBtns.length;i++){var downloadBtnId=id+i;document.getElementById(downloadBtnId).disabled=true;toggleClassName(downloadBtnId,"cssbtn","cssbtnAlt disabled")}break}}function showMenu(o){try{o.getElementsByTagName("ul")[0].style.display="inline";o.style.cursor="pointer"}catch(e){}}function hideMenu(o){try{o.getElementsByTagName("ul")[0].style.display="none"}catch(e){}}function sortMenuOn(section){if(document.getElementById("psnSortMenu"+section).style.display!="block"){document.getElementById("psnSortMenu"+section).style.display="block"}else{document.getElementById("psnSortMenu"+section).style.display="none"}return false}function sortMenuOff(section){try{document.getElementById("psnSortMenu"+section).style.display="none"}catch(e){}}function setUserSelected(o){try{document.getElementById("psnSortSelectedTxtUser").style.color="#999999";document.getElementById("psnSortSelectedTxtUser").innerHTML=document.getElementById("psnSortLoading").innerHTML;sortMenuOff("User")}catch(e){}}function setGameSelected(o){try{var e=o.innerHTML;document.getElementById("psnSortSelectedTxtGame").innerHTML=(e.length>23)?e.substr(0,23)+"...":e;sortMenuOff("Game")}catch(e){}}function setSortSelected(o){try{var e=o.innerHTML;document.getElementById("psnSortSelectedTxtTop").innerHTML=(e.length>23)?e.substr(0,23)+"...":e;document.getElementById("psnSortSelectedTxtBtm").innerHTML=(e.length>23)?e.substr(0,23)+"...":e;sortMenuOff("Top");sortMenuOff("Btm")}catch(e){}}function sortMenuClose(evt){if(!evt){evt=window.event.srcElement}else{evt=evt.target}try{var id=evt.parentNode.parentNode.id;if(id.indexOf("psnSortJsTop")=="-1"){if(id.indexOf("psnSortMenu")=="-1"){sortMenuOff("Top")}}if(id.indexOf("psnSortJsBtm")=="-1"){if(id.indexOf("psnSortMenu")=="-1"){sortMenuOff("Btm")}}if(id.indexOf("psnSortJsGame")=="-1"){if(id.indexOf("psnSortMenu")=="-1"){sortMenuOff("Game")}}if(id.indexOf("psnSortJsUser")=="-1"){if(id.indexOf("psnSortMenu")=="-1"){sortMenuOff("User")}}}catch(e){}}$(document).ready(function(){var numOfPanes=0;$.tools.addTipEffect("fade",function(){this.getTip().fadeIn()},function(){this.getTip().fadeOut()});$("#accordionRelated .toolTip").tooltip({effect:"fade",opacity:1,delay:30,position:["center","right"],offset:[0,10]});$.tools.addTabEffect("slide",function(tabIndex){if(jQuery.browser.msie&&parseInt(jQuery.browser.version)<8){this.getPanes().hide().eq(tabIndex).show()}else{this.getCurrentPane().slideUp("slow");this.getPanes().eq(tabIndex).slideDown("slow")}numOfPanes=this.getPanes().length});$("#accordionRelated").tabs("#accordionRelated div.content",{tabs:"#accordionRelated div.contentHeading",effect:"slide",initialIndex:0,clickable:true});$("#accordionRelated .tabHeading").hover(function(){$(this).css({"background-image":"url(/static/furn/portal/common/bg_accordion_plus_hover.gif)"})},function(){$(this).css({"background-image":"url(/static/furn/portal/common/bg_accordion_plus.gif)"})});$("#accordionRelated div.contentPortlet").css({"background-image":"none"});$("#accordionRelated div.contentPortlet").css({"margin-bottom":"0px"});$("#accordionRelated div.contentPortlet").css({"padding-bottom":"0px"});$("#accordionRelated div.contentHeading").css({border:"none"});$("#accordionRelated .tabHeading").css({"background-image":"url(/static/furn/portal/common/bg_accordion_plus.gif)"});$("#accordionRelated div.contentHeading").css({"background-image":"url(/static/furn/portal/common/bg_portlethead_sq.gif)"});$("#accordionRelated div.contentHeading:first").css({"background-image":"url(/static/furn/portal/common/bg_portlethead.gif)"});$("#accordionRelated div.contentPortlet:last").css({"padding-bottom":"4px"});if(numOfPanes>1){$("#accordionRelated div.contentPortlet:last").css({"background-image":"url(/static/furn/portal/common/bg_portletbottom_tab.gif)"})}else{$("#accordionRelated div.contentPortlet:last").css({"background-image":"url(/static/furn/portal/common/bg_portletbottom.gif)"})}$("#accordionRelated div.contentHeading:last").css({"padding-top":"3px"});$("#accordionRelated div.contentHeading:last").css({"padding-bottom":"3px"});$("#accordionRelated div.contentHeading").click();$("#accordionRelated div.contentHeading:last").click()});function AgeGate(age,video,aspect){this.init=function(){this.age=age;this.video=video;this.aspect=aspect;this.debug=false};this.displayBlock=function(id,arg){this.d("Display block: "+id+", status: "+arg);var e=document.getElementById(id);switch(arg){case false:document.getElementById(id).style.display="none";break;case true:document.getElementById(id).style.display="block";break}};this.moveBlock=function(id,arg){this.d("Move block: "+id+", status: "+arg);var e=document.getElementById(id);if(e){switch(arg){case false:e.style.position="relative";e.style.left=0+"px";e.style.top=0+"px";e.style.width="100%";break;case true:e.style.position="absolute";e.style.left=-3000+"px";e.style.top=-3000+"px"}}};this.writeCookie=function(arg){this.d("Writing cookie: "+arg);document.cookie="ageGated="+arg+";path=/"};this.checkStatus=function(){if(this.age!=""&&this.age>12){this.d("Age not empty and > 12");this.checkCookie()}else{this.d("Age empty or <= 12");this.displayBlock("mediaContentBlock",true);this.moveBlock("mediaSection",true);this.generateVideo()}};this.checkVideo=function(age,video,aspect){this.d("Check video age: "+age);this.video=video;this.aspect=aspect;this.age=age;this.checkStatus()};this.checkCookie=function(){var cookie=document.cookie;var pos=cookie.indexOf("ageGated=");if(pos!=-1){var start=pos+9;var end=cookie.indexOf(";",start);if(end==-1){end=cookie.length}var value=unescape(cookie.substring(start,end));var dob=value.split("|")[1];this.d("Cookie exists: "+value);this.checkDate(dob.split("-")[0],dob.split("-")[1],dob.split("-")[2])}else{this.d("No cookie, display form.");this.displayBlock("mediaContentBlock",false);this.displayBlock("ageError",false);this.displayBlock("ageBlock",true);this.displayBlock("msg",false);this.moveBlock("mediaSection",false);document.getElementById("mediaContentBlock").innerHTML="<IMG src='/static/furn/portal/common/vid_placeholder.jpg' id='imgsrc' class='galleryImage'>"}};this.validDate=function(day,month,year){var dob=new Date(year,month-1,day);var today=new Date();this.d("DOB date: "+dob);this.d("Today date: "+today);return(dob<today&&day==dob.getDate())&&((Number(month)-1)==dob.getMonth())&&(year==dob.getFullYear())};this.checkDate=function(day,month,year){var dobDay=day;var dobMonth=month;var dobYear=year;var ageGated=false;var d=new Date();if(this.validDate(dobDay,dobMonth,dobYear)){if((((d.getFullYear()-dobYear)==this.age)&&((d.getMonth()+1)-dobMonth)>=0&&(d.getDate()-dobDay)>=0)||((d.getFullYear()-dobYear)>this.age)){ageGated="false|"+dobDay+"-"+dobMonth+"-"+dobYear;this.writeCookie(ageGated);this.moveBlock("mediaSection",true);this.displayBlock("mediaContentBlock",true);this.generateVideo()}else{ageGated="true|"+dobDay+"-"+dobMonth+"-"+dobYear;this.writeCookie(ageGated);this.moveBlock("mediaSection",false);this.displayBlock("mediaContentBlock",false);this.displayBlock("ageBlock",false);this.displayBlock("msg",true)}}else{this.displayBlock("ageError",true)}};this.checkForm=function(f){if(f.dobDay.selectedIndex==0||f.dobMonth.selectedIndex==0||f.dobYear.selectedIndex==0){this.displayBlock("ageError",true);return false}else{this.checkDate(f.dobDay.options[f.dobDay.selectedIndex].value,f.dobMonth.options[f.dobMonth.selectedIndex].value,f.dobYear.options[f.dobYear.selectedIndex].value)}return false};this.generateDay=function(id){for(var n=1;n<32;n++){document.getElementById(id).options[n]=new Option((n<10)?"0"+(n):n,n,false,false)}};this.generateMonth=function(id){for(var n=1;n<13;n++){document.getElementById(id).options[n]=new Option((n<10)?"0"+(n):n,n,false,false)}};this.generateYear=function(id){var d=new Date();var i=1;var year=d.getFullYear();for(var n=1900;n<d.getFullYear()+1;n++){document.getElementById(id).options[i]=new Option(year,year,false,false);i+=1;year-=1}};this.generateVideo=function(){document.getElementById("mediaContentBlock").style.height="auto";this.d("Play video");var cc=(navigator.userAgent.indexOf("MSIE")!=-1)?"?cache-cutter="+new Date().getTime():"";var so=new SWFObject("/static/furn/portal/common/flash/videoplayerlarge.swf"+cc,this.video,"430","265","7","#000000");so.addVariable("video_url",this.video);so.addVariable("aspect_ratio",this.aspect);so.addVariable("paused","false");so.addParam("wmode","transparent");so.addParam("scale","exactfit");so.write("mediaContentBlock");var soSuccess=document.getElementById("mediaContentBlock").innerHTML;if(soSuccess.indexOf("img")!=-1){this.displayBlock("videoBlock",false);this.displayBlock("flashErrorBlock",true)}this.d(document.getElementById("mediaContentBlock").innerHTML)};this.previewImage=function(){var img=arguments[0];var alt="[Image]";if(arguments.length>1){alt=arguments[1]}this.d("Preview: "+img);if(document.images){this.moveBlock("mediaSection",true);document.getElementById("mediaContentBlock").innerHTML="<IMG id='imgsrc' width='437' height='249' src='/static/furn/portal/common/pixel.gif' class='galleryImage'>";this.displayBlock("mediaContentBlock",true);$("#imgsrc").hide();var i=new Image();i.src=img;i.alt=alt;document.getElementById("imgsrc").src=i.src;document.getElementById("imgsrc").alt=i.alt;$("#imgsrc").fadeIn("slow");return false}};this.d=function(arg){if(this.debug==true){alert(arg)}};this.init()}function dcsMultiTrack(){if(arguments.length%2==0){for(var i=0;i<arguments.length;i+=2){if(arguments[i].indexOf("WT.")==0){WT[arguments[i].substring(3)]=arguments[i+1]}else{if(arguments[i].indexOf("DCS.")==0){DCS[arguments[i].substring(4)]=arguments[i+1]}else{if(arguments[i].indexOf("DCSext.")==0){DCSext[arguments[i].substring(7)]=arguments[i+1]}}}}var dCurrent=new Date();DCS.dcsdat=dCurrent.getTime();dcsFunc("dcsCookie");dcsTag()}}function getCookieDomain(){var splDomain=location.hostname.split(".");if(splDomain.length>=2){return"."+splDomain[splDomain.length-2]+"."+splDomain[splDomain.length-1]}return null}function setRptCookie(name,wtMcId,expires){if(navigator.cookieEnabled){var date=new Date();date.setTime(date.getTime()+(1000*60*60*24*expires));var cookieDomain=getCookieDomain();document.cookie=name+"="+escape(wtMcId)+"; path=/"+((expires==null)?"":"; expires="+date.toGMTString())+((cookieDomain!=null)?";domain="+cookieDomain:"")}}function getRptCookie(name){var dc=document.cookie;var cname=name+"=";if(dc.match(name)!=null){if(dc.length>0){begin=dc.indexOf(cname);if(begin!=-1){begin+=cname.length;end=dc.indexOf(";",begin);if(end==-1){end=dc.length}deleteRptCookie("WT.mc_id");return unescape(dc.substring(begin,end))}}}return null}function deleteRptCookie(name){setRptCookie(name,"",-1)}function handleRptClickExt(url,wtMcId){var e=document.createElement("a");e.href=url;var qry=e.href.substring(e.href.indexOf("?")+1,e.href.length);var pth=(e.href.indexOf("/")!=0)?"/"+e.pathname:e.pathname;dcsMultiTrack("DCS.dcssip",location.hostname,"DCS.dcsuri",pth,"DCS.dcsqry",true?"":qry,"WT.ti","Offsite:"+e.hostname+pth+qry,"WT.dl","24","WT.nv","META","WT.mc_id",wtMcId)}function handleRptClickInt(url,wtMcId){setRptCookie("WT.mc_id",wtMcId,1);if(url.indexOf("http")==-1){location.href=location.protocol+"//"+location.host+url}else{location.href=url}return false}function getLocaleFromDomain(){if(wtProfileMode=="Test"){return"dcsgw3qs600000s1cg76q295o_8c3h"}else{var domain=location.hostname;if(domain.indexOf("secure.eu")!=-1){var dcsidSec="dcsw4xq8600000wkpaoqm95jb_1v1z";return dcsidSec}else{var dcsid=new Array();dcsid.at="dcslkmd8l00000oezndoe6aw7_2j9c";dcsid.be="dcsxos0pc10000oevwtzni679_5w4w";dcsid.ch="dcsexdv6300000ctybndn9979_7j1w";dcsid.cz="dcs2cppvd10000wc7jofq4bgp_2w7j";dcsid.de="dcsojc8uo00000gwzhsdob979_3f1f";dcsid.dk="dcs9fuohw0000082vbugjd979_2q7t";dcsid.es="dcsqz8n32000000knb8nbl979_3v2p";dcsid.eu="dcs3x29g9100004n4mvgsr979_2d9p";dcsid.fi="dcsoo53m800000omd85d1u979_1f8q";dcsid.fr="dcshe0e6v100008m2zw2q0a79_7o5s";dcsid.gr="dcsfx9b2i100008ibzzeu8bgp_4y1x";dcsid.ie="dcsasx6kk000008ij1bv63a79_4w7z";dcsid.it="dcsv3ga4s0000008ewwg16a79_2q5c";dcsid.nl="dcssw3i66100000ouzurh9a79_2n9x";dcsid.no="dcs5y0eyf10000cdel831ja79_2x9u";dcsid.pl="dcsyz83wb00000cpvm2dika79_3p3u";dcsid.pt="dcsjrjf7w10000086exqsna79_1p5r";dcsid.ru="dcsc94414100000knfr0apa79_2n9m";dcsid.se="dcsh08e5f00000ctato7xqa79_8i7v";dcsid.ae="dcsqm634s00000oag6cn2sa79_2f2e";dcsid.uk="dcs3orc8j100004j5oatrta79_2w4j";dcsid.au="dcscq2b7300000c19xw9vua79_6t6k";dcsid.nz="dcsh5t52100000866vzbswa79_8g2b";dcsid.lu="dcsoqk1vz000008ukiuyy4bld_3g1y";dcsid.za="dcsgpvrfo10000s92mj2lbbgp_1s2e";var splitDomain=domain.split(".");var localeAtPos=(splitDomain[0]=="preview")?1:0;var locale=splitDomain[localeAtPos];return dcsid[locale]}}return null}var backgrounds={};function BackgroundSwitcher(section){var container;var iCounter=0;var flash_base_url="";var background_data_base_url="";function init(){document.getElementById("logo").style.visibility="hidden";var lc_id="flash_bg_"+Math.random().toString().split(".")[1];var in_background=!needsForegroundCarousel();var b=(in_background)?getBackground():getForegroundCarousel();var bgSwf=(clientLocale=="ru_RU")?"cyrillic-background.swf":"latin-background.swf";var so=new SWFObject("/static/furn/portal/common/flash/"+bgSwf,"home","100%","100%","8","#A3A3A3");so.addParam("wmode","transparent");if(clientLocale){so.addVariable("locale",clientLocale)}if(!in_background){so.addVariable("is_in_foreground","true")}so.addVariable("base_url",escape(flash_base_url));so.addVariable("src_list",escape(getCarouselData()));so.addVariable("disable_controls","true");so.addVariable("lc_id",lc_id);so.addVariable("section",section);so.addVariable("locale",clientLocale);if(so.write(b)){hideCarouselItems()}else{if(document.getElementById("headerCarousel")){var el=document.getElementById("headerCarousel");el.className="jscarousel"}if(document.getElementById("contentContainer")){var el=document.getElementById("contentContainer");el.className="fallback"}}if(in_background&&isFirefox()){addProxyControls(lc_id)}}function isFirefox(){return navigator.userAgent.indexOf("Firefox")>-1}function needsForegroundCarousel(){return !checkBrowserSupport(["Firefox,Mac","Safari,Mac","Opera,Mac"])}function hideCarouselItems(){var li=container.getElementsByTagName("li");for(var i=0,ii=li.length;i<ii;i++){li[i].style.display="none"}}function getBackground(){var b=document.getElementById("flash_background");resetDimensions(b);return b}function resetDimensions(b){var browserWidth=((navigator.userAgent.indexOf("MSIE 6")!=-1)&&(document.body.clientWidth<=1004))?"1004px":"100%";with(b.style){height=document.getElementById("wrapper").scrollHeight+40+"px";width=browserWidth;minWidth="1004px"}}function getForegroundCarousel(){var c=document.getElementById("headerCarousel");with(c.style){display="block";position="absolute";zIndex="0";top="0px";height="550px";marginLeft="-15px";width="1000px"}$("header").removeClass("hasCarousel");document.getElementById("header").style.marginBottom="350px";return c}function getCarouselData(){container=document.getElementById("headerCarousel");var li=container.getElementsByTagName("li");var r=[];for(var i=0,ii=li.length;i<ii;i++){r.push(makeDataStringFromId(li[i].id))}return r.join(";")}function makeDataStringFromId(id){var o=window.carousel_data[id];if(!o){throw ("Please provide carousel data for id="+id)}var c=o.content_data;if(!c){throw ("No content found for id="+id)}var s="id="+id+","+getValuePairs(o,["swf","light","dark","duration","sound","cta_predelay","disable_controls"])+",";s+=getValuePairs(o.content_data,["headline","tagline","cta_url","cta_target","xmb","platform","logo_url","rating_url"]);return s}function getValuePairs(source_object,keys){var a=[];for(var i=0,ii=keys.length;i<ii;i++){var key=keys[i];a.push(getValuePair(key,escape(source_object[key])))}return a.join(",")}function getValuePair(key,key_value){return escape(key+"="+key_value)}function addProxyControls(lc_id){var el=document.getElementById("header");with(el.style){paddingBottom="0px";marginBottom="325px"}var proxyContainer=document.createElement("DIV");proxyContainer.id="proxy_controls";var contentContainer=document.getElementById("wrapper");contentContainer.appendChild(proxyContainer);el=document.getElementById("proxy_controls");with(el.style){width="0px";height="0px";overflow="hidden"}var proxy=new FlashProxy(lc_id,el);var proxyButtonsContainer=document.createElement("DIV");proxyButtonsContainer.id="proxy_control_buttons";var header=document.getElementById("header");document.getElementById("wrapper").insertBefore(proxyButtonsContainer,header.nextSibling);var c=document.getElementById("proxy_control_buttons");addButton(c,{id:"pause",x:8,y:363,w:21,h:21},proxy);addButton(c,{id:"back",x:43,y:363,w:20,h:21},proxy);addButton(c,{id:"forward",x:77,y:363,w:20,h:21},proxy);addButton(c,{id:"cta",x:-47,y:108,w:830,h:240},proxy)}function addButton(div,params,proxy){var el=document.createElement("A");with(el.style){cursor="pointer";position="absolute";width=params.w+"px";height=params.h+"px";top=params.y+"px"}if(params.x){el.style.left=params.x+"px"}else{el.style.right=params.right+"px"}el.onclick=function(){proxy.call(params.id,"onPress")};div.appendChild(el)}this.refresh=function(){if(!needsForegroundCarousel()){resetDimensions(document.getElementById("flash_background"))}};init()}function FlashProxy(lc_id,container){var proxy_container="flash_proxy_container";function initialize(){if(document.getElementById("proxy_container")==null){createContainer()}}function createContainer(){var c=document.createElement("DIV");c.id=proxy_container;container.appendChild(c)}this.call=function(control_id,state){var so_id="so_"+Math.random().toString().split(".")[1];var proxy_swf=new SWFObject("/static/furn/portal/common/flash/proxy.swf",so_id,"0","0","7","#FFFFFF");proxy_swf.addVariable("lc_id",lc_id);proxy_swf.addVariable("control_id",control_id);proxy_swf.addVariable("state",state);proxy_swf.write(proxy_container)};initialize()}Function.argsToArray=function _Function_s_argsToArray(a){var r=[];for(var i=0,ii=a.length;i<ii;i++){r.push(a[i])}return r};Function.prototype.bindTo=function _Function_bindTo(o){var m=this;var a=Function.argsToArray(arguments).slice(1);function _Function_bindTo_returned(){return m.apply(o,a.concat(Function.argsToArray(arguments)))}return _Function_bindTo_returned};function sortIndex(a,b){if(a.strIndex!=null&&b.strIndex!=null){if(typeof a.strIndex=="number"){var n=(b.strIndex-a.strIndex);if(n==0){return sortByAZ(a,b)}return n}else{var e=a.strIndex.toLowerCase();var f=b.strIndex.toLowerCase();if(e>f){return 1}else{if(f>e){return -1}else{return sortByAZ(a,b)}}}}else{return sortByAZ(a,b)}}function sortByAZ(a,b){var a=a.obFriend.getOnlineId().toLowerCase();var b=b.obFriend.getOnlineId().toLowerCase();if(a>b){return 1}else{if(b>a){return -1}else{return 0}}}function DataController(oRef){this.oRef=oRef;this.bRequest=false;this.strRequest="";this.getData=function(strUrl){this.bRequest=false;if(window.XMLHttpRequest){try{this.bRequest=new XMLHttpRequest()}catch(e){this.bRequest=false}}else{if(window.ActiveXObject){try{this.bRequest=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{this.bRequest=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){this.bRequest=false}}}}if(this.bRequest){this.strRequest=(this.oRef.strType=="quick")?strUrl+"?teaser=true":strUrl;this.bRequest.open("GET",this.strRequest,true);this.bRequest.send(null);this.bRequest.onreadystatechange=this.parseData.bindTo(this)}};this.parseData=function(){if(this.bRequest.readyState==4){if(this.bRequest.status==200){var oXmlResult=this.bRequest.responseXML;if(oXmlResult!=null){var oXmlFriend=oXmlResult.getElementsByTagName("psn_friend");for(var i=0,ii=oXmlFriend.length;i<ii;i++){if(oXmlFriend[i].getElementsByTagName("quick_friend_status").length>0){this.oRef.setQuickFriend(oXmlFriend[i].getElementsByTagName("quick_friend_status")[0].firstChild.nodeValue);this.oRef.drawQuickFriendStatus()}else{this.oRef.setFriendCount(oXmlFriend.length);if(oXmlFriend[i].getElementsByTagName("onlineid")[0].firstChild!=null){var friend=this.oRef.addFriend(oXmlFriend[i].getElementsByTagName("onlineid")[0].firstChild.nodeValue)}if(oXmlFriend[i].getElementsByTagName("current_presence")[0].firstChild!=null){friend.setPresence(oXmlFriend[i].getElementsByTagName("current_presence")[0].firstChild.nodeValue)}if(oXmlFriend[i].getElementsByTagName("current_game")[0].firstChild!=null){friend.setGame(oXmlFriend[i].getElementsByTagName("current_game")[0].firstChild.nodeValue)}if(oXmlFriend[i].getElementsByTagName("comment")[0].firstChild!=null){friend.setComment(oXmlFriend[i].getElementsByTagName("comment")[0].firstChild.nodeValue)}if(oXmlFriend[i].getElementsByTagName("current_avatar")[0].firstChild!=null){friend.setAvatar(oXmlFriend[i].getElementsByTagName("current_avatar")[0].firstChild.nodeValue)}if(this.oRef.strType!="quick"){if(oXmlFriend[i].getElementsByTagName("quick_friend")[0].firstChild!=null){friend.setQuickFriend(oXmlFriend[i].getElementsByTagName("quick_friend")[0].firstChild.nodeValue)}if(oXmlFriend[i].getElementsByTagName("trophy")[0].firstChild.nodeValue!="null"){if(oXmlFriend[i].getElementsByTagName("level")[0].firstChild!=null){friend.setTrophyLevel(parseInt(oXmlFriend[i].getElementsByTagName("level")[0].firstChild.nodeValue))}if(oXmlFriend[i].getElementsByTagName("platinum")[0].firstChild!=null){friend.setTrophyPlatinum(oXmlFriend[i].getElementsByTagName("platinum")[0].firstChild.nodeValue)}if(oXmlFriend[i].getElementsByTagName("gold")[0].firstChild!=null){friend.setTrophyGold(oXmlFriend[i].getElementsByTagName("gold")[0].firstChild.nodeValue)}if(oXmlFriend[i].getElementsByTagName("silver")[0].firstChild!=null){friend.setTrophySilver(oXmlFriend[i].getElementsByTagName("silver")[0].firstChild.nodeValue)}if(oXmlFriend[i].getElementsByTagName("bronze")[0].firstChild!=null){friend.setTrophyBronze(oXmlFriend[i].getElementsByTagName("bronze")[0].firstChild.nodeValue)}friend.setTrophyTotal(friend.getTrophyPlatinum()+friend.getTrophyGold()+friend.getTrophySilver()+friend.getTrophyBronze())}document.getElementById("flCount").innerHTML=this.oRef.getFriendCount()}if(this.oRef.strType=="quick"){if(oXmlFriend[i].getElementsByTagName("total")[0].firstChild.nodeValue!="null"){friend.setTrophyTotal(oXmlFriend[i].getElementsByTagName("total")[0].firstChild.nodeValue)}}this.oRef.iFriendResponseCounter+=1;if(this.oRef.iFriendResponseCounter==this.oRef.getFriendCount()){this.oRef.showSortButtons()}friend.drawData()}}}}}}}function Friend(strOnlineId,oRef){this.oRef=oRef;this.oDc=new DataController(this);this._strOnlineId=null;this._strAvatar=null;this._strPresence=null;this._strGame=null;this._strComment=null;this._strTrophyLevel=null;this._strTrophyPlatinum=null;this._strTrophyGold=null;this._strTrophySilver=null;this._strTrophyBronze=null;this._bQuickFriend=null;this.name="Friend";this.Friend=function Friend(strOnlineId){this.setOnlineId(strOnlineId);this.strOnlineId=this.getOnlineId();this.drawSetup()};this.setOnlineId=function(strOnlineId){this._strOnlineId=strOnlineId};this.getOnlineId=function(){return this._strOnlineId};this.setAvatar=function(strAvatar){this._strAvatar=strAvatar};this.getAvatar=function(){return this._strAvatar};this.setPresence=function(strPresence){this._strPresence=strPresence};this.getPresence=function(){return this._strPresence};this.setGame=function(strGame){this._strGame=strGame};this.getGame=function(){return this._strGame};this.setComment=function(strComment){this._strComment=strComment};this.getComment=function(){return this._strComment};this.setTrophyLevel=function(strTrophyLevel){this._strTrophyLevel=strTrophyLevel};this.getTrophyLevel=function(){return this._strTrophyLevel};this.setTrophyTotal=function(iTrophyTotal){this._iTrophyTotal=iTrophyTotal};this.getTrophyTotal=function(){return this._iTrophyTotal};this.setTrophyPlatinum=function(strTrophyPlatinum){this._strTrophyPlatinum=parseInt(strTrophyPlatinum)};this.getTrophyPlatinum=function(){return this._strTrophyPlatinum};this.setTrophyGold=function(strTrophyGold){this._strTrophyGold=parseInt(strTrophyGold)};this.getTrophyGold=function(){return this._strTrophyGold};this.setTrophySilver=function(strTrophySilver){this._strTrophySilver=parseInt(strTrophySilver)};this.getTrophySilver=function(){return this._strTrophySilver};this.setTrophyBronze=function(strTrophyBronze){this._strTrophyBronze=parseInt(strTrophyBronze)};this.getTrophyBronze=function(){return this._strTrophyBronze};this.setQuickFriend=function(strQuickFriend){this._strQuickFriend=(strQuickFriend=="true")?"a":"b"};this.getQuickFriend=function(){return this._strQuickFriend};this.getData=function(strUrl){this.oDc.getData(strUrl+this.getOnlineId())};this.drawData=function(){if(this.getOnlineId()!="null"){document.getElementById(this.oRef.strElRef+"PresenceInfo"+this.strOnlineId).innerHTML=this.getOnlineId()}if(this.oRef.strElRef=="fl"){if(this.getOnlineId()!="null"){if(this.getTrophyTotal()<1){document.getElementById(this.oRef.strElRef+"PsnTrophyMenuWrapper"+this.strOnlineId).innerHTML=this.getOnlineId()}document.getElementById(this.oRef.strElRef+"PsnTrophyMenuWrapper"+this.strOnlineId).style.display="block"}}if(this.getPresence()!="null"){document.getElementById(this.oRef.strElRef+"PresenceIcon"+this.strOnlineId).className="friendPresence-"+this.getPresence()}if(this.getGame()!="null"){document.getElementById(this.oRef.strElRef+"PresenceGame"+this.strOnlineId).style.display="block";document.getElementById(this.oRef.strElRef+"PresenceGame"+this.strOnlineId).innerHTML=this.getGame()}if(this.getComment()!="null"&&this.getComment()!=null){document.getElementById(this.oRef.strElRef+"Comment"+this.strOnlineId).style.display="block";document.getElementById(this.oRef.strElRef+"Comment"+this.strOnlineId).innerHTML=this.getComment()}if(this.oRef.strType=="quick"){if(this.getTrophyTotal()!="null"&&this.getTrophyTotal()>0){if(this.getTrophyTotal()==1){document.getElementById(this.oRef.strElRef+"TrophyNumberSingle"+this.strOnlineId).style.display="inline"}else{document.getElementById(this.oRef.strElRef+"TrophyNumberMultiple"+this.strOnlineId).style.display="inline"}var str=document.getElementById(this.oRef.strElRef+"TrophyNumber"+this.strOnlineId).innerHTML;if(str.indexOf("$$trophy_attained$$")!="-1"){var strReplace=str.replace(/\$\$trophy_attained\$\$/g,(this.getTrophyTotal()>50)?"50+":this.getTrophyTotal());document.getElementById(this.oRef.strElRef+"TrophyNumber"+this.strOnlineId).innerHTML=strReplace}document.getElementById(this.oRef.strElRef+"Trophy"+this.strOnlineId).style.display="block"}}var arVersion=navigator.appVersion.split("MSIE");var version=parseFloat(arVersion[1]);if(this.getAvatar()!=null&&document.getElementById(this.oRef.strElRef+"PresenceAvatar"+this.strOnlineId)!=null){var strNewHTML;if((version>=5.5)&&(document.body.filters)){strNewHTML="<span style=\"display:inline-block; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.getAvatar()+"', sizingMethod='scale');width: 45px; height: 45px; \"><img src='"+this.getAvatar()+"' style='display:none;'/></span>"}else{strNewHTML="<img src='"+this.getAvatar()+"'/>"}document.getElementById(this.oRef.strElRef+"PresenceAvatar"+this.strOnlineId).innerHTML=strNewHTML}if(this.getTrophyPlatinum()!=null&&document.getElementById(this.oRef.strElRef+"PlatinumTrophies"+this.strOnlineId)!=null){document.getElementById(this.oRef.strElRef+"PlatinumTrophies"+this.strOnlineId).innerHTML=this.getTrophyPlatinum()}if(this.getTrophyGold()!=null&&document.getElementById(this.oRef.strElRef+"GoldTrophies"+this.strOnlineId)!=null){document.getElementById(this.oRef.strElRef+"GoldTrophies"+this.strOnlineId).innerHTML=this.getTrophyGold()}if(this.getTrophySilver()!=null&&document.getElementById(this.oRef.strElRef+"SilverTrophies"+this.strOnlineId)!=null){document.getElementById(this.oRef.strElRef+"SilverTrophies"+this.strOnlineId).innerHTML=this.getTrophySilver()}if(this.getTrophyBronze()!=null&&document.getElementById(this.oRef.strElRef+"BronzeTrophies"+this.strOnlineId)!=null){document.getElementById(this.oRef.strElRef+"BronzeTrophies"+this.strOnlineId).innerHTML=this.getTrophyBronze()}if(this.getTrophyTotal()!=null&&document.getElementById(this.oRef.strElRef+"TotalTrophies"+this.strOnlineId)!=null){document.getElementById(this.oRef.strElRef+"TotalTrophies"+this.strOnlineId).innerHTML=this.getTrophyTotal()}if(this.getTrophyLevel()!=null&&document.getElementById(this.oRef.strElRef+"Level"+this.strOnlineId)!=null){document.getElementById(this.oRef.strElRef+"Level"+this.strOnlineId).innerHTML=this.getTrophyLevel()}if(this.oRef.strType!="quick"){document.getElementById("qfBox"+this.strOnlineId).style.visibility="visible";if(document.getElementById("trophiesInfoBox"+this.strOnlineId)!=null){document.getElementById("trophiesInfoBox"+this.strOnlineId).style.display="block"}if(this.getQuickFriend()=="a"){document.getElementById(this.oRef.strElRef+"QfOn"+this.strOnlineId).style.display="block";document.getElementById("qfLabelRemove"+this.strOnlineId).style.display="block";document.getElementById(this.oRef.strElRef+"QfOff"+this.strOnlineId).style.display="none"}else{document.getElementById("qfLabelAdd"+this.strOnlineId).style.display="block"}this.drawByPresence()}document.getElementById(this.oRef.strElRef+"PresenceWait"+this.strOnlineId).style.display="none"};this.drawQuickFriendStatus=function(){if(this.getQuickFriend()=="a"){this.oRef.iQuickFriendCount+=1;document.getElementById(this.oRef.strElRef+"QfOn"+this.strOnlineId).style.display="block";document.getElementById(this.oRef.strElRef+"QfOff"+this.strOnlineId).style.display="none";document.getElementById("qfLabelRemove"+this.strOnlineId).style.display="block";document.getElementById("qfLabelAdd"+this.strOnlineId).style.display="none"}else{this.oRef.iQuickFriendCount-=1;if(this.oRef.iQuickFriendCount<0){this.oRef.iQuickFriendCount=0}document.getElementById(this.oRef.strElRef+"QfOff"+this.strOnlineId).style.display="block";document.getElementById(this.oRef.strElRef+"QfOn"+this.strOnlineId).style.display="none";document.getElementById("qfLabelAdd"+this.strOnlineId).style.display="block";document.getElementById("qfLabelRemove"+this.strOnlineId).style.display="none"}document.getElementById(this.oRef.strElRef+"QfCount").innerHTML=this.oRef.iQuickFriendCount;document.getElementById(this.oRef.strElRef+"PresenceWait"+this.strOnlineId).style.display="none"};this.drawSetup=function(){document.getElementById(this.oRef.strElRef+"PresenceWait"+this.strOnlineId).style.display="block"};this.drawEntry=function(strType){document.getElementById(this.oRef.strElRef+"-"+strType).appendChild(document.getElementById(this.oRef.strElRef+"PresenceEntry"+this.strOnlineId))};this.drawByPresence=function(){for(var i=0,ii=this.oRef.aSort.length;i<ii;i++){if(this.getPresence()==this.oRef.aSort[i]){var bAttached=false;if(this.oRef.aStatus[this.oRef.aSort[i]].length>0){for(var n=0,nn=this.oRef.aStatus[this.oRef.aSort[i]].length;n<nn;n++){if(this.strOnlineId.toLowerCase()<this.oRef.aStatus[this.oRef.aSort[i]][n].toLowerCase()){document.getElementById(this.oRef.strElRef+"-"+this.oRef.aSort[i]).insertBefore(document.getElementById("flPresenceEntry"+this.strOnlineId),document.getElementById("flPresenceEntry"+this.oRef.aStatus[this.oRef.aSort[i]][n]));bAttached=true}}if(!bAttached){document.getElementById(this.oRef.strElRef+"-"+this.oRef.aSort[i]).appendChild(document.getElementById(this.oRef.strElRef+"PresenceEntry"+this.strOnlineId))}}else{document.getElementById(this.oRef.strElRef+"-"+this.oRef.aSort[i]).insertBefore(document.getElementById(this.oRef.strElRef+"PresenceEntry"+this.strOnlineId),document.getElementById(this.oRef.strElRef+"-"+this.oRef.aSort[i]).firstChild)}this.oRef.aStatus[this.oRef.aSort[i]].push(this.strOnlineId)}}};this.Friend(strOnlineId)}function PSNFriendsList(strType){this.PSNFriendsList=function(){this.oPsnFl;this.oDc=new DataController(this);this.aFriendsList=[];this.aFriendsMap=[];this.aStatus=[];this.aSort=["online-ingame","online","online-ingame-away","online-away","offline","level","trophy"];this.strElRef="qf";this.strName=strType;this.strPathFp="/ajax/mypsn/friend/presence/";this.strPathQf="/ajax/mypsn/friends/quickfriends/update/?onlineid=";this.strType=strType;this.strElRef=(this.strType=="quick")?"qf":"fl";this.iQuickFriendCount=0;this.iFriendRequestCounter=0;this.iFriendResponseCounter=0;this.bProcess=true;this.name="PSNFriendsList";this.createSortArrays()};this.addFriend=function(strOnlineId){var oFriend=new Friend(strOnlineId,this);this.aFriendsList.push(oFriend);this.aFriendsMap[strOnlineId]=oFriend;return oFriend};this.setFriendCount=function(iCount){this._iCount=iCount};this.getFriendCount=function(){return this._iCount};this.getFriendPresence=function(strType){if(this.strType=="quick"){this.oPsnFl=psnqf;if(this.bProcess){this.getData(this.strPathFp);this.bProcess=false}}else{this.oPsnFl=psnfl;this.getData(this.strPathFp)}};this.getData=function(strUrl){this.oDc.getData(strUrl)};this.sortByPresence=function(iNumberFriends){this.updateSortButtons("presence");var iNumberFriends=(iNumberFriends)?iNumberFriends:this.getFriendCount();this.resetSortArrays();for(var n=0,nn=iNumberFriends;n<nn;n++){this.aFriendsList[n].drawByPresence()}};this.sortBy=function(strType,strSort,iNumberFriends){this.updateSortButtons(strType);var iNumberFriends=(iNumberFriends)?iNumberFriends:this.getFriendCount();var strSort=(strSort)?strSort:"asc";var aSort=[];var strValue="";for(var n=0,nn=iNumberFriends;n<nn;n++){switch(strType){case"az":strValue=this.aFriendsList[n].getOnlineId();break;case"level":strValue=this.aFriendsList[n].getTrophyLevel();break;case"trophy":strValue=this.aFriendsList[n].getTrophyTotal();break;case"qf":strValue=this.aFriendsList[n].getQuickFriend()}aSort.push({strIndex:strValue,obFriend:this.aFriendsList[n]})}aSort.sort(sortIndex);if(strSort=="desc"){aSort.reverse()}for(var n=0,nn=aSort.length;n<nn;n++){aSort[n].obFriend.drawEntry(strType)}};this.showSortButtons=function(){if(this.strType!="quick"){document.getElementById("flLinkPresenceTop").style.display="block";document.getElementById("flLinkPresenceBtm").style.display="block";document.getElementById("flLinkLevelTop").style.display="block";document.getElementById("flLinkLevelBtm").style.display="block";document.getElementById("flSortBtnsTop").style.display="block";document.getElementById("flSortBtnsBtm").style.display="block"}};this.hideSortButtons=function(){if(this.strType!="quick"){document.getElementById("flLinkPresenceTop").style.display="none";document.getElementById("flLinkPresenceBtm").style.display="none";document.getElementById("flLinkLevelTop").style.display="none";document.getElementById("flLinkLevelBtm").style.display="none";document.getElementById("flSortBtnsTop").style.display="none";document.getElementById("flSortBtnsBtm").style.display="none"}};this.updateSortButtons=function(strType){};this.setQuickFriendStatus=function(strOnlineId){if(this.iQuickFriendCount<10){document.getElementById(this.strElRef+"QfError").style.display="none";this.aFriendsMap[strOnlineId].getData(this.strPathQf)}else{if(this.aFriendsMap[strOnlineId].getQuickFriend()=="a"){document.getElementById(this.strElRef+"QfError").style.display="none";this.aFriendsMap[strOnlineId].getData(this.strPathQf)}else{document.getElementById(this.strElRef+"QfError").style.display="block"}}};this.createSortArrays=function(){for(var n=0,nn=this.aSort.length;n<nn;n++){this.aStatus[this.aSort[n]]=new Array()}};this.resetSortArrays=function(){for(var n=0,nn=this.aSort.length;n<nn;n++){this.aStatus[this.aSort[n]].length=0}};this.PSNFriendsList()}var psnfl=new PSNFriendsList("full");var psnqf=new PSNFriendsList("quick");