function sfg_convertToSSL(href) {
    if ((location.protocol == 'http:') && (location.host != 'www.sunflowergroup-test.com') && (location.host != 'www.sunflowerstaffing-test.com')
        && (location.host != 'www.instoreintel-test.com') && (location.host != 'www.events-promotions-test.com') && (location.host != 'localhost')) {

        return "https://" + location.host + href;
    }

    return href;
}

function sfg_routeToInsecure() {
    if (location.protocol == 'https:')
        window.location = 'http://' + location.host + location.pathname + location.search;
}

function sfg_routeToSecure() {
    if ((location.protocol == 'http:') && (location.host != 'www.sunflowergroup-test.com') && (location.host != 'www.sunflowerstaffing-test.com')
        && (location.host != 'www.instoreintel-test.com') && (location.host != 'www.events-promotions-test.com') && (location.host != 'localhost')) {

        window.location = 'https://' + location.host + location.pathname + location.search;
    }
}

