﻿function showsubnav() {
	var subnav = document.getElementById('subnav');
	if(subnav != null) {
	var maxheight = subnav.scrollHeight;
	var height = subnav.style.height.replace('px','');
	height = parseInt(height);
		if(height < maxheight) {
			height += 4;
			subnav.style.height = height + 'px';
			setTimeout("showsubnav()",10);
		}
	}
	var subsubnav = document.getElementById('subsubnav');
	if(subsubnav != null) {
		var maxheight = subsubnav.scrollHeight;
    	var height = subsubnav.style.height.replace('px','');
	    height = parseInt(height);
		if(height < maxheight) {
			height += 4;
			subsubnav.style.height = height + 'px';
			setTimeout("showsubnav()",10);
		}
	}
}
function showPopupText(e, title, text) {
    if(text != "" && text != "<br />") {
        var popup = document.getElementById('ArticlePopup');
        popup.innerHTML = "<h2>" + title + "</h2>";
        popup.innerHTML += text;
        popup.style.display = 'block';
        popup.style.left = e.clientX + 50 + 'px';
        popup.style.top = e.clientY + document.documentElement.scrollTop + 'px';
    }
}
function hidePopupText() {
    var popup = document.getElementById('ArticlePopup');
    popup.innerHTML = "";
    popup.style.display = 'none';
}  
