advertisement

advertisement

advertisement

Join Our Email List!

Sign up to receive information from the American Urological Association!

Stay Informed

< script type = "text/javascript" > zE(function() { $zopim(function() { $zopim.livechat.departments.filter(''); }); }); // Must set timer in order for chat to load first setTimeout(function() { // Check all departments var depts = $zopim.livechat.departments.getAllDepartments(); var deptsStatus = []; // Create list of dept status for array testing depts.forEach((item, index) => { deptsStatus.push([item.status, item.name]); }) // If no departments are online, keep the widget hidden, otherwise show deptsStatus.forEach((item, index) => { var status = item[0]; var thisDepartment = item[1]; var thisSite = window.location.host; if (status == "online") { // Set department according to routing switch (thisSite) { // Support case "auanet.org": case "www.auanet.org": if (thisDepartment == "Support" && status == "online") { console.log("Show Support Chat Dept"); $zopim.livechat.departments.setVisitorDepartment("Support"); zE.show(); } break; // Help Desk case "thehub.auanet.org": // Double check this dept is available if (thisDepartment == "Helpdesk" && status == "online") { console.log("Show Help Desk Chat Dept"); $zopim.livechat.departments.setVisitorDepartment("Helpdesk"); zE.show(); } break; case "auau.auanet.org": case "www.auau.auanet.org": if (thisDepartment == "Education" && status == "online") { console.log("Show Education Chat Dept"); $zopim.livechat.departments.setVisitorDepartment("Education"); zE.show(); } break; default: } } }); }, 2500);