// JavaScript Document

var isIEAJAX = false;
var notAvail = "n/a";

// retrieve text of an XML document element, including
// elements using namespaces
function getElementTextNS(prefix, parentElem, index) {
	var result = "";
	if (!parentElem) {
		//alert(prefix + " - " + index);		
	}
	if (prefix && isIEAJAX) {
		// IE/Windows way of handling namespaces
		result = parentElem.getElementsByTagName(prefix)[index];
	} else {
		// the namespace versions of this method 
		// (getElementsByTagNameNS()) operate
		// differently in Safari and Mozilla, but both
		// return value with just local name, provided 
		// there aren't conflicts with non-namespace element
		// names
		result = parentElem.getElementsByTagName(prefix)[index];
	}
	if (result) {
		// get text, accounting for possible
		// whitespace (carriage return) text nodes 
		if (result.childNodes.length > 1) {
			return result.childNodes[1].nodeValue;
		} else {
			return result.firstChild.nodeValue;    		
		}
	} else {
		return notAvail;
	}
}



