var nmax=6,
loc=window.location.href,
stat=loc.search(/\/stat\//),
auct=loc.search(/\/auc-online\//),
reg=/\/([0-9]+)\/$/i,
arr, data, coo;
if((arr=reg.exec(loc))!=null){
if(stat!=-1) data='s' + '_' +arr[1];
if(auct!=-1) data='a' + '_' +arr[1];
}
if(data){
coo=get_cookie('moto_recent');
if(coo){
coo=data + ',' + coo;
}else{
coo=data;
}
var codes=coo.split(',');
var uniqueCodes=[];
jQuery.each(codes, function(i, el){
if(jQuery.inArray(el, uniqueCodes)===-1&&i<=nmax) uniqueCodes.push(el);
});
set_cookie('moto_recent', uniqueCodes);
};