var regurl = function (http_url,https_url,paramURL)
{
	var urlhref   = window.location.pathname;
	var urlhost   = document.domain;

	if ( (urlhref.indexOf("user/register") != -1) || (urlhref.indexOf("user/login") != -1) || (urlhref.indexOf("user/changepassword") != -1) || (urlhref.indexOf("user/forgotpassword") != -1) || (urlhref.indexOf("user/myprofile") != -1) || (urlhref.indexOf("Friends-Corner/Personalized-Gift-Labels") != -1))
	{
		if (urlhost == http_url)
			window.location.href = "https://" + https_url + urlhref + window.location.search;
	} else 
	{
		if (urlhost == https_url)
			window.location.href = "http://" + http_url + urlhref + window.location.search;
	}
}
window.onload = regurl('www.malts.com','secure.malts.com','');

