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";
   
   if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "scroll"){
   
   		target = anchor.getAttribute("href").substring(anchor.getAttribute("href").lastIndexOf("#") + 1,anchor.getAttribute("href").length);
   		anchor.setAttribute("targetId",target);
   		anchor.setAttribute("href","#");
   		anchor.onclick = function(){new Effect.ScrollTo(this.getAttribute("targetId"), {offset: -20});return false;}
   		
   	}
   if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "scrollTop"){
   		anchor.onclick = function(){new Effect.ScrollTo('body', {offset: 0});return false;}
   	}
 }
}
function windowLoad(){
	externalLinks();
}
window.onload = windowLoad;

try {
  document.execCommand("BackgroundImageCache", false, true);
  } catch(err) {}
