function show_div(){
	if(document.getElementById('services_list').selectedIndex != 0){
		div_id = document.getElementById('services_list').value;
		document.getElementById(div_id).style.display = "block";
		
		document.getElementById('services_list').selectedIndex = 0;
	
		document.getElementById('add_service_link').style.display = "none"
		document.getElementById('add_another_service_link').style.display = "inline"
	}
}
function hide_div(div_id){
//alert(div_id);
	document.getElementById(div_id).style.display = "none";
}

function remove_div(div_id){
	var d = document.getElementById('list_of_services');
	var olddiv = document.getElementById(div_id);
	d.removeChild(olddiv);	
}

function add_div(){
	if(document.getElementById('services_list').selectedIndex != 0){

		div_id = document.getElementById('services_list').value;
		new_div_txt = '';
		switch(div_id)
		{
			/* HAIR SERVICES */
			case 'hair_services':
            	new_div_txt = '<strong>Hair Services</strong><br />';
            	new_div_txt+= '<input type="checkbox" value="Haircut" name="hair_Haircut" id="hair_Haircut" /><label for="hair_Haircut">Haircut</label>';
            	new_div_txt+= '<input type="checkbox" value="Blowout/Style" name="hair_blowoutStyle" id="hair_blowoutStyle" /><label for="hair_blowoutStyle">Blowout/Style</label>';
            	new_div_txt+= '<input type="checkbox" value="Beard/Bang Trim" name="hair_trim" id="hair_trim" /><label for="hair_trim">Beard/Bang Trim</label>';
            	new_div_txt+= '<input type="checkbox" value="Conditioning Treatment" name="hair_Condtn" id="hair_Condtn" /><label for="hair_Condtn">Conditioning Treatment</label>';
            	new_div_txt+= '<input type="checkbox" value="Consultation" name="hair_Consult" id="hair_Consult" /><label for="hair_Consult">Consultation</label>';
				
			break;
			/* COLOR SERVICES */
			case 'color_services':
            	new_div_txt+= '<strong>Color Services</strong><br />';
            	new_div_txt+= '<input type="checkbox" value="Single Palette" name="color_single" id="color_single" /><label for="color_single">Single Palette</label>';
            	new_div_txt+= '<input type="checkbox" value="Toner" name="color_tonor" id="color_tonor" /><label for="color_tonor">Toner</label>';
            	new_div_txt+= '<input type="checkbox" value="Highlight/Partial" name="color_hilite_partial" id="color_hilite_partial" /><label for="color_hilite_partial">Highlight/Partial</label>';
            	new_div_txt+= '<input type="checkbox" value="Highlight/Lowlight" name="color_hilite_lowlite" id="color_hilite_lowlite" /><label for="color_hilite_lowlite">Highlight/Lowlight</label>';
            	new_div_txt+= '<input type="checkbox" value="Individual Foils" name="color_foil" id="color_foil" /><label for="color_foil">Individual Foils</label><br />';
            	new_div_txt+= '<input type="checkbox" value="Extra Color" name="color_extra" id="color_extra" /><label for="color_extra">Extra Color</label>';
            	new_div_txt+= '<input type="checkbox" value="Corrective Color" name="color_correct" id="color_correct" /><label for="color_correct">Corrective Color</label>';
			
			break;
			/* TEXTURE SERVICES */
			case 'texture_services':
            	new_div_txt+= '<strong>Texture Services</strong><br />';
            	new_div_txt+= '<input type="checkbox" value="Short-Medium Lengths" name="text_short" id="text_short" /><label for="text_short">Short-Medium Lengths</label>';
            	new_div_txt+= '<input type="checkbox" value="Medium-Long Lengths" name="text_long" id="text_long" /><label for="text_long">Medium-Long Lengths</label>';
            	new_div_txt+= '<input type="checkbox" value="Individual Rods" name="text_rod" id="text_rod" /><label for="text_rod">Individual Rods</label>';			
			break;
			case 'makeup':
            	new_div_txt+= '<strong>Makeup</strong><br />';
            	new_div_txt+= '<input type="checkbox" value="Daytime" name="makeup_day" id="makeup_day" /><label for="makeup_day">Daytime</label>';
            	new_div_txt+= '<input type="checkbox" value="Evening" name="makeup_night" id="makeup_night" /><label for="makeup_night">Evening</label>';			
			break
			/* STYLE SERVICES */
			case 'style_services':
            	new_div_txt+= '<strong>Styling Services</strong><br />';
            	new_div_txt+= '<input type="checkbox" value="Up Style" name="style_up" id="style_up" /><label for="style_up">Up Style</label>';
            	new_div_txt+= '<input type="checkbox" value="Prom Package" name="style_prom" id="style_prom" /><label for="style_prom">Prom Package (Up Style, Makeup)</label><br />';
            	new_div_txt+= '<input type="checkbox" value="Bridal/Special Package" name="style_bridal" id="style_bridal" /><label for="style_bridal">Bridal/Special Package (Up Style, Makeup, Mini Manicure)</label>';			
			break;
			/* NAIL SERVICES */
			case 'nail_services':
            	new_div_txt+= '<strong>Nail Services</strong><br />';
            	new_div_txt+= '<input type="checkbox" value="Spa Manicure" name="nail_manicure" id="nail_manicure" /><label for="nail_manicure">Spa Manicure</label>';
            	new_div_txt+= '<input type="checkbox" value="Mini Manicure" name="nail_minimanicure" id="nail_minimanicure" /><label for="nail_minimanicure">Mini Manicure</label>';
            	new_div_txt+= '<input type="checkbox" value="Spa Pedicure" name="nail_pedicure" id="nail_pedicure" /><label for="nail_pedicure">Spa Pedicure</label>';
            	new_div_txt+= '<input type="checkbox" value="Mini Pedicure" name="nail_minipedicure" id="nail_minipedicure" /><label for="nail_minipedicure">Mini Pedicure</label>';
            	new_div_txt+= '<input type="checkbox" value="Polish Change" name="nail_polish" id="nail_polish" /><label for="nail_polish">Polish Change</label>';
			break;			
			/* BODY TREATMENTS */
			case 'body_treatments':	
            	new_div_txt = '<strong>Body Treatments</strong><br />';
            	new_div_txt+= '<input type="checkbox" value="Paraffin Hand Treatment" name="body_hand" id="body_hand" /><label for="body_hand">Paraffin Hand Treatment</label>';
            	new_div_txt+= '<input type="checkbox" value="Back Treatment" name="body_back" id="body_back" /><label for="body_back">Back Treatment</label>';
            	new_div_txt+= '<input type="checkbox" value="The Body Treatment" name="body_body" id="body_body" /><label for="body_body">The Body Treatment</label>';
			
			break;
			/* FACIAL TREATMENTS */
			case 'facial_treatments':
            	new_div_txt+= '<strong>Facial Treatments</strong><br />';
            	new_div_txt+= '<input type="checkbox" value="Spa Facial" name="facial_spa" id="facial_spa" /><label for="facial_spa">Spa Facial</label>';
            	new_div_txt+= '<input type="checkbox" value="Mini Facial" name="facial_mini" id="facial_mini" /><label for="facial_mini">Mini Facial</label>';
			break;

			/* WAXING */
			case 'waxing':
				new_div_txt = '<strong>Waxing</strong><br />';
				new_div_txt+= '<input type="checkbox" value="Brow Shape / Tweeze" name="wax_brows" id="wax_brows" /><label for="wax_brows">Brow Shape / Tweeze</label>';
   				new_div_txt+= '<input type="checkbox" value="Lip or Chin" name="wax_lip" id="wax_lip" /><label for="wax_lip">Lip or Chin</label>';
            	new_div_txt+= '<input type="checkbox" value="Underarms" name="wax_underarm" id="wax_underarm" /><label for="wax_underarm">Underarms</label>';
            	new_div_txt+= '<input type="checkbox" value="Half Arms" name="wax_halfarms" id="wax_halfarms" /><label for="wax_halfarms">Half Arms</label><br />';
            	new_div_txt+= '<input type="checkbox" value="Bikini" name="wax_bikini" id="wax_bikini" /><label for="wax_bikini">Bikini</label>';
            	new_div_txt+= '<input type="checkbox" value="Lower Leg" name="wax_lowerleg" id="wax_lowerleg" /><label for="wax_lowerleg">Lower Leg</label>';
            	new_div_txt+= '<input type="checkbox" value="Full Leg" name="wax_fullleg" id="wax_fullleg" /><label for="wax_fullleg">Full Leg</label>';
            	new_div_txt+= '<input type="checkbox" value="Back or Chest" name="wax_backchest" id="wax_backchest" /><label for="wax_backchest">Back or Chest</label>';
			break;
		}
		
        new_div_txt+= '<br /><a href="javascript:void(0);" onclick="javascript:remove_div(\''+div_id+'\')">Remove This Section</a>';

		//test = document.getElementById(div_id); 
		if(document.getElementById(div_id)==null){
			//check to see if element already exists, if so don't add it
			services = document.getElementById('list_of_services');
			var newdiv = document.createElement('div');
			newdiv.setAttribute("id",div_id);
			newdiv.setAttribute("class","servicesAppt");
			newdiv.innerHTML = new_div_txt;
			services.appendChild(newdiv);
		}
		document.getElementById('services_list').selectedIndex = 0;
	}
}