var queryStr = (window.location.search).replace(/^\?/,"");
if(queryStr != "" /*&& window.location.hash == ""*/) {
	window.location.replace(window.location.protocol + "//" + window.location.host + window.location.pathname + "#" + queryStr);
}

function maskLink(address) {
	var addr = new String(address);
	addr = addr.replace(/http:\/\/(?:(?:www\.)?absoluteanime\.com)\/!graboyes/i,"http://www.graboyesland.com");
	addr = addr.replace(/\/\//g,"/"); //replace double slashes with a single slash
	addr = addr.replace(":/","://");
	return(addr);
}


function goTo(linkObj) {
	if(linkObj.hash != "") {
		//if((maskLink(window.location.href) + linkObj.hash) == linkObj.href) { //same page
			window.location.href = window.location.protocol + "//" + window.location.host + window.location.pathname + linkObj.hash;
			return(true);
		//}
	}
	return(false);
}


function pageLoaded() {
	if(!document.getElementsByTagName) return;
	var links = document.getElementsByTagName('a');
	for(var i=0; i<links.length; i++) {
		if(typeof(links[i].href) == "undefined" || links[i].href == "") continue;
		//links[i].href = links[i].href.replace(/http:\/\/(?:localhost|(?:(?:www\.)?absoluteanime\.com))\/!graboyes/i,"http://www.GraboyesLand.com");
		links[i].href = links[i].href.replace(/http:\/\/(?:(?:www\.)?absoluteanime\.com)\/!graboyes/i,"http://www.GraboyesLand.com");
		links[i].href = links[i].href.replace(/(\.com\/\/)/g,".com/");
  }
}

