function insert_sort(obj)
{

document.getElementById('srt').value=obj.value;

document.getElementById('search_form_new').submit();

}
 function setupRemoveDefault() {
    var els = document.getElementsByTagName("input");
    for(var i=0,j=els.length; i<j; i++) {
     els[i].onclick = function () {removeDefault(this);}
    }    
   }
   function removeDefault(el) {
    if((!el.rel || el.value == el.rel) && (el.type == "text" || el.type == "")) {     el.rel = el.value;
     el.value = '';
     var elName = el.id;
     el.onblur = function () { if(!el.value) {addDefault(elName);}}
     return true;
    }
   }
   function addDefault(elName) {
		var el = document.getElementById(elName);
		var searched_model = document.getElementById('searched_model').value;
		if(searched_model == '')
		{
		el.value = el.rel;
		}
		else
		{
		el.value = 'Model';
		}
   }

function submit_form()
 {
  $('#compare').submit();
 }
 function save(list_id,list_location)
 {
var site_path = $('#site_path').val(); 

$.post(site_path+"/modules/module-get-ajax.php",{action:'list',list_id:list_id,location:list_location}, function(response){
       if(response)
	   {
		$('#div_saved_cart').html(response);
	   }
   });
 
 }
 
function img_delete(id,list_id)
{
var site_path = $('#site_path').val();	
$.post(site_path+"/modules/module-get-ajax.php",{action:'delete_record',list_id:list_id}, function(response){
       if(response)
	   {
		 $('#car_'+id).remove();
	   }
   });

}
