/* new accessible 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("I");    // Split our REL value into parts 
		                                        // Use I as separator
/* XHTML compliant target attribute */
		 if (relSplit[0] == "external") {       // If the REL=external...
		    if(anchor.href.indexOf("#nonew") >-1) continue;
            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 = "apre la pagina in una finestra a parte: " + 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...
			//anchor.className = "popup";          // attach a CSS class to it to allow us to style it
			//anchor.title = "apre la pagina in una finestra a parte"; // Add a new title attribute to warn the users of a new window
			anchor.popupWidth = relSplit[1]; 
			anchor.popupHeight = relSplit[2];
	        anchor.onclick = function() {acpopup(this.href,'console',this.popupWidth,this.popupHeight);return false;};
			}
		}
	   }
} 

function acpopup(strURL,strType,strWidth,strHeight) {
var strOptions="";
if (strType=="console") strOptions="scrollbars=yes,status=yes,toolbar=no,resizable,height="+strHeight+",width="+strWidth;
window.open(strURL, '', strOptions);
}
