$(document).ready(function()
{
	var objkeys=$("#keys");
	if(objkeys.length<=0)
	{
		objkeys=$("#keyword");
	}	
	if(objkeys.length>0)
	{
		if(objkeys.attr("disabled") != "disabled")
		{
		objkeys.focus();
		}
	}
	objkeys.focus(function()
	{
		objkeys.select();
	});	
	if(!isEmpty(objkeys))
	{
		if(!objkeys.disabled)
		{
		objkeys.focus();
		}
	}
	$.each($(".grid tr"), function (){
		$(this).mouseover(function(){$(this).css("background","#fff");});
		$(this).mouseleave(function(){$(this).css("background","#EEF7FD");});
	});	
	$.each($("table input[type=text],table select.dropdown"), function (){
		$(this).keypress(function(e){
		if (e.which == 13) {
			var inputs = $("table input[type=text],table select.dropdown");
			var idx = inputs.index(this);
			if (idx < inputs.length)
			{
				var next=$(inputs[idx+1]);
				if(next.is(":visible")==false)
				{
					next=$(inputs[idx+2]);
					if(next.is(":visible")==false)
					{
						next=$(inputs[idx+3]);
					}
				}
				next.focus();
			}
			return false;
		}
		});
	});	
});

