/*****************
* Utilities script
******************/

/* Open links in a new (external) window */
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;

/* create current year for page footer */
function write_date() 
{ 
var thetime=new Date(); 
var nyear=thetime.getYear(); 
if (nyear<=99) 
 nyear= "19"+nyear; 
if ((nyear>99) && (nyear<2000)) 
nyear+=1900; 
document.write('&copy; ' + nyear); 
}

/* bookmark page */
function bookMarkPage() {
	window.external.AddFavorite(location.href, document.title);
}