function SetFocusFirst() 
{
	var def = document.getElementById("search");
	if(!FocusFirst(document, def) && typeof(def) != 'undefined' && def != null)
	{
	//	def.focus();
	//IF search box should be focused if nothing else is found
	}
}

function FocusFirst(node, skipnode)
{
	for( var x = 0; node.childNodes[x]; x++ )
	{
		var currentNode = node.childNodes[x];
		if(currentNode != skipnode && currentNode.type != "hidden" && currentNode.name != "")
		{
		    if ((currentNode.tagName == "INPUT" && currentNode.type != "radio") || currentNode.tagName == "TEXTAREA")// || currentNode.tagName == "SELECT")
		    {
		        currentNode.focus();
		        return true;
		    }
		    else if (currentNode.type != "radio")
		        return true; //If the first we encounter is radio we drop the focus
		}	
		if(FocusFirst(currentNode, skipnode))
			return true;
	}
	return false;
}