var anchors = $$('a.external');
for (var i = 0; i < anchors.length; i++) {
	anchors[i].target = "_blank";
}

function openAttachment(url) {
	var attachmentWindow = window.open('', 'attachment', 'toolbar=0, location=0, directories=0, status=1, menubar=0, scrollbars=1, resizable=1, width=800, height=600, screenX=25, top=25, screenY=25, left=25');
	attachmentWindow.focus(); 
	attachmentWindow.location = url;
}