// JavaScript Document

/*
	textarea box in My iQ&A box.
 -upon page (body load), txtAreaInit is called, "Type your question here appears."
 -onclick (user clicks in text area), phrase disappears, and user can start typing stuff.
 -onblur (user clicks away from textarea), phrase reappears if user didn't type anything.
*/
function txtAreaInit(){

	document.getElementById("qTxtArea").style.fontFamily="arial";
	document.getElementById("qTxtArea").style.fontSize="12px";
	var txtInitFunction = function(){
		if(document.getElementById("qTxtArea").value == ""){
			document.getElementById("qTxtArea").style.color = "#999999";
			document.getElementById("qTxtArea").value = "Type your question here.";
			
		}
	};
	
	txtInitFunction();
	document.getElementById("qTxtArea").onblur= txtInitFunction;
	
	var txtAreaTxtFunction = function(){
		if(document.getElementById("qTxtArea").value == "Type your question here."){
			document.getElementById("qTxtArea").value = "";
			document.getElementById("qTxtArea").style.color = "";
		}
	}
	document.getElementById("qTxtArea").onclick = txtAreaTxtFunction;
}
