var teamProfile_PROFILE_MODE="profile";
var teamProfile_SALES_MODE="sales";
var teamProfile_PROPERTY_SALES_MODE="property_sales";
var teamProfile_PROPERTY_RENTALS_MODE="property_rentals";
var teamProfile_changeEnabled=true;
var teamProfile_currentMode=teamProfile_PROFILE_MODE;
var teamProfile_viewMode={};
teamProfile_viewMode.profile="/site/master.cfm?fuseaction=site-ajax.displayTeamProfileDetail";
teamProfile_viewMode.sales="/site/master.cfm?fuseaction=site-ajax.displayTeamProfileSales";
teamProfile_viewMode.property_sales="/site/master.cfm?fuseaction=site-ajax.displayTeamProfileListingSales";
teamProfile_viewMode.property_rentals="/site/master.cfm?fuseaction=site-ajax.displayTeamProfileListingRentals";
var teamProfile_URL="/site/master.cfm?fuseaction=site-ajax.displayTeamList";
var teamProfile_options={dataType:"html",url:teamProfile_URL,type:"GET",data:"",async:true,cache:false,success:function(responseHtml,textStatus){$("#col3_content").animate({opacity:"hide"},{queue:"false",duration:1000,easing:"linear",complete:function(){$("#col3_content").html(responseHtml);
$("#col3_content").animate({opacity:"show"},{queue:"true",duration:1000,easing:"linear"});
teamProfile_changeEnabled=true;
}});moveTop();},error:function(XMLHttpRequest,textStatus,errorThrown){alert("An error occured, please try again\n"+textStatus+" "+errorThrown);
teamProfile_changeEnabled=true;
moveTop();}};function teamProfile_switchToMode(mode,teamId){if(teamProfile_changeEnabled){$("#col3_content").animate({opacity:"hide"},{queue:"false",duration:100,easing:"linear"});
$("#col3_content").html('<div class="preloader_wrapper_col3"><div id ="loader" class="preloader_light_32_alt"/><span>Loading</span></div>');
$("#col3_content").animate({opacity:"show"},{queue:"false",duration:100,easing:"linear"});
teamProfile_options.data="teamId="+teamId;
teamProfile_options.url=teamProfile_viewMode[mode];
$("#teamProfile_mode, #teamSales_mode, #teamPropertySales_mode, #teamPropertyRentals_mode").removeClass("active");
teamProfile_setCurrentMode(mode);
teamProfile_changeEnabled=false;
$.ajax(teamProfile_options);
}return false;}function teamProfile_setCurrentMode(mode){teamProfile_currentMode=mode;
switch(mode){case teamProfile_PROFILE_MODE:$("#teamProfile_mode").addClass("active");
break;case teamProfile_SALES_MODE:$("#teamSales_mode").addClass("active");
break;case teamProfile_PROPERTY_SALES_MODE:$("#teamPropertySales_mode").addClass("active");
break;case teamProfile_PROPERTY_RENTALS_MODE:$("#teamPropertyRentals_mode").addClass("active");
break;}}function teamProfile_sendSMStoStaff(pagePath,staffId,nType,ntoKey,nfromKey,nReferer){var options={dataType:"json",url:"/site/master.cfm?fuseaction=site-ajax.validateAuth",type:"GET",async:false,cache:false,timeout:30,success:function(response){if(response.retcode=="OK"){subnav_show("site-ajax.displayPopupSMS&staffID="+staffId,0);
trackme(nType,ntoKey,nfromKey,nReferer);
}else{subnav_show("site-ajax.displayLogin",1,"component","site-ajax.displayPopupSMS%26thisPagePath="+pagePath+"%26staffID="+staffId+"%26fromStaffProfile=1");
}},error:function(XMLHttpRequest,textStatus,errorThrown){alert("An error occured, please try again\n"+textStatus+" "+errorThrown);
}};$.ajax(options);return false;
}$(document).ready(function(){$("#col3_navigation").addClass("staff_profile");
});
