function updateTobaccowiseLocation ()
{		
	var siteHostname= "tobaccowise.cancercare.on.ca";
	var siteProtocol = "http:";
	
	var currentHref = new String(window.location.href);

	var currentHostname = new String(window.location.hostname);
	var currentProtocol = new String(window.location.protocol);
	
	if ((currentHostname == siteHostname) && (currentProtocol == siteProtocol))
	{		
		rExp = /tobaccowise.cancercare.on.ca/gi;
		newString = new String ("www.tobaccowise.com")
		newURL = currentHref.replace(rExp, newString)

		window.location.href = newURL;	
	}
}

if (window.addEventListener)
	window.addEventListener("load", updateTobaccowiseLocation, false);
else if (window.attachEvent)
	window.attachEvent("onload", updateTobaccowiseLocation);
else if (document.getElementById)
	window.onload=updateTobaccowiseLocation;