
NRT.MySite.UI=function()
{return{clear:function(element)
{try
{element.style.display='inline';element.value='';_oUtility.setFocus(element);}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.clear',_oErrorHandler.ERRORTYPE_JS,err);}},clearAgentInfo:function()
{var oAgentID=null;var oAgentName=null;var oDisplayAgent=null;var oClearAgent=null;var oDisplayAgentParent=null;var oDisplayAgentTeamParent=null;try
{oAgentID=_oUtility.getElementByTagNameAndID('hdnAgentID','INPUT');if(oAgentID!==null){oAgentID.value=0;}else{oAgentID=window.opener._oUtility.getElementByTagNameAndID('hdnAgentID','INPUT');if(oAgentID!==null){oAgentID.value=0;}}
oAgentName=_oUtility.getElementByTagNameAndID('hdnAgentName','INPUT');if(oAgentName!==null){oAgentName.value='';}else{oAgentName=window.opener._oUtility.getElementByTagNameAndID('hdnAgentName','INPUT');if(oAgentName!==null){oAgentName.value='';}}
oDisplayAgent=document.getElementById('spnDisplayAgent');if(oDisplayAgent!==null){oDisplayAgent.innerHTML='';}else{if(window.opener!==null&&typeof window.opener!=='undefined'){oDisplayAgent=window.opener.document.getElementById('spnDisplayAgent','INPUT');if(oDisplayAgent!==null){oDisplayAgent.innerHTML='';}}}
oSelAgentText=document.getElementById('spnSelectAgentText');if(oSelAgentText===null&&window.opener!==null&&typeof window.opener!=='undefined'){oSelAgentText=window.opener.document.getElementById('spnSelectAgentText');}
oSelAgentTeamText=document.getElementById('spnSelectAgentTeamText');if(oSelAgentTeamText===null&&window.opener!==null&&typeof window.opener!=='undefined'){oSelAgentTeamText=window.opener.document.getElementById('spnSelectAgentTeamText');}
oDisplayAgentParent=oSelAgentText.parentElement;if(oDisplayAgentParent!==null&&typeof oDisplayAgentParent!=='undefined')
{var parentId=oDisplayAgentParent.id;if(parentId.indexOf("_divSelectAgent")>0)
{oDisplayAgentParent.style.display='inline';}}
if(oSelAgentTeamText!=null)
{oDisplayAgentTeamParent=oSelAgentTeamText.parentElement;if(oDisplayAgentTeamParent!==null&&typeof oDisplayAgentTeamParent!=='undefined')
{var parentId=oDisplayAgentTeamParent.id;if(parentId.indexOf("_divSelectAgentTeam")>0)
{oDisplayAgentTeamParent.style.display='inline';}}}
oClearAgent=document.getElementById('spnClearAgent');if(oClearAgent!==null)
{oClearAgent.style.display='none';oSelAgentText.style.display='';}else{if(window.opener!==null&&typeof window.opener!=='undefined'){oClearAgent=window.opener.document.getElementById('spnClearAgent','INPUT');if(oClearAgent!==null){oClearAgent.style.display='none';oSelAgentText.style.display='';}}}}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.clearAgentInfo',_oErrorHandler.ERRORTYPE_JS,err);}},clearTeamInfo:function(){var oTeamID=null;var oTeamName=null;var oDisplayTeam=null;var oClearTeam=null;var oDisplayAgentParent=null;var oDisplayAgentTeamParent=null;try{oTeamID=_oUtility.getElementByTagNameAndID('hdnTeamID','INPUT');if(oTeamID!==null){oTeamID.value=0;}else{oTeamID=window.opener._oUtility.getElementByTagNameAndID('hdnTeamID','INPUT');if(oTeamID!==null){oTeamID.value=0;}}
oTeamName=_oUtility.getElementByTagNameAndID('hdnTeamName','INPUT');if(oTeamName!==null){oTeamName.value='';}else{oTeamName=window.opener._oUtility.getElementByTagNameAndID('hdnTeamName','INPUT');if(oTeamName!==null){oTeamName.value='';}}
oDisplayTeam=document.getElementById('spnDisplayTeam','INPUT');if(oDisplayTeam!==null){oDisplayTeam.innerHTML='';}else{if(window.opener!==null&&typeof window.opener!=='undefined'){oDisplayTeam=window.opener.document.getElementById('spnDisplayTeam','INPUT');if(oDisplayTeam!==null){oDisplayTeam.innerHTML='';}}}
oSelAgentText=document.getElementById('spnSelectAgentText');if(oSelAgentText===null&&window.opener!==null&&typeof window.opener!=='undefined'){oSelAgentText=window.opener.document.getElementById('spnSelectAgentText');}
oSelAgentTeamText=document.getElementById('spnSelectAgentTeamText');if(oSelAgentTeamText===null&&window.opener!==null&&typeof window.opener!=='undefined'){oSelAgentTeamText=window.opener.document.getElementById('spnSelectAgentTeamText');}
oDisplayAgentParent=oSelAgentText.parentElement;if(oDisplayAgentParent!==null&&typeof oDisplayAgentParent!=='undefined'){var parentId=oDisplayAgentParent.id;if(parentId.indexOf("_divSelectAgent")>0){oDisplayAgentParent.style.display='inline';}}
if(oSelAgentTeamText!=null){oDisplayAgentTeamParent=oSelAgentTeamText.parentElement;if(oDisplayAgentTeamParent!==null&&typeof oDisplayAgentTeamParent!=='undefined'){var parentId=oDisplayAgentTeamParent.id;if(parentId.indexOf("_divSelectAgentTeam")>0){oDisplayAgentTeamParent.style.display='inline';}}}
oClearTeam=document.getElementById('spnClearTeam');if(oClearTeam!==null){oClearTeam.style.display='none';oSelAgentText.style.display='';}else{if(window.opener!==null&&typeof window.opener!=='undefined'){oClearTeam=window.opener.document.getElementById('spnClearTeam','INPUT');if(oClearTeam!==null){oClearTeam.style.display='none';oSelAgentText.style.display='';}}}}
catch(err){_oErrorHandler.Error('NRT.MySite.UI.clearTeamInfo',_oErrorHandler.ERRORTYPE_JS,err);}},getSelectedCheckBoxes:function(checkboxName)
{var aSelectedCheckBoxes=[];var allInputs=null;var x=0;try
{allInputs=_oUtility.getElementsByTagNameAndID(checkboxName,'INPUT');for(x=0;x<allInputs.length;x+=1)
{if(allInputs[x].type==='checkbox')
{if(allInputs[x].checked===true)
{aSelectedCheckBoxes.push(allInputs[x]);}}}
return aSelectedCheckBoxes;}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.getSelectedCheckBoxes',_oErrorHandler.ERRORTYPE_JS,err);}},initialize:function(Settings)
{var sArray=null;try
{sArray=Settings.split("|");if(sArray.length>0)
{_WebsiteID=sArray[0];_MetroMySiteName=sArray[1];_CookieExpireDays=sArray[2];_CookieLoginExpireMin=sArray[3];_MaxSavedProperties=sArray[4];_MaxSavedSearches=sArray[5];_SavedSearchXSLTPath=sArray[6];_SavedSearchDetailsXSLTPath=sArray[7];_ShowGlobalAlerts=sArray[8];_ShowEmailAlerts=sArray[9];_ShowFreq=sArray[10];_ShowAdditionalEmail=sArray[11];_ShowSendToAgent=sArray[12];_AllowDisableAccount=sArray[13];_EmailFrom=sArray[14];_AltEmailTo=sArray[15];_AgentLinkURL=sArray[16];_WebsiteHasTeams=sArray[17];}
if(NRT.MySite.UI.pageIsMySiteLogin())
{NRT.MySite.Login.prefillEmailAddress();}
if(NRT.MySite.UI.pageIsPropertySearch()||NRT.MySite.UI.pageIsPropertyResults()||NRT.MySite.UI.pageIsPropertyDetails())
{NRT.MySite.Authentication.prefillEmailAddress();}
NRT.MySite.Authentication.setFormsAuthCookie();}
catch(err)
{_oErrorHandler.Error('NRT.MySite.initialize',_oErrorHandler.ERRORTYPE_JS,err);return;}},initTab:function()
{var aTabs=null;try
{NRT.MySite.TabCaptions.init();aTabs=NRT.MySite.TabCaptions.getTabCaptions();if(aTabs!==null)
{_oTab.setTabs(aTabs);_oTab.setTabAlign('LEFT');_oTab.load();}}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.initTab',_oErrorHandler.ERRORTYPE_JS,err);return;}},pageIsMySiteHome:function()
{var sSearchString='';var sPageName='';try
{sSearchString=window.location.pathname.toUpperCase();sPageName=sSearchString.search(/MYSITEHOME.ASPX/);if(sPageName>0)
{return true;}else{return false;}}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.pageIsMySiteHome',_oErrorHandler.ERRORTYPE_JS,err);return;}},pageIsMySiteLogin:function()
{var sSearchString='';var sPageName='';try
{sSearchString=window.location.pathname.toUpperCase();sPageName=sSearchString.search(/MYSITELOGIN.ASPX/);if(sPageName>0)
{return true;}else{return false;}}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.pageIsMySiteLogin',_oErrorHandler.ERRORTYPE_JS,err);return;}},pageIsMySiteMain:function()
{var sSearchString='';var sPageName='';try
{sSearchString=window.location.pathname.toUpperCase();sPageName=sSearchString.search(/MYSITEMAIN.ASPX/);if(sPageName>0)
{return true;}else{return false;}}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.pageIsMySiteMain',_oErrorHandler.ERRORTYPE_JS,err);return;}},pageIsMySiteRegister:function()
{var sSearchString='';var sPageName='';try
{sSearchString=window.location.pathname.toUpperCase();sPageName=sSearchString.search(/MYSITEREGISTER.ASPX/);if(sPageName>0)
{return true;}else{return false;}}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.pageIsMySiteRegister',_oErrorHandler.ERRORTYPE_JS,err);return;}},pageIsPropertyDetails:function()
{var sSearchString='';var sPageName='';try
{sSearchString=window.location.pathname.toUpperCase();sPageName=sSearchString.search(/PROPERTYDETAILS.ASPX/);if(sPageName>0)
{return true;}else{return false;}}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.pageIsPropertyDetails',_oErrorHandler.ERRORTYPE_JS,err);return;}},pageIsPropertySearch:function()
{var sSearchString='';var sPageName='';try
{sSearchString=window.location.pathname.toUpperCase();sPageName=sSearchString.search(/PROPERTYSEARCH.ASPX/);if(sPageName>0)
{return true;}else{return false;}}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.pageIsPropertySearch',_oErrorHandler.ERRORTYPE_JS,err);return;}},pageHasAuthentication:function()
{var oDivAuthSavedSearchLogin=document.getElementById('divAuthSavedSearchLogin');try{if(oDivAuthSavedSearchLogin!==null&&typeof oDivAuthSavedSearchLogin!=='undefined'){if(oDivAuthSavedSearchLogin.style.visibility!=="hidden"||oDivAuthSavedSearchLogin.style.display!=="none"||oDivAuthSavedSearchLogin.disabled!==true){return true;}else{return false;}}}catch(err){_oErrorHandler.Error('NRT.MySite.UI.pageHasAuthentication',_oErrorHandler.ERRORTYPE_JS,err);return;}},pageIsHomePage:function()
{var sSearchString='';var sPageName='';try
{sSearchString=window.location.pathname.toUpperCase();if(sSearchString.search(/.ASPX/)<=0)
{sPageName=1}else{sPageName=sSearchString.search(/DEFAULT.ASPX/);}
if(sPageName>0)
{return true;}else{return false;}}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.pageIsHomePage',_oErrorHandler.ERRORTYPE_JS,err);return;}},pageIsPropertyResults:function()
{var sSearchString='';var sPageName='';try
{sSearchString=window.location.pathname.toUpperCase();sPageName=sSearchString.search(/PROPERTYRESULTS.ASPX/);if(sPageName>0)
{return true;}else{return false;}}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.pageIsPropertyResults',_oErrorHandler.ERRORTYPE_JS,err);return;}},redirectToHomePage:function()
{try
{window.location=_oUtility.getAppPath()+_HomePageURL;}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.redirectToHomePage',_oErrorHandler.ERRORTYPE_JS,err);return;}},redirectToLoginPage:function(tabID)
{try
{if(_LoginPageURL.lastIndexOf('?')>-1){window.location=_oUtility.getAppPath()+_LoginPageURL;}else{window.location=_oUtility.getAppPath()+_LoginPageURL;}}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.redirectToLoginPage',_oErrorHandler.ERRORTYPE_JS,err);return;}},redirectToMyAccount:function()
{try
{if(NRT.MySite.UI.pageIsMySiteHome())
{NRT.MySite.UI.tabClick(2);}else{var qs=window.location.search;qs=qs.toLowerCase();if((_WebsiteID==='10')&&(qs.lastIndexOf('ab=1&agentid=')>-1))
{var newURL=qs.replace("tab=0","");if(_MyAccountURL.lastIndexOf('?')>-1)
{newURL=newURL.replace("?","&");newURL=newURL.replace("&&","&");}
newURL=newURL.replace("?&","?");var compareURL=_MyAccountURL.toLowerCase();if(compareURL.lastIndexOf('&ab=1&agentid=')>-1)
{window.location=_oUtility.getAppPath()+_MyAccountURL;}else{window.location=_oUtility.getAppPath()+_MyAccountURL+newURL;}}else{window.location=_oUtility.getAppPath()+_MyAccountURL;}}}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.redirectToMyAccount',_oErrorHandler.ERRORTYPE_JS,err);return;}},redirectToMySavedProperties:function()
{try
{if(NRT.MySite.UI.pageIsMySiteHome())
{NRT.MySite.UI.tabClick(1);}else{if(!NRT.MySite.UI.pageIsHomePage())
{Progress.fn.show('',true,'Loading Saved Properties');}
var qs=window.location.search;qs=qs.toLowerCase();if((_WebsiteID==='10')&&(qs.lastIndexOf('ab=1&agentid=')>-1))
{var newURL=qs.replace("tab=0","");if(_MySavedPropertiesURL.lastIndexOf('?')>-1)
{newURL=newURL.replace("?","&");newURL=newURL.replace("&&","&");}
newURL=newURL.replace("?&","?");var compareURL=_MySavedPropertiesURL.toLowerCase();if(compareURL.lastIndexOf('&ab=1&agentid=')>-1)
{window.location=_oUtility.getAppPath()+_MySavedPropertiesURL;}else{window.location=_oUtility.getAppPath()+_MySavedPropertiesURL+newURL;}}else{window.location=_oUtility.getAppPath()+_MySavedPropertiesURL;}}}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.redirectToMySavedProperties',_oErrorHandler.ERRORTYPE_JS,err);return;}},redirectToMySavedSearches:function()
{try
{if(NRT.MySite.UI.pageIsMySiteHome())
{NRT.MySite.UI.tabClick(0);}else{if(!NRT.MySite.UI.pageIsHomePage())
{Progress.fn.show('',true,'Loading Saved Searches');}
var qs=window.location.search;qs=qs.toLowerCase();if((_WebsiteID==='10')&&(qs.lastIndexOf('ab=1&agentid=')>-1))
{var newURL=qs.replace("tab=0","");if(_MySavedSearchesURL.lastIndexOf('?')>-1)
{newURL=newURL.replace("?","&");newURL=newURL.replace("&&","&");}
newURL=newURL.replace("?&","?");var compareURL=_MySavedSearchesURL.toLowerCase();if(compareURL.lastIndexOf('&ab=1&agentid=')>-1)
{window.location=_oUtility.getAppPath()+_MySavedSearchesURL;}else{window.location=_oUtility.getAppPath()+_MySavedSearchesURL+newURL;}}else{window.location=_oUtility.getAppPath()+_MySavedSearchesURL;}}}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.redirectToMySavedSearches',_oErrorHandler.ERRORTYPE_JS,err);return;}},redirectToRegistrationPage:function()
{try
{if(NRT.Utility.getQueryStringParam('RedirectURL')!==null)
{window.location=_oUtility.getAppPath()+_RegisterPageURL+'?RedirectURL='+_oUtility.decodeURL(NRT.Utility.getQueryStringParam('RedirectURL'));}
else
{window.location=_oUtility.getAppPath()+_RegisterPageURL;}}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.redirectToRegistrationPage',_oErrorHandler.ERRORTYPE_JS,err);return;}},redirectToPropertyResultsPage:function(ConsumerSearchID,SearchOptionID)
{var DTSince=null;var dtToday=null;var dtMonth=null;var dtDay=null;var dtYear=null;var iConsumerId=0;var oLastLoginDate=null;var sURL='';try
{switch(SearchOptionID)
{case 0:DTSince=null;break;case 1:dtToday=new Date();dtMonth=dtToday.getMonth()+1;dtDay=dtToday.getDate();dtYear=dtToday.getFullYear();DTSince=dtMonth+'/'+dtDay+'/'+dtYear;break;case 2:iConsumerId=NRT.MySite.Authentication.getConsumerID();oLastLoginDate=MySiteProvider.GetLastLoginDate(_WebsiteID,iConsumerId);if(oLastLoginDate!==null&&typeof oLastLoginDate!=='undefined')
{DTSince=oLastLoginDate.value;}
break;}
sURL=_oUtility.getAppPath()+_PropertyResultsURL;if(sURL.indexOf('?')>-1)
{sURL+='&ConsumerSearchID='+ConsumerSearchID+'&CallingPage=7'+'&SearchOption='+SearchOptionID;}else{sURL+='?ConsumerSearchID='+ConsumerSearchID+'&CallingPage=7'+'&SearchOption='+SearchOptionID;}
if(DTSince!==null&&typeof DTSince!=='undefined')
{sURL+='&DTSince='+DTSince;}
window.location=sURL;}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.redirectToPropertyResultsPage',_oErrorHandler.ERRORTYPE_JS,err);return;}},redirectToPropertySearchPage:function()
{try
{if(_WebsiteID==='10')
{var qs=window.location.search;qs=qs.toLowerCase();if(qs.lastIndexOf('ab=1&agentid=')>-1)
{var newURL=qs.replace("?","&");newURL=newURL.replace(/propsearch=[0-9]+/,"");var compareURL=_PropertySearchURL.toLowerCase();if(compareURL.lastIndexOf('ab=1&agentid=')>-1)
{window.location=_oUtility.getAppPath()+_PropertySearchURL;}else{window.location=_oUtility.getAppPath()+_PropertySearchURL+newURL;}}else{window.location=_oUtility.getAppPath()+_PropertySearchURL;}}else{window.location=_oUtility.getAppPath()+_PropertySearchURL;}}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.redirectToPropertySearchPage',_oErrorHandler.ERRORTYPE_JS,err);return;}},setAgentInfo:function(personnelID,agentName)
{var oAgentID=null;var oAgentName=null;var oDisplayAgent=null;var oClearAgent=null;var oDisplayAgentParent=null;var oDisplayAgentTeamParent=null;try
{NRT.MySite.UI.clearTeamInfo();oAgentID=_oUtility.getElementByTagNameAndID('hdnAgentID','INPUT');if(oAgentID!==null)
{oAgentID.value=personnelID;}else{oAgentID=window.opener._oUtility.getElementByTagNameAndID('hdnAgentID','INPUT');if(oAgentID!==null)
{oAgentID.value=personnelID;}}
oAgentName=_oUtility.getElementByTagNameAndID('hdnAgentName','INPUT');if(oAgentName!==null)
{oAgentName.value=agentName;}else{oAgentName=window.opener._oUtility.getElementByTagNameAndID('hdnAgentName','INPUT');if(oAgentName!==null)
{oAgentName.value=agentName;}}
oSelAgentText=document.getElementById('spnSelectAgentText');if(oSelAgentText===null&&(window.opener!==null&&typeof window.opener!='undefined')){oSelAgentText=window.opener.document.getElementById('spnSelectAgentText');}
oSelAgentTeamText=document.getElementById('spnSelectAgentTeamText');if(oSelAgentTeamText===null&&(window.opener!==null&&typeof window.opener!='undefined')){oSelAgentTeamText=window.opener.document.getElementById('spnSelectAgentTeamText');}
oDisplayAgentParent=oSelAgentText.parentElement;if(oDisplayAgentParent!==null&&typeof oDisplayAgentParent!=='undefined')
{var parentId=oDisplayAgentParent.id;if(parentId.indexOf("_divSelectAgent")>0)
{oDisplayAgentParent.style.display='none';}}
if(oSelAgentTeamText!=null)
{oDisplayAgentTeamParent=oSelAgentTeamText.parentElement;if(oDisplayAgentTeamParent!==null&&typeof oDisplayAgentTeamParent!=='undefined')
{var parentId=oDisplayAgentTeamParent.id;if(parentId.indexOf("_divSelectAgentTeam")>0)
{oDisplayAgentTeamParent.style.display='none';}}}
oDisplayAgent=document.getElementById('spnDisplayAgent');if(oDisplayAgent!==null)
{oDisplayAgent.innerHTML=agentName;oSelAgentText.style.display='none';}else{oDisplayAgent=window.opener.document.getElementById('spnDisplayAgent');if(oDisplayAgent!==null)
{oDisplayAgent.innerHTML=agentName;oSelAgentText.style.display='none';}else{oSelAgentText.style.display='';}}
oClearAgent=document.getElementById('spnClearAgent');if(oClearAgent!==null)
{oClearAgent.style.display='inline';}else{oClearAgent=window.opener.document.getElementById('spnClearAgent');if(oClearAgent!==null)
{oClearAgent.style.display='inline';}}}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.setAgentInfo',_oErrorHandler.ERRORTYPE_JS,err);}},setTeamInfo:function(TeamID,TeamName)
{var oTeamID=null;var oTeamName=null;var oDisplayTeam=null;var oClearTeam=null;try
{NRT.MySite.UI.clearAgentInfo();oTeamID=_oUtility.getElementByTagNameAndID('hdnTeamID','INPUT');if(oTeamID!==null)
{oTeamID.value=TeamID;}else{oTeamID=window.opener._oUtility.getElementByTagNameAndID('hdnTeamID','INPUT');if(oTeamID!==null)
{oTeamID.value=TeamID;}}
oTeamName=_oUtility.getElementByTagNameAndID('hdnTeamName','INPUT');if(oTeamName!==null)
{oTeamName.value=TeamName;}else{oTeamName=window.opener._oUtility.getElementByTagNameAndID('hdnTeamName','INPUT');if(oTeamName!==null)
{oTeamName.value=TeamName;}}
oSelAgentText=document.getElementById('spnSelectAgentText');if(oSelAgentText===null&&(window.opener!==null&&typeof window.opener!='undefined')){oSelAgentText=window.opener.document.getElementById('spnSelectAgentText');}
oSelAgentTeamText=document.getElementById('spnSelectAgentTeamText');if(oSelAgentTeamText===null&&(window.opener!==null&&typeof window.opener!='undefined')){oSelAgentTeamText=window.opener.document.getElementById('spnSelectAgentTeamText');}
oDisplayAgentParent=oSelAgentText.parentElement;if(oDisplayAgentParent!==null&&typeof oDisplayAgentParent!=='undefined'){var parentId=oDisplayAgentParent.id;if(parentId.indexOf("_divSelectAgent")>0){oDisplayAgentParent.style.display='none';}}
if(oSelAgentTeamText!=null){oDisplayAgentTeamParent=oSelAgentTeamText.parentElement;if(oDisplayAgentTeamParent!==null&&typeof oDisplayAgentTeamParent!=='undefined'){var parentId=oDisplayAgentTeamParent.id;if(parentId.indexOf("_divSelectAgentTeam")>0){oDisplayAgentTeamParent.style.display='none';}}}
oDisplayTeam=document.getElementById('spnDisplayTeam');if(oDisplayTeam!==null)
{oDisplayTeam.innerHTML=TeamName;oSelAgentText.style.display='none';}else{oDisplayTeam=window.opener.document.getElementById('spnDisplayTeam');if(oDisplayTeam!==null)
{oDisplayTeam.innerHTML=TeamName;oSelAgentText.style.display='none';}else{oSelAgentText.style.display='';}}
oClearTeam=document.getElementById('spnClearTeam');if(oClearTeam!==null)
{oClearTeam.style.display='inline';}else{oClearTeam=window.opener.document.getElementById('spnClearTeam');if(oClearTeam!==null)
{oClearTeam.style.display='inline';}}}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.setTeamInfo',_oErrorHandler.ERRORTYPE_JS,err);}},setCheckBoxTextStyle:function(control)
{var divTextControl=null;try
{divTextControl=control.parentNode;if(control.checked)
{divTextControl.style.fontWeight='bold';}else{divTextControl.style.fontWeight='';}}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.setCheckBoxTextStyle',_oErrorHandler.ERRORTYPE_JS,err);return;}},showAgentLookupWindow:function()
{var sURL='';try
{sURL='/MySite/AgentSearch.aspx'+NRT.Utility.Branding.getBranding('?');_oUtility.showNewWindow(sURL,'',_WinW_AgentLookup,_WinH_AgentLookup);}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.showAgentLookupWindow',_oErrorHandler.ERRORTYPE_JS,err);}},showAgentTeamSearchWindow:function(searchtype)
{var sURL='';try
{if(searchtype==='agent'){sURL='/MySite/AgentSearch.aspx?st=a'+NRT.Utility.getBranding('?');_oUtility.showNewWindow(sURL,'',_WinW_AgentLookup,_WinW_AgentLookup);}else if(searchtype==='team'){sURL='/MySite/AgentSearch.aspx?st=t'+NRT.Utility.getBranding('?');_oUtility.showNewWindow(sURL,'',_WinW_TeamLookup,_WinH_TeamLookup);}}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.showAgentTeamSearchWindow',_oErrorHandler.ERRORTYPE_JS,err);}},showConfirmationLayeredWindow:function(ConfirmType,ConsumerID)
{var sQueryString=null;try
{switch(ConfirmType)
{case _ConfirmationType_SavedSearches:sQueryString='controlType=SaveSearchConfirmation&ConsumerID='+ConsumerID;_oUtility.showLayeredPage(sQueryString,_WinW_Confirmation,_WinTitle_Confirmation_SS,_DefFocusItemID_Confirmation,_DefFocusItemType_Confirmation);break;case _ConfirmationType_SavedProperties:sQueryString='controlType=SavePropertyConfirmation';_oUtility.showLayeredPage(sQueryString,_WinW_Confirmation,_WinTitle_Confirmation_SP,_DefFocusItemID_Confirmation,_DefFocusItemType_Confirmation);break;}}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.showConfirmationLayeredWindow',_oErrorHandler.ERRORTYPE_JS,err);return;}},showLayeredWindow:function(control,title,width,defaultfocusitemid,defaultfocusitemtype)
{var sQueryString=null;try
{qs=location.search.length>0?'&'+location.search.substr(1):'';sQueryString='controlType='+control+qs;if(width===null)
{_oUtility.showLayeredPage(sQueryString,_defWidth,title.toUpperCase(),defaultfocusitemid,defaultfocusitemtype);}else{_oUtility.showLayeredPage(sQueryString,width,title.toUpperCase(),defaultfocusitemid,defaultfocusitemtype);}}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.showLayeredWindow',_oErrorHandler.ERRORTYPE_JS,err);}},showRememberMeAlertWindow:function(title)
{var sHTML="";try
{sHTML+="<table style='border:0px; padding:0px; WIDTH:"+(_WinW_RememberMe-10)+"px;'>";sHTML+="<tr>";sHTML+="<td class='text'>";sHTML+="By selecting the \"Remember Me\" checkbox,";sHTML+=" <label class='textbold'>"+window.location.host+"</label>";sHTML+=" will place a cookie on your computer that will";sHTML+=" automatically log you in when you return to the Web site.";sHTML+="</td>";sHTML+="</tr>";sHTML+="<tr>";sHTML+="<td class='text'>";sHTML+="If you are using a shared or public computer,";sHTML+=" we recommend that you do not use this feature.";sHTML+="</td>";sHTML+="</tr>";sHTML+="<tr>";sHTML+="<td>";sHTML+="<TABLE style='padding:0px; border:0px; width:100%;'>";sHTML+="<TR>";sHTML+="<td style='height:9px;' class='separatorLineH'>";sHTML+="<img src='/NRTProducts/include/images/common_spacer.gif' border='0' width='100%' height='9'>";sHTML+="</td>";sHTML+="</TR>";sHTML+="</TABLE>";sHTML+="</td>";sHTML+="</tr>";sHTML+="<tr>";sHTML+="<td style='text-align:center;'>";sHTML+="<img id='"+_DefFocusItemID_RememberMe+"' border='0' class='pointer' src='/NRTProducts/include/images/btnOK.gif'";sHTML+=" onmouseover=\"javascript:NRT.Utility.flipButton(this,1);\"  onmouseout=\"javascript:NRT.Utility.flipButton(this,0);\"";sHTML+=" onclick=\"javascript:NRT.Utility.closeLayeredPage();this.onblur=null;\" onblur=\"javascript:this.focus();\">";sHTML+="</td>";sHTML+="</tr>";sHTML+="</table>";_oUtility.showInfo(sHTML,_WinW_RememberMe,title.toUpperCase(),_DefFocusItemID_RememberMe);return;}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.showRememberMeAlertWindow',_oErrorHandler.ERRORTYPE_JS,err);}},showRememberMePopupWindow:function()
{var sQueryString=null;try
{sQueryString='controlType=RememberMe';_oUtility.showNewHostWindow(sQueryString,_WinW_RememberMe,_WinH_RememberMe,'');}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.showRememberMePopupWindow',_oErrorHandler.ERRORTYPE_JS,err);}},showRegistrationPage:function()
{var sQueryString=null;try
{if(NRT.MySite.UI.pageIsMySiteLogin())
{NRT.MySite.UI.redirectToRegistrationPage();}else if(NRT.MySite.UI.pageIsMySiteHome())
{sQueryString='controlType=Registration';_oUtility.showNewHostWindow(sQueryString,_WinW_Registration,_WinH_Registration,_WinTitle_Registration);}else{NRT.MySite.UI.showLayeredWindow("Registration",_WinTitle_Registration,_WinW_Registration,_DefFocusItemID_Registration,_DefFocusItemType_Registration);}}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.showRememberMePopupWindow',_oErrorHandler.ERRORTYPE_JS,err);}},tabClick:function(tabId)
{var oLblMSS=null;var oLblMSP=null;var oLblMA=null;var sBranding='';var sAbrand='';var sTbrand='';var bLoggedIn=false;try{bLoggedIn=NRT.MySite.Authentication.isUserLoggedIn();if(bLoggedIn===false){NRT.MySite.UI.redirectToLoginPage(tabId);return;}
if(NRT.MySite.Authentication.checkCookieExpiration()){oLblMSS=_oUtility.getElementByTagNameAndID('lblMySavedSearches','LABEL');oLblMSP=_oUtility.getElementByTagNameAndID('lblMySavedProperties','LABEL');oLblMA=_oUtility.getElementByTagNameAndID('lblMyAccount','LABEL');_oUtility.disableAnchor(oLblMSS,true);_oUtility.disableAnchor(oLblMSP,true);_oUtility.disableAnchor(oLblMA,true);_oTab.tabClick(tabId);switch(tabId)
{case 0:_oUtility.disableAnchor(oLblMSP,false);_oUtility.disableAnchor(oLblMA,false);Progress.fn.show(null,true,'Loading Saved Searches');MySiteUIController.GetMySavedSearchesHTML(this._getMySavedSearchesHTML_Callback);return;case 1:_oUtility.disableAnchor(oLblMSS,false);_oUtility.disableAnchor(oLblMA,false);sAbrand=_oUtility.getQueryStringParam('abrand');if(sAbrand!==null&&typeof sAbrand!=='undefined')
{sBranding='a'+sAbrand;}
sAbrand=_oUtility.getQueryStringParam('AgentID');if(sAbrand!==null&&typeof sAbrand!=='undefined')
{sBranding='a'+sAbrand;}
sTbrand=_oUtility.getQueryStringParam('tbrand');if(sTbrand!==null&&typeof sTbrand!=='undefined')
{sBranding='t'+sTbrand;}
sTbrand=_oUtility.getQueryStringParam('AgentTeamID');if(sTbrand!==null&&typeof sTbrand!=='undefined')
{sBranding='t'+sTbrand;}
Progress.fn.show(null,true,'Loading Saved Properties');MySiteUIController.GetMySavedPropertiesHTML(sBranding,this._getMySavedPropertiesHTML_Callback);return;case 2:_oUtility.disableAnchor(oLblMSS,false);_oUtility.disableAnchor(oLblMSP,false);MySiteUIController.GetMyAccountHTML(this._getMyAccountHTML_Callback);return;default:return;}}}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.tabClick',_oErrorHandler.ERRORTYPE_JS,err);return;}},_getMySavedSearchesHTML_Callback:function(response)
{var sMySavedSearchesHTML=null;var oDivTabContents=null;try
{if(response.error!==null)
{Progress.fn.hide();_oErrorHandler.ResponseError('NRT.MySite.UI._getMySavedSearchesHTML_Callback',response);return;}else{if(response!==null&&response.value!==null)
{sMySavedSearchesHTML=response.value;if(sMySavedSearchesHTML!==null&&typeof sMySavedSearchesHTML!=='undefined')
{oDivTabContents=document.getElementById('div_MainControl_TabContents');if(oDivTabContents!==null&&typeof oDivTabContents!=='undefined')
{oDivTabContents.innerHTML=sMySavedSearchesHTML;}}}}
Progress.fn.hide();}
catch(err)
{Progress.fn.hide();_oErrorHandler.Error('NRT.MySite.UI._getMySavedSearchesHTML_Callback',_oErrorHandler.ERRORTYPE_AJAX,err);}},_getMySavedPropertiesHTML_Callback:function(response)
{var sMySavedPropertiesHTML=null;var oDivTabContents=null;try
{if(response.error!==null)
{Progress.fn.hide();_oErrorHandler.ResponseError('NRT.MySite.UI._getMySavedPropertiesHTML_Callback',response);return;}else{if(response!==null&&response.value!==null)
{sMySavedPropertiesHTML=response.value;if(sMySavedPropertiesHTML!==null&&typeof sMySavedPropertiesHTML!=='undefined')
{oDivTabContents=document.getElementById('div_MainControl_TabContents');if(oDivTabContents!==null&&typeof oDivTabContents!=='undefined')
{oDivTabContents.innerHTML=sMySavedPropertiesHTML;}}}}
Progress.fn.hide();}
catch(err)
{Progress.fn.hide();_oErrorHandler.Error('NRT.MySite.UI._getMySavedPropertiesHTML_Callback',_oErrorHandler.ERRORTYPE_AJAX,err);}},_getMyAccountHTML_Callback:function(response)
{var sMyAccountHTML=null;var oDivTabContents=null;try
{if(response.error!==null)
{_oErrorHandler.ResponseError('NRT.MySite.UI._getMyAccountHTML_Callback',response);return;}else{if(response!==null&&response.value!==null)
{sMyAccountHTML=response.value;if(sMyAccountHTML!==null&&typeof sMyAccountHTML!=='undefined')
{oDivTabContents=document.getElementById('div_MainControl_TabContents');if(oDivTabContents!==null&&typeof oDivTabContents!=='undefined')
{oDivTabContents.innerHTML=sMyAccountHTML;}}}}}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI._getMyAccountHTML_Callback',_oErrorHandler.ERRORTYPE_AJAX,err);}},setAlertTextStyle:function(control)
{var oParent=null;try
{oParent=control.parentNode;if(control.checked)
{oParent.className='smallbold';}else{oParent.className='small';}}
catch(err)
{_oErrorHandler.Error('NRT.MySite.UI.setAlertTextStyle',_oErrorHandler.ERRORTYPE_JS,err);return;}}};}();