You don't change the current scope while creating an object literal, so this
isn't what you think it is.
Make an object instead:
function Player(id) {
this.id = id;
this.displayText = "<img src = 'http://3.bp.blogspot.com/-kAhN0HX-MBk/T_5bApfhbJI/AAAAAAAAAuI/lUww8xT9yV8/s1600/smileys_001_01.png'" +
"class='onTop' id='" + this.id + "' alt='you' border='0' />" +
"<div id = '" + this.id + "health' class = 'healthLost hide'></div>";
}
var p = new Player('foo');