function openInNewWindow() { 
	// Change "_blank" to something like "newWindow" to load all links in the same new window 
	var newWindow = window.open(this.getAttribute('href'), '_blank'); 
	newWindow.focus(); 
	return false; 
} 

/* 
Add the openInNewWindow function to the onclick event of links with a class name of "non-html" 
*/ 
function getNewWindowLinks() { 
	// Check that the browser is DOM compliant 
	if (document.getElementById && document.createElement && document.appendChild) { 
		// Change this to the text you want to use to alert the user that a new window will be opened 
		var strNewWindowAlert = "link opens in a new window"; 
		// Find all links 
		var objWarningText; 
		var strWarningText; 
		var link; 
		var links = document.getElementsByTagName('a'); 
		for (var i = 0; i < links.length; i++) { 
			link = links[i]; 
			// Find all links with a class name of "_blank" 
			if (/\_blank\b/.exec(link.className)) { 
				link.title = strNewWindowAlert;
				link.onclick = openInNewWindow; 
			} 
		} 
		objWarningText = null; 
	} 
} 

// A general function to add an event handler
function addHandler(obj, evt, newhandler, captures) {
	if (obj.attachEvent) {
		obj.attachEvent('on' + evt, newhandler);
	}
	else if (obj.addEventListener) {
		obj.addEventListener(evt, newhandler, captures);
	}
	else {
		var oldhandler;
		if (oldhandler = obj['on' + evt]) {
			obj['on' + evt] = function() {
				oldhandler();
				newhandler();
			}
		}
		else {
			obj['on' + evt] = newhandler;
		}
	}
}

addHandler(window, 'load', getNewWindowLinks); 