var case_study =['Edward','Georgina', 'Henrietta', 'Sam','Jenny','George','Anne','Jane', 'Janice', 'Richard', 'William', 'Mel', 'Anya','Jayne', 'Ana', 'Jordi', 'Terry', 'Rose', 'Samantha','Swatton', 'Thompson', 'Justin', 'Dave', 'Penny'];
var description=['Edward:13 year-old boy with crowding, deep and traumatic bite, upper right front tooth leaning backwards and other front teeth leaning forwards. Had extraction of two upper side teeth (first premolars), wore an upper removable appliance for 4 months, then upper and lower self-ligating fixed braces for 17 months. Retained with upper and lower bonded retainers on the back of the front teeth and wears translucent removable retainers part-time long-term.','Georgina: 12 year-old girl unhappy with her front teeth sticking out (by 10mm). Still had 12 deciduous teeth retained despite her age. Had crowding in the lower jaw and upper mid-line gap of 2mm. Wore a twin-block functional brace full-time for 6 months and the overjet was reduced from 10mm to 1mm. She then wore the functional brace in bed until her permanent teeth erupted, when four permanent teeth were removed (second premolars). She then had upper and lower fixed braces for 22 months. Retained with upper and lower translucent removable retainers, worn part-time on a long-term basis.',																																																'Henrietta: 12 year-old girl unhappy with her \'fangs\'. Had crowding in both jaws, upper central incisors leaning backwards and lateral incisors pointing forwards, deep overbite, crossbite affecting the left molars and centre lines not coincident. Had extractions of four permanent teeth (upper first premolars, lower second premolars), wore an upper removable brace for 6 months to correct the crossbite, then upper and lower fixed braces for 19 months. Retained with upper and lower translucent removable retainers, worn part-time for at least a year, ideally on a long-term basis.','Sam: 14 year-old boy with severe crowding and centre lines not coincident. Had four teeth extracted, wore upper removable brace for 4 months and fixed metal braces for 11 months.',
'Jenny: 12 year-old girl with twisted lateral incisor and deep bite. Treated with no extraction, night-time headgear for 4 months and fixed metal braces for 10 months.', 
'George: 13 year-old boy with crowding in both jaws, deep bite and centre lines not coincident. Had 4 side-teeth removed, upper removable brace for 4 months and fixed metal braces for 11 months.', 
'Anne: 10 year-old girl with impacted upper canine teeth, severe lower crowding and front teeth sticking out by 13 mm. Had functional appliance for 7 months, 4 premolar teeth removed and then fixed braces for 18 months.', 
'Jane: 13 year-old girl with impacted upper canines on both sides and impacted lower left second premolar, severe potential crowding, rotated teeth and centre lines not coincident. Had surgical removal of 4 teeth including the impacted ones and fixed metal braces for 13 months.', 
'Janice: 12 year-old girl with her upper right canine tooth unerupted and impacted in the roof of the mouth, with virtually no space for it. The upper centre line is off the her right and there is a deep bite. Treated on a non-extraction basis with night-time headgear and a removable brace for 4 months, surgical exposure of the impacted canine tooth and fixed braces for 21 months to bring the canine into position. Retained with bonded retainers on upper and lower front teeth and part-time wear of removable retainers.',
'Richard: 14 year-old boy with upper front teeth sticking out by 8mm, spacing, centre lines off and a deep bite. Treated on a non-extraction basis with an upper removable brace and night-time headgear for 4 months, then upper and lower fixed braces for 15 months. Retained with lower bonded retainer and upper and lower removable retainers.',
'William: 11 year-old boy with severe crowding and a deep bite. Treated with extraction of four premolar teeth, wore an upper removable brace for 4 months and then fixed braces for 10 months. Retained with upper and lower removable retainers.',
'Mel: 11 year-old girl with severe crowding in both jaws and some crossbites. Treated with extraction of four premolar teeth, wore an upper removable brace for 5 months, followed by upper and lower fixed braces for 11 months. Retained with upper and lower removable retainers.',
'Anya: Adult in her late twenties, missing four premolar teeth from previous treatment. Had gaps in the upper front teeth area with the front teeth sticking out by 10mm and a deep overbite. Would like to use an invisible brace. Had upper and lower Incognito lingual braces for 22 months. Retained with upper and lower bonded retainers on the back of the front teeth and wearing translucent removable retainers part-time long-term.',
'Jayne: Adult in her thirties unhappy with her crooked upper front teeth. The upper lateral incisors were in crossbite and both upper and lower front teeth were leaning forwards. She was keen to use an invisible brace. Had extraction of four side teeth (second premolars) and wore upper and lower Incognito lingual braces for 21 months. Retained with upper and lower bonded retainers on the back of the front teeth and wearing translucent removable retainers part-time long-term.',
'Ana: Adult female in her late twenties who had previous treatment, unhappy with the rotated front tooth and the irregular lower front teeth. Would like to have less visible appliances. Had upper Incognito lingual appliance and lower ceramic fixed braces for 1 year. Retained by upper and lower bonded retainers and part-time wear of removable translucent retainers long-term.',
'Jordi: Adult with crooked teeth. Had non-extraction treatment with fixed braces and ceramic brackets on top teeth for 12 months. Has bonded and removable retainers in both jaws.',
'Terry: Adult in his thirties presenting with overlapping front teeth, right front tooth sticking out by 7mm and a deep bite. Treated with extraction of two upper premolar, upper ceramic brace and lower metal fixed brace for 23 months. Retained with upper and lower bonded retainers and part-time wear of plastic translucent retainers.',
'Rose: Adult in her thirties unhappy with the gap between her front teeth. Wore an upper ceramic fixed brace for 8 months. Retained with a bonded retainer on the back of the front teeth and part-time wear of an upper removable retainer.',
'Samantha: Adult in her mid-thirties who had previous extraction of four premolar teeth in her teens but still with severe crowding in the upper jaw, with some teeth locked in crossbite. Treated with extraction of the two upper first permanent molars and wore upper and lower self-ligating fixed braces (Damon 2) for 17 months. Retained with upper and lower bonded retainers on the front teeth and part-time wear of removable retainers.','Adult female unhappy with front teeth overlapping the wrong way round. There was an asymmetry in the lower jaw with lower centre line shifted to the left and a  previously extracted lower left molar with residual space. Treatment involved extraction of one tooth in the upper left and one in the lower right corner, upper removable brace for 4 months and fixed ceramic braces for 24 months. Retained with upper and lower bonded retainers and part-time use of removable transparent retainers.',
'Adult female with crooked upper teeth and previously extracted lower right premolar tooth, centre lines off by 2mm and a deep bite. Had two upper premolars extracted, upper ceramic and lower metal fixed braces for 22 months. Retained with bonded retainers and part-time wear of transparent removable retainers.',
'Adult male unhappy with the gaps between his front teeth. Wore 24 sets of virtually invisible aligners (Invisalign) and treatment took 1 year. Has upper and lower bonded retainers on the back of the front teeth and wearing removable retainers part-time.',
'Dave: Adult male unhappy with crooked teeth. Has deep bite and very instanding lower premolar. Had invisible lingual appliance on the top teeth and normal labial appliance on the lower on a non-extraction basis for 18 months. Retained with upper and lower bonded retainers and part-time wear of translucent removable retainers long-term.',
'Penny: Adult in her twenties unhappy with the upper gaps and front teeth sticking out by 11mm. Had non-extraction treatment with upper ceramic and lower metal fixed braces for 11 months. Retained with upper and lower bonded retainers and part-time wear of translucent removable retainers long-term.'];

function writeDescription(location1){
	 for(var i=0; i<case_study.length; i++){		 
	  if((location1)==case_study[i]){		 
	    replaceTitle(document.getElementById('eddie'),description[i]);				
	  }
	}
}
function replaceTitle(n, s){
	//Define Node interface constants because of imcomplete IE6 compliance
    if(!window.Node){		
	 	var NODE={
			ELEMENT_NODE: 1,
			ATTRIBUTE_NODE:2,
			TEXT_NODE:3,
			COMMENT_NODE:8,
			DOCUMENT_NODE:9,
			DOCUMENT_FRAGMENT_NODE:11
		};
	}
	//check type of node
	if(n.nodeType==3){		
		var newNode=document.createTextNode(s);
		var parent=n.parentNode;
		parent.replaceChild(newNode,n);
		
	}
	else{
		var kids=n.childNodes;
			for(var i=0; i< kids.length; i++){			
			replaceTitle(kids[i], s);			
	}	
  }   
}