//  ------------------------------
//  ------------------------------
		function startCatExpand(e,element)
		{
			//if(navigator.platform.indexOf("Mac") > -1 && navigator.userAgent.indexOf("Netscape") > -1) return;
			if(e.type != "onmouseenter")
			{
				var fromElement = e.relatedTarget || e.fromElement;
				while (fromElement && fromElement != element && fromElement.nodeName != 'BODY')
					fromElement = fromElement.parentNode
				if (fromElement == element)
					return;
			}
			
			var tableElement = element;
			var imgElement = tableElement.firstChild.firstChild.firstChild.firstChild.firstChild;
			
			if(!imgElement.inited)
				init(imgElement);

			tableElement.style.width = tableElement.offsetWidth;
			tableElement.className = "gr_expanded";
			tableElement.nextSibling.width = tableElement.offsetWidth;
			tableElement.nextSibling.height = tableElement.offsetHeight+1;
			tableElement.parentNode.style.zIndex = 1;
			window.clearTimeout(imgElement.imgDelayID);
			imgElement.imgDelayID = window.setTimeout(imgElement.expand,300);
		}

		function endCatExpand(e,element)
		{
			//if(navigator.platform.indexOf("Mac") > -1 && navigator.userAgent.indexOf("Netscape") > -1) return;
			if(e.type != "onmouseleave")
			{
				var toElement = e.relatedTarget || e.toElement;
				while(toElement && toElement != element && toElement.nodeName != 'BODY')
					toElement = toElement.parentNode;
				if(toElement == element)
					return;
			}

			var tableElement = element;
			var imgElement = tableElement.firstChild.firstChild.firstChild.firstChild.firstChild;
			window.clearTimeout(imgElement.imgDelayID);
			hideElements(tableElement);
			imgElement.contract();
		}

		function init(imgElement)
		{
			imgElement.originalHeight = imgElement.height;
			imgElement.originalWidth = imgElement.width;

			
			imgElement.expand = function() 
								{
									var factor = Math.round(imgElement.height*.06);
									if(imgElement.width + factor < imgElement.originalWidth*2)
									{
										imgElement.width += factor;
										imgElement.height += factor;
										imgElement.imgDelayID = window.setTimeout(imgElement.expand,18);
									}
									else
									{
										imgElement.width = imgElement.originalWidth*2;
										imgElement.height = imgElement.originalHeight*2;
										var tableElement = imgElement.parentNode.parentNode.parentNode.parentNode.parentNode;
										showElements(tableElement);
										if(tableElement.getAttribute("pushdown") == "1")
											tableElement.nextSibling.height = tableElement.offsetHeight+1;
									}
								};
			imgElement.contract = function() 
								{
									var factor = Math.round(imgElement.height*.08);
									if(imgElement.width - factor > imgElement.originalWidth)
									{
										imgElement.width -= factor;
										imgElement.height -= factor;
										imgElement.imgDelayID = window.setTimeout(imgElement.contract,15);
									}
									else
									{
										imgElement.width = imgElement.originalWidth;
										imgElement.height = imgElement.originalHeight;
										
										var parentTable = imgElement.parentNode.parentNode.parentNode.parentNode.parentNode;
										parentTable.className = "gr_expandable";
										parentTable.parentNode.style.zIndex = 0;
										parentTable.nextSibling.height = "1";
									}
								};
			
			imgElement.inited = true;
		}

		function showElements(element)
		{
			var trElements = element.firstChild.childNodes;
			//show titles past 2 lines
			if(trElements[1].firstChild.firstChild.nodeName == "DIV")
				trElements[1].firstChild.firstChild.style.height = "";
			
			for(var i=0;i<trElements.length;i++)
			{
				if(trElements[i].getAttribute("hideexp") == "1")
					trElements[i].style.display = "none";
				else
				{
					if(trElements[i].style.display == "none")
					{
						trElements[i].style.display = "";
						trElements[i].rehide = true;
					}
				}
			}
		}

		function hideElements(element)
		{
			var trElements = element.firstChild.childNodes;
			//hide titles past 2 lines
			if(trElements[1].firstChild.firstChild.nodeName == "DIV")
				trElements[1].firstChild.firstChild.style.height = "30px";

			for(var i=0;i<trElements.length;i++)
			{
				if(trElements[i].getAttribute("hideexp") == "1")
					trElements[i].style.display = "";

				if(trElements[i].rehide)
					trElements[i].style.display = "none";
			}
		}


//  ------------------------------
//  ------------------------------  EOF ------------------------------ //
