function basename(href)
{
	var j = href.lastIndexOf("/");
	return(href.substring(j+1, href.length));
}

function subPageHit(newLoc)
{
	document.cookie="show="+basename(self.location.href)+";path=/;";
	if (top.location.href == self.location.href)
	{
		window.location.replace(newLoc);
	}
}

