/** Выполняет переход на указанную страницу. Обычно используется для кнопок, выполненных в виде DIV */ function go (url) { if (url == '') return false; location.href=url; return true; } /** Выполняет визуальное нажатие на кнопку в виде картинки, т.е. скрытие одной картинки и показ, вместо нее, другой */ function pressButton(butId, press) { var but_up = document.getElementById(butId+'_up'); var but_down = document.getElementById(butId+'_down'); if (press==true) { but_up.style.display = 'none'; but_down.style.display = 'inline'; } else { but_up.style.display = 'inline'; but_down.style.display = 'none'; } } /** Выполняет подсветку пункта меню при наезде мыши на пункт меню */ function menuItemHighlight(itemId, item_style) { var item = document.getElementById(itemId); item.style.background = item_style; var arrow = document.getElementById('arrow_'+itemId); if (arrow) { if (arrow.style.visibility == "hidden") arrow.style.visibility = "visible"; else arrow.style.visibility = "hidden"; } } /** Выполняет показ пунктов подменю при наезде мыши на пункт меню */ function showSubmenuItems(smId, smIds) { for (i=0; i 1) && (email.indexOf("@") > 1); var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)"); var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$"); return (!r1.test(email) && r2.test(email)); } function FreeTrialSubmit(formId, messages) { var form = document.forms[formId]; if (form.cust_name.value=='' || form.cust_email.value=='') { alert(messages[0]); } else if(!isValidEmail(form.cust_email.value)) { alert(messages[1]); } else { form.submit(); } } function RegistrationSubmit(formId, messages) { FreeTrialSubmit(formId, messages); }