/* popup code */
function windowLinks() {
    if(!document.getElementsByTagName) {
         return;
    }
	
    var anchors = document.getElementsByTagName("a");
    for (var i = 0; i < anchors.length; i++) {
         var anchor = anchors[i];
         var relIndex = anchor.rel;
		 if (relIndex){
		 var relSplit = relIndex.split("|");    // Split our REL value into parts 
/* XHTML compliant target attribute */
		 if (relSplit[0] == "external") {       // If the REL=external...
            anchor.target = "_blank";           // set it's 'target' attribute to '_blank'
			anchor.className = "external";      // attach a CSS class to it to allow us to style it
			anchor.title = "Load in new window: "+ anchor.href;  // Add a new title attribute to warn the users of a new window
			
/* XHTML compliant popup attribute */
   			} else if (relSplit[0] == "popup") { // If the REL=popup...
			var strOptions="";
   			
   			anchor.className = "popup";          // attach a CSS class to it to allow us to style it
			// anchor.title = "Loads in a Popup Window"; // Add a new title attribute to warn the users of a new window
			anchor.popupWidth = relSplit[1]; 
			anchor.popupHeight = relSplit[2];
	        anchor.onclick = function() {strOptions="resizable=no, height="+this.popupHeight+",width="+this.popupWidth+", scrollbars=yes"; window.open(this.href, '', strOptions); return false;};
			}
		}
	}
}