function Expert(version) { ExpertQuestion(version, ''); } function ExpertQuestion(version, question) { var urlprotocol = "https:"; if (window.location.host.toLowerCase().indexOf("localhost") > -1 || window.location.host.toLowerCase().indexOf("10.") > -1) urlprotocol = "http:"; //var url = urlprotocol + "//" + window.location.host; var url = "http://www.continental.com"; if (version) { url = url + '/alex/Agent.aspx'; } else { url = url + '/superalex/Agent.aspx'; } if (question != '') url = url + "?Question=" + question; if (version) { LaunchExternalAgent(url); } else { LaunchInternalAgent(url); } if (location.protocol.toLowerCase() == 'http:' & urlprotocol == 'https:') { location.href = location.href.replace('http:', urlprotocol); } }