function ahistory( dir ) {
	var host = document.location.host;
	if ( dir != undefined ) host += "/" + dir;
	if (document.referrer.indexOf("http://" + host) != -1){
		linkCheck = 1;
	} else {
		linkCheck = 0;
	}
	return linkCheck;
}

var timerID;

function hashDelete() {
	if (navigator.userAgent.indexOf('MSIE') != -1) {
		timerID = setInterval('setTitle()',100);
	}
}

function setTitle() {
	var h = location.hash;
	if (h.indexOf("#") == -1) {
		clearTimeout(timerID);
	}
	document.title = document.title.replace(h,"");
}
