//This code provides a simple, clean way to open browser windows for displaying info_doc.jsp and info_image.jsp content.  This function is called from the object Resource Inspector panel in view_text.jsp and view_image.jsp 

function openClean (url) {
open_clean = window.open(url,"plain","location=no,status=no,menu=no,scrollbars,width=600,height=600");
}

//This code provides a standards compliant way of opening new browser windows from XHTML links
 
//All external links need to have the following attribute value: rel="external"

function externalLinks() {

 //test to see if the browser is DOM 1.0 compliant; if so, proceed, if not bail
 if (!document.getElementsByTagName) return;

 //index <a> tags
 var anchors = document.getElementsByTagName("a");

 //loop through <a href> tags, find the "rel=external" attribute, set a virtual "target" attribute 
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}

//Fire up the externalLinks function on load
window.onload = externalLinks;
