<!--
function do_send(){
	if (document.sendform.isbulletin &&
	    document.sendform.isbulletin.value == 'true'){
		document.sendform.cmd.value = 'send_bulletin';
		document.sendform.process.value = 'bulletin';
	}
	else {
		var to = document.sendform.to.value;
		if (max_email_send_size > 0) {
			var msg_size = 1000 + total_attach_est + document.sendform.message.value.length;
			if (max_email_send_size < msg_size) {
				alert(large_text);
				return;
			}
		}
		if(to.substr(to.length-4, to.length) == '@sms') {
			size = document.sendform.message.value.length + document.sendform.subject.value.length + document.sendform.from.value.length;
			if (size >= 150) {
				alert(sms_text);
				return;
			}
		}
		document.sendform.cmd.value = "send";
		document.sendform.process.value = "list";
	}
	if (a_s == "true")
		document.sendform.sender.value = document.sendform.from.value;
	document.sendform._dflt_alias.value = document.sendform.from.value;
	document.sendform.submit();
}

function dcc(){
	document.sendform.cmd.value = "attach_msg";
	if (document.sendform._display_cc.value == "true")
		document.sendform._display_cc.value = "false";
	else
		document.sendform._display_cc.value = "true";
	document.sendform.submit();
}

function newwindow(field)
{
	msgWindow = open(act+'msg_new&process=addr_only'+ ut + '&field=' + field,'ADDRESSBOOK','width=600,height=250,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,scrollbars=yes','POPUP');
	if (msgWindow.opener == null) msgWindow.opener = self;
	if (msgWindow.opener.sendform == null) msgWindow.opener.sendform = document.sendform;
	msgWindow.focus();
}

function setSig(){
	document.sendform.addsig.value = "off";
	for (var i = 1;document.sendform._default_profile.options[i];i++){
		if (document.sendform._default_profile.options[i].selected)
			document.sendform.addsig.value = "on";
	}
}

function setlang() {
	document.sendform.cmd.value = "attach_msg";
	if (document.sendform.isbulletin &&
	    document.sendform.isbulletin.value == 'true'){
		document.sendform.page.value = 'send_bull';
		document.sendform.process.value = 'bulletin';
	}
	document.sendform.submit();
}
//-->
