// Copyright (c) Microsoft Corporation.  All rights reserved.
var opWin=opener.top;var Help_Url_Base=GetHelpBaseUrl();var resizeFactorWidth=0;var moveFactorWidth=0;function GetHelpBaseUrl(){var path=self.location.pathname.toLowerCase();var arrPath=path.split("/");var retPath=location.protocol+"//"+location.hostname;if(arrPath[0]==""&&arrPath[1]!="resources")retPath+="/"+arrPath[1];return retPath;}function IsWindowsLive(){return Help_Url_Base.indexOf(".live")!=-1||self.location.search.indexOf("format=b")!=-1;}function GetHelpWindowWidth(){return IsWindowsLive()?550:230;}function NoResize(){return IsWindowsLive()||self.location.search.indexOf("od=false")!=-1;}function SizeOpener(){if(!NoResize()){var agent=navigator.userAgent.toLowerCase();var widthAdjust=agent.indexOf("msie")!=-1&&opener==opener.top?22:8;var origW=GetCurrentWindowWidth(opWin);var newW=screen.availWidth-GetHelpWindowWidth()-widthAdjust;var origX=0;var origY=0;if(typeof opWin.screenLeft=="number"){origX=opWin.screenLeft;origY=opWin.screenTop;}else{if(typeof opWin.screenX=="number"){origX=opWin.screenX;origY=opWin.screenY;}}if(origW<=newW){if(origW+origX>newW){moveFactorWidth=newW-(origW+origX);opWin.moveBy(moveFactorWidth,0);}}else{resizeFactorWidth=newW-origW-origX;opWin.resizeBy(resizeFactorWidth,0);}}}function reMax(){if(!opWin.closed&&!NoResize()){if(resizeFactorWidth!=0)opWin.resizeBy(-resizeFactorWidth,0);if(moveFactorWidth!=0)opWin.moveBy(-moveFactorWidth,0);}}function SizeHelpWindow(){if(!IsWindowsLive()){top.window.resizeTo(GetHelpWindowWidth(),screen.availHeight);top.window.moveTo(screen.availWidth-GetHelpWindowWidth(),0);}}function LoadPH(){SizeHelpWindow();if(Help_Url_Base.substring(Help_Url_Base.length-1,Help_Url_Base.length)!="/")Help_Url_Base+="/";mapframe.location.replace(Help_Url_Base+"help.aspx"+self.location.search+"&fs=-1");SizeOpener();}function itexists(b){return typeof b!="undefined"&&b!=null;}function GetCurrentWindowWidth(c){var iW=0;if(typeof c=="object"&&c!=null&&!c.closed){if(typeof c.innerWidth=="number")iW=c.innerWidth;else{if(c.document.documentElement&&c.document.documentElement.clientWidth)iW=c.document.documentElement.clientWidth;else{if(c.document.body&&c.document.body.clientWidth)iW=c.document.body.clientWidth;}}}return iW;}