function swap(x){
	var str=x.src;
	if(str.indexOf('.gif')!=-1){
		if (str.indexOf('_h.gif')==-1){
			str=str.replace('.gif','_h.gif');
		} else {
			str=str.replace('_h.gif','.gif');
		}
	}
	if(str.indexOf('.jpg')!=-1){
		if (str.indexOf('_h.jpg')==-1){
			str=str.replace('.jpg','_h.jpg');
		} else {
			str=str.replace('_h.jpg','.jpg');
		}
	}
	x.src=str;
}

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;

