	//Clear the default value if it's still there, and make the text black.
	function removeValue(input, text)
	{
		if (input.value == text)
		{
			input.value = "";
			input.style.color = "#000000";
		}
	}
	
	
	
	//Replace the default value if necessary, and make the text gray.
	function replaceValue(input, text)
	{
		if (input.value == "")
		{
			input.value = text;	
			input.style.color = "#aaaaaa";
		}
	}
	
	
	//Add escape characters
	function addSlashes(str) 
	{
		str=str.replace(/\\/g,'\\\\');
		str=str.replace(/\'/g,'\\\'');
		str=str.replace(/\"/g,'\\"');
		str=str.replace(/\0/g,'\\0');
		return str;
	}
	
	
	//Remove escape charactesr
	function stripSlashes(str) 
	{  
		str=str.replace(/\\'/g,'\'');
		str=str.replace(/\\"/g,'"');
		str=str.replace(/\\0/g,'\0');
		str=str.replace(/\\\\/g,'\\');
		return str;
	}

	
	//Check the quiz submission
	function quizCheck()
	{
		for (var i = 0; i < document.quiz.choice.length; i++)
		{
			if (document.quiz.choice[i].checked)
				return true;
		}
		return false;
	}
	
	
	
	
	
	//Hide the header
	function hideHeader()
	{		
		document.getElementById('headerScroll').style.top = "-20px";
		document.getElementById('headerScroll').style.opacity = ".3";
		document.getElementById('headerScroll').style.filter = 'alpha(opacity=30)';
	}
	
	function headerUp()
	{
		var header = document.getElementById('headerScroll');
		var top = header.offsetTop;

		if (top > -20)
		{
			header.style.top = top - 1 + "px";
			var opacity = ((top  + 20) * 0.04) + .3;
			header.style.opacity = opacity;
			header.style.filter = 'alpha(opacity=' + opacity * 100 + ')';
			var up = setTimeout('headerUp()', 50);
		}
	}
	
	
	//Show the header
	function showHeader()
	{			
		document.getElementById('headerScroll').style.top = "0px";
		document.getElementById('headerScroll').style.opacity = "1";
		document.getElementById('headerScroll').style.filter = 'alpha(opacity=100)';
	}
	
	function headerDown()
	{
		var header = document.getElementById('headerScroll');
		var top = header.offsetTop;

		if (top < 0)
		{
			header.style.top = top + 1 + "px";
			var down = setTimeout('headerDown()', 50);
		}		
	}
	
	
	//Load the header with a 10 second delay on hiding it
	function headerLoad()
	{
		if (document.getElementById('headerScroll').offsetTop == 0)
			headerUp();
	}
