
/*pagination preloader*/

function click_refresh(id){
    new Request.HTML({
		url:$('refresh').getProperty('href'),
		update:"items",
		onComplete: function(){
				
		}
	}).send()
};



/* preload pagination next*/
function pagination_preloader(id,url,page_detail){
    /*
	if ($("product_list_preloader"))
        $('product_list_preloader').removeClass('hidden');
        
        $(id).addEvent("click",function(){
			new Request.HTML({
								url		: url,
								update	: page_detail,
                                onComplete: function(){
                                    document.ajax_history.start_up();
									if ($("product_list_preloader"))
                                        $('product_list_preloader').addClass('hidden');
                                }
                            }).send()
							
						});
    */
}


function pagination_preloader2(id,url,page_detail){
    /*
	$(id).addEvent("click",function(){
							
                            if ($('product_list_preloader'))
                                $('product_list_preloader').removeClass('hidden');
                            
                            if ($('product_list_preloader'))
                                $('product_list').getElements(".product_box").addClass('preload');
                            
                            
                            
                            if ($("table_preloader"))
                                $("table_preloader").removeClass("none");
                            if ($("products_table_view"))
                                $("products_table_view").addClass("table_preloader");
                            
                            new Request.HTML({
								url		: url,
								update	: page_detail,
								evalScripts: true,
								onComplete: function(){
									document.ajax_history.start_up(); 
									if ($('product_list_preloader'))
                                        $('product_list_preloader').addClass('hidden');
                                    
                                    if ($('product_list_preloader'))
                                        $('product_list').getElements(".product_box").removeClass('preload');
                            
                                    if ($("table_preloader"))
                                        $("table_preloader").addClass("none");
                                    if ($("products_table_view"))
                                        $("products_table_view").removeClass("table_preloader");
                            
                                    window.scroll(0,200)
									
								}
							}).send();
							
						});
    
    */
}


function history_preloader(){

	if ($('product_list_preloader'))
		$('product_list_preloader').removeClass('hidden');
	if ($('kon_items'))
		$('kon_items').addClass('pag_preload');
}

function history_preloader_disable(){
	if ($('product_list_preloader'))
		$('product_list_preloader').addClass('hidden');
	if ($('kon_items'))
		$('kon_items').removeClass('pag_preload');
}


