//全部选择/取消
function alldel2(tot){

	for(i=0;i<tot;i++){
		if(!document.getElementById('mail_a2['+i+']').checked){
			document.getElementById('mail_a2['+i+']').checked = true;
		}
	}
	return false;
}
// 反选
function overdel2(tot){
	for(i=0;i<tot;i++){
		if(!document.getElementById('mail_a2['+i+']').checked){
			document.getElementById('mail_a2['+i+']').checked = true;
		}else{
			document.getElementById('mail_a2['+i+']').checked = false;
		}
	}
	return false;
}

function del2(tot){
var rd=Array();
	for(i=0,j=0;i<tot;i++){
		if(!document.getElementById('mail_a2['+i+']').checked){


		}else{
			
				rd[j]=document.getElementById('mail_a2['+i+']').value;
j++;
			
		}
	}
for(j=0;j<rd.length;j++){
note_address(rd[j]);
}
	return false;
}

function note_address(note_address){
	var ids;
	ids=document.getElementById('mess').value;
if(ids==""){		//判断在文本框中是否存在重复的值
document.getElementById('mess').value=note_address;
}else{
document.getElementById('mess').value=ids+','+note_address;
}
return false;
}