function order_customer_operation(type,val,val2) {
	if (type=='pagination') {
		var trim='';
		trim+='type='+type;
		trim+='&af_pag='+val;
		Ejax(window.siteurl+'includes/ajax_php/orders_op.php',trim,'divHistoryOrders');
	}
}
function order_sms_customer_operation(type,val,val2) {
	if (type=='pagination') {
		var trim='';
		trim+='type='+type;
		trim+='&af_pag='+val;
		Ejax(window.siteurl+'includes/ajax_php/orders_sms_op.php',trim,'divHistoryOrdersSms');
	}
}
function auctions_customer_operation(type,val,val2) {
	if (type=='pagination') {
		var trim='';
		trim+='type='+type;
		trim+='&af_pag='+val;
		Ejax(window.siteurl+'includes/ajax_php/auctions_op.php',trim,'divAuctionsWins');
	}
	if (type=='refuza') {
		if (confirm('Esti sigur ca vrei sa refuzi produsul?')) {
			var trim='';
			trim+='type='+type;
			trim+='&id='+val;
			trim+='&af_pag='+eurl($val('page'));
			Ejax(window.siteurl+'includes/ajax_php/auctions_op.php',trim,'divAuctionsWins');
		}
	}
	if (type=='plateste') {
		AjaxW('x='+val,window.siteurl+'includes/windows/win_payment_method.php','payment_method',
		'Alege metoda de plata',350,250,0,0,1);
	}
	if (type=='confirmaPlata') {
		if ($val('paymentMethod')=='') {
			eroare('Va rugam selectati metoda de plata!',220,50);
		} else if ($val('paymentMethod')==0) {
			window.location='confirma-plata-produs.html?x='+val;
		} else if ($val('paymentMethod')==1) {
			window.location='process.html?x='+val;
		}else if ($val('paymentMethod')==2) {
			var trim='';
			trim+='type='+type;
			trim+='&id='+val;
			trim+='&af_pag='+eurl($val('page'));
			Ejax(window.siteurl+'includes/ajax_php/auctions_op.php',trim,'divAuctionsWins');
			NSS_winClose('payment_method');
		} else {
			eroare('Eroare! Va rugam incercati din nou!',220,50);
		}
	}
//	if (type=='confirmaPlata') {
//		if ($val('paymentMethod')=='') {
//			eroare('Va rugam selectati metoda de plata!',220,50);
//		} else if ($val('paymentMethod')==0) {
//			window.location='confirma-plata-produs.html?x='+val;
//		} else if ($val('paymentMethod')==1) {
//			var trim='';
//			trim+='type='+type;
//			trim+='&id='+val;
//			trim+='&af_pag='+eurl($val('page'));
//			Ejax(window.siteurl+'includes/ajax_php/auctions_op.php',trim,'divAuctionsWins');
//			NSS_winClose('payment_method');
//		} else {
//			eroare('Eroare! Va rugam incercati din nou!',220,50);
//		}
//	}
}
function termeni_op(tip,val,val2) {
	AjaxW('',window.siteurl+'includes/windows/win_terms.php','','Termeni si conditii',900,530,0,0,1);
}
function onlineUsers() {
	//Ejax(window.siteurl+'includes/ajax_php/online_users.php','','0')
	XHConn(window.siteurl+'includes/ajax_php/online_users.php','GET','');
	setTimeout("onlineUsers()",5000);
}
function refreshCredite() {
	var trim='';
	Ejax(window.siteurl+'includes/ajax_php/credits.php',trim,'user_credits');
	setTimeout("refreshCredite()",1000);
}