// JavaScript Document

function getTeamUrl(team) {
  return 'http://web.mit.edu/2.744/www/Results/studentSubmissions/sketchModels/'+team+'/storyboard'
}

function getStudentUrl(student) {
  return 'http://web.mit.edu/2.744/www/Results/studentSubmissions/sketchModels/'+usernames_to_team_aliases[student]+"/"+student
}

function showAssignment(student) {
  window.open(getStudentUrl(student),
             'assignmentWin', 'width=800,height=600,scrollbars=yes,resizable=yes,status=yes,toolbar=yes')
  return false
}

function showTeamStory(team) {
  window.open(getTeamUrl(team),
             'storyboardWin', 'width=800,height=600,scrollbars=yes,resizable=yes,status=yes,toolbar=yes')
  return false
}

function getAssignmentDescription(student) {
  desc = username_to_description[student]
  if (desc == undefined) {
  	if (aliases_to_teams[student] == undefined) // student
		desc = "view work"
	else
		desc = "storyboard"
  }
  return desc
}

username_to_description = {
  "narrwhal":"moving room",
  "yehc":"room effects",
  "pennjam":"water visualization",
  "ahurwich":"detecting movement",
  "ewoldt":"finding start point",
  "tveuthey":"control room",
  "losingnemo":"boards 3 and 4",
  "agreb":"replacing gears",
  "lmartini":"denting walls",
  "leonj":"denting walls",
  "bhack":"shock monster",
  "a_league_of_our_own":"impact!",
  "ncheng":"room looks-like",
  "jassim":"stand-alone model",
  "rsriram":"system model, porthole",
  "jmauro":"stand-alone model, system",
  "tay":"preliminary models, system",
  "octopusprime":"squid attack",
  "irinaa":"weapon forms",
  "jevans6":"puppet tentacle",
  "jlai321":"pneumatic tentacle",
  "yunzhi":"aesthetics",
  "drz":"pneumatic tentacle",
  "teamnemo":"control room",
  "cpoppe":"ballast challenge",
  "wdo":"pipe schematic",
  "nataliec":"control room",
  "emichael":"simulate pressure",
  "paulf":"water tank level",
  "artic-manatees":"identify and destroy!",
  "esummers":"specimen canister",
  "khaller":"specimen canister",
  "npwang":"watery screen",
  "hsiehj":"watery screen",
  "tsaih":"specimen bookshelf",
  "team_anonymous":"air duct puzzle",
  "ksungmin":"door",
  "sykim":"oxygen meter",
  "tatsuya":"the ducts",
  "yuzhan":"lighting"
}

