/* create array for questions */

var questions = new Array();

/* check if any answers exist, if so append to current string */ questions[0] = 'I care about the well-being of the world in which I live. '

questions[1] = 'I have a social conscience. '

questions[2] = 'I want to be seen and I want my voice to be heard. '

questions[3] = 'I value my individuality; I like to stand out from the crowd. '

questions[4] = 'I do not make assumptions about individuals. '

questions[5] = 'I want to make a difference in the communities where I work.'

questions[6] = 'My personal values are not compromised by my work. '

questions[7] = 'I want a career that pushes all my strengths, including those I am not yet aware of. '

questions[8] = 'I already demonstrate leadership and team-building qualities. '

questions[9] = 'I want to work in an environment that is rich in diversity, where one day is never the same as the next. '

questions[10] = 'I am commercially minded and I enjoy the challenge of competitive business in delivering success. '

questions[11] = 'I work hard, I am performance driven, and I want my successes to be recognised. '

questions[12] = 'I want to work with people who are passionate about what they do. '

questions[13] = 'I know the importance of quality assurance in providing service value. '

questions[14] = 'I am not motivated by status.'


$(document).ready(function() {
	if($("#txtquestion").length) {
		$("#txtquestion").text(questions[0]);
	}
});

function ImgHover(sender, imgSrc) {
sender.src = imgSrc;
}

function answerques(ans)

{

/* check if any answers exist, if so append to current string */

if (document.getElementById('record').value == '') {

document.getElementById('record').value = ans;

}

else {

document.getElementById('record').value = document.getElementById('record').value + ',' + ans;

}

/* create an array of current answers from string */

var answers = new Array();

answers = document.getElementById('record').value.split(',');

/* check if all questions have been answered i.e. no of answers equal to number of questions */

if (answers.length >= questions.length) {

/* hide yes and no images */

document.getElementById('imgYes').style.display = 'none';

document.getElementById('imgNo').style.display = 'none';

/* set variable equal to true */

blnApply = true;

/* loop through answer array and check for no values */

for ( var i=0, len=answers.length; i<len; ++i ){

if (answers[i] == 'no'){

/* no value exists so set value equal to false */

blnApply = false;

}

}

/* check variable value if true display appropriate message and apply button if true */

if (blnApply == true){

document.getElementById('imgApply').style.display = 'inline';

document.getElementById('txtquestion').innerHTML= 'If you agreed with all of the statements, then you should easily fit into our culture and embrace our organisational values. We would like to hear from you!';

}

else {

document.getElementById('imgApply').style.display = 'none';

document.getElementById('txtquestion').innerHTML= 'If you disagreed with any of the statements then you may have difficulty embracing our culture and organisational values. You might want to consider whether we’re the right organisation for you.';

}

}

/* else display appropriate question and continue */

else {

document.getElementById('txtquestion').innerHTML= questions[answers.length];

}

}

