function WriteMSNHeader(ppFlag){var textClass="NwType1Norm LnkType1Norm",lnkDiv="<div class='DvType3HdrLnk'>",spClass="SpType2HdrWt11";if(ppFlag!="True"&&document.getElementById("SuperBanner1")==null)DW("<div style='height:90px'>&nbsp;</div>");if(document.getElementById("SuperBanner1")!=null){document.writeln("<div id='SBOuter'></div>");var oBanner=document.getElementById("SuperBanner1"),outer=document.getElementById("SBOuter");outer.className="SuperBannerTVmain";outer.appendChild(oBanner)}document.writeln("<div id='OverallContent'><div id='OverallHeader'><div id='zhead' style='margin-right:0px'><FORM id='MHform' name='MHform' method='get' action='"+g_GameSearchURL+"' style='margin:0px;'><INPUT type='hidden' name='cp' value='"+g_MHCpValue+"'/>");document.writeln(lnkDiv+"<span id='MSNHdrSpn1' class='"+spClass+"' >");var msnLinkObj,commonStyleList=textClass+" hdnvc",finalLink="";for(i=0;i<g_MSNLnks_Left.length;i++){msnLinkObj=g_MSNLnks_Left[i];msnLinkObj.addStyleToMsnLink(commonStyleList);finalLink=msnLinkObj.getMsnLink();document.writeln(finalLink)}if(ppFlag!="True"&&displayMoreLink)document.write("<a id='more_link' href='javascript:MoreButtonClick();' class='"+textClass+" hdnvc'>more<img style='border:none;margin-left:7px' src='http://entimg.msn.com/i/je/arrow_down_white.gif' id='moreButton_arrow' /></a>");document.writeln("</span>");if(ppFlag=="True")spClass="SpType2HdrWt5Fxd";else spClass="SpType2HdrWt4";document.writeln("<span id='MSNHdrSpn' class='"+spClass+"' style='margin-top:1px'>");commonStyleList="NwType1Norm LnkType1Norm";finalLink="";for(i=0;i<g_MSNLnks_Right.length;i++){msnLinkObj=g_MSNLnks_Right[i];msnLinkObj.addStyleToMsnLink(commonStyleList);finalLink=msnLinkObj.getMsnLink();document.writeln(finalLink);if(i<g_MSNLnks_Right.length-1)document.writeln("<font class='NwType1Norm'>|</font>")}var oscarab=document.getElementById("thePassportScarab");if(oscarab!=null){document.writeln("<font class='NwType1Norm'>|</font>");document.writeln("<span id='MSNHdrSignInSpn'></span>");document.getElementById("MSNHdrSignInSpn").appendChild(oscarab)}document.writeln("</span></div>");document.writeln("<div id='moreButton_contentModule' style='visibility:hidden;'>");document.writeln("</div>")}function MoreButtonClick(){var e=document.getElementById("moreButton_contentModule"),i=document.getElementById("moreButton_arrow"),m=document.getElementById("more_link"),z=document.getElementById("ZCHead");if(e.style.visibility=="visible"){while(e.hasChildNodes())e.removeChild(e.firstChild);i.style.visibility="visible";i.src="http://entimg.msn.com/i/je/arrow_down_white.gif";m.className="NwType1Norm LnkType1Norm hdnvc";e.style.visibility="hidden";e.className="";z.className="ZCHead_c";z.focus()}else{BuildMoreButtonContent();e.style.visibility="visible";i.style.visibility="hidden";m.className="hdnvc_o";z.className="ZCHead_o";z.focus()}}function BuildMoreButtonContent(){var rssFeed=g_RSSFeed,xmlDoc=null;try{xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.async="false";xmlDoc.loadXML(rssFeed)}catch(e){try{var parser=new DOMParser;xmlDoc=parser.parseFromString(rssFeed,"text/xml")}catch(e){}}try{var root=xmlDoc.getElementsByTagName("rss")[0],toolColumns=root.selectSingleNode("/rss/channel/msncp:gtl/msncp:networklists/msncp:toollist/msncp:columns").firstChild.nodeValue,siteColumns=root.selectSingleNode("/rss/channel/msncp:gtl/msncp:networklists/msncp:sitelist/msncp:columns").firstChild.nodeValue,totalColumns=toolColumns*1+siteColumns*1,toolList=root.selectSingleNode("/rss/channel/msncp:gtl/msncp:networklists/msncp:toollist"),toolListTools=toolList.childNodes,tLlength=toolList.childNodes.length,moreButtonContent=document.createElement("DIV");moreButtonContent.className="moreButton_content";moreButtonContent.id="moreButton_content";var moreColumn=document.createElement("DIV");moreColumn.className="more_contentColumn0";var toolLink,objLink,objImg,paragraphObj;for(index=1;index<tLlength;index++)if(toolListTools[index].nodeType==1&&toolListTools[index].nodeName=="msncp:tool"){var toolURL=toolListTools[index].selectSingleNode("./msncp:imagelink/msncp:link/msncp:url").firstChild.nodeValue+"",imgSrc=toolListTools[index].selectSingleNode("./msncp:imagelink/msncp:image/msncp:src").firstChild.nodeValue+"",width=toolListTools[index].selectSingleNode("./msncp:imagelink/msncp:image/msncp:width").firstChild.nodeValue,height=toolListTools[index].selectSingleNode("./msncp:imagelink/msncp:image/msncp:height").firstChild.nodeValue,title=toolListTools[index].selectSingleNode("./msncp:imagelink/msncp:image/msncp:alternatetext").firstChild.nodeValue+"",visibleText=toolListTools[index].selectSingleNode("./msncp:imagelink/msncp:link/msncp:text").firstChild.nodeValue+"";toolLink=document.createElement("DIV");toolLink.className="more_contentToolLink";toolLink.innerHTML="<a href='"+toolURL+"'><img src='"+imgSrc+"' width='"+width+"' height='"+height+"' title='"+title+"' border='none'/>"+" "+visibleText+"</a>";moreColumn.appendChild(toolLink)}var objMore=document.getElementById("moreButton_contentModule");moreButtonContent.appendChild(moreColumn);var siteList=root.selectSingleNode("/rss/channel/msncp:gtl/msncp:networklists/msncp:sitelist"),siteListTools=siteList.childNodes,sLength=siteList.childNodes.length,moreSiteColumn=document.createElement("DIV"),realIndex=1;for(index=1;index<sLength;index++)if(siteListTools[index].nodeType==1&&siteListTools[index].nodeName=="msncp:site"){toolLink=document.createElement("DIV");toolLink.className="more_contentSiteLink";objLink=document.createElement("a");objLink.href=siteListTools[index].selectSingleNode("./msncp:linkicon/msncp:link/msncp:url").firstChild.nodeValue;objLink.innerHTML=siteListTools[index].selectSingleNode("./msncp:linkicon/msncp:link/msncp:text").firstChild.nodeValue;toolLink.appendChild(objLink);moreSiteColumn.appendChild(toolLink);if(realIndex%siteColumns==0){moreSiteColumn.className="more_contentColumn"+realIndex/siteColumns;moreButtonContent.appendChild(moreSiteColumn);moreSiteColumn=document.createElement("DIV")}realIndex++}var objMore=document.getElementById("moreButton_contentModule");objMore.className="moreButton_contentModule";objMore.appendChild(moreButtonContent)}catch(e){}}function loadXMLDoc(url){xmlhttp=null;if(window.XMLHttpRequest)xmlhttp=new XMLHttpRequest;else if(window.ActiveXObject)xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");if(xmlhttp!=null){xmlhttp.onreadystatechange=state_Change;xmlhttp.open("GET",url,true);xmlhttp.send(null)}}function state_Change(){if(xmlhttp.readyState==4)if(xmlhttp.status==200)BuildMoreButtonContent(xmlhttp.responseText)}function WriteZHeader(ppFlag){var textClass1="NwType1Norm",textClass2="NwType1Bld",widthClass="TDType2CMnWt3",divClass="DvType1CntrMn",tblClass="",ver=getInternetExplorerVersion(),MSNLogoImg,GameImg,GameImgMargin,spanClass="";if(ver>6){MSNLogoImg=g_MsArcPt1PNG;GameImg=g_MsArcPt2PNG;GameImgMargin="height:23px; margin-top:33px;";spanClass="SpanGlow"}else{MSNLogoImg=g_MsArcPt1;GameImg=g_MsArcPt2;GameImgMargin="height:37px; margin-top:19px;"}if(ver==-1)spanClass="SpanGlow";document.write("<div id='ZCHead' class='ZChead_c'>");document.write("<span id='mainPop' class ='"+spanClass+"' style='"+g_MsnLogoRightMargin+"'>");document.write("<span id = 'MSNLogoSpan'>");document.write("<a href='"+g_MsnBaseGLink+"'>");document.write("<span id='MSNLogo' border='0' style='vertical-align:bottom; margin-top:20px;"+g_MsnLogoMargin+"' class='"+MSNLogoImg+"'></span>");document.write("</a>");document.write("</span>");document.write("<span id='MSNGames' style='height:65px;"+g_MsnGamesLogoMargin+"'>");document.write("<a href='"+g_MsnGamesGLink+"'>");document.write("<span id='GamesLogo' border='0' style='vertical-align:bottom;width:84px;"+GameImgMargin+"' class='"+GameImg+"'></span>");document.write("</a>");document.write("</span>");document.write("</span>");document.write("<span id='MSNSearch'>");document.write("<div id='SearchLinks'>");document.write("<a class='SearchLinkActive' href='javascript:ProcessGameSearch();'>Games</a>");document.write("<span class='SearchLinkSeperator'><img src='/images/v12/en-us/Theme1/search/pipe_1x13.gif'/></span>");document.write("<a class='SearchLink' href='javascript:ProcessLiveSearch();'>Web</a>");document.write("</div>");document.write("<table id='SearchTable' cellpadding='0' cellspacing='0'>");document.write("<tr>");document.write("<td id='SearchTableLeftEdge'> </td>");document.write("<td id='SearchTableContent'>");document.write("<span id='SearchLogoBox'><a href='javascript:ProcessLiveSearch();' title='"+g_SearchLogoText+"' id='SearchLogo' tabindex='3'> </a></span>");document.write("<div id='SearchInputBox'>");document.write("<span id='SearchButtonBox'><a href='javascript:ProcessGameSearch();' title='"+g_SearchButtonText+"' id='SearchButton' tabindex='2'> </a></span>");document.write("<input name='q' id='q' title='"+g_SearchBoxText+"' type='text' maxlength='1024' tabindex='1' />");document.write("</div>");document.write("</td>");document.write("<td id='SearchTableRightEdge'> </td>");document.write("</tr>");document.write("</table>");document.write("<input type='hidden' name='FORM' value='"+g_MHFormValue+"' />");document.write("</span>");if(ppFlag!="True"){document.write("<span id='zSignIn'>");document.write("<span id='zSignInText'>");document.write("<font class='NwType2Bld' style='vertical-align:middle;float:right;'>");if(g_ZDispGreet)if(g_ZHLogin!="")document.write(g_PlrGreet+g_ZHLogin+g_PlrGreetR+"</font>");else document.write(g_PlrAnnonGreet+"</font>");document.write("<br />");document.write("<font class='NwType1Norm' style='vertical-align:middle;float:right;'>");var badgeCount=GetSubkey(g_MiscSessionData,g_UserBadgeCountSubkey);if(g_ZHLogin!=""&&badgeCount!=null&&badgeCount!=""){document.write("You have ");document.write("<a class='LnkType1Norm' style='font-weight:bold;' href='");if(badgeCount=="0")document.write(g_badgeScarabLinkSignedOut);else document.write(g_badgeScarabLinkSignedIn);document.write("'>"+badgeCount+" badge");if(badgeCount!="1")document.write("s");document.write("</a>!")}else{document.write("Start ");document.write("<a class='LnkType1Norm' style='font-weight:bold;' href='"+g_badgeScarabLinkSignedOut+"'>");document.write("earning badges");document.write("</a> now!")}document.write("</font>");document.write("<span id='zBadgeIcon' class='"+g_BdgIco+"' ></span>");document.write("</span>");document.write("</span>")}document.writeln("</div></div>");document.writeln("</div><div id='centralcontent' class='DvType1Cntr'><div class='"+divClass+"'>");var stripedPath=window.location.pathname,qs=window.location.search,dotLoc;if(stripedPath!=null){dotLoc=stripedPath.indexOf(".");if(dotLoc>0){stripedPath=stripedPath.substring(0,stripedPath.length-(stripedPath.length-dotLoc));stripedPath+=qs.replace("?","","g")}}if(g_aryZHNav!=null){document.writeln("<div id='ZHSiteNav'><table border='0' class='TblType2CntrMn'><tr><td class='TDType2CMnWt1'></td>");for(i=0;i<g_aryZHNav.length;i++){var isZHNavHot=GetRegExMatch(g_aryZHNav[i].HotUrl,stripedPath);document.writeln("<td class='"+tblClass);if(isZHNavHot)document.writeln("TDType1BG2Mn");else document.writeln("TDType1CMnMid");document.writeln(" "+widthClass+"'><a class='"+textClass2+" ");if(isZHNavHot)document.writeln("LnkType3MnBld1");else document.writeln("LnkType3MnBld2");document.writeln("' href='"+g_aryZHNav[i].Lnk+"' title=\""+g_aryZHNav[i].Alt+'">'+g_aryZHNav[i].Txt+"</a></td><td class='TDType2CMnWt2'></td>")}document.writeln("<td class='TDType1CMnLast'><div style='width:100%;text-align:right;'><table class='"+tblClass+"' style='float:right;'><tr>");document.writeln("<td class='TxtType0' style='color:#939393;text-align:right;'>"+g_ZonePlayerPop+g_UsrMsgR+"</td>");document.writeln("</tr></table></div></td><td class='TDType2CMnWt5'></td></tr></table></div>")}document.writeln("</div>");document.writeln('<DIV ID="DownlevelMessagePH" style="FONT-SIZE:8pt;COLOR:#FF0000;FONT-FAMILY:tahoma;background-color: #FFFFFF;text-align:center;"></DIV>');if(ppFlag!="True")document.writeln("<div id='MainContent' ><span id='MCR'><div id='MCRSpacer' style='width:160px;'>&nbsp;</div></span><span id='MCL'></FORM>")}function ProcessGameSearch(){document.MHform.submit()}function ProcessLiveSearch(){var searchText="",inputbox=document.getElementById("q");if(inputbox)searchText=inputbox.value;var queryString="cp="+g_MHCpValue+"&FORM="+g_MHFormValue+"&q="+searchText;if(g_SearchMkt!="")queryString=queryString+"&mkt="+g_SearchMkt;window.open(g_MHFormURL+"?"+queryString)}function WriteZFooter(ppFlag){if(ppFlag!="True"){document.writeln("</span><div style='clear:both;height:1px;'>&nbsp;</div></div>");var oSkyScraper=document.getElementById("VerticalBanner1"),MCR=document.getElementById("MCR"),MCL=document.getElementById("MCL");if(oSkyScraper!=null){MCR.appendChild(oSkyScraper);MCR.removeChild(MCR.firstChild)}else{MCR.style.width="0px";MCL.style.width="100%"}}var textClass="TxtType3";if(ppFlag=="True")textClass="TxtType3Fxd";document.writeln("<div id='TotalFooter'>");document.writeln("<div id='zFooter'><a class='"+textClass+" LnkType4FtrBld' href='"+g_ZFPhotoURL+"'>"+g_ZFPhotoTxt+"</a><div class='DvType2Gap2'></div></div>")}function WriteMSNFooter(ppFlag){var textClass="NwType1Norm";if(ppFlag=="True")textClass="NwType1NormFxd";var msnLinkObj,msnLinkValue="",commonStyleList=textClass+" LnkType4FtrNorm";msnLinkObj=g_FtrLnks_Left[0];msnLinkObj.addStyleToMsnLink(commonStyleList);msnLinkValue=msnLinkObj.getMsnLink();document.writeln("<div class='DvType3FtrLnk'>");document.writeln("<div class='SpType3FtrWt1'><div class='SpType3Wt2a'>"+msnLinkValue+"</div>");document.writeln("<div class='SpType3Wt2'>&nbsp;</div>");msnLinkObj=g_FtrLnks_Left[1];msnLinkObj.addStyleToMsnLink(commonStyleList);msnLinkValue=msnLinkObj.getMsnLink();document.writeln("<div class='SpType3Wt2a'>"+msnLinkValue+"</div>");document.writeln("<div class='SpType3Wt2'>&nbsp;</div>");msnLinkObj=g_FtrLnks_Left[2];msnLinkObj.addStyleToMsnLink(commonStyleList);msnLinkValue=msnLinkObj.getMsnLink();document.writeln("<div class='SpType3Wt2a'>"+msnLinkValue+"</div>");document.writeln("</div><div class='SpType3FtrWt4'>");if(g_FtrLnks_Right[0]!=null){msnLinkObj=g_FtrLnks_Right[0];msnLinkObj.addStyleToMsnLink(commonStyleList);msnLinkValue=msnLinkObj.getMsnLink();document.writeln("<div  class='SpType3Wt3a'>"+msnLinkValue+"</div>");document.writeln("<div class='SpType3Wt3'>&nbsp;</div>")}if(g_FtrLnks_Right[1]!=null){msnLinkObj=g_FtrLnks_Right[1];msnLinkObj.addStyleToMsnLink(commonStyleList);msnLinkValue=msnLinkObj.getMsnLink();document.writeln("<div  class='SpType3Wt3a'>"+msnLinkValue+"</div>");document.writeln("<div class='SpType3Wt3'>&nbsp;</div>")}if(ppFlag!="True"){if(g_FtrLnks_Right[2]!=null){msnLinkObj=g_FtrLnks_Right[2];msnLinkObj.addStyleToMsnLink(commonStyleList);msnLinkValue=msnLinkObj.getMsnLink();document.writeln("<div class='SpType3Wt3a'>"+msnLinkValue+"</div>");document.writeln("<div class='SpType3Wt3'>&nbsp;</div>")}if(g_FtrLnks_Right[3]!=null){msnLinkObj=g_FtrLnks_Right[3];msnLinkObj.addStyleToMsnLink(commonStyleList);msnLinkValue=msnLinkObj.getMsnLink();document.writeln("<div class='SpType3Wt3a'>"+msnLinkValue+"</div><script src='http://hp.msn.com/scr/op/ol-fdbkv3_r1.js'></script>");document.writeln("<div class='SpType3Wt3'>&nbsp;</div>")}if(g_FtrLnks_Right[4]!=null){msnLinkObj=g_FtrLnks_Right[4];msnLinkObj.addStyleToMsnLink(commonStyleList);msnLinkValue=msnLinkObj.getMsnLink();document.writeln("<div class='SpType3Wt3a'>"+msnLinkValue+"</div>");document.writeln("<div class='SpType3Wt3'>&nbsp;</div>")}if(g_FtrLnks_Right[5]!=null){msnLinkObj=g_FtrLnks_Right[5];msnLinkObj.addStyleToMsnLink(commonStyleList);msnLinkValue=msnLinkObj.getMsnLink();document.writeln("<div class='SpType3Wt3a'>"+msnLinkValue+"</div>")}}document.writeln("</div></div><div class='DvType2Gap1'>&nbsp;</div><div class='"+g_MsLogoClass+"'><img src='"+g_MsLogoPt+"' /></div></div></div></div>")}function bookmarkSite(fromGame){var url="";if(fromGame)url=g_GameUrl;else url=location.href;if(document.all)window.external.AddFavorite(url,document.title);else if(window.sidebar)window.sidebar.addPanel(document.title,url,"");if(fromGame)OmnitureTrackBookMark()}function OmnitureTrackBookMark(){s.pageName="link: GameAddToFavourite";s.t()}function CTagIt(eventName){var o=new Image,ZoneUrl=document.URL,TPUrl="http://"+document.domain,ZoneDir=ZoneUrl.substring(TPUrl.length);if(ZoneDir.lastIndexOf(".")>-1)TPUrl+=ZoneDir.substring(0,ZoneDir.lastIndexOf("."));else TPUrl+=ZoneDir;o.src="http://"+g_TaxonomyServer+"/c.gif?NA=1127&NC=1222&PI=7333&DI=554&PS=7446&TP="+TPUrl+"/"+escape(eventName)+".htm"}function DW(sS){document.write(sS)}function ImgW(name,number,alt,before,after){var t,w,h;t=name.split("_");if(name.length==0)DW('<img border=0 alt="'+alt+'" src="'+name+'"/>');w=t[t.length-3];h=t[t.length-2];DW('<div style="margin-right:3px;margin-bottom:2px;position:relative;overflow:hidden;width:'+w+"px;height:"+h+'px;">');DW(before!=null?before:"");DW('<img border=0 alt="'+alt+'" style="left:-'+w*number+'px;position:relative;" src="'+name+'"/>');DW(after!=null?after:"");DW("</div>")}function getInternetExplorerVersion(){var rv=-1;if(navigator.appName=="Microsoft Internet Explorer"){var ua=navigator.userAgent,re=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");if(re.exec(ua)!=null)rv=parseFloat(RegExp.$1)}return rv}function GetRegExMatch(str1,str2){str1=str1.toLowerCase();str2=str2.toLowerCase();var pos=str1.lastIndexOf("/"),part1=str1.slice(0,pos+1),part2=str1.slice(pos+1,str1.length),regexString=part1+".*"+part2,matchStr=str2.match(regexString);if(matchStr==null)return false;else return true}function SetBrowserHomePage(homePageURL){var ver=getInternetExplorerVersion();switch(ver){case -1:alert(g_setHomePageMsg);break;default:document.body.setHomePage(homePageURL);break}}