if (a.hostname == thisHref){ // if the link is not same with current page URL
links[i].removeAttribute("target");
}
}
function getLocation(href) {
var location = document.createElement("a");
location.href = href;
if (location.host == "") {
location.href = location.href;
}
return location;
};