function showHide(whichLayer,val)
{

	if (document.getElementById)
	{

		// this is the way the standards work

		var style2 = document.getElementById(whichLayer).style;
		if(val == "Yes")
		{
			style2.display = "none";
		}else
		{
			style2.display = "block";
		}

	}
	else if (document.all)
	{
		// this is the way old msie versions work

		var style2 = document.all[whichLayer].style;
		if(val == "Yes")
		{
			style2.display = "none";
		}else
		{
			style2.display = "block";
		}

	}
	else if (document.layers)
	{

		// this is the way nn4 works
	
		var style2 = document.layers[whichLayer].style;
		if(val == "Yes")
		{
			style2.display = "none";
		}else
		{
			style2.display = "block";
		}

	}

}



function showNameFields(nametype)
{

	var i;
	var str;

	if(nametype == "adultno")
	{

		if(document.getElementById("adultno").value != "")
		{

		var adultno = parseInt(document.getElementById("adultno").value);

		str = "";

		for(i = 0;i < adultno;i++)
		{
			str = str + "<input type='text' name='adultname" + i + "' id='adultname" + i + "' class='textfield' value='";
			if(eval(document.getElementById("adultname" + i)) || (document.getElementById("adultname" + i) != 'undefined' && document.getElementById("adultname" + i) != null))
			{
				str = str + document.getElementById("adultname" + i).value;
			}
			str = str + "' /><br/>"
		}

		if(adultno <= 1)
		{
			str = "N/A";
		}

		}else
		{

			str = "<i>Please select the number of adults above</i>";

		}

		document.getElementById("adultnames").innerHTML = str;
	
	}else if(nametype == "childrenno")
	{

		if(document.getElementById("childrenno").value != "")
		{

		var childrenno = parseInt(document.getElementById("childrenno").value);

		str = "";

		for(i = 1;i <= childrenno;i++)
		{
			str = str + "<input type='text' name='childname" + i + "' id='childname" + i + "' class='textfield-childname' value='";
			if(eval(document.getElementById("childname" + i)) || (document.getElementById("childname" + i) != 'undefined' && document.getElementById("childname" + i) != null))
			{
				str = str + document.getElementById("childname" + i).value;
			}
			str = str + "' />"

			str = str + "<input type='text' name='childage" + i + "' id='childage" + i + "' class='textfield-childage' value='";
			if(eval(document.getElementById("childage" + i)) || (document.getElementById("childage" + i) != 'undefined' && document.getElementById("childage" + i) != null))
			{
				str = str + document.getElementById("childage" + i).value;
			}
			str = str + "' /><br/>"
		}

		if(childrenno == 0)
		{
			str = "N/A";
		}

		}else
		{

			str = "<i>Please select the number of children above</i>";

		}

		document.getElementById("childrennames").innerHTML = str;
	
	}

}