function mip_distort( s ) {
    return s.replace(/[a-zA-Z]/g, function(c) {
			return String.fromCharCode((c <= "Z" ? 90 : 122) >= (c = c.charCodeAt(0) + 13) ? c : c - 26);
		}
	);
}

function InitMemberInfoPanel( d ) {
	var opened = document.location.href.indexOf( "#langdetails" );
	if (opened>0) $("#langpairmatrix").css( "display" , "block" );
	MILDLink( (opened>0) );
	$("#bigpic").fancybox();
}

function MILDLink( o ) {
	var a = $("#ldetaillink");
	a.unbind( "click" );
	if (o) {
		a.bind( "click" ,  function() { HideMemberInfoLanguageDetails(); } );
		a.html( "&laquo; " + aJSLangDefs.details  );
	} else {
		a.bind( "click" , function() { ShowMemberInfoLanguageDetails(); } );
		a.html( aJSLangDefs.details + " &raquo;" );
	}
}

function ShowMemberInfoLanguageDetails() {
	$("#langpairmatrix").css( "display" , "block" );
	MILDLink( true );
}

function HideMemberInfoLanguageDetails() {
	$("#langpairmatrix").css( "display" , "none" );
	MILDLink( false );
}

function MILDShowEmail() {
	$("#show_email_link").css( "display" , "none" );
	$("#email_captcha_div").css( "display" , "block" );
}

function MILDShowCaptchaHide( id1 , id2 ) {
	$("#"+id1).css( "display" , "none" );
	$("#"+id2).css( "display" , "block" );
}

