var curzi = 50;
var prevmenu = '';

function getX(obj) {
  var curleft = 0;

  if (obj.offsetParent) {
    while (obj.offsetParent) {
      curleft += obj.offsetLeft
      obj = obj.offsetParent;
    }
  } else if (obj.x)
    curleft += obj.x;

  return curleft;
}

function getY(obj) {
  var curtop = 0;

  if (obj.offsetParent) {
    while (obj.offsetParent) {
      curtop += obj.offsetTop
      obj = obj.offsetParent;
    }
  }  else if (obj.y)
    curtop += obj.y;

  return curtop;
}

function displayChildCats(catid, anchor) {
	if ( prevmenu != '' ) {
		document.getElementById(catid).activecat = 0;
		catDisplayTimeout(prevmenu);
	}

	document.getElementById(catid).style.top = (getY(document.getElementById(anchor)) + 12) + 'px' ;
	document.getElementById(catid).style.left = (getX(document.getElementById(anchor)) + 50) + 'px';
	document.getElementById(catid).style.display = '';
	document.getElementById(catid).style.zIndex = curzi;
	document.getElementById(catid).activecat = 1;
	prevmenu = catid;
	curzi++;
}

function hideChildCats(catid) {
	document.getElementById(catid).activecat = 0;
	window.setTimeout('catDisplayTimeout(\'' + catid + '\')', 1000);
}

function catDisplayTimeout(catid) {
	if ( !document.getElementById(catid).activecat ) {
		document.getElementById(catid).style.display = 'none';
	}
}

function rowOverEffect() {
	
}

function rowOutEffect() {
	
}

function check_form() {
	return true;
}

function selectRowEffect() {
	
}