// to launch in a new window, set rel="external" for the link.
// to launch in a specific frame, set rel="external:framename" for the link, where framename is the name of the targetted frame.

// XHTML Targetting Script
// ©2003 Marty Lamb, MartianSoftware.com
// http://www.martiansoftware.com/articles/xhtmltargetting.html

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")) {
			var rel = anchor.getAttribute("rel");
			if (rel == "external") {
				anchor.target = "_blank";			
			} else if (rel.substring(0,9) == "external:") {
				anchor.target = rel.substring(9, rel.length);
			} 
		}
	}
}

window.onload = externalLinks;


// Launch New Window Script
function displayWindow(url, width, height) {
     var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=no,scrollbars=no,menubar=no,status=no' );
}

  // this function is need to work around 
  // a bug in IE related to element attributes
  function hasClass(obj) {
     var result = false;
     if (obj.getAttributeNode("class") != null) {
         result = obj.getAttributeNode("class").value;
     }
     return result;
  }