xxxxxxxxxx
function EnableDisableLinks(btn) {
var links = document.getElementsByTagName("a");
//btn here is some toggle button to toggle enable to diable
if (btn.value == "Disable") {
btn.value = "Enable";
for (var i = 0; i < links.length; i++) {
var href = links[i].href;
links[i].setAttribute("rel", href);
links[i].href = "javascript:;"
}
} else {
btn.value = "Disable";
for (var i = 0; i < links.length; i++) {
var href = links[i].getAttribute("rel");
links[i].removeAttribute("rel");
links[i].href = href
}
}
}