var TradingPass = (function(){
	var layout = $('#TradingPass'),
		confirmBtn = layout.find('.confirmBtn'),
		pwd = layout.find(':password'),
		closeBtn = layout.find('.pur5_mask_close');
	
	return {
		init: function(){
			$('#tradePass')[0].attachEvent('onenter', function(){
				confirmBtn.click();
			});
		},
		show: function(callBackFn){
			confirmBtn.unbind('click')
				.click(function(){
					callBackFn(pwd.val());
				});
				
			pur5.Pages.alert(layout[0]);
			$('#tradePass')[0].Focus();
		},
		hide: function(){
			closeBtn.click();
		}
	}
})();
TradingPass.init();