<script type="text/javascript">
// 1. function switch Practice-Test
// 2. function perform rollDices
// 3. function perform selectFlags
// Definieer de variabelen
var btn-switch = document.getElementById('btn-sw-practice-test');
var btn-rolldices = document.getElementById('btn-throw-dices');
var flag01 = document.getElementById('claim-veld01');
var flag02 = document.getElementById('claim-veld02');
var flag03 = document.getElementById('claim-veld03');
var flag04 = document.getElementById('claim-veld04');
var flag05 = document.getElementById('claim-veld05');
var flag06 = document.getElementById('claim-veld06');
var flag07 = document.getElementById('claim-veld07');
var flag08 = document.getElementById('claim-veld08');
var flag09 = document.getElementById('claim-veld09');
var flag10 = document.getElementById('claim-veld10');
var flag11 = document.getElementById('claim-veld11');
var flag12 = document.getElementById('claim-veld12');
var flag13 = document.getElementById('claim-veld13');
var flag14 = document.getElementById('claim-veld14');
var flag15 = document.getElementById('claim-veld15');
var flag16 = document.getElementById('claim-veld16');
var flag17 = document.getElementById('claim-veld17');
var flag18 = document.getElementById('claim-veld18');
var flag19 = document.getElementById('claim-veld19');
var flag20 = document.getElementById('claim-veld20');
var flag21 = document.getElementById('claim-veld21');
var flag22 = document.getElementById('claim-veld22');
var flag23 = document.getElementById('claim-veld23');
var flag24 = document.getElementById('claim-veld24');
var flag25 = document.getElementById('claim-veld25');
var flag26 = document.getElementById('claim-veld26');
var flag27 = document.getElementById('claim-veld27');
var flag28 = document.getElementById('claim-veld28');
var flag29 = document.getElementById('claim-veld29');
var flag30 = document.getElementById('claim-veld30');
var flag31 = document.getElementById('claim-veld31');
var flag32 = document.getElementById('claim-veld32');
var flag33 = document.getElementById('claim-veld33');
var flag34 = document.getElementById('claim-veld34');
var flag35 = document.getElementById('claim-veld35');
var flag36 = document.getElementById('claim-veld36');
// 1. function test Practice-Test
function switchPracticeTest {
$echo 'Start switch Practice Test button.'
}
// 2. function rollDices()
function rollDices {
$echo 'Start switch roll Dices button.'
// red-dice = function rollDice()
// green-dice = function rollDice()
var element = document.querySelector('.dot1');
element.style.visibility = 'visible';
var element = document.querySelector('.dot1');
element.style.visibility = 'hidden';
var element = document.querySelector('.dot2a');
element.style.visibility = 'hidden';
var element = document.querySelector('.dot2b');
element.style.visibility = 'hidden';
var element = document.querySelector('.dot4a');
element.style.visibility = 'hidden';
var element = document.querySelector('.dot4b');
element.style.visibility = 'hidden';
var element = document.querySelector('.dot6a');
element.style.visibility = 'hidden';
var element = document.querySelector('.dot6b');
element.style.visibility = 'hidden';
var red-dice-value = rollDice();
// document.getElementById("red-dice").innerHTML = dice-value;
$echo 'Start red Dice value calculation.'
switch(red-dice-value) {
case 1:
var element = document.querySelector('.rd-dot1');
element.style.visibility = 'visible';
break;
case 2:
var element = document.querySelector('.rd-dot2a');
element.style.visibility = 'visible';
var element = document.querySelector('.rd-dot2b');
element.style.visibility = 'visible';
break;
case 3:
var element = document.querySelector('.rd-dot1');
element.style.visibility = 'visible';
var element = document.querySelector('.rd-dot2a');
element.style.visibility = 'visible';
var element = document.querySelector('.rd-dot2b');
element.style.visibility = 'visible';
break;
case 4:
var element = document.querySelector('.rd-dot2a');
element.style.visibility = 'visible';
var element = document.querySelector('.rd-dot2b');
element.style.visibility = 'visible';
var element = document.querySelector('.rd-dot4a');
element.style.visibility = 'visible';
var element = document.querySelector('.rd-dot4b');
element.style.visibility = 'visible';
break;
case 5:
var element = document.querySelector('.rd-dot1');
element.style.visibility = 'visible';
var element = document.querySelector('.rd-dot2a');
element.style.visibility = 'visible';
var element = document.querySelector('.rd-dot2b');
element.style.visibility = 'visible';
var element = document.querySelector('.rd-dot4a');
element.style.visibility = 'visible';
var element = document.querySelector('.rd-dot4b');
element.style.visibility = 'visible';
break;
case 6:
var element = document.querySelector('.rd-dot2a');
element.style.visibility = 'visible';
var element = document.querySelector('.rd-dot2b');
element.style.visibility = 'visible';
var element = document.querySelector('.rd-dot4a');
element.style.visibility = 'visible';
var element = document.querySelector('.rd-dot4b');
element.style.visibility = 'visible';
var element = document.querySelector('.rd-dot6a');
element.style.visibility = 'visible';
var element = document.querySelector('.rd-dotb');
element.style.visibility = 'visible';
break;
default:
$echo 'No red value calculated.'
break;
}
var green-dice-value = rollDice();
// document.getElementById("green-dice").innerHTML = dice-value;
$echo 'Start green Dice value calculation.'
switch(green-dice-value) {
case 1:
var element = document.querySelector('.gd-dot1');
element.style.visibility = 'visible';
break;
case 2:
var element = document.querySelector('.gd-dot2a');
element.style.visibility = 'visible';
var element = document.querySelector('.gd-dot2b');
element.style.visibility = 'visible';
break;
case 3:
var element = document.querySelector('.gd-dot1');
element.style.visibility = 'visible';
var element = document.querySelector('.gd-dot2a');
element.style.visibility = 'visible';
var element = document.querySelector('.gd-dot2b');
element.style.visibility = 'visible';
break;
case 4:
var element = document.querySelector('.gd-dot2a');
element.style.visibility = 'visible';
var element = document.querySelector('.gd-dot2b');
element.style.visibility = 'visible';
var element = document.querySelector('.gd-dot4a');
element.style.visibility = 'visible';
var element = document.querySelector('.gd-dot4b');
element.style.visibility = 'visible';
break;
case 5:
var element = document.querySelector('.gd-dot1');
element.style.visibility = 'visible';
var element = document.querySelector('.gd-dot2a');
element.style.visibility = 'visible';
var element = document.querySelector('.gd-dot2b');
element.style.visibility = 'visible';
var element = document.querySelector('.gd-dot4a');
element.style.visibility = 'visible';
var element = document.querySelector('.gd-dot4b');
element.style.visibility = 'visible';
break;
case 6:
var element = document.querySelector('.gd-dot2a');
element.style.visibility = 'visible';
var element = document.querySelector('.gd-dot2b');
element.style.visibility = 'visible';
var element = document.querySelector('.gd-dot4a');
element.style.visibility = 'visible';
var element = document.querySelector('.gd-dot4b');
element.style.visibility = 'visible';
var element = document.querySelector('.gd-dot6a');
element.style.visibility = 'visible';
var element = document.querySelector('.gd-dot6b');
element.style.visibility = 'visible';
break;
default:
$echo 'No green value calculated.'
break;
}
function rollDice{
$echo 'Start rollDice function.'
rolled-dice = Math.floor(Math.random() * 5) + 1;
$echo $rolled-dice
return rolled-dice;
}
</script>
<script src="/media/templates/site/cassiopeia/js/claimcontrol.js?..." ...