<script language="javascript">
	function switchInputs(){
		sVal = document.contact_form.depart.options[document.contact_form.depart.selectedIndex].value; 

		eArr = document.getElementsByTagName('tr');
		for(var x = 0; x < eArr.length; x++){
			idVal = eArr[x].id.split("-");

			if(idVal[0] == 'toggle'){
				if(idVal[1] == sVal){
					eval("document.getElementById('toggle-" + sVal + "').style.visibility='visible'");
				} else {
					eArr[x].style.visibility = 'hidden';
				}
			}
		}		
	}

	function morph(){
		sVal = document.contact_form.depart.options[document.contact_form.depart.selectedIndex].value;

		if(sVal == 'Software (Pre & Post sales)'){
			document.getElementById('morph-input').innerHTML='<input type="text" name="product_name">';
			document.getElementById('morph-td').innerHTML='Product Name:';
			document.getElementById('morph-tr').style.visibility='visible';
		} else if(sVal == 'Technical Support'){
			document.getElementById('morph-input').innerHTML='<input type="text" name="product_name">';
			document.getElementById('morph-td').innerHTML='Product Name:';
			document.getElementById('morph-tr').style.visibility='visible';
		}
		else if(sVal == 'Partners'){
			document.getElementById('morph-input').innerHTML='<input type="text" name="partners">';
			document.getElementById('morph-td').innerHTML='Partners:';
			document.getElementById('morph-tr').style.visibility='hidden';
		}
		else if(sVal == 'Testimonial'){
			document.getElementById('morph-input').innerHTML='<input type="text" name="product_name">';
			document.getElementById('morph-td').innerHTML='Product Name:';
			document.getElementById('morph-tr').style.visibility='visible';
		}
		else if(sVal == 'Make a wish'){
			document.getElementById('morph-input').innerHTML='<input type="text" name="product_name">';
			document.getElementById('morph-td').innerHTML='Product Name:';
			document.getElementById('morph-tr').style.visibility='visible';
		}
		else if(sVal == 'Webmaster'){
			document.getElementById('morph-input').innerHTML='<input type="text" name="product_name">';
			document.getElementById('morph-td').innerHTML='Product Name:';
			document.getElementById('morph-tr').style.visibility='visible';
		} else if(sVal == 'Data Recovery Services'){
			document.getElementById('morph-input').innerHTML='<select name="email_address"onChange="combo1_selection_changed(this);"><option value="0">---Select One---</option><option value="1">Desktop Drive</option><option value="2">Laptop Drive</option><option value="3">Server</option><option value="4">External Drive</option><option value="5">Others</option></select><br/><br><select name="qcapacity"align="left" style="width:200px;">-- Select --</option></select>';
			
			document.getElementById('morph-td').innerHTML='Media Type'+'<br/><br/>'+'Capacity';
						
			document.getElementById('morph-tr').style.visibility='visible';
			
		}
		
	}
</script>
<script language="javascript">
			var hardcoded_values = new Array();
			hardcoded_values[0] = "";
			hardcoded_values[1] = new Array("Till 40Gb","Above 40Gb - 120Gb","Above 120Gb - 250Gb","Above 250Gb - 500Gb","Above 500Gb - 750Gb","Above 750Gb - 1 Tb");
			hardcoded_values[2] = new Array("Till 40Gb","Above 40Gb - 80Gb","Above 80Gb - 160Gb","Above 160Gb - 320Gb","Above 320Gb - 500Gb");
			hardcoded_values[3] = new Array("500Gb","750Gb","1Tb","1.5Tb","2Tb","3Tb","4Tb");
			hardcoded_values[4] = new Array("500Gb","750Gb","1Tb","1.5Tb","2Tb","3Tb","4Tb");
			hardcoded_values[5] = new Array("None");
			
			
			
			
			function combo1_selection_changed(email_address)
			{
				// 1. get the selected value from combo1:
				var combo1_value = email_address.value;
				
				// 2. make sure combo2 is empty:
				document.forms["contact_form"].elements["qcapacity"].options.length=0;
				
				// 3. loop throught the hard-coded values:
				for (var i=0;i<hardcoded_values[combo1_value].length;i++)
				{
					// dynamically create a new <option> element:
					var opt = document.createElement("option");
					// set the value-attribute of it:
					opt.setAttribute('value',i+1); // (normally, i is zero-based, but we do +1 so that "part 1" equals a value of 1..
					// set the displayed value:
					opt.innerHTML = hardcoded_values[combo1_value][i];
					// append this option to combo2:
					document.forms["contact_form"].elements["qcapacity"].appendChild(opt);
				}
			}
</script>