var temp;

jQuery().ready(function(){
    $('input.change_state').each(function() {
        $(this).focus(function(){
            if ($(this).val() == text_from || $(this).val() == text_to)
            {
                temp = $(this).val();
                $(this).val('');
            }
        }).blur(function() {
            if ($(this).val() == '')
            {
                 if(temp != '')
                 {
                     $(this).val(temp);
                 }
                 
                 temp = '';
            }
        });
    });
});

function change_limit(old_val)
{ 
	val = $("#results_per_page").val();	
	matches = window.location.toString().match('results_per_page');
	if(matches != null)	
	{	
		window.location.href=window.location.href.replace('&results_per_page='+old_val,'&results_per_page='+val);		
	}
	else
	{
		window.location.href=window.location.href+'&results_per_page='+val;
	}
}