So hey, sorry if this is the wrong place for this, but I havent posted here in a while

.
Learing javascript in Uni and need help with this program;
The troubling bit is the bit in bold italics, about teamScore > highScore then highScore = teamName. I need this to save the best team name and then show them as the winner at the end, now the first if statement works and the > works, but the == does not work, when I have 2 teams and they have the same score, the two teams do not show up in the final alert, only the highScore and not highScore2. Can anyone help? The whole code is below (bit im talking about in bold and italics);
p.s I have been told to do notes, as my lecturer thinks its good practice and you can tell whats going on for a 3rd party (hopefully)
<html>
<script>
//Author: Ben Stokoe
//Date: 23/10/2009
//Purpose: A Prototype Competition Scoring System
var numberOfTeams = 0; //Number of teams in the tournament
var nameOfTeam = ""; ///Name of the team
var numberOfMatches = 0; //Number of matches each team has played
var wonLostDrawn = ""; //To enter won, lost or drawn for each match
var won = 0; //Counts the number of wins entered into wonLostDrawn
var lost = 0; //Counts the number of loses entered into wonLostDrawn
var drawn = 0; //Counts the number of draws entered into wonLostDrawn
var error = 0; //Counts the number of errors input into wonLostDrawn
var teamScore = 0; //Works out the score for the team by adding 4 for win, 2 for draw and -1 for loss
var totalScore = 0; //Adds all team scores together to get a total score for all the teams
var averageScore = 0; //Works out the average score for a team (totalScore / numberOfTeams)
var highScore = ""; //Keeps the name of the highest scoring team in the competition so far
var highScore2 = ""; //Keeps the name of the second highest scoring team if it equals the score of the previous high score
//Prompt for user to enter number of teams
numberOfTeams = eval(prompt("Enter number of teams in the tournament"));
//For loop for number of teams in tournament and will run for loop inside for matches
for (var teams = 1; teams <= numberOfTeams; teams = teams + 1)
{
//Prompt for user to enter name of team
nameOfTeam = prompt("Please enter the name of the team");
//Prompt for user to enter the amount of games team has played
numberOfMatches = eval(prompt("Please enter the number of matches the team has played"));
//For loop to get user to enter won, lost or drawn for each match played
for (var matches = 1; matches <= numberOfMatches; matches = matches + 1)
{
//Prompt to get user to enter win, lost or drawn for each game
wonLostDrawn = prompt("Please enter won, lost or drawn for each game played");
//IF statement to add add how many won, lost or drawn
if ((wonLostDrawn == "won") || (wonLostDrawn == "Won"))
{
won = (won + 1); //If enter won add 1 to total games won
teamScore = (teamScore + 4); //Total score is increased by 4 (for win)
} else if ((wonLostDrawn == "lost") || (wonLostDrawn == "Lost"))
{
lost = (lost + 1); //If enter lost add 1 to total games lost]
teamScore = (teamScore - 1); //Total score is decreased by 1 (for loss)
} else if ((wonLostDrawn == "drawn") || (wonLostDrawn == "Drawn"))
{
drawn = (drawn + 1); //If enter drawn add 1 to total games drawn
teamScore = (teamScore + 2); //Total score is increased by 2 (for drawn)
} else //If neither won, lost or drawn is entered error message is displayed
{
error = (error + 1); //Adds 1 to amount of errors
alert("This is not a valid selection, only enter won, lost or drawn"); //Alerts user of error if won, lost or drawn isnt entered
}
}
//Add the team score to the total score for all teams for average score later on
totalScore = (totalScore + teamScore);
//Alert to display team name, numer of games they won, lost or drew, th number of errors input, total games played and total scored
alert("Team name " + nameOfTeam
+ "\nNumber of games won " + won
+ "\nNumber of games lost " + lost
+ "\nNumber of games drawn " + drawn
+ "\nNumber of errors input " + error
+ "\nTotal team score " + teamScore
+ "\nTotal games played " + numberOfMatches
+ "\nTotal score " + totalScore);
//If statement to save the team name with the highest score, or if the same score save to second high score variable
if (teamScore > highScore)
{
highScore = nameOfTeam;
} else if (teamScore == highScore)
{
highScore2 = nameOfTeam;
}//Equal won, lost and drawn to 0 for next team (so number of wins / loses or draws does not carry on from last team)
won = 0;
lost = 0;
drawn = 0;
//Team score equal to 0 so team score for 1 team does not roll on to next
teamScore = 0;
}
//Work out average score achieved by a team for alert below
averageScore = (totalScore / numberOfTeams);
//Display number of teams, average score acheived by a team and team with highest score
alert("Number of teams in the tournament " + numberOfTeams
+ "\nAverage score achieved by a team in the tournament " + averageScore
+ "\nTeam(s) with highest score " + highScore + " and " + highScore2);
</script>
</html>