
/*
// determine OS
var mac = (navigator.platform.indexOf("Mac") != -1);
var pc = (navigator.platform.indexOf("Win") != -1);

// detect browser
var ns = (document.layers) ? true : false;
var ie = (document.all) ? true : false;

// define badbrowsers var (Mod: 083000)
var badbrowsers = false;

// disable function if NS ver 4.0x is detected (Mod: 083000)
if (ns && (navigator.appVersion.indexOf("4.0")) != -1) {
  badbrowsers = true;
}

// fix NS resize problem (Mod: 083000)
function reDo() {
  window.location.reload();
}

if (badbrowsers == false) {
  window.onResize = reDo;
}

// global variables
var isNav, isIE
var coll = "";
var styleObj = "";
var theID;
var theIDsub;
var layer1;

// set Document Object Models
if(document.layers) {
  isNav = true;
} else {
  isIE = true;
  coll = "all.";
  styleObj = ".style";
}

////////////////////////////////////////////////////////////////////////////////
// get the browser platform (OS)

function getPlatform() {
  if (navigator.platform == null || navigator.platform == "")
    return "other";
  else if (navigator.platform.indexOf("Mac") >= 0)
    return "mac";
  else if (navigator.platform.indexOf("Win") >= 0)
    return "win";
  else if (navigator.platform.indexOf("Unix") >= 0)
    return "unix";
  else
    return "other";
}

////////////////////////////////////////////////////////////////////////////////
// turn background highlighting on for table cells

function onLayerColor(menu,NSLayer,layerName) {
  if (document.layers) {
    var theLayer = eval("document." + menu + ".document." + NSLayer + ".document." + layerName);
  } else {
    var theLayer = eval("document.all." + layerName + ".style");
  }
  setBGColor(theLayer,"#DA2229")
}

////////////////////////////////////////////////////////////////////////////////
// turn background highlighting off for table cells

function offLayerColor(menu,NSLayer,layerName,backgroundColor) {
  if (document.layers) {
    var theLayer = eval("document." + menu + ".document." + NSLayer + ".document." + layerName);
  } else {
    var theLayer = eval("document.all." + layerName + ".style");
  }
  setBGColor(theLayer,backgroundColor)
}

////////////////////////////////////////////////////////////////////////////////
// turn all 'images' related layers off

function offImagesColor() {
  offLayerColor('mainLayer1','','layerA1','#10295A');
  offLayerColor('mainLayer1','','layerA2','#10295A');
  offLayerColor('mainLayer1','','layerA4','#10295A');
  offLayerColor('mainLayer1','','layerA5','#10295A');
  offLayerColor('mainLayer1','','layerA6','#10295A');
  offLayerColor('mainLayer1','','layerA7','#10295A');
}

////////////////////////////////////////////////////////////////////////////////
// turn all 'images - vacations' related layers off

function offImagesVacationsColor(){
  offLayerColor('subMainLayer1','','subLayerA1','#10295A');
  offLayerColor('subMainLayer1','','subLayerA2','#10295A');
  offLayerColor('subMainLayer1','','subLayerA3','#10295A');
}

////////////////////////////////////////////////////////////////////////////////
// turn all 'interests' related layers off

function offInterestsColor() {
  offLayerColor('mainLayer2','','layerB1','#10295A');
  offLayerColor('mainLayer2','','layerB2','#10295A');
  offLayerColor('mainLayer2','','layerB3','#10295A');
  offLayerColor('mainLayer2','','layerB4','#10295A');
//  offLayerColor('mainLayer2','','layerB5','#FF0033');
}

////////////////////////////////////////////////////////////////////////////////
// turn all 'links' related layers off

function offLinksColor() {
  offLayerColor('mainLayer3','','layerC1','#10295A');
  offLayerColor('mainLayer3','','layerC2','#10295A');
  offLayerColor('mainLayer3','','layerC3','#10295A');
  offLayerColor('mainLayer3','','layerC4','#10295A');
  offLayerColor('mainLayer3','','layerC5','#10295A');
  offLayerColor('mainLayer3','','layerC6','#10295A');
  offLayerColor('mainLayer3','','layerC7','#10295A');
  offLayerColor('mainLayer3','','layerC8','#10295A');
  offLayerColor('mainLayer3','','layerC9','#10295A');
  offLayerColor('mainLayer3','','layerC10','#10295A');
  offLayerColor('mainLayer3','','layerC11','#10295A');
  offLayerColor('mainLayer3','','layerC12','#10295A');
  offLayerColor('mainLayer3','','layerC13','#10295A');
  offLayerColor('mainLayer3','','layerC14','#10295A');
  offLayerColor('mainLayer3','','layerC15','#10295A');
  offLayerColor('mainLayer3','','layerC16','#10295A');
  offLayerColor('mainLayer3','','layerC17','#10295A');
  offLayerColor('mainLayer3','','layerC18','#10295A');
  offLayerColor('mainLayer3','','layerC22','#10295A');
  offLayerColor('mainLayer3','','layerC23','#10295A');
  offLayerColor('mainLayer3','','layerC24','#10295A');
  offLayerColor('mainLayer3','','layerC25','#10295A');
  offLayerColor('mainLayer3','','layerC26','#10295A');
  offLayerColor('mainLayer3','','layerC27','#10295A');
  offLayerColor('mainLayer3','','layerC29','#10295A');
  offLayerColor('mainLayer3','','layerC30','#10295A');
  offLayerColor('mainLayer3','','layerC31','#10295A');
  offLayerColor('mainLayer3','','layerC32','#10295A');
}

////////////////////////////////////////////////////////////////////////////////
// turn all 'reflections' related layers off

function offReflectionsColor() {
  offLayerColor('mainLayer4','','layerD1','#10295A');
  offLayerColor('mainLayer4','','layerD2','#10295A');
  offLayerColor('mainLayer4','','layerD3','#10295A');
  offLayerColor('mainLayer4','','layerD4','#10295A');
}

////////////////////////////////////////////////////////////////////////////////
// get DOM object

function getObject(obj) {
  var theObj;
  if (typeof obj == "string") {
    theObj = eval("document." + coll + obj + styleObj);
  } else {
    theObj = obj;
  }
  return theObj;
}

////////////////////////////////////////////////////////////////////////////////
// set DOM object background color

function setBGColor(obj,color) {
  var theObj = getObject(obj);
  if (isNav) {
    theObj.bgColor = color;
  } else {
    theObj.backgroundColor = color;
  }
}

////////////////////////////////////////////////////////////////////////////////
// turn on DOM object visibility (Mod: 083000)

function show(obj) {
  if (loaded == true) {
    var theObj = getObject(obj);
    theObj.visibility = "visible";
  }
}

////////////////////////////////////////////////////////////////////////////////
// turn off DOM object visibility (Mod: 083000)

function hide(obj) {
  var theObj = getObject(obj);
  theObj.visibility = "hidden";
}

////////////////////////////////////////////////////////////////////////////////
// show sub-menu

function timedShowSub(obj) {
  var a = "show('" + obj + "')";
  if (document.layers)
    setTimeout(a,1000 * 0);
  else
    setTimeout(a,1000 * .2);
}

////////////////////////////////////////////////////////////////////////////////
// hide sub-menu

function timedHideSub(obj,sec) {
  var a = "hide('" + obj + "')";
  theIDsub = setTimeout(a,1000 * sec);
}

////////////////////////////////////////////////////////////////////////////////
// hide menu

function timedHide(obj,sec) {
  if (loaded == true) {
    var a = "hide('" + obj + "')";
    theID = setTimeout(a,1000 * sec);
  }
}

////////////////////////////////////////////////////////////////////////////////
// hide all menus/layers (Mod: 083000)

function hideAll(num) {
  if (loaded == true) {
    for(var i=1; i<=num; i++) {
      var a = "mainLayer" + i;
      hide(a);
    }
  }
}

////////////////////////////////////////////////////////////////////////////////
// hide all sub-menus/layers

function hideAllSub(num) {
  for (var i=1; i<=num; i++) {
    var a = "subLayer" + i;
    hide(a);
  }
}

////////////////////////////////////////////////////////////////////////////////
// go to url

function goTo(url) {
  location.href = url;
}

////////////////////////////////////////////////////////////////////////////////
//  output text to the status bar of the window

function outputStatus(theString) {
  window.status = theString;
}

////////////////////////////////////////////////////////////////////////////////
//  clear window' status bar text

function clearStatus() {
  window.status= "";
}

////////////////////////////////////////////////////////////////////////////////
//  launches a window with the gallery info html string as its contents

function outputImageGalleryInfo(strGalleryInfo) {
  enlargeThumbnail(strGalleryInfo, "galleryInfo", "menubar=no, resizable=no, scrollbars=yes, toolbar=no, width=650, height=350");
}

document.write("<script language='JavaScript1.2' src='/outputMenus.js' type='text/javascript'><\/script>");

var bIsNetscape = (document.layers) ? true : false;
var styleScrollToTopLayer = "";
var styleWeekControllerLayer = "";
var strHidden = "hide";
var strVisible = "show";
var strRoot = "http://www.danielmckinnon.com/"
var strDocumentsRoot = strRoot + "documents/"
var strImagesRoot = strRoot + "images/"
var vizDept = null;
var vizMenu = null;
var noAnnoy = false;
var mac = navigator.appVersion.indexOf("Mac")>-1
var opera = navigator.userAgent.indexOf("Opera")>-1

goToBeginning = new Image
goToBeginningRollover = new Image
previousWeek = new Image
previousWeekRollover = new Image
nextWeek = new Image
nextWeekRollover = new Image
goToEnd = new Image
goToEndRollover = new Image

goToBeginning.src = "../../images/vfl/arrow_go_to_beginning.gif"
goToBeginningRollover.src = "../../images/vfl/arrow_go_to_beginning_rollover.gif"
previousWeek.src = "../../images/vfl/arrow_previous_week.gif"
previousWeekRollover.src = "../../images/vfl/arrow_previous_week_rollover.gif"
nextWeek.src = "../../images/vfl/arrow_next_week.gif"
nextWeekRollover.src = "../../images/vfl/arrow_next_week_rollover.gif"
goToEnd.src = "../../images/vfl/arrow_go_to_end.gif"
goToEndRollover.src = "../../images/vfl/arrow_go_to_end_rollover.gif"


danielmckinnondotcomOut = new Image
danielmckinnondotcomOver = new Image
resumeOut = new Image
resumeOver = new Image

danielmckinnondotcomOut.src = "http://www.danielmckinnon.com/images/header/danielmckinnondotcom.gif"
danielmckinnondotcomOver.src = "http://www.danielmckinnon.com/images/header/danielmckinnondotcom_over.gif"
resumeOut.src = "http://www.danielmckinnon.com/images/header/resume.gif"
resumeOver.src = "http://www.danielmckinnon.com/images/header/resume_over.gif"


//////////
//  Build menu

  function getMenu(deptName,menuName) {

    if(document.all && !mac) {

      var top = 0;
      var left = 0;
      var thisDept;

      if(vizDept != null && vizMenu != null) {
        if(vizMenu.style.visibility != 'hidden') {
          closeMenu();
        }
      }

      vizDept = eval("document.all." + deptName);
      vizMenu = eval("document.all." + menuName);
      thisDept = vizDept;

      while(thisDept.tagName != "BODY") {
        top += thisDept.offsetTop;
        left += thisDept.offsetLeft;
        thisDept = thisDept.offsetParent;
      }

      //offset menu so dept heading is visible.
      top += (vizDept.offsetHeight);

      vizMenu.style.left = left;
      vizMenu.style.top = top-3;

      //set slight delay so menu will not annoy you.
      setTimeout('delayMenu()',0);

      event.cancelBubble = true;
    }
  }

//
//////////

//////////
//  Delay opening menu

  function delayMenu() {
    openMenu();
  }

//
//////////

//////////
//  Open menu

  function openMenu() {
    if(vizDept != null && vizMenu != null) {
      vizMenu.style.visibility = 'visible';
    }
  }

//
//////////

//////////
// Close menu

  function closeMenu() {
    vizMenu.style.visibility = 'hidden';
  }

//
//////////

//////////
// Keeps menu hidden

  function hideMenu() {
    if(document.all && !mac) {
      if(vizDept != null && vizMenu != null) {
        if(!vizMenu.contains(event.toElement)) {
          vizMenu.style.visibility = 'hidden';
          vizDept = null;
          vizMenu = null;
        }
      }
    }
  }

//
//////////

// IMAGES SUB-MENU
document.write("<table border=\"0\" class=\"menu\" id=\"imagesMenu\" OnMouseOut=\"hideMenu();\" style=\"position:absolute; top:0; left:0; z-index:100; visibility:hidden;\">")
document.write("<tr><td nowrap style=\"text-align: left;\"><a href=\"http://www.danielmckinnon.com/image_manager/index.asp?gallery=cats\" class=\"nav\">cats</a></td></tr>")
document.write("<tr><td nowrap style=\"text-align: left;\"><a href=\"http://www.danielmckinnon.com/image_manager/index.asp?gallery=concerts\" class=\"nav\">concerts</a></td></tr>")
document.write("<tr><td nowrap style=\"text-align: left;\"><a href=\"http://www.danielmckinnon.com/image_manager/index.asp?gallery=patriots_games\" class=\"nav\">patriots games</a></td></tr>")
document.write("<tr><td nowrap style=\"text-align: left;\"><a href=\"http://www.danielmckinnon.com/image_manager/index.asp?gallery=vacations\" class=\"nav\">vacations</a></td></tr>")
document.write("<tr><td nowrap style=\"text-align: left;\"><a href=\"http://www.danielmckinnon.com/image_manager/index.asp?gallery=wwf_live\" class=\"nav\">wwf live!!!</a></td></tr>")
document.write("</table>")

// INTERESTS SUB-MENU
document.write("<table border=\"0\" class=\"menu\" id=\"interestsMenu\" OnMouseOut=\"hideMenu();\" style=\"position:absolute; top:0; left:0; z-index:100; visibility:hidden;\">")
document.write("<tr><td nowrap style=\"text-align: left;\"><a href=\"http://www.danielmckinnon.com/fantasyFootball/2001/index.asp\" class=\"nav\">fantasy football</a></td></tr>")
document.write("<tr><td nowrap style=\"text-align: left;\"><a href=\"http://www.danielmckinnon.com/favorites.asp?thing=books&sortBy=author_ascending\" class=\"nav\">favorite books</a></td></tr>")
document.write("<tr><td nowrap style=\"text-align: left;\"><a href=\"http://www.danielmckinnon.com/favorites.asp?thing=movies\" class=\"nav\">favorite movies</a></td></tr>")
document.write("<tr><td nowrap style=\"text-align: left;\"><a href=\"http://www.danielmckinnon.com/mk2/index.asp\" class=\"nav\">mortal kombat II</a></td></tr>")
document.write("<tr><td nowrap style=\"text-align: left;\"><a href=\"http://www.danielmckinnon.com/stp/index.asp\" class=\"nav\">stone temple pilots</a></td></tr>")
document.write("<tr><td nowrap style=\"text-align: left;\"><a href=\"http://www.danielmckinnon.com/vfl/index.asp\" class=\"nav\">vfl</a></td></tr>")
document.write("</table>")

// LINKS SUB-MENU
document.write("<table border=\"0\" class=\"menu\" id=\"linksMenu\" OnMouseOut=\"hideMenu();\" style=\"position:absolute; top:0; left:0; z-index:100; visibility:hidden;\">")
document.write("<tr><td nowrap style=\"text-align: left;\"><a href=\"http://www.boston.com/\" class=\"nav\" target=\"_blank\">boston.com</a></td></tr>")
document.write("<tr><td nowrap style=\"text-align: left;\"><a href=\"http://www.cnet.com/\" class=\"nav\" target=\"_blank\">cnet.com</a></td></tr>")
document.write("<tr><td nowrap style=\"text-align: left;\"><a href=\"http://www.expedia.com/pub/agent.dll?qscr=mrfn&&zz=999008467792&\" class=\"nav\" target=\"_blank\">driving directions</a></td></tr>")
document.write("<tr><td nowrap style=\"text-align: left;\"><a href=\"http://dvd.ign.com\" class=\"nav\" target=\"_blank\">dvd.ign.com</a></td></tr>")
document.write("<tr><td nowrap style=\"text-align: left;\"><a href=\"http://www.ebay.com/\" class=\"nav\" target=\"_blank\">eBay</a></td></tr>")
document.write("<tr><td nowrap style=\"text-align: left;\"><a href=\"http://www.imdb.com/\" class=\"nav\" target=\"_blank\">imdb.com</a></td></tr>")
document.write("<tr><td nowrap style=\"text-align: left;\"><a href=\"https://www.mbnanetaccess.com/NASApp/NetAccess/LoginDisplay\" class=\"nav\" target=\"_blank\">mbna net access</a></td></tr>")
document.write("<tr><td nowrap style=\"text-align: left;\"><a href=\"http://www.nfl.com/\" class=\"nav\" target=\"_blank\">nfl.com</a></td></tr>")
document.write("<tr><td nowrap style=\"text-align: left;\"><a href=\"http://www.patriots.com/\" class=\"nav\" target=\"_blank\">patriots.com</a></td></tr>")
document.write("<tr><td nowrap style=\"text-align: left;\"><a href=\"http://slashdot.org/\" class=\"nav\" target=\"_blank\">slashdot.org</a></td></tr>")
document.write("<tr><td nowrap style=\"text-align: left;\"><a href=\"http://tv.yahoo.com/grid?lineup=us_MA01152&.intl=us&zip=01876\" class=\"nav\" target=\"_blank\">tv listings</a></td></tr>")
document.write("<tr><td nowrap style=\"text-align: left;\"><a href=\"http://videogames.com\" class=\"nav\" target=\"_blank\">videogames.com</a></td></tr>")
document.write("<tr><td nowrap style=\"text-align: left;\"><a href=\"http://www.wrestleline.com/\" class=\"nav\" target=\"_blank\">wrestleline.com</a></td></tr>")
document.write("<tr><td nowrap style=\"text-align: left;\"><a href=\"http://www.wrestlezone.com/index2.shtml\" class=\"nav\" target=\"_blank\">wrestlezone.com</a></td></tr>")
document.write("</table>")

// REFLECTIONS SUB-MENU
document.write("<table border=\"0\" class=\"menu\" id=\"reflectionsMenu\" OnMouseOut=\"hideMenu();\" style=\"position:absolute; top:0; left:0; z-index:100; visibility:hidden;\">")
document.write("<tr><td nowrap style=\"text-align: left;\" width=\"117\"><a href=\"http://www.danielmckinnon.com/reflections/reflections_2002.asp\" class=\"nav\">2002</a></td></tr>")
document.write("<tr><td nowrap style=\"text-align: left;\" width=\"117\"><a href=\"http://www.danielmckinnon.com/reflections/reflections_2001.asp\" class=\"nav\">2001</a></td></tr>")
document.write("<tr><td nowrap style=\"text-align: left;\" width=\"117\"><a href=\"http://www.danielmckinnon.com/reflections/reflections_2000.asp\" class=\"nav\">2000</a></td></tr>")
document.write("<tr><td nowrap style=\"text-align: left;\" width=\"117\"><a href=\"http://www.danielmckinnon.com/reflections/reflections_1999.asp\" class=\"nav\">1999</a></td></tr>")
document.write("</table>")

function gotosite(strUrl) {
  if (strUrl != "") {
    self.location = strUrl;
  }
}

function goToSiteInNewWindow(strUrl) {
  if (strUrl != "") {
    window.open(strUrl,'','height=640, location, menubar, resizable, scrollbars, status, titlebar, toolbar, top=0, width=800');
  }
}

function enlargeThumbnail(imageLocation, windowName, windowOpenParameters) {
  imageWindow = window.open(imageLocation, windowName, windowOpenParameters)
}

function displayGalleryInfo(strInfo, windowName, windowOpenParameters) {
  enlargeThumbnail(strInfo, windowName, windowOpenParameters);
}

function getWindowHeight()
{
  var nReturnVal = "";

  if (bIsNetscape)
  {
    nReturnVal = "";
  }
  else
  {
    nReturnVal = document.body.offsetHeight;
  }
  return nReturnVal;
}

function getWindowWidth()
{
  var nReturnVal = "";

  if (bIsNetscape)
  {
    nReturnVal = window.innerwidth;
  }
  else
  {
    nReturnVal = document.body.offsetWidth;
  }
  return nReturnVal;
}

function getTopScroll()
{
  var nReturnVal = "";

  if (bIsNetscape)
  {
    nReturnVal = window.pageYOffset;
  }
  else
  {
    nReturnVal = document.body.scrollTop;
  }
  return nReturnVal;
}

function getLeftScroll()
{
  var nReturnVal = "";

  if (bIsNetscape)
  {
    nReturnVal = window.pageXOffset;
  }
  else
  {
    nReturnVal = document.body.scrollLeft;
  }
  return nReturnVal;
}

function setDivTop(layerRef, nValue)
{
  if (bIsNetscape)
  {
    layerRef.top = nValue;
  }
  else
  {
    layerRef.pixelTop = nValue;
  }
}

function setDivLeft(layerRef, nValue)
{
  if (bIsNetscape)
  {
    layerRef.left = nValue;
  }
  else
  {
    layerRef.pixelLeft = nValue;
  }
}

function setScrollToTopLayer()
{
  var nTopValue = getWindowHeight() + getTopScroll() - 40;
  var nLeftValue = getWindowWidth() + getLeftScroll() - 65;
  setDivTop(styleScrollToTopLayer, nTopValue);
  setDivLeft(styleScrollToTopLayer, nLeftValue);
}

function setWeekControllerLayer()
{
  var nTopValue = getWindowHeight() + getTopScroll() - 52;
  var nLeftValue = (getWindowWidth() / 2) - (getWindowWidth() / 2 * .27);
  setDivTop(styleWeekControllerLayer, nTopValue);
  setDivLeft(styleWeekControllerLayer, nLeftValue);
}

function setUp()
{
  //styleScrollToTopLayer = document.all["scrollToTop"].style;
  styleWeekControllerLayer = document.all["weekController"].style;
  strHidden = "hidden";
  strVisible = "visible";
  //styleScrollToTopLayer.visibility = strHidden;
  //setScrollToTopLayer();
  //styleScrollToTopLayer.visibility = strVisible;
  styleWeekControllerLayer.visibility = strHidden;
  setWeekControllerLayer();
  styleWeekControllerLayer.visibility = strVisible;

  //var intvar = window.setInterval("setScrollToTopLayer()", 500);
  var intvar = window.setInterval("setWeekControllerLayer()", 500);
}

function validatePoll() {
  goTo("http://www.boston.com/")
}
*/
function validateCommentsForm () {
  if (document.commentsForm.name.value.length > 50) {
    alert("Sorry, names are limited to a maximum of 50 characters.")
    return false
  }

  if (document.commentsForm.nickname.value.length > 50) {
    alert("Sorry, nicknames are limited to a maximum of 50 characters.")
    return false
  }

  if (document.commentsForm.email.value.length > 50) {
    alert("Sorry, e-mail addresses are limited to a maximum of 50 characters.")
    return false
  }

  if (document.commentsForm.webSite.value.length > 50) {
    alert("Sorry, web site urls are limited to a maximum of 50 characters.")
    return false
  }

  if (document.commentsForm.town.value.length > 50) {
    alert("Sorry, town names are limited to a maximum of 50 characters.")
    return false
  }

  if (document.commentsForm.state.value.length > 50) {
    alert("Sorry, state names are limited to a maximum of 50 characters.")
    return false
  }

  if (document.commentsForm.country.value.length > 50) {
    alert("Sorry, country names are limited to a maximum of 50 characters.")
    return false
  }

  if (document.commentsForm.comment.value.length > 5000) {
    alert("Sorry, messages are limited to a maximum of 5000 characters.  Your message is "+document.commentsForm.comment.value.length+" characters in length.")
    return false
  }

  if (document.commentsForm.name.value.length == 0) {
    alert("A name must be inputted in order to post a comment.")
    return false
  }

  if (document.commentsForm.comment.value.length == 0) {
    alert("A comment must be more than zero characters in length in order to post it.")
    return false
  }

  return true
}

function validateEmailLeagueForm() {
  if (numChecked(document.emailLeagueForm.coaches) == 0) {
    alert("Sorry, but at least one coach needs to be selected in order to send an e-mail.")
    return false
  }

  if (document.emailLeagueForm.subject.value.length == 0) {
    alert("Sorry, but a subject must be inputted in order to send an e-mail.")
    return false
  }

  if (document.emailLeagueForm.subject.value.length > 100) {
    alert("Sorry, but the subject is limited to a maximum of 100 characters.")
    return false
  }

  if (document.emailLeagueForm.message.value.length == 0) {
    alert("Sorry, but a message must be more than zero characters in length in order to send an e-mail.")
    return false
  }

  if (document.emailLeagueForm.message.value.length > 10000) {
    alert("Sorry, messages are limited to a maximum of 10000 characters.  Your message is "+document.emailLeagueForm.message.value.length+" characters in length.")
    return false
  }

  return true
}

function validatePollsForm(theForm) {
  alert(theForm.length)

  return false
}

function numChecked(field) {
  var nChecked = 0;
  for (i = 0; i < field.length; i++) {
    if (field[i].checked) {
      nChecked++;
    }
  }
  return nChecked;
}

function alertBox()
{
  alert("This is a test")
}

var checkflag = "false";

function check(field) {
  if (checkflag == "false") {
    for (i = 0; i < field.length; i++) {
      field[i].checked = true;
    }
    checkflag = "true";
    return "Uncheck All"; }
  else {
    for (i = 0; i < field.length; i++) {
      field[i].checked = false;
    }
    checkflag = "false";
    return "Check All";
  }
}

///////////////////////////////////////////////////////////////////////////////////////////////////

function GetSeasonNumber(strSeason)
{
  if (strSeason == "one")
    return 1;
  else if (strSeason == "two")
    return 2;
  else if (strSeason == "three")
    return 3;
  else if (strSeason == "four")
    return 4;
  else if (strSeason == "five")
    return 5;
  else if (strSeason == "six")
    return 6;
  else if (strSeason == "seven")
    return 7;
  else if (strSeason == "eight")
    return 8;
  else if (strSeason == "nine")
    return 9;
  else if (strSeason == "ten")
    return 10;
  else
    return -1;
}

///////////////////////////////////////////////////////////////////////////////////////////////////

function GetRomanNumeral(strSeason)
{
  if (strSeason == "one")
    return "I";
  else if (strSeason == "two")
    return "I I";
  else if (strSeason == "three")
    return "I I I";
  else if (strSeason == "four")
    return "I V";
  else if (strSeason == "five")
    return "V";
  else if (strSeason == "six")
    return "V I";
  else if (strSeason == "seven")
    return "V I I";
  else if (strSeason == "eight")
    return "V I I I";
  else if (strSeason == "nine")
    return "I X";
  else if (strSeason == "ten")
    return "X";
}

///////////////////////////////////////////////////////////////////////////////////////////////////

function GetSuperBowlString(strSeason)
{
  var strSuperBowl = "super bowl ";

  if (strSeason == "one")
    strSuperBowl += "I";
  else if (strSeason == "two")
    strSuperBowl += "I I";
  else if (strSeason == "three")
    strSuperBowl += "I I I";
  else if (strSeason == "four")
    strSuperBowl += "I V";
  else if (strSeason == "five")
    strSuperBowl += "V";
  else if (strSeason == "six")
    strSuperBowl += "V I";
  else if (strSeason == "seven")
    strSuperBowl += "V I I";
  else if (strSeason == "eight")
    strSuperBowl += "V I I I";
  else if (strSeason == "nine")
    strSuperBowl += "I X";

  return strSuperBowl;
}

///////////////////////////////////////////////////////////////////////////////////////////////////

function GetTeamName(strTeamLocation, nSeason)
{
  if (strTeamLocation == "Tennessee")
  {
    if (nSeason <= 3)
      return "Oilers";
    else
      return "Titans";
  }
}