function RenderTranslatorBox( id , datas ) {
	// make link
	var _a = $("<a></a>");
	_a.attr( "href" , datas.member.member_url );
	_a.attr( "target" , "_blank" );
	_a.attr( "class" , "nrmorange" );
	_a.html( datas.member.localized_name );
	$("#"+id+"_link").html( _a );

	var _img = $("<img></img>");
	if (typeof datas.member.thumburlwww != "undefined") {
		_img.attr( "src" , datas.member.thumburlwww );
	} else {
		_img.attr( "src" , "/images/nopic.png" );
	}
	$("#"+id+"_img").html( _img );
	$("#"+id+"_wl").html( datas.member.languages );
}

function InitTranslatorBox( id , datas ) {
	$("#"+id).data( "datas" , datas );
	RenderTranslatorBox( id , datas );
}

function TranslatorBoxPostEvent( id , evt_type ) {
	$.ajax(
		{
			type: "POST",
			cache: false,
			data: (
				{
					inajax : 1,
					ajaxevent : evt_type,
					ajaxtarget : id,
					member_id : $("#"+id).data( "datas" ).member.member_id,
					member_type : $("#"+id).data( "datas" ).member.member_type
				
				}
			),
			success: function(ret) {
				var datas = eval( ret );
				$("#"+id).data( "datas" , datas );
				RenderTranslatorBox( id , datas );
			}
		}
	);
}

function TranslatorBoxNext( id ) {
	TranslatorBoxPostEvent( id , "translatorbox_next" );
}

function TranslatorBoxPrev( id ) {
	TranslatorBoxPostEvent( id , "translatorbox_prev" );
}
