@Override
  protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.highscore_form);

    LM = 0;
    score = 0;

    if (getIntent().getExtras() != null) {
      LM = getIntent().getExtras().getInt("KEY_LM");
      score = getIntent().getExtras().getInt("KEY_SCORE");
    }

    db = new DatabaseHandler(this);
    readDataBaseContent();

    LL = (LinearLayout) findViewById(R.id.ll);
    LL.setBackgroundResource(R.drawable.chalkboard);

    Width = getBaseContext().getResources().getDisplayMetrics().widthPixels;
    Height = getBaseContext().getResources().getDisplayMetrics().heightPixels;

    newHigh = BitmapFactory.decodeResource(getResources(), R.drawable.newhigh);
    newHigh = ScaleBitmapW(newHigh, 800);

    proceed = BitmapFactory.decodeResource(getResources(), R.drawable.proceed);
    proceed = ScaleBitmapW(proceed, 400);

    title = new BitmapView(this, null);
    title.init(newHigh, getX(100), getY(50), false);
    LL.addView(title);

    etw = new EditTextView(this, null);
    etw.init(getX(500), getY(200), getX(250), getY(20));
    etw.setTextSize(getY(60));
    LL.addView(etw);

    proc = new BitmapView(this, null);
    proc.init(proceed, getX(300), getY(20), true);
    LL.addView(proc);

    proc.setOnClickListener(
        new View.OnClickListener() {
          public void onClick(View v) {

            addScore();
            finish();
          }
        });
  }
  protected void addScore() {

    String name = "Empty";
    int max;
    Highscore temp;

    if (HS[4 + LM].getScore() < score) {
      HS[4 + LM].setScore(score);
      if ((name = etw.getText().toString()) != "") HS[4 + LM].setName(name);
      else HS[4 + LM].setName("Empty");

      // Sort
      for (int i = LM; i < LM + 5; i++) {
        max = i;
        for (int j = i + 1; j < LM + 5; j++) {
          if (HS[max].getScore() < HS[j].getScore()) {
            max = j;
          }
        }
        temp = HS[i];
        HS[i] = HS[max];
        HS[max] = temp;
      }

      for (int i = 0; i < 20; i++) db.replaceHighscore(HS[i], i);
    }
  }