var _claimCalc = new Object;
var _claimCalc_flash;

_claimCalc['bodyAreas'] = new Object;
_claimCalc['flashView'] = 'front';

// ________ DEFINITIONS

	_claimCalc['bodyAreas']['Spine'] = new Object;
	_claimCalc['bodyAreas']['Spine']['Spine Damage'] = new Object;
	_claimCalc['bodyAreas']['Spine']['Spine Damage']['Quadriplegia'] = 'from £175,000 up to £220,000';
	_claimCalc['bodyAreas']['Spine']['Spine Damage']['Paraplegia'] = 'from £120,000 up to £155,000';	
	
	_claimCalc['bodyAreas']['Head'] = new Object;
	_claimCalc['bodyAreas']['Head']['Brain Damage'] = new Object;
	_claimCalc['bodyAreas']['Head']['Brain Damage']['Very Severe'] = 'from £155,000 up to £220,000';
	_claimCalc['bodyAreas']['Head']['Brain Damage']['Moderately Severe'] = 'from £120,000 up to £155,000';
	_claimCalc['bodyAreas']['Head']['Brain Damage']['Moderate'] = 'from £23,500 up to £120,000';
	_claimCalc['bodyAreas']['Head']['Brain Damage']['Minor'] = 'from £8,500 up to £23,500';
	_claimCalc['bodyAreas']['Head']['Brain Damage']['Minor Head Injury'] = 'from £1,250 up to £7,000';
	
	_claimCalc['bodyAreas']['Head']['Epilepsy'] = new Object;
	_claimCalc['bodyAreas']['Head']['Epilepsy']['Established Grand Mal'] = 'from £55,000 up to £82,000';
	_claimCalc['bodyAreas']['Head']['Epilepsy']['Established Petit Mal'] = 'from £30,000 up to £71,500';
	_claimCalc['bodyAreas']['Head']['Epilepsy']['Other Epileptic Conditions'] = 'from £5,750 up to £14,250';
	
	_claimCalc['bodyAreas']['Head']['Psychiatric Damage'] = new Object;
	_claimCalc['bodyAreas']['Head']['Psychiatric Damage']['Severe Damage'] = 'from £30,000 up to £63,000';
	_claimCalc['bodyAreas']['Head']['Psychiatric Damage']['Moderately Severe Damage'] = 'from £10,500 up to £30,000';
	_claimCalc['bodyAreas']['Head']['Psychiatric Damage']['Moderate Damage'] = 'from £3,250 up to £10,500';
	_claimCalc['bodyAreas']['Head']['Psychiatric Damage']['Minor Damage'] = 'from £800 up to £3,250';
	
	_claimCalc['bodyAreas']['Head']['Post-Traumatic Stress Disorder'] = new Object;
	_claimCalc['bodyAreas']['Head']['Post-Traumatic Stress Disorder']['Severe'] = 'from £34,000 up to £55,000';
	_claimCalc['bodyAreas']['Head']['Post-Traumatic Stress Disorder']['Moderately Severe'] = 'from £12,500 up to £31,750';
	_claimCalc['bodyAreas']['Head']['Post-Traumatic Stress Disorder']['Moderate'] = 'from £4,500 up to £12,500';
	_claimCalc['bodyAreas']['Head']['Post-Traumatic Stress Disorder']['Minor'] = 'from £2,150 up to £4,500';
	
	_claimCalc['bodyAreas']['Head']['Chronic Pain Syndrome'] = new Object;
	_claimCalc['bodyAreas']['Head']['Chronic Pain Syndrome']['Severe'] = 'from £23,000 up to £35,000';
	_claimCalc['bodyAreas']['Head']['Chronic Pain Syndrome']['Moderate'] = 'from £6,000 up to £18,000';
	
	_claimCalc['bodyAreas']['Head']['Fibromyalgia'] = new Object;
	_claimCalc['bodyAreas']['Head']['Fibromyalgia']['Fibromyalgia'] = 'from £19,000 up to £35,000';
	
	_claimCalc['bodyAreas']['Head']['Chronic Fatigue Syndrome'] = new Object;
	_claimCalc['bodyAreas']['Head']['Chronic Fatigue Syndrome']['Chronic Fatigue Syndrome'] = 'up to £27,500';
	
	_claimCalc['bodyAreas']['Head']['Reflex Sympathetic Dystrophy'] = new Object;
	_claimCalc['bodyAreas']['Head']['Reflex Sympathetic Dystrophy']['Severe'] = 'from £28,000 up to £55,000';
	_claimCalc['bodyAreas']['Head']['Reflex Sympathetic Dystrophy']['Moderate'] = 'from £14,000 up to £21,000';
	
	_claimCalc['bodyAreas']['Head']['Somatoform Disorder'] = new Object;
	_claimCalc['bodyAreas']['Head']['Somatoform Disorder']['Somatoform Disorder'] = 'up to £25,000';
	
	_claimCalc['bodyAreas']['Head']['Eyesight'] = new Object;
	_claimCalc['bodyAreas']['Head']['Eyesight']['Total blindness and deafness'] = 'up to £220,000';
	_claimCalc['bodyAreas']['Head']['Eyesight']['Total blindness'] = 'up to £147,500';
	_claimCalc['bodyAreas']['Head']['Eyesight']['Total loss of one eye, reduced vision in other'] = 'from £35,000 up to £98,000';
	_claimCalc['bodyAreas']['Head']['Eyesight']['Total loss of one eye'] = 'from £30,000 up to £36,000';
	_claimCalc['bodyAreas']['Head']['Eyesight']['Complete loss of sight in one eye'] = 'from £27,000 up to £30,000';
	_claimCalc['bodyAreas']['Head']['Eyesight']['Serious but incomplete loss of vision in one eye'] = 'from £13,000 up to £21,000';
	_claimCalc['bodyAreas']['Head']['Eyesight']['Minor but permanent impairment of vision in one eye'] = 'from £6,750 up to £11,500';
	_claimCalc['bodyAreas']['Head']['Eyesight']['Minor Eye Injuries'] = 'from £2,150 up to £4,750';
	_claimCalc['bodyAreas']['Head']['Eyesight']['Transient Eye Injuries'] = 'from £1,250 up to £2,150';
	
	_claimCalc['bodyAreas']['Head']['Deafness'] = new Object;
	_claimCalc['bodyAreas']['Head']['Deafness']['Total deafness and blindness'] = 'up to £220,000';
	_claimCalc['bodyAreas']['Head']['Deafness']['Total deafness and loss of speech'] = 'from £60,000 up to £77,000';
	_claimCalc['bodyAreas']['Head']['Deafness']['Total deafness'] = 'from £50,000 up to £60,000';
	_claimCalc['bodyAreas']['Head']['Deafness']['Total loss of hearing in one ear'] = 'from £17,500 up to £25,000';
	_claimCalc['bodyAreas']['Head']['Deafness']['Partial hearing loss / tinnitus – Severe'] = 'from £16,000 up to £25,000';
	_claimCalc['bodyAreas']['Head']['Deafness']['Partial hearing loss / tinnitus - Moderate'] = 'from £8,000 up to £16,000';
	_claimCalc['bodyAreas']['Head']['Deafness']['Mild with some hearing loss'] = 'from £6,750 up to £8,000';
	_claimCalc['bodyAreas']['Head']['Deafness']['Slight or occasional tinnitus with slight hearing loss'] = 'from £4,000 up to £6,750';
	
	_claimCalc['bodyAreas']['Head']['Taste and Smell'] = new Object;
	_claimCalc['bodyAreas']['Head']['Taste and Smell']['Total loss of Taste and Smell'] = 'up to £21,500';
	_claimCalc['bodyAreas']['Head']['Taste and Smell']['Total loss of smell and significant loss of taste'] = 'from £18,000 up to £21,500';
	_claimCalc['bodyAreas']['Head']['Taste and Smell']['Loss of Smell'] = 'from £13,500 up to £18,000';
	_claimCalc['bodyAreas']['Head']['Taste and Smell']['Loss of Taste'] = 'from £10,500 up to £13,500';
	
	_claimCalc['bodyAreas']['Internal'] = new Object;
	_claimCalc['bodyAreas']['Internal']['Internal Organs'] = new Object;
	_claimCalc['bodyAreas']['Internal']['Internal Organs']['Chest Injuries'] = 'from £1,250 up to £82,000';
	_claimCalc['bodyAreas']['Internal']['Internal Organs']['Lung Disease'] = 'from £1,250 up to £72,500';
	_claimCalc['bodyAreas']['Internal']['Internal Organs']['Asbestos Related Disease'] = 'from £5,000 up to £70,000';
	_claimCalc['bodyAreas']['Internal']['Internal Organs']['Asthma'] = 'from £2,750 up to £36,000';
	_claimCalc['bodyAreas']['Internal']['Internal Organs']['Impotence (male)'] = 'from £3,500 up to £80,000';
	_claimCalc['bodyAreas']['Internal']['Internal Organs']['Infertility (female)'] = 'from £3,500 up to £93,000';
	_claimCalc['bodyAreas']['Internal']['Internal Organs']['Digestive System'] = 'from £500 up to £34,000';
	_claimCalc['bodyAreas']['Internal']['Internal Organs']['Kidney'] = 'from £17,000 up to £115,000';
	_claimCalc['bodyAreas']['Internal']['Internal Organs']['Bowels'] = 'from £6,750 up to £82,000';
	_claimCalc['bodyAreas']['Internal']['Internal Organs']['Bladder'] = 'from £13,000 up to £77,000';
	_claimCalc['bodyAreas']['Internal']['Internal Organs']['Spleen'] = 'from £2,250 up to £14,500';
	_claimCalc['bodyAreas']['Internal']['Internal Organs']['Hernia'] = 'from £1,850 up to £13,250';
	
	_claimCalc['bodyAreas']['Neck'] = new Object;
	_claimCalc['bodyAreas']['Neck']['Neck Injuries'] = new Object;
	_claimCalc['bodyAreas']['Neck']['Neck Injuries']['Severe'] = 'from £12,500 up to £82,000';
	_claimCalc['bodyAreas']['Neck']['Neck Injuries']['Moderate'] = 'from £4,250 up to £13,750';
	_claimCalc['bodyAreas']['Neck']['Neck Injuries']['Minor'] = 'from £750 up to £4,250';
	
	_claimCalc['bodyAreas']['Back'] = new Object;
	_claimCalc['bodyAreas']['Back']['Back Injuries'] = new Object;
	_claimCalc['bodyAreas']['Back']['Back Injuries']['Severe'] = 'from £21,500 up to £93,000';
	_claimCalc['bodyAreas']['Back']['Back Injuries']['Moderate'] = 'from £6,750 up to £21,500';
	_claimCalc['bodyAreas']['Back']['Back Injuries']['Minor'] = 'up to £7,500';
	_claimCalc['bodyAreas']['Back']['Spine Damage'] = new Object;
	_claimCalc['bodyAreas']['Back']['Spine Damage']['Quadriplegia'] = 'from £175,000 up to £220,000';
	_claimCalc['bodyAreas']['Back']['Spine Damage']['Paraplegia'] = 'from £120,000 up to £155,000';
	
	_claimCalc['bodyAreas']['Shoulder'] = new Object;
	_claimCalc['bodyAreas']['Shoulder']['Shoulder Injuries'] = new Object;
	_claimCalc['bodyAreas']['Shoulder']['Shoulder Injuries']['Severe'] = 'from £10,500 up to £26,500';
	_claimCalc['bodyAreas']['Shoulder']['Shoulder Injuries']['Serious'] = 'from £6,750 up to £10,500';
	_claimCalc['bodyAreas']['Shoulder']['Shoulder Injuries']['Moderate'] = 'from £4,250 up to £7,000';
	_claimCalc['bodyAreas']['Shoulder']['Shoulder Injuries']['Minor'] = 'up to £4,500';
	_claimCalc['bodyAreas']['Shoulder']['Shoulder Injuries']['Fracture of Clavicle'] = 'from £2,750 up to £6,500';
	
	_claimCalc['bodyAreas']['Pelvis and Hip'] = new Object;
	_claimCalc['bodyAreas']['Pelvis and Hip']['Pelvis and Hips'] = new Object;
	_claimCalc['bodyAreas']['Pelvis and Hip']['Pelvis and Hips']['Severe'] = 'from £21,500 up to £71,500';
	_claimCalc['bodyAreas']['Pelvis and Hip']['Pelvis and Hips']['Moderate'] = 'from £14,750 up to £21,500';
	_claimCalc['bodyAreas']['Pelvis and Hip']['Pelvis and Hips']['Injuries of Limited Severity'] = 'from £6,750 up to £14,750';
	_claimCalc['bodyAreas']['Pelvis and Hip']['Pelvis and Hips']['Lesser Injuries'] = 'up to £7,000';
	
	_claimCalc['bodyAreas']['Arm'] = new Object;
	_claimCalc['bodyAreas']['Arm']['Arm Injuries'] = new Object;
	_claimCalc['bodyAreas']['Arm']['Arm Injuries']['Amputation - Both Arms'] = 'from £132,500 up to £165,000';
	_claimCalc['bodyAreas']['Arm']['Arm Injuries']['Amputation - One Arm'] = 'from £52,500 up to £75,000';
	_claimCalc['bodyAreas']['Arm']['Arm Injuries']['Other Arm Injuries'] = 'from £3,500 up to £71,500';
	_claimCalc['bodyAreas']['Arm']['Arm Injuries']['Injuries to the Elbow'] = 'up to £30,000';
	_claimCalc['bodyAreas']['Arm']['Arm Injuries']['Wrist Injuries'] = 'up to £33,000';
	_claimCalc['bodyAreas']['Arm']['Hand Injuries'] = new Object;
	_claimCalc['bodyAreas']['Arm']['Hand Injuries']['Loss of both hands to amputation of finger / fingers'] = 'from £34,000 up to £110,000';
	_claimCalc['bodyAreas']['Arm']['Hand Injuries']['Serious Hand Injuries'] = 'from £8,000 up to £34,000';
	_claimCalc['bodyAreas']['Arm']['Hand Injuries']['Moderate'] = 'from £3,500 up to £7,250';
	_claimCalc['bodyAreas']['Arm']['Hand Injuries']['Minor'] = 'from £500 up to £2,250';
	_claimCalc['bodyAreas']['Arm']['Hand Injuries']['Injuries to finger/s'] = 'up to £13,500';
	_claimCalc['bodyAreas']['Arm']['Hand Injuries']['Injuries to thumb'] = 'up to £30,000';
	_claimCalc['bodyAreas']['Arm']['Vibration White Finger and/or Hand-Arm Vibration Syndrome'] = new Object;
	_claimCalc['bodyAreas']['Arm']['Vibration White Finger and/or Hand-Arm Vibration Syndrome']['Serious'] = 'from £9,250 up to £21,000';
	_claimCalc['bodyAreas']['Arm']['Vibration White Finger and/or Hand-Arm Vibration Syndrome']['Moderate'] = 'from £4,750 up to £9,250';
	_claimCalc['bodyAreas']['Arm']['Vibration White Finger and/or Hand-Arm Vibration Syndrome']['Minor'] = 'from £1,500 up to £4,750';
	_claimCalc['bodyAreas']['Arm']['Work Related Upper Limb Disorders'] = new Object;
	_claimCalc['bodyAreas']['Arm']['Work Related Upper Limb Disorders']['Work Related Upper Limb Disorders'] = 'from £1,250 up to £12,500';
	
	_claimCalc['bodyAreas']['Leg'] = new Object;
	_claimCalc['bodyAreas']['Leg']['Leg Injuries'] = new Object;
	_claimCalc['bodyAreas']['Leg']['Leg Injuries']['Amputations'] = 'from £50,000 up to £74,000';
	_claimCalc['bodyAreas']['Leg']['Leg Injuries']['Severe Leg Injuries'] = 'from £15,250 up to £74,000';
	_claimCalc['bodyAreas']['Leg']['Leg Injuries']['Less Serious Leg Injuries'] = 'up to £15,250';
	_claimCalc['bodyAreas']['Leg']['Knee Injuries'] = new Object;
	_claimCalc['bodyAreas']['Leg']['Knee Injuries']['Severe'] = 'from £14,750 up to £52,500';
	_claimCalc['bodyAreas']['Leg']['Knee Injuries']['Moderate'] = 'up to £14,750';
	_claimCalc['bodyAreas']['Leg']['Ankle Injuries'] = new Object;
	_claimCalc['bodyAreas']['Leg']['Ankle Injuries']['Severe'] = 'from £17,500 up to £38,000';
	_claimCalc['bodyAreas']['Leg']['Ankle Injuries']['Moderate'] = 'up to £14,750';
	_claimCalc['bodyAreas']['Leg']['Foot Injuries'] = new Object;
	_claimCalc['bodyAreas']['Leg']['Foot Injuries']['Amputation of both feet'] = 'from £93,000 up to £110,000';
	_claimCalc['bodyAreas']['Leg']['Foot Injuries']['Amputation of one foot'] = 'from £46,000 up to £60,000';
	_claimCalc['bodyAreas']['Leg']['Foot Injuries']['Severe Injury'] = 'from £13,750 up to £60,000';
	_claimCalc['bodyAreas']['Leg']['Foot Injuries']['Moderate'] = 'from £7,500 up to £13,750';
	_claimCalc['bodyAreas']['Leg']['Foot Injuries']['Modest'] = 'up to £7,500';
	_claimCalc['bodyAreas']['Leg']['Toe Injuries'] = new Object;
	_claimCalc['bodyAreas']['Leg']['Toe Injuries']['Amputation of all toes'] = 'from £20,000 up to £31,000';
	_claimCalc['bodyAreas']['Leg']['Toe Injuries']['Amputation of the big toe'] = 'up to £17,500';
	_claimCalc['bodyAreas']['Leg']['Toe Injuries']['Severe Toe Injuries'] = 'from £5,250 up to £10,500';
	_claimCalc['bodyAreas']['Leg']['Toe Injuries']['Moderate'] = 'up to £5,250';
	
	_claimCalc['bodyAreas']['Foot'] = new Object;
	_claimCalc['bodyAreas']['Foot']['Foot Injuries'] = new Object;
	_claimCalc['bodyAreas']['Foot']['Foot Injuries']['Amputation of both feet'] = 'from £93,000 up to £110,000';
	_claimCalc['bodyAreas']['Foot']['Foot Injuries']['Amputation of one foot'] = 'from £46,000 up to £60,000';
	_claimCalc['bodyAreas']['Foot']['Foot Injuries']['Severe Injury'] = 'from £13,750 up to £60,000';
	_claimCalc['bodyAreas']['Foot']['Foot Injuries']['Moderate'] = 'from £7,500 up to £13,750';
	_claimCalc['bodyAreas']['Foot']['Foot Injuries']['Modest'] = 'up to £7,500';
	_claimCalc['bodyAreas']['Foot']['Toe Injuries'] = new Object;
	_claimCalc['bodyAreas']['Foot']['Toe Injuries']['Amputation of all toes'] = 'from £20,000 up to £31,000';
	_claimCalc['bodyAreas']['Foot']['Toe Injuries']['Amputation of the big toe'] = 'up to £17,500';
	_claimCalc['bodyAreas']['Foot']['Toe Injuries']['Severe Toe Injuries'] = 'from £5,250 up to £10,500';
	_claimCalc['bodyAreas']['Foot']['Toe Injuries']['Moderate'] = 'up to £5,250';
	
	_claimCalc['bodyAreas']['Toe'] = new Object;
	_claimCalc['bodyAreas']['Toe']['Toe Injuries'] = new Object;
	_claimCalc['bodyAreas']['Toe']['Toe Injuries']['Amputation of all toes'] = 'from £20,000 up to £31,000';
	_claimCalc['bodyAreas']['Toe']['Toe Injuries']['Amputation of the big toe'] = 'up to £17,500';
	_claimCalc['bodyAreas']['Toe']['Toe Injuries']['Severe Toe Injuries'] = 'from £5,250 up to £10,500';
	_claimCalc['bodyAreas']['Toe']['Toe Injuries']['Moderate'] = 'up to £5,250';
	
	_claimCalc['bodyAreas']['Face'] = new Object;
	_claimCalc['bodyAreas']['Face']['Skeletal Injuries'] = new Object;
	_claimCalc['bodyAreas']['Face']['Skeletal Injuries']['Le Fort Fractures of Frontal Facial Bones'] = 'from £13,500 up to £20,000';
	_claimCalc['bodyAreas']['Face']['Skeletal Injuries']['Multiple Fractures of Facial Bones'] = 'from £8,000 up to £13,250';
	_claimCalc['bodyAreas']['Face']['Skeletal Injuries']['Fractures of Nose or Nasel Complex'] = 'from £1,000 up to £12,750';
	_claimCalc['bodyAreas']['Face']['Skeletal Injuries']['Fractures of Cheekbones'] = 'from £1,350 up to £8,750';
	_claimCalc['bodyAreas']['Face']['Skeletal Injuries']['Fracture of Jaws'] = 'from £3,500 up to £25,000';
	_claimCalc['bodyAreas']['Face']['Skeletal Injuries']['Damage to Teeth'] = 'from £600 up to £6,250';
	_claimCalc['bodyAreas']['Face']['Facial Disfigurement'] = new Object;
	_claimCalc['bodyAreas']['Face']['Facial Disfigurement']['Female Scarring'] = 'from £1,000 up to £53,000';
	_claimCalc['bodyAreas']['Face']['Facial Disfigurement']['Male Scarring'] = 'from £1,000 up to £36,000';
	_claimCalc['bodyAreas']['Face']['Facial Disfigurement']['Scarring of other parts of the body'] = 'from £1,300 up to £7,500';
	_claimCalc['bodyAreas']['Face']['Facial Disfigurement']['Damage to Hair'] = 'from £2,150 up to £6,000';
	_claimCalc['bodyAreas']['Face']['Facial Disfigurement']['Dermatitis'] = 'from £1,000 up to £10,500';
	_claimCalc['bodyAreas']['Face']['Other'] = new Object;
	_claimCalc['bodyAreas']['Face']['Other']['Scarring of other parts of the body'] = 'from £1,300 up to £7,500';
	_claimCalc['bodyAreas']['Face']['Other']['Damage to Hair'] = 'from £2,150 up to £6,000';
	_claimCalc['bodyAreas']['Face']['Other']['Dermatitis'] = 'from £1,000 up to £10,500';
	
	_claimCalc['bodyAreas']['Other'] = new Object;
	_claimCalc['bodyAreas']['Other']['Other'] = new Object;
	_claimCalc['bodyAreas']['Other']['Other']['Scarring of other parts of the body'] = 'from £1,300 up to £7,500';
	_claimCalc['bodyAreas']['Other']['Other']['Damage to Hair'] = 'from £2,150 up to £6,000';
	_claimCalc['bodyAreas']['Other']['Other']['Dermatitis'] = 'from £1,000 up to £10,500';
	
// ________ FUNCTIONS

/*function _claimCalc_gotoFront(){
	var isIE = navigator.appName.indexOf("Microsoft") != -1;
	if(isIE){
		window['claimCalc_flash'].gotoFront();
	}
	else{
		document['claimCalc_flash'].gotoFront();
	}
}

function _claimCalc_gotoBack(){
	var isIE = navigator.appName.indexOf("Microsoft") != -1;
	if(isIE){
		window['claimCalc_flash'].gotoBack();
	}
	else{
		document['claimCalc_flash'].gotoBack();
	}
}

function _claimCalc_switchView(){
	var _buttonLabel;
		
	if(_claimCalc['flashView'] == 'front'){
		_claimCalc['flashView'] = 'back';
		_buttonLabel = 'Front view';
		
		// TELL FLASH TO GO TO BACK VIEW
		_claimCalc_gotoBack();
	}
	else{
		_claimCalc['flashView'] = 'front';
		_buttonLabel = 'Back view';
		
		// TELL FLASH TO GO TO FRONT VIEW
		_claimCalc_gotoFront();
	}
	
	$('#claimCalc_viewButton').html(_buttonLabel);
	// COMMAND TO FLASH HERE
}*/

function _claimCalc_pickArea(areaName){
	_claimCalc['currentArea'] = areaName;
	
	$('#claimCalc_severityOptions .claimCalc_option').remove();
	$('#claimCalc_estimate').html('');
	
	var _injuryType, _injurySeverity;
	
	var _html = '<div id="claimCalc_injuriesHeader" class="claimCalc_option_header">'+areaName+' Injuries</div>';
	for(_injuryType in _claimCalc['bodyAreas'][areaName]){
		_html += '<div class="claimCalc_option"><div>'+_injuryType+'</div><input type="radio" name="area" value="'+_injuryType+'" /></div>';
	}
	
	$('#claimCalc_injuryOptions').html(_html);
	$('#claimCalc_injuryOptions .claimCalc_option:nth-child(odd)').addClass('odd');
	$('#claimCalc_injuryOptions .claimCalc_option:nth-child(even)').addClass('even');
	
	$('#claimCalc_injuryOptions .claimCalc_option input').click(function(){
		_claimCalc_pickInjury( $(this).val() );
	});
}

function _claimCalc_pickInjury(injuryName){
	
	$('#claimCalc_estimate').html('');
	
	var _html = '<div class="claimCalc_option_header">Severity</div>';
	for(var _sevName in _claimCalc['bodyAreas'][_claimCalc['currentArea']][injuryName]){
		_html += '<div class="claimCalc_option"><div>'+_sevName+'</div><input type="radio" name="severity" value="'+_sevName+'" /></div>';
	}
	
	$('#claimCalc_severityOptions').html(_html);
	$('#claimCalc_severityOptions .claimCalc_option:nth-child(odd)').addClass('odd');
	$('#claimCalc_severityOptions .claimCalc_option:nth-child(even)').addClass('even');
	
	$('#claimCalc_severityOptions input').click(function(){
		_claimCalc_go();
	});
}

function _claimCalc_go(){
	
	var _area = _claimCalc['currentArea'];
	var _injury = $('input[name="area"]:checked').val();
	var _severity = $('input[name="severity"]:checked').val();
	
	var _amount = _claimCalc['bodyAreas'][_area][_injury][_severity];
	
	$('#claimCalc_estimate').html('You could claim ' + _amount);
}

// INIT CONTROLS

$(document).ready(function(){
	$('#claimCalc_viewButton').click(function(){
		_claimCalc_switchView();
	});
	
	window['claimCalc_flash'] = new Object();
	var _claimCalc_flash = new SWFObject("flash/1938_claim_calc_003.swf", "claimCalc_flash", "166", "310", "9");
	_claimCalc_flash.addParam("wmode", "transparent");
	_claimCalc_flash.write("claimCalc_flash");
	
	_claimCalc_pickArea('Head');
});
