function popUpControlledVocab(id, vocabulary)
{
    var URL = "/dspace-jspui/controlledvocabulary/controlledvocabulary.jsp?ID=" + id + "&amp;vocabulary=" + vocabulary;
	page = window.open(URL,
                       'controlledvocabulary',
                       'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=650,height=450');
}

function loadXMLDoc(fname)
{
    var xmlDoc;

    // code for IE
    if (window.ActiveXObject)
    {
        xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
    }
    // code for Mozilla, Firefox, Opera, etc.
    else if (document.implementation 
             && document.implementation.createDocument)
    {
        xmlDoc=document.implementation.createDocument("","",null);
    }
    else
    {
        alert('Your browser cannot handle this script');
    }
    
    xmlDoc.async=false;
    xmlDoc.load(fname);

    return(xmlDoc);
}

function processXml(xmlFile, xslFile)
{
    xml=loadXMLDoc(xmlFile);
    xsl=loadXMLDoc(xslFile);
    
    // code for IE
    if (window.ActiveXObject)
    {
        ex=xml.transformNode(xsl);
        document.getElementById("feed").innerHTML=ex;
    }
    // code for Mozilla, Firefox, Opera, etc.
    else if (document.implementation 
             && document.implementation.createDocument)
    {
        xsltProcessor=new XSLTProcessor();
        xsltProcessor.importStylesheet(xsl);
        resultDocument = xsltProcessor.transformToFragment(xml,document);
        document.getElementById("feed").appendChild(resultDocument);
    }
}
