/**
 * wow if we write updates to this file here ?
 * @author Saurabh Gandhe
 * This file is included in includes.inc.php.
 * this should have the general function and utillities that you use on multiple pages. i had one file general_utilities.js but for some reason i made this another one.
 * created: Feb 24 ,2009
 */


 function remove_fav_book(book_id,user_id){ //this function is used on dashboard. keep in mind when modify it for book-profile too.
 	$.post("includes/my_ajax_functions.php", {
                    book_id: book_id,
                    user_id: user_id,
                    action: "remove_fav_book"
                }, function(remove_fav_book_results){
//                    $("#remove_fav_book_results").html(remove_fav_book_results);//umm something ... no time for
                    $("#user_fav_book_"+book_id).html(remove_fav_book_results);
					
                });

 }
 function auto_search_field(field_name,field_value,table_name){
       //alert('dsf');
	$.post("../includes/my_ajax_functions.php", {
        field_name: field_name,
        field_value: field_value,
        table_name: table_name+'s',
        action: "check_if_duplicate"
    }, function(auto_search_field){
        $('#' + field_name + '_search_results').html(auto_search_field+'dfsd');
    });
    
    return false;
}

