var loc = document.location.toString();
var index = loc.indexOf(":");
var url = loc.substring(index,loc.length);

if (index == "4") { 
	secureUrl = "https" + url;
        location.replace(secureUrl); // get rid of current page in history
        location.href = secureUrl;
}
