if (location.protocol != 'https:') 
{ 
	window.location = 'https://'+ location.host + location.pathname + location.search;
} 
