Event.observe(window, 'load', init, false);

var earned_points = 0;
var flirting_points_show = 0;
var kissing_points_show = 0;
var foreplay_points_show = 0;
var sex_points_show = 0;
var alert_points = 0;
function init() {
  
}

function increment_points(value) {
  earned_points += value;
  percentage = earned_points / $('max_points').value;
  $('progress').style.width = Math.floor(percentage * 594) + 'px';   
}


function flirting_points(value) {
  flirting_points_show += value;

}

function kissing_points(value) {
  kissing_points_show += value;

}


function foreplay_points(value) {
  foreplay_points_show += value;

}

function sex_points(value) {
  sex_points_show += value;

}

function alert_it(value){
alert_points += value;
}


function next_question(question_id) {

  if (question_id == 0) {
    $('description').style.display='none';
  }
  $('question'+ question_id).style.display='none';
  
  question_id++;
  if ($('question'+question_id)) {
    $('question'+question_id).style.display='block';
  } else {
    $('earned_points').value = earned_points;
$('flirting_end_points').value = flirting_points_show;
$('kissing_end_points').value = kissing_points_show;
$('foreplay_end_points').value = foreplay_points_show;
$('sex_end_points').value = sex_points_show;
    $('questions').submit();
  }
  
}