var x = 1;
var sum = 0;
  document.getElementById('end').style.display = 'none';
  document.getElementById('sum').style.display = 'none';
  document.getElementById('b').style.display = 'none';
if (x == 1) {
  document.getElementById('ask').src='image/1/ask.png'
  document.getElementById('image').src='image/1/1.png'
  document.getElementById('a1').src='image/1/a1.png'
  document.getElementById('a2').src='image/1/a2.png'
  document.getElementById('a3').src='image/1/a3.png'
  document.getElementById('a4').src='image/1/a4.png'

}


function n(number) {
x=x+1;
if(x == 2){
  document.getElementById('ask').src='image/2/ask.png'
  document.getElementById('image').src='image/2/1.png'
  document.getElementById('a1').src='image/2/a1.png'
  document.getElementById('a2').src='image/2/a2.png'
  document.getElementById('a3').src='image/2/a3.png'
  document.getElementById('a4').src='image/2/a4.png'
  if (number == 3) {
    sum++;
  }
}
if (x==3) {
  document.getElementById('ask').src='image/3/ask.png'
  document.getElementById('image').src='image/3/1.png'
  document.getElementById('a1').src='image/3/a1.png'
  document.getElementById('a2').src='image/3/a2.png'
  document.getElementById('a3').src='image/3/a3.png'
  document.getElementById('a4').src='image/3/a4.png'
  if (number == 1) {
    sum++;
  }
}
if (x==4) {
  document.getElementById('ask').src='image/4/ask.png'
  document.getElementById('image').src='image/4/1.png'
  document.getElementById('a1').src='image/4/a1.png'
  document.getElementById('a2').src='image/4/a2.png'
  document.getElementById('a3').src='image/4/a3.png'
  document.getElementById('a4').src='image/4/a4.png'
  if (number == 4) {
    sum++;
  }
}
if (x==5) {
  document.getElementById('ask').src='image/5/ask.png'
  document.getElementById('image').src='image/5/1.png'
  document.getElementById('a1').src='image/5/a1.png'
  document.getElementById('a2').src='image/5/a2.png'
  document.getElementById('a3').src='image/5/a3.png'
  document.getElementById('a4').src='image/5/a4.png'
  if (number == 3) {
    sum++;
  }
}
if (x==6) {
  if (number == 1) {
    sum++;
  }
  conclude();
}
}

function conclude() {
  document.getElementById('ask').src='image/sum/ask.png'
  document.getElementById('image').style.display = 'none';
  document.getElementById('a1').style.display = 'none';
  document.getElementById('a2').style.display = 'none';
  document.getElementById('a3').style.display = 'none';
  document.getElementById('a4').style.display = 'none';

    document.getElementById('end').style.display = 'inline';
    document.getElementById('sum').style.display = 'inline';
    document.getElementById('b').style.display = 'inline';
    document.getElementById('end').src='image/2.jpg'
  if (sum == 0) {
      document.getElementById('sum').src='image/sum/0.png'
  }
  if (sum == 1) {
      document.getElementById('sum').src='image/sum/1.png'
  }
  if (sum == 2) {
      document.getElementById('sum').src='image/sum/2.png'
  }
  if (sum == 3) {
      document.getElementById('sum').src='image/sum/3.png'
  }
  if (sum == 4) {
      document.getElementById('sum').src='image/sum/4.png'
  }
  if (sum == 5) {
      document.getElementById('sum').src='image/sum/5.png'
  }
}
