function verifyForm() { var msg=''; if (document.form_modifica.nume_dest.value=='') { msg="You must supply a name for the recipient\n"; foc=document.form_modifica.nume_dest; }else if (document.form_modifica.email_dest.value=='') { msg="You must supply an e-mail address for the recipient\n"; foc=document.form_modifica.email_dest; }else if((document.form_modifica.email_dest.value.indexOf('@')<1)|| (document.form_modifica.email_dest.value.indexOf('@')>(document.form_modifica.email_dest.value.length - 5))|| (document.form_modifica.email_dest.value.indexOf('.')<1)){ msg='You must supply an e-mail address for the recipient'; foc=document.form_modifica.email_dest; }else if (document.form_modifica.nume_exp.value=='') { msg="You must supply your name\n"; foc=document.form_modifica.nume_exp; }else if (document.form_modifica.email_exp.value=='') { msg="You must supply your e-mail address\n"; foc=document.form_modifica.email_exp; }else if((document.form_modifica.email_exp.value.indexOf('@')<1)|| (document.form_modifica.email_exp.value.indexOf('@')>(document.form_modifica.email_exp.value.length - 5))|| (document.form_modifica.email_exp.value.indexOf('.')<1)){ msg='You must supply your e-mail address'; foc=document.form_modifica.email_exp; } if(msg!=''){ alert(msg); foc.focus(); return false; } } function smilie(text) { text = ' ' + text + ' '; if (document.form_modifica.mesaj.createTextRange && document.form_modifica.mesaj.caretPos) { var caretPos = document.form_modifica.mesaj.caretPos; caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text; document.form_modifica.mesaj.focus(); }else{ document.form_modifica.mesaj.value += text; document.form_modifica.mesaj.focus(); } } function storeCaret(textEl) { if (textEl.createTextRange) textEl.caretPos = document.selection.createRange().duplicate(); } function getCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return ''; }