<!--
function dec_quotes(str){
	var lastIndex = 0;
	for(lastIndex=0;;lastIndex++){
		if((lastIndex = str.indexOf("!21", lastIndex))<0)break;
		str = str.substring(0, lastIndex) + "!" + str.substring(lastIndex+3, str.length);
	}
	for(lastIndex=0;;lastIndex++){
		if((lastIndex = str.indexOf("!60", lastIndex))<0)break;
		str = str.substring(0, lastIndex) + "'" + str.substring(lastIndex+3, str.length);
	}
	for(lastIndex=0;;lastIndex++){
		if((lastIndex = str.indexOf("!22", lastIndex))<0)break;
		str = str.substring(0, lastIndex) + '"' + str.substring(lastIndex+3, str.length);
	}
	for(lastIndex=0;;lastIndex++){
		if((lastIndex = str.indexOf("!E7", lastIndex))<0)break;
		str = str.substring(0, lastIndex) + "~" + str.substring(lastIndex+3, str.length);
	}
	return str;
}
function do_copy(sel)
{
	var i;
	for (i=0; i<sel.options.length; i++){
		if (sel.options[i].selected==true){
				document.addrbook.abook_edit.value = sel.options[i].value;
		}
	}
	document.addrbook.process.value = "addr_only";
	document.addrbook.cmd.value = "msg_new";
	document.addrbook.submit();
}
function pasteChecked(){
	var form = document.addrbook.elements;
	for(var i=0; i<form.length; i++){
		if(form[i].name.substr(0,4) == "sel_"){
			if(form[i].checked){
				if(form[i].name.substr(4,3) == "to_"){
					if (opener.self.document.sendform.to.value != ""){
						opener.self.document.sendform.to.value = ", " + opener.self.document.sendform.to.value;
					}
					value = full_folder_list[ form[i].name.substring(7,form[i].name.length) ];
					opener.self.document.sendform.to.value = dec_quotes(value) + opener.self.document.sendform.to.value;
				}
				else if(form[i].name.substr(4,3) == "cc_"){
					if (opener.self.document.sendform.cc.value != ""){
						opener.self.document.sendform.cc.value = ", " + opener.self.document.sendform.cc.value;
					}
					value = full_folder_list[ form[i].name.substring(7,form[i].name.length) ];
					opener.self.document.sendform.cc.value = dec_quotes(value) + opener.self.document.sendform.cc.value;
				}
				else if(form[i].name.substr(4,4) == "bcc_"){
					if (this.opener.self.document.sendform.bcc.value != ""){
						opener.self.document.sendform.bcc.value = ", " + opener.self.document.sendform.bcc.value;
					}
					value = full_folder_list[ form[i].name.substring(8,form[i].name.length) ];
					opener.self.document.sendform.bcc.value = dec_quotes(value) + opener.self.document.sendform.bcc.value;
				}
			}
		}
	}
}
function pressnick(value)
{
	var field = document.addrbook.field.value;
	var form = opener.self.document.sendform;
	if (field == "to"){
		if (form.to.value != "")
			form.to.value = ", " + form.to.value;
		form.to.value = dec_quotes(value) + form.to.value;
	}
	else if (field == "cc"){
		if (form.cc.value != "")
			form.cc.value = ", " + form.cc.value;
		form.cc.value = dec_quotes(value) + form.cc.value;
	}
	else if (field == "bcc"){
		if (form.bcc.value != "")
			form.bcc.value = ", " + form.bcc.value;
		form.bcc.value = dec_quotes(value) + form.bcc.value;
	}
	opener.focus();
	window.close();
}
//-->