<!--
var isDOM = (document.getElementById) ? 1 : 0;
var isNS4 = (navigator.appName == "Netscape") ? 1 : 0;
setInterval("if (isDOM && document.getElementById('mmsarrow') != null) {var color=document.getElementById('mmsarrow').style.color; if (color == '#666666') color = '#FF9900'; else color = '#666666'; document.getElementById('mmsarrow').style.color=color; }", 500);

var MDD_SearchFocus=false;
var MDD_Queued = new Object;
var MDD_Visible = new Object;
var MDD_Time = 300;
function MDD_CancelQueue() { try {clearTimeout(MDD_Timer);}catch(f) {} }
function MDD_PopUp(ev, mparent, mchild) {
	try {MDD_Visible.style.visibility = 'hidden';}
	catch(f) {}
	try { clearTimeout(MDD_Timer); MDD_Queued.style.visibilty = 'hidden'; }
	catch(f) {}
	mchild = document.getElementById(mchild);
	if (mchild) {
		var rr = MDD_GetDim(mparent);	
		MDD_SetPos(rr.x-2,  rr.y + mparent.offsetHeight+1, mchild);
		mchild.style.visibility = 'visible';
		MDD_Visible = mchild;
	}
}
function MDD_SetPos(x, y, child) {
	oCanvas = document.getElementsByTagName((document.compatMode && document.compatMode == "CSS1Compat") ? "HTML" : "BODY")[0];
	w_width = window.innerWidth ? window.innerWidth + window.pageXOffset : oCanvas.clientWidth + oCanvas.scrollLeft;
	w_height = window.innerHeight ? window.innerHeight + window.pageYOffset : oCanvas.clientHeight + oCanvas.scrollTop;
	t_width = window.event ? child.clientWidth : child.offsetWidth;
	t_height = window.event ? child.clientHeight : child.offsetHeight;
	t_extra_width = 7; // extra
	t_extra_height = 5; // extra
	child.style.left = x + "px";
	child.style.top = y + "px";
	while (x + t_width + t_extra_width > w_width) {	x -= x + t_width + t_extra_width - w_width; child.style.left = x + "px"; t_width = window.event ? child.clientWidth : child.offsetWidth; }
	while (y + t_height + t_extra_height > w_height) { y -= y + t_height + t_extra_height - w_height; child.style.top = y + "px"; t_height = window.event ? child.clientHeight : child.offsetHeight; }
}

function MDD_PopDown(event, element) {
	if (!isNS4) { if (!element.contains(event.toElement)) { MDD_Timer = setTimeout(hide, MDD_Time); MDD_Queued = element;}
	} else { MDD_Timer = setTimeout(hide, MDD_Time); MDD_Queued = element; }
	function hide() { element.style.visibility = 'hidden'; }
}

function MDD_PopDown2(event, mparent, mchild) {
	mchild = document.getElementById(mchild);
	if (mchild) {
		if (!isNS4) { if (event.toElement != mchild && !mchild.contains(event.toElement) && !mparent.contains(event.toElement)) { MDD_Timer = setTimeout(hide, MDD_Time); MDD_Queued = mchild; }
		} else { if (event.relatedTarget != mchild && event.relatedTarget.parentNode != mchild && event.relatedTarget.parentNode.parentNode != mchild && event.relatedTarget.parentNode != mparent) MDD_Timer = setTimeout(hide, MDD_Time);
			MDD_Queued = mchild;
		}
	}
	function hide() { mchild.style.visibility = 'hidden'; }
}

function MDD_GetDim(element){
	for (var lx=0,ly=0;element!=null;lx+=element.offsetLeft,ly+=element.offsetTop,element=element.offsetParent);
	return {x:lx,y:ly}
}

function MDD_Click(element, mchild) {
	mchild = document.getElementById(mchild);
	if (mchild) {
		mchild.style.visibility='hidden'; element.blur();
	}
}

//-->
