
	function setForm(anObj) {		
		if (anObj.selectedIndex == 4) {
			// TEAM Awards
			elem = document.getElementById("IndividualElements");
			elem.style.display = "none";
		} else {
			// INDIVIDUAL Awards
			elem = document.getElementById("IndividualElements");
			elem.style.display = "inline";
		}
		
		updatePositionDD(anObj);
	}	
	
	
	// modify the position dropdown
	function updatePositionDD(anObj) {
	
		var sPosition = document.getElementById("sPosition");		
		
		// remove all the options first	
		removeAllOptions(sPosition);
		
		var jpCCWY = document.getElementById("jpCCWY");
		var jpCCSDY = document.getElementById("jpCCSDY");
		var jpRSA = document.getElementById("jpRSA");
		var jpCCSY = document.getElementById("jpCCSY");
		var sTestimonialText = document.getElementById("sTestimonialText");	
		var sTestimonial = document.getElementById("sTestimonial");
		var sAge = document.getElementById("sAge");
		
		var QHeaderText,QIntroText,Q1Text,Q2Text,Q3Text;
		
		jpCCWY.style.display = "none";
		jpCCSDY.style.display = "none";
		jpRSA.style.display = "none";
		jpCCSY.style.display = "none";
		sAge.style.display = "none";

		switch (anObj.selectedIndex) {	
			case 0: 
				// None
				addOption(sPosition, "", "Please select...");
				
				QHeaderText = "Please first select an option from the awards category drop down above...";
				QIntroText = "Please first select an option from the awards category drop down above...";
				Q1Text = "";
				Q2Text = "";
				Q3Text = "";
				
				break;
			case 1 : 
			
				// CCWY
				addOption(sPosition, "Qualified Child Care Worker", "Qualified Child Care Worker");
				addOption(sPosition, "Unqualified Child Care Worker", "Unqualified Child Care Worker");
				addOption(sPosition, "Qualified Teacher", "Qualified Teacher");
				addOption(sPosition, "Family Day Care Carer", "Family Day Care Carer");
				addOption(sPosition, "Nanny", "Nanny");
				
				// Now for the question text
				QHeaderText = "Your Submission - What makes your favourite child care worker the best in Australia?";
				QIntroText = "Use this section to demonstrate why your selected carer should win.  Please answer the questions below in 400 words or less per answer. Provide specific examples where possible.  A separate sheet may be used.";
				Q1Text = "What makes your carer extra special?  Explain how they go the extra mile for the families and children in their care.";
				Q2Text = "How have their skills or special knowledge/understanding about children and child development helped your child or a child you know?";
				Q3Text = "Is there something about your carer's relationship-building or interpersonal skills that sets them apart from others?  Please explain.";
				
				sTestimonialText.innerHTML = "A written testimonial or reference for your nominated carer may be attached. It should be provided by their manager/director/supervisor or by a group of parents whose children are cared for by the carer.";	
				sTestimonial.style.display = "inline";		
				sTestimonial2.style.display = "inline";	
				jpCCWY.style.display = "inline";
				
				break;
			case 2 : 
			
				// CCSDY
				addOption(sPosition, "Centre Director", "Centre Director");
				addOption(sPosition, "Qualified Teacher", "Qualified Teacher");
				addOption(sPosition, "Family Day Care Scheme Coordinator", "Family Day Care Scheme Coordinator");
				
				// Now for the question text
				QHeaderText = "Your Submission - What makes your favourite director/coordinator the best in Australia?";
				QIntroText = "Use this section to demonstrate why your selected carer should win.  Please answer the questions below in 400 words or less per answer. Provide specific examples where possible.  A separate sheet may be used.";
				Q1Text = "What makes your director/coordinator extra special?  Explain how they go the extra mile for the families and children in their care.";
				Q2Text = "How have their skills or special knowledge/understanding about children and child development helped your child or a child you know?";
				// Q3Text = "Is there something about your carer's relationship-building or interpersonal skills that sets them apart from others?  Please explain.";
				Q3Text = "Explain how their management skills have benefited the centre/scheme, the staff and families.";
				
				sTestimonialText.innerHTML = "A written testimonial or reference for your nominated carer may be attached. It should be provided by their manager/director/supervisor or by a group of parents whose children are cared for by the carer.";	
				sTestimonial.style.display = "inline";		
				sTestimonial2.style.display = "inline";	
				jpCCSDY.style.display = "inline";
				
				break;
			case 3 : 
			
				// RSA
				addOption(sPosition, "Qualified Child Care Worker", "Qualified Child Care Worker");
				addOption(sPosition, "Unqualified Child Care Worker", "Unqualified Child Care Worker");
				addOption(sPosition, "Qualified Teacher", "Qualified Teacher");
				addOption(sPosition, "Family Day Care Carer", "Family Day Care Carer");
				
				// Now for the question text
				QHeaderText = "Your Submission - What makes your nominee the best young child care worker in Australia?";
				QIntroText = "Use this section to demonstrate why your selected carer should win.  Please answer the questions below in 400 words or less per answer. Provide specific examples where possible.  A separate sheet may be used. ";
				Q1Text = "What makes your carer extra special?  Explain how they go the extra mile for the families and children in their care.";
				Q2Text = "How have they demonstrated their dedication to child care?  Explain their skills/training/ development and how they have implemented these in their work.";
				Q3Text = "Is there something about your carer's relationship-building or interpersonal skills that sets them apart from others?  Please explain.";		
				
				sTestimonialText.innerHTML = "";	
				sTestimonial.style.display = "none";	
				sTestimonial2.style.display = "none";			
				jpRSA.style.display = "inline";				
				sAge.style.display = "inline";
				
				break;	
			case 4 :
				
				// Now for the question text
				QHeaderText = "Your Submission - What makes your favourite children's service the best in Australia?";
				QIntroText = "Use this section to demonstrate why your selected team should win.  Please answer the questions below in 400 words or less per answer. Provide specific examples where possible.  A separate sheet may be used.";
				Q1Text = "What makes your service extra special?  Explain how the team goes the extra mile for the families and children in their care.";
				Q2Text = "How have their skills or special knowledge/understanding about children and child development helped your child or a child you know?";
				Q3Text = "Is there something about the team's relationship-building or interpersonal skills that sets them apart from others?  Please explain.";	
				
				sTestimonialText.innerHTML = "A written testimonial or reference for your nominated children's service may be attached. It should be provided by their manager/director/supervisor or by a group of parents whose children are cared for by the team.";		
				sTestimonial.style.display = "inline";		
				sTestimonial2.style.display = "inline";			
				jpCCSY.style.display = "inline";
				
				break;
		}		
		
		// set the response heading, text, and question elements
		var vQH = document.getElementById("sQH");	
		var vQT = document.getElementById("sQT");	
		var vQ1 = document.getElementById("tQ1");	
		var vQ2 = document.getElementById("tQ2");	
		var vQ3 = document.getElementById("tQ3");	
		
		// now set the text for these elements
		vQH.innerHTML = QHeaderText;
		vQT.innerHTML = QIntroText;
		vQ1.innerHTML = Q1Text;
		vQ2.innerHTML = Q2Text;
		vQ3.innerHTML = Q3Text;
		
	}
	
	// on page load 
	function initForm() {
		// dd = document.getElementById("AwardCategory");		
		// setForm(dd);
	}
	
	function removeAllOptions(selectbox)
	{
		var i;
		for(i=selectbox.options.length-1;i>=0;i--)
		{
			//selectbox.options.remove(i);
			selectbox.remove(i);
		}
	}
	
	
	function addOption(selectbox, value, text)
	{
		var optn = document.createElement("OPTION");
		optn.text = text;
		optn.value = value;
		selectbox.options.add(optn);
	}
	
	
	function showTip(oElem,aTipID) {
		
		var AwardCategory = document.getElementById("AwardCategory");			
		var ToolTips = new Array();		
		var ToolText;

		switch (AwardCategory.selectedIndex) {	
			case 0: 
				ToolTips["sQ1"] = "Please select the Award Category above.";
				ToolTips["sQ2"] = "Please select the Award Category above.";
				ToolTips["sQ3"] = "Please select the Award Category above.";
				break;
			case 1 : 
				ToolTips["sQ1"] = "Include any special things the carer has done for families and/or children that is far beyond what is required to perform their job; other services the carer has done for families and children in the wider community, eg for charities.";
				ToolTips["sQ2"] = "Include how their excellent skills in child development may have helped a child or family overcome a significant challenge; or how their devotion, care and compassion for a child has helped the child reach their full potential.  This may include any special learning/skills they may have developed or trained in to improve the well-being of specific children - e.g. sign language.";
				ToolTips["sQ3"] = "Include ways their advice/friendship/support may have helped a family/parent/co-worker to overcome a personal challenge or problem?  Discuss any special techniques they use to improve communication with children and families.";
				break;
			case 2 : 
				ToolTips["sQ1"] = "Include any special things the carer has done for families and/or children that is far beyond what is required to perform their job; other services the carer has done for families and children in the wider community, eg for charities.";
				ToolTips["sQ2"] = "Include how their excellent skills in child development may have helped a child or family overcome a significant challenge; or how their devotion, care and compassion for a child has helped the child reach their full potential.  This may include any special learning/skills they may have developed or trained in to improve the well-being of specific children - e.g. sign language.";
				ToolTips["sQ3"] = "Discuss any improvements they have made to the service; special programs or procedures they put in place for the staff; special procedures they have implemented to help families and children get the most out of the service?";
				break;
			case 3 : 
				ToolTips["sQ1"] = "Include any special things the carer has done for families and/or children that is far beyond what is required to perform their job; other services the carer has done for families and children in the wider community, eg for charities.";
				ToolTips["sQ2"] = "Discuss anything they have done that shows their long term commitment to child care, such as extra training and courses.  Give examples of how they have put their learning into practice in their daily activities with children and/or their planning.";
				ToolTips["sQ3"] = "Include ways their advice/friendship/support may have helped a family/parent/co-worker to overcome a personal challenge or problem?  Discuss any special techniques they use to improve communication with children and families.";
				break;	
			case 4 :
				ToolTips["sQ1"] = "Include special things the team has done for families and/or children that is far beyond what is required to perform their job; other services the team has done for families and children in the wider community, eg for charities.";
				ToolTips["sQ2"] = "Discuss how the team works together to help individual children reach their full potential; include examples of how their excellent skills in child development may have helped a child or family overcome a significant challenge.  ";
				ToolTips["sQ3"] = "Discuss any special activities the staff do that motivates them to work well together and to the best of their ability.  Include ways the staff group has helped a family/parent/co-worker to overcome a personal challenge or problem?";
				break;
		}		
		
		// alert("ToolTip: " + ToolTips[aTipID]);
		
		ToolText = ToolTips[aTipID];		
		ixTooltip(oElem, ToolText);
		
	}
	
	
function ixTooltip(oElem, sMessage, xOffset, yOffset, handCursor) {
	/* Default offsets if none passed */
	if(typeof(xOffset) == "undefined") {
		var xOffset = -5;
	}
	if(typeof(yOffset) == "undefined") {
		var yOffset = 0;
	}
	
	if(oElem != null) {
		var curleft = curtop = 0;
		var elemWidth = oElem.offsetWidth;
		if(oElem.offsetParent) {
			do { curleft += oElem.offsetLeft; curtop += oElem.offsetTop; } 
			while (oElem = oElem.offsetParent);
		}
		var elemPos = new Array(curleft, curtop);

		var ixTooltipDiv = document.createElement("DIV");
		ixTooltipDiv.id = "ixTooltip";
		ixTooltipDiv.style.position = "absolute";
		ixTooltipDiv.style.zIndex = "9999";
		ixTooltipDiv.style.visibility = "hidden";
		ixTooltipDiv.innerHTML = "<div id='ixTooltipTop'></div>"
							   + "<div id='ixTooltipMid'>" + sMessage + "</div>"
							   + "<div id='ixTooltipBot'></div>";
		
		document.body.appendChild(ixTooltipDiv);
		var ixTooltipDivHeight = ixTooltipDiv.offsetHeight;
		ixTooltipDiv.style.left = ((elemPos[0] + elemWidth) + xOffset) + "px";
		ixTooltipDiv.style.top = (elemPos[1] - (ixTooltipDivHeight - yOffset)) + "px";
		ixTooltipDiv.style.visibility = "visible";		
	}
	else {
		var ixTooltipDiv = document.getElementById("ixTooltip");
		ixTooltipDiv.parentNode.removeChild(ixTooltipDiv);
	}
}