<!--
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].name.substr(4,3) == "to_"){
				if(form[i].checked){
					if (opener.self.document.sendform.to.value != ""){
						opener.self.document.sendform.to.value = ", " + opener.self.document.sendform.to.value;
					}
					opener.self.document.sendform.to.value = dec_quotes(form[i].name.substring(7,form[i].name.length)) + opener.self.document.sendform.to.value;
				}
			}
			else if(form[i].name.substr(4,3) == "cc_"){
				if(form[i].checked){
					if (opener.self.document.sendform.cc.value != ""){
						opener.self.document.sendform.cc.value = ", " + opener.self.document.sendform.cc.value;
					}
					opener.self.document.sendform.cc.value = dec_quotes(form[i].name.substring(7,form[i].name.length)) + opener.self.document.sendform.cc.value;
				}
			}
			else if(form[i].name.substr(4,4) == "bcc_"){
				if(form[i].checked){
					if (this.opener.self.document.sendform.bcc.value != ""){
						opener.self.document.sendform.bcc.value = ", " + opener.self.document.sendform.bcc.value;
					}
					opener.self.document.sendform.bcc.value = dec_quotes(form[i].name.substring(8,form[i].name.length)) + opener.self.document.sendform.bcc.value;
				}
			}
		}
	}
}

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;
}

var from = modify_from ? 2 : 1;
var cc = modify_from ? 3 : 2;
var bcc = modify_from ? 4 : 3;
function pressnick(value)
{
	if (opener.self.document.sendform.oo[0].checked == true) {
		if (opener.self.document.sendform.to.value != "")
			opener.self.document.sendform.to.value = ", " + opener.self.document.sendform.to.value;
		opener.self.document.sendform.to.value = dec_quotes(value) + opener.self.document.sendform.to.value;
	}
	else if (opener.self.document.sendform.oo[1].checked == true) {
		if (opener.self.document.sendform.reply.value != "")
			opener.self.document.sendform.reply.value = ", " + opener.self.document.sendform.reply.value;
		opener.self.document.sendform.reply.value = dec_quotes(value) + opener.self.document.sendform.reply.value;
	}
	else if (opener.self.document.sendform.oo[from].checked == true) {
		if (opener.self.document.sendform.from.value != "")
			opener.self.document.sendform.from.value = ", " + opener.self.document.sendform.from.value;
		opener.self.document.sendform.from.value = dec_quotes(value) + opener.self.document.sendform.from.value;
	}
	else if (opener.self.document.sendform.oo[cc].checked == true) {
		if (opener.self.document.sendform.cc.value != "")
			opener.self.document.sendform.cc.value = ", " + opener.self.document.sendform.cc.value;
		opener.self.document.sendform.cc.value = dec_quotes(value) + opener.self.document.sendform.cc.value;
	}
	else if (opener.self.document.sendform.oo[bcc].checked == true) {
		if (this.opener.self.document.sendform.bcc.value != "")
			opener.self.document.sendform.bcc.value = ", " + opener.self.document.sendform.bcc.value;
		opener.self.document.sendform.bcc.value = dec_quotes(value) + opener.self.document.sendform.bcc.value;
	}
}

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].text;

	document.addrbook.process.value = "addr_only";
	document.addrbook.cmd.value = "msg_new";
	document.addrbook.submit();
}

function pastePick(sel)
{
	var option;
	var i;
	for (i=0; i<sel.options.length; i++) {
		if (sel.options[i].selected==true) {
			if (opener.self.document.sendform.oo[0].checked == true) {
				if (opener.self.document.sendform.to.value != "")
					opener.self.document.sendform.to.value = ", " + opener.self.document.sendform.to.value;
				opener.self.document.sendform.to.value = sel.options[i].value + opener.self.document.sendform.to.value;
			}
			if (opener.self.document.sendform.oo[1].checked == true) {
				if (opener.self.document.sendform.reply.value != "")
					opener.self.document.sendform.reply.value = ", " + opener.self.document.sendform.reply.value;
				opener.self.document.sendform.reply.value = sel.options[i].value + opener.self.document.sendform.reply.value;
			}
			if (opener.self.document.sendform.oo[2].checked == true) {
				if (opener.self.document.sendform.cc.value != "")
					opener.self.document.sendform.cc.value = ", " + opener.self.document.sendform.cc.value;
				opener.self.document.sendform.cc.value = sel.options[i].value + opener.self.document.sendform.cc.value;
			}
			if (opener.self.document.sendform.oo[3].checked == true) {
				if (opener.self.document.sendform.bcc.value != "")
					opener.self.document.sendform.bcc.value = ", " + opener.self.document.sendform.bcc.value;
				opener.self.document.sendform.bcc.value = sel.options[i].value + opener.self.document.sendform.bcc.value;
			}
		}
	}
}

function dele()
{
	var i = 0, j;

	for (j=0; j<4; j++)
		if (opener.self.document.sendform.oo[j].checked == true) i = j;

	if (i==0)
		opener.self.document.sendform.to.value = "";
	if (i==1)
		opener.self.document.sendform.reply.value = "";
	if (i==2)
		opener.self.document.sendform.cc.value = "";
	if (i==3)
		opener.self.document.sendform.bcc.value = "";
}
//-->