
function dsp(loc) {
	if (document.getElementById) {
		var foc = loc.firstChild;
		foc = loc.firstChild.innerHTML ? loc.firstChild : loc.firstChild.nextSibling;
		foc.innerHTML = foc.innerHTML == "+" ? "-" : "+";
		foc = loc.parentNode.nextSibling.style ? loc.parentNode.nextSibling : loc.parentNode.nextSibling.nextSibling;
		foc.style.display = foc.style.display == "block" ? "none" : "block";
	}
}
function dspControl(loc, collapse) {
	if (document.getElementById) {
		var foc = loc.firstChild;
		foc = loc.firstChild.innerHTML ? loc.firstChild : loc.firstChild.nextSibling;
		if (collapse) {
			foc.innerHTML = "+";
		} else {
			foc.innerHTML = "-";
		}
		foc = loc.parentNode.nextSibling.style ? loc.parentNode.nextSibling : loc.parentNode.nextSibling.nextSibling;
		if (collapse) {
			foc.style.display = "none";
		} else {
			foc.style.display = "block";
		}
	}
}
function dspAll(loc) {
	if (document.getElementById) {
		var foc = loc.firstChild;
		foc = loc.firstChild.innerHTML ? loc.firstChild : loc.firstChild.nextSibling;
		var collapse = false;
		if (foc.innerHTML == "Show All") {
			foc.innerHTML = "Hide All";
			collapse = false;
		} else {
			foc.innerHTML = "Show All";
			collapse = true;
		}
		foc = loc.nextSibling;
		while (foc) {
			if (foc.nodeName.toLowerCase() == "h5") {
				dspControl(foc.firstChild, collapse);
			}
			foc = foc.nextSibling;
		}
	}
}
if (!document.getElementById) {
	document.write("<style type=\"text/css\"><!--\n" + ".dspcont{display:block;}\n" + "//--></style>");
}
function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != "function") {
		window.onload = func;
	} else {
		window.onload = function () {
			oldonload();
			func();
		};
	}
}
function addClass(element, value) {
	if (!element.className) {
		element.className = value;
	} else {
		newClassName = element.className;
		newClassName += " ";
		newClassName += value;
		element.className = newClassName;
	}
}
function stripyTables() {
	if (!document.getElementsByTagName) {
		return false;
	}
	if (!document.getElementById) {
		return false;
	}
	if (!document.getElementById("stripy")) {
		return false;
	}
	var stripe = document.getElementById("stripy");
	var tables = stripe.getElementsByTagName("table");
	for (var i = 0; i < tables.length; i = i + 1) {
		var odd = false;
		var rows = tables[i].getElementsByTagName("tr");
		for (var j = 0; j < rows.length; j = j + 1) {
			if (odd === true) {
				addClass(rows[j], "odd");
				odd = false;
			} else {
				odd = true;
			}
		}
	}
}
function highlightRows() {
	if (!document.getElementsByTagName) {
		return false;
	}
	if (!document.getElementById("stripy")) {
		return false;
	}
	var stripe = document.getElementById("stripy");
	var rows = stripe.getElementsByTagName("tr");
	for (var i = 0; i < rows.length;  i = i + 1) {
		rows[i].oldClassName = rows[i].className;
		rows[i].onmouseover = function () {
			addClass(this, "highlight");
		};
		rows[i].onmouseout = function () {
			this.className = this.oldClassName;
		};
	}
}
function rowClick() {
	if (!document.getElementsByTagName) {
		return false;
	}
	if (!document.getElementById("stripy")) {
		return false;
	}
	var stripe = document.getElementById("stripy");
	var rows = stripe.getElementsByTagName("tr");
	for (var i = 0; i < rows.length; i = i + 1) {
		var links = rows[i].getElementsByTagName("a");
		if (links[0] !== null) {
			rows[i].linkHref = links[0].getAttribute("href");
			rows[i].onclick = function () {
				window.location.href = this.linkHref;
			};
		}
	}
}
function showSection(id) {
	var div = document.getElementById(id);
	if (div.style.display == "block") {
		div.style.display = "none";
	} else {
		div.style.display = "block";
	}
}
function prepareInternalnav() {
	if (!document.getElementsByTagName) {
		return false;
	}
	if (!document.getElementById) {
		return false;
	}
	var links = document.getElementsByTagName("a");
	for (var i = 0; i < links.length;  i = i + 1) {
		var sectionId = links[i].getAttribute("href").split("#")[1];
		if (!document.getElementById(sectionId)) {
			continue;
		}
		document.getElementById(sectionId).style.display = "none";
		links[i].destination = sectionId;
		links[i].onclick = function () {
			showSection(this.destination);
			return false;
		};
	}
}
addLoadEvent(stripyTables);
addLoadEvent(highlightRows);
addLoadEvent(enableTooltips);
// addLoadEvent(prepareInternalnav);		


