// show DHTML pop-up box

function displayInfo(boxType,objId) {
	var obj = document.getElementById(objId);
	var tmpStr = "";
// clean this up...	var tmpStr2 = "";
	if (boxType == "info") 
	{
	tmpStr += "<div class=\"popBox\">\n";
	tmpStr += "<div class=\"popArrow\"></div>\n";
	tmpStr += "<div class=\"popText\">\n";
		tmpStr += "<span class=\"left dkblue b txt13\">Ask a Question</span> \n";
		tmpStr += "<span class=\"right close txt11\"><a href=\"javas" + "cript:closeBox('" + objId + "')\" class=\"close\">Close X</a></span>\n";
		tmpStr += "<div class=\"reset\"></div>\n";
		tmpStr += "Use this box like a search box: Enter either a full question or enter keywords that will bring up related content.";
	tmpStr += "</div>\n";
	tmpStr += "</div>";
	}
	
	else if (boxType == "info2") 
	{
	tmpStr += "<div class=\"popBox2\">\n";
	tmpStr += "<div class=\"popArrow\"></div>\n";
	tmpStr += "<div class=\"popText\">\n";
		tmpStr += "<span class=\"left dkblue b txt13\">Ask a Question</span> \n";
		tmpStr += "<span class=\"right close txt11\"><a href=\"javas" + "cript:closeBox('" + objId + "')\" class=\"close\">Close X</a></span>\n";
		tmpStr += "<div class=\"reset\"></div>\n";
		tmpStr += "Use this box like a search box: Enter either a full question or enter keywords that will bring up related content.";
	tmpStr += "</div>\n";
	tmpStr += "</div>";
	}	

	else if (boxType == "info3") 
	{
	tmpStr += "<div class=\"popBox3\">\n";
	tmpStr += "<div class=\"popArrow\"></div>\n";
	tmpStr += "<div class=\"popText\">\n";
		tmpStr += "<span class=\"left dkblue b txt13\">Ask a Question</span> \n";
		tmpStr += "<span class=\"right close txt11\"><a href=\"javas" + "cript:closeBox('" + objId + "')\" class=\"close\">Close X</a></span>\n";
		tmpStr += "<div class=\"reset\"></div>\n";
		tmpStr += "Use this box like a search box: Enter either a full question or enter keywords that will bring up related content.";
	tmpStr += "</div>\n";
	tmpStr += "</div>";
	}	

	else if (boxType == "info4") 
	{
	tmpStr += "<div class=\"popBox4\">\n";
	tmpStr += "<div class=\"popArrow\"></div>\n";
	tmpStr += "<div class=\"popText\">\n";
		tmpStr += "<span class=\"left dkblue b txt13\">Ask a Question</span> \n";
		tmpStr += "<span class=\"right close txt11\"><a href=\"javas" + "cript:closeBox('" + objId + "')\" class=\"close\">Close X</a></span>\n";
		tmpStr += "<div class=\"reset\"></div>\n";
		tmpStr += "Use this box like a search box: Enter either a full question or enter keywords that will bring up related content.";
	tmpStr += "</div>\n";
	tmpStr += "</div>";
	}
	
	obj.innerHTML = tmpStr;
}

function addSource() {
	comments += 1;
	var tmpStr = "";
	
	tmpStr += "<div class=\"popBox5\">\n";
	tmpStr += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"3\" style=\"overflow:hidden;\">";
	tmpStr += "<tr>\n"; 
	tmpStr += "<td class=\"b rt\">Source Title:</td>";
	tmpStr += "<td><input type=\"text\" name=\"sourceTitle" + comments + "\" /></td>";
	tmpStr += "</tr>\n<tr>";
	tmpStr += "<td class=\"b rt\">Source Link:</td>";
	tmpStr += "<td><input type=\"text\" name=\"sourceLink" + comments + "\" value=\"http://\" /></td>";
	tmpStr += "</tr>";
	tmpStr += "</table>";				
	tmpStr += "</div>";
	
	new Insertion.Before('moreBox', tmpStr);
	
	if(comments == comments_limit) {
		$('closeMe').hide();
	}
}


// hide DHTML pop-up box
function closeBox(objId) {
	var obj = document.getElementById(objId);
	obj.innerHTML = "";
	obj.className = "hidden";
}

// hide the Add Another Source link when clicked
function hideshow(which){
	if (!document.getElementById)
	return
	if (which.style.display=="block")
	which.style.display="none"
	else
	which.style.display="block"
}