function getChildByClassName(element, className) {
  var children = element.childNodes;
  var i;
  for (i = 0; i < children.length; i++) {
    if (children[i].className == className)
      return children[i];
  }
  return null;
}

function pageDidShow(page) {
  var linkBackNode = getChildByClassName(page, 'link_back');
  if (linkBackNode)
    document.getElementById('link_back').href = linkBackNode.href;
  else
    document.getElementById('link_back').href = 'http://jlex.org/';
}
