-require_once('../src/validate.php');
-require_once('../functions/strings.php');
-
-/* Function to include JavaScript code */
-function insert_javascript() {
- ?>
- <SCRIPT LANGUAGE="Javascript"><!--
-
- function to_and_close($addr) {
- to_address($addr);
- parent.close();
- }
-
- function to_address($addr) {
- var prefix = "";
- var pwintype = typeof parent.opener.document.compose;
-
- $addr = $addr.replace(/ {1,35}$/, "");
-
- if (pwintype != "undefined") {
- if (parent.opener.document.compose.send_to.value) {
- prefix = ", ";
- parent.opener.document.compose.send_to.value =
- parent.opener.document.compose.send_to.value + ", " + $addr;
- } else {
- parent.opener.document.compose.send_to.value = $addr;
- }
- }
- }
-
- function cc_address($addr) {
- var prefix = "";
- var pwintype = typeof parent.opener.document.compose;
-
- $addr = $addr.replace(/ {1,35}$/, "");
-
- if (pwintype != "undefined") {
- if (parent.opener.document.compose.send_to_cc.value) {
- prefix = ", ";
- parent.opener.document.compose.send_to_cc.value =
- parent.opener.document.compose.send_to_cc.value + ", " + $addr;
- } else {
- parent.opener.document.compose.send_to_cc.value = $addr;
- }
- }
- }
-
- function bcc_address($addr) {
- var prefix = "";
- var pwintype = typeof parent.opener.document.compose;
-
- $addr = $addr.replace(/ {1,35}$/, "");
-
- if (pwintype != "undefined") {
- if (parent.opener.document.compose.send_to_bcc.value) {
- prefix = ", ";
- parent.opener.document.compose.send_to_bcc.value =
- parent.opener.document.compose.send_to_bcc.value + ", " + $addr;
- } else {
- parent.opener.document.compose.send_to_bcc.value = $addr;
- }
- }
- }