String.prototype.Trim = function() { 
	return this.replace(/(^\s*)|(\s*$)/g,""); 
} 
function addcomment(college_id){
		new Boxy("<div style='width:350px;'>错误内容：<br><textarea name='error_content' id='error_content' cols='47' rows='4'></textarea><br>正确内容：<br><textarea name='right_content' id='right_content' cols='47' rows='4'></textarea>&nbsp&nbsp<br><a class='sub' href='#'>提交<\/a> | <a href='#' class='close'>返回<\/a></div>", {
 		modal: true, 
 		unloadOnHide:true,
 		title:"我要纠错",
 		behaviours: function(c) {
 			c.find('.sub').click(function(){
 				var error_content = $('#error_content').val();
				var right_content = $('#right_content').val();
				var pid     = 21;
 					var search_str = /^[\w\-\.]+@[\w\-\.]+(\.\w+)+$/;
 					if(error_content.Trim() ==''){
 						alert('请填写“错误内容”');
 						$('#error_content').focus();
 					}else if (right_content.Trim() == '') {
						alert('请填写“正确内容”');
 						$('#right_content').focus();
					}else{
 						var para     = 'error_content='+error_content+'&right_content='+right_content+'&college_id='+college_id;
							$.ajax({
					 		url: '/ajax/collegeCorrection.html',
					 		type: 'POST',
					 		dataType: 'html',
					 		timeout: 2000,//超时时间设定
					 		data:para,     //参数设置
					 		error: function(){alert('系统忙，请重试！')},//错误处理，隐藏进度条
					 		success: function(html){
					 			if(html=='ok'){
					 				alert('纠错内容提交成功，谢谢您的参与');
					 				Boxy.get(c.find('a:first')).hide();
					 				window.location.reload();
						 		}else{
						 			alert('服务器忙请重试');
						 		}
					 		}
						});
 					} 		
 			});
 		}
 	}); 
}