

function anchorExists(id){
	if(document.getElementById(id) != null){
		return true;			   
	} else {
		return false;
	}
}

var url = unescape(window.top.location.href);
var tempArr = url.split("#");
var baseURL = tempArr[0];
var anchorID = tempArr[1];
var hasOldURL = false;

if(anchorID != null && !anchorExists(anchorID)){
	hasOldURL = true;
}

if(hasOldURL){
	window.top.location.href = tempArr.join("?oldsitecode=");
}

