// JavaScript containing CSS3 declarations. Using JavaScript to "hide" these selectors from
// the W3C validator. The CSS3 validator implementation isn't finished, and while these will validate, some of the valid
// CSS2 statements generate a false error. Using the correct CSS2 validator causes the following to generate
// an error, since it doesn't understand CSS3...It's a vicious circle.

// Thanks to 9Rules/Whitespace http://www.9rules.com/whitespace/css_focus/focus_and_not.php 
document.write('<style type="text/css">');
document.write('#content a[href*="mailto:"], #linkbar a[href*="mailto:"] {padding-right: 15px; background: url(/images/link-mail.gif) right center no-repeat;}');
document.write('#content a[href*="http"], #linkbar a[href*="http"], #footer a[href*="http"] {padding-right: 12px; background: url(/images/link-out.gif) right top no-repeat;}');
document.write('#content a[href*="http://www.tcervo.com/"], #comments a[href*="http://www.tcervo.com/"] {padding-right: 2px; background: url(none);}');
document.write('#content a[href*=".zip"], #linkbar a[href*=".zip"] {padding-right: 13px; background: url(/images/link-zip.gif) right center no-repeat;}');
document.write('#content a[href*=".pdf"], #linkbar a[href*=".pdf"] {padding-left: 16px; background: url(/images/link-pdf.gif) left center no-repeat;}');
document.write('#content a[href*=".doc"], #linkbar a[href*=".doc"] {padding-left: 16px; background: url(/images/link-doc.gif) left center no-repeat;}');
document.write('#content a[href*="mailto:"]:hover, #linkbar a[href*="mailto:"]:hover {padding-right: 15px; background: #036 url(/images/link-mail.gif) right center no-repeat; text-decoration: none;}');
document.write('#content a[href*="http"]:hover, #linkbar a[href*="http"]:hover, #footer a[href*="http"]:hover {padding-right: 12px; color: #fff; background: #036 url(/images/link-out-white.gif) right top no-repeat; text-decoration: none;}');
document.write('#content a[href*="http://www.tcervo.com/"]:hover, #comments a[href*="http://www.tcervo.com/"]:hover {padding-right: 2px; background: #960 url(none);}');
document.write('#content a[href*=".zip"]:hover, #linkbar a[href*=".zip"]:hover {padding-right: 13px; background: #036 url(/images/link-zip.gif) right center no-repeat; text-decoration: none;}');
document.write('#content a[href*=".pdf"]:hover, #linkbar a[href*=".pdf"]:hover {padding-left: 16px; color: #fff; background: #036 url(/images/link-pdf.gif) left center no-repeat; text-decoration: none;}');
document.write('#content a[href*=".doc"]:hover, #linkbar a[href*=".doc"]:hover {padding-left: 16px; color: #fff; background: #06c url(/images/link-doc.gif) left center no-repeat; text-decoration: none;}');
document.write('</style>');

// Javascript to preload header graphics
// Usage: loadImages("/images/headers/example.jpg");    
 function loadImages() {

     for (var i = 0; i < arguments.length; i++) {
         var temp = makeId(arguments[i]);
         eval(temp +"= new Image()");
         eval(temp+".src ='"+ arguments[i] +"'");
     }
 }
 function makeId(path) {
    return path.substring(path.lastIndexOf("/")+1, path.lastIndexOf("."));
 }
 
// This function clears the default value from a form field
function clearDefault(el) {
	if (el.defaultValue==el.value) el.value = ""
}

// Hides email addresses from spam bots.
// Usage example: printEmail('tony','tcervo.com');
function printEmail(name,domain,display){
	var at="@";
	document.write("<a href='mailto:"+name+""+at+""+domain+"'>"+display+"</a>")
}


// Function to allow multiple onload functions to be called
function multipleOnload()
{
  extractBlockquoteCitations();
  makeNiceTitles();
  externalLinks();
}
window.onload = multipleOnload;