function getBaseURL(realm) { return getInsecureBaseURL(realm); } function getInsecureBaseURL(realm) { if(realm == "admin") { return "http://www.globalhotshops.com/admin/"; } else { return "http://www.globalhotshops.com/"; } } function getSecureBaseURL(realm) { if(realm == "admin") { return "https://www.globalhotshops.com/admin/"; } else { return "https://www.globalhotshops.com/"; } }