expes.initRecommend=function(){
	var pros=$$('.a_Recommend').getProperty('rel').toString();
	var arr=pros.split('-');
	var type=arr[0];
	var id=arr[1];
	var uid=arr[2];
	$$('.a_Recommend').addEvent('click',function(){
		showDialog(null);
		var domStr='<form id="rform" action="/u/user/recommend_act" method="post"><div style="padding:0 10px;">推荐语：<br><textarea name="introduce" class="input_blur txt_area" style="height:80px;width:98%;"></textarea><input type="hidden" name="rtype" value="'+type+'"></input><input type="hidden" name="recid" value="'+id+'"></input></div><div style="text-align:center;"><input type="submit" value="推荐"></input></div></form>';
		if(uid>0){
			switch(type){
				case 'group':
				var jsonRequest = new Request.JSON({url: '/json.php?r='+type+'&gid='+id, onComplete: function(jsonObj){
					var groups=jsonObj.group;
					$('dialog').set('html',dialogCloseStr('推荐'+groups[0].name+'小组')+domStr);
					setOverlay();
					handleRec();
				}}).get();
				break;
				case 'group_topic':
				var jsonRequest = new Request.JSON({url: '/json.php?r='+type+'&tid='+id, onComplete: function(jsonObj){
					var topics=jsonObj.topic;
					$('dialog').set('html',dialogCloseStr('推荐小组话题：'+topics[0].title)+domStr);
					setOverlay();
					handleRec();
				}}).get();
				break;
				case 'event':
				var jsonRequest = new Request.JSON({url: '/json.php?r='+type+'&event_id='+id, onComplete: function(jsonObj){
					var events=jsonObj.event;
					$('dialog').set('html',dialogCloseStr('推荐活动：'+events[0].topic)+domStr);
					setOverlay();
					handleRec();
				}}).get();
				break;
				case 'event_topic':
				var jsonRequest = new Request.JSON({url: '/json.php?r='+type+'&atid='+id, onComplete: function(jsonObj){
					var topics=jsonObj.topic;
					$('dialog').set('html',dialogCloseStr('推荐活动讨论：'+topics[0].title)+domStr);
					setOverlay();
					handleRec();
				}}).get();
				break;
				case 'blog':
				var jsonRequest = new Request.JSON({url: '/json.php?r='+type+'&article_id='+id, onComplete: function(jsonObj){
					var topics=jsonObj.blog;
					$('dialog').set('html',dialogCloseStr('推荐日志：'+topics[0].title)+domStr);
					setOverlay();
					handleRec();
				}}).get();
				break;
				case 'video':
				var jsonRequest = new Request.JSON({url: '/json.php?r='+type+'&vid='+id, onComplete: function(jsonObj){
					var videos=jsonObj.video;
					$('dialog').set('html',dialogCloseStr('推荐视频：'+videos[0].topic)+domStr);
					setOverlay();
					handleRec();
				}}).get();
				break;
			}
		}else {
			window.location.href='/signin';
		}
	});
}
function handleRec(){
	window.addEvent("domready",function(){
		$("rform").addEvent("submit",function(e){
			new Event(e).stop();
			$("rform").set('send',{onComplete:function(){
				if(this.response.text=='1'){
					$('dialog').set('html','<h2 style="text-align:center">推荐成功</h2>');
					setOverlay();
					if($('reccount')){
						$('reccount').set('html',$('reccount').get('html')*1+1);
					}
				}else{
					$('dialog').set('html','<h2 style="text-align:center">发生未知错误'+this.response.text+'</h2>');
					setOverlay();
				}
				$('dialog','overlay').fade();
				setTimeout(closeDialog, 1000);
			}}).send();
		});
	});
}