/********************************* ea_sports.js for EA.com code by Byron Tredwell (byron(AT)blastradius.com) *********************************/ /********************************* GLOBAL VARS *********************************/ var PADDING = 6; var SB_WIDTH = 16; var WIDTH_W_SCROLL = 34; var NAV_COLOR = "#ffffff"; var NAV_ALPHA = 1; var COMP_BORDER_WIDTH = 0; var MAC_ALT_BG_COLOR = "#ffffff"; /********************************* CSS functionality for downloads/platform pages *********************************/ function setHilite (evt,theStyle) { evt = (evt) ? evt : ((window.event) ? window.event : null); if (evt) { var elem = (evt.srcElement) ? evt.srcElement : evt.target; elem.className = theStyle; } } function setUnHilite (evt,theStyle) { evt = (evt) ? evt : ((window.event) ? window.event : null); if (evt) { var elem = (evt.srcElement) ? evt.srcElement : evt.target; elem.className = theStyle; } } /********************************* Language preference cookie *********************************/ if (location.search != '?x') { if (location.pathname == '/index.jsp' || location.pathname == '/' || location.pathname == '/redesign2005/index.jsp' || location.pathname == '/redesign2005/') { var defaultLocationURL = getCookie('defaultLocationURL'); if (defaultLocationURL != null && defaultLocationURL != '') { if (defaultLocationURL != 'http://www.ea.com/') { if((defaultLocationURL == 'http://www.eaplay.com/australia/') || (defaultLocationURL == 'http://www.eaplay.com/newzealand/') || (defaultLocationURL == 'http://ea.com.cn/') || (defaultLocationURL == 'http://www.ea.com.hk/') || (defaultLocationURL == 'http://www.japan.ea.com/') || (defaultLocationURL == 'http://www.ea.co.kr/') || (defaultLocationURL == 'http://www.ea.com.sg/') || (defaultLocationURL == 'http://www.ea.com.tw/') || (defaultLocationURL == 'http://www.ea.co.th/')) { var expires = new Date(); expires.setFullYear(expires.getFullYear() - 5); setCookie('defaultLocationURL', defaultLocationURL, expires, '/'); location.href = 'http://www.ea.com/'; } else { location.href = defaultLocationURL; } } } else { location.href = location.pathname.substring(0, location.pathname.lastIndexOf('/')) + '/language.jsp'; } } }