//<head><META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://www.flyordie.com"></head><!--
// Set status bar.
window.status = "Welcome to FlyOrDie's Tanx homepage.";

// Runs all functions at onLoad.
function runAll() {
  if (getCookie("glow") == 1) {
    moveDown(255,0);
  }
}

// Glow border functions.
var timeDelay = 5;
var whatColor = false;

function moveUp(nowColor) {
  thisMain = document.getElementById("central");
  if (nowColor < 255) {
    nowColor++;
    if (!whatColor) {
      thisMain.style.borderColor = "rgb(00," + nowColor + ",00)";
    } else {
      thisMain.style.borderColor = "rgb(" + nowColor + ",00,00)";
    }
    transColor = nowColor;
    setTimeout("moveUp(transColor)",timeDelay);
  } else {
    firstCall = true;
    setTimeout("moveDown(255)",timeDelay);
  }
}

function moveDown(nowColor) {
  thisMain = document.getElementById("central");
  if (nowColor > 0) {
    nowColor--;
    if (!whatColor) {
      thisMain.style.borderColor = "rgb(00," + nowColor + ",00)";
    } else {
      thisMain.style.borderColor = "rgb(" + nowColor + ",00,00)";
    }
    transColor = nowColor;
    setTimeout("moveDown(transColor)",timeDelay);
  } else {
    whatColor = !whatColor;
    setTimeout("moveUp(0)",timeDelay);
  }
}

// Roll background for nav buttons.
function rollOver(elem) {
  if (document.childNodes) {
    elem.childNodes[0].style.backgroundColor = "#00CC00";
    elem.childNodes[0].style.color = "#000000";
  }
}

function rollOut(elem) {
  if (document.childNodes) {
    elem.childNodes[0].style.backgroundColor = "#000000";
    elem.childNodes[0].style.color = "#00FF00";
  }
}

// Roll background for action button.
function rollOverRed(elem) {
  if (document.childNodes) {
    elem.childNodes[0].style.backgroundColor = "#CC0000";
    elem.childNodes[0].style.color = "#000000";
  }
}

function rollOutRed(elem) {
  if (document.childNodes) {
    elem.childNodes[0].style.backgroundColor = "#000000";
    elem.childNodes[0].style.color = "#FF0000";
  }
}

function getParam(paramName) {
  if (document.location.href.split("?")[1]) {
    params = document.location.href.split("?")[1];
    if (params.split("&")) {
      for (i = 0; i < params.split("&").length; i++) {
        thisParam = params.split("&")[i];
        if (thisParam.split("=")[0] == paramName) {
          return thisParam.split("=")[1];
        }
      }
    } else {
      if (params.split("=")[0] == paramName) {
        return params.split("=")[1];
      }
    }
  } else {
    return 0;
  }
}
//-->

