function turnOffLinks() {

// Make a list of all the <a> elements in the current document:
var linkCollection = document.getElementsByTagName('a');

// Loop through the entire list of <a> elements collected by the previous statement:
for (var i = 0; i < linkCollection.length; i++) {
// With each <a> element, set the 'href' attribute to "#":
linkCollection[i].href = '#';
}
window.print();
}