// JavaScript Document

// This function will load an xml file and match it up with an xsl stylesheet.
// the function will then write it to the page.
function displayXML(xmlfile, xslfile){
	if (window.ActiveXObject) // If using internet explorer
		{
			var xml = new ActiveXObject("Microsoft.XMLDOM")
			xml.async = false
			xml.load(xmlfile) // loads the xml file
			var xsl = new ActiveXObject("Microsoft.XMLDOM")
			xsl.async = false
			xsl.load(xslfile) // loads the xsl file
			document.write(xml.transformNode(xsl))  // writes it to the page
		}
	else // not internet explorer
		{
			var processor = new XSLTProcessor();
			var xslt = document.implementation.createDocument("", "", null);
			xslt.async = false;
			xslt.load(xslfile); // loads the xsl file
			processor.importStylesheet(xslt);
			
			var src_doc = document.implementation.createDocument("","", null);
			src_doc.async = false;
			src_doc.load(xmlfile); // loads the xsl file
			var result = processor.transformToDocument(src_doc);
			var xmls = new XMLSerializer();
			var output = xmls.serializeToString(result);  // formats the file
			document.write(output); // writes it to the page
		}
}

function ontd(obj){
	obj.style.backgroundColor='#F5F5F5';
	obj.style.color='#000000';	
}

function offtd(obj){
	obj.style.backgroundColor='#F5F5F5';
	obj.style.color='#000000';	
}
function offtdw(obj){
	obj.style.backgroundColor='#FFFFFF';
	obj.style.color='#000000';	
}

function togglearchive(theid,obj){
    if(document.getElementById(theid).style.display == 'none'){
      document.getElementById(theid).style.display = 'block';
    }else{
      document.getElementById(theid).style.display = 'none';
    }
}