<!--
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 = 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 = 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 = form[i].name.substring(8,form[i].name.length) + opener.self.document.sendform.bcc.value;
				}
			}
		}
	}	
}

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 = 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 = 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 = 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 = 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 = 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.xcmd.value = "addr_only";
	document.addrbook.submit();
}

function pastePick(sel) 
{
	var option;
	var i;
	if (sel.options[0].selected==true) {
		dele();
	}
	else{
		for (i=1; 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 = "";
}
//-->