// function allows (amonsgt other things) dynamic changing of style attributes in templates other than those where the call exists
// original code available here - - ->  http://simonwillison.net/2004/May/26/addLoadEvent/

function addLoadEvent(func) { 
  var oldonload = window.onload; 
  if (typeof window.onload != 'function') { 
    window.onload = func; 
  } else { 
    window.onload = function() { 
      oldonload(); 
      func(); 
    } 
  } 
} 

// show or hide various DIV's in SERVICES

function showHide(div_id) {
	// hide all the divs
	document.getElementById('a').style.display = 'none';
	document.getElementById('b').style.display = 'none';
	document.getElementById('c').style.display = 'none';
	document.getElementById('d').style.display = 'none';
	document.getElementById('e').style.display = 'none';
	// show the requested div
	document.getElementById(div_id).style.display = 'block';
}



// alternative to target="_blank" link must include rel="external"
function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;


