Translate From C# To JavaScript Please

Could someone please be very kind and translate this C# into JavaScript for me please

float curScore = 0f;
public float maxScore = 100f;  // The maximium 

public Texture2D whiteTexture;
public Texture2D greenTexture;

void OnGUI (){
    GUI.drawTexture( new Rect(0,0, 200, 20), whiteTexture );
    GUI.drawTexture( new Rect(0,0, 200 * (currentScore/maxScore) , 20), greenTexture );
}

// Resets the score to 0
public void resetScore(){
 currentScore = 0f;
}

// Increments the score by one unit
public void AddScore(){
 if (currentScore < maxScore)
     currentScore++;
}

How come you didnt ask me to do it ^^

var curScore:float = 0;
var maxScore:float = 100;  // The maximium 

var whiteTexture:Texture2D;
var greenTexture:Texture2D;

function OnGUI (){
    GUI.drawTexture( Rect(0,0, 200, 20), whiteTexture );
    GUI.drawTexture( Rect(0,0, 200 * (currentScore/maxScore) , 20), greenTexture );
}

// Resets the score to 0
function resetScore(){
 currentScore = 0;
}

// Increments the score by one unit
 function AddScore(){
 if (currentScore < maxScore)
     currentScore++;
}