

function UpdateQuantityBonusList(sms_payment_path, idc, ido){
	$.ajax({
		type: 'GET',
		url: sms_payment_path+'/getquantitybonus.php',
		data: 'idc='+idc+'&ido='+ido,
		beforeSend: function(){
			$('.quantitybonus').html('<img src="'+sms_payment_path+'/images/loading.gif">');
			$('.numbers').html('');
		},
		success: function(response){
			$('.quantitybonus').html(response);
		}
	});
	return false;
}

function UpdateNumberList(sms_payment_path, idc, ido, quantitybonus, character, gameserver ){
	$.ajax({
		type: 'GET',
		url: sms_payment_path+'/getnumbers.php',
		data: 'idc='+idc+'&ido='+ido+'&quantitybonus='+quantitybonus+'&gameserver='+gameserver+'&character='+encodeURI(character),
		beforeSend: function(){
			$('.numbers').html('<img src="'+sms_payment_path+'/images/loading.gif">');
		},
		success: function(response){
			$('.numbers').html(response);
		}
	});
	return false;
}

function ResetForm() {
/*	$('.opsoslist').html('');  */

}



function send_mess_zn(script_path, messages_view, id_login, mess){
	$.ajax({
		type: 'GET',
		url: script_path+'/send_mess.php',
		dataType: 'html',
    data: 'messages_view='+messages_view+'&id_login='+id_login+'&mess='+encodeURI(mess),
		beforeSend: function(){
			 $('#us_result').html('<img src="'+script_path+'/images/loading.gif" height="14">');
		},
		success: function(response){
			//alert(response);
			$('#us_result').html(response);
			$('#message_text').val('');
		},
		error: function(responce) {
			alert('error');
		}
	});
	return false;
}



function view_konfig(script_path, marka){
	$.ajax({
		type: 'GET',
		url: script_path+'/search_view.php',
		dataType: 'html',
    data: 'marka='+marka,
		beforeSend: function(){
			/* $('#us_result1').html('<img src="'+script_path+'/images/loading.gif">'); */
		},
		success: function(response){
			//alert(response);
			$('#rez_block').html(response);
		},
		error: function(responce) {
			alert('error');
		}
	});
	return false;
}

function view_refresh_naimenovanie(script_path, marka){
	$.ajax({
		type: 'GET',
		url: script_path+'/naimenovanie.php',
		dataType: 'html',
    data: 'marka='+marka,
		beforeSend: function(){
			
		},
		success: function(response){
			
			$('#naimenovanie').html(response);
		},
		error: function(responce) {
			alert('error');
		}
	});
	return false;
}

/*
function refresh_poisk_form(script_path, model, pered_zad, kuzov, verh_niz, dvigatel, pravo_levo, nomer, cvet){
	$.ajax({
		type: 'GET',
		url: script_path+'/search_posicii.php',
		dataType: 'html',
    data: 'model='+model+'&pered_zad='+pered_zad+'&kuzov='+kuzov+'&verh_niz='+verh_niz+'&dvigatel='+dvigatel+'&pravo_levo='+pravo_levo+'&nomer='+nomer+'&cvet='+cvet,
		beforeSend: function(){
		},
		success: function(response){

			$('#rez_block_search').html(response);
		},
		error: function(responce) {
			alert('error');
		}
	});
	return false;
}

*/


function view_poisk(script_path, model, kuzov, dvigatel, nomer, marka, page){
	$.ajax({
		type: 'GET',
		 url: script_path+'/search_posicii.php', 
		dataType: 'html',
		data: 'marka='+marka+'&model='+model+'&kuzov='+kuzov+'&dvigatel='+dvigatel+'&nomer='+nomer+'&page='+page,
		beforeSend: function(){
			/* $('#us_result1').html('<img src="'+script_path+'/images/loading.gif">'); */
		},
		success: function(response){

			$('#rez_block_search').html(response);
		},
		error: function(responce) {
			alert('error view poisk');
		}
	});
	return false;
}


function refresh_poisk_form(script_path, model, kuzov, dvigatel, nomer, n, marka){
	$.ajax({
		type: 'GET',
		url: script_path+'/search_view_refresh.php',
		dataType: 'html',
		data: 'marka='+marka+'&model='+model+'&kuzov='+kuzov+'&dvigatel='+dvigatel+'&nomer='+nomer+'&n='+n,
		beforeSend: function(){
			/* $('#us_result1').html('<img src="'+script_path+'/images/loading.gif">'); */
		},
		success: function(response){
			//alert(response);
			$('#rez_block').html(response);
		},
		error: function(responce) {
			alert('error');
		}
	});
	return false;
}



function view_search_naimenovanie(script_path, naimen, marka, model, kuzov, dvigatel, nomer,  page){
	$.ajax({
		type: 'POST',
		url: script_path+'/naimen_search.php',
		dataType: 'html',
		data: 'naimen='+naimen+'&marka='+marka+'&model='+model+'&kuzov='+kuzov+'&dvigatel='+dvigatel+'&nomer='+nomer+'&page='+page,
		beforeSend: function(){
			/* $('#us_result1').html('<img src="'+script_path+'/images/loading.gif">'); */
		},
		success: function(response){

			$('#rez_block_search').html(response);
		},
		error: function(responce) {
			alert('error');
		}
	});
	return false;
}

