<!--
var _elem, _working, _limit, _width, _hits;
function hiliteLink(elem) {
	try {
		var text = getInnerText(elem);
		if (text) {
			if (!checkPage(text)) {
				text.style.textDecoration = "underline";
				text.style.color = "#FF9999";
			}
			else {
				text.style.textDecoration = "none";
			}	
			return;
		}
	}
	catch(e) {
	}
	return false; 
}
function unhiliteLink(elem) {
	try {
		var text = getInnerText(elem);
		if (text) {
			if (!checkPage(text)) {
				text.style.textDecoration = "";
				text.style.color = "#9999FF";
			}
			return;
		}
	}
	catch(e) {
	}
	return false; 
}
function overAudio(elem) {
	var text = getInnerText(elem);
	if (!text.innerText) {
		text = text.childNodes[1];
		text = text.childNodes[1];
		text = text.childNodes[0];
		text = text.childNodes[1];
	}
	text.style.textDecoration = "underline";
	text.style.color = "#FF9999";
	if (elem.attributes["imagesrc"] && elem.attributes["imageid"]) {
		eval(elem.attributes["imageid"].value + ".src='" + elem.attributes["imagesrc"].value + "'");
	}
}
function outAudio(elem) {
	var text = getInnerText(elem);
	if (!text.innerText) {
		text = text.childNodes[1];
		text = text.childNodes[1];
		text = text.childNodes[0];
		text = text.childNodes[1];
	}
	text.style.textDecoration = "";
	text.style.color = "red";
}
function getInnerText(elem) {
	var last = elem;
	try {
		var child = last.childNodes[0];
		while (child && child.nodeName != "#text") {
			last = child;
			child = last.childNodes[0];
		}
		return last;
	}
	catch(e) {
		if (last) return last; 
		return false;
	}
}
function getTitle(elem) {
	var child = elem;
	try {
		while (child && child.nodeName != "#text") {
			if (child.title && child.title > "") {
				return child;
			}
			child = child.childNodes[0];
		}
	}
	catch(e) {
	}
	return false;
}
function getNOBR(elem) {
	var child = elem;
	try {
		var child = child.childNodes[0];
		while (child) {
			if (child.nodeName == "NOBR") {
				return child;
			}
		}
	}
	catch(e) {
	}
	return false;
}
function checkNOBR() {
 	try {
		var nobr = document.all.tags("NOBR");
		for (var i = 0; i < nobr.length; i++) {
			var block = isChildOf("links", nobr[i]);
			if (block) {
				fixText(block, nobr[i]);
			}
		}
	}
	catch(e) {}
	tr_content.style.visibility = "visible";
}
function checkResize(elem) {
	var block = isChildOf("links", elem);
	fixText(block, elem);
	var die = 1 / 0;
}
function fixText(block, elem) {
	if (!block.style) return;
	if (!block.style.width) return;
	var limit = parseInt(block.style.width, 10) - 5;
	if (elem.nodeName == "TD") {
		elem = getNOBR(elem);		
	}
	var text = getInnerText(elem);
	checkPage(text);
	if (elem.offsetWidth > limit) {
		var title = getTitle(elem);
		var value;
		if (title) {
			value = title.title;
		} 
		else {
			value = text.innerHTML;
		}
		if (!title) {
			elem.title = value;
		}
		if (text.innerText) {
			_elem = elem;
			_elem.onresize = resize;
			_working = value;
			_limit = limit;
			_width = -1;
			_hits = 0;
			resize();
		}
		else { 
			var working = value;
			var len = working.length;
			while (elem.offsetWidth > limit && len > 1) {
				len--;
				working = working.substring(0, len);
				text.innerHTML = working + " ...";
			}
		}
	}
}
function checkPage(text) {
	var atag = text;
	while (atag && atag.nodeName != "A") {
		atag = atag.parentNode;
	}
	//defense mechanizms to prevent client script errors
	if (!atag) return false;
	if (atag.nodeName != "A") return false;
	if (!atag.href) return false;
	if (atag.href == "") return false;
	var len = atag.href.length;
	if (atag.href.substring(len - 1, len) == "#") return false;
	var linknodes = atag.href.split("/");
	var pagenodes = document.location.href.split("/");
	var pagelink = pagenodes[pagenodes.length - 1];
	if (pagelink == "") {
		pagelink = "index.php";
	}
	if (linknodes[linknodes.length - 1] == pagelink) {
		text.style.color = "#FFEECC";
		text.style.fontWeight = "bold";
		return true;
	}
	return false;
}
function resize(e) {
	if (!_elem) {
		return;
	}
	if (_width < 0) {
		var text = getInnerText(_elem);
		if (text.innerText == "") {
			if (_elem.offsetWidth > _limit) {
				_limit = _elem.offsetWidth;
				_elem.minWidth = _limit;
			}
			_width = 0;
		}
		else if (_elem.minWidth) {
			_limit = _elem.minWidth;
			_width = 0;
		}
		else {
			text.innerText = "";
			return;
		}		
	}
	var text = getInnerText(_elem);
	if (_width == 0) {
		text.innerText = _working + " ...";
	}
	var len = _working.length;
	if (_elem.offsetWidth > _limit) {
		if (_width != _elem.offsetWidth) {
			_width = _elem.offsetWidth;
			if (_working.substring(len - 1, len) == " ") {
				_width = 0;
			}
			len--;
			_working = _working.substring(0, len);
			if (_width == 0) {
				resize();
			} 
			else {
				text.innerText = _working + " ...";
			}
		}
		else {
			_elem.onresize = null;
		}
	}	
}
function isChildOf(id, elem) {
	var block = elem.parentNode;
	while (block) {
		if (block.id == id) {
			return block;
		}
		block = block.parentNode;
	}
	return false;
}
//-->
