/*
	var i=0;

	window.hot_timeout_id=0;
		
	function fadeInDone(obj)
	{
		var fadeOut1=function(){fadeOut(obj)};
		window.hot_timeout_id=setTimeout(fadeOut1, 5000);
	}
		
	function fadeOutDone(obj)
	{
		i++;
		if (i>=10)
			i=0;
		obj=col.get(i);
		fadeIn(obj);
	}
	
	function fadeOut(obj)
	{
		var fadeOutDone1 = function(){fadeOutDone(obj)};
		$j(obj).fadeOut("slow", fadeOutDone1);
	}
		
	function fadeIn(obj)
	{
		var fadeInDone1 = function(){fadeInDone(obj)};
		$j(obj).fadeIn("slow", fadeInDone1);
	}
	
	function GoTop10()
	{
		var loading_img = new Image();
		loading_img.src = '/img3/loading_animation.gif';
		col=$j('#whats-hot div.top10'); // get collection
		obj=col.get(0);
		fadeIn(obj);
	}


	function checkFPMainForm()
	{
		if ($("mpquery").value=="")
		{
			alert("Please enter a search term");
			return false;
		}
	
		if ((!$('EB_cb').checked) && (!$('AM_cb').checked) && (!$('GB_cb').checked) && (!$('SP_cb').checked) && (!$('YS_cb').checked))
		{
			alert("Sorry, you must select at least once source");
			return false;
		}
	}




	window.r_timeout_id=0;
	
	*/
	
	function requestAsType(objInput)
	{
		var delay = 1000; 
		if (objInput.value.length>=3)
		{
			clearTimeout(window.r_timeout_id);
			window.r_timeout_id = window.setTimeout(
				function(){
					var lStr1 = 'action=requestastype&keyword=' + objInput.value;
					var res=sendXmlHttpRequest('/search.php', lStr1);
					if (res!='')
					{
						$('whats-hot').style.display='none';
						var obj=$('indexmainspace');
						obj.style.display='block';
						obj.innerHTML=res;
						obj.style.backgroundImage='none';
					}
					clearTimeout(window.r_timeout_id);
				}
			, delay);
		}
		else
		{
			$('indexmainspace').style.display='none';
			$('indexmainspace').innerHTML='';
			$('indexmainspace').style.backgroundImage='url(/img2/loading.gif)';
		}
	}
	
	
