function parseGetParams() { var $_GET = {}; var __GET = window.location.search.substring(1).split("&"); for(var i=0; i<__GET.length; i++) { var getVar = __GET[i].split("="); $_GET[getVar[0]] = typeof(getVar[1])=="undefined" ? "" : getVar[1]; } return $_GET; } function in_array(value, array) { for(var i=0; i()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return re.test(data); } function not_empty(data){ var result = false; if (data.length > 0){ result = true } return result; } function check_form(email, phone, data, error) { $(error).fadeOut('fast'); if(check_email(email) && not_empty(phone)){ create_bill($(data), $(error)) } else { $('[name=error_place]').html('Форма заполнена не верно').fadeIn(); } } function create_bill(form, error){ var get = parseGetParams(); if ('admitad_uid' in get){ var forms = $('forms'); var ad_ui = get['admitad_uid']; var input = ''; for (var i =0;i