window.onload = startup;

function startup() {
  // Sets target="_blank for PDFs (only) while maintaining XHTML strict compliance

  for (i = 0; i < document.links.length; i++) { 	// go through all the hyperlinks
    var p = document.links[i].pathname;			// Get a copy of the path
    p.toLowerCase();					// Make sure it's all lower case
    if (p.lastIndexOf('.pdf') == p.length - 4) {	// if the last 4 chars are .pdf
      document.links[i].target = '_blank';		// Set the target
    }
  }
}
