// site functions
function returnDocument() {
         var file_name = document.location.href;
         var end = (file_name.indexOf("?") == -1) ? file_name.length : file_name.indexOf("?");
         return file_name.substring(file_name.lastIndexOf("/")+1, end);
     }

function setLink(menulink, menutext){
    // get filename: contest.html
    var currentPage = returnDocument();
    // if returns empty, url just contest/
    // so set index.html
    if(currentPage == "")
      currentPage = "index.html";
    // set url and text for link, and see if it's current page to make link active color
    if(currentPage == menulink)
      return '<a href="' + menulink + '" class="active">' + menutext + '</a>';
    else
      return '<a href="' + menulink + '">' + menutext + '</a>';
}

// decide to show/hide right prizes column
function setRightColumn() {
  
  // get the current page file name
  var currentPage = returnDocument();
  
  // begin data cell code
  var output = '<td style="width:158px; vertical-align:top;';
  
  // add display:none to any pages hiding the column 
  if( (currentPage == "enter.html") || (currentPage == "e1a.html") || (currentPage == "e1b.html") || (currentPage == "success.html"))
      output += ' display:none;';
      
  // complete data cell tag
  output += '">';
     
  return output;

}