	function findPos(obj) 
	{
		var curleft = curtop = 0;
		if (obj.offsetParent) 
		{
			curleft = obj.offsetLeft
			curtop = obj.offsetTop
			while (obj = obj.offsetParent) 
			{
				curleft += obj.offsetLeft
				curtop += obj.offsetTop
			}
		}
		return [curleft,curtop];
	}

	function ajaxInfoBox()
	{
		closeInfoBox();
		var infoBoxMSG = initAjaxMessage();
		sendAjaxMessage("GET","widgets/search/mega_search.inc.html",function(){spawnInfoBox(infoBoxMSG);},infoBoxMSG);
	}

	function spawnInfoBox(infoBoxMSG)
	{
		if(infoBoxMSG.readyState==4&&infoBoxMSG.status==200)
		{
			var InfoBoxDiv = document.createElement("div");
			var InfoBoxDivShadow = document.createElement("div");
			var coords = findPos($("searchBox"));
			$("searchBox").style.display="none";
			InfoBoxDiv.id="infoBoxDiv";
			InfoBoxDivShadow.id="infoBoxDivShadow";

			InfoBoxDiv.style.left=coords[0]+"px";
			InfoBoxDiv.style.top=coords[1]+"px";
			InfoBoxDiv.innerHTML=infoBoxMSG.responseText;

			InfoBoxDivShadow.style.left=(coords[0]+2)+"px";
			InfoBoxDivShadow.style.top=(coords[1]+2)+"px";

			document.body.appendChild(InfoBoxDiv);
			document.body.appendChild(InfoBoxDivShadow);

			$("search_terms").value = $("searchBox").value;
		}
	}

	function closeInfoBox()
	{
		if($("infoBoxDiv"))
		{
			$("searchBox").value = $("search_terms").value;
			document.body.removeChild($("infoBoxDiv"));
			document.body.removeChild($("infoBoxDivShadow"));
			$("searchBox").style.display="inline";
		}
	}
