var pathUrl=getPathUrl(),rootUrl=getRootUrl();window.trackEvent=trackEvent;var m_Dis="disabled",m_Exp="expand",m_Hilite="hilite",m_Img="img",m_Lin="line",m_Arw=String.fromCharCode(125),m_Keys="",m_Dom=new ActiveXObject("Microsoft.xmldom"),m_Active,m_Body,m_Doc,m_ItemLength,m_Popup,m_Root,UI={Page:0,DropPoint:1,Column:2,ColumnSizer:3,ColumnGrabber:4,Module:5,ModuleGrabber:6,ModuleHeader:7,Promo:8,Menu:9},UIM={Wide:0,Sticky:1},m_Src=null,m_SrcCoords=null,m_Cap=null,m_SrcHasTag=false,m_DrpPt=null,m_DrpAdj=null,m_DrpPos=null,m_Bod=window.document.body,m_MoveType,m_MoveIntoNew=false,m_ColType,m_str=window.globalstr,m_x=0,m_y=0,m_sL=0,m_sT=0,m_sH=0,m_sW=0,m_zD=25,m_zC=50,m_cntCol=0,m_cntMod=0,m_DialogOpen=false,m_rowNarrow=0,m_rowWide=2,m_HiliteCssText="filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1, opacity=0.25);",m_collapsedStyleStr="collapsedStyle",updateE=null,argCnt=0,dirty=true,pageTable=null,m_CursorMove="move",m_CursorColResize=ieVersion()>=6?"col-resize":"w-resize",m_LastEl=null,m_LastWid=null,m_Widgets=new Array(6),m_D="_down",m_O="_over";m_Widgets[0]=new Widget("col_grab",null,null);m_Widgets[1]=new Widget("col_size",null,null);m_Widgets[2]=new Widget("menu_wid",null,null);m_Widgets[3]=new Widget("mod_grab",null,null);m_Widgets[4]=new Widget("btn_go","go",".gif");m_Widgets[5]=new Widget("page_wid",null,null);var baseScroll=2,hoverScroll=1,goRightMark=40,H_TOPIC="",H_KEY="",L_H_TEXT="",H_FILTER="",H_BRAND="",L_CONTACTUS_URL="",bSearch=false,H_TARG="",H_VER="2.6",h_win,H_OTHER="",bResize=true,bOptNoResize=false,InlineModules=new Array,InlineModulesCount=-1;function doClick_base(){if(typeof caughtByBase!="undefined")caughtByBase=(new Date).getTime();var baseTag=element.document.body.children[0],src=window.event.srcElement,attr=null;while(true){if(src===null)return;switch(src.tagName){case "A":case "AREA":attr=src.getAttribute("href2");if(attr===null||attr.length===0){attr=src.getAttribute("href");if(attr!==null&&attr.indexOf(window.location.href.substr(0,window.location.href.length-window.location.hash.length)+"#")===0)return}else src.setAttribute("href",attr);break}if(attr!==null)break;src=src.parentElement}}function trackEvent(link,ev,cm,ce,hl,more){var hardCodedURL="http://g.msn.com/_0USMY/1002",cTag=element.document.images[0],baseTag=element.document.body.children[0];if(cTag===null)return;var s;if(link===null)s=hardCodedURL+"?ev=";else s=hardCodedURL+"?http://c.msn.com/c.gif&&ev=";s+=ev+"&cm="+cm+"&ce="+ce+"&hl="+hl;if(more)s+=more;cTag.setAttribute("src",s);if(baseTag.debug=="true")window.alert("trackEvent: "+cTag.getAttribute("src"))}function getPathUrl(){var s=getRootUrl(),p=window.location.pathname;if(p!="/"){var parts=p.split("/");for(var i=1;i<parts.length;i++){var pt=parts[i];if(pt.indexOf(".")==-1)s+=pt+"/"}}return s}function getRootUrl(){var l=window.location,s=l.protocol+"//"+l.host;if(l.port.length>0)s+=":"+l.port;return s+"/"}function doClick_menu(){menuShow()}function doKeyPress(){if(window.event.keyCode==13)menuShow()}function menuHide(){setActiveItem(null);if(m_Popup&&m_Popup.isOpen)m_Popup.hide();m_Active=m_Body=m_Doc=m_Popup=null}function menuShow(){var reqMenuId=menuId,mIdPrefix=uniqueID+"_";if(menuId===null)reqMenuId="Main";m_Root=getRoot();if(m_Root===null||m_Popup&&m_Popup.isOpen)return;m_Active=null;if(m_Popup&&m_Popup.isOpen)return;m_Popup=window.createPopup();if(window.getMenuXML){var o=window.getMenuXML(m_Root);menuData=o.xml;reqMenuId=o.menuId}if(!menuData)return;var item,name,tip,action,disabled,icon,menid,text,key,clsImage,clsDisabled,itemCount=0;m_Doc=m_Popup.document;m_Doc.open();m_Doc.write("<html><head>"+getDocCssLinks()+'</head><body class="menu" ondrag="return false;" onscroll="return false;" onselectstart="return false;">');m_Dom.loadXML(menuData);var s='<table id="tbl" cellpadding="3" cellspacing="0" border="0"><col width="22" /><col width="100%" /><col width="20" align="right"/><tbody>';if(m_Dom.documentElement){var node=m_Dom.documentElement.selectSingleNode("//menus/menu[@id='"+reqMenuId+"']"),items=node.childNodes;m_Keys="";m_ItemLength=-1;for(var i=0;i<items.length;i++){item=items(i);if(item.nodeType!=1)continue;name=item.nodeName;clsDisabled=" ";clsImage=' class="'+m_Img+'" ';tip=new String(item.getAttribute("tip"));tip=tip=="null"?"":tip;action=item.getAttribute("action");disabled=item.getAttribute("disabled")=="true";icon=item.getAttribute("icon");menid=item.getAttribute("menuId");text=new String(item.getAttribute("text"));text=text=="null"?"":text;text=text.replace("&&","^^^");var pos=text.indexOf("&");if(pos!=-1&&text.length>=pos+2){key=text.substr(pos+1,1);if(key!=" "){text=text.substr(0,pos)+"<u>"+key+"</u>"+text.substr(pos+2);m_Keys+=key.toUpperCase()}}text=text.replace("^^^","&");switch(name){case "item":m_ItemLength++;itemCount++;s+='<tr id="'+mIdPrefix+m_ItemLength+'"';if(disabled){clsDisabled=' class="'+m_Dis+'" ';clsImage=' class="'+m_Img+" "+m_Dis+'" '}else if(action)s+=' action="'+action+'"';s+=' tip="'+tip+'"';s+=">";s+="<td"+clsImage+">"+getIconHTML(icon)+"</td><td"+clsDisabled+'colspan="2" nowrap="nowrap">'+text+"</td></tr>";break;case "line":s+='<tr class="'+m_Lin+'"><td class="'+m_Img+'"></td><td colspan="2" class="'+m_Lin+'"></td></tr>';break;case "sub":m_ItemLength++;itemCount++;s+='<tr id="'+mIdPrefix+m_ItemLength+'" tip="'+tip+'" class="'+menuClass+'" menuId="'+menid+'"><td class="'+m_Img+'">'+getIconHTML()+"</td>";s+="<td>"+text+'</td><td class="'+m_Exp+'">'+m_Arw+"</td></tr>";break}}}if(itemCount===0)s+='<tr><td class="'+m_Dis+'">'+getIconHTML()+'</td><td class="'+m_Dis+'" colspan="3" nowrap="nowrap">&nbsp;</td></tr>';s+="</tbody></table>";m_Doc.write(s);m_Doc.write("</body></html>");m_Body=m_Doc.body;m_Body.onmouseover=popMouseOver;m_Body.onmouseup=popMouseUp;m_Body.onkeydown=popKeyDown;var trs=m_Doc.getElementsByTagName("TR");for(var j=0;j<trs.length;j++){var tr=trs(j);if(tr.className.indexOf(menuClass)===0){tr.addBehavior(menuHtc);tr.menuData=menuData}}var elTbl,elTr,elTd1,elTd2,elTmp,pW,pH;elTbl=window.document.createElement("TABLE");elTbl.border="0";elTbl.cellPadding="0";elTbl.cellSpacing="0";elTbl.width="150";elTr=elTbl.insertRow();elTd1=elTr.insertCell();elTd2=elTr.insertCell();elTd1.className="menu";elTd1.innerHTML=s;elTd2.width="100%";elTmp=window.document.body.insertAdjacentElement("beforeEnd",elTbl);pW=elTmp.offsetWidth;pH=elTmp.offsetHeight;elTmp.removeNode(true);var pEl,pL,pT;if(element.className.indexOf(menuClass)===0){pEl=element;pL=element.offsetWidth+1;pT=-1}else{var root=getRoot();if(root===null)return;var el=root;if(el.tagName=="A"&&el.children[0]&&el.children[0].tagName=="IMG"){var win=getWindow();el=win.event.srcElement;if(el.children[0]&&el.children[0].tagName=="IMG")el=el.children[0]}pEl=el.document.body;pL=0;pT=el.offsetHeight+2;while(el.tagName!="BODY"){pT+=el.offsetTop+el.clientTop;pL+=el.offsetLeft+el.clientLeft;el=el.offsetParent}pT-=pEl.scrollTop;pL-=pEl.scrollLeft;if(menuAlign=="right")pL-=pW-root.offsetWidth-1;if(menuVAlign=="top")pT-=pH+root.offsetHeight+1}m_Popup.show(pL-1,pT,pW,pH,pEl);setActiveItem(m_Doc.getElementById(mIdPrefix+0))}function popMouseOver(){var el=m_Doc.parentWindow.event.srcElement,mIdPrefix=uniqueID+"_";while(el&&el.id.indexOf(mIdPrefix)!==0)el=el.parentElement;if(el&&el.className.indexOf(m_Lin)===0)return;setActiveItem(el)}function popMouseUp(){if(!m_Active)return;if(m_Active.action)fireMenu(m_Active.action);else m_Active.click()}function popKeyDown(){var evt=m_Doc.parentWindow.event;evt.returnValue=false;if(evt.altKey||evt.ctrlKey||evt.shiftKey)return;var dir=null,code=evt.keyCode;switch(code){case 27:menuHide();return;case 37:case 100:if(element.className.indexOf(menuClass)===0)menuHide();return;case 39:case 102:case 13:if(m_Active)if(code==13&&m_Active.action)fireMenu(m_Active.action);else m_Active.click();return;case 38:case 104:dir=-1;break;case 40:case 98:dir=1;break;default:var key=String.fromCharCode(code);if(m_Keys.indexOf(key)!=-1){var els=m_Doc.getElementsByTagName("U"),e,tr;for(var i=0;i<els.length;i++){e=els[i];if(e.innerText.toUpperCase()==key){tr=e.parentElement.parentElement;break}}if(tr){setActiveItem(tr);if(tr.action)fireMenu(tr.action)}}return}if(dir){if(m_Active){var src=m_Active.id.substring(m_Active.id.lastIndexOf("_")+1),tgt=parseInt(src)+dir;if(tgt<0)tgt=m_ItemLength;else if(tgt>m_ItemLength)tgt=0}else if(dir==-1)tgt=m_ItemLength;else tgt=0;var mIdPrefix=uniqueID+"_";setActiveItem(m_Doc.getElementById(mIdPrefix+tgt))}}function fireMenu(s){var w=getWindow(),main=w.document.getElementById("main");if(main)main.menuHide();eval("w."+s)}function hilite(el,bOn){var names=el.className.split(" ");el.className=names[0]+(bOn?" "+m_Hilite:"")}function getIconHTML(s){if(!s||s==="")return '<div class="placeholder"></div>';else return '<img border="0" height="16" width="16" src="'+s+'" />'}function getDocCssLinks(){var col=m_Root.document.getElementsByTagName("LINK"),s="";for(var i=0;i<col.length;i++)s+='<link rel="stylesheet" type="text/css" href="'+col[i].href+'" />';return s}function getRoot(){var src=window.event.srcElement;while(src&&src.className.indexOf(menuClass)!==0)src=src.parentElement;return src}function getWindow(){var w=window;while(w!=w.parent)w=w.parent;return w}function setActiveItem(el){var s;if(el&&el==m_Active)return;if(m_Active){hilite(m_Active,false);if(m_Active.className.indexOf(menuClass)===0)try{m_Active.menuHide()}catch(e){}}if(el){s=el.tip;hilite(el,true);if(m_Doc.parentWindow.event&&m_Doc.parentWindow.event.type=="mouseover")el.click()}m_Active=el;var w=getWindow();w.status=s?s:""}function getColCount(){doCount();return m_cntCol}function getModCount(){doCount();return m_cntMod}function getColorTheme(){var e=element.document.getElementById("css"),h=e.href,a=h.split("/"),s=a[a.length-2];return s}function doDocReady(){window.page=element;pageTable=element.children[0];autoSize(false)}function ieVersion(){var ua=window.navigator.userAgent,msie=ua.indexOf("MSIE ");if(msie>0)return parseFloat(ua.substring(msie+5,ua.indexOf(";",msie)));return 0}function doCount(){if(!dirty)return;var r,c,i,t,j;m_cntCol=m_cntMod=0;for(r=0;r<pageTable.rows.length;r++){c=pageTable.rows[r].cells;for(i=0;i<c.length;i++)if(c[i].ui==UI.Column){if(c[i].uim!=UIM.Wide)m_cntCol++;t=c[i].getElementsByTagName("TABLE");for(j=0;j<t.length;j++)if(t[j].ui==UI.Module)m_cntMod++}}dirty=false}function setHomePage(){var el=window.document.getElementById("hp");if(el){var niceUrl=window.location.href,fragPos=niceUrl.indexOf("#");if(fragPos>0)niceUrl=niceUrl.substr(0,fragPos);el.setHomePage(niceUrl)}}function changeColors(){var url=relUrl("/colortheme.armx?page="+pageIndex+"&tok="+window.globalstr._token),ret=showDialog(url,window.document);if(ret&&ret!==colorTheme){window.location.reload();return}}function addPage(){if(pageCount>=pageMax){window.alert(window.globalstr._warn_max_pages);return}var url=relUrl("/newpage.armx")+"?tok="+window.globalstr._token,ret=showDialog(url,window.document);if(ret&&ret!=pageIndex)window.navigate("/?page="+ret)}function removePage(){if(pageCount==1)window.alert(window.globalstr._last_page_delete);else if(window.confirm(window.globalstr._confirm_page_delete)){var url=relUrl("/updatehandler.armx?tok="+window.globalstr._token+"&page="+pageIndex+"&x0="+encodeURIComponent("p[position()="+pageIndex+"]"));window.navigate(url)}}function renamePage(){var url=relUrl("/renamepage.armx?page="+pageIndex),ret=showDialog(url,window.document);if(ret){url=relUrl("/updatehandler.armx?tok="+window.globalstr._token+"&page="+pageIndex+"&xv0="+encodeURIComponent(encodeURIComponent("p[position()="+pageIndex+"]/@t")+"&"+encodeURIComponent(ret)));window.navigate(url)}}function coerceInt(i){i=parseInt(i);return i.toString()=="NaN"?0:i}function getCoords(el){if(!el)return null;var c=new Object,s=el.currentStyle;c.height=el.offsetHeight+coerceInt(s.marginTop)+coerceInt(s.marginBottom);c.width=el.offsetWidth+coerceInt(s.marginLeft)+coerceInt(s.marginRight);c.left=0;c.top=0;while(el&&el.tagName!="BODY"){c.left+=el.offsetLeft;c.top+=el.offsetTop;el=el.offsetParent}c.bottom=c.top+c.height;c.right=c.left+c.width;return c}function validToCapture(el){if(!el)return null;var ignoreTags="B,H1,H2,H3,H4,H5,H6,I",goodEl=ignoreTags.indexOf(el.tagName)==-1;while(!goodEl){el=el.parentElement;goodEl=ignoreTags.indexOf(el.tagName)==-1}if(el.ui==UI.ModuleGrabber||el.ui==UI.ModuleHeader||el.ui==UI.ColumnGrabber||el.ui==UI.ColumnSizer)return el;return null}function doMouseCapture(){document.selection.clear();if(window.event.button!=1)return;m_Src=validToCapture(window.event.srcElement);if(m_Src===null)return;m_sL=m_Bod.scrollLeft;m_sT=m_Bod.scrollTop;m_sH=m_Bod.scrollHeight;m_sW=m_Bod.scrollWidth;if(m_Src.ui==UI.ModuleGrabber||m_Src.ui==UI.ModuleHeader){m_MoveType=0;m_Src=getParentUI(m_Src,UI.Module);m_ColType=m_Src.parentElement.uim;m_SrcCoords=getCoords(m_Src);m_x=window.event.clientX-m_Src.offsetLeft;m_y=window.event.clientY-m_Src.offsetTop;m_Cap=document.createElement("DIV");m_Cap.ui=m_Src.ui;m_Cap.uim=m_Src.uim;m_Cap.className="mod_cap"+getWidthClass(m_Src.parentElement);m_SrcHasTag=false;var tags,nextTag=null,currentTag=null,parentTag=null,tagsTBody=m_Src.getElementsByTagName("TBODY");if(tagsTBody!=null&&tagsTBody.length>0){tags=tagsTBody[0].getElementsByTagName("STYLE");m_SrcHasTag=tags!=null&&tags.length>0;if(m_SrcHasTag){currentTag=tags[0];parentTag=tags[0].parentNode;nextTag=currentTag.nextSibling;tags[0].removeNode(true)}}m_Cap.insertAdjacentElement("beforeEnd",m_Src.cloneNode(true));m_Cap.style.zIndex=m_zC;m_Cap.style.left=m_Src.offsetLeft;m_Cap.style.top=m_Src.offsetTop;m_Cap.style.width=m_Src.offsetWidth;pageTable.insertAdjacentElement("afterEnd",m_Cap);capture(true,m_CursorMove);if(m_SrcHasTag)parentTag.insertBefore(currentTag,nextTag);m_Src.style.visibility="hidden"}else if(m_Src.ui==UI.ColumnGrabber){m_Src=getParentUI(m_Src,UI.Column);if(m_Src===null)return;m_MoveType=1;m_ColType=m_Src.uim;m_SrcCoords=getCoords(m_Src);m_y=window.event.clientY-m_SrcCoords.top;m_x=window.event.clientX-m_SrcCoords.left;m_Cap=document.createElement("DIV");m_Cap.className="col_cap";var t=document.createElement("TABLE");m_Cap.insertAdjacentElement("beforeEnd",t);t.border="0";t.cellPadding="2";t.cellSpacing="0";var tr=t.insertRow();tr.insertAdjacentElement("beforeEnd",m_Src.cloneNode(true));m_Cap.style.zIndex=m_zC;m_Cap.style.left=m_SrcCoords.left;m_Cap.style.top=m_SrcCoords.top;m_Cap.style.width=m_Src.offsetWidth;m_Cap.style.height=m_Src.offsetHeight;pageTable.insertAdjacentElement("afterEnd",m_Cap);capture(true,m_CursorMove);m_Src.style.visibility="hidden"}else if(m_Src.ui==UI.ColumnSizer){m_MoveType=2;m_Cap=m_Src;m_Src=m_Src.previousSibling;m_SrcCoords=getCoords(m_Src);m_x=m_SrcCoords.width+m_SrcCoords.left+window.event.offsetX+2;window.MyWidgetDisabled=true;capture(true,m_CursorColResize)}}function capture(bSet,cursorName){if(bSet){if(m_Cap){m_Cap.style.cursor=cursorName;window.MyWidgetDisabled=true;m_Cap.setCapture(false)}}else{if(m_Cap)m_Cap.style.cursor=cursorName;window.MyWidgetDisabled=false;element.document.releaseCapture()}}function getWidthClass(el){var names=el.className.split(" "),name=names[names.length-1];if(name=="col_s"||name=="col_m"||name=="col_l"||name=="col_xl")return " "+name;return ""}function fixPromos(){var i,j,k,t,divs=pageTable.getElementsByTagName("DIV"),prPos=new Array,prPosI=0,prCoop=new Array,prCoopI=0;for(i=0;i<divs.length;i++)if(divs[i].ui==UI.Promo)if(divs[i].loc.indexOf(".")<0){prCoop[prCoopI]=divs[i];prCoopI++}else{prPos[prPosI]=divs[i];prPosI++}var c=pageTable.rows[m_rowNarrow].cells,mods=new Array,cols=new Array,afterMods=new Array,colI=0;if(prPos.length>0||prCoop.length>0){for(i=0;i<c.length;i++)if(c[i].ui==UI.Column){var modI=0;cols[colI]=c[i].children[c[i].children.length-1];mods[colI]=new Array;afterMods[colI]=new Array;t=c[i].getElementsByTagName("TABLE");for(j=0;j<t.length;j++)if(t[j].ui==UI.Module){mods[colI][modI]=t[j];afterMods[colI][modI]=t[j];modI++}colI++}if(pageTable.rows[m_rowWide]!==undefined){cols[colI]=pageTable.rows[m_rowWide].cells[0];mods[colI]=new Array;afterMods[colI]=new Array;t=pageTable.rows[m_rowWide].cells[0].getElementsByTagName("TABLE");for(j=0;j<t.length;j++)if(t[j].ui==UI.Module){mods[colI][modI]=t[j];afterMods[colI][modI]=t[j];modI++}}for(i=0;i<prPos.length;i++){var loc=prPos[i].loc.split("."),tCol=parseInt(loc[0]),tMod=parseInt(loc[1]);if(mods[tCol]!==null)if(mods[tCol][tMod]!==undefined)mods[tCol][tMod].insertAdjacentElement("beforeBegin",prPos[i]);else if(cols[tCol]!==undefined)cols[tCol].insertAdjacentElement("beforeBegin",prPos[i]);else cols[colI].insertAdjacentElement("afterBegin",prPos[i])}for(i=0;i<prCoop.length;i++){var found=false;for(j=0;j<mods.length;j++){for(k=0;k<mods[j].length;k++)if(mods[j][k].id==prCoop[i].t){found=true;if(prCoop[i].loc==1){afterMods[j][k].insertAdjacentElement("afterEnd",prCoop[i]);afterMods[j][k]=prCoop[i]}else mods[j][k].insertAdjacentElement("beforeBegin",prCoop[i]);break}if(found)break}if(!found)prCoop[i].parentElement.removeChild(prCoop[i])}}}function doMouseMove(){if(!m_Src)return;var sL=m_Bod.scrollLeft,sT=m_Bod.scrollTop,sbX=0,sbY=0,m=new Object;m.x=window.event.clientX+sL;m.y=window.event.clientY+sT;var br=new Object;br.t=0;br.l=0;br.r=m_sW;br.b=m_sH;var vr=new Object;vr.l=m_Bod.offsetLeft+sL;vr.t=m_Bod.offsetTop+sT;vr.r=m_Bod.offsetWidth+sL;vr.b=m_Bod.offsetHeight+sT;if(m_Bod.clientWidth!=m_Bod.scrollWidth)vr.b-=25;if(m_Bod.clientHeight!=m_Bod.scrollHeight)vr.r-=25;if(m_Src.ui==UI.Module)if(m.y<=vr.t&&vr.t!==0)sbY=-25;else if(m.y>=vr.b)sbY=25;if(m_Src.ui==UI.Column||m_Src.ui==UI.Module&&m_Cap.uim!=UIM.Wide)if(m.x<=vr.l&&vr.l!==0)sbX=-25;else if(m.x>=vr.r)sbX=25;switch(m_MoveType){case 0:case 1:if(m_Cap){var left=m.x+sbX-m_x-m_sL,top=m.y+sbY-m_y-m_sT;if(m_MoveType===0){var clip=getClip(left,m_Cap.offsetWidth,top,m_Cap.offsetHeight,Math.max(br.r,vr.r),Math.max(br.b,vr.b));m_Cap.style.clip=clip}m_Cap.style.left=Math.min(left,br.r);if(m_MoveType===0)m_Cap.style.top=Math.min(top,br.b);showDropPoint(m.x,m.y);sbX=m.x>br.r?0:sbX;sbY=m.y>br.b?0:sbY}break;case 2:updateColumnSize(m_Src,m_SrcCoords,m.x-m_x);break}window.scrollBy(sbX,sbY)}function updateColumnSize(col,coords,delta){var w0=col.width,cls=col.className.split(" ")[0],w=Math.max(getColMinWidth(col),coords.width+delta);if(w!=w0&&w>0){if(w<251)cls+=" col_s";else if(w<309)cls+=" col_m";else if(w<361)cls+=" col_l";else cls+=" col_xl";col.className=cls;col.width=w;return w}return null}function getClip(left,width,top,height,rEdge,bEdge){var t,r,b,l;t=r=b=l="auto";var right=left+width,bottom=top+height;if(right>rEdge)r=Math.max(0,width-right+rEdge);if(bottom>bEdge)b=Math.max(0,height-bottom+bEdge);return "rect("+t+" "+r+" "+b+" "+l+")"}function getColMinWidth(col){var p=coerceInt(col.currentStyle.paddingLeft)+coerceInt(col.currentStyle.paddingRight),w=col.clientWidth+p,t=col.children;for(var j=0;j<t.length;j++)w=Math.max(w,t[j].scrollWidth+p);return w!=col.clientWidth+p?w:null}function showDropPoint(mX,mY){if(!m_DrpPt){m_DrpPt=element.document.getElementById("page_drop");if(!m_DrpPt)return}var iRow=m_Cap.uim==UIM.Wide?m_rowWide:m_rowNarrow,iCol=-1,coords=getCoords(pageTable.rows[iRow]),c=pageTable.rows[iRow].cells,rightEdge=0,nextCol;m_MoveIntoNew=false;if(m_MoveType===0&&mX<coords.left)return;for(var i=0;i<c.length;i+=2)if(c(i).ui==UI.Column&&c(i).uim===m_ColType){coords=getCoords(c(i));rightEdge=coords.right;nextCol=c(i+1);if(nextCol&&nextCol.ui==UI.ColumnSizer)rightEdge+=nextCol.clientWidth;if(mX>=coords.left&&mX<=rightEdge){m_DrpAdj=c(i);iCol=i;if(m_MoveType==1)m_DrpPos=mX<coords.left+coords.width/2?"beforeBegin":"afterEnd";break}}if(m_MoveType===0)if(iCol!=-1){var kids=c(iCol).children;m_DrpPos=mY>coords.top+coords.height/2?"beforeEnd":"afterBegin";var a,ac,p;for(i=0;i<kids.length;i++)if(kids[i].ui==UI.Module){a=kids[i];var midPoint=a.offsetTop+(a.offsetHeight+coerceInt(a.currentStyle.marginBottom))/2,botPoint=a.offsetTop+a.offsetHeight+coerceInt(a.currentStyle.marginBottom);p=mY<midPoint?"beforeBegin":"afterEnd";if(mY>=a.offsetTop&&mY<=botPoint){m_DrpAdj=a;m_DrpPos=p;break}}}else if(c.length>=3&&columnCount<columnMax){var lastSizer=c(c.length-2),lastSizerCoords=getCoords(lastSizer);if(mX>lastSizerCoords.right){m_DrpPos="afterEnd";m_DrpAdj=lastSizer;coords=lastSizerCoords;m_MoveIntoNew=true}}if(m_DrpPos){var s=m_DrpPt.style;s.zIndex=m_zD;if(m_MoveType===0&&m_MoveIntoNew===false){if(m_DrpAdj.ui==UI.Module)s.top=m_DrpPos.indexOf("End")>0?m_DrpAdj.offsetTop+m_DrpAdj.offsetHeight+coerceInt(m_DrpAdj.currentStyle.marginBottom):m_DrpAdj.offsetTop;else{coords=getCoords(m_DrpAdj);if(m_DrpPos.indexOf("End")>0)s.top=Math.min(mY,coords.bottom);else s.top=Math.max(mY,coords.top)}s.left=coords.left;s.width=coords.width;s.height=2}else{coords=getCoords(m_DrpAdj);s.top=coords.top;s.height=coords.height;s.left=m_DrpPos.indexOf("End")>0?coords.right:coords.left;s.width=2}s.position="absolute";s.display="block"}}function doMouseRelease(){capture(false,"");if(m_Src===null||m_MoveType===null)return;var relativePos=null,srcXPath,refXPath,refresh=false;switch(m_MoveType){case 0:refresh=m_SrcHasTag;if(m_DrpAdj){if(m_DrpAdj==m_Src)break;if(!m_MoveIntoNew){if(m_DrpAdj.tagName=="TD"){var dropCoords=getCoords(m_DrpPt);if(m_Src.uim==UIM.Wide){refXPath="p[position()="+pageIndex+']/r[@t="b"]';var wideColTop=dropCoords.top<=m_SrcCoords.bottom;m_DrpPos=wideColTop?"afterBegin":"beforeEnd";relativePos=wideColTop?"preChild":"appChild"}else{refXPath="p[position()="+pageIndex+"]/r[position()="+(m_DrpAdj.cellIndex/2+1)+"]";var colHead=m_DrpAdj.children[0],colHeadCoords=getCoords(colHead);if(dropCoords.top<=colHeadCoords.bottom){relativePos="preChild";m_DrpAdj=colHead;m_DrpPos="afterEnd"}else{relativePos="appChild";m_DrpAdj=m_DrpAdj.children[m_DrpAdj.children.length-1];m_DrpPos="beforeBegin"}}}else refXPath="p[position()="+pageIndex+"]/r/m[@i='"+m_DrpAdj.id+"']";m_DrpAdj.insertAdjacentElement(m_DrpPos,m_Src);window.trackEvent(null,"move"+m_DrpPos,"cm"+m_Src.id,m_DrpAdj.tagName=="TABLE"?m_DrpAdj.id:"-1",null);if(relativePos===null){if(m_DrpPos===null)return;if(m_DrpPos.indexOf("Begin")>0)relativePos="before";else relativePos="after"}addXXR("p[position()="+pageIndex+"]/r/m[@i='"+m_Src.id+"']",refXPath,relativePos)}else{var colQueryString=insertColumn(-2,true,false),newCol=pageTable.rows[0].cells[pageTable.rows[0].cells.length-3];if(newCol){m_DrpAdj=newCol.children[0];m_DrpPos="afterEnd";m_DrpAdj.insertAdjacentElement(m_DrpPos,m_Src);srcXPath="p[position()="+pageIndex+"]/r/m[@i='"+m_Src.id+"']";refXPath="p[position()="+pageIndex+"]/r[position()="+(newCol.cellIndex/2+1)+"]";relativePos="appChild";addXXR(srcXPath,refXPath,relativePos)}}}break;case 1:if(m_DrpAdj){var index=m_Src.cellIndex/2,dest=m_DrpAdj.cellIndex/2,col=m_Src,siz=m_Src.nextSibling;if(m_DrpAdj!=m_Src){m_DrpAdj.insertAdjacentElement(m_DrpPos,col);m_DrpAdj.insertAdjacentElement(m_DrpPos,siz);window.trackEvent(null,"drag","col"+index,dest-index,null);if(m_DrpPos.indexOf("Begin")>0)relativePos="before";else relativePos="after";addXXR("p[position()="+pageIndex+"]/r[position()="+(index+1)+"]","p[position()="+pageIndex+"]/r[position()="+(dest+1)+"]",relativePos)}}break;case 2:if(pageIndex){window.trackEvent(null,"resize","col"+m_Src.cellIndex/2,m_Src.width,null);addXV("p[position()="+pageIndex+"]/r[position()="+(m_Src.cellIndex/2+1)+"]/@w",m_Src.width)}break}if(m_Cap&&m_MoveType!=2){m_Cap.style.position="static";m_Cap.removeNode(true)}if(m_DrpPt&&m_DrpPt.style)m_DrpPt.style.display="none";if(m_Src)m_Src.style.visibility="inherit";m_sH=m_sL=m_sT=m_sW=m_x=m_y=0;m_MoveType=m_Cap=m_ColType=m_DrpAdj=m_DrpPos=m_Src=m_SrcCoords=null;m_SrcHasTag=false;commitUpdate(refresh)}function getParentUI(e,uitype){while(e&&e.ui!=uitype)e=e.parentElement;return e}function addXXR(x1,x2,r){if(updateE===null){updateE=createEventObject();updateE.state=""}updateE.state+="&xxr"+argCnt+"="+encodeURIComponent(encodeURIComponent(x1)+"&"+encodeURIComponent(x2)+"&"+encodeURIComponent(r));argCnt++}function addXVR(x,v,r){if(updateE===null){updateE=createEventObject();updateE.state=""}updateE.state+="&xvr"+argCnt+"="+encodeURIComponent(encodeURIComponent(x)+"&"+encodeURIComponent(v)+"&"+encodeURIComponent(r));argCnt++}function addXV(x,v){if(updateE===null){updateE=createEventObject();updateE.state=""}updateE.state+="&xv"+argCnt+"="+encodeURIComponent(encodeURIComponent(x)+"&"+encodeURIComponent(v));argCnt++}function addX(x){if(updateE===null){updateE=createEventObject();updateE.state=""}updateE.state+="&x"+argCnt+"="+encodeURIComponent(x);argCnt++}function commitUpdate(refresh){fixPromos();autoSize(true);evtOnPageStateChange.fire(updateE);updateE=null;argCnt=0;refresh=typeof refresh!="undefined"?refresh:false;if(refresh)window.location.reload(false)}function autoSize(buildQueryString_bool){var queryString="";if(pageTable.style.display!="none"){var cols=pageTable.rows[m_rowNarrow].cells,w,col;for(var i=0;i<cols.length;i++){col=cols(i);if(col.ui==UI.Column){w=updateColumnSize(col,getCoords(col),0);if(w&&buildQueryString_bool)addXV("p[position()="+pageIndex+"]/r["+(i/2+1)+"]/@w",w)}}}return queryString}function getMenuXml(s){if(!s){s=window.event.srcElement;if(!s)return}var action,cm,cmId,colIndex,i,items,reqMenuId;colIndex=null;cmId=null;reqMenuId="Main";while(s.tagName!="BODY"){if(s.menuId&&s.menuId!=="Main")reqMenuId=s.menuId;if(s.ui==UI.Module){cm=s;cmId=cm.id}else if(s.ui==UI.Column)colIndex=s.cellIndex;s=s.parentElement}var menus,criteria="";switch(reqMenuId){case "pag":criteria+=disableMenu("deletePage",pageCount==1);criteria+=disableMenu("addPage",pageCount>=pageMax);break;case "col":criteria+=disableMenu("moveColumnLeft",colIndex<=0);criteria+=disableMenu("moveColumnRight",colIndex/2+1>=columnCount);criteria+=disableMenu("insertColumn",columnCount>=columnMax);criteria+=disableMenu("insertModule",moduleCount>=moduleMax);criteria+=disableMenu("deleteColumn",columnCount<=1);break;case "mod":menus=cm.menus;menus=menus.split(",");for(i=0;i<menus.length;i++)criteria+=disableMenu(menus[i],true);var elPrev=getSiblingModule(cm.previousSibling,-1),elNext=getSiblingModule(cm.nextSibling,1);criteria+=disableMenu("moveLeft",cm.uim==UIM.Wide||colIndex===0);criteria+=disableMenu("moveRight",cm.uim==UIM.Wide||colIndex/2+1==columnCount);criteria+=disableMenu("moveUp",!elPrev);criteria+=disableMenu("moveDown",!elNext)}var contextXml=new ActiveXObject("Microsoft.XMLDOM");contextXml.loadXML(window.menuData.XMLDocument.xml);if(criteria!==""){criteria="["+criteria.substr(0,criteria.length-4)+"]";items=contextXml.selectNodes("//menus/menu/item"+criteria);for(i=0;i<items.length;i++){items[i].setAttribute("disabled","true");items[i].removeAttribute("tip")}}items=contextXml.selectNodes("//menus/menu/item[@action != '']");for(i=0;i<items.length;i++){action=new String(items[i].getAttribute("action"));action=action.replace("_pag_",pageIndex).replace("_col_",colIndex).replace("_mod_","'"+cmId+"'");items[i].setAttribute("action",action)}return {xml:contextXml.xml,menuId:reqMenuId}}function disableMenu(key,condition){if(condition)return "@key='"+key+"' or ";return ""}function customizeModule(cmId){var ret=showDialog(relUrl("/customizemodule.armx?tok="+window.globalstr._token+"&id="+cmId),window.document);if(ret)refreshModule(ret)}function deleteColumn(index){if(index==-1)return;if(pageTable.rows[m_rowNarrow].cells.length==3){window.alert(m_str._last_column_delete);return}var col=pageTable.rows[m_rowNarrow].cells[index],i;col.style.cssText=m_HiliteCssText;var hasContent=false;for(i=0;i<col.children.length;i++){if(col.children[i].ui==UI.Module)hasContent=true;col.children[i].style.cssText=m_HiliteCssText}var removeColumn=false;if(!hasContent||window.confirm(m_str._confirm_column_delete))removeColumn=true;col.style.cssText="";for(i=0;i<col.children.length;i++)col.children[i].style.cssText="";if(removeColumn){var stickyModulesIndex=0,stickyModules=new Array(col.children.length);for(i=0;i<col.children.length;i++){stickyModules[i]=null;if(col.children[i].ui==UI.Module&&col.children[i].uim==UIM.Sticky){stickyModules[stickyModulesIndex]=col.children[i];stickyModulesIndex++}else if(col.children[i].ui==UI.Promo&&col.children[i].loc.indexOf(".")>0){stickyModules[stickyModulesIndex]=col.children[i];stickyModulesIndex++}}if(stickyModules[0]!==null){var newFirstColIndex=index===0?2:0,firstCol=pageTable.rows[m_rowNarrow].cells[newFirstColIndex],lastStickyIndex=-1;for(i=0;i<stickyModules.length;i++)if(stickyModules[i]===null){lastStickyIndex=i-1;break}for(i=lastStickyIndex;i>=0;i--)firstCol.children[0].insertAdjacentElement("afterEnd",stickyModules[i])}for(i=0;i<2;i++)pageTable.rows[m_rowNarrow].deleteCell(index);updateWideColumnSpan();window.trackEvent(null,"delete","col"+index,null,null);addX("p[position()="+pageIndex+"]/r[position()="+(index/2+1)+"]");commitUpdate();dirty=true}}function deleteModule(cmId){var cm=element.document.getElementById(cmId);if(cm)if(cm.length)cm=cm[0];if(!cm)return;cm.removeNode(true);window.trackEvent(null,"delete","cm"+cmId,null,null);addX("p[position()="+pageIndex+"]/r/m[@i='"+cmId+"']");commitUpdate();dirty=true}function insertColumn(index,suppressWarning,setState_bool){if(index==-1)return;if(columnCount>=columnMax){if(!suppressWarning)window.alert(m_str._warn_max_cols);return}if(index==-2)index=pageTable.rows[m_rowNarrow].cells.length-3;var tdSize=pageTable.rows[m_rowNarrow].insertCell(index+2);tdSize.title=pageTable.rows[m_rowNarrow].cells[1].title;tdSize.className="col_size";tdSize.ui=UI.ColumnSizer;var tdCol=pageTable.rows[m_rowNarrow].insertCell(index+2);tdCol.className="col col_l";tdCol.ui=UI.Column;tdCol.width=colWidthDef;var src=pageTable.rows[m_rowNarrow].cells[index],kids=src.childNodes;for(var i=0;i<kids.length;i++)if(kids[i].ui!=UI.Module&&kids[i].ui!=UI.Promo)tdCol.insertAdjacentElement("beforeEnd",kids[i].cloneNode(true));updateWideColumnSpan();window.scrollTo(tdCol.nextSibling.offsetLeft,document.body.scrollTop);window.trackEvent(null,"add","col"+index,null,null);var xPathRef="p[position()="+pageIndex+"]/r[position()="+(index/2+1)+"]",val='<r w="'+colWidthDef+'" ></r>',relativePos="after";dirty=true;addXVR(xPathRef,val,relativePos);if(setState_bool)commitUpdate()}function updateWideColumnSpan(delta){var rowCount=pageTable.rows.length,colCount=pageTable.rows[m_rowNarrow].cells.length;for(var i=0;i<rowCount;i++)if(i!=m_rowNarrow)pageTable.rows[i].cells[0].colSpan=colCount}function coreInsertModule(colIndex,tab,searchTerm){if(typeof colIndex=="object"){colIndex=getParentUI(colIndex,UI.Column);colIndex=colIndex!==null?colIndex.cellIndex:0}var url=relUrl("/newmodule.armx")+"?tok="+window.globalstr._token+"&page="+pageIndex+"&col="+colIndex/2;if(tab>0)url=url+"&tab="+tab;if(searchTerm!==null)url=url+"&term="+escape(searchTerm);var ret=showDialog(url,window.document);if(ret)if(ret!=="-1")refreshModule(ret);else window.location.reload()}function insertModule(colIndex){coreInsertModule(colIndex,3,null)}function addContent(colIndex,searchTerm){coreInsertModule(colIndex,3,searchTerm);return false}function moveColumn(index,offset){if(index==-1)return;var cols=pageTable.rows[m_rowNarrow].cells,dest=index+offset;if(dest>cols.length-3||dest<0)return;cols(index).swapNode(cols(dest));var relativePos;if(offset>0){relativePos="after";window.trackEvent(null,"moveright","col"+index/2,null,null)}else{relativePos="before";window.trackEvent(null,"moveleft","col"+index/2,null,null)}addXXR("p[position()="+pageIndex+"]/r[position()="+(index/2+1)+"]","p[position()="+pageIndex+"]/r[position()="+(dest/2+1)+"]",relativePos);commitUpdate()}function hasTags(pSrcItem){var tags,tagsTBody=pSrcItem.getElementsByTagName("TBODY");if(tagsTBody!=null&&tagsTBody.length>0){tags=tagsTBody[0].getElementsByTagName("STYLE");return tags!=null&&tags.length>0}return false}function moveModule(cmId,direction){var src=element.document.getElementById(cmId),tgt=null,pos=null,bRefresh=false;if(!src)return;src.style.visibility="hidden";var xpathToMove=null,xpathRef=null,relativePos=null;switch(direction){case "up":tgt=getSiblingModule(src.previousSibling,-1);break;case "left":tgt=src.parentElement.previousSibling.previousSibling.children[0];pos="afterEnd";break;case "right":tgt=src.parentElement.nextSibling.nextSibling.children[0];pos="afterEnd";break;case "down":tgt=getSiblingModule(src.nextSibling,1);break}if(src&&tgt)if(pos){window.trackEvent(null,"move"+direction,"cm"+src.id,tgt.parentElement.cellIndex/2,null);xpathToMove="p[position()="+pageIndex+"]/r/m[@i='"+src.id+"']";xpathRef="p[position()="+pageIndex+"]/r[position()="+(tgt.parentElement.cellIndex/2+1)+"]";relativePos="preChild";tgt.insertAdjacentElement(pos,src);addXXR(xpathToMove,xpathRef,relativePos);if(hasTags(src)||hasTags(tgt))bRefresh=true;commitUpdate(bRefresh)}else{window.trackEvent(null,"move"+direction,"cm"+src.id,tgt.id,null);xpathToMove="p[position()="+pageIndex+"]/r/m[@i='"+src.id+"']";xpathRef="p[position()="+pageIndex+"]/r/m[@i='"+tgt.id+"']";relativePos=direction=="up"?"before":"after";src.swapNode(tgt);addXXR(xpathToMove,xpathRef,relativePos);if(hasTags(src)||hasTags(tgt))bRefresh=true;commitUpdate(bRefresh)}src.style.visibility="inherit"}function getSiblingModule(el,direction){while(el&&el.ui!=UI.Module)el=direction<0?el.previousSibling:el.nextSibling;return el}function refreshModule(cmId){var ref=getQS("refresh");if(ref){var refInt=parseInt(ref);if(isNaN(refInt))refInt=0;refInt++;ref=refInt.toString()}else ref="0";window.navigate("/?page="+pageIndex+"&refresh="+ref+"#"+cmId)}function showDialog(url,obj){var ret;if(!obj)obj=element.document;if(!m_DialogOpen){m_DialogOpen=true;ret=window.showModalDialog(url,obj,"center: yes; resizable: yes; scroll: no; status: no; help: no;");m_DialogOpen=false;return ret}}function relUrl(path){return window.location.protocol+"//"+window.location.host+path}function changeCollapse(mID,rID,show){var i,fullID=mID+"_"+rID,showElem=element.document.getElementById(fullID+"_show"),hideElem=element.document.getElementById(fullID+"_hide"),collapsedStyle,collapsedIDs="",selector;for(i=0;i<window.document.styleSheets.length;i++)if(window.document.styleSheets[i].id==m_collapsedStyleStr){collapsedStyle=window.document.styleSheets[i];break}if(collapsedStyle===null)return;if(show){if(showElem!==null)showElem.style.display="none";if(hideElem!==null)hideElem.style.display="inline";var removerule=null;for(i=0;i<collapsedStyle.rules.length;i++){selector=collapsedStyle.rules[i].selectorText;if(selector.indexOf(fullID)>=0)removerule=i;else if(selector.indexOf(mID)>=0)collapsedIDs+=","+selector.substring(selector.indexOf("_")+1,selector.length)}if(removerule!==null)collapsedStyle.removeRule(removerule)}else{if(showElem!==null)showElem.style.display="inline";if(hideElem!==null)hideElem.style.display="none";var found=false;for(i=0;i<collapsedStyle.rules.length;i++){selector=collapsedStyle.rules[i].selectorText;if(selector.indexOf(fullID)>=0)found=true;if(selector.indexOf(mID)>=0)collapsedIDs+=","+selector.substring(selector.indexOf("_")+1,selector.length)}if(!found){collapsedStyle.addRule("#"+fullID,"display:none");collapsedIDs+=","+rID}}if(collapsedIDs.length>0)collapsedIDs=collapsedIDs.substring(1,collapsedIDs.length);addXV("p[position()="+pageIndex+"]/r/m[@i='"+mID+"']/@h",collapsedIDs);commitUpdate()}function Widget(cls,img,ext){this.classOff=cls;this.classOver=cls+m_O;this.classDown=cls+m_D;if(img&&ext){this.imgOff=img+ext;this.imgOver=img+m_O+ext;this.imgDown=img+m_D+ext}else this.imgOff=this.imgOver=this.imgDown=null}function ignore(){window.event.returnValue=false}function update(){if(window.MyWidgetDisabled)return;var e=window.event.srcElement,w=getWidget(e);if(m_LastEl&&m_LastWid&&m_LastEl!=e)updateElement(m_LastEl,m_LastWid,m_LastWid.classOff,getUrl(m_LastEl,m_LastWid.imgOff));if(!w)return;var clsAtt=null,srcAtt=null;switch(window.event.type){case "selectstart":window.event.returnValue=false;return;case "mousedown":clsAtt=w.classOff+" "+w.classDown;srcAtt=getUrl(e,w.imgDown);break;case "mouseover":if(window.event.button==1){clsAtt=w.classOff+" "+w.classDown;srcAtt=getUrl(e,w.imgDown)}else{clsAtt=w.classOff+" "+w.classOver;srcAtt=getUrl(e,w.imgOver)}break;case "mouseup":clsAtt=w.classOff+" "+w.classOver;srcAtt=getUrl(e,w.imgOver);break;case "mouseout":clsAtt=w.classOff;srcAtt=getUrl(e,w.imgOff);break;default:clsAtt=w.classOff;srcAtt=getUrl(e,w.imgOff);break}updateElement(e,w,clsAtt,srcAtt)}function updateElement(e,w,clsAtt,srcAtt){if(srcAtt&&e.src!=srcAtt)e.src=srcAtt;if(e.className!=clsAtt)e.className=clsAtt;m_LastWid=w;m_LastEl=e}function getUrl(e,newFile){if(!newFile)return null;var newUrl=null,oldUrl,paths,xc=new String;if(e.tagName=="IMG"||e.tagName=="INPUT"&&e.type=="image"){oldUrl=e.src;var i=e.src.lastIndexOf("/");if(e.src.substr(i)=="/c.gif")return null;newUrl=e.src.substring(0,i+1)+newFile}return newUrl}function getWidget(e){if(!e||!e.className)return null;var thisClass=e.className.split(" ")[0];for(var i=0;i<m_Widgets.length;i++)if(m_Widgets[i].classOff==thisClass)return m_Widgets[i];return null}function SpyMouseMove(){var el=document.getElementById("spy");if(el===null)return;el.scrollAmount=hoverScroll;el.direction=window.event.offsetX-el.scrollLeft<goRightMark?"right":"left"}function SpyMouseOver(){var el=document.getElementById("spy");if(el===null)return;el.scrollAmount=0}function SpyMouseOut(){var el=document.getElementById("spy");if(el===null)return;el.scrollAmount=baseScroll;el.direction="left"}function SpyBaseScroll(){var el=document.getElementById("spy");if(el===null)return;el.scrollAmount=baseScroll}function doDialogPaneHelp(key,text,topic,search,link,cm){if(window.dialogArguments)window.dialogArguments.parentWindow.doPaneHelp(key,text,topic,search,link,cm);else doPaneHelp(key,text,topic,search,link,cm)}function doRssPaneHelp(config,key,text,topic,search,link,cm){var orig_config=H_CONFIG;H_CONFIG=config;H_KEY=key;L_H_TEXT=text;H_TOPIC=topic;bSearch=search;doPaneHelp(key,text,topic,search,link,cm);H_CONFIG=orig_config}function doPaneHelp(key,text,topic,search,link,cm){H_KEY=key;L_H_TEXT=text;H_TOPIC=topic;bSearch=search;DoHelp();if(window.trackEvent)trackEvent(link,"panehelp",cm,"",key)}function DoHelp(iNm){var sQP,W,H,sWD,sc=window.screen.width,bIE4PC,agent=window.navigator.userAgent.toLowerCase(),app=window.navigator.appName.toLowerCase(),agent_isMac=agent.indexOf("mac")>-1,agent_isIE=agent.indexOf("msie")>-1&&parseInt(window.navigator.appVersion.substring(0,1))>=4,agent_isMSN=false,vi=agent.indexOf("msn "),agent_isMacMSN=false;if(vi>-1){agent_isMSN=agent.substring(vi+4);agent_isMSN=parseFloat(agent_isMSN.substring(0,agent_isMSN.indexOf(";")));agent_isMSN=agent_isMSN!=NaN&&agent_isMSN>=6}agent_isMacMSN=agent.indexOf("ppc mac os x")>-1&&agent.indexOf("msn explorer")>-1;sQP=H_BURL.indexOf("?")>-1?"&":"?";sQP+="H_VER="+H_VER;sQP+="&INI="+H_CONFIG;if(agent_isMSN&&!agent_isMacMSN){sQP+="&H_APP="+encodeURIComponent(L_H_APP);sQP+=bSearch?"&SEARCHTERM="+escape(H_KEY)+"&S_TEXT="+encodeURIComponent(L_H_TEXT):"&TOPIC="+H_TOPIC}else{sQP+="&H_APP="+escape(L_H_APP);sQP+=bSearch?"&SEARCHTERM="+escape(H_KEY)+"&S_TEXT="+escape(L_H_TEXT):"&TOPIC="+H_TOPIC}if(H_BRAND!=="")sQP+="&BrandID="+H_BRAND;if(H_FILTER!=="")sQP+="&Filter="+H_FILTER;if(L_CONTACTUS_URL!=="")sQP+="&ContactUS="+L_CONTACTUS_URL;if(typeof v1!="undefined")sQP+="&v1="+escape(v1);else sQP+="&v1="+escape(document.location.protocol+"//"+document.location.hostname);sQP+="&v2="+escape(document.location.search);if(typeof H_CONFIG!="undefined"&&(window.self.name===null||window.self.name===""||window.self.name=="msnMain"))window.self.name=H_CONFIG.substring(0,H_CONFIG.indexOf("."));sQP+="&tmt="+escape(window.name);if(sc<=800)sQP+="&sp=1";if(bOptNoResize)sQP+="&bOptNoResize=1";W=sc<=800?180:230;if(agent_isMac&&agent_isIE)W=224;H=agent.indexOf("windows")>0&&agent.indexOf("aol")>0?window.screen.availHeight-window.screenTop-22:window.screen.availHeight;sWD="toolbar=0,status=0,menubar=0,resizable=1,top=0,width="+W;if(agent_isMSN)window.external.showHelpPane(H_URL_BASE+"/frameset.asp"+sQP,W);else if(agent.indexOf("webtv")>0||agent.indexOf("msn companion")>0)window.top.location.replace(H_URL_BASE+"/frameset.asp"+sQP);else if(app.indexOf("netscape")>-1&&window.navigator.appVersion.indexOf("4.")>-1){var fw;if(agent_isMac){sWD+=",height="+(H-38)+",left="+(sc-W-16);fw=30}else{sWD+=",height="+(H-30)+",left="+(sc-W-12);fw=12}if(!bOptNoResize)window.top.window.resizeTo(window.screen.availWidth-W-(window.outerWidth-window.innerWidth)-fw,window.screen.availHeight-(window.outerHeight-window.innerHeight));if(!bOptNoResize)window.top.window.moveTo(0,0);h_win=window.open(H_URL_BASE+"/frameset.asp"+sQP,"_help",sWD)}else if(agent.indexOf("opera")>-1){sWD+=",height="+H+",left="+(sc-W-(agent_isMac?5:0));if(!bOptNoResize)window.resizeTo(window.screen.availWidth-W-(agent_isMac?20:0),window.screen.availHeight);if(!bOptNoResize)window.moveTo(0,0);h_win=window.open(H_URL_BASE+"/frameset.asp"+sQP,"_help",sWD)}else if(agent.indexOf("aol")>-1){sWD+=",height="+(H-115);window.open(H_URL_BASE+"/frameset.asp"+sQP,"_help",sWD)}else if(agent_isIE||agent.indexOf("netscape6")>-1){sWD+=",height="+H+",left="+(sc-W);bResize=false;bIE4PC=agent.indexOf("msie 4")>0;if(H_TARG==="")H_TARG=bIE4PC?"_help26":"_help";if(iNm!==null)H_TARG+=iNm;if(bIE4PC)window.open(H_BURL+sQP,H_TARG,sWD);else h_win=window.open(H_BURL+sQP,H_TARG,sWD);if(h_win&&!agent_isMac&&app.indexOf("netscape")<0)h_win.opener=window.self}else window.open(H_URL_BASE+"/frameset.asp"+sQP,"_help")}function dw(s){if(s)document.write(s)}function doDialogKeyPress(idEnter,idEscape){var el=window.event.srcElement;if(!el||el.onkeydown||el.onkeyup||el.tagName=="TEXTAREA")return;var btnID;if(!idEnter&&!idEscape){idEnter="btn_OK";idEscape="btn_Cancel"}switch(window.event.keyCode){case 13:if(isClickableElement(el))return;btnID=idEnter;break;case 27:btnID=idEscape;break}if(btnID){var btn=document.getElementById(btnID);if(btn)if(isClickableElement(btn)){btn.click();window.event.cancelBubble=true;window.event.returnValue=false}}}function isClickableElement(el){return el&&(el.tagName=="A"||el.tagName=="BUTTON"||el.tagName=="INPUT"&&(el.type=="button"||el.type=="submit"))}function renderInlineModule(moduleIndex){var module=InlineModules[moduleIndex];if(!module)return;var elD=document.getElementById(module.DataID),elC=document.getElementById(module.ContainerID);if(elD&&elC){if(elD.readyState=="complete"){elC.innerHTML=eval(module.Renderer);if(page)page.autoSize(false);window.clearTimeout(module.TimeOutID);module.TimeOutID=null;return}if(!module.TimeOutID)module.TimeOutID=window.setTimeout("render("+moduleIndex+")",2000)}}function InlineModule(renderFn,dataId,containerId){this.Renderer=renderFn;this.DataID=dataId;this.ContainerID=containerId;this.TimeOutID=null}function getMenuXML(el){return page.getMenuXml(el)}var isRec=false;function setFocus(){if(typeof otherOnLoad!="undefined"&&!isRec){isRec=true;otherOnLoad();isRec=false}for(var i=0;i<InlineModules.length;i++)renderInlineModule(i);if(!window.g_FocusId||document.activeElement&&document.activeElement.tagName!="BODY")return;var el=document.getElementById(window.g_FocusId);if(el)try{if(el.tagName=="INPUT"&&el.type=="text")el.select();else el.focus()}catch(e){}}function clicker(id){var el=document.getElementById(id);if(el)el.click()}function doDialogCommit(url){document.forms["dialogForm"].action=url;document.forms["dialogForm"].submit()}function doDialogCancel(){window.returnValue=null;window.close()}function doDialogCancel2(){if(window.dialogArguments){window.returnValue=null;window.close()}else window.parent.navigate("/?refresh=0")}function updateRef(opt){var el;el=document.getElementById("txtTerm");if(el)el.value=opt.sample}function hideUpDown(display){var ups=getObjsById("up"),dns=getObjsById("dn");if(ups)ups[0].style.display=display;if(dns)dns[dns.length-1].style.display=display}function selectPageTemplate(){clearRadioButtons(getObjsById("template"));window.event.srcElement.checked=true;getObjsById("title")[0].value=window.event.srcElement.displaytitle}function selectDialogTab(tab){var url="http://"+window.location.host+window.location.pathname+"?tab="+tab;doDialogCommit(url)}function doRenamePageCommit(){var title=getObjsById("title")[0].value;title=title.replace(/^\s+|\s+$/g,"");if(title.length===0){window.alert(window.globalstr._warn_empty_title);getObjsById("title")[0].focus();return}window.returnValue=title;window.close()}function doAddPageCommit(){var title=getObjsById("title")[0].value;title=title.replace(/^\s+|\s+$/g,"");if(title.length===0){window.alert(window.globalstr._warn_empty_title);getObjsById("title")[0].focus();return}doDialogCommit("/newpage.armx?action_save=1")}function doPageStateChange(){var e=window.event;if(e!==undefined&&e!==null&&e.state!==null){var url=relativePath("/updatehandler.armx?tok="+window.globalstr._token+"&htc=1&page="+page.pageIndex+e.state);quietUpdate(url)}}function quietUpdate(url){var poster=document.getElementById("page_post");if(poster)poster.src=url}function doDialogLoad(){doDialogResize();setFocus();hideUpDown("none")}function doDialogResize(){var elHead=document.getElementById("dlg_head"),elMain=document.getElementById("dlg_main"),elFoot=document.getElementById("dlg_foot"),elRight=document.getElementById("dlg_ac_right");if(!elHead||!elMain||!elFoot)return;var fixed=elHead.offsetHeight+elFoot.offsetHeight,avail=document.body.offsetHeight-fixed-1;if(avail>0){elMain.style.height=avail;if(elRight)elRight.style.height=avail}}function refreshCustomizeModulePage(args){var url=relativePath("/customizemodule.armx");if(args)url+=args;document.forms["dialogForm"].action=url;document.forms["dialogForm"].submit()}function genEditDelURL(action){var el=document.activeElement;while(el&&el.tagName!="TR")el=el.parentElement;refreshCustomizeModulePage("?action="+action+"&index="+el.rowIndex)}function moveRow(dir){var el=document.activeElement;while(el&&el.tagName!="TR")el=el.parentElement;hideUpDown("inline");if(dir>0)el.swapNode(el.previousSibling);else el.swapNode(el.nextSibling);hideUpDown("none")}function doTeamSearch(){switch(window.event.keyCode){case 13:window.trackEvent("sports_search");refreshCustomizeModulePage("?team_search_btn=1");window.event.cancelBubble=true;window.event.returnValue=false;break;case 27:doDialogCancel();break}}function doModuleSearch(){switch(window.event.keyCode){case 13:window.trackEvent("searchModule",document.all.term.value);doDialogCommit("/newmodule.armx?tab=3");window.event.cancelBubble=true;window.event.returnValue=false;break;case 27:doDialogCancel();break}}function doDialogChkBoxKeyPress(id){switch(window.event.keyCode){case 13:var el=document.getElementById(id);if(isClickableElement(el)){window.event.srcElement.checked="checked";el.click();window.event.cancelBubble=true;window.event.returnValue=false;return false}break;case 27:doDialogCancel();break}}function sportsTeamsAdd(count,max,warning){window.trackEvent("sports_add");var teams=getObjsById("team"),added=0;for(var i=0;i<teams.length;i++){if(teams[i].disabled||!teams[i].checked)continue;added++}if(count+added>max){window.trackEvent("sports_add_max_exceeded");window.alert(warning.replace("{0}",max).replace("{1}",max-count));return}refreshCustomizeModulePage("?add_teams=1")}function updateSelectedModules(e){var modules=document.getElementsByTagName("input");if(e.checked){var cnt=0,modMax=0;for(var i=0;i<modules.length;i++)if(modules[i].name=="cm")if(modules[i].checked||modules[i].type=="hidden")cnt++;if(window.dialogArguments)modMax=window.dialogArguments.parentWindow.page.moduleMax;else if(window.maxModuleNumAllowed)modMax=window.maxModuleNumAllowed;if(modMax!==0&&cnt>modMax){window.alert(window.globalstr._warn_max_mods);e.checked=false}}}function getObjsById(id){var obj=window.document.all(id);if(!obj)return null;if(obj.length)return obj;return new Array(obj)}function getQS(key){var q=new QS(window.location.search);return decodeURIComponent(q.getValue(key))}function clearRadioButtons(arrInp){for(var i=0;i<arrInp.length;i++)arrInp[i].checked=false}function clearInput(that){that.value="";that.onclick=null}function QS(q){if(q.length>1)this.q=q.substring(1,q.length);else this.q=null;this.keyValuePairs=new Array;if(q)for(var i=0;i<this.q.split("&").length;i++)this.keyValuePairs[i]=this.q.split("&")[i];this.getKeyValuePairs=function(){return this.keyValuePairs};this.getLength=function(){return this.keyValuePairs.length};this.getValue=function(s){for(var j=0;j<this.keyValuePairs.length;j++)if(this.keyValuePairs[j].split("=")[0]==s)return this.keyValuePairs[j].split("=")[1];return false};this.getParameters=function(){var a=new Array(this.getLength());for(var j=0;j<this.keyValuePairs.length;j++)a[j]=this.keyValuePairs[j].split("=")[0];return a}}function relativePath(path){return "http://"+window.location.host+path}var firstTime=true;function openCal(arg,id){window.inputId="";var el=window.event.srcElement;if(!el)return;var pL=el.clientWidth+1,pT=el.clientHeight+1;while(el.tagName!="BODY"){pT+=el.offsetTop+el.clientTop;pL+=el.offsetLeft+el.clientLeft;el=el.offsetParent}var elIframe=document.getElementById("cal");if(elIframe!==null){if(firstTime){elIframe.src=relativePath("/calendar.armx");window.document.body.insertAdjacentElement("beforeEnd",elIframe)}window.inputId=id;elIframe.style.zIndex=100;elIframe.style.position="absolute";elIframe.style.left=pL;elIframe.style.top=pT;elIframe.style.display="block";if(!firstTime)document.frames("cal").document.links[0].focus();firstTime=false}}function rch(){dw("<td>");dw('<img ui="4" border="0" class="col_grab" height="11" src="');dw(baseUrlImage);dw('c.gif" width="27" alt="');dw(colDragTitle);dw('" title="');dw(colDragTitle);dw('" />');dw("</td>");dw('<td width="100%" align="center" nowrap="nowrap" ui="4">&nbsp;');dw(colOptionsLabel);dw("&nbsp;");dw('<a href="javascript:void(0);" menuId="col" class="popup_menu" hidefocus="true">');dw('<img ui="9" border="0" class="menu_wid" height="10" src="');dw(baseUrlImage);dw('c.gif" width="10" alt="');dw(colOptionsTitle);dw('" title="');dw(colOptionsTitle);dw('" />');dw("</a>");dw("&nbsp;");dw("</td>");dw("<td>");dw('<img ui="4" border="0" class="col_grab" height="11" src="');dw(baseUrlImage);dw('c.gif" width="27" alt="');dw(colDragTitle);dw('" title="');dw(colDragTitle);dw('" />');dw("</td>")}function renderImage(src,height,width,alt,className,ui){if(!alt)alt="";dw('<img border="0" height="');dw(height);dw('" width="');dw(width);dw('" alt="');dw(alt);dw('" title="');dw(alt);dw('" src="');dw(baseUrlImage);dw(src);dw('" ');if(className){dw('class="');dw(className);dw('" ')}if(ui){dw('ui="');dw(ui);dw('" ')}dw("/></a>")}function rmh(name,id,enableRedX,collapsed){dw('<tr height="6">');dw('<th class="mod_tl" width="6">');renderImage("c.gif","6","6");dw("</th>");dw('<th class="mod_head" rowspan="2"><img style="cursor: hand;" id="toggle'+id+'" onclick="toggleModuleDisplay(window.page, \''+id+'\');" src="');dw(baseUrlImage);dw(collapsed==1?"expand.gif":"collapse.gif");dw('"/></th>');dw('<td style="text-align: left;" width="100%" rowspan="2" nowrap="nowrap" class="mod_head" ui="');dw(moduleHeaderChromeAttr);dw('">');dw("<h2>");dw("<b>");dw(name);dw("</b>");dw('<span class="rss_time" id="mod_title'+id+'" >');dw("</span>");dw("&nbsp;");dw('<a href="javascript:void(0);" menuId="mod" class="popup_menu" hidefocus="true"><img border="0" class="menu_wid" height="10" width="10" alt="');dw(modOptionsTitle);dw('" title="');dw(modOptionsTitle);dw('" src="');dw(baseUrlImage);dw('c.gif" /></a>');dw("</h2>");dw("</td>");dw('<th align="right" class="mod_head" rowspan="2" width="19" ui="');dw(moduleHeaderChromeAttr);dw('">');renderImage("c.gif","11","19",modDragTitle,"mod_grab",moduleGrabberChromeAttr);dw("</th>");dw('<th class="mod_head" rowspan="2">');if(enableRedX){dw('<a href="javascript:');dw("page.deleteModule('");dw(id);dw("')");dw('">');renderImage("icon-delsm.gif","16","16",window.globalstr._my_module_delete,"mod_head");dw("</a>")}else dw("&nbsp;");dw("</th>");dw('<th class="mod_tr" width="6">');renderImage("c.gif","6","6");dw("</th>");dw("</tr>");dw("<tr>");dw('<th class="mod_l">&nbsp;</th>');dw('<th class="mod_r">&nbsp;</th>');dw("</tr>")}function toggleModuleDisplay(pag,id){var table=document.getElementById(id),body=table.tBodies[0],link=document.getElementById("toggle"+id),newDisplay=body.style.display=="none"?"":"none";if(newDisplay=="none")link.src=baseUrlImage+"expand.gif";else link.src=baseUrlImage+"collapse.gif";body.style.display=newDisplay;var url=relativePath("/updatehandler.armx?tok="+window.globalstr._token+"&htc=1&page="+pag.pageIndex);url+="&xv0="+encodeURIComponent('p[position()="'+pag.pageIndex+'"]/r/m[@i="'+id+'"]/@c&'+(newDisplay=="none"?"1":"0"));quietUpdate(url)}function rsspreview(guid,url){var el=document.getElementById("preview_"+guid),hasErrorMsg=false,strongTags=el.all.tags("strong");for(var i=0;i<strongTags.length;i++)if(strongTags[i].id=="rss_error"){hasErrorMsg=true;break}if(el.innerHTML&&!hasErrorMsg){if(el)el.style.display=""}else{var xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");xmlhttp.Open("GET",url,false);xmlhttp.send();if(el){var respObj=xmlhttp.responseXML;el.style.width="300";el.innerHTML=respObj.xml;el.style.display=""}var aTags=el.all.tags("a"),number=aTags.length-1;for(var count=0;count<number;count++)aTags[1].outerHTML=aTags[1].innerHTML}var img_d=document.getElementById("imgd_"+guid);if(img_d)img_d.style.display="none";var img_h=document.getElementById("imgh_"+guid);if(img_h)img_h.style.display="";window.event.returnValue=false}function rsspreview_hide(guid){var el=document.getElementById("preview_"+guid);if(el)el.style.display="none";var img_d=document.getElementById("imgd_"+guid);if(img_d)img_d.style.display="";var img_h=document.getElementById("imgh_"+guid);if(img_h)img_h.style.display="none";window.event.returnValue=false}function displayInfoAboutRSS(sMessage){m_Popup=window.createPopup();var oPopBody=m_Popup.document.body;oPopBody.style.backgroundColor="lightyellow";oPopBody.style.border="solid black 1px";oPopBody.style.fontSize = "16px";oPopBody.style.fontFamily = "Times New Roman,Arial,sans-serif";oPopBody.style.margin = "0 5px";oPopBody.innerHTML=sMessage;m_Popup.show(-50,20,270,215,window.event.srcElement)}