﻿var RHOBI=RHOBI||{};(function($){undef="undefined";RHOBI.cometChannels=[];RHOBI.wallGUID="";RHOBI.siteGUID="";RHOBI.visitorGUID="";RHOBI.userID=0;RHOBI.userGUID="";RHOBI.authTicket="";RHOBI.sysID=0;RHOBI.sysDir=null;RHOBI.userName="";RHOBI.pwdHash="";RHOBI.user=null;RHOBI.hideLoginTab=false;RHOBI.hideOfficeTab=false;RHOBI.hideSearchBar=false;RHOBI.hideStreamSearchBar=false;RHOBI.hideBannerAds=false;RHOBI.hideCart=false;RHOBI.hideMultiLineSearch=false;RHOBI.integrated=false;RHOBI.setDebug=function(d){RHOBI.debug=d;if(RHOBI.debug){RHOBI.rhobiService="https://rodney.rhobi.com:49432";RHOBI.www="https://rodney.rhobi.com";RHOBI.communityPage="/Community.aspx";RHOBI.homeSectionGUID="c2d5b2b0-46c5-4217-8273-04e32c05275b";RHOBI.sectionGUID=RHOBI.homeSectionGUID;RHOBI.everythingGUID=RHOBI.sectionGUID;RHOBI.homeCommunityGUID="99bb5b5d-f25f-47dc-b11f-0367a1f9909f";RHOBI.communityGUID=RHOBI.homeCommunityGUID;RHOBI.everywhereGUID=RHOBI.communityGUID}else{RHOBI.rhobiService="https://service.rhobi.com";RHOBI.www="https://www.rhobi.com";RHOBI.communityPage="/Community.aspx";RHOBI.homeSectionGUID="5e334780-b28e-4ca7-a5ce-3d78265d4ff6";RHOBI.sectionGUID=RHOBI.homeSectionGUID;RHOBI.everythingGUID=RHOBI.sectionGUID;RHOBI.homeCommunityGUID="a3a28d13-6bd9-4670-8e5b-3d0eb189bf42";RHOBI.communityGUID=RHOBI.homeCommunityGUID;RHOBI.everywhereGUID=RHOBI.communityGUID}};RHOBI.setDebug(false);RHOBI.logging=false;RHOBI.successLoginCallback=null;RHOBI.successLogoutCallback=null;RHOBI.isReady=false;RHOBI.readyFunctions=[];RHOBI.undocked=false;RHOBI.wmShare="What would you like to share?";RHOBI.wmChat="Type message here...";RHOBI.wmSearch="Search part..";RHOBI.waiting=[];RHOBI.log=function(msg){if(RHOBI.logging&&RHOBI.debug){fm.utilities.log(msg)}};function js(url){s=document.createElement("script");s.type="text/javascript";s.src=url;document.getElementsByTagName("head")[0].appendChild(s)}RHOBI.ready=function(func){if(RHOBI.isReady){func()}else{RHOBI.readyFunctions.push(func)}};RHOBI.JS_wait=function(){RHOBI.waiting=[];if(typeof window.communityHelperScriptLoaded===undef){RHOBI.waiting.push("helperScriptLoaded")}if(typeof window.communityChatScriptLoaded===undef){RHOBI.waiting.push("communityChatScriptLoaded")}if(typeof window.communityLoginScriptLoaded===undef){RHOBI.waiting.push("communityLoginScriptLoaded")}if(typeof window.communityRegisterScriptLoaded===undef){RHOBI.waiting.push("communityRegisterScriptLoaded")}if(typeof window.communitySectionsScriptLoaded===undef){RHOBI.waiting.push("communitySectionsScriptLoaded")}if(typeof window.communityTabsScriptLoaded===undef){RHOBI.waiting.push("communityTabsScriptLoaded")}if(typeof window.communityContactsScriptLoaded===undef){RHOBI.waiting.push("communityContactsScriptLoaded")}if(typeof window.communityMessagesScriptLoaded===undef){RHOBI.waiting.push("communityMessagesScriptLoaded")}if(typeof window.communitySelectScriptLoaded===undef){RHOBI.waiting.push("communitySelectScriptLoaded")}if(typeof window.communityProfileScriptLoaded===undef){RHOBI.waiting.push("communityProfileScriptLoaded")}if(typeof window.communityNewsScriptLoaded===undef){RHOBI.waiting.push("communityNewsScriptLoaded")}if(typeof window.communitySearchScriptLoaded===undef){RHOBI.waiting.push("communitySearchScriptLoaded")}if(typeof window.communityCartScriptLoaded===undef){RHOBI.waiting.push("communityCartScriptLoaded")}if(typeof window.communityWallScriptLoaded===undef){RHOBI.waiting.push("communityWallScriptLoaded")}if(typeof window.communityStreamScriptLoaded===undef){RHOBI.waiting.push("communityStreamScriptLoaded")}if(typeof window.officeDashboardScriptLoaded===undef){RHOBI.waiting.push("officeDashboardScriptLoaded")}if(typeof JSON===undef){RHOBI.waiting.push("JSON")}if(typeof $===undef){RHOBI.waiting.push("$")}else{if(typeof $.fn.corner===undef){RHOBI.waiting.push("$.fn.corner")}if(typeof $.fn.elastic===undef){RHOBI.waiting.push("$.fn.elastic")}if(typeof $.fn.jstree===undef){RHOBI.waiting.push("$.fn.jstree")}if(typeof $.fn.facebox===undef){RHOBI.waiting.push("$.fn.facebox")}if(typeof $.fn.ellipsis===undef){RHOBI.waiting.push("$.fn.ellipsis")}if(typeof $.fn.getSelection===undef){RHOBI.waiting.push("$.fn.getSelection")}if(typeof $.fn.uploadify===undef){RHOBI.waiting.push("$.fn.uploadify")}if(typeof $.colorPlugInLoaded===undef){RHOBI.waiting.push("$.colorPlugInLoaded")}if(typeof $.cookie===undef){RHOBI.waiting.push("$.cookie")}if(typeof $.jGFeed===undef){RHOBI.waiting.push("$.jGFeed")}if(typeof $.URLEncode===undef){RHOBI.waiting.push("$.URLEncode")}if(typeof $.flXHRproxy===undef){RHOBI.waiting.push("$.flXHRproxy")}if(typeof $.jgrid===undef){RHOBI.waiting.push("$.jgrid")}}if(typeof flensed===undef){RHOBI.waiting.push("flensed")}if(typeof swfobject===undef){RHOBI.waiting.push("swfobject")}if(fm===undef){RHOBI.waiting.push("fm")}else{if(typeof fm.websync===undef){RHOBI.waiting.push("fm.websync")}if(typeof fm.websync.client===undef){RHOBI.waiting.push("fm.websync.client")}}if(typeof dateFormat===undef){RHOBI.waiting.push("dateFormat")}if(typeof passwordStrength===undef){RHOBI.waiting.push("passwordStrength")}if(typeof gapi===undef||typeof gapi.plusone===undef){RHOBI.waiting.push("gapi.plusone")}if(typeof addthis===undef){}if(RHOBI.waiting.length>0){window.setTimeout(RHOBI.JS_wait,100)}else{RHOBI.JS_ready()}};RHOBI.JS_ready=function(){RHOBI.log("JS_ready");RHOBI.isFlashSupported=false;(new flensed.checkplayer("9.0.124",function(cp){RHOBI.isFlashSupported=cp.checkPassed;if(!RHOBI.isFlashSupported){}else{$.flXHRproxy.registerOptions(RHOBI.rhobiService+"/",{xmlResponseText:false})}}));RHOBI.connectComet();var evalString=$.cookie("rhobiEvalJS");isEval=evalString&&evalString.length>0;function onAuthLoaded(){RHOBI.communityInit(isEval);RHOBI.isReady=true;while(RHOBI.readyFunctions.length>0){var func=RHOBI.readyFunctions.pop();func()}if(isEval){$.cookie("rhobiEvalJS",null,{path:"/"});eval(evalString)}}RHOBI.loadAuthFromCookie(onAuthLoaded)};RHOBI.load=function(){$.extend($.expr[":"],{focus:function(element){return element==document.activeElement}});if(typeof window.communityHelperScriptLoaded===undef){js(RHOBI.www+"/scripts/communityHelper.js")}if(typeof window.communityChatScriptLoaded===undef){js(RHOBI.www+"/scripts/communityChat.js")}if(typeof window.communityLoginScriptLoaded===undef){js(RHOBI.www+"/scripts/communityLogin.js")}if(typeof window.communityRegisterScriptLoaded===undef){js(RHOBI.www+"/scripts/communityRegister.js")}if(typeof window.communitySectionsScriptLoaded===undef){js(RHOBI.www+"/scripts/communitySections.js")}if(typeof window.communityTabsScriptLoaded===undef){js(RHOBI.www+"/scripts/communityTabs.js")}if(typeof window.communityContactsScriptLoaded===undef){js(RHOBI.www+"/scripts/communityContacts.js")}if(typeof window.communityMessagesScriptLoaded===undef){js(RHOBI.www+"/scripts/communityMessages.js")}if(typeof window.communitySelectScriptLoaded===undef){js(RHOBI.www+"/scripts/communitySelect.js")}if(typeof window.communityProfileScriptLoaded===undef){js(RHOBI.www+"/scripts/communityProfile.js")}if(typeof window.communityNewsScriptLoaded===undef){js(RHOBI.www+"/scripts/communityNews.js")}if(typeof window.communitySearchScriptLoaded===undef){js(RHOBI.www+"/scripts/communitySearch.js")}if(typeof window.communityCartScriptLoaded===undef){js(RHOBI.www+"/scripts/communityCart.js")}if(typeof window.communityWallScriptLoaded===undef){js(RHOBI.www+"/scripts/communityWall.js")}if(typeof window.communityStreamScriptLoaded===undef){js(RHOBI.www+"/scripts/communityStream.js")}if(typeof window.officeDashboardScriptLoaded===undef){js(RHOBI.www+"/scripts/officeDashboard.js")}if(typeof JSON===undef){js(RHOBI.www+"/scripts/json2.js")}if(typeof $.fn.corner===undef){js(RHOBI.www+"/scripts/jquery.corner.js")}if(typeof $.fn.elastic===undef){js(RHOBI.www+"/scripts/jquery.elastic.js")}if(typeof $.fn.jstree===undef){js(RHOBI.www+"/scripts/jquery.jstree.js")}if(typeof $.fn.facebox===undef){js(RHOBI.www+"/scripts/facebox/facebox.js")}if(typeof $.fn.ellipsis===undef){js(RHOBI.www+"/scripts/jquery.ellipsis.js")}if(typeof $.fn.getSelection===undef){js(RHOBI.www+"/scripts/jquery-fieldselection.min.js")}if(typeof $.fn.uploadify===undef){js(RHOBI.www+"/scripts/jquery.uploadify-v2.1.4/jquery.uploadify.v2.1.4.min.js")}if(typeof $.colorPlugInLoaded===undef){js(RHOBI.www+"/scripts/jquery.color.js")}if(typeof $.cookie===undef){js(RHOBI.www+"/scripts/jquery.cookie.js")}if(typeof $.jGFeed===undef){js(RHOBI.www+"/scripts/jquery.jgfeed-min.js")}if(typeof $.URLEncode===undef){js(RHOBI.www+"/scripts/urlEncode.js")}if(typeof $.jgrid===undef){js(RHOBI.www+"/scripts/jqGrid/js/jquery.jqGrid.min.js")}if(typeof $.flXHRproxy===undef){js(RHOBI.www+"/scripts/flensed-1.0/deploy/flXHR.js")}if(typeof dateFormat===undef){js(RHOBI.www+"/scripts/date.format.js")}if(typeof passwordStrength===undef){js(RHOBI.www+"/scripts/passwordStrengthMeter.js")}if(typeof gapi===undef||typeof gapi.plusone===undef){js("https://apis.google.com/js/plusone.js")}if(1==1){js("https://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4e1e002d01a6f27c")}$(function(){if(RHOBI.logging){$("#communityDiv").append("<a href='javascript:void(0);' onclick=\"RHOBI.alertWaitingScripts();return false;\">waiting</a>")}RHOBI.JS_wait()})};RHOBI.alertWaitingScripts=function(){var s="WAITING ON:\r\n";for(var i in RHOBI.waiting){var i2=RHOBI.waiting[i];s+=i2+"\r\n"}alert(s);alert(fm);alert(parent.fm)};RHOBI.call=function(method,serviceName,data,callback){var ajaxParams={type:method,url:RHOBI.rhobiService+"/RHOBI.svc/json/"+serviceName,success:callback,error:function(e){alert(JSON.stringify(e))}};if(method=="POST"){ajaxParams.data=JSON.stringify(data);ajaxParams.contentType="application/json; charset=utf-8";ajaxParams.dataType="json"}else{if(method=="GET"){ajaxParams.data=data;ajaxParams.dataType="jsonp"}}if(RHOBI.isFlashSupported){ajaxParams.transport="flXHRproxy"}$.ajax(ajaxParams)};RHOBI.request=function(serviceName,data,callback){var request=JSON.stringify(data);var chunks=request.match(RegExp(".{1,600}","g"));var reqs=new Array();var reqObject={serviceName:serviceName,packetNum:1,totalPackets:chunks.length,authTicket:RHOBI.authTicket,requestGUID:null,request:chunks[0]};$.ajax({type:"GET",url:RHOBI.rhobiService+"/RHOBI.svc/json/Request",success:function(response){if(chunks.length==1){if(callback!=null){callback(response!=null?JSON.parse(response):null)}}else{var respObj=JSON.parse(response);reqs[respObj.RequestGUID+"-1"]=true;function checkDone(){var done=true;for(i=1;i<=chunks.length;i++){if(reqs[respObj.RequestGUID+"-"+i]!==true){done=false;break}}if(done){$.ajax({type:"GET",url:RHOBI.rhobiService+"/RHOBI.svc/json/Response",success:function(response){if(callback!=null){callback(response!=null?JSON.parse(response):null)}},error:function(e){alert("Network error processing request")},data:{requestGUID:respObj.RequestGUID},dataType:"jsonp"})}else{window.setTimeout(checkDone,100)}}for(i=1;i<chunks.length;i++){var c=chunks[i];var packetNum=i+1;var reqObject={serviceName:serviceName,packetNum:packetNum,totalPackets:chunks.length,requestGUID:respObj.RequestGUID,request:c};$.ajax({type:"GET",url:RHOBI.rhobiService+"/RHOBI.svc/json/Request",success:function(response){var respObj=JSON.parse(response);reqs[respObj.RequestGUID+"-"+respObj.PacketNum]=true},error:function(e){alert("Network error processing request")},data:reqObject,dataType:"jsonp"})}checkDone()}},error:function(e){alert("Network error processing request")},data:reqObject,dataType:"jsonp"})};RHOBI.getVisitorGUID=function(){if(RHOBI.visitorGUID==""){var c=$.cookie("rhobi_visitorGUID");if(c==null||c.length==0){RHOBI.visitorGUID=guidGenerator();$.cookie("rhobi_visitorGUID",RHOBI.visitorGUID,{expires:365,path:"/"})}else{RHOBI.visitorGUID=c}}return RHOBI.visitorGUID};RHOBI.connectComet=function(){RHOBI.log("connectComet");fm.websync.client.initialize({key:"ac229198-958a-4349-8915-ef29533ac11f"});fm.websync.client.connect({onSuccess:function(args){RHOBI.log("*connectComet success")},onFailure:function(args){RHOBI.log("*connectComet fail: "+args.error)}});RHOBI.connectDomainMonitor()};RHOBI.connectDomainMonitor=function(){if(RHOBI.siteGUID!=""){var boundRecords=[{key:"visitorGUID",value:RHOBI.getVisitorGUID()},{key:"domainGUID",value:RHOBI.siteGUID},{key:"href",value:window.location.href}];fm.websync.client.bind({records:boundRecords,onSuccess:function(args){fm.websync.client.subscribe({channel:"/domain/"+RHOBI.siteGUID,onSuccess:function(args){RHOBI.log("*subscribeDomain success")},onFailure:function(args){RHOBI.log("*subscribeDomain fail: "+args.error)},onReceive:function(msg){}});fm.websync.client.subscribe({channel:"/domain/"+RHOBI.siteGUID+"/visitor/"+RHOBI.visitorGUID,onSuccess:function(args){RHOBI.log("*subscribeDomain/Visitor success")},onFailure:function(args){RHOBI.log("*subscribeDomain/Visitor fail: "+args.error)},onReceive:function(msg){}})}})}};RHOBI.communityInit=function(isEval){RHOBI.log("communityInit");var sGUID=getParameterByName("sectionGUID");var forcedSection=false;if(sGUID!=""){RHOBI.homeSectionGUID=sGUID;forcedSection=true}RHOBI.sectionGUID=RHOBI.homeSectionGUID;var cGUID=getParameterByName("communityGUID");var forcedCommunity=false;if(cGUID!=""){RHOBI.homeCommunityGUID=cGUID;forcedCommunity=true}RHOBI.communityGUID=RHOBI.homeCommunityGUID;var wGUID=getParameterByName("wallGUID");if(wGUID!=""){RHOBI.wallGUID=wGUID}else{if(!forcedSection&&!forcedCommunity){if(RHOBI.userGUID!=""&&RHOBI.sysDir!=null&&RHOBI.sysDir.WallGUID!=null){RHOBI.wallGUID=RHOBI.sysDir.WallGUID}}}if(RHOBI.siteGroupID==37){RHOBI.wallGUID="4cb5e06f-a0ac-4d18-9f7b-f9633a4b6c09"}else{if(RHOBI.groupID==32){RHOBI.wallGUID="86c718ec-2a23-4979-b8c4-926356e7a299"}}communityHtml="<table cellspacing='0' cellpadding='0' id='rhobi_bodytable'><tr><td valign='top'><table cellpadding='0' cellspacing='0' class='rhobi_fullWidth'><tr id='rhobi_topBar'><td><div id='rhobi_streamSearchDiv' style='padding-left:20px'></div></td><td><span id='rhobi_getTheStar' style='margin-right:10px;padding:0;display:none'><a href='javascript:void(0);' title='Get the star' onclick=\"RHOBI.getTheStar();return false;\"><img src='"+RHOBI.www+"/images/city hub favicon 32x32.png' style='border:0; width:16px; height:16px'/></a></span><span id='rhobi_streamName'></span></td></tr><tr><td id='rhobi_leftContent'><div id='rhobi_profileArea' class='rhobi_communitySections'></div><br/><div id='rhobi_what' class='rhobi_whatwhere'>WHAT?</div><div id='rhobi_sectionNavigation'/><br/><div id='rhobi_where' class='rhobi_whatwhere'>WHERE?</div><div id='rhobi_communityNavigation'></div></td><td id='rhobi_content'></td></tr></table></td></tr></table>";var communityDiv=$("#communityDiv");communityDiv.html(communityHtml);if(communityDiv.length>0){RHOBI.loadProfileArea();RHOBI.loadSectionList();RHOBI.loadCommunityList();if(!isEval){if(RHOBI.wallGUID!=null&&RHOBI.wallGUID!=""){RHOBI.loadWall(RHOBI.wallGUID)}else{RHOBI.loadStream()}}}RHOBI.loadSearchBar("communitySearchDiv");if($("#rhobi_visitorList").length>0){RHOBI.buildVisitorList("rhobi_visitorList")}if($("#rhobi_permalink").length>0){RHOBI.loadPermalink("rhobi_permalink")}};RHOBI.showSpinner=function(divID,spinnerID){$("#"+divID).append("<div id='"+spinnerID+"'><img src='"+RHOBI.www+"/scripts/facebox/loading.gif'/></div>")};RHOBI.hideSpinner=function(spinnerID){$("#"+spinnerID).remove()};RHOBI.enterHandler=function(controlID,buttonID){$("#"+controlID).keydown(function(event){if(event.keyCode==13){$("#"+buttonID).click();return false}})};RHOBI.underConstruction=function(){$.facebox.settings.closeImage=RHOBI.www+"/scripts/facebox/closelabel.png";$.facebox("<div id='rhobi_underConstruction'>We're sorry -- That function is still being built. Please check back later.</div>")};RHOBI.openCommunityPage=function(evalString){$.cookie("rhobiEvalJS",evalString,{path:"/"});location.href=RHOBI.communityPage};RHOBI.isCommunityOpen=function(evalString){if($("#communityDiv").length==0){RHOBI.openCommunityPage(evalString);return false}return true};RHOBI.loadToDoList=function(){$("#rhobi_toDoList").remove();$("#rhobi_toDoListTrigger").remove();$("#rhobi_mainContent").append("<div id='rhobi_toDoList'><div class='rhobi_toDoItem'><a href=''>Email us</a> your inventory file (ILS, Excel, or CSV file)<br/><a href='javascript:void(0);' class='rhobi_bluebutton2' style='margin-left:30px;margin-top:5px'><span>done</span></a></div><br/><div class='rhobi_toDoItem'><a href=''>Add additional users</a> (for free). Have all your people register their own accounts<br/><a href='javascript:void(0);' class='rhobi_bluebutton2' style='margin-left:30px;margin-top:5px'><span>done</span></a></div><br/><div class='rhobi_toDoItem'><a href=''>Get code</a> to add Rhobi to your website<br/><a href='javascript:void(0);' class='rhobi_bluebutton2' style='margin-left:30px;margin-top:5px'><span>done</span></a></div><br/><div class='rhobi_toDoItem'>Post to the community (deals, thoughts, company news, etc)<br/><a href='javascript:void(0);' class='rhobi_bluebutton2' style='margin-left:30px;margin-top:5px'><span>done</span></a></div><br/><div class='rhobi_toDoItem'>Learn about our <a href=''>Premium Services<br/><a href='javascript:void(0);' class='rhobi_bluebutton2' style='margin-left:30px;margin-top:5px'><span>done</span></a></a></div></div><a class='rhobi_toDoListTrigger' href='javascript:void(0);'>to-do</a>");$(".rhobi_toDoListTrigger").click(function(){$("#rhobi_toDoList").toggle("fast");$(this).toggleClass("active");return false})}})(jQuery);var addthis_config={data_track_clickback:true};var RHOBI=RHOBI||{};function getElementWidth(a){x=document.getElementById(a);return x.offsetWidth}function getAbsoluteLeft(a){o=document.getElementById(a);oLeft=o.offsetLeft;while(o.offsetParent!=null){oParent=o.offsetParent;oLeft+=oParent.offsetLeft;o=oParent}return oLeft}function getAbsoluteTop(a){o=document.getElementById(a);oTop=o.offsetTop;while(o.offsetParent!=null){oParent=o.offsetParent;oTop+=oParent.offsetTop;o=oParent}return oTop}function htmlEncode(a){if(a!=null){return jQuery("<div/>").text(a).html()}return""}function htmlDecode(a){if(a!=null){return jQuery("<div/>").html(a).text()}return""}function formatJsonDate(jsonDate,formatString){try{var date=eval(jsonDate.replace(/\/Date\((.*?)\)\//gi,"new Date($1)"));return dateFormat(date,formatString)}catch(err){return""}}function parseJsonDate(a){if(a==null||a==""){return null}var e=parseInt(a.replace(/\/Date\(([-\d]+).*$/,"$1"));var d=parseInt(a.replace(/.*\d([+-]\d\d).*$/,"$1"),10);var f=parseInt(a.replace(/.*\d([+-])\d\d(\d\d).*$/,"$1$2"),10);var b=new Date(e);if(!isNaN(d)){b.setHours(b.getHours()+d)}if(!isNaN(f)){b.setMinutes(b.getMinutes()+f)}return b}function toJsonDate(a){if(a==null){return null}return"/Date("+a.getTime()+")/"}function ellipsisText(d,b){if(d==null){return""}var a=d;if(a.length>b){a=a.substring(0,b-3)+"..."}return a}function validateEmail(a){var b=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\ ".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA -Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return a.match(b)}function timeZoneList(){var a=[];addTZ(a,"(GMT-12:00) International Date Line West","Dateline Standard Time");addTZ(a,"(GMT-11:00) Midway Island, Samoa","Samoa Standard Time");addTZ(a,"(GMT-10:00) Hawaii","Hawaiian Standard Time");addTZ(a,"(GMT-09:00) Alaska","Alaskan Standard Time");addTZ(a,"(GMT-08:00) Tijuana, Baja California","Pacific Standard Time (Mexico)");addTZ(a,"(GMT-08:00) Pacific Time (US & Canada)","Pacific Standard Time");addTZ(a,"(GMT-07:00) Mountain Time (US & Canada)","Mountain Standard Time");addTZ(a,"(GMT-07:00) Chihuahua, La Paz, Mazatlan","Mountain Standard Time (Mexico)");addTZ(a,"(GMT-07:00) Arizona","US Mountain Standard Time");addTZ(a,"(GMT-06:00) Saskatchewan","Canada Central Standard Time");addTZ(a,"(GMT-06:00) Guadalajara, Mexico City, Monterrey","Central Standard Time (Mexico)");addTZ(a,"(GMT-06:00) Central Time (US & Canada)","Central Standard Time");addTZ(a,"(GMT-06:00) Central America","Central America Standard Time");addTZ(a,"(GMT-05:00) Indiana (East)","US Eastern Standard Time");addTZ(a,"(GMT-05:00) Eastern Time (US & Canada)","Eastern Standard Time");addTZ(a,"(GMT-05:00) Bogota, Lima, Quito, Rio Branco","SA Pacific Standard Time");addTZ(a,"(GMT-04:30) Caracas","Venezuela Standard Time");addTZ(a,"(GMT-04:00) Santiago","Pacific SA Standard Time");addTZ(a,"(GMT-04:00) Manaus","Central Brazilian Standard Time");addTZ(a,"(GMT-04:00) La Paz","SA Western Standard Time");addTZ(a,"(GMT-04:00) Atlantic Time (Canada)","Atlantic Standard Time");addTZ(a,"(GMT-03:30) Newfoundland","Newfoundland Standard Time");addTZ(a,"(GMT-03:00) Montevideo","Montevideo Standard Time");addTZ(a,"(GMT-03:00) Greenland","Greenland Standard Time");addTZ(a,"(GMT-03:00) Georgetown","SA Eastern Standard Time");addTZ(a,"(GMT-03:00) Buenos Aires","Argentina Standard Time");addTZ(a,"(GMT-03:00) Brasilia","E. South America Standard Time");addTZ(a,"(GMT-02:00) Mid-Atlantic","Mid-Atlantic Standard Time");addTZ(a,"(GMT-01:00) Cape Verde Is.","Cape Verde Standard Time");addTZ(a,"(GMT-01:00) Azores","Azores Standard Time");addTZ(a,"(GMT+13:00) Nuku'alofa","Tonga Standard Time");addTZ(a,"(GMT+12:00) Fiji, Kamchatka, Marshall Is.","Fiji Standard Time");addTZ(a,"(GMT+12:00) Auckland, Wellington","New Zealand Standard Time");addTZ(a,"(GMT+11:00) Magadan, Solomon Is., New Caledonia","Central Pacific Standard Time");addTZ(a,"(GMT+10:00) Vladivostok","Vladivostok Standard Time");addTZ(a,"(GMT+10:00) Hobart","Tasmania Standard Time");addTZ(a,"(GMT+10:00) Guam, Port Moresby","West Pacific Standard Time");addTZ(a,"(GMT+10:00) Canberra, Melbourne, Sydney","AUS Eastern Standard Time");addTZ(a,"(GMT+10:00) Brisbane","E. Australia Standard Time");addTZ(a,"(GMT+09:30) Darwin","AUS Central Standard Time");addTZ(a,"(GMT+09:30) Adelaide","Cen. Australia Standard Time");addTZ(a,"(GMT+09:00) Yakutsk","Yakutsk Standard Time");addTZ(a,"(GMT+09:00) Seoul","Korea Standard Time");addTZ(a,"(GMT+09:00) Osaka, Sapporo, Tokyo","Tokyo Standard Time");addTZ(a,"(GMT+08:00) Taipei","Taipei Standard Time");addTZ(a,"(GMT+08:00) Perth","W. Australia Standard Time");addTZ(a,"(GMT+08:00) Kuala Lumpur, Singapore","Malay Peninsula Standard Time");addTZ(a,"(GMT+08:00) Irkutsk, Ulaan Bataar","North Asia East Standard Time");addTZ(a,"(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi","China Standard Time");addTZ(a,"(GMT+07:00) Krasnoyarsk","North Asia Standard Time");addTZ(a,"(GMT+07:00) Bangkok, Hanoi, Jakarta","SE Asia Standard Time");addTZ(a,"(GMT+06:30) Yangon (Rangoon)","Myanmar Standard Time");addTZ(a,"(GMT+06:00) Astana, Dhaka","Central Asia Standard Time");addTZ(a,"(GMT+06:00) Almaty, Novosibirsk","N. Central Asia Standard Time");addTZ(a,"(GMT+05:45) Kathmandu","Nepal Standard Time");addTZ(a,"(GMT+05:30) Sri Jayawardenepura","Sri Lanka Standard Time");addTZ(a,"(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi","India Standard Time");addTZ(a,"(GMT+05:00) Tashkent","West Asia Standard Time");addTZ(a,"(GMT+05:00) Islamabad, Karachi","Pakistan Standard Time");addTZ(a,"(GMT+05:00) Ekaterinburg","Ekaterinburg Standard Time");addTZ(a,"(GMT+04:30) Kabul","Afghanistan Standard Time");addTZ(a,"(GMT+04:00) Yerevan","Caucasus Standard Time");addTZ(a,"(GMT+04:00) Port Louis","Mauritius Standard Time");addTZ(a,"(GMT+04:00) Baku","Azerbaijan Standard Time");addTZ(a,"(GMT+04:00) Abu Dhabi, Muscat","Arabian Standard Time");addTZ(a,"(GMT+03:30) Tehran","Iran Standard Time");addTZ(a,"(GMT+03:00) Tbilisi","Georgian Standard Time");addTZ(a,"(GMT+03:00) Nairobi","E. Africa Standard Time");addTZ(a,"(GMT+03:00) Moscow, St. Petersburg, Volgograd","Russian Standard Time");addTZ(a,"(GMT+03:00) Kuwait, Riyadh","Arab Standard Time");addTZ(a,"(GMT+03:00) Baghdad","Arabic Standard Time");addTZ(a,"(GMT+02:00) Windhoek","Namibia Standard Time");addTZ(a,"(GMT+02:00) Minsk","E. Europe Standard Time");addTZ(a,"(GMT+02:00) Jerusalem","Jerusalem Standard Time");addTZ(a,"(GMT+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius","FLE Standard Time");addTZ(a,"(GMT+02:00) Harare, Pretoria","South Africa Standard Time");addTZ(a,"(GMT+02:00) Cairo","Egypt Standard Time");addTZ(a,"(GMT+02:00) Beirut","Middle East Standard Time");addTZ(a,"(GMT+02:00) Athens, Bucharest, Istanbul","GTB Standard Time");addTZ(a,"(GMT+02:00) Amman","Jordan Standard Time");addTZ(a,"(GMT+01:00) West Central Africa","W. Central Africa Standard Time");addTZ(a,"(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb","Central European Standard Time");addTZ(a,"(GMT+01:00) Brussels, Copenhagen, Madrid, Paris","Romance Standard Time");addTZ(a,"(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague","Central Europe Standard Time");addTZ(a,"(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna","W. Europe Standard Time");addTZ(a,"(GMT) Monrovia, Reykjavik","Greenwich Standard Time");addTZ(a,"(GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London","GMT Standard Time");addTZ(a,"(GMT) Casablanca","Morocco Standard Time");return a}function addTZ(d,b,a){d.push({text:b,value:a})}function countriesList(){list=[];addCountry(list,"United States");addCountry(list,"Canada");addCountry(list,"United Kingdom");addCountry(list,"Afghanistan");addCountry(list,"Albania");addCountry(list,"Algeria");addCountry(list,"Andorra");addCountry(list,"Angola");addCountry(list,"Antigua and Barbuda");addCountry(list,"Argentina");addCountry(list,"Armenia");addCountry(list,"Australia ");addCountry(list,"Austria");addCountry(list,"Azerbaijan");addCountry(list,"Bahamas");addCountry(list,"Bahrain");addCountry(list,"Bangladesh");addCountry(list,"Barbados");addCountry(list,"Belarus");addCountry(list,"Belgium");addCountry(list,"Belize");addCountry(list,"Benin");addCountry(list,"Bhutan");addCountry(list,"Bolivia");addCountry(list,"Bosnia and Herzegovina");addCountry(list,"Botswana");addCountry(list,"Brazil");addCountry(list,"Brunei");addCountry(list,"Bulgaria");addCountry(list,"Burkina Faso");addCountry(list,"Burundi");addCountry(list,"Cambodia");addCountry(list,"Cameroon");addCountry(list,"Canada");addCountry(list,"Cape Verde");addCountry(list,"Central African Republic");addCountry(list,"Chad");addCountry(list,"Chile");addCountry(list,"China");addCountry(list,"Colombia");addCountry(list,"Comoros");addCountry(list,"Congo (Brazzaville)");addCountry(list,"Costa Rica");addCountry(list,"Côte d'Ivoire");addCountry(list,"Croatia");addCountry(list,"Cuba");addCountry(list,"Cyprus");addCountry(list,"Czech Republic");addCountry(list,"Democratic Republic of the Congo");addCountry(list,"Denmark");addCountry(list,"Djibouti");addCountry(list,"Dominica");addCountry(list,"Dominican Republic");addCountry(list,"East Timor (Timor Timur)");addCountry(list,"Ecuador");addCountry(list,"Egypt");addCountry(list,"El Salvador");addCountry(list,"Equatorial Guinea");addCountry(list,"Eritrea");addCountry(list,"Estonia");addCountry(list,"Ethiopia");addCountry(list,"Federated States of Micronesia");addCountry(list,"Fiji");addCountry(list,"Finland");addCountry(list,"France");addCountry(list,"Gabon");addCountry(list,"Georgia");addCountry(list,"Germany");addCountry(list,"Ghana");addCountry(list,"Greece");addCountry(list,"Grenada");addCountry(list,"Guatemala");addCountry(list,"Guinea");addCountry(list,"Guinea-Bissau");addCountry(list,"Guyana");addCountry(list,"Haiti");addCountry(list,"Honduras");addCountry(list,"Hungary");addCountry(list,"Iceland");addCountry(list,"India");addCountry(list,"Indonesia");addCountry(list,"Iran");addCountry(list,"Iraq");addCountry(list,"Ireland");addCountry(list,"Israel");addCountry(list,"Italy");addCountry(list,"Jamaica");addCountry(list,"Japan");addCountry(list,"Jordan");addCountry(list,"Kazakhstan");addCountry(list,"Kenya");addCountry(list,"Kiribati");addCountry(list,"Kuwait");addCountry(list,"Kyrgyzstan");addCountry(list,"Laos");addCountry(list,"Latvia");addCountry(list,"Lebanon");addCountry(list,"Lesotho");addCountry(list,"Liberia");addCountry(list,"Libya");addCountry(list,"Liechtenstein");addCountry(list,"Lithuania");addCountry(list,"Luxembourg");addCountry(list,"Madagascar");addCountry(list,"Malawi");addCountry(list,"Malaysia");addCountry(list,"Maldives");addCountry(list,"Mali");addCountry(list,"Malta");addCountry(list,"Marshall Islands");addCountry(list,"Mauritania");addCountry(list,"Mauritius");addCountry(list,"Mexico");addCountry(list,"Moldova");addCountry(list,"Monaco");addCountry(list,"Mongolia");addCountry(list,"Montenegro");addCountry(list,"Morocco");addCountry(list,"Mozambique");addCountry(list,"Myanmar (Burma)");addCountry(list,"Namibia");addCountry(list,"Nauru");addCountry(list,"Nepal");addCountry(list,"Netherlands");addCountry(list,"New Zealand");addCountry(list,"Nicaragua");addCountry(list,"Niger");addCountry(list,"Nigeria");addCountry(list,"North Korea");addCountry(list,"Norway");addCountry(list,"Oman");addCountry(list,"Pakistan");addCountry(list,"Palau");addCountry(list,"Panama");addCountry(list,"Papua New Guinea");addCountry(list,"Paraguay");addCountry(list,"Peru");addCountry(list,"Philippines");addCountry(list,"Poland");addCountry(list,"Portugal");addCountry(list,"Qatar");addCountry(list,"Republic of Macedonia");addCountry(list,"Romania");addCountry(list,"Russia");addCountry(list,"Rwanda");addCountry(list,"Saint Kitts and Nevis");addCountry(list,"Saint Lucia");addCountry(list,"Saint Vincent and The Grenadines");addCountry(list,"Samoa");addCountry(list,"San Marino");addCountry(list,"Sao Tome and Principe");addCountry(list,"Saudi ArabiaSenegal");addCountry(list,"Serbia");addCountry(list,"Seychelles");addCountry(list,"Sierra Leone");addCountry(list,"Singapore");addCountry(list,"Slovakia");addCountry(list,"Slovenia");addCountry(list,"Solomon Islands");addCountry(list,"Somalia");addCountry(list,"South Africa");addCountry(list,"South Korea");addCountry(list,"Spain");addCountry(list,"Sri Lanka");addCountry(list,"Sudan");addCountry(list,"Suriname");addCountry(list,"Swaziland");addCountry(list,"Sweden");addCountry(list,"Switzerland");addCountry(list,"Syria");addCountry(list,"Taiwan");addCountry(list,"Tajikistan");addCountry(list,"Tanzania");addCountry(list,"Thailand");addCountry(list,"The Gambi");addCountry(list,"Togo");addCountry(list,"Tonga");addCountry(list,"Trinidad and Tobago");addCountry(list,"Tunisia");addCountry(list,"Turkey");addCountry(list,"Turkmenistan");addCountry(list,"Tuvalu");addCountry(list,"Uganda");addCountry(list,"Ukraine");addCountry(list,"United Arab Emirates");addCountry(list,"United Kingdom");addCountry(list,"United States");addCountry(list,"Uruguay");addCountry(list,"Uzbekistan");addCountry(list,"Vanuatu");addCountry(list,"Vatican City");addCountry(list,"Venezuela");addCountry(list,"Vietnam");addCountry(list,"Western Sahara");addCountry(list,"Yemen");addCountry(list,"Zambia");addCountry(list,"Zimbabwe");return list}function addCountry(a,b){a.push(b)}function buildCountryDropDown(a,e){var d="<option value=''>"+htmlEncode("[SELECT COUNTRY]")+"</option>";var b=countriesList();for(var f in b){c=b[f];d+="<option value='"+htmlEncode(c)+"'>"+htmlEncode(c)+"</option>"}return"<select id='"+a+"'"+(e?" "+e:"")+">"+d+"</select>"}function guidGenerator(){var a=function(){return(((1+Math.random())*65536)|0).toString(16).substring(1)};return(a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a())}jQuery.fn.extend({insertAtCaret:function(a){return this.each(function(e){if(document.selection){this.focus();sel=document.selection.createRange();sel.text=a;this.focus()}else{if(this.selectionStart||this.selectionStart=="0"){var d=this.selectionStart;var b=this.selectionEnd;var f=this.scrollTop;this.value=this.value.substring(0,d)+a+this.value.substring(b,this.value.length);this.focus();this.selectionStart=d+a.length;this.selectionEnd=d+a.length;this.scrollTop=f}else{this.value+=a;this.focus()}}})}});function addWatermarkToTextBox(b,d){var a=jQuery("#"+b);if(!a.is(":focus")){a.attr("value",d).addClass("rhobi_watermarkOn")}a.focus(function(){if(jQuery(this).attr("value")==d){jQuery(this).attr("value","").removeClass("rhobi_watermarkOn")}});a.blur(function(){if(jQuery(this).attr("value")==""){jQuery(this).attr("value",d).addClass("rhobi_watermarkOn")}})}function bbcode_parser(a){search=new Array(/\[b\](.*?)\[\/b\]/g,/\[i\](.*?)\[\/i\]/g,/\[u\](.*?)\[\/u\]/g,/\[img\](.*?)\[\/img\]/g,/\[url\](.*?)\[\/url\]/g,/\[url\="?(.*?)"?\](.*?)\[\/url\]/g,/\[url href\="?(.*?)"?\](.*?)\[\/url\]/g,/\[quote](.*?)\[\/quote\]/g,/\[list\=(.*?)\](.*?)\[\/list\]/ig,/\[list\]([\s\S]*?)\[\/list\]/ig,/\[\*\]\s?(.*?)\n/g,/\:\-\)/g);replace=new Array("<b>$1</b>","<i>$1</i>","<u>$1</u>",'<img src="$1" alt="An image">','<a href="$1" target="_blank">$1</a>','<a href="$1" target="_blank">$2</a>','<a href="$1" target="_blank">$2</a>',"<blockquote>$1</blockquote>","<ol>$2</ol>","<ul>$1</ul>","<li>$1</li>",'<img src="https://www.rhobi.com/images/smiles/smiley1.gif">');for(i=0;i<search.length;i++){a=a.replace(search[i],replace[i])}return a}function getParameterByName(b){b=b.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var a="[\\?&]"+b+"=([^&#]*)";var e=new RegExp(a);var d=e.exec(window.location.href);if(d==null){return""}else{return decodeURIComponent(d[1].replace(/\+/g," "))}}window.communityHelperScriptLoaded={};var RHOBI=RHOBI||{};(function(a){RHOBI.cartCookie="rhobiCart";RHOBI.loadCart=function(){a("#rhobi_sideContent").html("<p class='rhobi_header'>Shopping Cart</p>");html="";lastDirectoryID=0;var e=RHOBI.getCart();for(var c in e.items){var d=e.items[c];if(lastDirectoryID!=d.DirectoryID){if(lastDirectoryID!=0){html+="</p>"}lastDirectoryID=d.DirectoryID;hasEmail=d.Email!=null&&d.Email.length>0;var b=RHOBI.filterCartByCompany(d.DirectoryID);emailLink=hasEmail?RHOBI.emailCartLink(b,d.Email):"";html+="<p><div class='rhobi_ellipsis rhobi_cartCompany'><a href='javascript:void(0);' class='rhobi_link' onclick=\"RHOBI.loadCompanyProfile("+d.DirectoryID+',true);return false;"><b>'+htmlEncode(ellipsisText(d.SellerName,25))+"</b></a></div><div class='rhobi_cartCompanyLinks'><a href='javascript:void(0);' class='rhobi_link' onclick=\"RHOBI.loadCompanyProfile("+d.DirectoryID+',true);return false;">Call</a>'+RHOBI.dotHtml+"<a href='javascript:void(0);' class='rhobi_link' onclick=\"RHOBI.loadCompanyProfile("+d.DirectoryID+',true);return false;">Chat</a>'+(hasEmail?RHOBI.dotHtml+'<a href="'+emailLink+"\" class='rhobi_link'>Email</a>":"")+"</div>"}html+="<img src='"+RHOBI.www+"/images/delete.gif' border='0' style='cursor:pointer' onclick=\"RHOBI.deleteFromSideCart("+d.ID+");return false;\"/> <a href='javascript:void(0);'>"+htmlEncode(d.PartNum)+"</a><br/>"+htmlEncode(d.Description)+"<br/>("+htmlEncode(d.Condition)+")<br/>"+RHOBI.messageSeparatorHtml}if(e.items.length>0){html+="</p><p><a href='javascript:void(0);' class='rhobi_bluebutton'><span>rfq</span></a><a href='javascript:void(0);' class='rhobi_bluebutton'><span>po</span></a></p>"}else{html+="<p class='rhobi_error'>Your cart is empty.</p>"}a("#rhobi_sideContent").append(html);RHOBI.flashDiv("rhobi_sideContent")};RHOBI.flashDiv=function(b){a("#"+b).animate({backgroundColor:"#FFFFCC"},100).animate({backgroundColor:"white"},100).animate({backgroundColor:"#FFFFCC"},100).animate({backgroundColor:"white"},100).animate({backgroundColor:"#FFFFCC"},100).animate({backgroundColor:"white"},100)};RHOBI.deleteFromSideCart=function(c){var b=a("#rhobi_cbInvID"+c);if(b.length>0){b.attr("checked","")}RHOBI.removeCart(c)};RHOBI.clearCart=function(b){var c={items:[]};RHOBI.setCart(c);if(b){RHOBI.loadCart()}};RHOBI.addCart=function(b){var c=RHOBI.getCart();c.items.push(b);RHOBI.sortCart(c);RHOBI.setCart(c);RHOBI.loadCart()};RHOBI.sortCart=function(b){b.items.sort(function(d,c){if(d.SellerName<c.SellerName){return -1}else{if(d.SellerName>c.SellerName){return 1}else{if(d.PartNum<c.PartNum){return -1}else{return 1}}}})};RHOBI.removeCart=function(e){var c=RHOBI.getCart();var d={items:[]};while(c.items.length>0){var b=c.items.pop();if(b.ID!=e){d.items.push(b)}}RHOBI.sortCart(d);RHOBI.setCart(d);RHOBI.loadCart()};RHOBI.filterCartByCompany=function(b){var d=RHOBI.getCart();var e={items:[]};while(d.items.length>0){var c=d.items.pop();if(c.DirectoryID==b){e.items.push(c)}}RHOBI.sortCart(e);return e};RHOBI.isInCart=function(f){var e=RHOBI.getCart();var d=false;for(var b in e.items){var c=e.items[b];if(c.ID==f){d=true;break}}return d};RHOBI.getCart=function(){var b=a.cookie(RHOBI.cartCookie);if(b==null||b==""){RHOBI.clearCart(false);b=a.cookie(RHOBI.cartCookie)}return JSON.parse(b)};RHOBI.setCart=function(b){a.cookie(RHOBI.cartCookie,JSON.stringify(b),{path:"/"})};RHOBI.emailCartLink=function(e,d){link="mailto:"+encodeURIComponent(d)+"&subject=Request For Quote&body="+encodeURIComponent("Hello I am contacting you about parts.\r\n\r\n");for(var b in e.items){var c=e.items[b];link+=encodeURIComponent("Part #: "+c.PartNum+" - "+c.Description+" ("+c.Condition+") Qty: \r\n")}link+=encodeURIComponent("\r\nThank you!");return link};window.communityCartScriptLoaded={}})(jQuery);var RHOBI=RHOBI||{};(function(a){RHOBI.newConversationWithUserID=function(b){RHOBI.conversationWithUserID(b,0,0,0,"",null)};RHOBI.newConversationWithUserIDAboutCart=function(c,d,b){var f=RHOBI.filterCartByCompany(d);var e=JSON.stringify(f);fromPhone="";if(b!=null&&b!=""){fromPhone="from "+b+" "}RHOBI.conversationWithUserID(c,0,0,0,"Hello I am contacting you "+fromPhone+"about part number(s).",e)};RHOBI.conversationWithUserID=function(c,b,g,i,f,h){RHOBI.log("conversationWithUserID");features="status=0,toolbar=0,menubar=0,location=0,resizable=1,scrollbars=0,width=450,height=400";try{var d=null;if(b==0){d=window.open("","",features)}else{d=window.open("","livechat"+RHOBI.userID+b,features)}if(d){RHOBI.log("*window.name="+d.name);if(d.location.href.indexOf("Conversation.aspx")==-1){d.location.href=RHOBI.www+"/Conversation.aspx?userID="+RHOBI.userID+"&userGUID="+RHOBI.userGUID+"&authTicket="+RHOBI.authTicket+"&withUserID="+c+"&msgThreadID="+b+"&msgID="+g+"&instantID="+i+"&autoSendMsg="+encodeURIComponent(f)+"&payload="+encodeURIComponent(h)}else{d.focus()}}}catch(e){}};RHOBI.resizeConversationWindow=function(){a("#rhobi_conversationTextCell").css("height",a("#rhobi_conversationWindow").height()-a("#rhobi_chatMessageTable").height()-20)};RHOBI.buildConversationWindow=function(c,l,h,g,i,k){RHOBI.log("buildConversationWindow");var e=a("#rhobi_conversationWindow");e.append("<table cellspacing='0' cellpadding='2' border='0' style='width:100%;height:100%'><tr><td style='height:400px' id='rhobi_conversationTextCell'><div id='rhobi_conversationText' style='font-size: 11pt'></div></td><td valign='top' style='width:100px'><table width='100%' cellspacing='0' cellpadding='2' border='0'><tr><td align='center'><img id='rhobi_chatWithPhoto' src='"+RHOBI.www+"/images/1ptrans.gif' style='width:80px;height:80px' /></td></tr><tr><td><img id='rhobi_chatWithLight' src='"+RHOBI.www+"/images/1ptrans.gif' style='border:0;width:16px;height:16px'/> <span id='rhobi_chatWithStatus'></span></td></tr><tr><td>&nbsp;</td></tr><tr><td align='center'><span id='rhobi_chatWithButtons'></span></td></tr></table></td></tr><tr><td><table width='100%' cellspacing='0' cellpadding='2' border='0' id='rhobi_chatMessageTable'><tr><td><a href='javascript:void(0);' onclick=\"RHOBI.chatInsertSmiley();return false\"><img src='"+RHOBI.www+"/images/smiles/smiley1.gif' border='0'/></a><a href='javascript:void(0);' onclick=\"RHOBI.chatInsertLink();return false\"><img src='"+RHOBI.www+"/images/link.png' border='0'/></a><a href='javascript:void(0);' onclick=\"RHOBI.chatInsertBold();return false\"><img src='"+RHOBI.www+"/images/bold.png' border='0'/></a><a href='javascript:void(0);' onclick=\"RHOBI.chatInsertItalic();return false\"><img src='"+RHOBI.www+"/images/italic.png' border='0'/></a><a href='javascript:void(0);' onclick=\"RHOBI.chatInsertUnderline();return false\"><img src='"+RHOBI.www+"/images/underline.png' border='0'/></a><a href='javascript:void(0);' onclick=\"RHOBI.chatPrint();return false\"><img src='"+RHOBI.www+"/images/printer.png' border='0'/></a><a href='javascript:void(0);' onclick=\"RHOBI.chatAttach();return false\"><img src='"+RHOBI.www+"/images/attachment.gif' border='0'/></a><select id='rhobi_selectChatFontSize'><option>8pt</option><option selected>10pt</option><option>11pt</option><option>12pt</option><option>14pt</option><option>16pt</option><option>24pt</option><option>32pt</option></select></td><td>&nbsp;</td></tr><tr><td><textarea id='rhobi_txtChat' rows='3'></textarea><input type='text' id='rhobi_txtPayload' style='display:none'/></td><td><a id='rhobi_btnSendChat' href='javascript:void(0);' class='rhobi_bluebutton' onclick='RHOBI.btnSendConversationMessage();'><span>Send</span></a></td></tr></table></td><td align='center'><img id='rhobi_chatMyPhoto' src='"+RHOBI.www+"/images/1ptrans.gif' style='width:50px; height:50px' /></td></tr></table>");RHOBI.resizeConversationWindow();a(window).resize(function(){RHOBI.resizeConversationWindow()});a("#rhobi_txtChat").keydown(function(n){if(n.keyCode==13){a("#rhobi_btnSendChat").click();return false}});addWatermarkToTextBox("rhobi_txtChat",RHOBI.wmChat);a("#rhobi_selectChatFontSize").bind("change",function(){var n=a("#rhobi_selectChatFontSize").val();a("#rhobi_conversationText").css("font-size",n)});RHOBI.currentConversationMsgThreadID=l;RHOBI.currentConversationWithUserID=c;function b(){if(i!=""){RHOBI.sendConversationMessage(i,k)}}function j(){if(RHOBI.userGUID!=""){RHOBI.request("GetUserByID",{authTicket:RHOBI.authTicket,userID:RHOBI.userID},function(n){RHOBI.currentConversationMe=n;a("#rhobi_chatMyPhoto").attr("src",RHOBI.userPhotoUrl(n.PhotoUrl));b()})}else{a("#rhobi_chatMyPhoto").attr("src",RHOBI.userPhotoUrl(""));b()}}function d(){if(g>0){RHOBI.request("GetInstantByID",{authTicket:RHOBI.authTicket,id:g,viewedByUserID:RHOBI.userID},function(n){if(n&&n.Msg){RHOBI.currentConversationMsgThreadID=n.Msg.ThreadMessageID;window.name="livechat"+RHOBI.userID+RHOBI.currentConversationMsgThreadID;RHOBI.log("*new msgThreadID="+RHOBI.currentConversationMsgThreadID);RHOBI.log("*new window.name="+window.name);RHOBI.subscribeCometConversation(RHOBI.currentConversationMsgThreadID);var o={};o.data=n.Msg;RHOBI.receiveCometMessage(o)}})}}var f=a("#rhobi_conversationText");if(c!=null){RHOBI.request("GetUserByID",{authTicket:RHOBI.authTicket,userID:c},function(o){document.title=o.Demo.FullName;RHOBI.currentConversationWith=o;a("#rhobi_chatWithLight").attr("src",RHOBI.www+o.Availability.StatusLightUrl);if(o.Availability.StatusMessage!=null&&o.Availability.StatusMessage.length>0){a("#rhobi_chatWithStatus").html(ellipsisText(o.Availability.StatusMessage,150))}if(o.PrimaryPosition!=null){a("#rhobi_chatWithButtons").append("<a href='javascript:void(0);' class='rhobi_bluebutton' onclick=\"RHOBI.makeCall("+c+","+o.PrimaryPosition.Directory.ID+",'"+escape(o.Availability.CurrentPhoneNumber)+"',false);\"><span>call</span></a>")}var n="";var p="<a href='javascript:void(0);' id='chatUserProfile"+c+"' onclick=\"RHOBI.loadMiniProfile("+c+",'chatUserProfile"+c+"',false);return false;\">"+htmlEncode(o.Demo.FullName)+"</a>";if(o.PrimaryPosition!=null){p+=" from <a href='javascript:void(0);' onclick=\"RHOBI.loadCompanyProfile("+o.PrimaryPosition.Directory.ID+',false);return false;">'+htmlEncode(o.PrimaryPosition.Directory.HQDemo.Company)+"</a>"}if(o.Availability.Unavailable){n="<b>"+p+" appears to be offline</b> and will receive your message after signing in."}if(o.Availability.Busy){n="<b>"+p+" is busy</b> and may or may not receive your message immediately."}if(o.Availability.Available){n="<b>You are now talking with "+p+".</b> Enter a message below and click Send."}if(n!=""){f.append("<table width=100% cellpadding=2 cellspacing=0 border=1 class='rhobi_announceMessage'><tr><td bgcolor=#eeeeee>"+n+"</td></tr></table>")}a("#rhobi_chatWithPhoto").attr("src",RHOBI.userPhotoUrl(o.PhotoUrl));j();d()})}else{document.title="Guest";f.append("<table width=100% cellpadding=2 cellspacing=0 border=1 class='rhobi_announceMessage'><tr><td bgcolor=#eeeeee>You are now talking with a guest.</td></tr></table>");a("#rhobi_chatWithPhoto").attr("src",RHOBI.userPhotoUrl(""));j();d()}};RHOBI.chatInsertSmiley=function(){if(a("#rhobi_txtChat").val()==RHOBI.wmChat){a("#rhobi_txtChat").val(":-)")}else{a("#rhobi_txtChat").insertAtCaret(":-)")}};RHOBI.chatInsertLink=function(){var b=a("#rhobi_txtChat");b.replaceSelection("[url]"+b.getSelection().text+"[/url]")};RHOBI.chatInsertBold=function(){var b=a("#rhobi_txtChat");b.replaceSelection("[b]"+b.getSelection().text+"[/b]")};RHOBI.chatInsertItalic=function(){var b=a("#rhobi_txtChat");b.replaceSelection("[i]"+b.getSelection().text+"[/i]")};RHOBI.chatInsertUnderline=function(){var b=a("#rhobi_txtChat");b.replaceSelection("[u]"+b.getSelection().text+"[/u]")};RHOBI.chatPrint=function(){var c=a("#rhobi_conversationText").html();var b=window.open("","print_content","width=100,height=100");b.document.open();b.document.write('<html><body onload="window.print()">'+c+"</body></html>");b.document.close();setTimeout(function(){b.close()},1000)};RHOBI.chatAttach=function(){a.facebox.settings.closeImage=RHOBI.www+"/scripts/facebox/closelabel.png";a.facebox("<div id='rhobi_loginbox'><span class='rhobi_loginheader'>Send Attachment</span><br/><br/><input type='file' id='rhobi_chatAttach' name='rhobi_chatAttach' /></div>");a("#rhobi_chatAttach").uploadify({uploader:"/scripts/jquery.uploadify-v2.1.4/uploadify.swf",script:RHOBI.rhobiService+"/AddDocument.ashx",cancelImg:RHOBI.www+"/images/1ptrans.gif",folder:RHOBI.rhobiService+"/TempExtract",auto:true,onComplete:function(e,b,d,c,f){if(c!=""){a.facebox.close();var g=JSON.parse(c);if(typeof g.Error===undef){RHOBI.sendConversationMessage("[url href="+g.Cabinet.WebPath+"/"+g.FileName+"]"+g.OriginalFilename+"[/url]","")}else{alert(g.Error)}}},onError:function(e,b,d,c){alert(c.info)}})};RHOBI.btnSendConversationMessage=function(){inputBox="#rhobi_txtChat";payloadBox="#rhobi_txtPayload";comment=a(inputBox).val();payload=a(payloadBox).val();a(payloadBox).val("");a(inputBox).val("");a(inputBox).focus();RHOBI.sendConversationMessage(comment,payload)};RHOBI.sendConversationMessage=function(d,b){RHOBI.log("sendConversationMessage");RHOBI.log("*sending to msgThreadID="+RHOBI.currentConversationMsgThreadID);fromDirectoryID=null;if(RHOBI.currentConversationMe!=null&&RHOBI.currentConversationMe.PrimaryPosition!=null){fromDirectoryID=RHOBI.currentConversationMe.PrimaryPosition.Directory.ID}toDirectoryID=null;if(RHOBI.currentConversationWith!=null&&RHOBI.currentConversationWith.PrimaryPosition!=null){toDirectoryID=RHOBI.currentConversationWith.PrimaryPosition.Directory.ID}fromName=(RHOBI.currentConversationMe!=null?RHOBI.currentConversationMe.Demo.FullName:"Guest");data={authTicket:RHOBI.authTicket,createdByUserID:(RHOBI.userID>0?RHOBI.userID:null),fromDirectoryID:fromDirectoryID,fromName:fromName,body:d,threadMessageID:RHOBI.currentConversationMsgThreadID,payload:b,toDisplayName:(RHOBI.currentConversationWith!=null?RHOBI.currentConversationWith.Demo.FullName:"Guest"),toUserID:(RHOBI.currentConversationWith!=null?RHOBI.currentConversationWith.ID:null),toDirectoryID:toDirectoryID};var c=bbcode_parser(d);RHOBI.outputChatMessage(fromName,"rhobi_privateMessageFromMe",c,b);RHOBI.request("SendCommunityPrivateMessage",data,function(e){if(e>0){if(RHOBI.currentConversationMsgThreadID==0){RHOBI.currentConversationMsgThreadID=e;window.name="livechat"+RHOBI.userID+RHOBI.currentConversationMsgThreadID;RHOBI.log("*new msgThreadID="+RHOBI.currentConversationMsgThreadID);RHOBI.log("*new window.name="+window.name);RHOBI.subscribeCometConversation(e);var f={authTicket:RHOBI.authTicket,id:e,viewedByUserID:RHOBI.userID};RHOBI.request("GetInstantByMessageID",f,function(g){if(g!=null){var h={};h.data=g.Msg;RHOBI.receiveCometMessage(h)}})}}})};RHOBI.subscribeCometConversation=function(b){RHOBI.log("subscribeCometConversation");RHOBI.log("*msgTheadID="+b);fm.websync.client.subscribe({channel:"/msgThread"+b,onSuccess:function(c){RHOBI.log("*subscribeCometConversation success")},onFailure:function(c){RHOBI.log("*subscribeCometConversation fail: "+c.error)},onReceive:function(c){RHOBI.log("*subscribeCometConversation recv");RHOBI.receiveCometMessage(c)}})};RHOBI.subscribeCometCall=function(b){RHOBI.log("subscribeCometCall");RHOBI.log("*callGUID="+b);fm.websync.client.subscribe({channel:"/call/"+b,onSuccess:function(c){RHOBI.log("*subscribeCometCall success")},onFailure:function(c){RHOBI.log("*subscribeCometCall fail: "+c.error)},onReceive:function(c){RHOBI.log("*subscribeCometCall recv");if(c!=null&&c.data.event!=null){if(c.data.event=="Established"){RHOBI.callEstablishedTime=new Date();a("#rhobi_pCallStatus").append("<br/>Call Established <span id='rhobi_callCounter'/>");RHOBI.updateCallCounter()}else{if(c.data.event=="Cleared"){RHOBI.callEstablishedTime=null;a("#rhobi_pCallStatus").append("<br/>Call Disconnected!<br/>");a("#rhobi_btnPlaceCall").show();a("#rhobi_btnPlaceCall > span").html("Redial");a("#rhobi_btnTerminateCall").remove()}}}}})};RHOBI.updateCallCounter=function(){if(RHOBI.callEstablishedTime!=null){var b=new Date();s=Math.floor((b-RHOBI.callEstablishedTime)/1000);m=Math.floor(s/60);s-=(m*60);a("#rhobi_callCounter").html("<b><font size='+1'>"+m+"m "+s+"s</font></b>");setTimeout(RHOBI.updateCallCounter,1000)}};RHOBI.receiveCometMessage=function(d){RHOBI.log("receiveCometMessage");var b=d.data.PosterUserID==RHOBI.userID||(d.data.PosterUserID==null&&RHOBI.userID==0);if(!b){var c="";if(b){c="rhobi_privateMessageFromMe"}else{c="rhobi_privateMessageFromYou"}RHOBI.outputChatMessage(d.data.FromName,c,d.data.Body,d.data.Payload)}};RHOBI.processMessagePayload=function(d){body="";if(d.items!=null&&d.items.length>0){body+="<table width='100%' cellspacing='0' cellpadding='2' border='1'><tr><td><b>Part #</b></td><td><b>Description</b></td><td><b>Cond</b></td></tr>";for(var b in d.items){var c=d.items[b];body+="<tr><td><a href='javascript:void(0);' class='rhobi_link'>"+htmlEncode(c.PartNum)+"</a></td><td>"+htmlEncode(c.Description)+"</td><td>"+htmlEncode(c.Condition)+"</td></tr>"}body+="</table>"}return body};RHOBI.outputChatMessage=function(d,g,f,e){if(e!=null&&e!="null"&&e.length>0){f+=RHOBI.processMessagePayload(JSON.parse(e))}var b=a("#rhobi_conversationText");var c="<br/><span class='"+g+"'>"+htmlEncode(d)+"</span> "+f;b.append(c);b.attr("scrollTop",b.attr("scrollHeight"))};RHOBI.makeCall=function(c,f,b,d){a.facebox.settings.closeImage=RHOBI.www+"/scripts/facebox/closelabel.png";a.facebox("<div id='rhobi_dialbox'><span class='rhobi_loginheader' id='rhobi_makeCallHeader'>Make Call</span><br/><br/><input type='text' id='rhobi_placeCallFrom' value='' style='width:200px'> (from)<table width='100%' cellspacing='0' cellpadding='2' border='0'><tr><td width='80%' valign='top'><p id='rhobi_pCallButtons'><a href='javascript:void(0);' class='rhobi_bluebutton' id='rhobi_btnPlaceCall' onclick=\"RHOBI.doPlaceCall("+c+","+f+",'"+encodeURIComponent(b)+"',"+d+");return false;\"><span>Place Call</span></a></p><p id='rhobi_pCallStatus'></p></td><td valign='top'><img src='"+RHOBI.www+"/images/click 2 call instructions.png' style='border:0;width:194px;height:137px'/></td></tr></table></div>");addWatermarkToTextBox("rhobi_placeCallFrom","Type your phone number here..");if(RHOBI.userGUID!=""){RHOBI.showSpinner("rhobi_dialbox","dialBoxSpinner");var e={authTicket:RHOBI.authTicket,userID:RHOBI.userID};RHOBI.request("GetUserByID",e,function(h){RHOBI.hideSpinner("dialBoxSpinner");a("#rhobi_placeCallFrom").val(htmlEncode(h.Availability.CurrentPhoneNumber))})}if(c>0){var g={authTicket:RHOBI.authTicket,userID:c};RHOBI.request("GetUserByID",g,function(h){a("#rhobi_makeCallHeader").append(" to "+htmlEncode(h.Demo.FullName))})}else{a("#rhobi_makeCallHeader").append(" to "+b)}};RHOBI.doPlaceCall=function(c,f,b,d){a("#rhobi_pCallStatus").html("");a("#rhobi_btnPlaceCall").hide();RHOBI.showSpinner("rhobi_pCallStatus","makingCallNowSpinner");fromNumber=a("#rhobi_placeCallFrom").val();var e={authTicket:RHOBI.authTicket,fromNumber:fromNumber,fromUserID:(RHOBI.userGUID!=""?RHOBI.userID:null),fromDirectoryID:(RHOBI.sysDir!=null?RHOBI.sysDir.ID:null),toNumber:b,toUserID:(c!=null&&c>0?c:null),toDirectoryID:(f!=null&&f>0?f:null)};RHOBI.request("InitiateCall",e,function(g){if(g!=null&&g.CallGUID!=null&&g.CallGUID!=""){RHOBI.hideSpinner("makingCallNowSpinner");RHOBI.subscribeCometCall(g.CallGUID);a("#rhobi_pCallButtons").append("<a href='javascript:void(0);' class='rhobi_bluebutton' id='rhobi_btnTerminateCall' onclick=\"RHOBI.doTerminateCall('"+g.CallGUID+"');return false;\"><span>Hang up</span></a>");a("#rhobi_pCallStatus").html("Initiating call...Answer the phone");if(c>0){if(d){RHOBI.newConversationWithUserIDAboutCart(c,f,fromNumber)}else{RHOBI.conversationWithUserID(c,0,0,0,"Hello, I am calling you from "+fromNumber,null)}}}})};RHOBI.doTerminateCall=function(b){var c={authTicket:RHOBI.authTicket,callGUID:b};RHOBI.request("TerminateCall",c,function(){a.facebox.close()})};window.communityChatScriptLoaded={}})(jQuery);var RHOBI=RHOBI||{};(function(a){RHOBI.loadContacts=function(){var c=a("#rhobi_content");c.html("");RHOBI.showSpinner("rhobi_content","loadContactsSpinner");var b={authTicket:RHOBI.authTicket,userID:RHOBI.userID,businessAndPersonal:true,personalOnly:false,businessOnly:false,unavailable:true};RHOBI.request("GetContactListByUser",b,function(h){RHOBI.hideSpinner("loadContactsSpinner");var e="";for(var g in h){var d=h[g];if(d.ToUserID>0){var f=d.Demo.LastName+", "+d.Demo.FirstName;var j=" ";if(f.length>0){j=f.substring(0,1).toUpperCase()}if(e!=j){c.append("<table cellpadding='0' cellspacing='0' class='rhobi_fullWidth'><tr bgcolor='#ECF5FF'><td align='center' width='20px' class='rhobi_header'>"+htmlEncode(j)+"</td><td>&nbsp;</td></tr></table>");e=j}c.append("<table cellspacing='0' class='rhobi_fullWidth' cellpadding='0'><tr><td style='width:20px;min-width:20px;max-width:20px; text-align:center; white-space:nowrap'>&nbsp;</td><td style='width:32px;min-width:32px;max-width:32px; text-align:center; white-space:nowrap'><img src='"+RHOBI.userPhotoUrl(d.PhotoUrl)+"' style='width:32px;height:32px'/></td><td style='width:20px;min-width:20px;max-width:20px; text-align:center; white-space:nowrap'><img src='"+RHOBI.www+d.Availability.StatusLightUrl+"' style='width:16px;height:16px'/></td><td style='width:10px;min-width:10px;max-width:10px'>&nbsp;</td><td style='width:300px;min-width:300px;max-width:300px'><a href='javascript:void(0);' id='contactProfile"+d.ContactID+"' onclick=\"RHOBI.loadMiniProfile("+d.ToUserID+", 'contactProfile"+d.ContactID+"');return false;\">"+htmlEncode(f)+"</a></td><td>"+(d.PrimaryPosition!=null&&d.PrimaryPosition.Title!=null?htmlEncode(d.PrimaryPosition.Title+" at "+d.Demo.Company):"")+"</td><td style='width:60px;min-width:60px;max-width:60px;text-align:center'><a href='javascript:void(0);' alt='See who this person is clicked with.'>"+d.L1Clicks+"</a></td></tr></table>");if(d.Availability.CurrentStatus!=null&&d.Availability.CurrentStatus.length>0){c.append("<table width='100%' cellpadding='0' cellspacing='0' border='0'><tr><td width='132px'></td><td class='rhobi_contactCurrentStatus'>"+htmlEncode(d.CurrentStatus)+"</td></tr></table>")}}}})};window.communityContactsScriptLoaded={}})(jQuery);var RHOBI=RHOBI||{};(function($){RHOBI.doLogin=function(afterLogin){$.facebox.settings.closeImage=RHOBI.www+"/scripts/facebox/closelabel.png";$.facebox("<div id='rhobi_loginbox'><span class='rhobi_header'>Sign In or Register</span><br/><br/>What is your e-mail address?<br/>&nbsp;&nbsp;&nbsp;<b>My e-mail address is:</b> <input id='rhobiLoginEmail' type='text' tabindex=1 style='width:180px' /><br/><br/>Do you have a Community password?<br/>&nbsp;&nbsp;&nbsp;<input id='rhobiLoginPasswordRadio' type='radio' name='rhobiLoginRadio' value='Existing'/><b>Yes, I have a password:</b> <input id='rhobiLoginPassword' type='password' tabindex=2 /><br/>&nbsp;&nbsp;&nbsp;<input type='radio' name='rhobiLoginRadio' value='New'/><b>No, setup a new account.</b><br/><span style='float:right'><a href='mailto:help@rhobi.com?subject=I forgot my password!' class='rhobi_link'>forgot your password?</a></span><br/><a id='rhobiLoginButton' href='javascript:void(0);' onclick=\"RHOBI.loginButtonClick('"+afterLogin+"');\" class='rhobi_bluebutton' tabindex=3><span>continue</span></a><div id='rhobiLoginError' style='display:none' class='rhobi_error'></div></div>");$("#rhobiLoginPassword").keydown(function(event){if(event.keyCode==13){RHOBI.loginButtonClick(afterLogin);return false}else{$("#rhobiLoginPasswordRadio").attr("checked","true")}});$("#rhobiLoginEmail").focus()};RHOBI.loginButtonClick=function(afterLogin){$("#rhobiLoginButton").hide();$("#rhobiLoginError").hide();var option=$("input[name='rhobiLoginRadio']:checked").val();if(option=="Existing"){RHOBI.loginExistingUser(afterLogin)}else{if(option=="New"){RHOBI.loginNewUser()}else{if(option=="Guest"){RHOBI.loginGuest()}else{RHOBI.showLoginError("How do you want to log in?")}}}};RHOBI.loginExistingUser=function(afterLogin){if(afterLogin){afterLogin=unescape(afterLogin)}userName=$("#rhobiLoginEmail").val();password=$("#rhobiLoginPassword").val();if(userName==""){RHOBI.showLoginError("Email address is required.");return}if(password==""){RHOBI.showLoginError("Password is required.");return}RHOBI.showSpinner("rhobi_loginbox","loginboxSpinner");var data={userName:userName,password:password,applicationCode:"PP",ipAddress:"",loginFrom:"",visitorGUID:RHOBI.visitorGUID,integratedDomainGUID:null};RHOBI.request("Authenticate",data,function(dto){RHOBI.hideSpinner("loginboxSpinner");if(dto.Success&&dto.UserID!=0){$.facebox.close();RHOBI.userID=dto.UserID;RHOBI.userGUID=dto.UserGUID;RHOBI.authTicket=dto.Ticket;if(dto.DefaultSysID>0){RHOBI.sysID=dto.DefaultSysID;RHOBI.sysDir=dto.DefaultDir}RHOBI.userName=userName;RHOBI.pwdHash=dto.PwdHash;RHOBI.user=dto.User;RHOBI.saveAuthToCookie();RHOBI.onUserChanged();RHOBI.onIntegratedAuthentication();if(afterLogin!=null&&afterLogin.length>0){eval(afterLogin)}}else{RHOBI.showLoginError(dto.Error)}})};RHOBI.onIntegratedAuthentication=function(){if(RHOBI.integrated){var loginData={userID:RHOBI.userID,userGUID:RHOBI.userGUID,authTicket:RHOBI.authTicket,sysID:RHOBI.sysID};$.ajax({type:"POST",url:"/Community.aspx/Login",data:JSON.stringify(loginData),contentType:"application/json; charset=utf-8",dataType:"json",success:function(msg){if(location.href.indexOf("/Internal")>=0){window.location.reload()}}})}if(RHOBI.successLoginCallback){RHOBI.successLoginCallback()}};RHOBI.showLoginError=function(error){$("#rhobiLoginButton").show();$("#rhobiLoginError").html(error);$("#rhobiLoginError").show()};RHOBI.loginNewUser=function(){email=$("#rhobiLoginEmail").val();if(email==""){RHOBI.showLoginError("Email address is required.");return}if(!validateEmail(email)){RHOBI.showLoginError("Invalid email address.");return}RHOBI.showSpinner("rhobi_loginbox","checkDupUserSpinner");var chkdata={authTicket:RHOBI.authTicket,userName:email};RHOBI.request("CheckDuplicateUser",chkdata,function(dup){RHOBI.hideSpinner("checkDupUserSpinner");if(dup==null||dup){RHOBI.showLoginError("User account already exists.");return}else{RHOBI.register.showUserRegistrationForm(email)}})};RHOBI.loginGuest=function(){email=$("#rhobiLoginEmail").val();$.facebox.close()};RHOBI.doLogout=function(){RHOBI.request("EndSession",{authTicket:RHOBI.authTicket},null);RHOBI.userID=0;RHOBI.userGUID="";RHOBI.authTicket="";RHOBI.sysID=0;RHOBI.systems=null;RHOBI.sysDir=null;RHOBI.userName="";RHOBI.pwdHash="";RHOBI.user=null;RHOBI.saveAuthToCookie();RHOBI.onUserChanged();if(RHOBI.integrated){$.ajax({type:"POST",url:"/Community.aspx/Logout",data:{},contentType:"application/json; charset=utf-8",dataType:"json",success:function(msg){if(location.href.indexOf("/Internal")>=0){location.href="/"}}})}if(RHOBI.siteGUID!=""){var data={visitorGUID:RHOBI.getVisitorGUID(),domainGUID:RHOBI.siteGUID,currentPage:window.location.href};RHOBI.request("NewVisitorSession",data,function(obj){if(RHOBI.successLogoutCallback){RHOBI.successLogoutCallback()}})}else{if(RHOBI.successLogoutCallback){RHOBI.successLogoutCallback()}}};RHOBI.onUserChanged=function(){if($("#communityDiv").length>0){RHOBI.loadTabs();RHOBI.loadProfileArea();RHOBI.loadSectionList();RHOBI.loadCommunityList();if(RHOBI.userGUID==""){$("div[rel*=commentBoxRel]").remove()}}if(!RHOBI.undocked){RHOBI.subscribeCometUser()}};RHOBI.subscribeCometUser=function(){RHOBI.log("subscribeCometUser");if(RHOBI.userGUID!=""){fm.websync.client.subscribe({channel:"/instant/"+RHOBI.userGUID,onSuccess:function(args){RHOBI.log("*subscribeCometUser success")},onFailure:function(args){RHOBI.log("*subscribeCometUser fail: "+args.error)},onReceive:function(msg){RHOBI.log("*subscribeCometUser recv");RHOBI.conversationWithUserID(msg.data.PosterUserID,msg.data.MsgThreadID,msg.data.MsgID,msg.data.InstantID,"",msg.data.Payload)}})}};RHOBI.switchSystem=function(){$.facebox.settings.closeImage=RHOBI.www+"/scripts/facebox/closelabel.png";$.facebox("<div id='rhobi_switchSystemBox'><span class='rhobi_loginheader'>Switch Companies</span><br/><br/></div>");RHOBI.showSpinner("rhobi_switchSystemBox","switchSystemSpinner");var data={authTicket:RHOBI.authTicket,userID:RHOBI.userID};RHOBI.request("GetSystemAccess",data,function(list){RHOBI.hideSpinner("switchSystemSpinner");options="";if(list!=null&&list.Systems!=null&&list.Systems.length>0){for(var i in list.Systems){var sys=list.Systems[i];options+="<option value='"+sys.ID+"' dirID='"+sys.DirectoryID+"'>"+htmlEncode(sys.Company)+"</option>"}}$("#rhobi_switchSystemBox").append("<select id='rhobi_selectSystem' size='20' style='width:100%'>"+options+"</select><p><a href='javascript:void(0);' onclick=\"RHOBI.onSwitchSystemClick();return false;\" class='rhobi_bluebutton'><span>Switch</span></a></p>")})};RHOBI.onSwitchSystemClick=function(){var sys=$("#rhobi_selectSystem").val();var dirID=$("#rhobi_selectSystem option:selected").attr("dirID");$.facebox.close();if(sys!=null&&sys.length>0){var sysID=parseInt(sys);RHOBI.sysID=sysID;var data={authTicket:RHOBI.authTicket,dirID:dirID};RHOBI.request("GetDirectoryByID",data,function(dir){if(dir!=null){RHOBI.sysDir=dir;RHOBI.saveAuthToCookie();if($("#communityDiv").length>0){RHOBI.loadProfileArea();if(RHOBI.sysDir.WallGroupID!=null){RHOBI.goCommunity(RHOBI.sysDir.WallGroupID)}}RHOBI.onIntegratedAuthentication()}})}};RHOBI.loadAuthFromCookie=function(onCompleteFunc){var loadUser=false;var loadSysDir=false;var sysDirID=0;if(RHOBI.authTicket==""){var c=$.cookie("rhobi_authTicket");if(c&&c.length>0){RHOBI.authTicket=c}}if(RHOBI.userGUID==""){var c=$.cookie("rhobi_userGUID");if(c&&c.length>0){RHOBI.userGUID=c}}if(RHOBI.userID==0){var c=$.cookie("rhobi_userID");if(c&&c.length>0){RHOBI.userID=parseInt(c);loadUser=true}}if(RHOBI.sysID==0){var c=$.cookie("rhobi_sysID");if(c&&c.length>0){RHOBI.sysID=parseInt(c)}}if(RHOBI.sysDir==null){var c=$.cookie("rhobi_sysDirID");if(c&&c.length>0){sysDirID=parseInt(c);loadSysDir=true}}if(RHOBI.pwdHash==""){var c=$.cookie("rhobi_pwdHash");if(c&&c.length>0){RHOBI.pwdHash=c}}if(RHOBI.userName==""){var c=$.cookie("rhobi_userName");if(c&&c.length>0){RHOBI.userName=c}}if(!loadUser&&!loadSysDir){onCompleteFunc()}else{if(loadUser){var data={authTicket:RHOBI.authTicket,userID:RHOBI.userID};RHOBI.request("GetUserByID",data,function(me){RHOBI.user=me;loadUser=false})}if(loadSysDir){var data={authTicket:RHOBI.authTicket,dirID:sysDirID};RHOBI.request("GetDirectoryByID",data,function(dir){RHOBI.sysDir=dir;loadSysDir=false})}function checkLoaded(){if(!loadUser&&!loadSysDir){onCompleteFunc()}else{window.setTimeout(checkLoaded,100)}}window.setTimeout(checkLoaded,100)}};RHOBI.saveAuthToCookie=function(){$.cookie("rhobi_authTicket",RHOBI.authTicket,{path:"/"});$.cookie("rhobi_userGUID",RHOBI.userGUID,{path:"/"});$.cookie("rhobi_userID",RHOBI.userID.toString(),{path:"/"});$.cookie("rhobi_sysID",RHOBI.sysID.toString(),{path:"/"});$.cookie("rhobi_sysDirID",RHOBI.sysDir!=null?RHOBI.sysDir.ID:0,{path:"/"});$.cookie("rhobi_pwdHash",RHOBI.pwdHash,{path:"/"});$.cookie("rhobi_userName",RHOBI.userName,{path:"/"})};RHOBI.domainLogin=function(authObject){var data={domainGUID:RHOBI.siteGUID,visitorGUID:RHOBI.visitorGUID,userName:authObject.userName,domainUserKey:authObject.domainUserKey,email:authObject.email,firstName:authObject.firstName,lastName:authObject.lastName,city:authObject.city,state:authObject.state,country:authObject.country,tz:authObject.tz,jobTitle:authObject.jobTitle,hireDate:authObject.hireDate};RHOBI.request("DomainAuthenticate",data,function(dto){if(dto!=null&&dto.Success){RHOBI.userID=dto.UserID;RHOBI.userGUID=dto.UserGUID;RHOBI.authTicket=dto.Ticket;if(dto.DefaultSysID>0){RHOBI.sysID=dto.DefaultSysID;RHOBI.sysDir=dto.DefaultDir}RHOBI.userName=userName;RHOBI.pwdHash=dto.PwdHash;RHOBI.user=dto.User;RHOBI.saveAuthToCookie();RHOBI.onUserChanged();if(afterLogin!=null&&afterLogin.length>0){eval(afterLogin)}}})};window.communityLoginScriptLoaded={}})(jQuery);var RHOBI=RHOBI||{};RHOBI.register=RHOBI.register||{};(function(a){RHOBI.register.showUserRegistrationForm=function(b){a.facebox.settings.closeImage=RHOBI.www+"/scripts/facebox/closelabel.png";a.facebox("<div id='rhobi_registerbox'><span class='rhobi_header'>Register Account</span><br/><br/><table width='100%' cellspacing='0' cellpadding='2' border='0'><tr><td style='width:120px'>Email Address</td><td><input type='text' id='rhobi_txtEmail' class='rhobi_largeInput' style='width:400px' value='"+htmlEncode(b)+"'/></td></tr><tr><td>First Name</td><td><input type='text' id='rhobi_txtFirstName' class='rhobi_largeInput' style='width:400px'/></td></tr><tr><td>Last Name</td><td><input type='text' id='rhobi_txtLastName' class='rhobi_largeInput' style='width:400px'/></td></tr><tr><td>Password</td><td><input type='password' id='rhobi_txtPassword' class='rhobi_largeInput' style='width:350'/> <span style='color:green' id='rhobi_txtPasswordSecure'></span></td></tr><tr><td>Confirm Password</td><td><input type='password' id='rhobi_txtConfirmPassword' class='rhobi_largeInput' style='width:350'/></td></tr><tr><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td><span class='rhobi_error'><input type='checkbox' id='rhobi_cbRegisterCompany' value='yes'> Do you want to register your company too?</span></td></tr></table><a id='rhobiRegisterButton' href='javascript:void(0);' onclick=\"RHOBI.register.registerButtonClick();\" class='rhobi_bluebutton' tabindex=3><span>continue</span></a><div id='rhobiRegisterError' style='display:none' class='rhobi_error'></div></div>");a("#rhobi_txtPassword").keyup(function(){var e=passwordStrength(a("#rhobi_txtPassword").val(),a("#rhobi_txtEmail").val());var d=a("#rhobi_txtPasswordSecure");var c="red";if(e=="Good"){c="green"}else{if(e=="Strong"){c="black"}}d.css("color",c);d.html(e)});if(a("#rhobi_txtEmail").val().length>0){a("#rhobi_txtFirstName").focus()}else{a("#rhobi_txtEmail").focus()}};RHOBI.register.registerButtonClick=function(){a("#rhobiRegisterButton").hide();a("#rhobiRegisterError").hide();userName=a("#rhobi_txtEmail").val();firstName=a("#rhobi_txtFirstName").val();lastName=a("#rhobi_txtLastName").val();password=a("#rhobi_txtPassword").val();confirmPassword=a("#rhobi_txtConfirmPassword").val();strength=a("#rhobi_txtPasswordSecure").html();regCompany=a("#rhobi_cbRegisterCompany:checked").val()!=undefined;if(userName==""){RHOBI.register.showRegisterError("Email address is required.");return}if(firstName==""){RHOBI.register.showRegisterError("First name is required.");return}if(lastName==""){RHOBI.register.showRegisterError("Last name is required.");return}if(password==""){RHOBI.register.showRegisterError("Password is required.");return}if(strength!="Good"&&strength!="Strong"){RHOBI.register.showRegisterError("Password is too weak.");return}if(confirmPassword==""){RHOBI.register.showRegisterError("Please confirm your password.");return}if(confirmPassword!=password){RHOBI.register.showRegisterError("Passwords do not match.");a("#rhobi_txtPassword").val("");a("#rhobi_txtConfirmPassword").val("");a("#rhobi_txtPassword").focus();return}RHOBI.showSpinner("rhobi_registerbox","registerboxSpinner");var b={userName:userName,email:userName,password:password,firstName:firstName,lastName:lastName};RHOBI.request("AddUser",b,function(c){if(c==null){RHOBI.hideSpinner("registerboxSpinner");RHOBI.register.showRegisterError("Error communicating with server.");return}if(c.ID==null&&c.Error!=""&&c.Error.length>0){RHOBI.hideSpinner("registerboxSpinner");RHOBI.register.showRegisterError(c.Error);return}var d={userName:userName,password:password,applicationCode:"PP",ipAddress:"",loginFrom:"",visitorGUID:RHOBI.visitorGUID,integratedDomainGUID:null};RHOBI.request("Authenticate",d,function(e){RHOBI.hideSpinner("registerboxSpinner");if(e.Success&&e.UserID!=0){RHOBI.userID=e.UserID;RHOBI.userGUID=e.UserGUID;RHOBI.authTicket=e.Ticket;if(e.DefaultSysID>0){RHOBI.sysID=e.DefaultSysID;RHOBI.sysDir=e.DefaultDir}RHOBI.userName=userName;RHOBI.pwdHash=e.PwdHash;RHOBI.user=e.User;RHOBI.saveAuthToCookie();RHOBI.onUserChanged();RHOBI.onIntegratedAuthentication();if(regCompany){RHOBI.addJobPosition()}else{RHOBI.setUserHome()}}else{RHOBI.register.showRegisterError(e.Error)}})})};RHOBI.register.showRegisterError=function(b){a("#rhobiRegisterButton").show();a("#rhobiRegisterError").html(b);a("#rhobiRegisterError").show()};RHOBI.register.addJobPosDirectory=function(b){a("#rhobi_addJobPosSearch").hide();a("#rhobi_addJobPosCompanies").hide();a("#rhobi_addJobPosForm").hide();a("#rhobi_addJobPosDirectory").show();RHOBI.register.addEditDirectory("rhobi_addJobPosDirectory",b,null)};RHOBI.register.addEditDirectory=function(g,d,c){var e=false;if(c!=null&&c>0){e=true}function b(p,q,l,k,i,r,n,j,s,o,h,u,m,t){a("#"+g).html("<span id='rhobi_editDirID' style='display:none'>"+c+"</span><p>Please fill out the details about the company you work(ed) for:</p><table width='100%' cellspacing='0' cellpadding='2' border='0'><tr><td align='right'><b>Company Name:</b></td><td colspan='3'><input type='text' id='rhobi_txtCompany' tabindex='1'></td></tr><tr><td align='right'><b>Address 1:</b></td><td colspan='3'><input type='text' id='rhobi_txtAddress1' tabindex='2'></td></tr><tr><td align='right'>Address 2:</td><td colspan='3'><input type='text' id='rhobi_txtAddress2' tabindex='3'></td></tr><tr><td align='right'><b>City:</b></td><td colspan='3'><input type='text' id='rhobi_txtCity' tabindex='4'></td></tr><tr><td align='right'>State/Province:</td><td colspan='3'><input type='text' id='rhobi_txtState' tabindex='5'></td></tr><tr><td align='right'>Zip Code:</td><td colspan='3'><input type='text' id='rhobi_txtZip' tabindex='6'></td></tr><tr><td align='right'><b>Country:</b></td><td colspan='3'>"+buildCountryDropDown("rhobi_selectCountry","tabindex='7'")+"</td></tr><tr><td align='right'><b>Phone:</b></td><td><input type='text' id='rhobi_txtPhone' tabindex='8'></td><td align='right'>Fax:</td><td><input type='text' id='rhobi_txtFax' tabindex='9'></td></tr><tr><td align='right'>Alt Phone:</td><td><input type='text' id='rhobi_txtAltPhone' tabindex='10'></td><td align='right'>Cell:</td><td><input type='text' id='rhobi_txtCellPhone' tabindex='11'></td></tr><tr><td align='right'>Website:</td><td colspan='3'><input type='text' id='rhobi_txtWebsite' tabindex='12'></td></tr><tr><td align='right'>Upload Logo:</td><td colspan='3'><div id='rhobi_divCurrentPhoto'><img src='' border='0' id='rhobi_currentPhoto'/></div></td></tr><tr><td align='right'>&nbsp;</td><td colspan='3'>80x80 gif, png, jpg picture:</td></tr><tr><td align='right'>&nbsp;</td><td colspan='3'><input type='file' id='rhobi_uploadPhoto' name='rhobi_uploadPhoto' /></td></tr></table><p id='rhobi_pAddDirectoryButtons'><a href='javascript:void(0);' class='rhobi_bluebutton' onclick=\"RHOBI.register.doSaveDirectory("+e+");return false;\" id='rhobi_btnDoAddDirectory'><span>"+p+"</span></a><div id='rhobiDirectoryError' style='display:none' class='rhobi_error'></div></p>");a("#rhobi_txtCompany").val(q);a("#rhobi_txtAddress1").val(l);a("#rhobi_txtAddress2").val(k);a("#rhobi_txtCity").val(i);a("#rhobi_txtState").val(r);a("#rhobi_txtZip").val(n);a("#rhobi_selectCountry").val(j);a("#rhobi_txtPhone").val(s);a("#rhobi_txtFax").val(o);a("#rhobi_txtAltPhone").val(h);a("#rhobi_txtCellPhone").val(u);a("#rhobi_txtWebsite").val(m);a("#rhobi_currentPhoto").attr("src",t);a("#rhobi_uploadPhoto").uploadify({uploader:"/scripts/jquery.uploadify-v2.1.4/uploadify.swf",script:RHOBI.rhobiService+"/AddPhoto.ashx",scriptData:{mode:"fixed",w:"80",h:"80"},cancelImg:RHOBI.www+"/images/1ptrans.gif",folder:RHOBI.rhobiService+"/TempExtract",auto:true,scriptAccess:"always",onComplete:function(y,v,x,w,z){if(w!=""){var A=JSON.parse(w);if(typeof A.Error===undef){a("#rhobi_currentPhoto").attr("src",A.Cabinet.WebPath+"/"+A.FileName)}else{alert(A.Error)}}},onError:function(y,v,x,w){alert(w.info)}})}if(e){RHOBI.showSpinner(g,"loadAddEditDirectorySpinner");var f={authTicket:RHOBI.authTicket,dirID:c};RHOBI.request("GetDirectoryByID",f,function(h){RHOBI.hideSpinner("loadAddEditDirectorySpinner");b("save changes",h.HQDemo.Company,h.HQDemo.Address1,h.HQDemo.Address2,h.HQDemo.City,h.HQDemo.St,h.HQDemo.Zip,h.HQDemo.Country,h.HQDemo.Phone,h.HQDemo.Fax,h.HQDemo.AltPhone,h.HQDemo.CellPhone,h.HQDemo.WebSite,h.LogoUrl)})}else{b("register company",d)}};RHOBI.register.doSaveDirectory=function(b){a("#rhobiDirectoryError").hide();editDirID=a("#rhobi_editDirID").html();company=a("#rhobi_txtCompany").val();address1=a("#rhobi_txtAddress1").val();address2=a("#rhobi_txtAddress2").val();city=a("#rhobi_txtCity").val();st=a("#rhobi_txtState").val();zip=a("#rhobi_txtZip").val();country=a("#rhobi_selectCountry").val();phone=a("#rhobi_txtPhone").val();fax=a("#rhobi_txtFax").val();altPhone=a("#rhobi_txtAltPhone").val();cellPhone=a("#rhobi_txtCellPhone").val();webSite=a("#rhobi_txtWebsite").val();logoUrl=a("#rhobi_currentPhoto").attr("src");if(company==""){RHOBI.register.showDirectoryError("Company is required.");return}if(address1==""){RHOBI.register.showDirectoryError("Address Line 1 is required.");return}if(city==""){RHOBI.register.showDirectoryError("City is required.");return}if(country==""){RHOBI.register.showDirectoryError("Country is required.");return}if(phone==""){RHOBI.register.showDirectoryError("Phone number is required.");return}a("#rhobi_btnDoAddDirectory").hide();RHOBI.showSpinner("rhobi_pAddDirectoryButtons","saveDirectorySpinner");if(!b){var c={authTicket:RHOBI.authTicket,createdByUserID:RHOBI.userID,company:company,address1:address1,address2:address2,city:city,st:st,zip:zip,country:country,phone:phone,fax:fax,altPhone:altPhone,cellPhone:cellPhone,webSite:webSite,publicSearchable:true,validated:false,logoUrl:logoUrl};RHOBI.request("AddDirectory",c,function(d){RHOBI.hideSpinner("saveDirectorySpinner");if(d!=null){RHOBI.showAddJobPosForm(d,company)}})}else{var c={authTicket:RHOBI.authTicket,dirID:editDirID,updatedByUserID:RHOBI.userID,company:company,address1:address1,address2:address2,city:city,st:st,zip:zip,country:country,phone:phone,fax:fax,altPhone:altPhone,cellPhone:cellPhone,webSite:webSite,email:null,publicSearchable:true,info:null,logoUrl:logoUrl};RHOBI.request("UpdateDirectory",c,function(d){a.facebox.close();if(RHOBI.sysDir!=null&&RHOBI.sysDir.ID==editDirID){RHOBI.sysDir=d}RHOBI.loadProfileArea();RHOBI.goCompanyWall()})}};RHOBI.register.showDirectoryError=function(b){a("#rhobi_btnDoAddDirectory").show();a("#rhobiDirectoryError").html(b);a("#rhobiDirectoryError").show()};window.communityRegisterScriptLoaded={}})(jQuery);var RHOBI=RHOBI||{};(function(a){RHOBI.separatorHtml="<div style='height:10px'><img src='"+RHOBI.www+"/images/1ptrans.gif' border='0' height='2' width='1'/></div>";RHOBI.messageSeparatorHtml=RHOBI.separatorHtml+"<div class='rhobi_messageThreadSeparator'><img src='"+RHOBI.www+"/images/1ptrans.gif' border='0'/></div>"+RHOBI.separatorHtml;RHOBI.dotHtml=" &#183; ";RHOBI.showMessageThread=function(f,b,c,d,e){var g=a("#"+b);html=RHOBI.buildMessageThreadHtml(f);if(d){html=RHOBI.messageSeparatorHtml+html}if(e){html=html+RHOBI.messageSeparatorHtml}if(c){g.prepend(html)}else{g.append(html)}permalink=RHOBI.www+"/Permalink.aspx?sectionGUID="+RHOBI.sectionGUID+"&communityGUID="+RHOBI.communityGUID+"&msgGUID="+f.MsgGUID;addthis.button("#addthis"+f.MsgID,{ui_click:true},{url:permalink,title:f.Subject});gapi.plusone.render("rhobi_plusonemsg"+f.MsgID,{size:"small",count:"true",href:permalink})};RHOBI.buildMessageThreadHtml=function(f){var d="";d+="<a href='#msg"+f.MsgID+"'/>";d+="<div id='msg"+f.MsgID+"' class='rhobi_message'>";d+="<table width='100%' cellspacing='0' cellpadding='3'><tr>";d+="<td width='60' valign='top'>";if(f.FromDirectoryID!=null){d+="<a href='javascript:void(0);' onclick=\"RHOBI.loadCompanyProfile("+f.FromDirectoryID+',false);return false;">'}else{d+="<a href='javascript:void(0);' id='msgPosterPhoto"+f.MsgID+"' onclick=\"RHOBI.loadMiniProfile("+f.PosterUserID+", 'msgPosterPhoto"+f.MsgID+"');return false;\">"}d+="<img src='"+RHOBI.userPhotoUrl(f.PosterPhotoUrl)+"' border='0' width='50' height='50'/></a>";d+="</td><td width='95%' valign='top'>";d+="<table width='100%' cellspacing='0' cellpadding='0' border='0'><tr>";d+="<td>";if(f.Subject!=null&&f.Subject.length>0){d+="<span class='rhobi_subjectLine'>";if(f.URL!=null&&f.URL.length>0){d+="<a href='"+f.URL+"' target='_blank' class='rhobi_link'>"+f.Subject+"</a>"}else{d+=f.Subject}d+="</span>"}d+="</td><td align='right' class='rhobi_messageType'>";if(f.To!=null&&f.To.length>0){if(RHOBI.user!=null&&RHOBI.user.UserName=="admin"){d+="<a href='javascript:void(0);' class='rhobi_link' onclick=\"RHOBI.changeMessageStream("+f.MsgID+",'"+f.To[0].ToSectionGUID+"','"+f.To[0].ToCommunityGUID+"');return false;\">[move]</a> "}d+="<a href='javascript:void(0);' class='rhobi_link' onclick=\"RHOBI.goStream('"+f.To[0].ToSectionGUID+"','"+f.To[0].ToCommunityGUID+"');return false;\">"+f.To[0].SectionFullName+", "+f.To[0].CommunityFullName+"</a>"}d+="</td>";d+="</tr></table>";if(f.FromDirectoryID!=null){d+="<b><a href='javascript:void(0);' class='rhobi_link' id='msgPoster"+f.MsgID+"' onclick=\"RHOBI.loadCompanyProfile("+f.FromDirectoryID+',false);return false;">'+htmlEncode(f.PosterCompany)+"</a></b>"}else{d+="<b><a href='javascript:void(0);' class='rhobi_link' id='msgPoster"+f.MsgID+"' onclick=\"RHOBI.loadMiniProfile("+f.PosterUserID+", 'msgPoster"+f.MsgID+"');return false;\">"+htmlEncode(f.PosterFirstName)+" "+htmlEncode(f.PosterLastName)+"</a></b>"}d+=RHOBI.dotHtml+"<font color='#BBBBBB'>"+htmlEncode(f.Ago)+"</font><br/><br/>";if(f.Attachments!=null&&f.Attachments.length>0){for(c=0;c<f.Attachments.length;c++){var b=f.Attachments[c];d+="<img src='"+b.OriginalDocument.Cabinet.WebPath+"/"+b.OriginalDocument.FileName+"' style='border:0'/><br/>"}d+="<br/>"}d+="<span class='rhobi_body'>"+f.Body+"</span><br/>";d+="<br/>";d+="<a id='addthis"+f.MsgID+"' style='cursor:hand'/> <span id='rhobi_plusonemsg"+f.MsgID+"'></span>";d+=RHOBI.dotHtml+"<a href='javascript:void(0);' class='rhobi_link' onclick=\"RHOBI.doComment('"+f.MsgID.toString()+"');return false;\">Comment</a>";if(RHOBI.userID!=f.PosterUserID){d+=RHOBI.dotHtml+"<a href='javascript:void(0);' class='rhobi_link' onclick=\"RHOBI.doLike('"+f.MsgID.toString()+"');return false;\">Like</a>"}d+=RHOBI.dotHtml+"<a href='javascript:void(0);' class='rhobi_link' onclick=\"RHOBI.doFollow('"+f.MsgID.toString()+"');return false;\">Follow</a>";if(RHOBI.userID==f.PosterUserID){d+=RHOBI.dotHtml+"<a href='javascript:void(0);' class='rhobi_link' onclick=\"RHOBI.doDeleteMessage('"+f.MsgID.toString()+"');return false;\">Delete</a>"}d+="<div id='comments"+f.MsgID.toString()+"'>";if(f.Replies!=null&&f.Replies.length>0){repliesToShow=0;if(f.Replies.length>repliesToShow){d+="<div id='viewOldComments"+f.MsgID.toString()+"'>";d+="<table width='100%' cellspacing='0' cellpadding='3' bgcolor='#ECF5FF' border='0'><tr><td>";d+="<img src='"+RHOBI.www+"/images/Community/comments.gif' border='0'/> ";d+='<a href="javascript:RHOBI.viewOldComments('+f.MsgID.toString()+");\" class='rhobi_link'>View all "+f.Replies.length.toString()+" comments</a>";d+="</td></tr></table>";d+="</div>";d+="<div style='height:2px'><img src='"+RHOBI.www+"/images/1ptrans.gif' border='0' height='2' width='1'/></div>";d+="<div id='oldComments"+f.MsgID.toString()+"' style='display:none'>";for(var c in f.Replies){if(c<f.Replies.length-repliesToShow){var e=f.Replies[c];d+=RHOBI.buildCommentHtml(e)}}d+="</div>"}for(var c in f.Replies){if(c>=f.Replies.length-repliesToShow){var e=f.Replies[c];d+=RHOBI.buildCommentHtml(e)}}}d+="</div>";d+="</td>";d+="<tr></table>";d+="</div>";return d};RHOBI.viewOldComments=function(b){a("#oldComments"+b).toggle()};RHOBI.buildCommentHtml=function(c){var b="";b+="<div id='comment"+c.MsgID.toString()+"'>";b+="<table width='100%' cellspacing='0' cellpadding='3' bgcolor='#ECF5FF' border='0'><tr>";b+="<td width='35' valign='top'>";b+="<img src='"+RHOBI.userPhotoUrl(c.PosterPhotoUrl)+"' border='0' width='32' height='32'/>";b+="</td><td width='95%' valign='top'>";b+="<b><a href='javascript:void(0);' class='rhobi_link' id='msgPoster"+c.MsgID+"' onclick=\"RHOBI.loadMiniProfile("+c.PosterUserID+", 'msgPoster"+c.MsgID+"');return false;\">"+htmlEncode(c.FromName)+"</a></b> "+c.Body+"<br/>";b+="<font color='#BBBBBB'>"+htmlEncode(c.Ago)+"</font>";if(RHOBI.userID!=c.PosterUserID){b+=RHOBI.dotHtml+"<a href='javascript:void(0);' class='rhobi_link' onclick=\"RHOBI.doLike('"+c.MsgID.toString()+"');return false;\">Like</a>"}if(RHOBI.userID==c.PosterUserID){b+=RHOBI.dotHtml+"<a href='javascript:void(0);' class='rhobi_link' onclick=\"RHOBI.doDeleteMessage('"+c.MsgID.toString()+"');return false;\">Delete</a>"}b+="</td>";b+="</tr></table>";b+="</div>";b+="<div style='height:2px'><img src='"+RHOBI.www+"/images/1ptrans.gif' border='0' height='2' width='1'/></div>";return b};RHOBI.doComment=function(b){if(RHOBI.userGUID!=""){if(a("#reply"+b).length>0){a("#txtComment"+b).focus();return}waterMsg="Write a comment...";h="<div id='reply"+b+"' rel='commentBoxRel'>";h+="<table width='100%' cellspacing='0' cellpadding='3' border='0' bgcolor='#ECF5FF'><tr>";h+="<td width='0px' valign='top'><div id='divReplyPhoto"+b+"' class='displaynone' style='width:35px'>";h+="<img src='"+RHOBI.myPhotoUrl()+"' border='0' width='32' height='32'/>";h+="</div></td><td width='100%' valign='top'>";h+="<input type='text' ID='txtComment"+b+"' class='rhobi_watermarkOn' style='width:98%' value='"+htmlEncode(waterMsg)+"' />";h+="<div id='divSubmitComment"+b+"' class='displaynone' style='text-align:right'>";h+="<a class='rhobi_bluebutton' style='float:right' ID='btnSubmitComment"+b+"' onclick=\"RHOBI.submitComment('"+b+"');return false;\" href='javascript:void(0);'><span>comment</span></a>";h+="</div>";h+="</td></tr></table>";h+="</div>";a("#comments"+b).append(h);inputBox="#txtComment"+b;a(inputBox).keydown(function(c){if(c.keyCode==13){a("#btnSubmitComment"+b).click();return false}});a(inputBox).focus(function(){a("#divReplyPhoto"+b).removeClass("displaynone").addClass("displayblock");a("#divSubmitComment"+b).removeClass("displaynone").addClass("displayblock");a(this).filter(function(){return a(this).val()==""||a(this).val()==waterMsg}).removeClass("rhobi_watermarkOn").val("")});a(inputBox).blur(function(){a(this).filter(function(){return a(this).val()==""}).addClass("rhobi_watermarkOn").val(waterMsg)});a("#txtComment"+b).focus()}else{RHOBI.doLogin()}};RHOBI.doLike=function(b){if(RHOBI.userGUID!=""){alert("That's not working yet... Coming soon!")}else{RHOBI.doLogin()}};RHOBI.doDislike=function(b){if(RHOBI.userGUID!=""){alert("That's not working yet... Coming soon!")}else{RHOBI.doLogin()}};RHOBI.doFollow=function(b){if(RHOBI.userGUID!=""){alert("That's not working yet... Coming soon!")}else{RHOBI.doLogin()}};RHOBI.submitComment=function(b){inputBox="#txtComment"+b;comment=a(inputBox).val();data={authTicket:RHOBI.authTicket,fromUserID:RHOBI.userID,currentDirectoryID:(RHOBI.sysDir!=null?RHOBI.sysDir.ID:null),msgThreadID:b,comment:comment};RHOBI.request("SubmitCommunityComment",data,function(c){if(c!=null){a(inputBox).val("");a(inputBox).focus();var d=RHOBI.buildCommentHtml(c);if(a("#reply"+b).length>0){a("#reply"+b).before(d)}else{a("#comments"+b).append(d)}}else{alert("There was an error while saving your comment. Try again.")}})};RHOBI.doDeleteMessage=function(c){if(confirm("Are you sure you want to delete this message?")){var b={authTicket:RHOBI.authTicket,msgID:c,deletedByUserID:RHOBI.userID};RHOBI.request("DeleteMessage",b,function(){a("#comment"+c).remove();a("#msg"+c).remove()})}};RHOBI.loadPermalink=function(c){var e=getParameterByName("msgGUID");var d=getParameterByName("sectionGUID");var b=getParameterByName("industryGUID");var f=getParameterByName("communityGUID");var g=a("#"+c);g.append("<div id='rhobi_permaLinkHeader'><a href='"+RHOBI.communityPage+"?sectionGUID="+d+"&industryGUID="+b+"&communityGUID="+f+"' class='rhobi_bluebutton'><span>click here to return to</span></a> <span id='rhobi_streamName' class='rhobi_header'></span></div><p>&nbsp;</p><div id='rhobi_permaLinkMessage'/>");RHOBI.request("GetCommunityMessageByGuid",{GUID:e},function(i){RHOBI.showMessageThread(i,"rhobi_permaLinkMessage",false,false,false)});RHOBI.loadStreamName()};window.communityMessagesScriptLoaded={}})(jQuery);var RHOBI=RHOBI||{};(function(a){RHOBI.loadFeed=function(){RHOBI.log("loadFeed")};window.communityNewsScriptLoaded={}})(jQuery);var RHOBI=RHOBI||{};(function($){RHOBI.loadProfile=function(userID){if($("#communityDiv").length==0){RHOBI.openCommunityPage("RHOBI.loadProfile("+userID+")");return}$("#rhobi_content").html("<div id='rhobi_viewProfile'></div>");viewingOwn=userID==RHOBI.userID;if(viewingOwn){RHOBI.setSectionShowingSpan("My personal profile")}else{RHOBI.setSectionShowingSpan("Community profile")}RHOBI.showSpinner("rhobi_viewProfile","viewProfileSpinner");var data={authTicket:RHOBI.authTicket,profileUserID:userID,viewedByUserID:RHOBI.userID};RHOBI.request("ViewUserProfile",data,function(user){RHOBI.hideSpinner("viewProfileSpinner");function buildpos(posList){h="";if(posList!=null&&posList.length>0){for(var i in posList){var pos=posList[i];h+="<li>"+htmlEncode(pos.Title)+" at <a href='javascript:void(0);' onclick=\"RHOBI.loadCompanyProfile("+pos.Directory.ID+",false);return false;\" class='rhobi_link'><b>"+htmlEncode(pos.Directory.HQDemo.Company)+"</b></a>";if(userID==RHOBI.userID){h+=" <a href='javascript:void(0);' class='rhobi_link' onclick=\"RHOBI.deleteJobPosition("+pos.ID+",'"+encodeURIComponent(pos.Title)+"','"+encodeURIComponent(pos.Directory.HQDemo.Company)+"');return false;\">[delete this company]</a>"}}}if(viewingOwn){h+="<li><a href='javascript:void(0);' class='rhobi_link' onclick=\"RHOBI.addJobPosition();return false;\">[add your company]</a>"}return h}html="<table width='100%' cellspacing='0' cellpadding='3' border='0'><tr><td valign='top'><span class='rhobi_header'>"+htmlEncode(user.Demo.FullName)+" "+(viewingOwn?"<a href='javascript:void(0);' class='rhobi_bluebutton' onclick=\"RHOBI.editMyProfile();return false;\"><span>edit your info</span></a>":"")+"</span><br/><b>"+htmlEncode(user.Headline)+"</b><p><b>Contact Information:</b><br/>"+RHOBI.addressBlockFromDemo(user.Demo,userID)+"</p></td><td width='80' valign='top' align='center'><img src='"+RHOBI.userPhotoUrl(user.PhotoUrl)+"' border='0' style='width:80px;height:80px' /><br/>"+(viewingOwn?"<a href='javascript:void(0);' class='rhobi_link' onclick=\"RHOBI.editMyProfile();return false;\">[edit]</a>":"")+"</td></tr></table><div id='rhobi_changeStatus' style='width:100%;display:none'></div><table width='100%' cellspacing='0' cellpadding='3' border='0'><tr><td colspan='2'><hr/></td></tr><tr><td width='100'><b>Current Jobs:</b></td><td>"+buildpos(user.CurrentPositions)+"</td></tr><tr><td colspan='2'><hr/></td></tr><tr><td><b>Past Jobs:</b></td><td>"+buildpos(user.PastPositions)+"</td></tr><tr><td colspan='2'><hr/></td></tr><tr><td><b>Stats:</b></td><td>"+user.L1Clicks+" connections<br/>Profile viewed "+user.ProfileViews+" time"+(user.ProfileViews>1?"s":"")+"</td></tr><tr><td colspan='2'><hr/></td></tr></table>";$("#rhobi_viewProfile").append(html)})};RHOBI.addressBlockFromDemo=function(demo,userID){if(!userID){userID=0}html=htmlEncode(demo.FullName);function addline(prefix,l,wrapstart,wrapend){if(l!=null&&l.length>0){html+="<br/>";if(wrapstart!=null&&wrapstart.length>0){html+=wrapstart}html+=htmlEncode(prefix+l);if(wrapend!=null&&wrapend.length>0){html+=wrapend}}}function calllink(number){return"RHOBI.makeCall("+userID+",0,'"+encodeURIComponent(number)+"',false)"}addline("",demo.Address1);addline("",demo.Address2);addline("",demo.CityStZip);addline("",demo.Country);if(RHOBI.userID==userID){addline("Ph. ",demo.Phone,"<a href='javascript:void(0);' class='rhobi_link' onclick=\""+calllink(demo.Phone)+';return false;">',"</a>");addline("Alt. ",demo.AltPhone,"<a href='javascript:void(0);' class='rhobi_link' onclick=\""+calllink(demo.AltPhone)+';return false;">',"</a>");addline("Fax ",demo.Fax);addline("Cell ",demo.CellPhone,"<a href='javascript:void(0);' class='rhobi_link' onclick=\""+calllink(demo.CellPhone)+';return false;">',"</a>")}addline("",demo.Email,'<a href="mailto:'+encodeURIComponent(demo.Email)+"\" class='rhobi_link'>","</a>");return html};RHOBI.loadMiniProfile=function(userID,linkId,aboutCart){if(!aboutCart){aboutCart=false}var boxID="rhobi_miniProfile"+userID;if($("#"+boxID).length>0){$("#"+boxID).remove();return}var clickElementy=getAbsoluteTop(linkId)+14;$("body").append("<div id='"+boxID+"' class='rhobi_miniProfile'><div class='rhobi_miniProfileClose'><a href='javascript:void(0);' onclick=\"RHOBI.loadMiniProfile("+userID+",'"+linkId+"');return false;\"><img src='"+RHOBI.www+"/scripts/facebox/closelabel.png'/></a></div><div id='"+boxID+"copy'></div></div>");var clickElementx=getAbsoluteLeft(linkId)+10;$("#"+boxID).css({left:clickElementx+"px",top:clickElementy+"px"});$("#"+boxID).show();RHOBI.showSpinner(boxID,"miniProfileSpinner"+userID);RHOBI.request("GetUserByID",{authTicket:RHOBI.authTicket,userID:userID},function(user){RHOBI.hideSpinner("miniProfileSpinner"+userID);dirID=0;if(user.PrimaryPosition!=null){dirID=user.PrimaryPosition.Directory.ID}$("#"+boxID+"copy").append("<p><span class='rhobi_header'>"+htmlEncode(user.Demo.FullName)+"</span> <img src='"+RHOBI.www+user.Availability.StatusLightUrl+"' alt='"+htmlEncode(user.Availability.StatusMessage)+"' /><br/>"+(user.PrimaryPosition!=null?htmlEncode(user.PrimaryPosition.Title)+"<br/><a href='javascript:void(0);' class='rhobi_link' onclick=\"RHOBI.loadCompanyProfile("+user.PrimaryPosition.Directory.ID+","+aboutCart+');return false;">'+htmlEncode(user.PrimaryPosition.Directory.HQDemo.Company)+"</a>":"")+"</p>"+htmlEncode(user.Demo.City+", "+user.Demo.St+", "+user.Demo.Country)+"<br/><table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td>Fax:</td><td>"+htmlEncode(user.Demo.Fax)+'</td></tr><tr><td>Email:</td><td><a href="mailto:'+htmlEncode(user.Demo.Email)+"\" class='rhobi_link'>"+htmlEncode(user.Demo.Email)+"</a></td></tr></table><p><a href='javascript:void(0);' class='rhobi_bluebutton' onclick=\"RHOBI.newConversationWithUserID("+userID+");\"><span>chat</span></a><a href='javascript:void(0);' class='rhobi_bluebutton' onclick=\"RHOBI.makeCall("+userID+","+dirID+",'"+escape(user.Availability.CurrentPhoneNumber)+"',"+aboutCart+");\"><span>call</span></a><a href='javascript:void(0);' class='rhobi_bluebutton' onclick=\"jQuery('#"+boxID+"').remove();;RHOBI.loadProfile("+userID+');return false;"><span>profile</span></a></p>')})};RHOBI.loadCompanyProfile=function(dirID,aboutCart){if(!aboutCart){aboutCart=false}$.facebox.settings.closeImage=RHOBI.www+"/scripts/facebox/closelabel.png";$.facebox("<div id='rhobi_companyProfile'><div style='position:relative;top:-10px;left:-10px;cursor:pointer' onclick=\"RHOBI.undockCompanyProfile("+dirID+","+aboutCart+");\"><img src='"+RHOBI.www+"/images/undock.png' alt='undock' title='undock'></div></div>");RHOBI.buildCompanyProfile("rhobi_companyProfile",dirID,aboutCart)};RHOBI.buildCompanyProfile=function(divID,dirID,aboutCart){if(dirID==0){return}RHOBI.showSpinner(divID,"companyProfileSpinner");RHOBI.request("GetDirectoryByID",{authTicket:RHOBI.authTicket,dirID:dirID},function(dir){RHOBI.hideSpinner("companyProfileSpinner");var demo=dir.HQDemo;var location=demo.City+", "+demo.St+" "+demo.Zip+", "+(demo.Country==""?"United States":demo.Country);var website=demo.WebSite;if(website!=null&&website.length>0&&website.indexOf("://")==-1){website="http://"+website}if(RHOBI.undocked){document.title=demo.Company}html="<table class='rhobi_fullWidth' border='0' cellspacing='0' cellpadding='2'><tr><td rowspan='3' style='width:80px'><img src='"+RHOBI.dirLogoUrl(dir.LogoUrl)+"' border='0'/></td><td colspan='2' class='rhobi_header'>"+htmlEncode(demo.Company)+"</td><td align='right'><span id='rhobi_companyProfileButtons'></span></td></tr><tr><td>"+htmlEncode(demo.Address1)+"<br/>"+htmlEncode(location)+"</td><td>Ph.</td><td><a href='javascript:void(0);' class='rhobi_link' onclick=\"RHOBI.makeCall(0,"+dirID+",'"+escape(demo.Phone)+"',"+aboutCart+');return false;">'+htmlEncode(demo.Phone)+"</a></td></tr><tr><td><a href='"+htmlEncode(website)+"' class='rhobi_link' target='_blank'>"+htmlEncode(demo.WebSite)+"</a></td><td>Fax</td><td>"+htmlEncode(demo.Fax)+"</td></tr></table><br/><div id='rhobi_companyProfilePositions'></div>";$("#"+divID).append(html);if(dir.WallGUID!=null){$("#rhobi_companyProfileButtons").append("<a href='javascript:void(0);' class='rhobi_bluebutton' onclick=\"jQuery.facebox.close();RHOBI.loadWall('"+dir.WallGUID+"');return false;\"><span>wall</span></a>")}if(!RHOBI.integrated&&RHOBI.userGUID==""){$("#rhobi_companyProfileButtons").append("<a href='javascript:void(0);' onclick=\"RHOBI.doLogin();return false;\" class='rhobi_bluebutton'><span>login</span></a>")}var companyCart=aboutCart?RHOBI.filterCartByCompany(dirID):null;RHOBI.showSpinner("rhobi_companyProfilePositions","companyPositionsSpinner");RHOBI.request("GetCompanyPositions",{authTicket:RHOBI.authTicket,dirID:dirID,myUserID:RHOBI.userID},function(jobPositions){RHOBI.hideSpinner("companyPositionsSpinner");html="<table width='96%' cellspacing='0' cellpadding='1'><tr>";for(var i=0;i<jobPositions.length;i++){var pos=jobPositions[i];count=parseInt(i)+1;if(count>2&&count%2>0){html+="</tr><tr>"}var chatCommand="";var emailLink="";hasEmail=pos.Email!=null&&pos.Email.length>0;if(aboutCart){chatCommand="RHOBI.newConversationWithUserIDAboutCart("+pos.UserID+","+dirID+")";emailLink=hasEmail?RHOBI.emailCartLink(companyCart,pos.Email):""}else{chatCommand="RHOBI.newConversationWithUserID("+pos.UserID+")";emailLink="mailto:"+encodeURIComponent(pos.Email)}var statusLightHtml="<img src='"+RHOBI.www+pos.Availability.StatusLightUrl+"' border='0'/>";if(RHOBI.userID>0&&pos.UserID==RHOBI.userID){statusLightHtml="<a href='javascript:void(0);' onclick=\"RHOBI.onUpdateUserStatus();\">"+statusLightHtml+"</a>"}else{if(RHOBI.userID==0&&!RHOBI.integrated){afterLogin="";oc="RHOBI.doLogin('"+escape(afterLogin)+"');return false;";statusLightHtml="<a href='javascript:void(0);' onclick=\""+oc+'">'+statusLightHtml+"</a>"}}html+="<td>";html+="<table width='200' cellspacing='0' cellpadding='1'><tr><td style='width:32px'><img style='width:32px;height:32px' src='"+RHOBI.userPhotoUrl(pos.PhotoUrl)+"'></td><td><a href='javascript:void(0);' class='rhobi_link' id='rhobi_positionUser"+pos.UserID+"' onclick=\"RHOBI.loadMiniProfile("+pos.UserID+",'rhobi_positionUser"+pos.UserID+"',"+aboutCart+");jQuery('#rhobi_miniProfile"+pos.UserID+"').css('z-index','9999');return false;\"><b>"+pos.FirstName+" "+pos.LastName+"</b></a> "+statusLightHtml+"<br/>"+pos.Title+"<br/><a href='javascript:void(0);' class='rhobi_link' onclick=\"RHOBI.makeCall("+pos.UserID+","+dirID+",'"+escape(pos.Availability.CurrentPhoneNumber)+"',"+aboutCart+');return false;">Call</a>'+RHOBI.dotHtml+"<a href='javascript:void(0);' class='rhobi_link' onclick=\""+chatCommand+';return false;">Chat</a>'+RHOBI.dotHtml+'<a href="'+emailLink+"\" class='rhobi_link'>Email</a></td></tr></table>";html+="</td>"}html+="</tr></table>";$("#rhobi_companyProfilePositions").html(html)})})};RHOBI.undockCompanyProfile=function(dirID,aboutCart){features="status=0,toolbar=0,menubar=0,location=0,resizable=0,scrollbars=0,width=610,height=400";try{var existingRef=window.open("","companyProfile"+dirID,features);if(existingRef){if(existingRef.location.href.indexOf("CompanyProfileDock.aspx")==-1){existingRef.location.href=RHOBI.www+"/CompanyProfileDock.aspx?userID="+RHOBI.userID+"&userGUID="+RHOBI.userGUID+"&authTicket="+RHOBI.authTicket+"&dirID="+dirID+"&aboutCart="+aboutCart}else{existingRef.focus()}}}catch(err){}$.facebox.close()};RHOBI.onUpdateUserStatus=function(){$.facebox.settings.closeImage=RHOBI.www+"/scripts/facebox/closelabel.png";$.facebox("<div id='rhobi_updateUserStatusBox'></div>");RHOBI.buildUpdateUserStatusPanel("rhobi_updateUserStatusBox")};RHOBI.buildUpdateUserStatusPanel=function(divID){RHOBI.showSpinner(divID,"rhobi_updateUserStatusSpinner");var data={authTicket:RHOBI.authTicket,ticket:RHOBI.authTicket};RHOBI.request("GetUserByTicket",data,function(me){RHOBI.hideSpinner("rhobi_updateUserStatusSpinner");if(me!=null){usePhone=me.Availability.CurrentPhoneNumber==me.Demo.Phone;useAltPhone=me.Availability.CurrentPhoneNumber==me.Demo.AltPhone;useCellPhone=me.Availability.CurrentPhoneNumber==me.Demo.CellPhone;useOther=me.Availability.CurrentPhoneNumber!=null&&me.Availability.CurrentPhoneNumber.length>0&&!usePhone&&!useAltPhone&&!useCellPhone;otherNumber=(useOther?me.Availability.CurrentPhoneNumber:"");$("#rhobi_updateUserStatusTable").remove();$("#"+divID).append("<table width='100%' cellspacing='5' cellpadding='5' border='0' id='rhobi_updateUserStatusTable'><tr><td id='rhobi_updateUserStatusBoxPanel'><input type='radio' name='rhobi_statusRadio' value='Available' "+(me.Availability.SetAvailable?"checked":"")+"/> Available<br/><br/><input type='radio' name='rhobi_statusRadio' value='Busy' "+(me.Availability.SetBusy?"checked":"")+"/> Busy<br/><br/><input type='radio' name='rhobi_statusRadio' value='Invisible' "+(me.Availability.SetInvisible?"checked":"")+"/> Invisible</td><td><span class='rhobi_loginheader'>Update Your Status</span><br/><textarea id='rhobi_txtUpdateStatus' rows='2' style='width:98%'>"+htmlEncode(me.Availability.StatusMessage)+"</textarea><p><b>I can be reached at</b><br/><input type='radio' name='rhobi_statusPhoneRadio' value='Phone' "+(usePhone?"checked":"")+"/> Phone: "+htmlEncode(me.Demo.Phone)+"<br/>"+(me.Demo.AltPhone!=null&&me.Demo.AltPhone.length>0?"<input type='radio' name='rhobi_statusPhoneRadio' value='Alt' "+(useAltPhone?"checked":"")+"/> Alt: "+htmlEncode(me.Demo.AltPhone)+"<br/>":"")+(me.Demo.CellPhone!=null&&me.Demo.CellPhone.length>0?"<input type='radio' name='rhobi_statusPhoneRadio' value='Cell' "+(useCellPhone?"checked":"")+"/> Cell: "+htmlEncode(me.Demo.CellPhone)+"<br/>":"")+"<input type='radio' name='rhobi_statusPhoneRadio' value='Other' "+(useOther?"checked":"")+"/> Other: <input type='text' id='rhobi_statusPhoneOther' value='"+htmlEncode(otherNumber)+"' /><br/><span style='float:right' id='rhobi_updateStatusButtonSpan'><a href='javascript:void(0);' id='rhobi_btnUpdateProfile' onclick=\"RHOBI.onUpdateUserStatusSave();return false;\" class='rhobi_bluebutton'><span>Save</span></a></span></p></td></tr></table>")}})};RHOBI.onUpdateUserStatusSave=function(){$("#rhobi_btnUpdateProfile").hide();RHOBI.showSpinner("rhobi_updateStatusButtonSpan","rhobi_updateStatusSpinner");var status=$("input[name=rhobi_statusRadio]:checked").val();available=(status=="Available");busy=(status=="Busy");invisible=(status=="Invisible");statusMessage=$("#rhobi_txtUpdateStatus").val();var phone=$("input[name=rhobi_statusPhoneRadio]:checked").val();usePhone=(phone=="Phone");useAltPhone=(phone=="Alt");useCellPhone=(phone=="Cell");useOther=(phone=="Other");otherNumber=$("#rhobi_statusPhoneOther").val();var data={authTicket:RHOBI.authTicket,userID:RHOBI.userID,available:available,busy:busy,invisible:invisible,statusMessage:statusMessage,usePhone:usePhone,useAltPhone:useAltPhone,useCellPhone:useCellPhone,useOther:useOther,otherNumber:otherNumber};RHOBI.request("UpdateUserStatus",data,function(){RHOBI.hideSpinner("rhobi_updateStatusSpinner");$("#rhobi_btnUpdateProfile").show();$.facebox.close();RHOBI.loadProfileArea()})};RHOBI.addJobPosition=function(onSaveScript){if(onSaveScript!=null){$.cookie("addJobPosition_onSaveScript",unescape(onSaveScript),{path:"/"})}$.facebox.settings.closeImage=RHOBI.www+"/scripts/facebox/closelabel.png";$.facebox("<div id='rhobi_addJobPositionBox'><p class='rhobi_header'>Add Job Position</p><div id='rhobi_addJobPosSearch'><p><i>If you work(ed) for a business or organization, please search below to add it to your online profile. If it is not listed, you will be given an option to add it as a new company.</i></p><p><b>Your Company's Name: </b><input type='text' id='rhobi_txtSearchJobPosCompany' style='width:300px' /> <a href='javascript:void(0);' class='rhobi_bluebutton' onclick=\"RHOBI.addJobPositionSearch();return false;\" id='rhobi_btnAddJobPosSearch'><span>search</span></a></p></div><div id='rhobi_addJobPosCompanies'></div><div id='rhobi_addJobPosForm' style='display:none'></div><div id='rhobi_addJobPosDirectory' style='display:none'></div></div>");$("#rhobi_txtSearchJobPosCompany").focus();$("#rhobi_txtSearchJobPosCompany").keydown(function(event){if(event.keyCode==13){$("#rhobi_btnAddJobPosSearch").click();return false}})};RHOBI.addJobPositionSearch=function(){$("#rhobi_addJobPosCompanies").html("<table id='rhobi_addJobPosCompaniesTable'></table>");RHOBI.showSpinner("rhobi_addJobPosCompanies","rhobi_addJobPosSpinner");txtCompany=$("#rhobi_txtSearchJobPosCompany").val();var query={authTicket:RHOBI.authTicket,sysID:0,searchString:txtCompany,skip:0,take:100,activeStatus:"OnlyActive",companyType:"All",letter:"",companyClass:"",companyNum:"",state:"",includeDir:true,statusCode:"",repUserID:0,subscription:""};RHOBI.request("SearchCompanies",query,function(results){RHOBI.hideSpinner("rhobi_addJobPosSpinner");$("#rhobi_addJobPosCompanies").append("<a href='javascript:void(0);' class='rhobi_bluebutton' onclick=\"RHOBI.doJobPosNewDirectory();return false;\"><span>register a new company not listed</span></a>");if(results!=null&&results.Companies!=null&&results.Companies.length>0){$("#rhobi_addJobPosCompaniesTable").jqGrid({datatype:"local",height:250,colNames:["ID","COMPANY NAME","ADDRESS","CITY","ST"],colModel:[{name:"DirectoryID",index:"DirectoryID",hidden:true,sorttype:"int"},{name:"Company",index:"Company",width:100,classes:"rhobi_pointer"},{name:"Address1",index:"Address1",width:100},{name:"City",index:"City",width:60},{name:"St",index:"St",width:30}],caption:"Select Your Company",sortname:"Company",sortorder:"asc",viewrecords:true,scroll:true,data:results.Companies,autowidth:true,multiselect:false,onSelectRow:function(id){var row=$("#rhobi_addJobPosCompaniesTable").jqGrid("getRowData",id);var dirID=parseInt(row.DirectoryID);RHOBI.showAddJobPosForm(dirID,row.Company)}})}else{$("#rhobi_addJobPosCompanies").append("<p><span class='rhobi_error'>No companies found by that name. Search again or add a new company</span></p>")}})};RHOBI.doJobPosNewDirectory=function(){RHOBI.register.addJobPosDirectory($("#rhobi_txtSearchJobPosCompany").val())};RHOBI.showAddJobPosForm=function(dirID,company){$("#rhobi_addJobPosSearch").hide();$("#rhobi_addJobPosCompanies").hide();$("#rhobi_addJobPosDirectory").hide();$("#rhobi_addJobPosForm").show();thisYear=(new Date()).getFullYear();dateopts="";for(var i=thisYear;i>=1900;i--){dateopts+="<option value='"+i+"'>"+i+"</option>"}$("#rhobi_addJobPosForm").html("<p><i>Please tell us about your work experience at this company.</i></p><table width='100%' cellspacing='0' cellpadding='2' border='0'><tr><td><b>Company:</b></td><td>"+htmlEncode(company)+" <a href='javascript:void(0);' onclick=\"RHOBI.addJobPosFormChangeCompany();return false;\" class='rhobi_bluebutton'><span>change</span></a></td></tr><tr><td><b>Title:</b></td><td><input type='text' id='rhobi_txtJobTitle' style='width:90%'/></td></tr><tr><td><b>Dates:</b></td><td><select id='rhobi_selectJobStart'>"+dateopts+"</select> to <select id='rhobi_selectJobEnd'><option value='0'>Present</option>"+dateopts+"</select></td></tr><tr><td>Description:<br/><i>Optional</i></td><td><textarea id='rhobi_txtJobDesc' style='width:90%' rows='2'></textarea></td></tr><tr><td>&nbsp;</td><td><a href='javascript:void(0);' onclick=\"RHOBI.saveNewJobPos("+dirID+");return false;\"class='rhobi_bluebutton'><span>Save</span></a></td></tr></table>");$("#rhobi_txtJobTitle").focus()};RHOBI.addJobPosFormChangeCompany=function(){$("#rhobi_addJobPosForm").hide();$("#rhobi_addJobPosDirectory").hide();$("#rhobi_addJobPosSearch").show();$("#rhobi_addJobPosCompanies").show();RHOBI.addJobPositionSearch()};RHOBI.saveNewJobPos=function(dirID){jobTitle=$("#rhobi_txtJobTitle").val();start=$("#rhobi_selectJobStart").val();end=$("#rhobi_selectJobEnd").val();description=$("#rhobi_txtJobDesc").val();if(jobTitle==""){return}if(end>0&&start>end){return}RHOBI.showSpinner("rhobi_addJobPosForm","rhobi_addJobPosFormSpinner");var data={authTicket:RHOBI.authTicket,userID:RHOBI.userID,fromYear:start,toYear:(end>0?end:null),description:description,directoryID:dirID,title:jobTitle};RHOBI.request("AddPosition",data,function(id){RHOBI.hideSpinner("rhobi_addJobPosFormSpinner");if(id){if(RHOBI.sysID==0){var data2={authTicket:RHOBI.authTicket,dirID:dirID};RHOBI.request("GetDirectoryByID",data2,function(sysDir){if(sysDir.RefSys!=null){RHOBI.sysID=sysDir.RefSys.ID;RHOBI.sysDir=sysDir}RHOBI.loadProfileArea();RHOBI.goCompanyWall();RHOBI.onIntegratedAuthentication()})}$.facebox.close();var scr=$.cookie("addJobPosition_onSaveScript");if(scr==null||scr.length==0){RHOBI.goCompanyWall()}else{$.cookie("addJobPosition_onSaveScript",null,{path:"/"});eval(scr)}}else{alert("There was an error saving your job position.")}})};RHOBI.deleteJobPosition=function(id,title,company){if(confirm("Are you sure you want to delete the job position: "+htmlEncode(decodeURIComponent(title))+" at "+htmlEncode(decodeURIComponent(company))+"?")){var data={authTicket:RHOBI.authTicket,userID:RHOBI.userID,positionID:id};RHOBI.request("DeletePosition",data,function(){RHOBI.loadProfile(RHOBI.userID)})}};RHOBI.editMyProfile=function(){$.facebox.settings.closeImage=RHOBI.www+"/scripts/facebox/closelabel.png";$.facebox("<div id='rhobi_editMyProfileBox'><div class='rhobi_header'>Edit Your Info</div><br/></div>");RHOBI.showSpinner("rhobi_editMyProfileBox","editProfileSpinner");var data={authTicket:RHOBI.authTicket,ticket:RHOBI.authTicket};RHOBI.request("GetUserByTicket",data,function(me){RHOBI.hideSpinner("editProfileSpinner");var tzOptions="<option value=''>"+htmlEncode("[SELECT TIME ZONE]")+"</option>";var tzList=timeZoneList();for(var i in tzList){t=tzList[i];tzOptions+="<option value='"+htmlEncode(t.value)+"'>"+htmlEncode(t.text)+"</option>"}var countryOptions="<option value=''>"+htmlEncode("[SELECT COUNTRY]")+"</option>";var countries=countriesList();for(var i in countries){c=countries[i];countryOptions+="<option value='"+htmlEncode(c)+"'>"+htmlEncode(c)+"</option>"}var photoUrl=me.PhotoUrl;if(photoUrl==null||photoUrl.length==0){photoUrl=RHOBI.www+"/images/noprofilephoto.jpg"}$("#rhobi_editMyProfileBox").append("<table width='100%' cellspacing='0' cellpadding='2' border='0'><tr><td align='right'><b>First Name:</b></td><td><input type='text' id='rhobi_txtFirstName' tabindex='1'></td><td align='right'><b>User Name:</b></td><td><input type='text' id='rhobi_txtUserName' tabindex='16'></td></tr><tr><td align='right'><b>Last Name:</b></td><td><input type='text' id='rhobi_txtLastName' tabindex='2'></td><td align='right'>Change Password:</td><td><input type='password' id='rhobi_txtPassword' tabindex='17'> <div style='min-width:60px'><span style='color:green' id='rhobi_txtPasswordSecure'></span></div></td></tr><tr><td align='right'><b>Email:</b></td><td><input type='text' id='rhobi_txtEmail' tabindex='3'></td><td align='right'>Confirm Password:</td><td><input type='password' id='rhobi_txtConfirmPassword' tabindex='18'></td></tr><tr><td align='right'>Address 1:</td><td colspan='3'><input type='text' id='rhobi_txtAddress1' tabindex='4'></td></tr><tr><td align='right'>Address 2:</td><td colspan='3'><input type='text' id='rhobi_txtAddress2' tabindex='5'></td></tr><tr><td align='right'>City:</td><td colspan='3'><input type='text' id='rhobi_txtCity' tabindex='6'></td></tr><tr><td align='right'>State/Province:</td><td colspan='3'><input type='text' id='rhobi_txtState' tabindex='7'></td></tr><tr><td align='right'>Zip Code:</td><td colspan='3'><input type='text' id='rhobi_txtZip' tabindex='8'></td></tr><tr><td align='right'>Country:</td><td colspan='3'><select id='rhobi_selectCountry' tabindex='9'>"+countryOptions+"</select></td></tr><tr><td align='right'>Phone:</td><td><input type='text' id='rhobi_txtPhone' tabindex='10'></td><td align='right'>Fax:</td><td><input type='text' id='rhobi_txtFax' tabindex='11'></td></tr><tr><td align='right'>Alt Phone:</td><td><input type='text' id='rhobi_txtAltPhone' tabindex='12'></td><td align='right'>Cell:</td><td><input type='text' id='rhobi_txtCellPhone' tabindex='13'></td></tr><tr><td align='right'>Time Zone:</td><td colspan='3'><select id='rhobi_selectTimeZone' tabindex='14'>"+tzOptions+"</select></td></tr><tr><td align='right'>Personal Headline:</td><td colspan='3'><textarea rows='2' id='rhobi_txtHeadline' tabindex='15' style='width:98%'></textarea></tr><tr><td align='right'>Upload Your Photo:</td><td colspan='3'><div id='rhobi_divCurrentPhoto'><img src='"+photoUrl+"' border='0' id='rhobi_currentPhoto'/></div></td></tr><tr><td align='right'>&nbsp;</td><td colspan='3'>80x80 gif, png, jpg picture:</td></tr><tr><td align='right'>&nbsp;</td><td colspan='3'><input type='file' id='rhobi_uploadPhoto' name='rhobi_uploadPhoto' /></td></tr></table><p id='rhobi_editProfileButtons'><a href='javascript:void(0);' tabindex='19' class='rhobi_bluebutton' onclick=\"RHOBI.onUpdateUserProfile();return false;\" id='rhobi_btnSaveProfile'><span>save changes</span></a></p><div id='rhobiProfileError' style='display:none' class='rhobi_error'></div>");$("#rhobi_txtFirstName").val(me.Demo.FirstName);$("#rhobi_txtLastName").val(me.Demo.LastName);$("#rhobi_txtUserName").val(me.UserName);$("#rhobi_txtEmail").val(me.Demo.Email);$("#rhobi_txtAddress1").val(me.Demo.Address1);$("#rhobi_txtAddress2").val(me.Demo.Address2);$("#rhobi_txtCity").val(me.Demo.City);$("#rhobi_txtState").val(me.Demo.St);$("#rhobi_txtZip").val(me.Demo.Zip);$("#rhobi_selectCountry").val(me.Demo.Country);$("#rhobi_txtPhone").val(me.Demo.Phone);$("#rhobi_txtFax").val(me.Demo.Fax);$("#rhobi_txtAltPhone").val(me.Demo.AltPhone);$("#rhobi_txtCellPhone").val(me.Demo.CellPhone);$("#rhobi_selectTimeZone").val(me.Demo.TZ);$("#rhobi_txtHeadline").val(me.Headline);$("#rhobi_txtPassword").keyup(function(){var span=$("#rhobi_txtPasswordSecure");var pwd=$("#rhobi_txtPassword").val();if(pwd.length==0){span.hide()}else{span.show();var strength=passwordStrength(pwd,me.UserName);var color="red";if(strength=="Good"){color="green"}else{if(strength=="Strong"){color="black"}}span.css("color",color);span.html(strength)}});$("#rhobi_uploadPhoto").uploadify({uploader:"/scripts/jquery.uploadify-v2.1.4/uploadify.swf",script:RHOBI.rhobiService+"/AddPhoto.ashx",scriptData:{mode:"fixed",w:"80",h:"80"},cancelImg:RHOBI.www+"/images/1ptrans.gif",folder:RHOBI.rhobiService+"/TempExtract",auto:true,scriptAccess:"always",onComplete:function(event,ID,fileObj,response,data){if(response!=""){var doc=JSON.parse(response);if(typeof doc.Error===undef){$("#rhobi_currentPhoto").remove();RHOBI.showSpinner("rhobi_divCurrentPhoto","updatingPhotoSpinner");photoUrl=doc.Cabinet.WebPath+"/"+doc.FileName;var data2={authTicket:RHOBI.authTicket,userID:RHOBI.userID,photoUrl:photoUrl};RHOBI.request("UpdateMyPhoto",data2,null);RHOBI.hideSpinner("updatingPhotoSpinner");$("#rhobi_divCurrentPhoto").append("<img src='"+photoUrl+"' border='0' id='rhobi_currentPhoto'/>")}else{alert(doc.Error)}}},onError:function(event,ID,fileObj,errorObj){alert(errorObj.info)}})})};RHOBI.onUpdateUserProfile=function(){$("#rhobiProfileError").hide();userName=$("#rhobi_txtUserName").val();firstName=$("#rhobi_txtFirstName").val();lastName=$("#rhobi_txtLastName").val();email=$("#rhobi_txtEmail").val();address1=$("#rhobi_txtAddress1").val();address2=$("#rhobi_txtAddress2").val();city=$("#rhobi_txtCity").val();st=$("#rhobi_txtState").val();zip=$("#rhobi_txtZip").val();country=$("#rhobi_selectCountry").val();phone=$("#rhobi_txtPhone").val();fax=$("#rhobi_txtFax").val();altPhone=$("#rhobi_txtAltPhone").val();cellPhone=$("#rhobi_txtCellPhone").val();tz=$("#rhobi_selectTimeZone").val();headline=$("#rhobi_txtHeadline").val();password=$("#rhobi_txtPassword").val();confirmPassword=$("#rhobi_txtConfirmPassword").val();strength=$("#rhobi_txtPasswordSecure").html();if(firstName==""){RHOBI.showProfileError("First name is required.");return}if(lastName==""){RHOBI.showProfileError("Last name is required.");return}if(email==""){RHOBI.showProfileError("Email address is required.")}if(userName==""){RHOBI.showProfileError("User name is required.")}if(password!=""&&strength!="Good"&&strength!="Strong"){RHOBI.showProfileError("Password is too weak.");return}if(password!=""&&confirmPassword==""){RHOBI.showProfileError("Please confirm your password.");return}if(confirmPassword!=password){RHOBI.showProfileError("Passwords do not match.");$("#rhobi_txtPassword").val("");$("#rhobi_txtConfirmPassword").val("");$("#rhobi_txtPassword").focus();return}$("#rhobi_btnSaveProfile").hide();RHOBI.showSpinner("rhobi_editProfileButtons","saveProfileSpinner");var data={authTicket:RHOBI.authTicket,userID:RHOBI.userID,userName:userName,password:password,firstName:firstName,lastName:lastName,email:email,address1:address1,address2:address2,city:city,st:st,zip:zip,country:country,phone:phone,fax:fax,altPhone:altPhone,cellPhone:cellPhone,tz:tz,headline:headline};RHOBI.request("UpdateMyProfile",data,function(result){RHOBI.hideSpinner("saveProfileSpinner");if(result!=null&&result.Error==null){RHOBI.user=result.User;$.facebox.close();RHOBI.loadProfile(RHOBI.userID);RHOBI.loadUserCompanyName()}else{if(result!=null){RHOBI.showProfileError(result.Error)}}})};RHOBI.showProfileError=function(error){$("#rhobi_btnSaveProfile").show();$("#rhobiProfileError").html(error);$("#rhobiProfileError").show()};RHOBI.userPhotoUrl=function(photoUrl){var u=RHOBI.www+"/images/noprofilephoto.jpg";if(photoUrl!=null&&photoUrl.length>0){u=photoUrl}return u};RHOBI.dirLogoUrl=function(logoUrl){var u=RHOBI.www+"/images/nocompanylogo.png";if(logoUrl!=null&&logoUrl.length>0){u=logoUrl}return u};RHOBI.myPhotoUrl=function(){var photoUrl=RHOBI.user!=null?RHOBI.user.PhotoUrl:null;return RHOBI.userPhotoUrl(photoUrl)};RHOBI.buildVisitorList=function(divID){var div=$("#"+divID);if(div.length>0){div.html("<table id='rhobi_visitorListTable'></table>");var query={authTicket:RHOBI.authTicket,domainGUID:RHOBI.siteGUID};RHOBI.request("GetCurrentVisitors",query,function(results){$("#rhobi_visitorListTable").jqGrid({datatype:"local",height:250,colNames:["GUID","NAME","ONLINE","PAGE","USERID"],colModel:[{name:"GUID",index:"GUID",hidden:true},{name:"DisplayName",index:"DisplayName",width:100,classes:"rhobi_pointer"},{name:"MinsOnline",index:"MinsOnline",width:80,sorttype:"int"},{name:"CurrentPage",index:"CurrentPage",width:150},{name:"UserID",index:"User.ID",width:10,hidden:true}],caption:"Current Visitors",sortname:"Company",sortorder:"asc",viewrecords:true,scroll:true,data:results,autowidth:true,multiselect:false,onSelectRow:function(id){var row=$("#rhobi_visitorListTable").jqGrid("getRowData",id);var userID=row.UserID;alert(userID)}})})}};RHOBI.premiumRequired=function(){$.facebox.settings.closeImage=RHOBI.www+"/scripts/facebox/closelabel.png";$.facebox("<div id='rhobi_premiumBox'><div class='rhobi_header'>Rhobi Premium Access Required</div><div><p>We're sorry, that function requires a Rhobi Premium account.<br/>Please consider upgrading!</p><p>Premium access, for $50 a month per company, allows you to:</p><ul><li>Create a wall where you can post your deals, jobs, and company news</li><li>Do order processing (add 75 cents transaction fee per document)</li><li>Manage your inventory</li><li>Integrate with Quickbooks</li><li>Add a Marketplace page to your own website</li></ul><p><b>How does billing work?</b></p><p>You will be billed immediately a prorated amount for the remainder of this month. We will then bill your credit card automatically on the 1st of every month, which will include $50 for that month's subscription plus any document transaction fees from the prior month.</p><p>There is no long term contract, and you can cancel your Premium account at any time and revert back to a Free account.</p><a href='javascript:void(0);' class='rhobi_bluebutton' onclick=\"RHOBI.upgradeToPremium();return false;\"><span>upgrade now!</span></a></div></div>")};RHOBI.upgradeToPremium=function(){$("#rhobi_premiumBox").html("<div class='rhobi_header'>Upgrade to Premium</div><p>How do you want to pay?</p><br/><div style='text-align:center'><p><a href='javascript:void(0);' class='rhobi_bluebutton' onclick=\"RHOBI.upgradeToPremiumUsingCC();return false;\" style='width:250px'><span>automatic credit card payment</span></a></p><p><a href='javascript:void(0);' class='rhobi_bluebutton' onclick=\"RHOBI.upgradeToPremiumUsingACH();return false;\" style='width:250px'><span>automatic bank payment (ACH)</span></a></p></div>")};RHOBI.upgradeToPremiumUsingCC=function(){var yearOpts="";for(i=2011;i<=2050;i++){yearOpts+="<option value='"+i+"'>"+i+"</option>"}$("#rhobi_premiumBox").html("<div class='rhobi_header'>Upgrade to Premium</div><p><table cellpadding='2' cellspacing='0' style='width:100%'><tr><td align='right'>Type of card:</td><td><select id='rhobi_ddlCardType'><option value='Mastercard'>Mastercard</option><option value='Visa'>Visa</option><option value='American Express'>American Express</option><option value='Discover'>Discover</option></select></td></tr><tr><td align='right'>Name as appears on card:</td><td><input type='text' id='rhobi_txtName' style='width:311px'/></td></tr><tr><td align='right'>Exp Date:</td><td><select id='rhobi_ddlExpMonth'><option value='01'>01</option><option value='02'>02</option><option value='03'>03</option><option value='04'>04</option><option value='05'>05</option><option value='06'>06</option><option value='07'>07</option><option value='08'>08</option><option value='09'>09</option><option value='10'>10</option><option value='11'>11</option><option value='12'>12</option></select><select id='rhobi_ddlExpYear'>"+yearOpts+"</select></td></tr><tr><td align='right'>CVV Code:</td><td><input type='textbox' id='rhobi_txtCVV' style='width:85px'/></td></tr><tr><td align='right'>&nbsp;</td><td>&nbsp;</td></tr><tr><td align='right'>Billing Address of card:</td><td>&nbsp;</td></tr><tr><td align='right'>Address 1:</td><td><input type='textbox' id='rhobi_txtAddress1' style='width:311px'/></td></tr><tr><td align='right'>Address 2:</td><td><input type='textbox' id='rhobi_txtAddress2' style=width:311px'/></td></tr><tr><td align='right'>City:</td><td><input type='textbox' id='rhobi_txtCity' style=width:311px'/></td></tr><tr><td align='right'>State/Province:</td><td><input type='textbox' id='rhobi_txtSt' style=width:311px'/></td></tr><tr><td align='right'>Zip/Postal Code:</td><td><input type='textbox' id='rhobi_txtZip' style=width:311px'/></td></tr><tr><td align='right'>Country:</td><td><input type='textbox' id='rhobi_txtCountry' style=width:311px'/></td></tr><tr><td align='right'>&nbsp;</td><td>(leave blank for United States)</td></tr></table></p><div><a href='javascript:void(0);' class='rhobi_bluebutton' onclick=\"RHOBI.upgradeToPremiumUsingCCActive();return false;\"><span>activate account</span></a></div>")};RHOBI.upgradeToPremiumUsingCCActivate=function(){cardType=$("#rhobi_ddlCardType").val()};RHOBI.setUserHome=function(){$.facebox.settings.closeImage=RHOBI.www+"/scripts/facebox/closelabel.png";$.facebox("<div id='rhobi_userHomeLocation'><span class='rhobi_header'>Select a Home Location</span><br/><br/><p>This is a shortcut to where you will be taken whenever you click on the Home link. Please select your city.</p><br/><table width='100%' cellspacing='0' cellpadding='5' border='0'><tr><td class='rhobi_whatwhere'>WHAT?</td><td class='rhobi_whatwhere'>WHERE?</td></tr><tr><td valign='top' width='50%'><div id='rhobi_selectSectionDiv'></div></td><td valign='top' width='50%'><div id='rhobi_selectCommunityDiv'></div></td></tr></table><div id='rhobiUpdateHomeSaveDiv' style='text-align:right'><a id='rhobiUpdateHomeSaveButton' href='javascript:void(0);' onclick=\"RHOBI.doUpdateUserHome();\" class='rhobi_bluebutton'><span>use this location</span></a></div><div id='rhobiUpdateHomeSaveError' style='display:none' class='rhobi_error'></div></div>");if(RHOBI.user!=null&&RHOBI.user.HomeSectionGUID!=null){RHOBI.updateHomeSectionGUID=RHOBI.user.HomeSectionGUID}else{RHOBI.updateHomeSectionGUID=RHOBI.homeSectionGUID}if(RHOBI.user!=null&&RHOBI.user.HomeCommunityGUID!=null){RHOBI.updateHomeCommunityGUID=RHOBI.user.HomeCommunityGUID}else{RHOBI.updateHomeCommunityGUID=RHOBI.homeCommunityGUID}RHOBI.loadSectionNavigationV(RHOBI.updateHomeSectionGUID,"rhobi_selectSectionDiv","RHOBI.updateHomeSelectSection",false);RHOBI.loadCommunityNavigationV(RHOBI.updateHomeCommunityGUID,"rhobi_selectCommunityDiv","RHOBI.updateHomeSelectCommunity",false)};RHOBI.showUpdateHomeSaveError=function(error){$("#rhobiUpdateHomeSaveError").html(error);$("#rhobiUpdateHomeSaveError").show()};RHOBI.hideUpdateHomeSaveError=function(error){$("#rhobiUpdateHomeSaveError").hide()};RHOBI.updateHomeSelectSection=function(guid){RHOBI.updateHomeSectionGUID=guid;RHOBI.loadSectionNavigationV(RHOBI.updateHomeSectionGUID,"rhobi_selectSectionDiv","RHOBI.updateHomeSelectSection",false)};RHOBI.updateHomeSelectCommunity=function(guid){RHOBI.updateHomeCommunityGUID=guid;RHOBI.loadCommunityNavigationV(RHOBI.updateHomeCommunityGUID,"rhobi_selectCommunityDiv","RHOBI.updateHomeSelectCommunity",false)};RHOBI.doUpdateUserHome=function(){var valid=true;RHOBI.hideUpdateHomeSaveError();if(valid){$("#rhobi_UpdateHomeSaveButton").hide();RHOBI.showSpinner("rhobiUpdateHomeSaveDiv","btnUpdateHomeSpinner");data={authTicket:RHOBI.authTicket,userGUID:RHOBI.userGUID,homeSectionGUID:RHOBI.updateHomeSectionGUID,homeCommunityGUID:RHOBI.updateHomeCommunityGUID};RHOBI.request("UpdateUserHome",data,function(dto){RHOBI.hideSpinner("btnUpdateHomeSpinner");if(dto.Error==null){$.facebox.close();RHOBI.user.HomeSectionGUID=RHOBI.updateHomeSectionGUID;RHOBI.user.HomeCommunityGUID=RHOBI.updateHomeCommunityGUID;RHOBI.goStream(RHOBI.updateHomeSectionGUID,RHOBI.updateHomeCommunityGUID)}else{RHOBI.showUpdateHomeSaveError(dto.Error)}})}};RHOBI.goHomeLocation=function(){if(RHOBI.sysDir==null){if(RHOBI.user.HomeSectionGUID!=null&&RHOBI.user.HomeCommunityGUID!=null){RHOBI.goStream(RHOBI.user.HomeSectionGUID,RHOBI.user.HomeCommunityGUID)}}else{RHOBI.goCompanyWall()}};window.communityProfileScriptLoaded={}})(jQuery);var RHOBI=RHOBI||{};(function(a){RHOBI.loadMultiLineSearch=function(){html="<table cellspacing='0' cellpadding='4' border='0'><tr><td>&nbsp;</td><td><b>Search for Part # or Description</b></td><td><b>Min Qty</b></td><td><b>Condition</b></td></tr>";for(var b=1;b<=10;b++){html+="<tr><td style='width:24px;text-align:right;'>"+b+".</td><td style='width:300px'><input id='rhobi_txtSearchPart"+b+"' style='width:99%' rel='rhobi_txtSearchPart' /></td><td style='width:50px'><input id='rhobi_txtSearchMinQty"+b+"' value='1' maxlength='6' style='width:99%;text-align:center' rel='rhobi_txtSearchMinQty'/></td><td style='width:50px'><select id='rhobi_selectSearchCond"+b+"'><option value='Any'>Any</option><option value='New'>New</option><option value='Used'>Used</option></select></td></tr>"}html+="</table><a href='javascript:void(0);' class='rhobi_bluebutton' id='rhobi_btnDoMultiLineSearch' onclick=\"RHOBI.doMultiLineSearch();return false;\"><span>Search</span></a><div id='rhobi_invResults'><p><b>Condition Code Search Details:</b><br/><i>Any</i> = any condition<br/><i>New</i> = New, Factory New, New Surplus<br/><i>Used</i> = Overhauled (or Capability), Serviceable, Repairable, Bench Checked, BER, As Removed</p><p><b>Wildcard Search:</b><br/>Use asterick (*) before or after partial part #.<br/><i>Example: 976J* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Returns 976J498-1, etc)<br/>Example: *3948F &nbsp;&nbsp;&nbsp; (Returns J200-3948F, etc)</i></p><p><b>*</b> You do not have to enter dashes or slashes in part # searches. They are ignored.</p></div>";a("#rhobi_content").html(html);a("[rel=rhobi_txtSearchPart]").keydown(function(c){if(c.keyCode==13){b=parseInt(this.id.replace(/rhobi_txtSearchPart/,""));b++;if(b>10){b=1}a("#rhobi_txtSearchPart"+b).focus();return false}});a("[rel=rhobi_txtSearchMinQty]").keydown(function(c){if(c.keyCode==13){b=parseInt(this.id.replace(/rhobi_txtSearchMinQty/,""));b++;if(b>10){b=1}a("#rhobi_txtSearchMinQty"+b).focus();return false}});a("#rhobi_txtSearchPart1").focus();RHOBI.loadCart()};RHOBI.doMultiLineSearch=function(){a("#rhobi_invResults").html("<br/>");RHOBI.showSpinner("rhobi_invResults","loadInvResultsSpinner");var g=[];for(var c=1;c<=10;c++){selectCond=a("#rhobi_selectSearchCond"+c).val();var d="Any";if(selectCond=="New"){d="NE,FN,NS,OR"}else{if(selectCond=="Used"){d="OH,SV,RP,RD,AR,BR,BC,CA"}}minQtyString=a("#rhobi_txtSearchMinQty"+c).val();minQty=1;try{minQty=parseInt(minQtyString)}catch(e){minQty=1}var b={SearchString:a("#rhobi_txtSearchPart"+c).val(),SearchConditions:d,MinQty:minQty};if(b.SearchString.trim().length>0){g.push(b)}}var f={authTicket:RHOBI.authTicket,source:"COMMUNITY",userID:RHOBI.userID,mySysID:1,searchGroupID:RHOBI.groupID,searchStrings:g,currentSearchString:0,sortBy:"P",skip:a("#lastInvResultID").val(),take:200};RHOBI.call("GET","SearchInvJson",{request:JSON.stringify(f)},function(h){RHOBI.loadSearchResults(h)})};RHOBI.doQuickSearch=function(b){if(b==null||b.length==0){b=a("#rhobi_searchbar").val()}else{b=unescape(b)}if(b==null||b.length==0||b==RHOBI.wmSearch){return}if(!RHOBI.isCommunityOpen("RHOBI.doQuickSearch('"+escape(b)+"');")){return}a.cookie("rhobi_searchString",b,{path:"/"});RHOBI.loadCart();a("#rhobi_content").html("<p><span class='rhobi_error'>Searching for "+htmlEncode(b)+"...</span></p>");RHOBI.loadLastInvResultID();if(a("#rhobi_invResults").length==0){a("#rhobi_content").append("<div id='rhobi_invResults' style='width:100%'></div>")}RHOBI.moreInvResults()};RHOBI.moreInvResults=function(){RHOBI.showSpinner("rhobi_invResults","loadInvResultsSpinner");searchString=a.cookie("rhobi_searchString");var b={authTicket:RHOBI.authTicket,source:"COMMUNITY",userID:RHOBI.userID,mySysID:RHOBI.sysID,searchStrings:[{SearchString:searchString,SearchConditions:"NE,FN,NS,OH,SV,AR",MinQty:1}],currentSearchString:0,sortBy:"P",skip:a("#lastInvResultID").val(),take:200};RHOBI.call("GET","SearchInvJson",{request:JSON.stringify(b)},function(c){RHOBI.loadSearchResults(c)})};RHOBI.loadSearchResults=function(g){if(g==null){return}if(a("#communityDiv").length>0){RHOBI.hideSpinner("loadInvResultsSpinner");lastDirectoryID=0;html="";a("#lastInvResultID").val(g.Skip+g.Take);for(var f in g.Rows){var c=g.Rows[f];if(c.DirectoryID!=lastDirectoryID){if(lastDirectoryID!=0){html+="</table>"}lastDirectoryID=c.DirectoryID;var b=2;if(c.CurrentStatus!=null&&c.CurrentStatus!=""){b=3}var d=c.City+", "+c.State+", "+(c.Country==""?"United States":c.Country);html+=RHOBI.messageSeparatorHtml+"<table cellspacing='0' cellpadding='3' class='rhobi_invResultCompany'><tr><td bgcolor='#EEEEEE'>&nbsp;</td><td align='center' rowspan='"+b+"' valign='top' width='38px'><img src='"+RHOBI.dirLogoUrl(c.LogoUrl)+"' style='width:32px;height:32px' /></td><td colspan='2'><a href='javascript:void(0);' class='rhobi_link' onclick=\"RHOBI.loadCompanyProfile("+c.DirectoryID+',true);return false;"><b>'+htmlEncode(c.SellerName)+"</b></a></td><td style='text-align: right'><a href='javascript:void(0);' onclick=\"RHOBI.openGoogleMap('"+escape(d)+"');return false;\">"+htmlEncode(d)+"</a></td></tr><tr><td bgcolor='#EEEEEE'>&nbsp;</td><td>PH: <a href='javascript:void(0);' class='rhobi_link' onclick=\"RHOBI.makeCall(0,"+c.DirectoryID+",'"+escape(c.Phone)+"',true);\">"+htmlEncode(c.Phone)+"</a></td><td>FAX: "+htmlEncode(c.Fax)+"</td><td style='text-align: right'>&nbsp;</td></tr>";if(c.CurrentStatus!=null&&c.CurrentStatus!=""){html+="<tr><td bgcolor='#EEEEEE'>&nbsp;</td><td colspan='3' class='rhobi_invResultMessage'>"+htmlEncode(c.CurrentStatus)+"</td></tr>"}}var h=RHOBI.isInCart(c.ID);html+="<tr><td bgcolor='#EEEEEE' style='width: 15px'><input type='checkbox' id='rhobi_cbInvID"+c.ID+"' "+(h?"checked":"")+' onclick="RHOBI.cbInvIDClick('+c.ID+",'"+escape(c.PartNum)+"','"+escape(c.Description)+"','"+escape(c.Condition)+"','"+escape(c.SellerName)+"',"+c.DirectoryID+",'"+escape(c.Phone)+"','"+escape(c.Email||"")+"');\" /></td><td colspan='4'><table cellspacing='0' class='rhobi_invResultLine'><tr><td width='30%'><a href='javascript:void(0);'>"+htmlEncode(c.PartNum)+"</a></td><td width='30%'>"+htmlEncode(c.Description)+"</td><td align='center' width='10%'>"+formatJsonDate(c.UpdatedTS,"m/d/yyyy")+"</td><td width='20%' align='center'>"+c.Condition+"</td><td width='10%' align='center'>"+c.QtyLeft+"</td></tr>";if(c.TagLine!=null&&c.TagLine!=""){html+="<tr><td colspan='5' style='padding-left: 42px;' class='rhobi_invResultMessage'>"+htmlEncode(c.TagLine)+"</td></tr>"}html+="</table></td></tr>"}html+="</table>";var e=g.TotalRowCount-g.Skip-g.Take;if(e>0&&a("#rhobi_invResultsMore").length==0){a("#rhobi_content").append("<input id='rhobi_invResultsMore' type='button' name='btnMore' value='more ("+e+")' class='rhobi_moreLink' onclick='RHOBI.moreInvResults();return false;' />")}else{if(e<=0){a("#rhobi_invResultsMore").remove()}else{a("#rhobi_invResultsMore").val("more ("+e+")")}}a("#rhobi_invResults").append(html)}};RHOBI.cbInvIDClick=function(e,i,j,c,h,b,f,g){var d=a("#rhobi_cbInvID"+e);if(d.attr("checked")){var k={ID:e,PartNum:unescape(i),Description:unescape(j),Condition:unescape(c),SellerName:unescape(h),DirectoryID:b,Phone:unescape(f),Email:unescape(g)};RHOBI.addCart(k)}else{RHOBI.removeCart(e)}};RHOBI.loadLastInvResultID=function(){if(a("#lastInvResultID").length==0){a("#rhobi_content").append("<input type='text' class='rhobi_displaynone' id='lastInvResultID' value='0' />")}};RHOBI.loadSearchBar=function(b){if(a("#rhobi_searchDiv").length>0){return}a("#"+b).append("<div id='rhobi_searchDiv'><input type='text' id='rhobi_searchbar' /><input type='button' id='rhobi_searchbtn' value='' onclick=\"RHOBI.doQuickSearch();return false;\" /></div>");if(a("#rhobi_searchDiv").length>0){addWatermarkToTextBox("rhobi_searchbar",RHOBI.wmSearch);RHOBI.enterHandler("rhobi_searchbar","rhobi_searchbtn")}};RHOBI.loadStreamSearchBar=function(b){if(a("#rhobi_streamSearch").length>0){return}a("#"+b).append("<div id='rhobi_streamSearch'><input type='text' id='rhobi_streamSearchBar' /><input type='button' id='rhobi_streamSearchBtn' value='' onclick=\"RHOBI.doStreamSearch();return false;\" /></div>");if(a("#rhobi_streamSearch").length>0){addWatermarkToTextBox("rhobi_streamSearchBar",RHOBI.wmSearch);RHOBI.enterHandler("rhobi_streamSearchBar","rhobi_streamSearchBtn")}};RHOBI.openGoogleMap=function(b){a.facebox.settings.closeImage=RHOBI.www+"/scripts/facebox/closelabel.png";a.facebox('<div id=\'rhobi_googlemap\'><iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q='+b+'&amp;aq=&amp;sspn=0.106227,0.208569&amp;ie=UTF8&amp;hq=&amp;spn=0.024415,0.036478&amp;z=14&amp;iwloc=A&amp;output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=Mountainburg,+AR,+United+States&amp;aq=&amp;sll=35.382028,-93.364348&amp;sspn=0.106227,0.208569&amp;ie=UTF8&amp;hq=&amp;hnear=Mountainburg,+Crawford,+Arkansas&amp;ll=35.63564,-94.167428&amp;spn=0.024415,0.036478&amp;z=14&amp;iwloc=A" style="color:#0000FF;text-align:left">View Larger Map</a></small></div>')};RHOBI.doStreamSearch=function(){alert("Please check back later. Search is currently disabled.");return;if(searchString==null||searchString.length==0){searchString=a("#rhobi_streamSearchBar").val()}else{searchString=unescape(searchString)}if(searchString==null||searchString.length==0||searchString==RHOBI.wmSearch){return}if(!RHOBI.isCommunityOpen("RHOBI.doStreamSearch('"+escape(searchString)+"');")){return}a.cookie("rhobi_searchString",searchString,{path:"/"});a("#rhobi_content").html("<p><span class='rhobi_error'>Searching for "+htmlEncode(searchString)+"...</span></p>")};window.communitySearchScriptLoaded={}})(jQuery);var RHOBI=RHOBI||{};(function(a){RHOBI.loadSectionList=function(){RHOBI.loadSectionNavigationV(RHOBI.sectionGUID,"rhobi_sectionNavigation","RHOBI.goSection",true)};RHOBI.loadProfileArea=function(){RHOBI.log("loadProfileArea");var b=a("#rhobi_profileArea");b.html("");if(!RHOBI.hideSearchBar){RHOBI.loadSearchBar("rhobi_profileArea");b.append("<br/>")}else{if(!RHOBI.hideStreamSearchBar){RHOBI.loadStreamSearchBar("rhobi_streamSearchDiv");b.append("<br/>")}}if(RHOBI.userGUID!=""){dirID=(RHOBI.sysDir!=null?RHOBI.sysDir.ID:0);b.append("<div id='rhobiProfileSection'><table style='rhobi_fullWidth'><tr><td></td><td><a href='javascript:void(0);' onclick=\"RHOBI.loadProfile("+RHOBI.userID+");return false;\"><img src='"+RHOBI.www+"/images/1ptrans.gif' style='width:60px;height:60px;border:0' id='rhobi_imgUserPhoto' /></a></td>"+(dirID>0?"<td></td><td><a href='javascript:void(0);' onclick=\"RHOBI.goCompanyWall();return false;\"><img src='"+RHOBI.dirLogoUrl(RHOBI.sysDir.LogoUrl)+"' style='width:60px;height:60px;border:0' /></a></td>":"")+"</tr><tr><td style='mid-width:16px;width:16px' valign='top'><span id='rhobiOnlineStatus'></span></td><td valign='top'><span id='rhobiUserName'></span></td>"+(dirID>0?"<td>&nbsp;&nbsp;</td><td valign='top'><span id='rhobiCompanyName'></span><a href='javascript:void(0);' onclick=\"RHOBI.switchSystem();return false;\"><img src='"+RHOBI.www+"/images/triangle_down.gif' border='0' /></a></td>":"")+"</tr></table></div><br/>")}if(RHOBI.userGUID!=""){b.append("<a id='rhobi_lnkHome' href='javascript:void(0);' onclick=\"RHOBI.goHomeLocation();return false;\" class='rhobi_communitySectionLink'>Home</a>");if(RHOBI.sysDir==null){b.append("&nbsp;&nbsp; <a id='rhobi_lnkChangeHome' href='javascript:void(0);' onclick=\"RHOBI.setUserHome();return false;\" class='rhobi_link'>[change]</a>")}b.append("<br/>")}if(!RHOBI.hideCart){b.append("<a id='lnkCommunityCart' href='javascript:void(0);' onclick=\"RHOBI.loadCart();return false;\" class='rhobi_communitySectionLink'>Shopping Cart</a>");b.append("<br/>")}if(!RHOBI.hideMultiLineSearch){b.append("<a id='lnkCommunitySearch' href='javascript:void(0);' onclick=\"RHOBI.loadMultiLineSearch();return false;\" class='rhobi_communitySectionLink'>Multi-Line Search</a>")}if(RHOBI.userGUID!=""){RHOBI.loadUserCompanyName();RHOBI.loadOnlineStatus()}};RHOBI.loadSectionNavigationH=function(b,d,e,c){var g=a("#"+d);g.html("");RHOBI.showSpinner(d,"loadSectionNavigationSpinner");var f={authTicket:RHOBI.authTicket,currentSectionGUID:b};RHOBI.request("GetSectionNavigation",f,function(k){g.html("");if(k!=null){if(k.Parents!=null&&k.Parents.length>0){for(var h=0;h<k.Parents.length;h++){var j=k.Parents[h];bold=j.GUID==b;g.append("<a href='javascript:void(0);' class='rhobi_whitebutton' onclick=\""+e+"('"+j.GUID+"');return false;\"><span "+(bold?"class='rhobi_selectedNavigation'":"")+">"+htmlEncode(ellipsisText(j.Name,20))+"</span></a>"+(bold&&c&&RHOBI.user!=null&&RHOBI.user.UserName=="admin"?" <a href='javascript:void(0);' class='rhobi_link' onclick=\"RHOBI.addNewSection();return false;\">[new]</a> ":""))}}if(k.Children!=null&&k.Children.length>0){for(var h=0;h<k.Children.length;h++){var l=k.Children[h];g.append("<a href='javascript:void(0);' class='rhobi_whitebutton' onclick=\""+e+"('"+l.GUID+"');return false;\"><span>"+htmlEncode(ellipsisText(l.Name,23))+"</span></a>")}}}})};RHOBI.loadSectionNavigationV=function(b,d,e,c){RHOBI.log("loadSectionNavigationV");var g=a("#"+d);g.html("");RHOBI.showSpinner(d,"loadingSectionSpinner");var f={authTicket:RHOBI.authTicket,currentSectionGUID:b};RHOBI.request("GetSectionNavigation",f,function(k){RHOBI.hideSpinner("loadingSectionSpinner");if(k!=null){if(k.Parents!=null&&k.Parents.length>0){for(var h=0;h<k.Parents.length;h++){var j=k.Parents[h];bold=j.GUID==b;g.append("<div style='margin-top:5px'><a href='javascript:void(0);' class='rhobi_whitebutton' style='min-width:165px' onclick=\""+e+"('"+j.GUID+"');return false;\"><span "+(bold?"class='rhobi_selectedNavigation'":"")+">"+(bold?"&#0187; ":"")+htmlEncode(ellipsisText(j.Name,20))+"</span></a>"+(bold&&c&&RHOBI.user!=null&&RHOBI.user.UserName=="admin"?"<a href='javascript:void(0);' class='rhobi_link' onclick=\"RHOBI.addNewSection();return false;\" style='padding-left:27px'>[new subsection]</a>":"")+"</div>")}}if(k.Children!=null&&k.Children.length>0){for(var h=0;h<k.Children.length;h++){var l=k.Children[h];g.append("<div style='margin-top:5px'><a href='javascript:void(0);' class='rhobi_whitebutton' style='min-width:150px;padding-left:15px' onclick=\""+e+"('"+l.GUID+"');return false;\"><span>"+htmlEncode(ellipsisText(l.Name,23))+"</span></a></div>")}}if((RHOBI.userName=="admin")&&c){RHOBI.request("GetSectionParents",{authTicket:RHOBI.authTicket,sectionGUID:b},function(i){if(i!=null&&i.length>0){g.append("<br/>SECTION PARENTS:<br/>");for(h=0;h<i.length;h++){var m=i[h];if(m.TreeParent!=null&&typeof m.TreeParent.GUID!=="undefined"){g.append(m.PathHtml+" <a href='' class='rhobi_link' onclick=\"RHOBI.deleteSectionParent('"+m.TreeParent.GUID+"');return false;\">[delete]</a><br/>")}}if(i.length>0){g.append("<br/><a href='javascript:void(0);' onclick=\"RHOBI.addSectionParent('"+b+"');return false;\" class='rhobi_link'>[add parent]</a>")}}})}}})};RHOBI.loadUserCompanyName=function(){if(RHOBI.user!=null&&RHOBI.user.Demo!=null&&RHOBI.user.Demo.FullName!=null&&RHOBI.user.Demo.FullName.length>0){a("#rhobiUserName").html(RHOBI.user.Demo.FullName)}if(RHOBI.user!=null){a("#rhobi_imgUserPhoto").attr("src",RHOBI.myPhotoUrl())}if(RHOBI.sysDir!=null&&RHOBI.sysDir.HQDemo!=null&&RHOBI.sysDir.HQDemo.Company!=null&&RHOBI.sysDir.HQDemo.Company.length>0){a("#rhobiCompanyName").html(RHOBI.sysDir.HQDemo.Company)}};RHOBI.loadOnlineStatus=function(){var b={authTicket:RHOBI.authTicket,userGUID:RHOBI.userGUID};RHOBI.request("GetUserCurrentAvailability",b,function(c){if(c!=null&&c.StatusLightUrl!=null&&c.StatusLightUrl.length>0){a("#rhobiOnlineStatus").html("<a href='javascript:void(0);' onclick=\"RHOBI.onUpdateUserStatus();return false;\"><img src='"+RHOBI.www+c.StatusLightUrl+"' border='0'/></a>")}})};RHOBI.goSection=function(b){RHOBI.log("goSection");RHOBI.sectionGUID=b;RHOBI.sectionShowingChanged()};RHOBI.setSectionShowingSpan=function(b){a("#sectionShowingSpan").html(b)};RHOBI.sectionShowingChanged=function(){RHOBI.log("sectionShowingChanged");RHOBI.loadSectionNavigationV(RHOBI.sectionGUID,"rhobi_sectionNavigation","RHOBI.goSection",true);RHOBI.loadStream()};RHOBI.addNewSection=function(){a.facebox.settings.closeImage=RHOBI.www+"/scripts/facebox/closelabel.png";a.facebox("<div id='rhobi_loginbox'><p>Enter the SHORT name of the section:</p><input type='text' id='rhobi_txtSectionName'/><p>Enter the FULL name of the section:</p><input type='text' id='rhobi_txtSectionFullName'/><a href='javascript:void(0);' class='rhobi_bluebutton' onclick=\"RHOBI.doAddNewSection();return false;\"><span>save</span></a></div>")};RHOBI.doAddNewSection=function(){txtSectionName=a("#rhobi_txtSectionName").val();if(txtSectionName==""){return}txtSectionFullName=a("#rhobi_txtSectionFullName").val();if(txtSectionFullName==""){return}var b={authTicket:RHOBI.authTicket,name:txtSectionName,fullName:txtSectionFullName,parentSectionGUID:RHOBI.sectionGUID};RHOBI.request("AddSection",b,function(c){if(c!=null){a.facebox.close();RHOBI.goSection(c)}})};window.communitySectionsScriptLoaded={}})(jQuery);var RHOBI=RHOBI||{};(function(a){RHOBI.loadCommunityList=function(){RHOBI.loadCommunityNavigationV(RHOBI.communityGUID,"rhobi_communityNavigation","RHOBI.goCommunity",true)};RHOBI.loadCommunityNavigationV=function(c,f,d,b){RHOBI.log("loadCommunityList");var g=a("#"+f);g.html("");RHOBI.showSpinner(f,"loadingGroupsSpinner");var e={authTicket:RHOBI.authTicket,currentGUID:c};RHOBI.request("GetCommunityNavigation",e,function(k){RHOBI.hideSpinner("loadingGroupsSpinner");if(k!=null){if(k.Parents!=null&&k.Parents.length>0){for(var h=0;h<k.Parents.length;h++){var j=k.Parents[h];bold=j.GUID==c;g.append("<div style='margin-top:5px'><a href='javascript:void(0);' class='rhobi_whitebutton' style='min-width:165px' onclick=\""+d+"('"+j.GUID+"');return false;\"><span "+(bold?"class='rhobi_selectedNavigation'":"")+">"+(bold?"&#0187; ":"")+htmlEncode(ellipsisText(j.Name,20))+"</span></a>"+(bold&&b&&RHOBI.user!=null&&RHOBI.user.UserName=="admin"?"<a href='javascript:void(0);' class='rhobi_link' onclick=\"RHOBI.addNewCommunity();return false;\" style='padding-left:27px'>[new subcommunity]</a>":"")+"</div>")}}if(k.Children!=null&&k.Children.length>0){for(var h=0;h<k.Children.length;h++){var l=k.Children[h];g.append("<div style='margin-top:5px'><a href='javascript:void(0);' class='rhobi_whitebutton' style='min-width:150px;padding-left:15px' onclick=\""+d+"('"+l.GUID+"');return false;\"><span>"+htmlEncode(ellipsisText(l.Name,23))+"</span></a></div>")}}if((RHOBI.userName=="admin")&&b){RHOBI.request("GetCommunityParents",{authTicket:RHOBI.authTicket,communityGUID:c},function(i){if(i!=null&&i.length>0){g.append("<br/>COMMUNITY PARENTS:<br/>");for(h=0;h<i.length;h++){var m=i[h];if(m.TreeParent!=null&&typeof m.TreeParent.GUID!=="undefined"){g.append(m.PathHtml+" <a href='' class='rhobi_link' onclick=\"RHOBI.deleteCommunityParent('"+m.TreeParent.GUID+"');return false;\">[delete]</a><br/>")}}if(i.length>0){g.append("<br/><a href='javascript:void(0);' onclick=\"RHOBI.addCommunityParent('"+c+"');return false;\" class='rhobi_link'>[add parent]</a>")}}})}}})};RHOBI.goCommunity=function(b){RHOBI.log("goCommunity");RHOBI.communityGUID=b;RHOBI.communityChanged()};RHOBI.communityChanged=function(){RHOBI.log("communityChanged");if(a("#communityDiv").length>0){RHOBI.loadCommunityList();RHOBI.loadStream()}};RHOBI.deleteCommunityParent=function(b){if(confirm("Are you sure you want to delete?")){var c={authTicket:RHOBI.authTicket,treeParentGUID:b};RHOBI.request("DeleteTreeParent",c,function(){RHOBI.loadCommunityList();RHOBI.loadStreamName()})}};RHOBI.addCommunityParent=function(b){a.facebox.settings.closeImage=RHOBI.www+"/scripts/facebox/closelabel.png";a.facebox("<div id='rhobi_switchSystemBox'><span class='rhobi_loginheader'>Add Community Parent</span><br/><br/></div>");RHOBI.request("GetCommunityList",{authTicket:RHOBI.authTicket,topCommunityGUID:RHOBI.everywhereGUID},function(c){opts="";for(var d=0;d<c.length;d++){var e=c[d];if(b!=e.TreeParent.ObjectGUID){opts+="<option value='"+e.TreeParent.ObjectGUID+"'>"+htmlEncode(e.Path)+"</option>"}}a("#rhobi_switchSystemBox").append("<select id='rhobi_selectCommunity' size='20' style='width:100%'>"+opts+"</select><a href='javascript:void(0);' class='rhobi_bluebutton' onclick=\"RHOBI.doAddCommunityParent('"+b+"');return false;\"><span>add parent</span></a>")})};RHOBI.doAddCommunityParent=function(d){var b=a("#rhobi_selectCommunity").val();a.facebox.close();var c={authTicket:RHOBI.authTicket,objectGUID:d,parentObjectGUID:b};RHOBI.request("AddTreeParent",c,function(e){RHOBI.loadCommunityList();RHOBI.loadStreamName()})};RHOBI.subscribeCometGroup=function(){return;RHOBI.log("subscribeCometGroup");channelName="/group/"+RHOBI.groupID+"/section/"+RHOBI.sectionGUID;while(RHOBI.cometChannels.length>0){fm.websync.client.unsubscribe({channel:RHOBI.cometChannels.pop()})}if(channelName!=""){fm.websync.client.subscribe({channel:channelName,onSuccess:function(b){RHOBI.log("*subscribeCometGroup success")},onFailure:function(b){RHOBI.log("*subscribeCometGroup fail: "+b.error)},onReceive:function(f){RHOBI.log("*subscribeCometGroup recv");var b=f.data.ThreadMessageID;var d=a("#messages");var e=a("#msg"+b);a("#rhobi_noPosts").remove();if(f.data.MsgID==b){if(d.length>0){RHOBI.showMessageThread(f.data,"messages",true,false,true)}}else{if(e.length>0){var c=RHOBI.buildCommentHtml(f.data);if(a("#reply"+b).length>0){a("#reply"+b).before(c)}else{a("#comments"+b).append(c)}}}}});RHOBI.cometChannels.push(channelName)}};RHOBI.loadCommunityCompanies=function(){RHOBI.setSectionShowingSpan("Companies in the community");a("#rhobi_content").html("");RHOBI.showSpinner("sectionContent","loadCommunityCompaniesSpinner");var b={authTicket:RHOBI.authTicket,groupID:RHOBI.groupID};RHOBI.call("GET","SearchCompaniesInGroup",b,function(e){RHOBI.hideSpinner("loadCommunityCompaniesSpinner");if(e!=null){html="<table width='100%' cellspacing='0' cellpadding='2' border='0'>";for(var d in e.Companies){var c=e.Companies[d];html+="<tr><td width='16'><img src='"+RHOBI.www+c.StatusLightUrl+"' border='0' /> </td><td width='300'><a href='javascript:void(0);' class='rhobi_link' onclick=\"RHOBI.loadCompanyProfile("+c.DirectoryID+',false);return false;">'+htmlEncode(c.Company)+"</a></td><td>"+htmlEncode(c.City)+", "+htmlEncode(c.St)+" "+htmlEncode(c.Country)+"</td></tr>"}html+="</table>";a("#rhobi_content").html(html)}})};RHOBI.addNewCommunity=function(){a.facebox.settings.closeImage=RHOBI.www+"/scripts/facebox/closelabel.png";a.facebox("<div id='rhobi_loginbox'><p>Enter the name of the community:</p><input type='text' id='rhobi_txtCommunityName'/><a href='javascript:void(0);' class='rhobi_bluebutton' onclick=\"RHOBI.doAddNewCommunity();return false;\"><span>save</span></a></div>")};RHOBI.doAddNewCommunity=function(){txtCommunityName=a("#rhobi_txtCommunityName").val();if(txtCommunityName==""){return}var b={authTicket:RHOBI.authTicket,name:txtCommunityName,parentCommunityGUID:RHOBI.communityGUID};RHOBI.request("AddCommunity",b,function(c){if(c!=null){a.facebox.close();RHOBI.goCommunity(c)}})};window.communitySelectScriptLoaded={}})(jQuery);var RHOBI=RHOBI||{};(function(a){RHOBI.loadTabs=function(){var c=a("#rhobi_communityTabs");c.html("<a id='loginTab' href='javascript:void(0);' onclick=\"RHOBI.doLogin();return false;\" class='rhobi_downtab' style='display:none'><span>login</span></a>");c.append("<a id='logoutTab' href='javascript:void(0);' onclick=\"RHOBI.doLogout();return false;\" class='rhobi_downtab' style='display:none'><span>logout</span></a>");c.append("<a id='officeTab' href='javascript:void(0);' onclick=\"RHOBI.doOffice();return false;\" class='rhobi_downtab' style='display:none'><span>office</span></a>");var b=0;if(!RHOBI.hideLoginTab&&!RHOBI.integrated){if(RHOBI.userGUID==""){a("#loginTab").show();b++}else{a("#logoutTab").show();b++}}if(RHOBI.userGUID!=""&&!RHOBI.hideOfficeTab&&!RHOBI.integrated){a("#officeTab").show();b++}if(b>0){c.show()}else{c.hide()}};RHOBI.doOffice=function(){window.open(RHOBI.www+"/Login.aspx?un="+encodeURIComponent(RHOBI.userName)+"&pw="+encodeURIComponent(RHOBI.pwdHash)+"&ReturnUrl="+encodeURIComponent("/Internal/Default.aspx"))};window.communityTabsScriptLoaded={}})(jQuery);var RHOBI=RHOBI||{};RHOBI.wall=RHOBI.wall||{};(function(a){RHOBI.loadWallFunction=function(){if(a("#rhobi_wall").length==0){a("#rhobi_content").html("<div id='rhobi_wall'></div>")}};RHOBI.goCompanyWall=function(){if(RHOBI.sysDir!=null&&RHOBI.sysDir.WallGUID!=null){RHOBI.loadWall(RHOBI.sysDir.WallGUID)}};RHOBI.loadWall=function(b){if(a("#communityDiv").length==0){RHOBI.openCommunityPage("RHOBI.loadWall('"+b+"')");return}RHOBI.wallGUID=b;wmSubject="Enter the subject of your post. One line, max 200 characters";wmBody="Type the body of your message here";a("#rhobi_content").html("<div id='rhobi_wallProfile'></div><div id='rhobi_wallShare'><textarea id='rhobi_txtWallSubject' style='width: 98%'></textarea>Share a photo: <br/><img src='"+RHOBI.www+"/images/1ptrans.gif' border='0' id='rhobi_currentSharePhoto'/><input type='text' id='rhobi_photoTag' style='display:none' /><input type='file' id='rhobi_uploadSharePhoto' name='rhobi_uploadSharePhoto' /><br/><textarea id='rhobi_txtWallBody' style='width: 98%; height:200px'></textarea><div id='rhobi_divBtnNewThought'><a href='javascript:void(0);' id='btnNewThought' onclick='RHOBI.shareToWall();' class='rhobi_bluebutton'><span>share</span></a></div></div><table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td id='rhobi_mainContent'><div><span id='communityPathSpan'/></div><div id='rhobi_wallMessages'></div></td></tr></table>");RHOBI.request("GetWallByGUID",{authTicket:RHOBI.authTicket,wallGUID:b},function(c){if(c!=null){if(c.ForDirectoryID!=null){var d=c.ForDirectoryID;RHOBI.request("GetDirectoryByID",{authTicket:RHOBI.authTicket,dirID:d},function(g){var j=g.HQDemo;var e=j.City+", "+j.St+" "+j.Zip+", "+(j.Country==""?"United States":j.Country);var f=j.WebSite;if(f!=null&&f.length>0&&f.indexOf("://")==-1){f="http://"+f}var h=false;a("#rhobi_wallProfile").html("<p>&larr; <a href='javascript:void(0);' class='rhobi_link' onclick=\"RHOBI.loadStream();return false;\">back to community</a></p><table class='rhobi_fullWidth' border='0' cellspacing='0' cellpadding='2'><tr><td rowspan='3' style='width:80px'><img src='"+RHOBI.dirLogoUrl(g.LogoUrl)+"' border='0'/></td><td colspan='2' class='rhobi_header'>"+htmlEncode(j.Company)+(RHOBI.sysDir!=null&&RHOBI.sysDir.ID==g.ID?" <a href='javascript:void(0);' class='rhobi_bluebutton' onclick=\"RHOBI.editCompanyInfo();return false;\"><span>edit company info</span></a>":"")+"</td><td align='right'><span id='rhobi_companyProfileButtons'></span><a href='javascript:void(0);' class='rhobi_link' onclick=\"RHOBI.undockCompanyProfile("+d+","+h+');return false;">undock</a></td></tr><tr><td>'+htmlEncode(j.Address1)+"<br/>"+htmlEncode(e)+"</td><td>Ph.</td><td><a href='javascript:void(0);' class='rhobi_link' onclick=\"RHOBI.makeCall(0,"+d+",'"+escape(j.Phone)+"',"+h+');return false;">'+htmlEncode(j.Phone)+"</a></td></tr><tr><td><a href='"+htmlEncode(f)+"' class='rhobi_link' target='_blank'>"+htmlEncode(j.WebSite)+"</a></td><td>Fax</td><td>"+htmlEncode(j.Fax)+"</td></tr></table>")})}else{if(c.ForUserID!=null){}}}});addWatermarkToTextBox("rhobi_txtWallSubject",wmSubject);addWatermarkToTextBox("rhobi_txtWallBody",wmBody);a("#rhobi_uploadSharePhoto").uploadify({uploader:"/scripts/jquery.uploadify-v2.1.4/uploadify.swf",script:RHOBI.rhobiService+"/AddPhoto.ashx",scriptData:{mode:"constrain",w:"1024",h:"1024"},cancelImg:RHOBI.www+"/images/1ptrans.gif",folder:RHOBI.rhobiService+"/TempExtract",auto:true,scriptAccess:"always",onComplete:function(f,c,e,d,g){if(d!=""){var h=JSON.parse(d);if(typeof h.Error===undef){a("#rhobi_currentSharePhoto").attr("src",h.Cabinet.WebPath+"/"+h.FileName);a("#rhobi_photoTag").val(h.Tag)}else{alert(h.Error)}}},onError:function(f,c,e,d){alert(d.info)}});RHOBI.loadLastThreadID("rhobi_wallMessages");RHOBI.moreWallMessages()};RHOBI.moreWallMessages=function(){RHOBI.log("moreWallMessages");RHOBI.showSpinner("rhobi_wallMessages","loadMoreMessagesSpinner");RHOBI.loadLastThreadID("rhobi_wallMessages");var c=null;var d=a("#lastThreadTS").val();if(d!=""){c=new Date(parseInt(d))}var b={authTicket:RHOBI.authTicket,userGUID:RHOBI.userGUID,wallGUID:RHOBI.wallGUID,lastThreadTS:toJsonDate(c)};RHOBI.request("GetWallMessages",b,function(f){for(i=0;i<f.length;i++){var h=parseJsonDate(f[i].MsgUpdatedTS);if(c==null||h<c){c=h}}if(c!=null){a("#lastThreadTS").val(c.getTime())}RHOBI.hideSpinner("loadMoreMessagesSpinner");if(a("#messages").length==0){a("#rhobi_wallMessages").append("<div id='messages' style='width:100%'></div>")}if(f.length>0&&a("#rhobi_btnMoreMessages").length==0){a("#rhobi_wallMessages").append("<input type='button' id='rhobi_btnMoreMessages' value='more >' class='rhobi_moreLink' onclick='RHOBI.moreWallMessages();return false;' />")}for(i=0;i<f.length;i++){var g=f[i];RHOBI.showMessageThread(g,"messages",false,i>0,false)}if(c==null&&f.length==0){a("#rhobi_wallMessages").append("<p class='rhobi_error' id='rhobi_noPosts' style='margin-left:15px'>No posts found. Be the first to post here!</p>")}else{if(c!=null&&f.length==0){a("#rhobi_btnMoreMessages").hide();a("#messages").append("<p class='rhobi_error' id='rhobi_noPosts' style='margin-left:15px'>End of posts.</p>")}}if(!RHOBI.hideBannerAds){if(a("#rhobi_banners").length==0){var e="<p id='rhobi_banners' style='text-align:center'>";RHOBI.request("GetHalfBanners",{applicationCode:"PP",bannerCount:2},function(k){if(k!=null){for(i=0;i<k.length;i++){var j=k[i];if(i>0){e+=" &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "}e+=RHOBI.buildBannerLink(j)}e+="</p>";if(a("#rhobi_banners").length==0){a("#rhobi_streamMessages").append(e)}}})}}})};RHOBI.shareToWall=function(){if(RHOBI.userGUID!=""){subject=a("#rhobi_txtWallSubject");body=a("#rhobi_txtWallBody");photo=a("#rhobi_currentSharePhoto");if(subject.hasClass("rhobi_watermarkOn")||subject.val()==""){alert("You must enter the subject line of your post.");return}if(body.hasClass("rhobi_watermarkOn")||body.val()==""){alert("You must enter the body of your post.");return}if(subject.val().length>200){alert("Subject line cannot be longer than 200 characters. Yours is "+subject.val().length+".");return}RHOBI.postDestinationSectionGUID=RHOBI.homeSectionGUID;RHOBI.postDestinationIndustryGUID=RHOBI.homeIndustryGUID;RHOBI.postDestinationCommunityGUID=RHOBI.homeCommunityGUID;RHOBI.selectWallPostDestination()}else{RHOBI.doLogin()}};RHOBI.selectWallPostDestination=function(){a.facebox.settings.closeImage=RHOBI.www+"/scripts/facebox/closelabel.png";a.facebox("<div id='rhobi_postBox'><span class='rhobi_loginheader'>What &amp; Where To Post?</span><br/><br/>Your message will be posted to your wall, and it will be shared out to the community on the selected network feed for 10 DAYS. This will allow you to control who sees your post.<br/><br/><table width='100%' cellspacing='0' cellpadding='5' border='0'><tr><td class='rhobi_whatwhere'>WHAT?</td><td class='rhobi_whatwhere'>WHERE?</td></tr><tr><td valign='top' width='50%'><div id='rhobi_postSectionDiv'></div></td><td valign='top' width='50%'><div id='rhobi_postCommunityDiv'></div></td></tr></table><div id='rhobiPostSaveDiv' style='text-align:right'><a id='rhobiPostSaveButton' href='javascript:void(0);' onclick=\"RHOBI.completeWallPost();\" class='rhobi_bluebutton'><span>post message</span></a></div><div id='rhobiPostSaveError' style='display:none' class='rhobi_error'></div></div>");RHOBI.loadSectionNavigationV(RHOBI.postDestinationSectionGUID,"rhobi_postSectionDiv","RHOBI.postSelectSection",false);RHOBI.loadCommunityNavigationV(RHOBI.postDestinationCommunityGUID,"rhobi_postCommunityDiv","RHOBI.postSelectCommunity",false)};RHOBI.showPostSaveError=function(b){a("#rhobiPostSaveError").html(b);a("#rhobiPostSaveError").show()};RHOBI.hidePostSaveError=function(b){a("#rhobiPostSaveError").hide()};RHOBI.postSelectSection=function(b){RHOBI.postDestinationSectionGUID=b;RHOBI.loadSectionNavigationV(RHOBI.postDestinationSectionGUID,"rhobi_postSectionDiv","RHOBI.postSelectSection",false)};RHOBI.postSelectCommunity=function(b){RHOBI.postDestinationCommunityGUID=b;RHOBI.loadCommunityNavigationV(RHOBI.postDestinationCommunityGUID,"rhobi_postCommunityDiv","RHOBI.postSelectCommunity",false)};RHOBI.completeWallPost=function(){var b=true;RHOBI.hidePostSaveError();if(b){a("#rhobi_PostSaveButton").hide();RHOBI.showSpinner("rhobiPostSaveDiv","btnNewThoughtSpinner");subject=a("#rhobi_txtWallSubject");body=a("#rhobi_txtWallBody");photoTag=a("#rhobi_photoTag");data={authTicket:RHOBI.authTicket,fromUserID:RHOBI.userID,currentDirectoryID:(RHOBI.sysDir!=null?RHOBI.sysDir.ID:null),subject:subject.val(),body:body.val(),wallGUID:RHOBI.wallGUID,sectionGUID:RHOBI.postDestinationSectionGUID,communityGUID:RHOBI.postDestinationCommunityGUID,photoTag:photoTag.val()};RHOBI.request("NewWallPost",data,function(c){RHOBI.hideSpinner("btnNewThoughtSpinner");if(c.ID!=null){a.facebox.close();RHOBI.loadWall(RHOBI.wallGUID)}else{RHOBI.showPostSaveError(c.Error)}})}};RHOBI.editCompanyInfo=function(){a.facebox.settings.closeImage=RHOBI.www+"/scripts/facebox/closelabel.png";a.facebox("<div id='rhobi_addJobPositionBox'><p class='rhobi_header'>Edit Company Info</p><div id='rhobi_editDirectory'></div></div>");RHOBI.register.addEditDirectory("rhobi_editDirectory",null,RHOBI.sysDir.ID)};window.communityWallScriptLoaded={}})(jQuery);var RHOBI=RHOBI||{};(function(a){RHOBI.goStream=function(b,c){RHOBI.sectionGUID=b;RHOBI.communityGUID=c;RHOBI.loadSectionList();RHOBI.loadCommunityList();RHOBI.loadStream()};RHOBI.loadStream=function(){a("#rhobi_content").html("<table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td id='rhobi_mainContent'><div id='rhobi_streamWalls'></div><div id='rhobi_streamMessages'></div></td></tr></table>");RHOBI.loadStreamName();RHOBI.loadStreamWalls();RHOBI.loadLastThreadID("rhobi_streamMessages");RHOBI.moreStreamMessages()};RHOBI.loadStreamName=function(){var b={authTicket:RHOBI.authTicket,sectionGUID:RHOBI.sectionGUID,communityGUID:RHOBI.communityGUID};RHOBI.request("GetCommunityStreamName",b,function(c){if(c!=null){a("#rhobi_streamName").html(c.DisplayName);a("#rhobi_getTheStar").show()}})};RHOBI.loadStreamWalls=function(){var c=a("#rhobi_streamWalls");c.html("");RHOBI.showSpinner("rhobi_streamWalls","loadingStreamWalls");var b={authTicket:RHOBI.authTicket,sectionGUID:RHOBI.sectionGUID,communityGUID:RHOBI.communityGUID};RHOBI.request("GetCommunityWalls",b,function(e){RHOBI.hideSpinner("loadingStreamWalls");if(e!=null){perrow=8;html="<table border='0' cellspacing='5' cellpadding='0'>";for(var f=0;f<e.length;f++){if(f==0){html+="<tr><td>"}if(f>0&&f%perrow==0){html+="</table></td><td>"}if(f==0||f%perrow==0){html+="<table border='0' cellspacing='0' cellpadding='2'>"}var d=e[f];html+="<tr>";html+="<td class='rhobi_streamWallsCell' onclick=\"RHOBI.loadWall('"+d.GUID+"');return false;\">"+ellipsisText(d.Name,20)+"</td>";html+="</tr>"}if(e.length>perrow&&e.length%perrow!=0){for(f=0;f<perrow-(e.length%perrow);f++){html+="<tr><td class='rhobi_streamWallsCellBlank'>&nbsp;</td></tr>"}}html+="</table></td></tr></table>";c.append("<p style='margin-left:-10px'><span id='rhobi_recentPosts'>Recent posts from:</span></p>"+html)}})};RHOBI.loadLastThreadID=function(b){if(a("#lastThreadTS").length==0){a("#"+b).append("<input type='text' class='rhobi_displaynone' id='lastThreadTS' value='' />")}};RHOBI.moreStreamMessages=function(){RHOBI.log("moreStreamMessages");RHOBI.showSpinner("rhobi_streamMessages","loadMoreMessagesSpinner");RHOBI.loadLastThreadID("rhobi_streamMessages");var c=null;var d=a("#lastThreadTS").val();if(d!=""){c=new Date(parseInt(d))}var b={authTicket:RHOBI.authTicket,userGUID:RHOBI.userGUID,sectionGUID:RHOBI.sectionGUID,communityGUID:RHOBI.communityGUID,lastThreadTS:toJsonDate(c)};RHOBI.request("GetCommunityMessages",b,function(f){for(i=0;i<f.length;i++){var h=parseJsonDate(f[i].MsgUpdatedTS);if(c==null||h<c){c=h}}if(c!=null){a("#lastThreadTS").val(c.getTime())}RHOBI.hideSpinner("loadMoreMessagesSpinner");if(a("#messages").length==0){a("#rhobi_streamMessages").append("<div id='messages' style='width:100%'></div>")}if(f.length>0&&a("#rhobi_btnMoreMessages").length==0){a("#rhobi_streamMessages").append("<input type='button' id='rhobi_btnMoreMessages' value='more >' class='rhobi_moreLink' onclick='RHOBI.moreStreamMessages();return false;' />")}for(i=0;i<f.length;i++){var g=f[i];RHOBI.showMessageThread(g,"messages",false,i>0,false)}if(c==null&&f.length==0){a("#rhobi_streamMessages").append("<p class='rhobi_error' id='rhobi_noPosts' style='margin-left:15px'>No posts found. Be the first to post here!</p>")}else{if(c!=null&&f.length==0){a("#rhobi_btnMoreMessages").hide();a("#messages").append("<p class='rhobi_error' id='rhobi_noPosts' style='margin-left:15px'>End of posts.</p>")}}if(!RHOBI.hideBannerAds){if(a("#rhobi_banners").length==0){var e="<p id='rhobi_banners' style='text-align:center'>";RHOBI.request("GetHalfBanners",{applicationCode:"PP",bannerCount:2},function(k){if(k!=null){for(i=0;i<k.length;i++){var j=k[i];if(i>0){e+=" &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "}e+=RHOBI.buildBannerLink(j)}e+="</p>";if(a("#rhobi_banners").length==0){a("#rhobi_streamMessages").append(e)}}})}}})};RHOBI.buildBannerLink=function(b){if(b!=null){html="<a href='"+b.ClickURL+"' target='blank' alt='"+htmlEncode(b.ToolTip)+"'><img src='"+RHOBI.www+b.URL+"' border='0' width='"+b.Width+"' height='"+b.Height+"'/></a>";return html}else{return""}};RHOBI.getTheStar=function(){code="<a title='Cityhub' href='http://www.cityhubs.org?sectionGUID="+RHOBI.sectionGUID+"&communityGUID="+RHOBI.communityGUID+"'><img alt='Cityhub' src='http://www.cityhubs.org/images/city hub favicon 32x32.png' style='border:0'/></a>";a.facebox.settings.closeImage=RHOBI.www+"/scripts/facebox/closelabel.png";a.facebox("<div id='rhobi_getTheStar'>Add the Cityhub star to your website:<br/><p style='text-align:center'><img src='"+RHOBI.www+"/images/city hub favicon 32x32.png'/></p><p>For the following location: <span class='rhobi_header'>"+a("#rhobi_streamName").html()+"</span></p><br/>Copy and paste the following code:<br/><textarea style='width:500px;height:200px'>"+code+"</textarea></div>")};RHOBI.changeMessageStream=function(d,b,c){a.facebox.settings.closeImage=RHOBI.www+"/scripts/facebox/closelabel.png";a.facebox("<div id='rhobi_userHomeLocation'><span class='rhobi_header'>Select a New Stream for Message</span><br/><br/><table width='100%' cellspacing='0' cellpadding='5' border='0'><tr><td class='rhobi_whatwhere'>WHAT?</td><td class='rhobi_whatwhere'>WHERE?</td></tr><tr><td valign='top' width='50%'><div id='rhobi_selectSectionDiv'></div></td><td valign='top' width='50%'><div id='rhobi_selectCommunityDiv'></div></td></tr></table><div id='rhobiUpdateMsgSaveDiv' style='text-align:right'><a id='rhobiUpdateMsgSaveButton' href='javascript:void(0);' onclick=\"RHOBI.doChangeMessageStream("+d+");\" class='rhobi_bluebutton'><span>use this stream</span></a></div><div id='rhobiUpdateMsgSaveError' style='display:none' class='rhobi_error'></div></div>");RHOBI.updateMsgSectionGUID=b;RHOBI.updateMsgCommunityGUID=c;RHOBI.loadSectionNavigationV(RHOBI.updateMsgSectionGUID,"rhobi_selectSectionDiv","RHOBI.updateMsgSelectSection",false);RHOBI.loadCommunityNavigationV(RHOBI.updateMsgCommunityGUID,"rhobi_selectCommunityDiv","RHOBI.updateMsgSelectCommunity",false)};RHOBI.showUpdateMsgSaveError=function(b){a("#rhobiUpdateMsgSaveError").html(b);a("#rhobiUpdateMsgSaveError").show()};RHOBI.hideUpdateMsgSaveError=function(b){a("#rhobiUpdateMsgSaveError").hide()};RHOBI.updateMsgSelectSection=function(b){RHOBI.updateMsgSectionGUID=b;RHOBI.loadSectionNavigationV(RHOBI.updateMsgSectionGUID,"rhobi_selectSectionDiv","RHOBI.updateMsgSelectSection",false)};RHOBI.updateMsgSelectCommunity=function(b){RHOBI.updateMsgCommunityGUID=b;RHOBI.loadCommunityNavigationV(RHOBI.updateMsgCommunityGUID,"rhobi_selectCommunityDiv","RHOBI.updateMsgSelectCommunity",false)};RHOBI.doChangeMessageStream=function(c){var b={msgID:c,newSectionGUID:RHOBI.updateMsgSectionGUID,newCommunityGUID:RHOBI.updateMsgCommunityGUID};RHOBI.request("ChangeMessageStream",b,function(){a.facebox.close();RHOBI.loadStream()})};window.communityStreamScriptLoaded={}})(jQuery);var RHOBI=RHOBI||{};(function(a){RHOBI.loadOfficeDashboard=function(){RHOBI.loadOfficeFunction();a("#rhobi_office").html("<p class='rhobi_header'>Company Dashboard</p><div id='rhobi_dashboard'></div>");RHOBI.showSpinner("rhobi_dashboard","loadOfficeDashboardSpinner");var b={authTicket:RHOBI.authTicket,sysID:RHOBI.sysID,companyID:null};RHOBI.request("GetDashboard",b,function(c){RHOBI.hideSpinner("loadOfficeDashboardSpinner")})};window.officeDashboardScriptLoaded={}})(jQuery);
