function dd1_handler(){
	// Drop Down 1 (Type) Handler
	// Called when Drop Down 1 is changed, when a "Type" selection is made
	
	//alert("asdas");

	// First make sure drop down 2 and 3 are not shown yet
	document.getElementById("dd2_detail").style.display = "none";
	document.getElementById("dd3_link").style.display = "none";
	
	// Now find out what they selected
	
	for (i = 0; i < document.guide_visitor.dd_type.length; i++) {
		if (document.guide_visitor.dd_type.options[i].selected == true) {
			//alert(document.guide_visitor.dd_type.options[i].text);
			var dd1_type = document.guide_visitor.dd_type.options[i].value;
		}
	}
	
	// Now we know which one they picked from the first "type" drop down
	
	ar_detail = new Array();	
	
	// Just in case, wipe anything that's already there
	
	document.guide_visitor.dd_detail.length = 0;
	
	// Let's build the contents of the second drop-down according to this choice
	
	if (dd1_type == "MEMPUB") {
		// Always start with an empty value, else onchange won't work if they pick the first one
		// Interested in...
		var please_select = 'Interested in...'; //Change according to 1-choice
		
		ar_detail[0] = new Array ('', please_select);
		ar_detail[1] = new Array ('SNOOSA', 'Snoring / Sleep Apnoea / CPAP / Dental Appliances');
		ar_detail[2] = new Array ('SADBLT', 'Winter Blues / S.A.D. / Depression / Jet Lag / Light Therapy');
		ar_detail[3] = new Array ('SINUSP', 'Sinus, Nose & Throat Problems / Hayfever / Allergies');
		ar_detail[4] = new Array ('BLADDR', 'Cystitis / U.T.I.s / Bladder Health / D-Mannose');
		ar_detail[5] = new Array ('GENHLT', 'General Health & Lifestyle Products');
		
	} else if (dd1_type == "MEDPRO") {
		// Who is...
		var please_select = 'Who is...'; //Change according to 1-choice

		ar_detail[0] = new Array ('', please_select);
		ar_detail[1] = new Array ('GENPRA', 'A General Practitioner');
		ar_detail[2] = new Array ('GDNPRA', 'A General Dental Practitioner');
		ar_detail[3] = new Array ('SLCPRO', 'A Sleep Consultant, Respiratory Nurse or Sleep Clinic Buyer');		
		//ar_detail[3] = new Array ('SLECON', 'A Sleep Consultant');
		//ar_detail[4] = new Array ('SLECLI', 'A Sleep Clinician / Nurse / Physiologist');
		//ar_detail[5] = new Array ('PHARMA', 'A Pharmacist');
		//ar_detail[6] = new Array ('CORDOC', 'A Corporate Doctor');
		
	} else if (dd1_type == "ALHPRO") {
		// Who is...
		var please_select = 'Who is...'; //Change according to 1-choice

		ar_detail[0] = new Array ('', please_select);
		ar_detail[1] = new Array ('NUTRIT', 'A Nutritionist / Dietitian / Herbalist');
		ar_detail[2] = new Array ('OSTEOP', 'An Osteopath / Chiropractor / Physiotherapist');
		ar_detail[3] = new Array ('PSYCHI', 'A Psychiatrist / Counsellor');
		
	} else if (dd1_type == "TRDPRO") {
		// Who...
		var please_select = 'Who...'; //Change according to 1-choice

		ar_detail[0] = new Array ('', please_select);
		ar_detail[1] = new Array ('RETAIL', 'Owns and/or operates a retail outlet');
		ar_detail[2] = new Array ('MEDSUP', 'Supplies medical equipment and/or services');
		ar_detail[3] = new Array ('INSCOM', 'Represents a medical insurance company');
		
	} else if (dd1_type == "MDWPRO") {
		// Who works in...
		var please_select = 'Who works in...'; //Change according to 1-choice

		ar_detail[0] = new Array ('', please_select);
		ar_detail[1] = new Array ('INTPUB', 'Internet publishing');
		ar_detail[2] = new Array ('PRINTM', 'Print media');
		ar_detail[3] = new Array ('RADIOM', 'Radio');
		ar_detail[4] = new Array ('TVMEDI', 'TV');
		
	}
	
	for (i = 0; i < ar_detail.length; i++) {
		NewOption = new Option(ar_detail[i][1], ar_detail[i][0], false, false);
		document.guide_visitor.dd_detail.options[document.guide_visitor.dd_detail.length] = NewOption;
	}	
	
	// Finally, now we've built the list op select options, show the next drop down
	
	// Abort if they selected the "Please select"
	if (dd1_type == "" || document.guide_visitor.dd_detail.length == 0) {
		return false;
	} else {
		document.getElementById("dd2_detail").style.display = "block";
	}

}

function dd2_handler(){
	// Drop Down 2 (Question) Handler
	// Called when Drop Down 2 is changed, when a "Detail" selection is made
	
	//alert(document.getElementById("dd3_link").style.display);

	// First, make sure the final drop-down isn't shown yet
	document.getElementById("dd3_link").style.display = "none";
	
	// Now find out what they selected in step 2
	
	for (i = 0; i < document.guide_visitor.dd_detail.length; i++) {
		if (document.guide_visitor.dd_detail.options[i].selected == true) {
			//alert(document.guide_visitor.dd_detail.options[i].text);
			var dd2_detail = document.guide_visitor.dd_detail.options[i].value;
		}
	}

	// Now we know what they picked, populate the final drop down
	
	ar_links = new Array();	
	
	// Just in case, wipe anything that's already there
	
	document.guide_visitor.dd_link.length = 0;
	
	// Let's build the 3rd drop down
	
	if (dd2_detail == "SNOOSA") {
		// Always start with an empty value, else onchange won't work if they pick the first one
		var please_select = 'I want more information about...';
		ar_links[0] = new Array ('', please_select);
		ar_links[1] = new Array ('when-snoring-could-be-dangerous', 'When snoring could be dangerous');
		ar_links[2] = new Array ('sleep-apnoea', 'Sleep Apnoea');
		ar_links[3] = new Array ('risks-untreated-sleep-apnoea', 'The risks of leaving Sleep Apnoea untreated');
		ar_links[4] = new Array ('how-to-test-for-sleep-apnoea', 'How to test for Sleep Apnoea');
		ar_links[5] = new Array ('treatment-options', 'The treatment options');
		ar_links[6] = new Array ('buying-osa-therapy-equipment', 'Buying OSA therapy equipment');
		ar_links[7] = new Array ('follow-up-sleep-studies', 'How to check my therapy is working');
		
	} else if (dd2_detail == "SADBLT") {
		var please_select = 'I want more information about...';
		ar_links[0] = new Array ('', please_select);
		ar_links[1] = new Array ('why-people-get-winter-blues', 'Why people get Winter Blues / S.A.D.');
		ar_links[2] = new Array ('symptoms-of-winter-blues-and-sad', 'Symptoms of Winter Blues & S.A.D.');
		ar_links[3] = new Array ('bright-light-therapy', 'Bright Light Therapy');
		ar_links[4] = new Array ('other-uses-for-light-therapy', 'Other Uses');
		ar_links[5] = new Array ('the-litebook-elite', 'The Litebook Elite');
		
	} else if (dd2_detail == "SINUSP") {
		var please_select = 'I want more information about...';
		ar_links[0] = new Array ('', please_select);
		ar_links[1] = new Array ('symptoms-types-of-sinus-problems', 'Symptoms and types of sinus problems');
		ar_links[2] = new Array ('using-sinus-irrigation', 'Using sinus irrigation therapy');
		ar_links[3] = new Array ('the-sinupulse-elite', 'The SinuPulse Elite');
		ar_links[4] = new Array ('air-purification', 'Air Purification');
		
	} else if (dd2_detail == "BLADDR") {
		var please_select = 'I want more information about...';
		ar_links[0] = new Array ('', please_select);
		ar_links[1] = new Array ('signs-and-symptoms-of-cystitis', 'Signs and symptoms of cystitis');
		ar_links[2] = new Array ('bladder-treatment-options', 'Treatment options');
		ar_links[3] = new Array ('natural-d-mannose', 'Natural D-Mannose');	
		ar_links[4] = new Array ('probiotics', 'Probiotics');	

	} else if (dd2_detail == "GENHLT") {
		var please_select = 'I want more information about...';
		ar_links[0] = new Array ('', please_select);
		ar_links[1] = new Array ('backcare-posture-improvement', 'Backcare & posture improvement');
		ar_links[2] = new Array ('latex-mattresses-pillows', 'Latex matresses & pillows');
		ar_links[3] = new Array ('noise-control-white-noise', 'Noise control / White noise');	
		ar_links[4] = new Array ('amassage-relaxation', 'Massage / Relaxation');	

	} else if (dd2_detail == "GENPRA") {
		var please_select = 'Interested in...';
		ar_links[0] = new Array ('', please_select);
		ar_links[1] = new Array ('sleep-apnoea-screening', 'Sleep Apnoea Screening');
		ar_links[2] = new Array ('sleep-apnoea-treatment', 'Sleep Apnoea Treatment');

	} else if (dd2_detail == "GDNPRA") {
		var please_select = 'Iinterested in...';
		ar_links[0] = new Array ('', please_select);
		ar_links[1] = new Array ('screening-for-snoring-sleep-apnoea', 'Screening for Snoring & Sleep Apnoea');
		ar_links[2] = new Array ('snoring-sleep-apnoea-treatment', 'Snoring & Sleep Apnoea Treatment');
		ar_links[3] = new Array ('dental-sleep-medicine-training', 'Dental Sleep Medicine Training');	
		
	} else if (dd2_detail == "SLCPRO") {
		var please_select = 'Iinterested in...';
		ar_links[0] = new Array ('', please_select);
		ar_links[1] = new Array ('cpap-therapy-equipment', 'CPAP Therapy Equipment');

	}
	
	for (i = 0; i < ar_links.length; i++) {
		NewOption = new Option(ar_links[i][1], ar_links[i][0], false, false);
		document.guide_visitor.dd_link.options[document.guide_visitor.dd_link.length] = NewOption;
	}	
	
	// Finally, show the 3rd drop down!
	
	// Abort if they selected the "Please select"
	if (dd2_detail == "" || document.guide_visitor.dd_link.length == 0) {
		return false;
	} else {
		document.getElementById("dd3_link").style.display = "block";
	}

}

function dd3_handler(){
	// Drop Down 3 (Link) Handler
	// Called when Drop Down 3 is changed, when a "Link" selection is made
	// Should simply redirect to appropriate URL
	
	// First find out what they selected in step 3
	
	for (i = 0; i < document.guide_visitor.dd_link.length; i++) {
		if (document.guide_visitor.dd_link.options[i].selected == true) {
			//alert(document.guide_visitor.dd_link.options[i].text);
			var page = document.guide_visitor.dd_link.options[i].value;
		}
	}

	if (page == "")	{
		return false;
	} else {
		page = escape(page);
		window.location = "http://www.intushealthcare.eu/" + page + ".html";
	}

}
