﻿var restorePoint;

// log-in log-out
function LogInMover(elmId) {
  var el = document.getElementById(elmId);
  if (el) el.style.display = "inline";
}
function LogInMout(elmId) {
  var el = document.getElementById(elmId);
  if (el) el.style.display = "none";
}

function MouseOverFlag(img) {
  img.children[0].src = img.children[0].src.replace("_g.gif", ".gif");
}
function MouseOutFlag(img) {
  img.children[0].src = img.children[0].src.replace(".gif", "_g.gif");
}

function ChangeAllLinksToPreview() {
  var links = document.getElementsByTagName("a");
  for (i = 0; i < links.length; i++) {
    if (links[i].href.indexOf("?") >= 0)
      links[i].href = links[i].href + "&preview=true";
    else
      links[i].href = links[i].href + "?preview=true";
  }
}

if (typeof (alertText) != "undefined")
  if (alertText.length > 0)
    alert(alertText);

if (typeof (CallThisFunction) != "undefined")
  CallThisFunction();

//if (typeof (top.setWebsiteHeight) != "undefined") {
//  top.setWebsiteHeight(document.body.scrollHeight);
//}

function getNextSibling(startBrother) {
  endBrother = startBrother.nextSibling;
  while (endBrother != null && endBrother.nodeType != 1) {
    endBrother = endBrother.nextSibling;
  }
  return endBrother;
}
