if (document.referrer) {
	var referrer = document.createElement('a');
	referrer.href = document.referrer;
	if (referrer.hostname != document.domain) {
		var access_parse = document.domain.split('.');
		var access_refer = referrer.hostname.split('.');
		if (access_parse[access_parse.length - 2] != access_refer[access_refer.length - 2]) {
			document.cookie = 'access_origin=' + document.referrer + ';expires=0;path=/;domain=.' + access_parse[access_parse.length - 2] + '.' + access_parse[access_parse.length - 1];
		}
	}
}