var lastClicked = "none"

function setBackground(type){
	colorFade(type,"background","FFFFFF","FFFFE0",25,10);
	if (lastClicked != "none" || lastClicked == type) {
			colorFade(lastClicked,"background","FFFFE0","FFFFFF",25,10);
		}
	lastClicked = type;
}

function selectQuestion(type) {
	
	var sort = "Any type of injury you have suffered in the last three years can lead to a successful compensation claim. It could be an accident at work or at leisure, as a driver, passenger, pedestrian, or a trip, slip or fall or you may have developed an industrial disease.";
	var how = "All you need to do is provide us your details and we will do the rest. All cases are taken on with the very best specialist solicitors. ";
	var when = "If your accident happened in the last three years then we can still help you, but don't delay any longer. ";
	var cost = "No. With the our unique compensation policy it will not cost you any money to make a claim. <p> Please note all claims made under the Criminal injuries Compensation scheme do not provide for your legal fees to be paid, therefore a percentage charge of any sum successfully awarded to you will be applied.";
	var lose = "All cases are taken on by us on a cost free basis. This means that if the case is lost, you won't pay a penny.";
	
	switch(type) {

	case 'sort': 
		document.getElementById('question-box').innerHTML = sort;
		document.getElementById(type).style.backgroundColor = "#F2F5A9";
		setBackground(type);
		break;
	
	case 'how':
		document.getElementById('question-box').innerHTML = how;
		document.getElementById(type).style.backgroundColor = "#F2F5A9";
		setBackground(type);
		break;
	
	case 'when':
		document.getElementById('question-box').innerHTML = when;
		document.getElementById(type).style.backgroundColor = "#F2F5A9";
		setBackground(type);
		break;
		
	case 'cost':
		document.getElementById('question-box').innerHTML = cost;
		document.getElementById(type).style.backgroundColor = "#F2F5A9";
		setBackground(type);
		break;
		
	case 'lose':
		document.getElementById('question-box').innerHTML = lose;
		document.getElementById(type).style.backgroundColor = "#F2F5A9";
		setBackground(type);
		break;

	}
}
