function makesched(where, date, opponent, time, event, gameMonth, gameDay, gameYear) 
  {
  nowDate  = new Date();
  gameDate = new Date();
  gameDate.setYear(gameYear);
  gameDate.setMonth(gameMonth - 1, gameDay);

  if (nowDate.getTime() <= gameDate.getTime())
    {
    if (where == 1) document.write("<tr>");
    else            document.write("<tr class=\"GreyRow\">");

    document.write("<td>");
    document.write(date);
    document.write("<td>");
    document.write(opponent);
    document.write("</td>");
    document.write("<td>");
    document.write(time);
    document.write("</td>");
    document.write("<td>");

    eventcode = getEventAndVenueCode(event);
    if (eventcode == '&e=-1')
      {
      document.write('Call for prices');
      }
    else
      {
      document.write("<A TARGET=\"_blank\" HREF=\"http://www.eventinventory.com/search/byvenue.cfm?client=1973&restart=yes");
      document.write(eventcode);
      document.write("&s=1&month="+gameMonth+"&day="+gameDay+"&year="+gameYear);
      document.write("\" onMouseOver=\"window.status='Click here to order great seats!'; return true\"");
      document.write("onMouseOut=\"window.status=' '; return true\">Ticket Prices</A>");
      }

    document.write("</td></tr>");
    }
  }

function pos(event) 
  {
  document.write("<A TARGET=\"_blank\" HREF=\"http://www.eventinventory.com/search/byvenue.cfm?client=1973&restart=yes&e=");
  document.write(event);
  document.write("\" onMouseOver=\"window.status='Click here to order great seats!'; return true\"");
  document.write("onMouseOut=\"window.status=' '; return true\">Ticket Prices</A>");
  }

function pos2(event, gameMonth, gameDay, gameYear) 
  {
  nowDate  = new Date();
  gameDate = new Date();
  gameDate.setYear(gameYear);
  gameDate.setMonth(gameMonth - 1, gameDay);

  if (nowDate.getTime() <= gameDate.getTime())
    {
    document.write("<A TARGET=\"_blank\" HREF=\"http://www.eventinventory.com/search/byvenue.cfm?client=1973&restart=yes");
    document.write(getEventAndVenueCode(event));
    //document.write("&s=1&month="+gameMonth+"&day="+gameDay+"&year="+gameYear);
    //document.write("&s=1&d="+gameMonth+"/"+gameDay+"/"+gameYear);
    document.write("\" onMouseOver=\"window.status='Click here to order great seats!'; return true\"");
    document.write("onMouseOut=\"window.status=' '; return true\">Ticket Prices</A>");
    }
  else
    {
    document.write("Finished");
    }
  }

function getEventAndVenueCode(event)
  {
  if (event == "anaheim angels")			  return("&e=29");
  if (event == "baltimore orioles")		  return("&e=59");
  if (event == "boston red sox")			  return("&e=107");
  if (event == "chicago white sox")		  return("&e=164");
  if (event == "cleveland indians")		  return("&e=183");
  if (event == "detroit tigers")			  return("&e=241");
  if (event == "kansas city royals")	  return("&e=428");
  if (event == "minnesota twins")			  return("&e=554");
  if (event == "new york yankees")		  return("&e=607");
  if (event == "oakland athletics")		  return("&e=625");
  if (event == "seattle mariners")		  return("&e=771");
  if (event == "tampa bay devil rays")	return("&e=840");
  if (event == "texas rangers")			    return("&e=853");
  if (event == "toronto blue jays")		  return("&e=877");
  if (event == "arizona diamondbacks")  return("&e=41");
  if (event == "atlanta braves")			  return("&e=50");
  if (event == "chicago cubs")			    return("&e=162");
  if (event == "cincinnati reds")			  return("&e=173");
  if (event == "colorado rockies")		  return("&e=193");
  if (event == "florida marlins")			  return("&e=293");
  if (event == "houston astros")			  return("&e=358");
  if (event == "los angeles dodgers")	  return("&e=481");
  if (event == "milwaukee brewers")		  return("&e=549");
  if (event == "montreal expos")			  return("&e=560");
  if (event == "new york mets")         return("&e=605");
  if (event == "philadelphia phillies")	return("&e=672");
  if (event == "pittsburgh pirates")		return("&e=685");
  if (event == "san diego padres")		  return("&e=757");
  if (event == "san francisco giants")	return("&e=759");
  if (event == "st. louis cardinals")		return("&e=807");
  return("&e=-1");
  }
