//<script language="javascript">
//<!--

function CC_goTo(url,dest) {
  
  if (dest == '_top') {
    top.location = url;
  } else {
    document.location = url;
  }
}

function CC_getPageOffsetLeft(el) {

  var x;

  // Return the x coordinate of an element relative to the page.

  x = el.offsetLeft;
  if (el.offsetParent != null)
    x += CC_getPageOffsetLeft(el.offsetParent);

  return x;
}

function CC_getPageOffsetTop(el) {

  var y;

  // Return the x coordinate of an element relative to the page.

  y = el.offsetTop;
  if (el.offsetParent != null)
    y += CC_getPageOffsetTop(el.offsetParent);

  return y;
}

function CC_switchLayer(oldlayer, newlayer) {
  var obj_oldlayer = document.getElementByName(oldlayer);
  var obj_newlayer = document.getElementByName(newlayer);
  
  obj_oldlayer.style.display = 'none';
  obj_newlayer.style.display = 'block';
}

// Return a child node of 'parent' width id 'id'
function CC_getChildById(id,parent) {
	var hijos;
	if (parent) {
		hijos = parent.childNodes.length;
		for(var i=0;i<hijos;i++) {
			if (parent.childNodes[i].id == id) return parent.childNodes[i];
		}
	}
	return null;
}

//-->
//</script>