+
+function j_mesgtoadmbox(form)
+{
+ var no;
+
+ do {
+ if (form.elements['realsub'].value == "chiudi") {
+ $('mesgtoadmbox').style.visibility = "hidden";
+ break;
+ }
+
+ if (form.elements['mesg'].value == '' || form.elements['subj'].value == '') {
+ no = new notify(gst, "<br>Il soggetto e il messaggo non possono essere vuoti;</br> correggeteli per favore.", 1, "chiudi", 280, 100);
+ break;
+ }
+
+ // submit the request
+ token = server_request('mesg', 'mesgtoadm',
+ 'cli_subj', encodeURIComponent(form.elements['subj'].value),
+ 'cli_mesg', encodeURIComponent(form.elements['mesg'].value) );
+ if (token == "1") {
+ $('mesgtoadmbox').style.visibility = "hidden";
+ form.elements['subj'].value = "";
+ form.elements['mesg'].value = "";
+ break;
+ }
+ } while (0);
+
+ return (false);
+}
+
+function mesgtoadmbox(w, h)
+{
+ var box;
+
+ box = $('mesgtoadmbox');
+
+ box.style.zIndex = 200;
+ box.style.width = w+"px";
+ box.style.marginLeft = -parseInt(w/2)+"px";
+ box.style.height = h+"px";
+ box.style.top = parseInt((document.body.clientHeight - h) / 2) + document.body.scrollTop;
+
+ mesgtoadm_formtext_hilite($('mesgtoadm_form'));
+
+ box.style.visibility = "visible";
+ $('mesgtoadm_form').elements['subj'].focus();
+}
+
+function list_set(what, setco, info)
+{
+ if (what == 'auth') {
+ $('list_auth').style.color = 'red';
+ $('list_all').style.color = 'black';
+ }
+ else {
+ $('list_auth').style.color = 'black';
+ $('list_all').style.color = 'red';
+ }
+ $('list_info').innerHTML = info;
+ if (setco) {
+ createCookie("CO_list", what, 24*365, cookiepath);
+ }
+}