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


var double_dong = 0;


var dildo = 0;
var rabbit = 0;
var bullet = 0;
var cockring = 0;
var cockring_with_clit_stim = 0;
var penis_sleeve = 0;
var clit_stim = 0;
var gspot_stim = 0;
var strap_on_dildo = 0;
var double_penetrator = 0;
var butt_plug = 0;
var anal_beads = 0;
var penile_pump = 0;
var nipple_clamps = 0;
var bondage_toys = 0;
var costumes = 0;
var sex_swing = 0;
var mens_masturbator = 0;
var penis_extension = 0;

function init() {
  
}



function double_dong_points33(value) {
  }

function double_dong3(value) {
  double_dong += value;
  double_dong_percentage = double_dong / $('max_points').value;

bar = Math.floor(double_dong_percentage * 103); 

if(bar <= 0){
$('double_dong_progress').style.height = 0 + 'px';
} else {

  $('double_dong_progress').style.height = bar + 'px';
}


}

function dildo3(value) {
  dildo += value;
  dildo_percentage = dildo / $('max_points').value;
 
bar = Math.floor(dildo_percentage * 103); 

if(bar <= 0){
$('dildo_progress').style.height = 0 + 'px';
} else {

  $('dildo_progress').style.height = bar + 'px';
}
; 

}


function rabbit3(value) {
  rabbit += value;
  rabbit_percentage = dildo / $('max_points').value;


bar = Math.floor(rabbit_percentage * 103); 

if(bar <= 0){
$('rabbit_progress').style.height = 0 + 'px';
} else {

  $('rabbit_progress').style.height = bar + 'px';
}


}




function bullet3(value) {
  bullet += value;
  bullet_percentage = bullet / $('max_points').value;


bar = Math.floor(bullet_percentage * 103); 

if(bar <= 0){
$('bullet_progress').style.height = 0 + 'px';
} else {

  $('bullet_progress').style.height = bar + 'px';
}

}

function cockring3(value) {
  cockring += value;
  cockring_percentage = cockring / $('max_points').value;


bar = Math.floor(cockring_percentage * 103); 

if(bar <= 0){
$('cockring_progress').style.height = 0 + 'px';
} else {

  $('cockring_progress').style.height = bar + 'px';
}

}

function cockring_with_clit_stim3(value) {
  cockring_with_clit_stim += value;
  cockring_with_clit_stim_percentage = cockring_with_clit_stim / $('max_points').value;
  
bar = Math.floor(cockring_with_clit_stim_percentage * 103); 

if(bar <= 0){
$('cockring_with_clit_stim_progress').style.height = 0 + 'px';
} else {

  $('cockring_with_clit_stim_progress').style.height = bar + 'px';
}


}

function penis_sleeve3(value) {
  penis_sleeve += value;
  penis_sleeve_percentage = penis_sleeve / $('max_points').value;

bar = Math.floor(penis_sleeve_percentage * 103); 

if(bar <= 0){
$('penis_sleeve_progress').style.height = 0 + 'px';
} else {

  $('penis_sleeve_progress').style.height = bar + 'px';
}


}

function clit_stim3(value) {
  clit_stim += value;
  clit_stim_percentage = clit_stim / $('max_points').value;


bar = Math.floor(clit_stim_percentage * 103); 

if(bar <= 0){
$('clit_stim_progress').style.height = 0 + 'px';
} else {

  $('clit_stim_progress').style.height = bar + 'px';
}

}

function gspot_stim3(value) {
  gspot_stim += value;
  gspot_stim_percentage = gspot_stim / $('max_points').value;

  
bar = Math.floor(gspot_stim_percentage * 103); 

if(bar <= 0){
$('gspot_stim_progress').style.height = 0 + 'px';
} else {

  $('gspot_stim_progress').style.height = bar + 'px';
}


}

function strap_on_dildo3(value) {
  strap_on_dildo += value;
  strap_on_dildo_percentage = strap_on_dildo / $('max_points').value;

bar = Math.floor(strap_on_dildo_percentage * 103); 

if(bar <= 0){
$('strap_on_dildo_progress').style.height = 0 + 'px';
} else {

  $('strap_on_dildo_progress').style.height = bar + 'px';
}
}

function double_penetrator3(value) {
  double_penetrator += value;
  double_penetrator_percentage = double_penetrator / $('max_points').value;
bar = Math.floor(double_penetrator_percentage * 103); 

if(bar <= 0){
$('double_penetrator_progress').style.height = 0 + 'px';
} else {

  $('double_penetrator_progress').style.height = bar + 'px';
}


}

function butt_plug3(value) {
  butt_plug += value;
  butt_plug_percentage = butt_plug / $('max_points').value;


bar = Math.floor(butt_plug_percentage * 103); 

if(bar <= 0){
$('butt_plug_progress').style.height = 0 + 'px';
} else {

  $('butt_plug_progress').style.height = bar + 'px';
}
 

}

function anal_beads3(value) {
  anal_beads += value;
  anal_beads_percentage = anal_beads / $('max_points').value;


bar = Math.floor(anal_beads_percentage * 103); 

if(bar <= 0){
$('anal_beads_progress').style.height = 0 + 'px';
} else {

  $('anal_beads_progress').style.height = bar + 'px';
}

}

function penile_pump3(value) {
  penile_pump += value;
  penile_pump_percentage = penile_pump / $('max_points').value;

  
bar = Math.floor(penile_pump_percentage * 103); 

if(bar <= 0){
$('penile_pump_progress').style.height = 0 + 'px';
} else {

  $('penile_pump_progress').style.height = bar + 'px';
}


}


function nipple_clamps3(value) {
  nipple_clamps += value;
  nipple_clamps_percentage = nipple_clamps / $('max_points').value;
bar = Math.floor(nipple_clamps_percentage * 103); 

if(bar <= 0){
$('nipple_clamps_progress').style.height = 0 + 'px';
} else {

  $('nipple_clamps_progress').style.height = bar + 'px';
}
 

}

function bondage_toys3(value) {
  bondage_toys += value;
  bondage_toys_percentage = bondage_toys / $('max_points').value;


bar = Math.floor(bondage_toys_percentage * 103); 

if(bar <= 0){
$('bondage_toys_progress').style.height = 0 + 'px';
} else {

  $('bondage_toys_progress').style.height = bar + 'px';
}




}
function costumes3(value) {
  costumes += value;
  costumes_percentage = costumes / $('max_points').value;


bar = Math.floor(costumes_percentage * 103); 

if(bar <= 0){
$('costumes_progress').style.height = 0 + 'px';
} else {

  $('costumes_progress').style.height = bar + 'px';
}


}
function sex_swing3(value) {
  sex_swing += value;
  sex_swing_percentage = sex_swing / $('max_points').value;


bar = Math.floor(sex_swing_percentage * 103); 

if(bar <= 0){
$('sex_swing_progress').style.height = 0 + 'px';
} else {

  $('sex_swing_progress').style.height = bar + 'px';
}


}
function mens_masturbator3(value) {
  mens_masturbator += value;
  mens_masturbator_percentage = mens_masturbator / $('max_points').value;


bar = Math.floor(mens_masturbator_percentage * 103); 

if(bar <= 0){
$('mens_masturbator_progress').style.height = 0 + 'px';
} else {

  $('mens_masturbator_progress').style.height = bar + 'px';
}


}
function penis_extension3(value) {
  penis_extension += value;
  penis_extension_percentage = penis_extension / $('max_points').value;

bar = Math.floor(penis_extension_percentage * 103); 

if(bar <= 0){
$('penis_extension_progress').style.height = 0 + 'px';
} else {

  $('penis_extension_progress').style.height = bar + 'px';
}


}






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 {

 $('dildo').value = dildo;
 $('rabbit').value = rabbit;
 $('bullet').value = bullet;
 $('cockring').value = cockring;
 $('cockring_with_clit_stim').value = cockring_with_clit_stim;
 $('penis_sleeve').value = penis_sleeve;
 $('clit_stim').value = clit_stim;
 $('gspot_stim').value = gspot_stim;
 $('strap_on_dildo').value = strap_on_dildo;
 $('double_penetrator').value = double_penetrator;
 $('butt_plug').value = butt_plug;
 $('anal_beads').value = anal_beads;
 $('penile_pump').value = penile_pump;
 $('double_dong').value = double_dong;
 $('nipple_clamps').value = nipple_clamps;
 $('bondage_toys').value = bondage_toys;
 $('costumes').value = costumes;
 $('sex_swing').value = sex_swing;
 $('mens_masturbator').value = mens_masturbator;
 $('penis_extension').value = penis_extension;


    $('questions').submit();
  }
  
}
