Version Description
- Fixed: Spam protection.
- Fixed: Counting form views.
- Fixed: Error message on submitting form with existing username.
Download this release
Release Info
Developer | 10web |
Plugin | Form Maker by WD – user-friendly drag & drop Form Builder plugin |
Version | 1.13.17 |
Comparing to | |
See all releases |
Code changes from version 1.13.16 to 1.13.17
- form-maker.php +3 -3
- frontend/controllers/form_maker.php +15 -37
- frontend/models/form_maker.php +165 -148
- frontend/views/form_maker.php +0 -2
- js/main_div_front_end.js +1 -1
- js/scripts.min.js +1 -1
- readme.txt +7 -2
form-maker.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Form Maker
|
4 |
* Plugin URI: https://10web.io/plugins/wordpress-form-maker/?utm_source=form_maker&utm_medium=free_plugin
|
5 |
* Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
|
6 |
-
* Version: 1.13.
|
7 |
* Author: 10Web Form Builder Team
|
8 |
* Author URI: https://10web.io/plugins/?utm_source=form_maker&utm_medium=free_plugin
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -98,8 +98,8 @@ final class WDFM {
|
|
98 |
$this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
|
99 |
$this->front_urls = $this->get_front_urls();
|
100 |
$this->main_file = plugin_basename(__FILE__);
|
101 |
-
$this->plugin_version = '1.13.
|
102 |
-
$this->db_version = '2.13.
|
103 |
$this->menu_postfix = ($this->is_free == 2 ? '_fmc' : '_fm');
|
104 |
$this->plugin_postfix = ($this->is_free == 2 ? '_fmc' : '');
|
105 |
$this->menu_slug = 'manage' . $this->menu_postfix;
|
3 |
* Plugin Name: Form Maker
|
4 |
* Plugin URI: https://10web.io/plugins/wordpress-form-maker/?utm_source=form_maker&utm_medium=free_plugin
|
5 |
* Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
|
6 |
+
* Version: 1.13.17
|
7 |
* Author: 10Web Form Builder Team
|
8 |
* Author URI: https://10web.io/plugins/?utm_source=form_maker&utm_medium=free_plugin
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
98 |
$this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
|
99 |
$this->front_urls = $this->get_front_urls();
|
100 |
$this->main_file = plugin_basename(__FILE__);
|
101 |
+
$this->plugin_version = '1.13.17';
|
102 |
+
$this->db_version = '2.13.17';
|
103 |
$this->menu_postfix = ($this->is_free == 2 ? '_fmc' : '_fm');
|
104 |
$this->plugin_postfix = ($this->is_free == 2 ? '_fmc' : '');
|
105 |
$this->menu_slug = 'manage' . $this->menu_postfix;
|
frontend/controllers/form_maker.php
CHANGED
@@ -39,12 +39,12 @@ class FMControllerForm_maker {
|
|
39 |
* @return string|void
|
40 |
*/
|
41 |
public function execute( $id = 0, $type = 'embedded' ) {
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
}
|
49 |
|
50 |
/**
|
@@ -56,6 +56,11 @@ class FMControllerForm_maker {
|
|
56 |
* @return string|void
|
57 |
*/
|
58 |
public function display( $id = 0, $type = '' ) {
|
|
|
|
|
|
|
|
|
|
|
59 |
$fm_settings = WDFMInstance(self::PLUGIN)->fm_settings;
|
60 |
/* Use for ajax submit */
|
61 |
if( WDW_FM_Library(self::PLUGIN)->get('formType') != '' ) {
|
@@ -68,13 +73,8 @@ class FMControllerForm_maker {
|
|
68 |
if ( !$result ) {
|
69 |
return;
|
70 |
}
|
71 |
-
|
72 |
-
|
73 |
-
if ( is_numeric($ok) ) {
|
74 |
-
$this->model->remove($ok);
|
75 |
-
}
|
76 |
-
$this->model->increment_views_count($id);
|
77 |
-
}
|
78 |
return $this->view->display($result, $fm_settings, $id, $type);
|
79 |
}
|
80 |
else {
|
@@ -93,6 +93,7 @@ class FMControllerForm_maker {
|
|
93 |
*/
|
94 |
public function autoload_form( $forms = array(), $fm_settings = array() ) {
|
95 |
$fm_forms = array();
|
|
|
96 |
foreach ($forms as $key => $form) {
|
97 |
$display_on_this = FALSE;
|
98 |
$error = 'success';
|
@@ -194,13 +195,7 @@ class FMControllerForm_maker {
|
|
194 |
if ( !$form_result ) {
|
195 |
continue;
|
196 |
}
|
197 |
-
|
198 |
-
$ok = $this->model->savedata($form_result[0], $id);
|
199 |
-
if ( is_numeric($ok) ) {
|
200 |
-
$this->model->remove($ok);
|
201 |
-
}
|
202 |
-
$this->model->increment_views_count($id);
|
203 |
-
}
|
204 |
$params = array();
|
205 |
$params['id'] = $id;
|
206 |
$params['type'] = $type;
|
@@ -217,23 +212,6 @@ class FMControllerForm_maker {
|
|
217 |
return implode($fm_forms);
|
218 |
}
|
219 |
|
220 |
-
/**
|
221 |
-
* Bot validation.
|
222 |
-
*
|
223 |
-
* @param int $form_id
|
224 |
-
*
|
225 |
-
* @return bool
|
226 |
-
*/
|
227 |
-
public function fm_bot_validation( $form_id ) {
|
228 |
-
if ( (isset( $_POST[ "fm_bot_validation" . $form_id ] ) && $_POST[ "fm_bot_validation" . $form_id ] != '') || (isset($_POST["counter" . $form_id]) && !isset($_POST[ "fm_bot_validation" . $form_id ])) ){
|
229 |
-
WDW_FM_Library(self::PLUGIN)->start_session();
|
230 |
-
$_SESSION['massage_after_submit' . $form_id] = addslashes(addslashes(__('Error, something went wrong.', WDFMInstance(self::PLUGIN)->prefix)));
|
231 |
-
$_SESSION['error_or_no' . $form_id] = TRUE;
|
232 |
-
return false;
|
233 |
-
}
|
234 |
-
return true;
|
235 |
-
}
|
236 |
-
|
237 |
public function fm_reload_input() {
|
238 |
global $wpdb;
|
239 |
$form_id = WDW_FM_Library::get('form_id');
|
39 |
* @return string|void
|
40 |
*/
|
41 |
public function execute( $id = 0, $type = 'embedded' ) {
|
42 |
+
$action = WDW_FM_Library(self::PLUGIN)->get('action');
|
43 |
+
if ( method_exists($this, $action) ) {
|
44 |
+
$this->$action();
|
45 |
+
} else {
|
46 |
+
return $this->display($id, $type);
|
47 |
+
}
|
48 |
}
|
49 |
|
50 |
/**
|
56 |
* @return string|void
|
57 |
*/
|
58 |
public function display( $id = 0, $type = '' ) {
|
59 |
+
if ( !$this->form_preview && $id && !isset($_GET[ "succes" ]) && !isset( $_POST[ "save_or_submit" . $id ] ) ) {
|
60 |
+
// Increment views count.
|
61 |
+
$this->model->increment_views_count($id);
|
62 |
+
}
|
63 |
+
|
64 |
$fm_settings = WDFMInstance(self::PLUGIN)->fm_settings;
|
65 |
/* Use for ajax submit */
|
66 |
if( WDW_FM_Library(self::PLUGIN)->get('formType') != '' ) {
|
73 |
if ( !$result ) {
|
74 |
return;
|
75 |
}
|
76 |
+
$this->model->savedata($result[0], $id);
|
77 |
+
|
|
|
|
|
|
|
|
|
|
|
78 |
return $this->view->display($result, $fm_settings, $id, $type);
|
79 |
}
|
80 |
else {
|
93 |
*/
|
94 |
public function autoload_form( $forms = array(), $fm_settings = array() ) {
|
95 |
$fm_forms = array();
|
96 |
+
WDW_FM_Library(self::PLUGIN)->start_session();
|
97 |
foreach ($forms as $key => $form) {
|
98 |
$display_on_this = FALSE;
|
99 |
$error = 'success';
|
195 |
if ( !$form_result ) {
|
196 |
continue;
|
197 |
}
|
198 |
+
$this->model->savedata($form_result[0], $id);
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
$params = array();
|
200 |
$params['id'] = $id;
|
201 |
$params['type'] = $type;
|
212 |
return implode($fm_forms);
|
213 |
}
|
214 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
215 |
public function fm_reload_input() {
|
216 |
global $wpdb;
|
217 |
$form_id = WDW_FM_Library::get('form_id');
|
frontend/models/form_maker.php
CHANGED
@@ -1104,171 +1104,189 @@ class FMModelForm_maker {
|
|
1104 |
* @return array|mixed
|
1105 |
*/
|
1106 |
public function savedata( $form = 0, $id = 0 ) {
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
|
|
|
|
|
|
1111 |
$id_for_old = $id;
|
1112 |
if ( !$form->form_front ) {
|
1113 |
$id = '';
|
1114 |
}
|
1115 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1116 |
WDW_FM_Library(self::PLUGIN)->start_session();
|
1117 |
-
if (
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1137 |
}
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
}
|
1159 |
-
}
|
1160 |
-
} elseif ( isset( $_POST['recaptcha_response'.$id] ) ){
|
1161 |
-
// Build POST request:
|
1162 |
-
$recaptcha_url = 'https://www.google.com/recaptcha/api/siteverify';
|
1163 |
-
$recaptcha_secret = isset( $fm_settings[ 'private_key' ] ) ? $fm_settings[ 'private_key' ] : '';
|
1164 |
-
$recaptcha_response = $_POST['recaptcha_response'.$id];
|
1165 |
-
|
1166 |
-
// Make and decode POST request:
|
1167 |
-
$recaptcha = file_get_contents($recaptcha_url . '?secret=' . $recaptcha_secret . '&response=' . $recaptcha_response);
|
1168 |
-
$recaptcha = json_decode($recaptcha, true);
|
1169 |
-
if ( $recaptcha['success'] ) {
|
1170 |
-
$recaptcha_settings_score = isset($fm_settings[ 'recaptcha_score' ]) ? floatval($fm_settings[ 'recaptcha_score' ]) : 0.5;
|
1171 |
-
// Take action based on the score returned:
|
1172 |
-
if ( floatval($recaptcha['score']) >= $recaptcha_settings_score ) {
|
1173 |
-
$correct = TRUE;
|
1174 |
-
} else {
|
1175 |
-
$_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Submission has failed due to the unsuccessful ReCaptcha verification. Please try to submit the form again.', WDFMInstance(self::PLUGIN)->prefix ) ) );
|
1176 |
-
$_SESSION[ 'message_captcha' ] = $_SESSION[ 'massage_after_submit' . $id ];
|
1177 |
-
$_SESSION[ 'error_or_no' . $id ] = 1;
|
1178 |
-
$correct = FALSE;
|
1179 |
-
}
|
1180 |
-
} else {
|
1181 |
-
$_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Submission has failed due to the unsuccessful ReCaptcha verification. Please try to submit the form again.', WDFMInstance(self::PLUGIN)->prefix ) ) );
|
1182 |
-
$_SESSION[ 'message_captcha' ] = $_SESSION[ 'massage_after_submit' . $id ];
|
1183 |
-
$_SESSION[ 'error_or_no' . $id ] = 1;
|
1184 |
-
$correct = FALSE;
|
1185 |
}
|
1186 |
-
|
1187 |
-
|
1188 |
-
$_SESSION[ 'massage_after_submit' . $id
|
1189 |
-
$_SESSION[
|
1190 |
-
$_SESSION[ 'error_or_no' . $id ] = 1;
|
1191 |
-
$correct = FALSE;
|
1192 |
-
} else {
|
1193 |
-
$correct = TRUE;
|
1194 |
}
|
1195 |
}
|
|
|
|
|
|
|
|
|
|
|
1196 |
}
|
1197 |
-
|
1198 |
-
$
|
1199 |
-
|
1200 |
-
if (
|
1201 |
-
(isset($_POST[WDFMInstance(self::PLUGIN)->fm_form_nonce]) && !wp_verify_nonce($_POST[WDFMInstance(self::PLUGIN)->fm_form_nonce], WDFMInstance(self::PLUGIN)->fm_form_nonce))
|
1202 |
-
|| ( $fm_settings['fm_antispam'] && ( ! $this->fm_empty_field_validation($id) || ! $this->check_http_referer() ) )
|
1203 |
-
) {
|
1204 |
-
$_SESSION['massage_after_submit' . $id] = addslashes(addslashes(__('Error, something went wrong.', WDFMInstance(self::PLUGIN)->prefix)));
|
1205 |
$_SESSION['error_or_no' . $id] = 1;
|
1206 |
-
$correct = FALSE;
|
1207 |
}
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
|
|
|
|
1246 |
}
|
1247 |
else {
|
1248 |
-
$result_temp = $this->save_db( $id_for_old );
|
1249 |
-
$this->ip_exceeded_limit( $id, $ip );
|
1250 |
// Enqueue any message from an extension to display.
|
1251 |
if ( isset( $result_temp[ 'message' ] ) ) {
|
1252 |
$_SESSION['massage_after_submit' . $id] = $result_temp['message'];
|
1253 |
$_SESSION['error_or_no' . $id ] = 0;
|
1254 |
}
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
}
|
1259 |
-
else {
|
1260 |
-
if ( WDFMInstance(self::PLUGIN)->is_free != 2 ) {
|
1261 |
-
do_action( 'WD_FM_SAVE_PROG_save_progress_init', array( 'id' => $id, 'addon_task' => 'clear_data' ) );
|
1262 |
-
}
|
1263 |
-
$this->gen_mail( $result_temp['group_id'], $result_temp['all_files'], $id_for_old, $result_temp['redirect_url'] );
|
1264 |
}
|
|
|
1265 |
}
|
1266 |
}
|
1267 |
}
|
1268 |
-
|
1269 |
-
return $all_files;
|
1270 |
}
|
1271 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1272 |
/**
|
1273 |
* Select data from db for labels.
|
1274 |
*
|
@@ -1362,7 +1380,7 @@ class FMModelForm_maker {
|
|
1362 |
$wp_username = $current_user->display_name;
|
1363 |
$wp_useremail = $current_user->user_email;
|
1364 |
}
|
1365 |
-
$
|
1366 |
$paypal = array();
|
1367 |
$all_files = array();
|
1368 |
$frontend_parmas = array();
|
@@ -2209,7 +2227,7 @@ class FMModelForm_maker {
|
|
2209 |
if ( !$save_or_no ) {
|
2210 |
return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFMInstance(self::PLUGIN)->prefix ) ) );
|
2211 |
}
|
2212 |
-
$
|
2213 |
} else {
|
2214 |
$fvals[ '{' . $i . '}' ] = '';
|
2215 |
}
|
@@ -2407,7 +2425,7 @@ class FMModelForm_maker {
|
|
2407 |
}
|
2408 |
}
|
2409 |
}
|
2410 |
-
if ( $
|
2411 |
WDW_FM_Library(self::PLUGIN)->start_session();
|
2412 |
if ( $form->submit_text_type != 4 ) {
|
2413 |
$_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Nothing was submitted.', WDFMInstance(self::PLUGIN)->prefix ) ) );
|
@@ -2600,11 +2618,10 @@ class FMModelForm_maker {
|
|
2600 |
*/
|
2601 |
public function increment_views_count( $id = 0 ) {
|
2602 |
global $wpdb;
|
2603 |
-
$
|
2604 |
-
if ( isset( $
|
2605 |
-
$vives_form = $vives_form + 1;
|
2606 |
$wpdb->update( $wpdb->prefix . "formmaker_views", array(
|
2607 |
-
'views' =>
|
2608 |
), array( 'form_id' => $id ), array(
|
2609 |
'%d',
|
2610 |
), array( '%d' ) );
|
@@ -4062,7 +4079,7 @@ class FMModelForm_maker {
|
|
4062 |
$max_second = 20;
|
4063 |
$row = $wpdb->get_var($wpdb->prepare('SELECT count(DISTINCT(group_id)) FROM `' . $wpdb->prefix . 'formmaker_submits` WHERE form_id=%d AND ip="%s" AND date>=("' . date('Y-m-d H:i:s', time() - $max_second) . '")', $id, $ip));
|
4064 |
if ( $row >= 4) {
|
4065 |
-
if( ! $wpdb->get_var($wpdb->prepare( 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_blocked WHERE ip="%s"', $ip )) ) {
|
4066 |
$wpdb->insert($wpdb->prefix . 'formmaker_blocked', array('ip' => $ip), array('%s') );
|
4067 |
}
|
4068 |
}
|
1104 |
* @return array|mixed
|
1105 |
*/
|
1106 |
public function savedata( $form = 0, $id = 0 ) {
|
1107 |
+
if ( !isset( $_POST[ "save_or_submit" . $id ] ) || !isset( $_POST[ "counter" . $id ] ) ) {
|
1108 |
+
// If removed special field.
|
1109 |
+
return;
|
1110 |
+
}
|
1111 |
+
|
1112 |
+
WDFMInstance(self::PLUGIN)->fm_form_nonce = sprintf( WDFMInstance(self::PLUGIN)->fm_form_nonce, $id );
|
1113 |
+
|
1114 |
$id_for_old = $id;
|
1115 |
if ( !$form->form_front ) {
|
1116 |
$id = '';
|
1117 |
}
|
1118 |
+
|
1119 |
+
// If IP is blacklisted.
|
1120 |
+
$this->check_ip($id);
|
1121 |
+
|
1122 |
+
if ( !isset($_POST[WDFMInstance(self::PLUGIN)->fm_form_nonce])
|
1123 |
+
|| !wp_verify_nonce($_POST[WDFMInstance(self::PLUGIN)->fm_form_nonce], WDFMInstance(self::PLUGIN)->fm_form_nonce) ) {
|
1124 |
+
// If failed nonce verification.
|
1125 |
+
return;
|
1126 |
+
}
|
1127 |
+
|
1128 |
+
if ( !isset( $_POST[ "fm_bot_validation" . $id ] ) || $_POST[ "fm_bot_validation" . $id ] != '' ) {
|
1129 |
+
// If bot validation field does not exist or is not empty.
|
1130 |
+
return;
|
1131 |
+
}
|
1132 |
+
|
1133 |
+
$fm_settings = WDFMInstance(self::PLUGIN)->fm_settings;
|
1134 |
+
if ( $fm_settings['fm_antispam'] && (!$this->fm_empty_field_validation($id) || !$this->check_http_referer()) ) {
|
1135 |
+
// If failed empty field and referer verification with enabled antispam protection.
|
1136 |
+
return;
|
1137 |
+
}
|
1138 |
+
|
1139 |
+
// If action is Save and Save progress add-on is enabled.
|
1140 |
+
$save_progress = (WDFMInstance(self::PLUGIN)->is_free != 2 && $_POST["save_or_submit" . $id] == 'save' && has_action('WD_FM_SAVE_PROG_save_progress_init'));
|
1141 |
+
|
1142 |
+
$success = FALSE;
|
1143 |
+
if ( $_POST["save_or_submit" . $id] == 'submit' || $save_progress ) {
|
1144 |
WDW_FM_Library(self::PLUGIN)->start_session();
|
1145 |
+
if ( isset($_POST["captcha_input"]) ) {
|
1146 |
+
$captcha_input = esc_html($_POST["captcha_input"]);
|
1147 |
+
$session_wd_captcha_code = isset($_SESSION[$id . '_wd_captcha_code']) ? $_SESSION[$id . '_wd_captcha_code'] : '-';
|
1148 |
+
if ( md5($captcha_input) == $session_wd_captcha_code ) {
|
1149 |
+
$success = TRUE;
|
1150 |
+
}
|
1151 |
+
else {
|
1152 |
+
$_SESSION['massage_after_submit' . $id] = addslashes(addslashes(__('Error, incorrect Security code.', WDFMInstance(self::PLUGIN)->prefix)));
|
1153 |
+
$_SESSION['message_captcha'] = $_SESSION['massage_after_submit' . $id];
|
1154 |
+
$_SESSION['error_or_no' . $id] = 1;
|
1155 |
+
}
|
1156 |
+
}
|
1157 |
+
elseif ( isset($_POST["arithmetic_captcha_input"]) ) {
|
1158 |
+
$arithmetic_captcha_input = esc_html($_POST["arithmetic_captcha_input"]);
|
1159 |
+
$session_wd_arithmetic_captcha_code = isset($_SESSION[$id . '_wd_arithmetic_captcha_code']) ? $_SESSION[$id . '_wd_arithmetic_captcha_code'] : '-';
|
1160 |
+
if ( md5($arithmetic_captcha_input) == $session_wd_arithmetic_captcha_code ) {
|
1161 |
+
$success = TRUE;
|
1162 |
+
}
|
1163 |
+
else {
|
1164 |
+
$_SESSION['massage_after_submit' . $id] = addslashes(addslashes(__('Error, incorrect Security code.', WDFMInstance(self::PLUGIN)->prefix)));
|
1165 |
+
$_SESSION['message_captcha'] = $_SESSION['massage_after_submit' . $id];
|
1166 |
+
$_SESSION['error_or_no' . $id] = 1;
|
1167 |
+
}
|
1168 |
+
}
|
1169 |
+
elseif ( isset($_POST["g-recaptcha-response"]) ) {
|
1170 |
+
$privatekey = isset($fm_settings['private_key']) ? $fm_settings['private_key'] : '';
|
1171 |
+
$captcha = $_POST['g-recaptcha-response'];
|
1172 |
+
$url = 'https://www.google.com/recaptcha/api/siteverify';
|
1173 |
+
$data = array(
|
1174 |
+
'secret' => $privatekey,
|
1175 |
+
'response' => $captcha,
|
1176 |
+
'remoteip' => $_SERVER['REMOTE_ADDR'],
|
1177 |
+
);
|
1178 |
+
$response = wp_remote_post($url, array( 'body' => $data ));
|
1179 |
+
if ( !is_wp_error($response) ) {
|
1180 |
+
$jsonResponse = json_decode(wp_remote_retrieve_body($response), TRUE);
|
1181 |
+
if ( $jsonResponse['success'] == "true" ) {
|
1182 |
+
$success = TRUE;
|
1183 |
}
|
1184 |
+
else {
|
1185 |
+
$_SESSION['massage_after_submit' . $id] = addslashes(addslashes(__('Submission has failed due to the unsuccessful ReCaptcha verification. Please try to submit the form again.', WDFMInstance(self::PLUGIN)->prefix)));
|
1186 |
+
$_SESSION['message_captcha'] = $_SESSION['massage_after_submit' . $id];
|
1187 |
+
$_SESSION['error_or_no' . $id] = 1;
|
1188 |
+
}
|
1189 |
+
}
|
1190 |
+
}
|
1191 |
+
elseif ( isset($_POST["recaptcha_response" . $id]) ) {
|
1192 |
+
// Build POST request:
|
1193 |
+
$recaptcha_url = 'https://www.google.com/recaptcha/api/siteverify';
|
1194 |
+
$recaptcha_secret = isset($fm_settings['private_key']) ? $fm_settings['private_key'] : '';
|
1195 |
+
$recaptcha_response = $_POST['recaptcha_response' . $id];
|
1196 |
+
// Make and decode POST request:
|
1197 |
+
$recaptcha = file_get_contents($recaptcha_url . '?secret=' . $recaptcha_secret . '&response=' . $recaptcha_response);
|
1198 |
+
$recaptcha = json_decode($recaptcha, TRUE);
|
1199 |
+
if ( $recaptcha['success'] ) {
|
1200 |
+
$recaptcha_settings_score = isset($fm_settings['recaptcha_score']) ? floatval($fm_settings['recaptcha_score']) : 0.5;
|
1201 |
+
// Take action based on the score returned:
|
1202 |
+
if ( floatval($recaptcha['score']) >= $recaptcha_settings_score ) {
|
1203 |
+
$success = TRUE;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1204 |
}
|
1205 |
+
else {
|
1206 |
+
$_SESSION['massage_after_submit' . $id] = addslashes(addslashes(__('Submission has failed due to the unsuccessful ReCaptcha verification. Please try to submit the form again.', WDFMInstance(self::PLUGIN)->prefix)));
|
1207 |
+
$_SESSION['message_captcha'] = $_SESSION['massage_after_submit' . $id];
|
1208 |
+
$_SESSION['error_or_no' . $id] = 1;
|
|
|
|
|
|
|
|
|
1209 |
}
|
1210 |
}
|
1211 |
+
else {
|
1212 |
+
$_SESSION['massage_after_submit' . $id] = addslashes(addslashes(__('Submission has failed due to the unsuccessful ReCaptcha verification. Please try to submit the form again.', WDFMInstance(self::PLUGIN)->prefix)));
|
1213 |
+
$_SESSION['message_captcha'] = $_SESSION['massage_after_submit' . $id];
|
1214 |
+
$_SESSION['error_or_no' . $id] = 1;
|
1215 |
+
}
|
1216 |
}
|
1217 |
+
elseif ( preg_match('(type_arithmetic_captcha|type_captcha|type_recaptcha)', $form->label_order_current) === 1 ) {
|
1218 |
+
$_SESSION['massage_after_submit' . $id] = addslashes(addslashes(__('Error, incorrect Security code.', WDFMInstance(self::PLUGIN)->prefix)));
|
1219 |
+
$_SESSION['message_captcha'] = $_SESSION['massage_after_submit' . $id];
|
|
|
|
|
|
|
|
|
|
|
1220 |
$_SESSION['error_or_no' . $id] = 1;
|
|
|
1221 |
}
|
1222 |
+
else {
|
1223 |
+
$success = TRUE;
|
1224 |
+
}
|
1225 |
+
}
|
1226 |
+
|
1227 |
+
if ( $success ) {
|
1228 |
+
if ( $save_progress ) {
|
1229 |
+
$current_user = wp_get_current_user();
|
1230 |
+
$userid = '';
|
1231 |
+
$username = '';
|
1232 |
+
$useremail = '';
|
1233 |
+
if ( $current_user->ID != 0 ) {
|
1234 |
+
$userid = $current_user->ID;
|
1235 |
+
$username = $current_user->display_name;
|
1236 |
+
$useremail = $current_user->user_email;
|
1237 |
+
}
|
1238 |
+
$custom_fields = array(
|
1239 |
+
"ip" => $_SERVER['REMOTE_ADDR'],
|
1240 |
+
"subid" => '',
|
1241 |
+
"userid" => $userid,
|
1242 |
+
'adminemail' => get_option( 'admin_email' ),
|
1243 |
+
"useremail" => $useremail,
|
1244 |
+
"username" => $username,
|
1245 |
+
'pageurl' => WDW_FM_Library(self::PLUGIN)->get_current_page_url(),
|
1246 |
+
'formtitle' => $form->title
|
1247 |
+
);
|
1248 |
+
do_action( 'WD_FM_SAVE_PROG_save_progress_init', array( 'id' => $id, 'addon_task' => 'save_progress', 'form' => $form, 'custom_fields' => $custom_fields ) );
|
1249 |
+
}
|
1250 |
+
else {
|
1251 |
+
$result_temp = $this->save_db( $id_for_old );
|
1252 |
+
$this->ip_exceeded_limit( $id, $_SERVER['REMOTE_ADDR'] );
|
1253 |
+
if ( isset( $result_temp['error'] ) ) {
|
1254 |
+
$this->remove( $result_temp['group_id'] );
|
1255 |
+
if ( isset($result_temp['message']) ) {
|
1256 |
+
$_SESSION['massage_after_submit' . $id] = $result_temp['message'];
|
1257 |
+
}
|
1258 |
+
else {
|
1259 |
+
$_SESSION['massage_after_submit' . $id] = addslashes(addslashes(__('Error, something went wrong.', WDFMInstance(self::PLUGIN)->prefix)));
|
1260 |
+
}
|
1261 |
+
$_SESSION[ 'error_or_no' . $id ] = 1;
|
1262 |
}
|
1263 |
else {
|
|
|
|
|
1264 |
// Enqueue any message from an extension to display.
|
1265 |
if ( isset( $result_temp[ 'message' ] ) ) {
|
1266 |
$_SESSION['massage_after_submit' . $id] = $result_temp['message'];
|
1267 |
$_SESSION['error_or_no' . $id ] = 0;
|
1268 |
}
|
1269 |
+
|
1270 |
+
if ( WDFMInstance(self::PLUGIN)->is_free != 2 ) {
|
1271 |
+
do_action( 'WD_FM_SAVE_PROG_save_progress_init', array( 'id' => $id, 'addon_task' => 'clear_data' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
1272 |
}
|
1273 |
+
$this->gen_mail( $result_temp['group_id'], $result_temp['all_files'], $id_for_old, $result_temp['redirect_url'] );
|
1274 |
}
|
1275 |
}
|
1276 |
}
|
|
|
|
|
1277 |
}
|
1278 |
|
1279 |
+
public function check_ip($id) {
|
1280 |
+
global $wpdb;
|
1281 |
+
$blocked_ip = $wpdb->get_var( $wpdb->prepare( 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_blocked WHERE ip="%s"', $_SERVER['REMOTE_ADDR'] ) );
|
1282 |
+
if ( $blocked_ip ) {
|
1283 |
+
$_SESSION[ 'massage_after_submit' . $id ] = addslashes( __( 'Your ip is blacklisted. Please contact the website administrator.', WDFMInstance(self::PLUGIN)->prefix ) );
|
1284 |
+
// Add query arg to url to display message on cached pages.
|
1285 |
+
$redirect_url = add_query_arg( array( 'succes' => time() ), $_SERVER["REQUEST_URI"] );
|
1286 |
+
wp_redirect( $redirect_url );
|
1287 |
+
exit;
|
1288 |
+
}
|
1289 |
+
}
|
1290 |
/**
|
1291 |
* Select data from db for labels.
|
1292 |
*
|
1380 |
$wp_username = $current_user->display_name;
|
1381 |
$wp_useremail = $current_user->user_email;
|
1382 |
}
|
1383 |
+
$submited = TRUE;
|
1384 |
$paypal = array();
|
1385 |
$all_files = array();
|
1386 |
$frontend_parmas = array();
|
2227 |
if ( !$save_or_no ) {
|
2228 |
return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFMInstance(self::PLUGIN)->prefix ) ) );
|
2229 |
}
|
2230 |
+
$submited = FALSE;
|
2231 |
} else {
|
2232 |
$fvals[ '{' . $i . '}' ] = '';
|
2233 |
}
|
2425 |
}
|
2426 |
}
|
2427 |
}
|
2428 |
+
if ( $submited ) {
|
2429 |
WDW_FM_Library(self::PLUGIN)->start_session();
|
2430 |
if ( $form->submit_text_type != 4 ) {
|
2431 |
$_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Nothing was submitted.', WDFMInstance(self::PLUGIN)->prefix ) ) );
|
2618 |
*/
|
2619 |
public function increment_views_count( $id = 0 ) {
|
2620 |
global $wpdb;
|
2621 |
+
$views_count = $wpdb->get_var( $wpdb->prepare( "SELECT views FROM " . $wpdb->prefix . "formmaker_views WHERE form_id=%d", $id ) );
|
2622 |
+
if ( isset( $views_count ) ) {
|
|
|
2623 |
$wpdb->update( $wpdb->prefix . "formmaker_views", array(
|
2624 |
+
'views' => ++$views_count,
|
2625 |
), array( 'form_id' => $id ), array(
|
2626 |
'%d',
|
2627 |
), array( '%d' ) );
|
4079 |
$max_second = 20;
|
4080 |
$row = $wpdb->get_var($wpdb->prepare('SELECT count(DISTINCT(group_id)) FROM `' . $wpdb->prefix . 'formmaker_submits` WHERE form_id=%d AND ip="%s" AND date>=("' . date('Y-m-d H:i:s', time() - $max_second) . '")', $id, $ip));
|
4081 |
if ( $row >= 4) {
|
4082 |
+
if ( ! $wpdb->get_var($wpdb->prepare( 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_blocked WHERE ip="%s"', $ip )) ) {
|
4083 |
$wpdb->insert($wpdb->prefix . 'formmaker_blocked', array('ip' => $ip), array('%s') );
|
4084 |
}
|
4085 |
}
|
frontend/views/form_maker.php
CHANGED
@@ -1813,7 +1813,6 @@ class FMViewForm_maker {
|
|
1813 |
$closing = $form->topbar_closing;
|
1814 |
$hide_duration = $form->topbar_hide_duration;
|
1815 |
$hide_mobile = wp_is_mobile() && $form->hide_mobile ? FALSE : TRUE;
|
1816 |
-
|
1817 |
if ( $display_on_this && $hide_mobile || $fm_settings['fm_ajax_submit'] ) {
|
1818 |
WDW_FM_Library(self::PLUGIN)->start_session();
|
1819 |
if (isset($_SESSION['fm_hide_form_after_submit' . $id]) && $_SESSION['fm_hide_form_after_submit' . $id] == 1) {
|
@@ -1945,7 +1944,6 @@ class FMViewForm_maker {
|
|
1945 |
$frequency = $form->popover_frequency;
|
1946 |
$hide_mobile = wp_is_mobile() && $form->hide_mobile ? FALSE : TRUE;
|
1947 |
$hide_mobile_class = wp_is_mobile() ? 'fm_mobile_full' : '';
|
1948 |
-
|
1949 |
if ($display_on_this && $hide_mobile || $fm_settings['fm_ajax_submit']) {
|
1950 |
WDW_FM_Library(self::PLUGIN)->start_session();
|
1951 |
if (isset($_SESSION['fm_hide_form_after_submit' . $id]) && $_SESSION['fm_hide_form_after_submit' . $id] == 1) {
|
1813 |
$closing = $form->topbar_closing;
|
1814 |
$hide_duration = $form->topbar_hide_duration;
|
1815 |
$hide_mobile = wp_is_mobile() && $form->hide_mobile ? FALSE : TRUE;
|
|
|
1816 |
if ( $display_on_this && $hide_mobile || $fm_settings['fm_ajax_submit'] ) {
|
1817 |
WDW_FM_Library(self::PLUGIN)->start_session();
|
1818 |
if (isset($_SESSION['fm_hide_form_after_submit' . $id]) && $_SESSION['fm_hide_form_after_submit' . $id] == 1) {
|
1944 |
$frequency = $form->popover_frequency;
|
1945 |
$hide_mobile = wp_is_mobile() && $form->hide_mobile ? FALSE : TRUE;
|
1946 |
$hide_mobile_class = wp_is_mobile() ? 'fm_mobile_full' : '';
|
|
|
1947 |
if ($display_on_this && $hide_mobile || $fm_settings['fm_ajax_submit']) {
|
1948 |
WDW_FM_Library(self::PLUGIN)->start_session();
|
1949 |
if (isset($_SESSION['fm_hide_form_after_submit' . $id]) && $_SESSION['fm_hide_form_after_submit' . $id] == 1) {
|
js/main_div_front_end.js
CHANGED
@@ -969,7 +969,7 @@ function wd_check_confirmation_email(wdid, form_id, message, type) {
|
|
969 |
var element = jQuery("#wdform_" + wdid +"_element" + form_id);
|
970 |
var element_confirm = jQuery("#wdform_" + wdid +"_1_element" + form_id);
|
971 |
var condition_confirm_email = false;
|
972 |
-
if(
|
973 |
condition_confirm_email = true;
|
974 |
}
|
975 |
else {
|
969 |
var element = jQuery("#wdform_" + wdid +"_element" + form_id);
|
970 |
var element_confirm = jQuery("#wdform_" + wdid +"_1_element" + form_id);
|
971 |
var condition_confirm_email = false;
|
972 |
+
if ( false == window["check_before_submit" + form_id][wdid + "_" + form_id] ) {
|
973 |
condition_confirm_email = true;
|
974 |
}
|
975 |
else {
|
js/scripts.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var c,a=new Array,rated=!1;function set_total_value(form_id){var FormCurrency=window["FormCurrency_"+form_id]+" ";if(0!=jQuery(".paypal_total"+form_id).length){var div_paypal_show=jQuery(".paypal_total"+form_id),div_paypal_products=jQuery(".paypal_products"+form_id),div_paypal_tax=jQuery(".paypal_tax"+form_id),input_paypal_total=jQuery(".input_paypal_total"+form_id),total=0,total_shipping=0;div_paypal_products.html(""),div_paypal_tax.html(""),n=parseInt(jQuery("#counter"+form_id).val()),jQuery("#form"+form_id+" div[type='type_paypal_checkbox'], #form"+form_id+" div[type='type_paypal_radio']").each(function(){var e=jQuery(this).parent();if("none"!=e.css("display")){var t=e.attr("wdid");paypal_checkbox_qty=jQuery("#wdform_"+t+"_element_quantity"+form_id).val()?jQuery("#wdform_"+t+"_element_quantity"+form_id).val():0,jQuery(this).find("input:checked").each(function(){label=jQuery("label[for='"+jQuery(this).attr("id")+"']").html(),span_value=FormCurrency+jQuery(this).val()+(0!=jQuery("#wdform_"+t+"_element_quantity"+form_id).length?" x "+paypal_checkbox_qty:""),total+=jQuery(this).val()*parseInt(0!=jQuery("#wdform_"+t+"_element_quantity"+form_id).length?paypal_checkbox_qty:1),div_paypal_products.html(div_paypal_products.html()+"<div>"+label+" - "+span_value+"</div>")})}}),jQuery("#form"+form_id+" div[type='type_paypal_shipping']").each(function(){var e=jQuery(this).parent();if("none"!=e.css("display")){var t=e.attr("wdid");paypal_shipping_qty=jQuery("#wdform_"+t+"_element_quantity"+form_id).val()?jQuery("#wdform_"+t+"_element_quantity"+form_id).val():0,jQuery(this).find("input:checked").each(function(){label=jQuery("label[for='"+jQuery(this).attr("id")+"']").html(),span_value=FormCurrency+jQuery(this).val()+(0!=jQuery("#wdform_"+t+"_element_quantity"+form_id).length?" x "+paypal_shipping_qty:""),total_shipping+=jQuery(this).val()*parseInt(0!=jQuery("#wdform_"+t+"_element_quantity"+form_id).length?paypal_shipping_qty:1),div_paypal_products.html(div_paypal_products.html()+"<div>"+label+" - "+span_value+"</div>")})}}),jQuery("#form"+form_id+" div[type='type_paypal_select']").each(function(){var e=jQuery(this).parent();if("none"!=e.css("display")){var t=e.attr("wdid");paypal_select_qty=jQuery("#wdform_"+t+"_element_quantity"+form_id).val()?jQuery("#wdform_"+t+"_element_quantity"+form_id).val():0,""!=jQuery(this).find("select").val()&&(label=jQuery(this).find("select option:selected").html(),span_value=FormCurrency+jQuery(this).find("select").val()+(0!=jQuery("#wdform_"+t+"_element_quantity"+form_id).length?" x "+paypal_select_qty:""),total+=jQuery(this).find("select").val()*parseInt(0!=jQuery("#wdform_"+t+"_element_quantity"+form_id).length?paypal_select_qty:1),div_paypal_products.html(div_paypal_products.html()+"<div>"+label+" - "+span_value+"</div>"))}}),jQuery("#form"+form_id+" div[type='type_paypal_price']").each(function(){var e=jQuery(this).parent();if("none"!=e.css("display")){var t=e.attr("wdid");label=jQuery(this).find(".wdform-label").html(),cents="00",dollars="0",""!=jQuery("#wdform_"+t+"_element_dollars"+form_id).val()&&(dollars=jQuery("#wdform_"+t+"_element_dollars"+form_id).val()),""!=jQuery("#wdform_"+t+"_element_cents"+form_id).val()&&(1==jQuery("#wdform_"+t+"_element_cents"+form_id).val().length?cents="0"+jQuery("#wdform_"+t+"_element_cents"+form_id).val():cents=jQuery("#wdform_"+t+"_element_cents"+form_id).val(),span_value=FormCurrency+dollars+"."+cents,total+=parseFloat(dollars+"."+cents),div_paypal_products.html(div_paypal_products.html()+"<div>"+label+" - "+span_value+"</div>"))}}),jQuery("#form"+form_id+" div[type='type_paypal_price_new']").each(function(){var e=jQuery(this).parent();if("none"!=e.css("display")){var t=e.attr("wdid");label=jQuery(this).find(".wdform-label").html(),dollars="0",""!=jQuery("#wdform_"+t+"_element"+form_id).val()&&(dollars=jQuery("#wdform_"+t+"_element"+form_id).val()),span_value=FormCurrency+dollars,total+=parseFloat(dollars),div_paypal_products.html(div_paypal_products.html()+"<div>"+label+" - "+span_value+"</div>")}});var FormPaypalTax=eval("FormPaypalTax_"+form_id);0!=FormPaypalTax&&div_paypal_tax.html("Tax: "+FormCurrency+(total*FormPaypalTax/100).toFixed(2)),jQuery(".div_total"+form_id).html(FormCurrency+(parseFloat((total*(1+FormPaypalTax/100)).toFixed(2))+total_shipping).toFixed(2)),input_paypal_total.val(FormCurrency+(parseFloat((total*(1+FormPaypalTax/100)).toFixed(2))+total_shipping).toFixed(2))}}function check_isnum_or_minus(e){var t=e.which||e.keyCode;return!(45!=t&&31<t&&(t<48||57<t))}function sum_grading_values(e,t){for(var r=0,i=0;i<100;i++)document.getElementById(e+"_element"+t+"_"+i)&&document.getElementById(e+"_element"+t+"_"+i).value&&(r+=parseInt(document.getElementById(e+"_element"+t+"_"+i).value)),document.getElementById(e+"_total_element"+t)&&(r>document.getElementById(e+"_total_element"+t).innerHTML?document.getElementById(e+"_text_element"+t).innerHTML=" "+fm_objectL10n.fm_grading_text+" "+document.getElementById(e+"_total_element"+t).innerHTML:document.getElementById(e+"_text_element"+t).innerHTML="");document.getElementById(e+"_sum_element"+t)&&(document.getElementById(e+"_sum_element"+t).innerHTML=r)}function change_src(e,t,r,i){if(0==rated)for(var n=0;n<=e;n++)document.getElementById(t+"_star_"+n+"_"+r).src=fm_objectL10n.plugin_url+"/images/star_"+i+".png"}function reset_src(e,t,r){if(0==rated)for(var i=0;i<=e;i++)document.getElementById(t+"_star_"+i+"_"+r).src=fm_objectL10n.plugin_url+"/images/star.png"}function select_star_rating(e,t,r,i,n){rated=!0;for(var a=0;a<=e;a++)document.getElementById(t+"_star_"+a+"_"+r).src=fm_objectL10n.plugin_url+"/images/star_"+i+".png";for(var o=e+1;o<=n-1;o++)document.getElementById(t+"_star_"+o+"_"+r).src=fm_objectL10n.plugin_url+"/images/star.png";document.getElementById(t+"_selected_star_amount"+r).value=e+1,jQuery("#"+t+"_selected_star_amount"+r).trigger("change")}function show_other_input(e,t){var r=jQuery(".form"+t+" [id^="+e+"_element"+t+'][other="1"]').parent(),i=document.createElement("br");i.setAttribute("id",e+"_other_br"+t);var n=e.split("_")[1],a=document.createElement("input");a.setAttribute("id",e+"_other_input"+t),a.setAttribute("name",e+"_other_input"+t),a.setAttribute("type","text"),a.setAttribute("class","other_input"),a.setAttribute("onchange","other_input_change(this, '"+t+"', '"+n+"')"),r.append(i),r.append(a)}function other_input_change(e,t,r){""==jQuery(e).val()?wd_is_filled(t,r):(jQuery("#form"+t+" #wd_required_"+r).remove(),jQuery("#form"+t+" div[wdid='"+r+"'] .wdform-label-section:first .error_label").removeClass("error_label"))}function check_isnum(e){var t=e.which||e.keyCode;return-1!=jQuery.inArray(t,[46,8,9,27,13,190])||!0===e.ctrlKey||35<=t&&t<39||45==t||!(31<t&&(t<48||57<t))}function captcha_refresh(e,t){srcArr=document.getElementById(e+t).src.split("&r="),document.getElementById(e+t).src=srcArr[0]+"&r="+Math.floor(100*Math.random()),document.getElementById(e+"_input"+t).value="",document.getElementById(e+t).style.display="inline-block"}function set_checked(e,t,r){return checking=document.getElementById(e+"_element"+r+t),!(checking.getAttribute("other")&&1==checking.getAttribute("other")&&!checking.checked)||(document.getElementById(e+"_other_input"+r)&&(document.getElementById(e+"_other_input"+r).parentNode.removeChild(document.getElementById(e+"_other_br"+r)),document.getElementById(e+"_other_input"+r).parentNode.removeChild(document.getElementById(e+"_other_input"+r))),!1)}function set_default(e,t,r){document.getElementById(e+"_other_input"+r)&&(document.getElementById(e+"_other_input"+r).parentNode.removeChild(document.getElementById(e+"_other_br"+r)),document.getElementById(e+"_other_input"+r).parentNode.removeChild(document.getElementById(e+"_other_input"+r)))}function add_0(e){1==jQuery(e).val().length&&jQuery(e).val("0"+jQuery(e).val())}function wd_validate(e,t){if(!jQuery(e).is("input"))return!0;var r,i,n=jQuery(e).val(),a=(jQuery(e).attr("id"),jQuery(e).data("valid-type")),o=jQuery(e).data("form-id"),d=jQuery(e).data("wdid");if(void 0===t)t=jQuery(e).data("addiotional-fields");var l="#form"+o+" div[wdid='"+d+"']",s=jQuery(l+" .wdform-label-section:first .wdform-label"),u=jQuery(l+" .wdform-element-section");switch(a){case"hour24":r=fm_objectL10n.time_validation,i=/^(0?[0-1]?[0-9]|2[0-3])?$/;break;case"hour12":r=fm_objectL10n.time_validation,i=/^(0?[0-9]|1[0-2])?$/;break;case"minute":case"second":r=fm_objectL10n.time_validation,i=/^([0-5]?[0-9])?$/;break;case"number":r=fm_objectL10n.number_validation,i=/^\-{0,1}\d+(.\d+){0,1}$/;break;case"quantity":r=fm_objectL10n.number_validation,i=/^[+]?\d+([.]\d+)?$/;break;case"day":r=fm_objectL10n.date_validation,i=/^(0?[0-2]?[0-9]|3[0-1])?$/;break;case"month":r=fm_objectL10n.date_validation,i=/^(0?[0-9]|1[0-2])?$/;break;case"year":r=fm_objectL10n.date_validation,i=/^([1-2]?[0-9]?[0-9]?[0-9])?$/}if(isValid=i.test(n),""==n&&(isValid=!0),isValid)for(var m in t)if(isValid=wd_validate("#"+t[m],""),!isValid)break;return jQuery("#check_email_"+d+"_"+o).remove(),isValid?(s.removeClass("wd-error-label"),delete window["check_before_submit"+o][d+"_"+o]):(u.parent().parent().append("<div id='check_email_"+d+"_"+o+"' class='fm-not-filled'>"+r+"</div>"),s.addClass("wd-error-label"),window["check_before_submit"+o][d+"_"+o]=!1),isValid}function check_isnum_interval(e,t,r,i){var n=e.which||e.keyCode;return-1!=jQuery.inArray(n,[46,8,9,27,13,190])||!0===e.ctrlKey||35<=n&&n<39||!(31<n&&(n<48||57<n))&&(val1=""+jQuery(t).val()+String.fromCharCode(n),!(2<val1.length)&&("00"!=val1&&!(val1<r||val1>i)))}function wd_year_validation(e){var t=parseInt(jQuery(e).val()),r=jQuery(e).data("form-id"),i=jQuery(e).data("wdid"),n=parseInt(jQuery(e).attr("from")),a=parseInt(jQuery(e).attr("to")),o="#form"+r+" div[wdid='"+i+"']",d=jQuery(o+" .wdform-label-section:first .wdform-label"),l=jQuery(o+" .wdform-element-section");if(t<n||a<t){var s=fm_objectL10n.year_validation.replace("%%start%%",n).replace("%%end%%",a);jQuery("#check_email_"+i+"_"+r).remove(),l.parent().parent().append("<div id='check_email_"+i+"_"+r+"' class='fm-not-filled'>"+s+"</div>"),d.addClass("wd-error-label"),window["check_before_submit"+r][i+"_"+r]=!1}}function destroyChildren(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function generate_page_nav(e,t,r){var i;if(form_view=e,page_nav=document.getElementById(t+"page_nav"+e),destroyChildren(page_nav),form_view_elemet=document.getElementById(t+"form_view"+e),remove_whitespace(form_view_elemet.parentNode.parentNode),display_none_form_views_all(t),form_view_elemet.parentNode.style.display="",(i=document.createElement("div")).setAttribute("valign","middle"),i.setAttribute("align","left"),i.style.display="table-cell",i.style.width="40%",page_nav.appendChild(i),form_view_elemet.parentNode.previousSibling&&-1!=form_view_elemet.parentNode.previousSibling.className.indexOf("wdform-page-and-images")&&form_view_elemet.parentNode.previousSibling.previousSibling&&("DIV"==form_view_elemet.parentNode.previousSibling.tagName?table=form_view_elemet.parentNode.previousSibling:"DIV"==form_view_elemet.parentNode.previousSibling.previousSibling.tagName?table=form_view_elemet.parentNode.previousSibling.previousSibling:table="none","none"!=table&&(table.firstChild.tagName||table.removeChild(table.firstChild),previous_title=form_view_elemet.getAttribute("previous_title"),previous_type=form_view_elemet.getAttribute("previous_type"),"text"==previous_type&&i.setAttribute("class","previous-page"),previous_class=form_view_elemet.getAttribute("previous_class"),previous_checkable=form_view_elemet.getAttribute("previous_checkable"),next_or_previous="previous",previous=make_pagebreak_button(next_or_previous,previous_title,previous_type,previous_class,previous_checkable,e,t,r),i.appendChild(previous))),(i=document.createElement("div")).setAttribute("id",t+"page_numbers"+form_view),i.setAttribute("valign","middle"),i.setAttribute("class","page-numbers"),i.setAttribute("align","center"),i.style.display="table-cell","true"==document.getElementById("fm-pages"+t).getAttribute("show_numbers")){var n=document.createElement("span");n.setAttribute("class","page_numbers"),i.appendChild(n)}page_nav.appendChild(i),(i=document.createElement("div")).setAttribute("valign","middle"),i.setAttribute("align","right"),i.style.cssText="display:table-cell; width:40%; text-align:right;",page_nav.appendChild(i),not_next=!1,form_view_elemet.parentNode.nextSibling?("DIV"==form_view_elemet.parentNode.nextSibling.tagName&&-1!=form_view_elemet.parentNode.nextSibling.className.indexOf("wdform-page-and-images")?table=form_view_elemet.parentNode.nextSibling:form_view_elemet.parentNode.nextSibling.nextSibling&&"DIV"==form_view_elemet.parentNode.nextSibling.nextSibling.tagName?table=form_view_elemet.parentNode.nextSibling.nextSibling:table="none","none"!=table?(next_title=form_view_elemet.getAttribute("next_title"),next_type=form_view_elemet.getAttribute("next_type"),"text"==next_type&&i.setAttribute("class","next-page"),next_class=form_view_elemet.getAttribute("next_class"),next_checkable=form_view_elemet.getAttribute("next_checkable"),next_or_previous="next",next=make_pagebreak_button(next_or_previous,next_title,next_type,next_class,next_checkable,e,t,r),i.appendChild(next)):not_next=!0):not_next=!0,generate_page_bar(e,t,r),fm_initilize_form(t)}function fm_initilize_form(e){jQuery("#form"+e+" div[type='type_map']").each(function(){for(id=jQuery(this).parent().attr("wdid"),if_gmap_init("wdform_"+id,e),q=0;q<20;q++)jQuery("#wdform_"+id+"_element"+e)[0].getAttribute("long"+q)&&(w_long=parseFloat(document.getElementById("wdform_"+id+"_element"+e).getAttribute("long"+q)),w_lat=parseFloat(document.getElementById("wdform_"+id+"_element"+e).getAttribute("lat"+q)),w_info=parseFloat(document.getElementById("wdform_"+id+"_element"+e).getAttribute("info"+q)),add_marker_on_map("wdform_"+id,q,w_long,w_lat,w_info,e,!1))}),jQuery("#form"+e+" div[type='type_mark_map']").each(function(){id=jQuery(this).parent().attr("wdid"),if_gmap_init("wdform_"+id,e),q=0,jQuery("#wdform_"+id+"_element"+e)[0].getAttribute("long"+q)&&(w_long=parseFloat(document.getElementById("wdform_"+id+"_element"+e).getAttribute("long"+q)),w_lat=parseFloat(document.getElementById("wdform_"+id+"_element"+e).getAttribute("lat"+q)),w_info=parseFloat(document.getElementById("wdform_"+id+"_element"+e).getAttribute("info"+q)),add_marker_on_map("wdform_"+id,q,w_long,w_lat,w_info,e,!0))}),jQuery(".wdform-element-section").each(function(){if("type_stripe"==jQuery(this).parent().parent().attr("type"))return!0;jQuery(this).parent()[0].style.width||0==parseInt(jQuery(this).width())||0==jQuery(this).parent().find(jQuery(".wdform-label-section")).length||"table-cell"==jQuery(this).css("display")&&("type_captcha"!=jQuery(this).parent().attr("type")?jQuery(this).parent().css("width",parseInt(jQuery(this).width())+parseInt(jQuery(this).parent().find(jQuery(".wdform-label-section"))[0].style.width)+15):jQuery(this).parent().css("width",2*parseInt(jQuery(this).parent().find(jQuery(".captcha_input"))[0].style.width)+50+parseInt(jQuery(this).parent().find(jQuery(".wdform-label-section"))[0].style.width)+15))})}function display_none_form_views_all(e){jQuery("#form"+e+" .wdform-page-and-images").css("display","none")}function generate_page_bar(t,r,e){if("steps"==document.getElementById("fm-pages"+r).getAttribute("type")?make_page_steps_front(t,r,e):"percentage"==document.getElementById("fm-pages"+r).getAttribute("type")?make_page_percentage_front(t,r,e):make_page_none_front(r),"true"==document.getElementById("fm-pages"+r).getAttribute("show_numbers")){if(td=document.getElementById(r+"page_numbers"+t),td){destroyChildren(td),k=0,cur_page_number=0,jQuery(".wdform-page-and-images").each(function(){var e=jQuery(this).find(".wdform_page").attr("id");j=e.split("form_view")[1],document.getElementById(r+"form_view"+j)&&(k++,j==t&&(cur_page_number=k))});var i=document.createElement("span");i.setAttribute("class","page_numbers"),i.innerHTML=cur_page_number+"/"+k,td.appendChild(i)}}else td=document.getElementById(r+"page_numbers"+t),td&&destroyChildren(document.getElementById(r+"page_numbers"+t))}function make_page_steps_front(t,r,i){destroyChildren(document.getElementById("fm-pages"+r)),show_title="true"==document.getElementById("fm-pages"+r).getAttribute("show_title"),next_checkable="true"==document.getElementById(r+"form_view"+t).getAttribute("next_checkable"),previous_checkable="true"==document.getElementById(r+"form_view"+t).getAttribute("previous_checkable"),k=0,jQuery("#form"+r+" .wdform-page-and-images").each(function(){var e=jQuery(this).find(".wdform_page").attr("id");j=e.split("form_view")[1],document.getElementById(r+"form_view"+j)&&(document.getElementById(r+"form_view"+j).getAttribute("page_title")?w_pages=document.getElementById(r+"form_view"+j).getAttribute("page_title"):w_pages="",k++,page_number=document.createElement("span"),page_number.setAttribute("id","page_"+j),j<t&&(previous_checkable?page_number.setAttribute("onClick","if(fm_check("+t+", "+r+', false)) generate_page_nav("'+j+'", "'+r+'", "'+i+'")'):page_number.setAttribute("onClick",'generate_page_nav("'+j+'", "'+r+'", "'+i+'")')),j>t&&(next_checkable?page_number.setAttribute("onClick","if(fm_check("+t+", "+r+', false)) generate_page_nav("'+j+'", "'+r+'", "'+i+'")'):page_number.setAttribute("onClick",'generate_page_nav("'+j+'", "'+r+'", "'+i+'")')),j==t?page_number.setAttribute("class","page_active"):page_number.setAttribute("class","page_deactive"),show_title?page_number.innerHTML=w_pages:page_number.innerHTML=k,document.getElementById("fm-pages"+r).appendChild(page_number))})}function make_page_percentage_front(t,r,e){destroyChildren(document.getElementById("fm-pages"+r)),show_title="true"==document.getElementById("fm-pages"+r).getAttribute("show_title");var i=document.createElement("div");i.setAttribute("class","page_percentage_deactive");var n=document.createElement("div");n.setAttribute("id","div_percentage"),n.setAttribute("class","page_percentage_active"),n.setAttribute("align","right");var a=document.createElement("div");a.setAttribute("class","wdform_percentage_arrow");var o=document.createElement("b");o.setAttribute("class","wdform_percentage_text"),n.appendChild(o),k=0,cur_page_title="",jQuery(".wdform-page-and-images").each(function(){var e=jQuery(this).find(".wdform_page").attr("id");j=e.split("form_view")[1],document.getElementById(r+"form_view"+j)&&(document.getElementById(r+"form_view"+j).getAttribute("page_title")?w_pages=document.getElementById(r+"form_view"+j).getAttribute("page_title"):w_pages="",k++,j==t&&(show_title&&(cur_page_title=document.createElement("div"),cur_page_title.innerHTML=w_pages,cur_page_title.innerHTML=w_pages,cur_page_title.setAttribute("class","wdform_percentage_title")),page_number=k))}),o.innerHTML=Math.round((page_number-1)/k*100)+"%",n.style.width=(page_number-1)/k*100+"%",1==page_number&&(a.style.display="none"),i.appendChild(n),i.appendChild(a),cur_page_title&&i.appendChild(cur_page_title),document.getElementById("fm-pages"+r).appendChild(i)}function make_page_none_front(e){destroyChildren(document.getElementById("fm-pages"+e))}function make_pagebreak_button(e,t,r,i,n,a,o,d){switch(r){case"text":return(l=document.createElement("div")).setAttribute("id","page_"+e+"_"+a),l.setAttribute("class",i),"true"==n?l.setAttribute("onClick","if(fm_check("+a+", "+o+", false)) page_"+e+"("+a+","+o+","+d+")"):l.setAttribute("onClick","page_"+e+"("+a+","+o+","+d+")"),l.innerHTML=t,l;case"img":var l;return(l=document.createElement("img")).setAttribute("id","page_"+e+"_"+a),l.setAttribute("class",i),"true"==n?l.setAttribute("onClick","if(fm_check("+a+", "+o+", false)) page_"+e+"("+a+","+o+","+d+")"):l.setAttribute("onClick","page_"+e+"("+a+","+o+","+d+")"),0==t.indexOf("http")?l.src=t:l.src=fm_objectL10n.plugin_url+"/"+t,l}}function form_maker_findPos(e){var t=0;if(e.offsetParent){for(;t+=e.offsetTop,e=e.offsetParent;);return[t]}}function page_previous(e,t,r){form_view_elemet=document.getElementById(t+"form_view"+e),form_view_elemet.parentNode.previousSibling&&form_view_elemet.parentNode.previousSibling.previousSibling&&("DIV"==form_view_elemet.parentNode.previousSibling.tagName?table=form_view_elemet.parentNode.previousSibling:table=form_view_elemet.parentNode.previousSibling.previousSibling),table.firstChild.tagName||table.removeChild(table.firstChild),generate_page_nav(table.firstChild.id.replace(t+"form_view",""),t,r),form=jQuery("#form"+t),form.parent().hasClass("fm-scrollbox-form")||(jQuery("html").animate({scrollTop:form.offset().top-150},500),document.scrollingElement.scrollTop=form.offset().top-150)}function page_next(e,t,r){form_view_elemet=document.getElementById(t+"form_view"+e),form_view_elemet.parentNode.nextSibling&&("DIV"==form_view_elemet.parentNode.nextSibling.tagName?table=form_view_elemet.parentNode.nextSibling:table=form_view_elemet.parentNode.nextSibling.nextSibling),table.firstChild.tagName||table.removeChild(table.firstChild),generate_page_nav(table.firstChild.id.replace(t+"form_view",""),t,r),form=jQuery("#form"+t),form.parent().hasClass("fm-scrollbox-form")||(jQuery("html").animate({scrollTop:form.offset().top-150},500),document.scrollingElement.scrollTop=form.offset().top-150)}function fm_go_to_page(e,t,r){form_view_elemet=document.getElementById(t+"form_view"+e),table=form_view_elemet.parentNode,table.firstChild.tagName||table.removeChild(table.firstChild),generate_page_nav(table.firstChild.id.replace(t+"form_view",""),t,r),form=jQuery("#form"+t),form.parent().hasClass("fm-scrollbox-form")||(jQuery("html").animate({scrollTop:form.offset().top-150},500),document.scrollingElement.scrollTop=form.offset().top-150)}function getfileextension(e,t){if(void 0===e||0==e.length)return!0;var r=e.lastIndexOf("."),i=e.substr(r+1,e.length);t=t.split(",");for(var n=0;n<t.length;n++)if(t[n]=t[n].replace(/\./g,""),t[n]=t[n].replace(/ /g,""),i.toLowerCase()==t[n].toLowerCase())return!0;return!1}function reselect(e,t){t=void 0!==t?t:"",jQuery(e).wrap('<div class="sel-wrap '+t+'"/>');var r="",i=!1;jQuery(e).children("option").each(function(){jQuery(this).is(":selected")&&(i=jQuery(this).index()),r=r+'<div class="sel-option" value="'+jQuery(this).val()+'">'+jQuery(this).html()+"</div>"}),w=jQuery(e)[0].style.width,"100%"==w?w="100%":w=jQuery(e).width()+32+"px";var n='<div class="sel-imul" style="width:'+w+'"> <div class="sel-selected"> <div class="selected-text">'+jQuery(e).children("option").eq(i).html()+'</div> <div class="sel-arraw"></div> </div> <div class="sel-options">'+r+"</div> </div>";jQuery(e).addClass("no-width"),jQuery(e).before(n)}jQuery(document).ready(function(){if(jQuery(".wd-datepicker").each(function(){jQuery(this).datepicker(),jQuery(this).datepicker("option","dateFormat",jQuery(this).data("format"))}),0!==jQuery(".fm-form").find(".fm-message").length&&(jQuery(window).scrollTop(jQuery(".fm-message").offset().top-100),document.scrollingElement.scrollTop=jQuery(".fm-message").offset().top-100),0!==jQuery(".fm-form").find(".message_captcha").length){var e=jQuery(".fm-form").attr("name").split("form")[1];if(0!==jQuery("#form"+e+" .message_captcha").length){var t=jQuery(jQuery("#form"+e+" .message_captcha")).offset().top;jQuery(".fm-form").find(".message_captcha").parents(".wdform-field").find(".wdform-label").addClass("error_label"),jQuery("html").animate({scrollTop:t-150},500),document.scrollingElement.scrollTop=t-150}}}),jQuery(document).on("change",".wdform-element-section select",function(){var e=jQuery(this).children("option:selected").text();jQuery(this).parent(".sel-wrap ").children(".sel-imul").children(".sel-selected").children(".selected-text").html(e),jQuery(this).parent(".sel-wrap ").children(".sel-imul").children(".sel-options").children(".sel-option").removeClass("sel-ed"),jQuery(this).addClass("sel-ed"),jQuery(this).parent(".sel-wrap ").children(".sel-imul").children(".sel-options").each(function(){jQuery(this).html()==e&&jQuery(this).addClass("sel-ed")})}),jQuery(document).on("click",".sel-imul",function(){jQuery(".sel-imul").removeClass("act"),jQuery(this).addClass("act"),jQuery(this).children(".sel-options").is(":visible")?jQuery(".sel-options").hide():(jQuery(".sel-options").hide(),jQuery(this).children(".sel-options").show(),jQuery(this).children(".sel-options").css("width",jQuery(this).width()))}),jQuery(document).on("click",".sel-option",function(){var e=jQuery(this).html();jQuery(this).parent(".sel-options").parent(".sel-imul").children(".sel-selected").children(".selected-text").html(e),jQuery(this).parent(".sel-options").children(".sel-option").removeClass("sel-ed"),jQuery(this).addClass("sel-ed");var t=jQuery(this).attr("value");t=void 0!==t?t:e,jQuery(this).parent(".sel-options").parent(".sel-imul").parent(".sel-wrap").children("select").children("option").removeAttr("selected").each(function(){jQuery(this).html()==e&&jQuery(this).attr("selected","select")}),jQuery(this).parent(".sel-options").parent(".sel-imul").parent(".sel-wrap").children("select").change()});var selenter=!1;function remove_whitespace(e){var t;for(t=0;t<e.childNodes.length;t++)e.childNodes[t]&&"3"==e.childNodes[t].nodeType&&!/\S/.test(e.childNodes[t].nodeValue)?(e.removeChild(e.childNodes[t]),t--):e.childNodes[t].childNodes.length&&remove_whitespace(e.childNodes[t])}function change_value_range(e,t,r,i,n){r?jQuery("#"+e).datepicker("option",t,r):"today"==i?jQuery("#"+e).datepicker("option",t,new Date):(-1==i.indexOf("d")&&-1==i.indexOf("m")&&-1==i.indexOf("y")&&-1==i.indexOf("w")&&""!=i&&(i=jQuery.datepicker.formatDate(n,new Date(i))),jQuery("#"+e).datepicker("option",t,i))}function wd_check_confirmation_email(e,t,r,i){var n=jQuery("#wdform_"+e+"_element"+t),a=jQuery("#wdform_"+e+"_1_element"+t);!window["check_before_submit"+t][e+"_"+t]||jQuery(n).val()!=jQuery(a).val()?(jQuery("#confirm_"+e+"_"+t).remove(),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:eq( 1 ) .error_label_confirm").removeClass("error_label_confirm"),jQuery(n).val()!=jQuery(a).val()&&(jQuery(a).parent().parent().parent().append("<div id='confirm_"+e+"_"+t+"' class='fm-not-filled'>"+r+"</div>"),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:eq( 1 ) .wdform-label").addClass("error_label_confirm")),window["check_before_submit"+t][e+"_"+t]=!(e+"_"+t in window["check_before_submit"+t])||window["check_before_submit"+t][e+"_"+t]):(jQuery("#confirm_"+e+"_"+t).remove(),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:eq( 1 ) .error_label_confirm").removeClass("error_label_confirm"),1==window["check_before_submit"+t][e+"_"+t]&&delete window["check_before_submit"+t][e+"_"+t])}function wd_check_email(e,t,r){var i=jQuery("#wdform_"+e+"_element"+t),n=jQuery("#wdform_"+e+"_1_element"+t);""==jQuery(i).val()||/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,61}$/.test(jQuery.trim(jQuery(i).val()))||jQuery(i).attr("title")==jQuery(i).val()?(jQuery("#check_email_"+e+"_"+t).remove(),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:first .error_label_check_mail").removeClass("error_label_check_mail"),window["check_before_submit"+t][e+"_"+t]=!0,void 0===n.val()&&delete window["check_before_submit"+t][e+"_"+t]):(jQuery("#check_email_"+e+"_"+t).remove(),jQuery(i).parent().parent().parent().append("<div id='check_email_"+e+"_"+t+"' class='fm-not-filled'>"+r+"</div>"),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:first .wdform-label").addClass("error_label_check_mail"),i.val()==n.val()&&(jQuery("#confirm_"+e+"_"+t).remove(),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:eq( 1 ) .error_label_confirm").removeClass("error_label_confirm")),delete window["check_before_submit"+t][e+"_"+t],window["check_before_submit"+t][e+"_"+t]=!1)}function wd_check_confirmation_pass(e,t,r){var i=jQuery("#wdform_"+e+"_element"+t),n=jQuery("#wdform_"+e+"_1_element"+t);i.val()!==n.val()?(jQuery("#confirm_"+e+"_"+t).remove(),jQuery(n).parent().parent().parent().append("<div id='confirm_"+e+"_"+t+"' class='fm-not-filled'>"+r+"</div>"),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:eq( 1 ) .wdform-label").addClass("error_label_check_pass"),window["check_before_submit"+t][e+"_"+t]=!1):(jQuery("#confirm_"+e+"_"+t).remove(),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:eq( 1 ) .error_label_check_pass").removeClass("error_label_check_pass"),delete window["check_before_submit"+t][e+"_"+t])}function minimize_form(e){jQuery("#fm-scrollbox"+e).removeClass("fm-animated fadeInUp").addClass("fm-animated fadeOutDown fm-minimized"),jQuery("#fm-minimize-text"+e).removeClass("fm-animated fadeOutDown").addClass("fm-show fm-animated fadeInUp")}function fm_show_scrollbox(e){jQuery("#fm-minimize-text"+e).removeClass("fm-animated fadeInUp").addClass("fm-animated fadeOutDown"),jQuery("#fm-scrollbox"+e).removeClass("fm-animated fadeOutDown fm-minimized").addClass("fm-show fm-animated fadeInUp")}function fm_hide_form(e,t,r){var i=new Date;i.setDate(i.getDate()+t),0<t&&localStorage.setItem("hide-"+e,i.getTime()),"function"==typeof r&&r()}function wd_check_regExp(a,o){var d=jQuery("#form"+a),l=!1,e=o||window["check_regExp_all"+a];return jQuery.each(e,function(e,t){var r="#wdform_"+e+"_element"+a,i="",n=unescape(t[0]);i=t[1].length<=0?new RegExp(n):new RegExp(n,t[1]),0!=d.find(jQuery("div[wdid='"+e+"']")).length&&"none"!=d.find(jQuery("div[wdid='"+e+"']")).css("display")&&0<jQuery(r).val().length&&jQuery(r).val()!=jQuery(r).attr("title")&&1!=i.test(jQuery(r).val())&&(jQuery("#form"+a+" #wd_exp_"+e).remove(),d.find(jQuery("div[wdid='"+e+"'] .wdform-element-section")).parent().parent().append("<div id='wd_exp_"+e+"' class='fm-not-filled'>"+t[2]+"</div>"),jQuery("#form"+a+" div[wdid='"+e+"'] .wdform-label-section:first .wdform-label").addClass("error_label_exp"),l=!0,o||scroll_on_element(a))}),!1===l}function scroll_on_element(e){if(0==jQuery("#form"+e+" .fm-not-filled").length)return!0;var t=jQuery("#form"+e+" .fm-not-filled").closest(".wdform_row"),r=t.closest(".wdform_page");if("none"==r.parent().css("display")){var i=jQuery("#form"+e+" .wdform-page-and-images").length,n=jQuery("#form"+e+" .wdform_page").last().attr("id");n=n.split("form_view");var a=r.attr("id");fm_go_to_page(a=a.split("form_view")[1],e,i,n[1])}var o=jQuery(document).scrollTop(),d=document.body.clientHeight,l=jQuery("#form"+e+" .fm-not-filled").closest("div[wdid]").height(),s=jQuery("#form"+e+" .fm-not-filled").offset().top,u=function(){document.body.clientHeight!==d&&(d=document.body.clientHeight,l=jQuery("#form"+e+" .fm-not-filled").closest("div[wdid]").height(),s=jQuery("#form"+e+" .fm-not-filled").offset().top,jQuery("html").stop(),c())};function m(){old_bg=jQuery(t).css("background-color"),jQuery(t).effect("shake",{},500).css("background-color","#FF8F8B").animate({backgroundColor:old_bg},{duration:500,queue:!1})}function c(){jQuery("html").animate({scrollTop:s-(l+40)},500,function(){document.scrollingElement.scrollTop=s-(l+40),jQuery(window).off("scroll",u),m()})}jQuery(window).on("scroll",u),s<o?c():m()}function wd_file_upload_check(i,e){var n=jQuery("#form"+i),a=!1,t=e||window["file_upload_check"+i];return jQuery.each(t,function(e,t){var r="#wdform_"+e+"_element"+i;0!=n.find(jQuery("div[wdid='"+e+"']")).length&&"none"!=n.find(jQuery("div[wdid='"+e+"']")).css("display")&&(ext_available=getfileextension(jQuery(r).val(),t),ext_available?(jQuery("#form"+i+" #wd_upload_type_"+e).remove(),jQuery("#form"+i+" div[wdid='"+e+"'] .wdform-label-section:first .error_label_upload").removeClass("error_label_upload")):(jQuery("#form"+i+" #wd_upload_type_"+e).remove(),n.find(jQuery("div[wdid='"+e+"'] .wdform-element-section")).parent().parent().append("<div id='wd_upload_type_"+e+"' class='fm-not-filled'>"+fm_objectL10n.fm_file_type_error+"</div>"),jQuery("#form"+i+" div[wdid='"+e+"'] .wdform-label-section:first .wdform-label").addClass("error_label_upload"),a=!0))}),e||!0!==a||scroll_on_element(i),!1===a}function wd_is_filled(s,u,m){null==m&&(m=!0);var c=jQuery("#form"+s),e=u?u.split():window["required_fields"+s],_={};return jQuery(e).each(function(e,i){if("none"===c.find(jQuery("div[wdid='"+i+"']")).css("display")&&(c.find(jQuery("div[wdid='"+i+"']")).find(".fm-not-filled").remove(),c.find(jQuery("div[wdid='"+i+"']")).css("background-color",""),c.find(jQuery("div[wdid='"+i+"'] label")).removeClass("error_label")),0!=c.find(jQuery("div[wdid='"+i+"']")).length&&"none"!==c.find(jQuery("div[wdid='"+i+"']")).css("display"))switch(window["labels_and_ids"+s][i]){case"type_text":case"type_textarea":case"type_paypal_price_new":case"type_spinner":case"type_number":case"type_phone_new":case"type_submitter_mail":var t="#wdform_"+i+"_element"+s,r=jQuery(t).val();r=jQuery.trim(r),(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&(""!=r&&r!=jQuery(t).attr("title")||(_[i]=t)),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label")}).blur(function(){wd_is_filled(s,i)});break;case"type_own_select":case"type_country":case"type_paypal_select":t="#wdform_"+i+"_element"+s;(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label")}).blur(function(){wd_is_filled(s,i)}).change(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),wd_is_filled(s,i)});break;case"type_phone":t=["#wdform_"+i+"_element_first"+s,"#wdform_"+i+"_element_last"+s];jQuery.each(t,function(e,t){(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&(""!=jQuery(t).val()&&jQuery(t).val()!=jQuery(t).attr("title")||(_[i]=t)),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label")}).blur(function(){wd_is_filled(s,i)})});break;case"type_name":t=["#wdform_"+i+"_element_title"+s,"#wdform_"+i+"_element_first"+s,"#wdform_"+i+"_element_last"+s,"#wdform_"+i+"_element_middle"+s];jQuery.each(t,function(e,t){if((m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&jQuery(t).length){var r=jQuery(t).val();""!=(r=jQuery.trim(r))&&r!=jQuery(t).attr("title")||void 0===r||(_[i]=t)}u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove()}).blur(function(){wd_is_filled(s,i)})});break;case"type_address":t=["#wdform_"+i+"_street1"+s,"#wdform_"+i+"_street2"+s,"#wdform_"+i+"_city"+s,"#wdform_"+i+"_state"+s,"#wdform_"+i+"_postal"+s,"#wdform_"+i+"_country"+s];jQuery.each(t,function(e,t){if(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display")){var r=jQuery(t).val();void 0!==r&&(r=jQuery.trim(r)),""==r&&(_[i]=t)}u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove()}).blur(function(){wd_is_filled(s,i)})});break;case"type_checkbox":case"type_radio":case"type_scale_rating":case"type_paypal_checkbox":case"type_paypal_radio":case"type_paypal_shipping":(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&(0!=c.find(jQuery("div[wdid='"+i+"'] input:checked")).length&&""!=jQuery("#wdform_"+i+"_other_input"+s).val()||(_[i]=!0)),u||window["check_submit"+s]||jQuery.each(jQuery("#form"+s+" div[wdid='"+i+"'] input"),function(e,t){jQuery(this).change(function(){0==c.find(jQuery("div[wdid='"+i+"'] input:checked")).length||""==jQuery("#wdform_"+i+"_other_input"+s).val()?wd_is_filled(s,i):(jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"))})});break;case"type_star_rating":t="#wdform_"+i+"_selected_star_amount"+s;(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=!0),u||window["check_submit"+s]||jQuery("#wdform_"+i+"_element"+s).click(function(){""!=jQuery(t).val()&&(jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove())});break;case"type_range":t=["#wdform_"+i+"_element"+s+"0","#wdform_"+i+"_element"+s+"1"];jQuery.each(t,function(e,t){(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove()}).blur(function(){wd_is_filled(s,i)})});break;case"type_grading":if(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display")){var n=0;jQuery.each(jQuery("#wdform_"+i+"_element"+s+" input"),function(e,t){""!=jQuery(this).val()&&n++}),0==n&&(_[i]=!0)}u||window["check_submit"+s]||jQuery.each(jQuery("#wdform_"+i+"_element"+s+" input"),function(e,t){jQuery(this).focus(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove()}).blur(function(){wd_is_filled(s,i)})});break;case"type_slider":var a="#wdform_"+i+"_element"+s,o=(t="#wdform_"+i+"_slider_value"+s,"#wdform_"+i+"_element_min"+s);(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&jQuery(t).val()==jQuery(o).html()&&(_[i]=!0),u||window["check_submit"+s]||jQuery(a).slider({change:function(e,t){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove(),wd_is_filled(s,i)}});break;case"type_date":case"type_date_new":t="#wdform_"+i+"_element"+s;(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" #wd_required_"+i).remove()}).change(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),wd_is_filled(s,i)});break;case"type_date_range":t=["#wdform_"+i+"_element"+s+"0","#wdform_"+i+"_element"+s+"1"];jQuery.each(t,function(e,t){(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove()}).change(function(){wd_is_filled(s,i)})});break;case"type_date_fields":t=["#wdform_"+i+"_day"+s,"#wdform_"+i+"_month"+s,"#wdform_"+i+"_year"+s];jQuery.each(t,function(e,t){(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove()}).blur(function(){wd_is_filled(s,i)}).change(function(){wd_is_filled(s,i)})});break;case"type_time":t=["#wdform_"+i+"_hh"+s,"#wdform_"+i+"_mm"+s,"#wdform_"+i+"_ss"+s];jQuery.each(t,function(e,t){(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&void 0!==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove()}).blur(function(){wd_is_filled(s,i)})});break;case"type_password":t="#wdform_"+i+"_element"+s;(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label")}).blur(function(){wd_is_filled(s,i)});break;case"type_file_upload":t="#wdform_"+i+"_element"+s;(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&(jQuery(t).val()!=jQuery(t).attr("title")&&""!=jQuery(t).val()||(_[i]=t)),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove()}).change(function(){jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),wd_is_filled(s,i)});break;case"type_matrix":if(jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),"radio"==jQuery("#form"+s+" div[wdid='"+i+"'] input").attr("type")||"checkbox"==jQuery("#form"+s+" div[wdid='"+i+"'] input").attr("type"))(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&(0==c.find(jQuery("div[wdid='"+i+"'] input:checked")).length&&(_[i]=!0),"radio"==jQuery("#form"+s+" div[wdid='"+i+"'] input").attr("type")&&jQuery.each(jQuery("#form"+s+" div[wdid='"+i+"'] div[class^='wdform-matrix-row']"),function(e,t){0==jQuery(t).find('input[type="radio"]:checked').length&&(_[i]=!0)})),"checkbox"==jQuery("#form"+s+" div[wdid='"+i+"'] input").attr("type")&&(u||window["check_submit"+s]||jQuery.each(jQuery("#form"+s+" div[wdid='"+i+"'] input"),function(e,t){jQuery(this).change(function(){0==c.find(jQuery("div[wdid='"+i+"'] input:checked")).length?wd_is_filled(s,i):(jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove())})}));else if("text"==jQuery("#form"+s+" div[wdid='"+i+"'] input").attr("type")){if(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display")){var d=0;jQuery.each(jQuery("#form"+s+" div[wdid='"+i+"'] input"),function(e,t){""!=jQuery(this).val()&&d++}),0==d&&(_[i]=!0)}u||window["check_submit"+s]||jQuery.each(jQuery("#form"+s+" div[wdid='"+i+"'] input"),function(e,t){jQuery(this).focus(function(){jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label")}).blur(function(){wd_is_filled(s,i)})})}else{if(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display")){var l=0;jQuery.each(jQuery("#form"+s+" div[wdid='"+i+"'] select"),function(e,t){""!=jQuery(this).val()&&l++}),0==l&&(_[i]=!0)}u||window["check_submit"+s]||jQuery.each(jQuery("#form"+s+" div[wdid='"+i+"'] select"),function(e,t){jQuery(this).focus(function(){""==jQuery(this).val()&&(jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"))}).change(function(){wd_is_filled(s,i)}).blur(function(){wd_is_filled(s,i)})})}break;case"type_send_copy":(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&0==jQuery("div[wdid='"+i+"'] input:checked").length&&(_[i]=!0),u||window["check_submit"+s]||jQuery("#form"+s+" div[wdid='"+i+"'] input").change(function(){0==jQuery("div[wdid='"+i+"'] input:checked").length?wd_is_filled(s,i):(jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"))});break;case"type_captcha":case"type_arithmetic_captcha":t="";t="type_captcha"==window["labels_and_ids"+s][i]?"#wd_captcha_input"+s:"#wd_arithmetic_captcha_input"+s,(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(jQuery(".message_captcha").html(""),_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label")}).blur(function(){wd_is_filled(s,i)})}}),0===Object.keys(_).length&&0===Object.keys(window["check_before_submit"+s]).length||(0!==Object.keys(_).length&&jQuery.each(_,function(e,t){jQuery("#form"+s+" #wd_required_"+e).remove(),jQuery("#form"+s+" div[wdid='"+e+"'] .wdform-element-section:first").parent().parent().append("<div id='wd_required_"+e+"' class='fm-not-filled'>"+fm_objectL10n.fm_field_is_required+"</div>"),jQuery("#form"+s+" div[wdid='"+e+"'] .wdform-label-section:first .wdform-label").addClass("error_label")}),u||scroll_on_element(s),!(window["check_submit"+s]=1))}function wd_check_price_min_max(a,o){var d=jQuery("#form"+a),e=o||window["check_paypal_price_min_max"+a],l=!1;return jQuery.each(e,function(e,t){var r="#wdform_"+e+"_element"+a,i=t[3]?t[3]:0,n=t[4]?t[4]:-1;!t[2]&&jQuery(r).val()==t[1]||(-1!=n&&parseFloat(jQuery(r).val())>n||parseFloat(jQuery(r).val())<i)&&(jQuery("#form"+a+" #wd_price_"+e).remove(),d.find(jQuery("div[wdid='"+e+"'] .wdform-element-section")).parent().parent().append("<div id='wd_price_"+e+"' class='fm-not-filled'>"+fm_objectL10n.fm_min_max_check_1+t[0]+fm_objectL10n.fm_min_max_check_2+(t[3]?t[3]:0)+"-"+(t[4]?t[4]:"any")+"</div>"),jQuery("#form"+a+" div[wdid='"+e+"'] .wdform-label-section:first .wdform-label").addClass("error_label_price"),l=!0,o||scroll_on_element(a))}),!1===l}function wd_spinner_check(i,n){var a=jQuery("#form"+i),o=!1,e=n||window["spinner_check"+i];return jQuery.each(e,function(e,t){var r="#wdform_"+e+"_element"+i;0!=a.find(jQuery("div[wdid='"+e+"']")).length&&"none"!=a.find(jQuery("div[wdid='"+e+"']")).css("display")&&(parseInt(jQuery(r).val())<parseInt(t[0])||parseInt(jQuery(r).val())>parseInt(t[1]))&&(jQuery("#form"+i+" #wd_price_"+e).remove(),a.find(jQuery("div[wdid='"+e+"'] .wdform-element-section")).parent().parent().append("<div id='wd_price_"+e+"' class='fm-not-filled'>"+fm_objectL10n.fm_spinner_check+(t[0]?t[0]:0)+"-"+(t[1]?t[1]:"any")+"</div>"),jQuery("#form"+i+" div[wdid='"+e+"'] .wdform-label-section:first .wdform-label").addClass("error_label_price"),o=!0,n||scroll_on_element(i))}),!1===o}function fmscrollHandler(e){var t=100*jQuery(window).scrollTop()/(jQuery(document).height()-jQuery(window).height());!jQuery("#fm-scrollbox"+e).hasClass("fm-minimized")&&t>=window["scrollbox_trigger_point"+e]?setTimeout(function(){jQuery("#fm-scrollbox"+e).removeClass("fm-animated fadeOutDown").addClass("fm-animated fadeInUp"),jQuery("#fm-scrollbox"+e).css("visibility",""),jQuery("#fm-scrollbox"+e+" .fm-header-img").addClass("fm-animated "+window["header_image_animation"+e])},1e3*window["scrollbox_loading_delay"+e]):window["scrollbox_auto_hide"+e]&&(jQuery("#fm-scrollbox"+e+" .fm-header-img").removeClass("fm-animated "+window["header_image_animation"+e]),jQuery("#fm-scrollbox"+e).removeClass("fm-animated fadeInUp").addClass("fm-animated fadeOutDown"))}function fm_submit_form(e){if("function"==typeof window["before_submit"+e]&&window["before_submit"+e]())return!1;if(!fm_check(0,e))return!1;(jQuery("#form"+e+" button").each(function(){jQuery(this).attr("disabled","disabled")}),jQuery('<input type="hidden" name="save_or_submit'+e+'" value ="submit" />').appendTo("#form"+e),window["onsubmit_js"+e](),1==window["checkStripe"+e])?"none"!=jQuery("form[id='form"+e+"']").find(".wdfm_stripe_elem").first().parents(".wdform_row").parents(".wdform_row").css("display")?wdfm_call_stripe(!0):0<jQuery("#form"+e).find(".g-recaptcha[data-size=invisible]").length?grecaptcha.execute():fm_submit(e):0<jQuery("#form"+e).find(".g-recaptcha[data-size=invisible]").length?grecaptcha.execute():fm_submit(e)}function fm_submit(i){if(fm_set_input_value("fm_empty_field_validation"+i,jQuery("#fm_empty_field_validation"+i).attr("data-value")),"0"!=jQuery("#form"+i+" .button-submit").attr("data-ajax")){jQuery("#form"+i+" .fm-submit-loading").css("display","inline-block");var e=jQuery("#form"+i)[0],t=new FormData(e),r=jQuery("#fm_ajax_url"+i).data("ajax_url"),n=jQuery("#form"+i+" #fm_ajax_redirect_url"+i).data("ajax_redirect_url");jQuery.ajax({type:"POST",enctype:"multipart/form-data",url:r,data:t,contentType:!1,processData:!1,success:function(e){jQuery("#form"+i+" .button-submit").removeAttr("disabled"),jQuery("#form"+i+" .fm-submit-loading").hide();var t=jQuery(e).find("#form"+i).html();jQuery("#form"+i).html(t);var r=!1;(0<jQuery(t).find(".fm-not-filled.message_captcha").length||0<jQuery(t).find(".fm-notice-error").length||-1<t.indexOf('class="fm-message fm-notice-error"'))&&(r=!0),0==n||r||window.location.replace(n)},complete:function(){"function"==typeof window["after_submit"+i]&&window["after_submit"+i]()}})}else jQuery("#form"+i).submit()}function fm_reset_form(form_id){"function"==typeof window["before_reset"+form_id]&&window["before_reset"+form_id]();var privacy_policy_check=jQuery("#fm_privacy_policy"+form_id);privacy_policy_check&&(privacy_policy_check.prop("checked",!1),fm_privacy_policy_check(privacy_policy_check)),jQuery.each(window["labels_and_ids"+form_id],function(index,elem){switch(elem){case"type_text":case"type_textarea":case"type_number":case"type_spinner":case"type_own_select":case"type_country":case"type_date":case"type_date_new":case"type_hidden":case"type_paypal_price_new":case"type_phone_new":jQuery("#wdform_"+index+"_element"+form_id).val("");break;case"type_submitter_mail":case"type_password":jQuery("#wdform_"+index+"_element"+form_id).val(""),jQuery("#wdform_"+index+"_1_element"+form_id)&&(jQuery("#wdform_"+index+"_1_element"+form_id).val(""),jQuery("#confirm_"+index+"_"+form_id)&&jQuery("#confirm_"+index+"_"+form_id).remove(),"type_submitter_mail"==elem&&jQuery("#check_email_"+index+"_"+form_id)&&jQuery("#check_email_"+index+"_"+form_id).remove());break;case"type_date_range":jQuery("#wdform_"+index+"_element"+form_id+"0").val(""),jQuery("#wdform_"+index+"_element"+form_id+"1").val("");break;case"type_send_copy":jQuery("#wdform_"+index+"_element"+form_id).prop("checked",!1);break;case"type_phone":jQuery("#wdform_"+index+"_element_first"+form_id+", #wdform_"+index+"_element_last"+form_id).val("");break;case"type_name":jQuery("#wdform_"+index+"_element_first"+form_id+", #wdform_"+index+"_element_last"+form_id+", #wdform_"+index+"_element_title"+form_id+", #wdform_"+index+"_element_middle"+form_id).val("");break;case"type_address":jQuery("#wdform_"+index+"_street1"+form_id+", #wdform_"+index+"_street2"+form_id+", #wdform_"+index+"_city"+form_id+", #wdform_"+index+"_state"+form_id+", #wdform_"+index+"_postal"+form_id+", #wdform_"+index+"_country"+form_id).val("");break;case"type_checkbox":jQuery("#form"+form_id+" div[wdid='"+index+"'] .checkbox-div input").prop("checked",!1),jQuery("#wdform_"+index+"_other_br"+form_id).remove(),jQuery("#wdform_"+index+"_other_input"+form_id).remove();break;case"type_radio":jQuery("#form"+form_id+" div[wdid='"+index+"'] .radio-div input").prop("checked",!1),jQuery("#wdform_"+index+"_other_br"+form_id).remove(),jQuery("#wdform_"+index+"_other_input"+form_id).remove();break;case"type_time":jQuery("#wdform_"+index+"_hh"+form_id+", #wdform_"+index+"_mm"+form_id+", #wdform_"+index+"_ss"+form_id+", #wdform_"+index+"_am_pm"+form_id).val("");break;case"type_date_fields":jQuery("#wdform_"+index+"_day"+form_id+", #wdform_"+index+"_month"+form_id+", #wdform_"+index+"_year"+form_id).val("");break;case"type_file_upload":jQuery("#wdform_"+index+"_element"+form_id+"_save").remove();break;case"type_paypal_price":jQuery("#wdform_"+index+"_element_dollars"+form_id+", #wdform_"+index+"_element_cents"+form_id).val("");break;case"type_paypal_select":jQuery("#wdform_"+index+"_element"+form_id+", #wdform_"+index+"_element_quantity"+form_id+", #form"+form_id+" div[wdid='"+index+"'] .paypal-property select").val("");break;case"type_paypal_radio":jQuery("#wdform_"+index+"_element_quantity"+form_id+",#form"+form_id+" div[wdid='"+index+"'] .paypal-property select").val(""),jQuery("#form"+form_id+" div[wdid='"+index+"'] .radio-div input").prop("checked",!1);break;case"type_paypal_shipping":jQuery("#form"+form_id+" div[wdid='"+index+"'] .radio-div input").prop("checked",!1);break;case"type_paypal_checkbox":jQuery("#wdform_"+index+"_element_quantity"+form_id+",#form"+form_id+" div[wdid='"+index+"'] .paypal-property select").val(""),jQuery("#form"+form_id+" div[wdid='"+index+"'] .checkbox-div input").prop("checked",!1);break;case"type_star_rating":jQuery("#wdform_"+index+"_selected_star_amount"+form_id).val(""),jQuery("#wdform_"+index+"_element"+form_id+" img").attr("src",fm_objectL10n.plugin_url+"/images/star.png");break;case"type_scale_rating":jQuery("#form"+form_id+" div[wdid='"+index+"'] .radio-div input").prop("checked",!1);break;case"type_slider":jQuery("#wdform_"+index+"_element"+form_id).slider({value:eval(0)}),jQuery("#wdform_"+index+"_element_value"+form_id).html("0");break;case"type_range":jQuery("#wdform_"+index+"_element"+form_id+"0, #wdform_"+index+"_element"+form_id+"1").val("");break;case"type_grading":jQuery("#wdform_"+index+"_element"+form_id+" input").val("");break;case"type_matrix":jQuery("#wdform_"+index+"_element"+form_id+" .radio-div input").prop("checked",!1),jQuery("#wdform_"+index+"_element"+form_id+" .checkbox-div input").prop("checked",!1),jQuery("#wdform_"+index+"_element"+form_id+" input[type='text']").val(""),jQuery("#wdform_"+index+"_element"+form_id+" select").val("");break;case"type_paypal_total":jQuery("#wdform_"+index+"div_total"+form_id).html("$0"),jQuery("#wdform_"+index+"paypal_products"+form_id).empty();break;case"type_captcha":jQuery("#wd_captcha_input"+form_id).val("")}})}function fm_save_form(e){jQuery('<input type="hidden" name="save_or_submit'+e+'" value ="save" />').appendTo("#form"+e),window["onsubmit_js"+e](),jQuery("#form"+e+" button").each(function(){jQuery(this).attr("disabled","disabled")}),fm_set_input_value("fm_empty_field_validation"+e,jQuery("#fm_empty_field_validation"+e).attr("data-value")),jQuery("#form"+e).submit()}function fm_clear_form(e){1==confirm(fm_objectL10n.fm_clear_data)&&(jQuery("#form"+e+" button").each(function(){jQuery(this).attr("disabled","disabled")}),jQuery.get(fm_objectL10n.form_maker_admin_ajax+"?action=FMClearProg&addon_task=clear_data&nonce="+fm_ajax.ajaxnonce+"&form_id="+e).done(function(){window.location=jQuery("#form"+e).attr("action")}))}function fm_set_input_value(e,t){jQuery("#"+e).val(t)}function formOnload(i){var n;-1!=navigator.userAgent.toLowerCase().indexOf("msie")&&8===parseInt(navigator.userAgent.toLowerCase().split("msie")[1])&&(jQuery("#form"+i).find(jQuery("input[type='radio']")).click(function(){jQuery("input[type='radio']+label").removeClass("if-ie-div-label"),jQuery("input[type='radio']:checked+label").addClass("if-ie-div-label")}),jQuery("#form"+i).find(jQuery("input[type='radio']:checked+label")).addClass("if-ie-div-label"),jQuery("#form"+i).find(jQuery("input[type='checkbox']")).click(function(){jQuery("input[type='checkbox']+label").removeClass("if-ie-div-label"),jQuery("input[type='checkbox']:checked+label").addClass("if-ie-div-label")}),jQuery("#form"+i).find(jQuery("input[type='checkbox']:checked+label")).addClass("if-ie-div-label")),jQuery.each(window["check_regExp_all"+i],function(e,t){var r={};r[e]=t,jQuery("div[wdid='"+e+"'] input").blur(function(){wd_check_regExp(i,r)}).focus(function(){jQuery("#form"+i+" #wd_exp_"+e).remove(),jQuery("#form"+i+" div[wdid='"+e+"'] .wdform-label-section:first .error_label_exp").removeClass("error_label_exp")})}),jQuery.each(window["check_paypal_price_min_max"+i],function(e,t){var r={};r[e]=t,jQuery("div[wdid='"+e+"'] input").blur(function(){wd_check_price_min_max(i,r)}).focus(function(){jQuery("#form"+i+" #wd_price_"+e).remove(),jQuery("#form"+i+" div[wdid='"+e+"'] .wdform-label-section:first .error_label_price").removeClass("error_label_price")})}),jQuery.each(window["spinner_check"+i],function(e,t){var r={};r[e]=t,jQuery("div[wdid='"+e+"'] input").blur(function(){wd_spinner_check(i,r)}).focus(function(){jQuery("#form"+i+" #wd_price_"+e).remove(),jQuery("#form"+i+" div[wdid='"+e+"'] .wdform-label-section:first .error_label_price").removeClass("error_label_price")})}),jQuery.each(window["file_upload_check"+i],function(e,t){var r={};r[e]=t,jQuery("div[wdid='"+e+"'] input").change(function(){wd_file_upload_check(i,r)})}),jQuery("#form"+i+" input").on("keypress",function(e){if(13==(e.keyCode?e.keyCode:e.which))return!1}),jQuery("div[type='type_number'] input, div[type='type_phone'] input, div[type='type_spinner'] input, div[type='type_range'] input, .wdform-quantity, div[type='type_paypal_price_new'] input").keypress(function(e){return check_isnum(e)}),jQuery("div[type='type_grading'] input").keypress(function(e){return check_isnum_or_minus(e)}),jQuery("div[type='type_paypal_checkbox'] input[type='checkbox'], div[type='type_paypal_radio'] input[type='radio'], div[type='type_paypal_shipping'] input[type='radio']").click(function(){set_total_value(i)}),jQuery("div[type='type_paypal_select'] select, div[type='type_paypal_price'] input, div[type='type_paypal_price_new'] input").change(function(){set_total_value(i)}),jQuery(".wdform-quantity").change(function(){set_total_value(i)}),jQuery("div[type='type_address'] select").change(function(){set_total_value(i)}),jQuery("div[type='type_time'] input").blur(function(){add_0(this)}),jQuery(".wdform-element-section").each(function(){if("type_stripe"==jQuery(this).parent().parent().attr("type"))return!0;jQuery(this).parent()[0].style.width||0==parseInt(jQuery(this).width())||0==jQuery(this).parent().find(jQuery(".wdform-label-section")).length||"table-cell"==jQuery(this).css("display")&&("type_captcha"!=jQuery(this).parent().attr("type")?jQuery(this).parent().css("width",parseInt(jQuery(this).width())+parseInt(jQuery(this).parent().find(jQuery(".wdform-label-section"))[0].style.width)+15):jQuery(this).parent().css("width",2*parseInt(jQuery(this).parent().find(jQuery(".captcha_input"))[0].style.width)+50+parseInt(jQuery(this).parent().find(jQuery(".wdform-label-section"))[0].style.width)+15)),parseInt(jQuery(this)[0].style.width.replace("px",""))<parseInt(jQuery(this).css("min-width").replace("px",""))&&jQuery(this).css("min-width",parseInt(jQuery(this)[0].style.width.replace("px",""))-10)}),jQuery(".wdform-label").each(function(){parseInt(jQuery(this).height())>=2*parseInt(jQuery(this).css("line-height").replace("px",""))&&(jQuery(this).parent().css("max-width",jQuery(this).parent().width()),jQuery(this).parent().css("width",""))}),(n=jQuery).fn.shuffle=function(){var i=n(this).find(".wd-choice"),t=n.map(i,function(){var e,t=(e=i.length,Math.floor(Math.random()*e)),r=n(i[parseInt(t)]).clone(!0)[0];return i.splice(t,1),r});return n(this).find(".wd-choice").each(function(e){n(this).replaceWith(n(t[e]))}),n(t)},window["onload_js"+i](),"function"==typeof window["before_load"+i]&&window["before_load"+i]()}function fm_document_ready(e){jQuery("#form"+e).hasClass("fm-form-submitted")&&"function"==typeof window["after_submit"+e]&&window["after_submit"+e]();var t=jQuery("#form"+e+" .wdform-page-and-images").length;window["form_view_count"+e]=t,1<window["form_view_count"+e]&&(firstid=jQuery("#form"+e+" .wdform_page").first().attr("id"),firstid=firstid.split("form_view"),window["first_form_view"+e]=firstid[1],generate_page_nav(window["first_form_view"+e],e,window["form_view_count"+e])),fm_initilize_form(e),window["condition_js"+e](),jQuery("#form"+e).closest(".fm-form-container").removeAttr("style")}function fm_check(e,t,r){if(!wd_is_filled(t,void 0,r))return!1;if(1==window["checkStripe"+t]){var i=jQuery("form[id='form"+t+"']");if("none"!=i.find(".wdfm_stripe_elem").first().closest(".wdform-page-and-images").css("display")&&"none"!=i.find(".wdfm_stripe_elem").first().parents(".wdform_row").parents(".wdform_row").css("display")&&0==wdfm_call_stripe(!1))return!1}return!!wd_check_regExp(t)&&(!!wd_check_price_min_max(t)&&(!!wd_spinner_check(t)&&(!!wd_file_upload_check(t)&&0!=window["check_js"+t](e,t))))}function fmRecaptchaInit(){jQuery(".g-recaptcha").each(function(){if(type=jQuery(this).attr("data-size"),"invisible"==type)r=jQuery(this).attr("data-form_id"),grecaptcha.render(jQuery(this).attr("id"),{sitekey:jQuery(this).attr("data-sitekey"),badge:jQuery(this).attr("data-badge"),callback:function(){fm_submit(r)}});else if("v3"==type){if("undefined"==jQuery(this).attr("data-sitekey")||""==jQuery(this).attr("data-sitekey"))return;var t=jQuery(this).attr("data-id"),r=jQuery(this).attr("data-form-id"),e=jQuery(this).attr("data-sitekey");grecaptcha.ready(function(){grecaptcha.execute(e).then(function(e){document.getElementById("recaptchaV3Response_"+r+t).value=e})})}else grecaptcha.render(jQuery(this).attr("id"),{sitekey:jQuery(this).attr("data-sitekey"),theme:"light"})})}function wd_change_state_input(e,t){if(document.getElementById(e+"_country"+t)&&document.getElementById(e+"_state"+t)){var r=!1,i=document.getElementById(e+"_state"+t);if("United States"==document.getElementById(e+"_country"+t).value){var n=document.createElement("select"),a=fm_objectL10n.states;for(var o in a){(d=document.createElement("option")).setAttribute("value",o),d.innerHTML=a[o],n.appendChild(d)}r=!0}else if("Canada"==document.getElementById(e+"_country"+t).value){n=document.createElement("select"),a=fm_objectL10n.provinces;for(var o in a){var d;(d=document.createElement("option")).setAttribute("value",o),d.innerHTML=a[o],n.appendChild(d)}r=!0}else if("SELECT"==document.getElementById(e+"_state"+t).tagName){n=document.createElement("input");r=!0}if(r){n.setAttribute("type","text"),n.setAttribute("id",e+"_state"+t),n.setAttribute("name","wdform_"+(parseInt(e.replace("wdform_",""))+3)+"_state"+t),n.setAttribute("class","wd-width-100");var l=i.parentNode;l.removeChild(i),l.insertBefore(n,l.firstChild)}}}function fm_privacy_policy_check(e){var t=jQuery(e),r=t.parents(".wdform_row").find(".button-submit");t.is(":checked")?r.removeAttr("disabled"):r.attr("disabled","disabled")}jQuery(document).on("mouseenter",".sel-imul",function(){selenter=!0}),jQuery(document).on("mouseleave",".sel-imul",function(){selenter=!1}),jQuery(document).click(function(){selenter||(jQuery(".sel-options").hide(),jQuery(".sel-imul").removeClass("act"))}),function(t){"function"==typeof define&&define.amd?define(["jquery"],function(e){t(e,window,document)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),window,document):t(jQuery,window,document)}(function(l,d,e,a){"use strict";var o="intlTelInput",r=1,i={allowDropdown:!0,autoHideDialCode:!0,autoPlaceholder:"polite",customPlaceholder:null,dropdownContainer:"",excludeCountries:[],formatOnDisplay:!0,geoIpLookup:null,initialCountry:"",nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",preferredCountries:["us","gb"],separateDialCode:!1,utilsScript:""},s=38,u=40,m=13,c=27,t=43,_=65,f=90,p=32,n=9,y=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"];function h(e,t){this.telInput=l(e),this.options=l.extend({},i,t),this.ns="."+o+r++,this.isGoodBrowser=Boolean(e.setSelectionRange),this.hadInitialPlaceholder=Boolean(l(e).attr("placeholder"))}l(d).on("load",function(){l.fn[o].windowLoaded=!0}),h.prototype={_init:function(){return this.options.nationalMode&&(this.options.autoHideDialCode=!1),this.options.separateDialCode&&(this.options.autoHideDialCode=this.options.nationalMode=!1),this.isMobile=/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),this.isMobile&&(l("body").addClass("iti-mobile"),this.options.dropdownContainer||(this.options.dropdownContainer="body")),this.autoCountryDeferred=new l.Deferred,this.utilsScriptDeferred=new l.Deferred,this._processCountryData(),this._generateMarkup(),this._setInitialState(),this._initListeners(),this._initRequests(),[this.autoCountryDeferred,this.utilsScriptDeferred]},_processCountryData:function(){this._processAllCountries(),this._processCountryCodes(),this._processPreferredCountries()},_addCountryCode:function(e,t,r){t in this.countryCodes||(this.countryCodes[t]=[]);var i=r||0;this.countryCodes[t][i]=e},_filterCountries:function(e,t){var r;for(r=0;r<e.length;r++)e[r]=e[r].toLowerCase();for(this.countries=[],r=0;r<w.length;r++)t(l.inArray(w[r].iso2,e))&&this.countries.push(w[r])},_processAllCountries:function(){this.options.onlyCountries.length?this._filterCountries(this.options.onlyCountries,function(e){return-1<e}):this.options.excludeCountries.length?this._filterCountries(this.options.excludeCountries,function(e){return-1==e}):this.countries=w},_processCountryCodes:function(){this.countryCodes={};for(var e=0;e<this.countries.length;e++){var t=this.countries[e];if(this._addCountryCode(t.iso2,t.dialCode,t.priority),t.areaCodes)for(var r=0;r<t.areaCodes.length;r++)this._addCountryCode(t.iso2,t.dialCode+t.areaCodes[r])}},_processPreferredCountries:function(){this.preferredCountries=[];for(var e=0;e<this.options.preferredCountries.length;e++){var t=this.options.preferredCountries[e].toLowerCase(),r=this._getCountryData(t,!1,!0);r&&this.preferredCountries.push(r)}},_generateMarkup:function(){this.telInput.attr("autocomplete","off");var e="intl-tel-input";this.options.allowDropdown&&(e+=" allow-dropdown"),this.options.separateDialCode&&(e+=" separate-dial-code"),this.telInput.wrap(l("<div>",{class:e})),this.flagsContainer=l("<div>",{class:"flag-container"}).insertBefore(this.telInput);var t=l("<div>",{class:"selected-flag"});t.appendTo(this.flagsContainer),this.selectedFlagInner=l("<div>",{class:"iti-flag"}).appendTo(t),this.options.separateDialCode&&(this.selectedDialCode=l("<div>",{class:"selected-dial-code"}).appendTo(t)),this.options.allowDropdown?(t.attr("tabindex","0"),l("<div>",{class:"iti-arrow"}).appendTo(t),this.countryList=l("<ul>",{class:"country-list hide"}),this.preferredCountries.length&&(this._appendListItems(this.preferredCountries,"preferred"),l("<li>",{class:"divider"}).appendTo(this.countryList)),this._appendListItems(this.countries,""),this.countryListItems=this.countryList.children(".country"),this.options.dropdownContainer?this.dropdown=l("<div>",{class:"intl-tel-input iti-container"}).append(this.countryList):this.countryList.appendTo(this.flagsContainer)):this.countryListItems=l()},_appendListItems:function(e,t){for(var r="",i=0;i<e.length;i++){var n=e[i];r+="<li class='country "+t+"' data-dial-code='"+n.dialCode+"' data-country-code='"+n.iso2+"'>",r+="<div class='flag-box'><div class='iti-flag "+n.iso2+"'></div></div>",r+="<span class='country-name'>"+n.name+"</span>",r+="<span class='dial-code'>+"+n.dialCode+"</span>",r+="</li>"}this.countryList.append(r)},_setInitialState:function(){var e=this.telInput.val();this._getDialCode(e)&&!this._isRegionlessNanp(e)?this._updateFlagFromNumber(e):"auto"!==this.options.initialCountry&&(this.options.initialCountry?this._setFlag(this.options.initialCountry.toLowerCase()):(this.defaultCountry=this.preferredCountries.length?this.preferredCountries[0].iso2:this.countries[0].iso2,e||this._setFlag(this.defaultCountry)),e||this.options.nationalMode||this.options.autoHideDialCode||this.options.separateDialCode||this.telInput.val("+"+this.selectedCountryData.dialCode)),e&&this._updateValFromNumber(e)},_initListeners:function(){this._initKeyListeners(),this.options.autoHideDialCode&&this._initFocusListeners(),this.options.allowDropdown&&this._initDropdownListeners()},_initDropdownListeners:function(){var t=this,e=this.telInput.closest("label");e.length&&e.on("click"+this.ns,function(e){t.countryList.hasClass("hide")?t.telInput.focus():e.preventDefault()}),this.selectedFlagInner.parent().on("click"+this.ns,function(e){!t.countryList.hasClass("hide")||t.telInput.prop("disabled")||t.telInput.prop("readonly")||t._showDropdown()}),this.flagsContainer.on("keydown"+t.ns,function(e){!t.countryList.hasClass("hide")||e.which!=s&&e.which!=u&&e.which!=p&&e.which!=m||(e.preventDefault(),e.stopPropagation(),t._showDropdown()),e.which==n&&t._closeDropdown()})},_initRequests:function(){var e=this;this.options.utilsScript?l.fn[o].windowLoaded?l.fn[o].loadUtils(this.options.utilsScript,this.utilsScriptDeferred):l(d).on("load",function(){l.fn[o].loadUtils(e.options.utilsScript,e.utilsScriptDeferred)}):this.utilsScriptDeferred.resolve(),"auto"===this.options.initialCountry?this._loadAutoCountry():this.autoCountryDeferred.resolve()},_loadAutoCountry:function(){l.fn[o].autoCountry?this.handleAutoCountry():l.fn[o].startedLoadingAutoCountry||(l.fn[o].startedLoadingAutoCountry=!0,"function"==typeof this.options.geoIpLookup&&this.options.geoIpLookup(function(e){l.fn[o].autoCountry=e.toLowerCase(),setTimeout(function(){l(".intl-tel-input input").intlTelInput("handleAutoCountry")})}))},_initKeyListeners:function(){var e=this;this.telInput.on("keyup"+this.ns,function(){e._updateFlagFromNumber(e.telInput.val())&&e._triggerCountryChange()}),this.telInput.on("cut"+this.ns+" paste"+this.ns,function(){setTimeout(function(){e._updateFlagFromNumber(e.telInput.val())&&e._triggerCountryChange()})})},_cap:function(e){var t=this.telInput.attr("maxlength");return t&&e.length>t?e.substr(0,t):e},_initFocusListeners:function(){var r=this;this.telInput.on("mousedown"+this.ns,function(e){r.telInput.is(":focus")||r.telInput.val()||(e.preventDefault(),r.telInput.focus())}),this.telInput.on("focus"+this.ns,function(e){r.telInput.val()||r.telInput.prop("readonly")||!r.selectedCountryData.dialCode||(r.telInput.val("+"+r.selectedCountryData.dialCode),r.telInput.one("keypress.plus"+r.ns,function(e){e.which==t&&r.telInput.val("")}),setTimeout(function(){var e=r.telInput[0];if(r.isGoodBrowser){var t=r.telInput.val().length;e.setSelectionRange(t,t)}}))});var e=this.telInput.prop("form");e&&l(e).on("submit"+this.ns,function(){r._removeEmptyDialCode()}),this.telInput.on("blur"+this.ns,function(){r._removeEmptyDialCode()})},_removeEmptyDialCode:function(){var e=this.telInput.val();if("+"==e.charAt(0)){var t=this._getNumeric(e);t&&this.selectedCountryData.dialCode!=t||this.telInput.val("")}this.telInput.off("keypress.plus"+this.ns)},_getNumeric:function(e){return e.replace(/\D/g,"")},_showDropdown:function(){this._setDropdownPosition();var e=this.countryList.children(".active");e.length&&(this._highlightListItem(e),this._scrollTo(e)),this._bindDropdownListeners(),this.selectedFlagInner.children(".iti-arrow").addClass("up")},_setDropdownPosition:function(){var e=this;if(this.options.dropdownContainer&&this.dropdown.appendTo(this.options.dropdownContainer),this.dropdownHeight=this.countryList.removeClass("hide").outerHeight(),!this.isMobile){var t=this.telInput.offset(),r=t.top,i=l(d).scrollTop(),n=r+this.telInput.outerHeight()+this.dropdownHeight<i+l(d).height(),a=r-this.dropdownHeight>i;if(this.countryList.toggleClass("dropup",!n&&a),this.options.dropdownContainer){var o=!n&&a?0:this.telInput.innerHeight();this.dropdown.css({top:r+o,left:t.left}),l(d).on("scroll"+this.ns,function(){e._closeDropdown()})}}},_bindDropdownListeners:function(){var t=this;this.countryList.on("mouseover"+this.ns,".country",function(e){t._highlightListItem(l(this))}),this.countryList.on("click"+this.ns,".country",function(e){t._selectListItem(l(this))});var r=!0;l("html").on("click"+this.ns,function(e){r||t._closeDropdown(),r=!1});var i="",n=null;l(e).on("keydown"+this.ns,function(e){e.preventDefault(),e.which==s||e.which==u?t._handleUpDownKey(e.which):e.which==m?t._handleEnterKey():e.which==c?t._closeDropdown():(e.which>=_&&e.which<=f||e.which==p)&&(n&&clearTimeout(n),i+=String.fromCharCode(e.which),t._searchForCountry(i),n=setTimeout(function(){i=""},1e3))})},_handleUpDownKey:function(e){var t=this.countryList.children(".highlight").first(),r=e==s?t.prev():t.next();r.length&&(r.hasClass("divider")&&(r=e==s?r.prev():r.next()),this._highlightListItem(r),this._scrollTo(r))},_handleEnterKey:function(){var e=this.countryList.children(".highlight").first();e.length&&this._selectListItem(e)},_searchForCountry:function(e){for(var t=0;t<this.countries.length;t++)if(this._startsWith(this.countries[t].name,e)){var r=this.countryList.children("[data-country-code="+this.countries[t].iso2+"]").not(".preferred");this._highlightListItem(r),this._scrollTo(r,!0);break}},_startsWith:function(e,t){return e.substr(0,t.length).toUpperCase()==t},_updateValFromNumber:function(e){if(this.options.formatOnDisplay&&d.intlTelInputUtils&&this.selectedCountryData){var t=this.options.separateDialCode||!this.options.nationalMode&&"+"==e.charAt(0)?intlTelInputUtils.numberFormat.INTERNATIONAL:intlTelInputUtils.numberFormat.NATIONAL;e=intlTelInputUtils.formatNumber(e,this.selectedCountryData.iso2,t)}e=this._beforeSetNumber(e),this.telInput.val(e)},_updateFlagFromNumber:function(e){e&&this.options.nationalMode&&this.selectedCountryData&&"1"==this.selectedCountryData.dialCode&&"+"!=e.charAt(0)&&("1"!=e.charAt(0)&&(e="1"+e),e="+"+e);var t=this._getDialCode(e),r=null,i=this._getNumeric(e);if(t){var n=this.countryCodes[this._getNumeric(t)],a=this.selectedCountryData&&-1<l.inArray(this.selectedCountryData.iso2,n),o="+1"==t&&4<=i.length;if((!(this.selectedCountryData&&"1"==this.selectedCountryData.dialCode)||!this._isRegionlessNanp(i))&&(!a||o))for(var d=0;d<n.length;d++)if(n[d]){r=n[d];break}}else"+"==e.charAt(0)&&i.length?r="":e&&"+"!=e||(r=this.defaultCountry);return null!==r&&this._setFlag(r)},_isRegionlessNanp:function(e){var t=this._getNumeric(e);if("1"!=t.charAt(0))return!1;var r=t.substr(1,3);return-1<l.inArray(r,y)},_highlightListItem:function(e){this.countryListItems.removeClass("highlight"),e.addClass("highlight")},_getCountryData:function(e,t,r){for(var i=t?w:this.countries,n=0;n<i.length;n++)if(i[n].iso2==e)return i[n];if(r)return null;throw new Error("No country data for '"+e+"'")},_setFlag:function(e){var t=this.selectedCountryData&&this.selectedCountryData.iso2?this.selectedCountryData:{};this.selectedCountryData=e?this._getCountryData(e,!1,!1):{},this.selectedCountryData.iso2&&(this.defaultCountry=this.selectedCountryData.iso2),this.selectedFlagInner.attr("class","iti-flag "+e);var r=e?this.selectedCountryData.name+": +"+this.selectedCountryData.dialCode:"Unknown";if(this.selectedFlagInner.parent().attr("title",r),this.options.separateDialCode){var i=this.selectedCountryData.dialCode?"+"+this.selectedCountryData.dialCode:"",n=this.telInput.parent();t.dialCode&&n.removeClass("iti-sdc-"+(t.dialCode.length+1)),i&&n.addClass("iti-sdc-"+i.length),this.selectedDialCode.text(i)}return this._updatePlaceholder(),this.countryListItems.removeClass("active"),e&&this.countryListItems.find(".iti-flag."+e).first().closest(".country").addClass("active"),t.iso2!==e},_updatePlaceholder:function(){var e="aggressive"===this.options.autoPlaceholder||!this.hadInitialPlaceholder&&(!0===this.options.autoPlaceholder||"polite"===this.options.autoPlaceholder);if(d.intlTelInputUtils&&e&&this.selectedCountryData){var t=intlTelInputUtils.numberType[this.options.placeholderNumberType],r=this.selectedCountryData.iso2?intlTelInputUtils.getExampleNumber(this.selectedCountryData.iso2,this.options.nationalMode,t):"";r=this._beforeSetNumber(r),"function"==typeof this.options.customPlaceholder&&(r=this.options.customPlaceholder(r,this.selectedCountryData)),this.telInput.attr("placeholder",r)}},_selectListItem:function(e){var t=this._setFlag(e.attr("data-country-code"));if(this._closeDropdown(),this._updateDialCode(e.attr("data-dial-code"),!0),this.telInput.focus(),this.isGoodBrowser){var r=this.telInput.val().length;this.telInput[0].setSelectionRange(r,r)}t&&this._triggerCountryChange()},_closeDropdown:function(){this.countryList.addClass("hide"),this.selectedFlagInner.children(".iti-arrow").removeClass("up"),l(e).off(this.ns),l("html").off(this.ns),this.countryList.off(this.ns),this.options.dropdownContainer&&(this.isMobile||l(d).off("scroll"+this.ns),this.dropdown.detach())},_scrollTo:function(e,t){var r=this.countryList,i=r.height(),n=r.offset().top,a=n+i,o=e.outerHeight(),d=e.offset().top,l=d+o,s=d-n+r.scrollTop(),u=i/2-o/2;if(d<n)t&&(s-=u),r.scrollTop(s);else if(a<l){t&&(s+=u);var m=i-o;r.scrollTop(s-m)}},_updateDialCode:function(e,t){var r,i=this.telInput.val();if(e="+"+e,"+"==i.charAt(0)){var n=this._getDialCode(i);r=n?i.replace(n,e):e}else{if(this.options.nationalMode||this.options.separateDialCode)return;if(i)r=e+i;else{if(!t&&this.options.autoHideDialCode)return;r=e}}this.telInput.val(r)},_getDialCode:function(e){var t="";if("+"==e.charAt(0))for(var r="",i=0;i<e.length;i++){var n=e.charAt(i);if(l.isNumeric(n)&&(r+=n,this.countryCodes[r]&&(t=e.substr(0,i+1)),4==r.length))break}return t},_getFullNumber:function(){var e=l.trim(this.telInput.val()),t=this.selectedCountryData.dialCode,r=this._getNumeric(e),i="1"==r.charAt(0)?r:"1"+r;return(this.options.separateDialCode?"+"+t:"+"!=e.charAt(0)&&"1"!=e.charAt(0)&&t&&"1"==t.charAt(0)&&4==t.length&&t!=i.substr(0,4)?t.substr(1):"")+e},_beforeSetNumber:function(e){if(this.options.separateDialCode){var t=this._getDialCode(e);if(t){null!==this.selectedCountryData.areaCodes&&(t="+"+this.selectedCountryData.dialCode);var r=" "===e[t.length]||"-"===e[t.length]?t.length+1:t.length;e=e.substr(r)}}return this._cap(e)},_triggerCountryChange:function(){this.telInput.trigger("countrychange",this.selectedCountryData)},handleAutoCountry:function(){"auto"===this.options.initialCountry&&(this.defaultCountry=l.fn[o].autoCountry,this.telInput.val()||this.setCountry(this.defaultCountry),this.autoCountryDeferred.resolve())},handleUtils:function(){d.intlTelInputUtils&&(this.telInput.val()&&this._updateValFromNumber(this.telInput.val()),this._updatePlaceholder()),this.utilsScriptDeferred.resolve()},destroy:function(){if(this.allowDropdown&&(this._closeDropdown(),this.selectedFlagInner.parent().off(this.ns),this.telInput.closest("label").off(this.ns)),this.options.autoHideDialCode){var e=this.telInput.prop("form");e&&l(e).off(this.ns)}this.telInput.off(this.ns),this.telInput.parent().before(this.telInput).remove()},getExtension:function(){return d.intlTelInputUtils?intlTelInputUtils.getExtension(this._getFullNumber(),this.selectedCountryData.iso2):""},getNumber:function(e){return d.intlTelInputUtils?intlTelInputUtils.formatNumber(this._getFullNumber(),this.selectedCountryData.iso2,e):""},getNumberType:function(){return d.intlTelInputUtils?intlTelInputUtils.getNumberType(this._getFullNumber(),this.selectedCountryData.iso2):-99},getSelectedCountryData:function(){return this.selectedCountryData||{}},getValidationError:function(){return d.intlTelInputUtils?intlTelInputUtils.getValidationError(this._getFullNumber(),this.selectedCountryData.iso2):-99},isValidNumber:function(){var e=l.trim(this._getFullNumber()),t=this.options.nationalMode?this.selectedCountryData.iso2:"";return d.intlTelInputUtils?intlTelInputUtils.isValidNumber(e,t):null},setCountry:function(e){e=e.toLowerCase(),this.selectedFlagInner.hasClass(e)||(this._setFlag(e),this._updateDialCode(this.selectedCountryData.dialCode,!1),this._triggerCountryChange())},setNumber:function(e){var t=this._updateFlagFromNumber(e);this._updateValFromNumber(e),t&&this._triggerCountryChange()}},l.fn[o]=function(r){var t,i=arguments;if(r===a||"object"==typeof r){var n=[];return this.each(function(){if(!l.data(this,"plugin_"+o)){var e=new h(this,r),t=e._init();n.push(t[0]),n.push(t[1]),l.data(this,"plugin_"+o,e)}}),l.when.apply(null,n)}if("string"==typeof r&&"_"!==r[0])return this.each(function(){var e=l.data(this,"plugin_"+o);e instanceof h&&"function"==typeof e[r]&&(t=e[r].apply(e,Array.prototype.slice.call(i,1))),"destroy"===r&&l.data(this,"plugin_"+o,null)}),t!==a?t:this},l.fn[o].getCountryData=function(){return w},l.fn[o].loadUtils=function(e,t){l.fn[o].loadedUtilsScript?t&&t.resolve():(l.fn[o].loadedUtilsScript=!0,l.ajax({type:"GET",url:e,complete:function(){l(".intl-tel-input input").intlTelInput("handleUtils")},dataType:"script",cache:!0}))},l.fn[o].version="11.0.0",l.fn[o].defaults=i;for(var w=[["Afghanistan","af","93"],["Albania","al","355"],["Algeria","dz","213"],["American Samoa","as","1684"],["Andorra","ad","376"],["Angola","ao","244"],["Anguilla","ai","1264"],["Antigua and Barbuda","ag","1268"],["Argentina","ar","54"],["Armenia","am","374"],["Aruba","aw","297"],["Australia","au","61",0],["Austria","at","43"],["Azerbaijan","az","994"],["Bahamas","bs","1242"],["Bahrain","bh","973"],["Bangladesh","bd","880"],["Barbados","bb","1246"],["Belarus","by","375"],["Belgium","be","32"],["Belize","bz","501"],["Benin","bj","229"],["Bermuda","bm","1441"],["Bhutan","bt","975"],["Bolivia","bo","591"],["Bosnia and Herzegovina","ba","387"],["Botswana","bw","267"],["Brazil","br","55"],["British Indian Ocean Territory","io","246"],["British Virgin Islands","vg","1284"],["Brunei","bn","673"],["Bulgaria","bg","359"],["Burkina Faso","bf","226"],["Burundi","bi","257"],["Cambodia","kh","855"],["Cameroon","cm","237"],["Canada","ca","1",1,["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde","cv","238"],["Caribbean Netherlands","bq","599",1],["Cayman Islands","ky","1345"],["Central African Republic","cf","236"],["Chad","td","235"],["Chile","cl","56"],["China","cn","86"],["Christmas Island","cx","61",2],["Cocos (Keeling) Islands","cc","61",1],["Colombia","co","57"],["Comoros","km","269"],["Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)","cd","243"],["Congo (Republic) (Congo-Brazzaville)","cg","242"],["Cook Islands","ck","682"],["Costa Rica","cr","506"],["Cote d'Ivoire","ci","225"],["Croatia","hr","385"],["Cuba","cu","53"],["Curacao","cw","599",0],["Cyprus","cy","357"],["Czech Republic","cz","420"],["Denmark","dk","45"],["Djibouti","dj","253"],["Dominica","dm","1767"],["Dominican Republic","do","1",2,["809","829","849"]],["Ecuador","ec","593"],["Egypt","eg","20"],["El Salvador","sv","503"],["Equatorial Guinea","gq","240"],["Eritrea","er","291"],["Estonia","ee","372"],["Ethiopia","et","251"],["Falkland Islands","fk","500"],["Faroe Islands","fo","298"],["Fiji","fj","679"],["Finland","fi","358",0],["France","fr","33"],["French Guiana","gf","594"],["French Polynesia","pf","689"],["Gabon","ga","241"],["Gambia","gm","220"],["Georgia","ge","995"],["Germany","de","49"],["Ghana","gh","233"],["Gibraltar","gi","350"],["Greece","gr","30"],["Greenland","gl","299"],["Grenada","gd","1473"],["Guadeloupe","gp","590",0],["Guam","gu","1671"],["Guatemala","gt","502"],["Guernsey","gg","44",1],["Guinea","gn","224"],["Guinea-Bissau","gw","245"],["Guyana","gy","592"],["Haiti","ht","509"],["Honduras","hn","504"],["Hong Kong","hk","852"],["Hungary","hu","36"],["Iceland","is","354"],["India","in","91"],["Indonesia","id","62"],["Iran","ir","98"],["Iraq","iq","964"],["Ireland","ie","353"],["Isle of Man","im","44",2],["Israel","il","972"],["Italy","it","39",0],["Jamaica","jm","1876"],["Japan","jp","81"],["Jersey","je","44",3],["Jordan","jo","962"],["Kazakhstan","kz","7",1],["Kenya","ke","254"],["Kiribati","ki","686"],["Kosovo","xk","383"],["Kuwait","kw","965"],["Kyrgyzstan","kg","996"],["Laos","la","856"],["Latvia","lv","371"],["Lebanon","lb","961"],["Lesotho","ls","266"],["Liberia","lr","231"],["Libya","ly","218"],["Liechtenstein","li","423"],["Lithuania","lt","370"],["Luxembourg","lu","352"],["Macau","mo","853"],["Macedonia","mk","389"],["Madagascar","mg","261"],["Malawi","mw","265"],["Malaysia","my","60"],["Maldives","mv","960"],["Mali","ml","223"],["Malta","mt","356"],["Marshall Islands","mh","692"],["Martinique","mq","596"],["Mauritania","mr","222"],["Mauritius","mu","230"],["Mayotte","yt","262",1],["Mexico","mx","52"],["Micronesia","fm","691"],["Moldova","md","373"],["Monaco","mc","377"],["Mongolia","mn","976"],["Montenegro","me","382"],["Montserrat","ms","1664"],["Morocco","ma","212",0],["Mozambique","mz","258"],["Myanmar (Burma)","mm","95"],["Namibia","na","264"],["Nauru","nr","674"],["Nepal","np","977"],["Netherlands (Nederland)","nl","31"],["New Caledonia","nc","687"],["New Zealand","nz","64"],["Nicaragua","ni","505"],["Niger","ne","227"],["Nigeria","ng","234"],["Niue","nu","683"],["Norfolk Island","nf","672"],["North Korea","kp","850"],["Northern Mariana Islands","mp","1670"],["Norway (Norge)","no","47",0],["Oman","om","968"],["Pakistan","pk","92"],["Palau","pw","680"],["Palestine","ps","970"],["Panama","pa","507"],["Papua New Guinea","pg","675"],["Paraguay","py","595"],["Peru","pe","51"],["Philippines","ph","63"],["Poland","pl","48"],["Portugal","pt","351"],["Puerto Rico","pr","1",3,["787","939"]],["Qatar","qa","974"],["Reunion","re","262",0],["Romania","ro","40"],["Russia","ru","7",0],["Rwanda","rw","250"],["Saint Barthelemy","bl","590",1],["Saint Helena","sh","290"],["Saint Kitts and Nevis","kn","1869"],["Saint Lucia","lc","1758"],["Saint Martin","mf","590",2],["Saint Pierre and Miquelon","pm","508"],["Saint Vincent and the Grenadines","vc","1784"],["Samoa","ws","685"],["San Marino","sm","378"],["Sao Tome and Principe","st","239"],["Saudi Arabia","sa","966"],["Senegal","sn","221"],["Serbia","rs","381"],["Seychelles","sc","248"],["Sierra Leone","sl","232"],["Singapore","sg","65"],["Sint Maarten","sx","1721"],["Slovakia","sk","421"],["Slovenia","si","386"],["Solomon Islands","sb","677"],["Somalia","so","252"],["South Africa","za","27"],["South Korea","kr","82"],["South Sudan","ss","211"],["Spain","es","34"],["Sri Lanka","lk","94"],["Sudan","sd","249"],["Suriname","sr","597"],["Svalbard and Jan Mayen","sj","47",1],["Swaziland","sz","268"],["Sweden (Sverige)","se","46"],["Switzerland","ch","41"],["Syria","sy","963"],["Taiwan","tw","886"],["Tajikistan","tj","992"],["Tanzania","tz","255"],["Thailand","th","66"],["Timor-Leste","tl","670"],["Togo","tg","228"],["Tokelau","tk","690"],["Tonga","to","676"],["Trinidad and Tobago","tt","1868"],["Tunisia","tn","216"],["Turkey","tr","90"],["Turkmenistan","tm","993"],["Turks and Caicos Islands","tc","1649"],["Tuvalu","tv","688"],["U.S. Virgin Islands","vi","1340"],["Uganda","ug","256"],["Ukraine","ua","380"],["United Arab Emirates","ae","971"],["United Kingdom","gb","44",0],["United States","us","1",0],["Uruguay","uy","598"],["Uzbekistan","uz","998"],["Vanuatu","vu","678"],["Vatican City","va","39",1],["Venezuela","ve","58"],["Vietnam","vn","84"],["Wallis and Futuna","wf","681"],["Western Sahara","eh","212",1],["Yemen","ye","967"],["Zambia","zm","260"],["Zimbabwe","zw","263"],["Aland Islands","ax","358",1]],v=0;v<w.length;v++){var g=w[v];w[v]={name:g[0],iso2:g[1],dialCode:g[2],priority:g[3]||0,areaCodes:g[4]||null}}});var gmapdata=new Array,gmapmarker=new Array;function if_gmap_init(e,t){if(document.getElementById(e+"_element"+t)){map=document.getElementById(e+"_element"+t);var r=parseInt(map.getAttribute("zoom")),i=map.getAttribute("center_x"),n=map.getAttribute("center_y"),a=new google.maps.LatLng(n,i);return gmapdata[e]=new google.maps.Map(document.getElementById(e+"_element"+t),{center:a,zoom:r,mapTypeId:"roadmap"}),gmapmarker[e]=new Array,!1}draggab=!1,map=document.getElementById(e);r=parseInt(map.getAttribute("zoom")),i=map.getAttribute("long"),n=map.getAttribute("lat"),a=new google.maps.LatLng(n,i);return gmapdata=new google.maps.Map(document.getElementById(e),{center:a,zoom:r,mapTypeId:"roadmap"}),geocoder=new google.maps.Geocoder,(gmapmarker=new google.maps.Marker({map:gmapdata,position:a,draggable:draggab})).setDraggable(draggab),infoW=new google.maps.InfoWindow,google.maps.event.addListener(gmapdata,"mouseover",function(e){document.getElementById("longval")||(gmapmarker.draggable=!1)}),google.maps.event.addListener(gmapdata,"click",function(e){document.getElementById("longval")&&(document.getElementById("longval").value=e.latLng.lng().toFixed(6),document.getElementById("latval").value=e.latLng.lat().toFixed(6),gmapmarker.setPosition(e.latLng),if_gmap_updateMap(),geocoder.geocode({latLng:gmapmarker.getPosition()},function(e,t){t==google.maps.GeocoderStatus.OK&&e[0]&&document.getElementById("addrval")&&(document.getElementById("addrval").value=e[0].formatted_address)}))}),google.maps.event.addListener(gmapmarker,"drag",function(){document.getElementById("longval")&&(geocoder.geocode({latLng:gmapmarker.getPosition()},function(e,t){t==google.maps.GeocoderStatus.OK&&e[0]&&document.getElementById("addrval")&&(document.getElementById("addrval").value=e[0].formatted_address)}),if_gmap_updateMap(),document.getElementById("latval").value=gmapmarker.getPosition().lat().toFixed(6),document.getElementById("longval").value=gmapmarker.getPosition().lng().toFixed(6))}),google.maps.event.addListener(gmapmarker,"click",function(){infoW.setContent('<div style="overflow: hidden;">'+document.getElementById(e).getAttribute("info")+"</div>");infoW.setOptions({maxWidth:"300"}),infoW.open(this.getMap(),this)}),document.getElementById("longval")&&(document.getElementById("longval").value=i,document.getElementById("latval").value=n,geocoder.geocode({latLng:gmapmarker.getPosition()},function(e,t){t==google.maps.GeocoderStatus.OK&&e[0]&&document.getElementById("addrval")&&(document.getElementById("addrval").value=e[0].formatted_address)})),!1}function add_marker_on_map(e,t,r,i,n,a,o){var d=new google.maps.LatLng(i,r);return gmapmarker[e][t]=new google.maps.Marker({map:gmapdata[e],position:d,draggable:o}),gmapmarker[e][t].setDraggable(o),o&&google.maps.event.addListener(gmapmarker[e][t],"drag",function(){document.getElementById(e+"_lat"+a).value=gmapmarker[e][t].getPosition().lat().toFixed(6),document.getElementById(e+"_long"+a).value=gmapmarker[e][t].getPosition().lng().toFixed(6)}),infoW=new google.maps.InfoWindow,google.maps.event.addListener(gmapmarker[e][t],"click",function(){infoW.setContent('<div style="overflow: hidden;">'+document.getElementById(e+"_element"+a).getAttribute("info"+t)+"</div>");infoW.setOptions({maxWidth:"300"}),infoW.open(this.getMap(),this)}),!1}
|
1 |
+
var c,a=new Array,rated=!1;function set_total_value(form_id){var FormCurrency=window["FormCurrency_"+form_id]+" ";if(0!=jQuery(".paypal_total"+form_id).length){var div_paypal_show=jQuery(".paypal_total"+form_id),div_paypal_products=jQuery(".paypal_products"+form_id),div_paypal_tax=jQuery(".paypal_tax"+form_id),input_paypal_total=jQuery(".input_paypal_total"+form_id),total=0,total_shipping=0;div_paypal_products.html(""),div_paypal_tax.html(""),n=parseInt(jQuery("#counter"+form_id).val()),jQuery("#form"+form_id+" div[type='type_paypal_checkbox'], #form"+form_id+" div[type='type_paypal_radio']").each(function(){var e=jQuery(this).parent();if("none"!=e.css("display")){var t=e.attr("wdid");paypal_checkbox_qty=jQuery("#wdform_"+t+"_element_quantity"+form_id).val()?jQuery("#wdform_"+t+"_element_quantity"+form_id).val():0,jQuery(this).find("input:checked").each(function(){label=jQuery("label[for='"+jQuery(this).attr("id")+"']").html(),span_value=FormCurrency+jQuery(this).val()+(0!=jQuery("#wdform_"+t+"_element_quantity"+form_id).length?" x "+paypal_checkbox_qty:""),total+=jQuery(this).val()*parseInt(0!=jQuery("#wdform_"+t+"_element_quantity"+form_id).length?paypal_checkbox_qty:1),div_paypal_products.html(div_paypal_products.html()+"<div>"+label+" - "+span_value+"</div>")})}}),jQuery("#form"+form_id+" div[type='type_paypal_shipping']").each(function(){var e=jQuery(this).parent();if("none"!=e.css("display")){var t=e.attr("wdid");paypal_shipping_qty=jQuery("#wdform_"+t+"_element_quantity"+form_id).val()?jQuery("#wdform_"+t+"_element_quantity"+form_id).val():0,jQuery(this).find("input:checked").each(function(){label=jQuery("label[for='"+jQuery(this).attr("id")+"']").html(),span_value=FormCurrency+jQuery(this).val()+(0!=jQuery("#wdform_"+t+"_element_quantity"+form_id).length?" x "+paypal_shipping_qty:""),total_shipping+=jQuery(this).val()*parseInt(0!=jQuery("#wdform_"+t+"_element_quantity"+form_id).length?paypal_shipping_qty:1),div_paypal_products.html(div_paypal_products.html()+"<div>"+label+" - "+span_value+"</div>")})}}),jQuery("#form"+form_id+" div[type='type_paypal_select']").each(function(){var e=jQuery(this).parent();if("none"!=e.css("display")){var t=e.attr("wdid");paypal_select_qty=jQuery("#wdform_"+t+"_element_quantity"+form_id).val()?jQuery("#wdform_"+t+"_element_quantity"+form_id).val():0,""!=jQuery(this).find("select").val()&&(label=jQuery(this).find("select option:selected").html(),span_value=FormCurrency+jQuery(this).find("select").val()+(0!=jQuery("#wdform_"+t+"_element_quantity"+form_id).length?" x "+paypal_select_qty:""),total+=jQuery(this).find("select").val()*parseInt(0!=jQuery("#wdform_"+t+"_element_quantity"+form_id).length?paypal_select_qty:1),div_paypal_products.html(div_paypal_products.html()+"<div>"+label+" - "+span_value+"</div>"))}}),jQuery("#form"+form_id+" div[type='type_paypal_price']").each(function(){var e=jQuery(this).parent();if("none"!=e.css("display")){var t=e.attr("wdid");label=jQuery(this).find(".wdform-label").html(),cents="00",dollars="0",""!=jQuery("#wdform_"+t+"_element_dollars"+form_id).val()&&(dollars=jQuery("#wdform_"+t+"_element_dollars"+form_id).val()),""!=jQuery("#wdform_"+t+"_element_cents"+form_id).val()&&(1==jQuery("#wdform_"+t+"_element_cents"+form_id).val().length?cents="0"+jQuery("#wdform_"+t+"_element_cents"+form_id).val():cents=jQuery("#wdform_"+t+"_element_cents"+form_id).val(),span_value=FormCurrency+dollars+"."+cents,total+=parseFloat(dollars+"."+cents),div_paypal_products.html(div_paypal_products.html()+"<div>"+label+" - "+span_value+"</div>"))}}),jQuery("#form"+form_id+" div[type='type_paypal_price_new']").each(function(){var e=jQuery(this).parent();if("none"!=e.css("display")){var t=e.attr("wdid");label=jQuery(this).find(".wdform-label").html(),dollars="0",""!=jQuery("#wdform_"+t+"_element"+form_id).val()&&(dollars=jQuery("#wdform_"+t+"_element"+form_id).val()),span_value=FormCurrency+dollars,total+=parseFloat(dollars),div_paypal_products.html(div_paypal_products.html()+"<div>"+label+" - "+span_value+"</div>")}});var FormPaypalTax=eval("FormPaypalTax_"+form_id);0!=FormPaypalTax&&div_paypal_tax.html("Tax: "+FormCurrency+(total*FormPaypalTax/100).toFixed(2)),jQuery(".div_total"+form_id).html(FormCurrency+(parseFloat((total*(1+FormPaypalTax/100)).toFixed(2))+total_shipping).toFixed(2)),input_paypal_total.val(FormCurrency+(parseFloat((total*(1+FormPaypalTax/100)).toFixed(2))+total_shipping).toFixed(2))}}function check_isnum_or_minus(e){var t=e.which||e.keyCode;return!(45!=t&&31<t&&(t<48||57<t))}function sum_grading_values(e,t){for(var r=0,i=0;i<100;i++)document.getElementById(e+"_element"+t+"_"+i)&&document.getElementById(e+"_element"+t+"_"+i).value&&(r+=parseInt(document.getElementById(e+"_element"+t+"_"+i).value)),document.getElementById(e+"_total_element"+t)&&(r>document.getElementById(e+"_total_element"+t).innerHTML?document.getElementById(e+"_text_element"+t).innerHTML=" "+fm_objectL10n.fm_grading_text+" "+document.getElementById(e+"_total_element"+t).innerHTML:document.getElementById(e+"_text_element"+t).innerHTML="");document.getElementById(e+"_sum_element"+t)&&(document.getElementById(e+"_sum_element"+t).innerHTML=r)}function change_src(e,t,r,i){if(0==rated)for(var n=0;n<=e;n++)document.getElementById(t+"_star_"+n+"_"+r).src=fm_objectL10n.plugin_url+"/images/star_"+i+".png"}function reset_src(e,t,r){if(0==rated)for(var i=0;i<=e;i++)document.getElementById(t+"_star_"+i+"_"+r).src=fm_objectL10n.plugin_url+"/images/star.png"}function select_star_rating(e,t,r,i,n){rated=!0;for(var a=0;a<=e;a++)document.getElementById(t+"_star_"+a+"_"+r).src=fm_objectL10n.plugin_url+"/images/star_"+i+".png";for(var o=e+1;o<=n-1;o++)document.getElementById(t+"_star_"+o+"_"+r).src=fm_objectL10n.plugin_url+"/images/star.png";document.getElementById(t+"_selected_star_amount"+r).value=e+1,jQuery("#"+t+"_selected_star_amount"+r).trigger("change")}function show_other_input(e,t){var r=jQuery(".form"+t+" [id^="+e+"_element"+t+'][other="1"]').parent(),i=document.createElement("br");i.setAttribute("id",e+"_other_br"+t);var n=e.split("_")[1],a=document.createElement("input");a.setAttribute("id",e+"_other_input"+t),a.setAttribute("name",e+"_other_input"+t),a.setAttribute("type","text"),a.setAttribute("class","other_input"),a.setAttribute("onchange","other_input_change(this, '"+t+"', '"+n+"')"),r.append(i),r.append(a)}function other_input_change(e,t,r){""==jQuery(e).val()?wd_is_filled(t,r):(jQuery("#form"+t+" #wd_required_"+r).remove(),jQuery("#form"+t+" div[wdid='"+r+"'] .wdform-label-section:first .error_label").removeClass("error_label"))}function check_isnum(e){var t=e.which||e.keyCode;return-1!=jQuery.inArray(t,[46,8,9,27,13,190])||!0===e.ctrlKey||35<=t&&t<39||45==t||!(31<t&&(t<48||57<t))}function captcha_refresh(e,t){srcArr=document.getElementById(e+t).src.split("&r="),document.getElementById(e+t).src=srcArr[0]+"&r="+Math.floor(100*Math.random()),document.getElementById(e+"_input"+t).value="",document.getElementById(e+t).style.display="inline-block"}function set_checked(e,t,r){return checking=document.getElementById(e+"_element"+r+t),!(checking.getAttribute("other")&&1==checking.getAttribute("other")&&!checking.checked)||(document.getElementById(e+"_other_input"+r)&&(document.getElementById(e+"_other_input"+r).parentNode.removeChild(document.getElementById(e+"_other_br"+r)),document.getElementById(e+"_other_input"+r).parentNode.removeChild(document.getElementById(e+"_other_input"+r))),!1)}function set_default(e,t,r){document.getElementById(e+"_other_input"+r)&&(document.getElementById(e+"_other_input"+r).parentNode.removeChild(document.getElementById(e+"_other_br"+r)),document.getElementById(e+"_other_input"+r).parentNode.removeChild(document.getElementById(e+"_other_input"+r)))}function add_0(e){1==jQuery(e).val().length&&jQuery(e).val("0"+jQuery(e).val())}function wd_validate(e,t){if(!jQuery(e).is("input"))return!0;var r,i,n=jQuery(e).val(),a=(jQuery(e).attr("id"),jQuery(e).data("valid-type")),o=jQuery(e).data("form-id"),d=jQuery(e).data("wdid");if(void 0===t)t=jQuery(e).data("addiotional-fields");var l="#form"+o+" div[wdid='"+d+"']",s=jQuery(l+" .wdform-label-section:first .wdform-label"),u=jQuery(l+" .wdform-element-section");switch(a){case"hour24":r=fm_objectL10n.time_validation,i=/^(0?[0-1]?[0-9]|2[0-3])?$/;break;case"hour12":r=fm_objectL10n.time_validation,i=/^(0?[0-9]|1[0-2])?$/;break;case"minute":case"second":r=fm_objectL10n.time_validation,i=/^([0-5]?[0-9])?$/;break;case"number":r=fm_objectL10n.number_validation,i=/^\-{0,1}\d+(.\d+){0,1}$/;break;case"quantity":r=fm_objectL10n.number_validation,i=/^[+]?\d+([.]\d+)?$/;break;case"day":r=fm_objectL10n.date_validation,i=/^(0?[0-2]?[0-9]|3[0-1])?$/;break;case"month":r=fm_objectL10n.date_validation,i=/^(0?[0-9]|1[0-2])?$/;break;case"year":r=fm_objectL10n.date_validation,i=/^([1-2]?[0-9]?[0-9]?[0-9])?$/}if(isValid=i.test(n),""==n&&(isValid=!0),isValid)for(var m in t)if(isValid=wd_validate("#"+t[m],""),!isValid)break;return jQuery("#check_email_"+d+"_"+o).remove(),isValid?(s.removeClass("wd-error-label"),delete window["check_before_submit"+o][d+"_"+o]):(u.parent().parent().append("<div id='check_email_"+d+"_"+o+"' class='fm-not-filled'>"+r+"</div>"),s.addClass("wd-error-label"),window["check_before_submit"+o][d+"_"+o]=!1),isValid}function check_isnum_interval(e,t,r,i){var n=e.which||e.keyCode;return-1!=jQuery.inArray(n,[46,8,9,27,13,190])||!0===e.ctrlKey||35<=n&&n<39||!(31<n&&(n<48||57<n))&&(val1=""+jQuery(t).val()+String.fromCharCode(n),!(2<val1.length)&&("00"!=val1&&!(val1<r||val1>i)))}function wd_year_validation(e){var t=parseInt(jQuery(e).val()),r=jQuery(e).data("form-id"),i=jQuery(e).data("wdid"),n=parseInt(jQuery(e).attr("from")),a=parseInt(jQuery(e).attr("to")),o="#form"+r+" div[wdid='"+i+"']",d=jQuery(o+" .wdform-label-section:first .wdform-label"),l=jQuery(o+" .wdform-element-section");if(t<n||a<t){var s=fm_objectL10n.year_validation.replace("%%start%%",n).replace("%%end%%",a);jQuery("#check_email_"+i+"_"+r).remove(),l.parent().parent().append("<div id='check_email_"+i+"_"+r+"' class='fm-not-filled'>"+s+"</div>"),d.addClass("wd-error-label"),window["check_before_submit"+r][i+"_"+r]=!1}}function destroyChildren(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function generate_page_nav(e,t,r){var i;if(form_view=e,page_nav=document.getElementById(t+"page_nav"+e),destroyChildren(page_nav),form_view_elemet=document.getElementById(t+"form_view"+e),remove_whitespace(form_view_elemet.parentNode.parentNode),display_none_form_views_all(t),form_view_elemet.parentNode.style.display="",(i=document.createElement("div")).setAttribute("valign","middle"),i.setAttribute("align","left"),i.style.display="table-cell",i.style.width="40%",page_nav.appendChild(i),form_view_elemet.parentNode.previousSibling&&-1!=form_view_elemet.parentNode.previousSibling.className.indexOf("wdform-page-and-images")&&form_view_elemet.parentNode.previousSibling.previousSibling&&("DIV"==form_view_elemet.parentNode.previousSibling.tagName?table=form_view_elemet.parentNode.previousSibling:"DIV"==form_view_elemet.parentNode.previousSibling.previousSibling.tagName?table=form_view_elemet.parentNode.previousSibling.previousSibling:table="none","none"!=table&&(table.firstChild.tagName||table.removeChild(table.firstChild),previous_title=form_view_elemet.getAttribute("previous_title"),previous_type=form_view_elemet.getAttribute("previous_type"),"text"==previous_type&&i.setAttribute("class","previous-page"),previous_class=form_view_elemet.getAttribute("previous_class"),previous_checkable=form_view_elemet.getAttribute("previous_checkable"),next_or_previous="previous",previous=make_pagebreak_button(next_or_previous,previous_title,previous_type,previous_class,previous_checkable,e,t,r),i.appendChild(previous))),(i=document.createElement("div")).setAttribute("id",t+"page_numbers"+form_view),i.setAttribute("valign","middle"),i.setAttribute("class","page-numbers"),i.setAttribute("align","center"),i.style.display="table-cell","true"==document.getElementById("fm-pages"+t).getAttribute("show_numbers")){var n=document.createElement("span");n.setAttribute("class","page_numbers"),i.appendChild(n)}page_nav.appendChild(i),(i=document.createElement("div")).setAttribute("valign","middle"),i.setAttribute("align","right"),i.style.cssText="display:table-cell; width:40%; text-align:right;",page_nav.appendChild(i),not_next=!1,form_view_elemet.parentNode.nextSibling?("DIV"==form_view_elemet.parentNode.nextSibling.tagName&&-1!=form_view_elemet.parentNode.nextSibling.className.indexOf("wdform-page-and-images")?table=form_view_elemet.parentNode.nextSibling:form_view_elemet.parentNode.nextSibling.nextSibling&&"DIV"==form_view_elemet.parentNode.nextSibling.nextSibling.tagName?table=form_view_elemet.parentNode.nextSibling.nextSibling:table="none","none"!=table?(next_title=form_view_elemet.getAttribute("next_title"),next_type=form_view_elemet.getAttribute("next_type"),"text"==next_type&&i.setAttribute("class","next-page"),next_class=form_view_elemet.getAttribute("next_class"),next_checkable=form_view_elemet.getAttribute("next_checkable"),next_or_previous="next",next=make_pagebreak_button(next_or_previous,next_title,next_type,next_class,next_checkable,e,t,r),i.appendChild(next)):not_next=!0):not_next=!0,generate_page_bar(e,t,r),fm_initilize_form(t)}function fm_initilize_form(e){jQuery("#form"+e+" div[type='type_map']").each(function(){for(id=jQuery(this).parent().attr("wdid"),if_gmap_init("wdform_"+id,e),q=0;q<20;q++)jQuery("#wdform_"+id+"_element"+e)[0].getAttribute("long"+q)&&(w_long=parseFloat(document.getElementById("wdform_"+id+"_element"+e).getAttribute("long"+q)),w_lat=parseFloat(document.getElementById("wdform_"+id+"_element"+e).getAttribute("lat"+q)),w_info=parseFloat(document.getElementById("wdform_"+id+"_element"+e).getAttribute("info"+q)),add_marker_on_map("wdform_"+id,q,w_long,w_lat,w_info,e,!1))}),jQuery("#form"+e+" div[type='type_mark_map']").each(function(){id=jQuery(this).parent().attr("wdid"),if_gmap_init("wdform_"+id,e),q=0,jQuery("#wdform_"+id+"_element"+e)[0].getAttribute("long"+q)&&(w_long=parseFloat(document.getElementById("wdform_"+id+"_element"+e).getAttribute("long"+q)),w_lat=parseFloat(document.getElementById("wdform_"+id+"_element"+e).getAttribute("lat"+q)),w_info=parseFloat(document.getElementById("wdform_"+id+"_element"+e).getAttribute("info"+q)),add_marker_on_map("wdform_"+id,q,w_long,w_lat,w_info,e,!0))}),jQuery(".wdform-element-section").each(function(){if("type_stripe"==jQuery(this).parent().parent().attr("type"))return!0;jQuery(this).parent()[0].style.width||0==parseInt(jQuery(this).width())||0==jQuery(this).parent().find(jQuery(".wdform-label-section")).length||"table-cell"==jQuery(this).css("display")&&("type_captcha"!=jQuery(this).parent().attr("type")?jQuery(this).parent().css("width",parseInt(jQuery(this).width())+parseInt(jQuery(this).parent().find(jQuery(".wdform-label-section"))[0].style.width)+15):jQuery(this).parent().css("width",2*parseInt(jQuery(this).parent().find(jQuery(".captcha_input"))[0].style.width)+50+parseInt(jQuery(this).parent().find(jQuery(".wdform-label-section"))[0].style.width)+15))})}function display_none_form_views_all(e){jQuery("#form"+e+" .wdform-page-and-images").css("display","none")}function generate_page_bar(t,r,e){if("steps"==document.getElementById("fm-pages"+r).getAttribute("type")?make_page_steps_front(t,r,e):"percentage"==document.getElementById("fm-pages"+r).getAttribute("type")?make_page_percentage_front(t,r,e):make_page_none_front(r),"true"==document.getElementById("fm-pages"+r).getAttribute("show_numbers")){if(td=document.getElementById(r+"page_numbers"+t),td){destroyChildren(td),k=0,cur_page_number=0,jQuery(".wdform-page-and-images").each(function(){var e=jQuery(this).find(".wdform_page").attr("id");j=e.split("form_view")[1],document.getElementById(r+"form_view"+j)&&(k++,j==t&&(cur_page_number=k))});var i=document.createElement("span");i.setAttribute("class","page_numbers"),i.innerHTML=cur_page_number+"/"+k,td.appendChild(i)}}else td=document.getElementById(r+"page_numbers"+t),td&&destroyChildren(document.getElementById(r+"page_numbers"+t))}function make_page_steps_front(t,r,i){destroyChildren(document.getElementById("fm-pages"+r)),show_title="true"==document.getElementById("fm-pages"+r).getAttribute("show_title"),next_checkable="true"==document.getElementById(r+"form_view"+t).getAttribute("next_checkable"),previous_checkable="true"==document.getElementById(r+"form_view"+t).getAttribute("previous_checkable"),k=0,jQuery("#form"+r+" .wdform-page-and-images").each(function(){var e=jQuery(this).find(".wdform_page").attr("id");j=e.split("form_view")[1],document.getElementById(r+"form_view"+j)&&(document.getElementById(r+"form_view"+j).getAttribute("page_title")?w_pages=document.getElementById(r+"form_view"+j).getAttribute("page_title"):w_pages="",k++,page_number=document.createElement("span"),page_number.setAttribute("id","page_"+j),j<t&&(previous_checkable?page_number.setAttribute("onClick","if(fm_check("+t+", "+r+', false)) generate_page_nav("'+j+'", "'+r+'", "'+i+'")'):page_number.setAttribute("onClick",'generate_page_nav("'+j+'", "'+r+'", "'+i+'")')),j>t&&(next_checkable?page_number.setAttribute("onClick","if(fm_check("+t+", "+r+', false)) generate_page_nav("'+j+'", "'+r+'", "'+i+'")'):page_number.setAttribute("onClick",'generate_page_nav("'+j+'", "'+r+'", "'+i+'")')),j==t?page_number.setAttribute("class","page_active"):page_number.setAttribute("class","page_deactive"),show_title?page_number.innerHTML=w_pages:page_number.innerHTML=k,document.getElementById("fm-pages"+r).appendChild(page_number))})}function make_page_percentage_front(t,r,e){destroyChildren(document.getElementById("fm-pages"+r)),show_title="true"==document.getElementById("fm-pages"+r).getAttribute("show_title");var i=document.createElement("div");i.setAttribute("class","page_percentage_deactive");var n=document.createElement("div");n.setAttribute("id","div_percentage"),n.setAttribute("class","page_percentage_active"),n.setAttribute("align","right");var a=document.createElement("div");a.setAttribute("class","wdform_percentage_arrow");var o=document.createElement("b");o.setAttribute("class","wdform_percentage_text"),n.appendChild(o),k=0,cur_page_title="",jQuery(".wdform-page-and-images").each(function(){var e=jQuery(this).find(".wdform_page").attr("id");j=e.split("form_view")[1],document.getElementById(r+"form_view"+j)&&(document.getElementById(r+"form_view"+j).getAttribute("page_title")?w_pages=document.getElementById(r+"form_view"+j).getAttribute("page_title"):w_pages="",k++,j==t&&(show_title&&(cur_page_title=document.createElement("div"),cur_page_title.innerHTML=w_pages,cur_page_title.innerHTML=w_pages,cur_page_title.setAttribute("class","wdform_percentage_title")),page_number=k))}),o.innerHTML=Math.round((page_number-1)/k*100)+"%",n.style.width=(page_number-1)/k*100+"%",1==page_number&&(a.style.display="none"),i.appendChild(n),i.appendChild(a),cur_page_title&&i.appendChild(cur_page_title),document.getElementById("fm-pages"+r).appendChild(i)}function make_page_none_front(e){destroyChildren(document.getElementById("fm-pages"+e))}function make_pagebreak_button(e,t,r,i,n,a,o,d){switch(r){case"text":return(l=document.createElement("div")).setAttribute("id","page_"+e+"_"+a),l.setAttribute("class",i),"true"==n?l.setAttribute("onClick","if(fm_check("+a+", "+o+", false)) page_"+e+"("+a+","+o+","+d+")"):l.setAttribute("onClick","page_"+e+"("+a+","+o+","+d+")"),l.innerHTML=t,l;case"img":var l;return(l=document.createElement("img")).setAttribute("id","page_"+e+"_"+a),l.setAttribute("class",i),"true"==n?l.setAttribute("onClick","if(fm_check("+a+", "+o+", false)) page_"+e+"("+a+","+o+","+d+")"):l.setAttribute("onClick","page_"+e+"("+a+","+o+","+d+")"),0==t.indexOf("http")?l.src=t:l.src=fm_objectL10n.plugin_url+"/"+t,l}}function form_maker_findPos(e){var t=0;if(e.offsetParent){for(;t+=e.offsetTop,e=e.offsetParent;);return[t]}}function page_previous(e,t,r){form_view_elemet=document.getElementById(t+"form_view"+e),form_view_elemet.parentNode.previousSibling&&form_view_elemet.parentNode.previousSibling.previousSibling&&("DIV"==form_view_elemet.parentNode.previousSibling.tagName?table=form_view_elemet.parentNode.previousSibling:table=form_view_elemet.parentNode.previousSibling.previousSibling),table.firstChild.tagName||table.removeChild(table.firstChild),generate_page_nav(table.firstChild.id.replace(t+"form_view",""),t,r),form=jQuery("#form"+t),form.parent().hasClass("fm-scrollbox-form")||(jQuery("html").animate({scrollTop:form.offset().top-150},500),document.scrollingElement.scrollTop=form.offset().top-150)}function page_next(e,t,r){form_view_elemet=document.getElementById(t+"form_view"+e),form_view_elemet.parentNode.nextSibling&&("DIV"==form_view_elemet.parentNode.nextSibling.tagName?table=form_view_elemet.parentNode.nextSibling:table=form_view_elemet.parentNode.nextSibling.nextSibling),table.firstChild.tagName||table.removeChild(table.firstChild),generate_page_nav(table.firstChild.id.replace(t+"form_view",""),t,r),form=jQuery("#form"+t),form.parent().hasClass("fm-scrollbox-form")||(jQuery("html").animate({scrollTop:form.offset().top-150},500),document.scrollingElement.scrollTop=form.offset().top-150)}function fm_go_to_page(e,t,r){form_view_elemet=document.getElementById(t+"form_view"+e),table=form_view_elemet.parentNode,table.firstChild.tagName||table.removeChild(table.firstChild),generate_page_nav(table.firstChild.id.replace(t+"form_view",""),t,r),form=jQuery("#form"+t),form.parent().hasClass("fm-scrollbox-form")||(jQuery("html").animate({scrollTop:form.offset().top-150},500),document.scrollingElement.scrollTop=form.offset().top-150)}function getfileextension(e,t){if(void 0===e||0==e.length)return!0;var r=e.lastIndexOf("."),i=e.substr(r+1,e.length);t=t.split(",");for(var n=0;n<t.length;n++)if(t[n]=t[n].replace(/\./g,""),t[n]=t[n].replace(/ /g,""),i.toLowerCase()==t[n].toLowerCase())return!0;return!1}function reselect(e,t){t=void 0!==t?t:"",jQuery(e).wrap('<div class="sel-wrap '+t+'"/>');var r="",i=!1;jQuery(e).children("option").each(function(){jQuery(this).is(":selected")&&(i=jQuery(this).index()),r=r+'<div class="sel-option" value="'+jQuery(this).val()+'">'+jQuery(this).html()+"</div>"}),w=jQuery(e)[0].style.width,"100%"==w?w="100%":w=jQuery(e).width()+32+"px";var n='<div class="sel-imul" style="width:'+w+'"> <div class="sel-selected"> <div class="selected-text">'+jQuery(e).children("option").eq(i).html()+'</div> <div class="sel-arraw"></div> </div> <div class="sel-options">'+r+"</div> </div>";jQuery(e).addClass("no-width"),jQuery(e).before(n)}jQuery(document).ready(function(){if(jQuery(".wd-datepicker").each(function(){jQuery(this).datepicker(),jQuery(this).datepicker("option","dateFormat",jQuery(this).data("format"))}),0!==jQuery(".fm-form").find(".fm-message").length&&(jQuery(window).scrollTop(jQuery(".fm-message").offset().top-100),document.scrollingElement.scrollTop=jQuery(".fm-message").offset().top-100),0!==jQuery(".fm-form").find(".message_captcha").length){var e=jQuery(".fm-form").attr("name").split("form")[1];if(0!==jQuery("#form"+e+" .message_captcha").length){var t=jQuery(jQuery("#form"+e+" .message_captcha")).offset().top;jQuery(".fm-form").find(".message_captcha").parents(".wdform-field").find(".wdform-label").addClass("error_label"),jQuery("html").animate({scrollTop:t-150},500),document.scrollingElement.scrollTop=t-150}}}),jQuery(document).on("change",".wdform-element-section select",function(){var e=jQuery(this).children("option:selected").text();jQuery(this).parent(".sel-wrap ").children(".sel-imul").children(".sel-selected").children(".selected-text").html(e),jQuery(this).parent(".sel-wrap ").children(".sel-imul").children(".sel-options").children(".sel-option").removeClass("sel-ed"),jQuery(this).addClass("sel-ed"),jQuery(this).parent(".sel-wrap ").children(".sel-imul").children(".sel-options").each(function(){jQuery(this).html()==e&&jQuery(this).addClass("sel-ed")})}),jQuery(document).on("click",".sel-imul",function(){jQuery(".sel-imul").removeClass("act"),jQuery(this).addClass("act"),jQuery(this).children(".sel-options").is(":visible")?jQuery(".sel-options").hide():(jQuery(".sel-options").hide(),jQuery(this).children(".sel-options").show(),jQuery(this).children(".sel-options").css("width",jQuery(this).width()))}),jQuery(document).on("click",".sel-option",function(){var e=jQuery(this).html();jQuery(this).parent(".sel-options").parent(".sel-imul").children(".sel-selected").children(".selected-text").html(e),jQuery(this).parent(".sel-options").children(".sel-option").removeClass("sel-ed"),jQuery(this).addClass("sel-ed");var t=jQuery(this).attr("value");t=void 0!==t?t:e,jQuery(this).parent(".sel-options").parent(".sel-imul").parent(".sel-wrap").children("select").children("option").removeAttr("selected").each(function(){jQuery(this).html()==e&&jQuery(this).attr("selected","select")}),jQuery(this).parent(".sel-options").parent(".sel-imul").parent(".sel-wrap").children("select").change()});var selenter=!1;function remove_whitespace(e){var t;for(t=0;t<e.childNodes.length;t++)e.childNodes[t]&&"3"==e.childNodes[t].nodeType&&!/\S/.test(e.childNodes[t].nodeValue)?(e.removeChild(e.childNodes[t]),t--):e.childNodes[t].childNodes.length&&remove_whitespace(e.childNodes[t])}function change_value_range(e,t,r,i,n){r?jQuery("#"+e).datepicker("option",t,r):"today"==i?jQuery("#"+e).datepicker("option",t,new Date):(-1==i.indexOf("d")&&-1==i.indexOf("m")&&-1==i.indexOf("y")&&-1==i.indexOf("w")&&""!=i&&(i=jQuery.datepicker.formatDate(n,new Date(i))),jQuery("#"+e).datepicker("option",t,i))}function wd_check_confirmation_email(e,t,r,i){var n=jQuery("#wdform_"+e+"_element"+t),a=jQuery("#wdform_"+e+"_1_element"+t);0==window["check_before_submit"+t][e+"_"+t]||jQuery(n).val()!=jQuery(a).val()?(jQuery("#confirm_"+e+"_"+t).remove(),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:eq( 1 ) .error_label_confirm").removeClass("error_label_confirm"),jQuery(n).val()!=jQuery(a).val()&&(jQuery(a).parent().parent().parent().append("<div id='confirm_"+e+"_"+t+"' class='fm-not-filled'>"+r+"</div>"),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:eq( 1 ) .wdform-label").addClass("error_label_confirm")),window["check_before_submit"+t][e+"_"+t]=!(e+"_"+t in window["check_before_submit"+t])||window["check_before_submit"+t][e+"_"+t]):(jQuery("#confirm_"+e+"_"+t).remove(),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:eq( 1 ) .error_label_confirm").removeClass("error_label_confirm"),1==window["check_before_submit"+t][e+"_"+t]&&delete window["check_before_submit"+t][e+"_"+t])}function wd_check_email(e,t,r){var i=jQuery("#wdform_"+e+"_element"+t),n=jQuery("#wdform_"+e+"_1_element"+t);""==jQuery(i).val()||/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,61}$/.test(jQuery.trim(jQuery(i).val()))||jQuery(i).attr("title")==jQuery(i).val()?(jQuery("#check_email_"+e+"_"+t).remove(),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:first .error_label_check_mail").removeClass("error_label_check_mail"),window["check_before_submit"+t][e+"_"+t]=!0,void 0===n.val()&&delete window["check_before_submit"+t][e+"_"+t]):(jQuery("#check_email_"+e+"_"+t).remove(),jQuery(i).parent().parent().parent().append("<div id='check_email_"+e+"_"+t+"' class='fm-not-filled'>"+r+"</div>"),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:first .wdform-label").addClass("error_label_check_mail"),i.val()==n.val()&&(jQuery("#confirm_"+e+"_"+t).remove(),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:eq( 1 ) .error_label_confirm").removeClass("error_label_confirm")),delete window["check_before_submit"+t][e+"_"+t],window["check_before_submit"+t][e+"_"+t]=!1)}function wd_check_confirmation_pass(e,t,r){var i=jQuery("#wdform_"+e+"_element"+t),n=jQuery("#wdform_"+e+"_1_element"+t);i.val()!==n.val()?(jQuery("#confirm_"+e+"_"+t).remove(),jQuery(n).parent().parent().parent().append("<div id='confirm_"+e+"_"+t+"' class='fm-not-filled'>"+r+"</div>"),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:eq( 1 ) .wdform-label").addClass("error_label_check_pass"),window["check_before_submit"+t][e+"_"+t]=!1):(jQuery("#confirm_"+e+"_"+t).remove(),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:eq( 1 ) .error_label_check_pass").removeClass("error_label_check_pass"),delete window["check_before_submit"+t][e+"_"+t])}function minimize_form(e){jQuery("#fm-scrollbox"+e).removeClass("fm-animated fadeInUp").addClass("fm-animated fadeOutDown fm-minimized"),jQuery("#fm-minimize-text"+e).removeClass("fm-animated fadeOutDown").addClass("fm-show fm-animated fadeInUp")}function fm_show_scrollbox(e){jQuery("#fm-minimize-text"+e).removeClass("fm-animated fadeInUp").addClass("fm-animated fadeOutDown"),jQuery("#fm-scrollbox"+e).removeClass("fm-animated fadeOutDown fm-minimized").addClass("fm-show fm-animated fadeInUp")}function fm_hide_form(e,t,r){var i=new Date;i.setDate(i.getDate()+t),0<t&&localStorage.setItem("hide-"+e,i.getTime()),"function"==typeof r&&r()}function wd_check_regExp(a,o){var d=jQuery("#form"+a),l=!1,e=o||window["check_regExp_all"+a];return jQuery.each(e,function(e,t){var r="#wdform_"+e+"_element"+a,i="",n=unescape(t[0]);i=t[1].length<=0?new RegExp(n):new RegExp(n,t[1]),0!=d.find(jQuery("div[wdid='"+e+"']")).length&&"none"!=d.find(jQuery("div[wdid='"+e+"']")).css("display")&&0<jQuery(r).val().length&&jQuery(r).val()!=jQuery(r).attr("title")&&1!=i.test(jQuery(r).val())&&(jQuery("#form"+a+" #wd_exp_"+e).remove(),d.find(jQuery("div[wdid='"+e+"'] .wdform-element-section")).parent().parent().append("<div id='wd_exp_"+e+"' class='fm-not-filled'>"+t[2]+"</div>"),jQuery("#form"+a+" div[wdid='"+e+"'] .wdform-label-section:first .wdform-label").addClass("error_label_exp"),l=!0,o||scroll_on_element(a))}),!1===l}function scroll_on_element(e){if(0==jQuery("#form"+e+" .fm-not-filled").length)return!0;var t=jQuery("#form"+e+" .fm-not-filled").closest(".wdform_row"),r=t.closest(".wdform_page");if("none"==r.parent().css("display")){var i=jQuery("#form"+e+" .wdform-page-and-images").length,n=jQuery("#form"+e+" .wdform_page").last().attr("id");n=n.split("form_view");var a=r.attr("id");fm_go_to_page(a=a.split("form_view")[1],e,i,n[1])}var o=jQuery(document).scrollTop(),d=document.body.clientHeight,l=jQuery("#form"+e+" .fm-not-filled").closest("div[wdid]").height(),s=jQuery("#form"+e+" .fm-not-filled").offset().top,u=function(){document.body.clientHeight!==d&&(d=document.body.clientHeight,l=jQuery("#form"+e+" .fm-not-filled").closest("div[wdid]").height(),s=jQuery("#form"+e+" .fm-not-filled").offset().top,jQuery("html").stop(),c())};function m(){old_bg=jQuery(t).css("background-color"),jQuery(t).effect("shake",{},500).css("background-color","#FF8F8B").animate({backgroundColor:old_bg},{duration:500,queue:!1})}function c(){jQuery("html").animate({scrollTop:s-(l+40)},500,function(){document.scrollingElement.scrollTop=s-(l+40),jQuery(window).off("scroll",u),m()})}jQuery(window).on("scroll",u),s<o?c():m()}function wd_file_upload_check(i,e){var n=jQuery("#form"+i),a=!1,t=e||window["file_upload_check"+i];return jQuery.each(t,function(e,t){var r="#wdform_"+e+"_element"+i;0!=n.find(jQuery("div[wdid='"+e+"']")).length&&"none"!=n.find(jQuery("div[wdid='"+e+"']")).css("display")&&(ext_available=getfileextension(jQuery(r).val(),t),ext_available?(jQuery("#form"+i+" #wd_upload_type_"+e).remove(),jQuery("#form"+i+" div[wdid='"+e+"'] .wdform-label-section:first .error_label_upload").removeClass("error_label_upload")):(jQuery("#form"+i+" #wd_upload_type_"+e).remove(),n.find(jQuery("div[wdid='"+e+"'] .wdform-element-section")).parent().parent().append("<div id='wd_upload_type_"+e+"' class='fm-not-filled'>"+fm_objectL10n.fm_file_type_error+"</div>"),jQuery("#form"+i+" div[wdid='"+e+"'] .wdform-label-section:first .wdform-label").addClass("error_label_upload"),a=!0))}),e||!0!==a||scroll_on_element(i),!1===a}function wd_is_filled(s,u,m){null==m&&(m=!0);var c=jQuery("#form"+s),e=u?u.split():window["required_fields"+s],_={};return jQuery(e).each(function(e,i){if("none"===c.find(jQuery("div[wdid='"+i+"']")).css("display")&&(c.find(jQuery("div[wdid='"+i+"']")).find(".fm-not-filled").remove(),c.find(jQuery("div[wdid='"+i+"']")).css("background-color",""),c.find(jQuery("div[wdid='"+i+"'] label")).removeClass("error_label")),0!=c.find(jQuery("div[wdid='"+i+"']")).length&&"none"!==c.find(jQuery("div[wdid='"+i+"']")).css("display"))switch(window["labels_and_ids"+s][i]){case"type_text":case"type_textarea":case"type_paypal_price_new":case"type_spinner":case"type_number":case"type_phone_new":case"type_submitter_mail":var t="#wdform_"+i+"_element"+s,r=jQuery(t).val();r=jQuery.trim(r),(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&(""!=r&&r!=jQuery(t).attr("title")||(_[i]=t)),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label")}).blur(function(){wd_is_filled(s,i)});break;case"type_own_select":case"type_country":case"type_paypal_select":t="#wdform_"+i+"_element"+s;(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label")}).blur(function(){wd_is_filled(s,i)}).change(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),wd_is_filled(s,i)});break;case"type_phone":t=["#wdform_"+i+"_element_first"+s,"#wdform_"+i+"_element_last"+s];jQuery.each(t,function(e,t){(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&(""!=jQuery(t).val()&&jQuery(t).val()!=jQuery(t).attr("title")||(_[i]=t)),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label")}).blur(function(){wd_is_filled(s,i)})});break;case"type_name":t=["#wdform_"+i+"_element_title"+s,"#wdform_"+i+"_element_first"+s,"#wdform_"+i+"_element_last"+s,"#wdform_"+i+"_element_middle"+s];jQuery.each(t,function(e,t){if((m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&jQuery(t).length){var r=jQuery(t).val();""!=(r=jQuery.trim(r))&&r!=jQuery(t).attr("title")||void 0===r||(_[i]=t)}u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove()}).blur(function(){wd_is_filled(s,i)})});break;case"type_address":t=["#wdform_"+i+"_street1"+s,"#wdform_"+i+"_street2"+s,"#wdform_"+i+"_city"+s,"#wdform_"+i+"_state"+s,"#wdform_"+i+"_postal"+s,"#wdform_"+i+"_country"+s];jQuery.each(t,function(e,t){if(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display")){var r=jQuery(t).val();void 0!==r&&(r=jQuery.trim(r)),""==r&&(_[i]=t)}u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove()}).blur(function(){wd_is_filled(s,i)})});break;case"type_checkbox":case"type_radio":case"type_scale_rating":case"type_paypal_checkbox":case"type_paypal_radio":case"type_paypal_shipping":(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&(0!=c.find(jQuery("div[wdid='"+i+"'] input:checked")).length&&""!=jQuery("#wdform_"+i+"_other_input"+s).val()||(_[i]=!0)),u||window["check_submit"+s]||jQuery.each(jQuery("#form"+s+" div[wdid='"+i+"'] input"),function(e,t){jQuery(this).change(function(){0==c.find(jQuery("div[wdid='"+i+"'] input:checked")).length||""==jQuery("#wdform_"+i+"_other_input"+s).val()?wd_is_filled(s,i):(jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"))})});break;case"type_star_rating":t="#wdform_"+i+"_selected_star_amount"+s;(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=!0),u||window["check_submit"+s]||jQuery("#wdform_"+i+"_element"+s).click(function(){""!=jQuery(t).val()&&(jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove())});break;case"type_range":t=["#wdform_"+i+"_element"+s+"0","#wdform_"+i+"_element"+s+"1"];jQuery.each(t,function(e,t){(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove()}).blur(function(){wd_is_filled(s,i)})});break;case"type_grading":if(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display")){var n=0;jQuery.each(jQuery("#wdform_"+i+"_element"+s+" input"),function(e,t){""!=jQuery(this).val()&&n++}),0==n&&(_[i]=!0)}u||window["check_submit"+s]||jQuery.each(jQuery("#wdform_"+i+"_element"+s+" input"),function(e,t){jQuery(this).focus(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove()}).blur(function(){wd_is_filled(s,i)})});break;case"type_slider":var a="#wdform_"+i+"_element"+s,o=(t="#wdform_"+i+"_slider_value"+s,"#wdform_"+i+"_element_min"+s);(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&jQuery(t).val()==jQuery(o).html()&&(_[i]=!0),u||window["check_submit"+s]||jQuery(a).slider({change:function(e,t){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove(),wd_is_filled(s,i)}});break;case"type_date":case"type_date_new":t="#wdform_"+i+"_element"+s;(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" #wd_required_"+i).remove()}).change(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),wd_is_filled(s,i)});break;case"type_date_range":t=["#wdform_"+i+"_element"+s+"0","#wdform_"+i+"_element"+s+"1"];jQuery.each(t,function(e,t){(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove()}).change(function(){wd_is_filled(s,i)})});break;case"type_date_fields":t=["#wdform_"+i+"_day"+s,"#wdform_"+i+"_month"+s,"#wdform_"+i+"_year"+s];jQuery.each(t,function(e,t){(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove()}).blur(function(){wd_is_filled(s,i)}).change(function(){wd_is_filled(s,i)})});break;case"type_time":t=["#wdform_"+i+"_hh"+s,"#wdform_"+i+"_mm"+s,"#wdform_"+i+"_ss"+s];jQuery.each(t,function(e,t){(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&void 0!==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove()}).blur(function(){wd_is_filled(s,i)})});break;case"type_password":t="#wdform_"+i+"_element"+s;(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label")}).blur(function(){wd_is_filled(s,i)});break;case"type_file_upload":t="#wdform_"+i+"_element"+s;(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&(jQuery(t).val()!=jQuery(t).attr("title")&&""!=jQuery(t).val()||(_[i]=t)),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove()}).change(function(){jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),wd_is_filled(s,i)});break;case"type_matrix":if(jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),"radio"==jQuery("#form"+s+" div[wdid='"+i+"'] input").attr("type")||"checkbox"==jQuery("#form"+s+" div[wdid='"+i+"'] input").attr("type"))(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&(0==c.find(jQuery("div[wdid='"+i+"'] input:checked")).length&&(_[i]=!0),"radio"==jQuery("#form"+s+" div[wdid='"+i+"'] input").attr("type")&&jQuery.each(jQuery("#form"+s+" div[wdid='"+i+"'] div[class^='wdform-matrix-row']"),function(e,t){0==jQuery(t).find('input[type="radio"]:checked').length&&(_[i]=!0)})),"checkbox"==jQuery("#form"+s+" div[wdid='"+i+"'] input").attr("type")&&(u||window["check_submit"+s]||jQuery.each(jQuery("#form"+s+" div[wdid='"+i+"'] input"),function(e,t){jQuery(this).change(function(){0==c.find(jQuery("div[wdid='"+i+"'] input:checked")).length?wd_is_filled(s,i):(jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove())})}));else if("text"==jQuery("#form"+s+" div[wdid='"+i+"'] input").attr("type")){if(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display")){var d=0;jQuery.each(jQuery("#form"+s+" div[wdid='"+i+"'] input"),function(e,t){""!=jQuery(this).val()&&d++}),0==d&&(_[i]=!0)}u||window["check_submit"+s]||jQuery.each(jQuery("#form"+s+" div[wdid='"+i+"'] input"),function(e,t){jQuery(this).focus(function(){jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label")}).blur(function(){wd_is_filled(s,i)})})}else{if(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display")){var l=0;jQuery.each(jQuery("#form"+s+" div[wdid='"+i+"'] select"),function(e,t){""!=jQuery(this).val()&&l++}),0==l&&(_[i]=!0)}u||window["check_submit"+s]||jQuery.each(jQuery("#form"+s+" div[wdid='"+i+"'] select"),function(e,t){jQuery(this).focus(function(){""==jQuery(this).val()&&(jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"))}).change(function(){wd_is_filled(s,i)}).blur(function(){wd_is_filled(s,i)})})}break;case"type_send_copy":(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&0==jQuery("div[wdid='"+i+"'] input:checked").length&&(_[i]=!0),u||window["check_submit"+s]||jQuery("#form"+s+" div[wdid='"+i+"'] input").change(function(){0==jQuery("div[wdid='"+i+"'] input:checked").length?wd_is_filled(s,i):(jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"))});break;case"type_captcha":case"type_arithmetic_captcha":t="";t="type_captcha"==window["labels_and_ids"+s][i]?"#wd_captcha_input"+s:"#wd_arithmetic_captcha_input"+s,(m||"none"!=c.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(jQuery(".message_captcha").html(""),_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label")}).blur(function(){wd_is_filled(s,i)})}}),0===Object.keys(_).length&&0===Object.keys(window["check_before_submit"+s]).length||(0!==Object.keys(_).length&&jQuery.each(_,function(e,t){jQuery("#form"+s+" #wd_required_"+e).remove(),jQuery("#form"+s+" div[wdid='"+e+"'] .wdform-element-section:first").parent().parent().append("<div id='wd_required_"+e+"' class='fm-not-filled'>"+fm_objectL10n.fm_field_is_required+"</div>"),jQuery("#form"+s+" div[wdid='"+e+"'] .wdform-label-section:first .wdform-label").addClass("error_label")}),u||scroll_on_element(s),!(window["check_submit"+s]=1))}function wd_check_price_min_max(a,o){var d=jQuery("#form"+a),e=o||window["check_paypal_price_min_max"+a],l=!1;return jQuery.each(e,function(e,t){var r="#wdform_"+e+"_element"+a,i=t[3]?t[3]:0,n=t[4]?t[4]:-1;!t[2]&&jQuery(r).val()==t[1]||(-1!=n&&parseFloat(jQuery(r).val())>n||parseFloat(jQuery(r).val())<i)&&(jQuery("#form"+a+" #wd_price_"+e).remove(),d.find(jQuery("div[wdid='"+e+"'] .wdform-element-section")).parent().parent().append("<div id='wd_price_"+e+"' class='fm-not-filled'>"+fm_objectL10n.fm_min_max_check_1+t[0]+fm_objectL10n.fm_min_max_check_2+(t[3]?t[3]:0)+"-"+(t[4]?t[4]:"any")+"</div>"),jQuery("#form"+a+" div[wdid='"+e+"'] .wdform-label-section:first .wdform-label").addClass("error_label_price"),l=!0,o||scroll_on_element(a))}),!1===l}function wd_spinner_check(i,n){var a=jQuery("#form"+i),o=!1,e=n||window["spinner_check"+i];return jQuery.each(e,function(e,t){var r="#wdform_"+e+"_element"+i;0!=a.find(jQuery("div[wdid='"+e+"']")).length&&"none"!=a.find(jQuery("div[wdid='"+e+"']")).css("display")&&(parseInt(jQuery(r).val())<parseInt(t[0])||parseInt(jQuery(r).val())>parseInt(t[1]))&&(jQuery("#form"+i+" #wd_price_"+e).remove(),a.find(jQuery("div[wdid='"+e+"'] .wdform-element-section")).parent().parent().append("<div id='wd_price_"+e+"' class='fm-not-filled'>"+fm_objectL10n.fm_spinner_check+(t[0]?t[0]:0)+"-"+(t[1]?t[1]:"any")+"</div>"),jQuery("#form"+i+" div[wdid='"+e+"'] .wdform-label-section:first .wdform-label").addClass("error_label_price"),o=!0,n||scroll_on_element(i))}),!1===o}function fmscrollHandler(e){var t=100*jQuery(window).scrollTop()/(jQuery(document).height()-jQuery(window).height());!jQuery("#fm-scrollbox"+e).hasClass("fm-minimized")&&t>=window["scrollbox_trigger_point"+e]?setTimeout(function(){jQuery("#fm-scrollbox"+e).removeClass("fm-animated fadeOutDown").addClass("fm-animated fadeInUp"),jQuery("#fm-scrollbox"+e).css("visibility",""),jQuery("#fm-scrollbox"+e+" .fm-header-img").addClass("fm-animated "+window["header_image_animation"+e])},1e3*window["scrollbox_loading_delay"+e]):window["scrollbox_auto_hide"+e]&&(jQuery("#fm-scrollbox"+e+" .fm-header-img").removeClass("fm-animated "+window["header_image_animation"+e]),jQuery("#fm-scrollbox"+e).removeClass("fm-animated fadeInUp").addClass("fm-animated fadeOutDown"))}function fm_submit_form(e){if("function"==typeof window["before_submit"+e]&&window["before_submit"+e]())return!1;if(!fm_check(0,e))return!1;(jQuery("#form"+e+" button").each(function(){jQuery(this).attr("disabled","disabled")}),jQuery('<input type="hidden" name="save_or_submit'+e+'" value ="submit" />').appendTo("#form"+e),window["onsubmit_js"+e](),1==window["checkStripe"+e])?"none"!=jQuery("form[id='form"+e+"']").find(".wdfm_stripe_elem").first().parents(".wdform_row").parents(".wdform_row").css("display")?wdfm_call_stripe(!0):0<jQuery("#form"+e).find(".g-recaptcha[data-size=invisible]").length?grecaptcha.execute():fm_submit(e):0<jQuery("#form"+e).find(".g-recaptcha[data-size=invisible]").length?grecaptcha.execute():fm_submit(e)}function fm_submit(i){if(fm_set_input_value("fm_empty_field_validation"+i,jQuery("#fm_empty_field_validation"+i).attr("data-value")),"0"!=jQuery("#form"+i+" .button-submit").attr("data-ajax")){jQuery("#form"+i+" .fm-submit-loading").css("display","inline-block");var e=jQuery("#form"+i)[0],t=new FormData(e),r=jQuery("#fm_ajax_url"+i).data("ajax_url"),n=jQuery("#form"+i+" #fm_ajax_redirect_url"+i).data("ajax_redirect_url");jQuery.ajax({type:"POST",enctype:"multipart/form-data",url:r,data:t,contentType:!1,processData:!1,success:function(e){jQuery("#form"+i+" .button-submit").removeAttr("disabled"),jQuery("#form"+i+" .fm-submit-loading").hide();var t=jQuery(e).find("#form"+i).html();jQuery("#form"+i).html(t);var r=!1;(0<jQuery(t).find(".fm-not-filled.message_captcha").length||0<jQuery(t).find(".fm-notice-error").length||-1<t.indexOf('class="fm-message fm-notice-error"'))&&(r=!0),0==n||r||window.location.replace(n)},complete:function(){"function"==typeof window["after_submit"+i]&&window["after_submit"+i]()}})}else jQuery("#form"+i).submit()}function fm_reset_form(form_id){"function"==typeof window["before_reset"+form_id]&&window["before_reset"+form_id]();var privacy_policy_check=jQuery("#fm_privacy_policy"+form_id);privacy_policy_check&&(privacy_policy_check.prop("checked",!1),fm_privacy_policy_check(privacy_policy_check)),jQuery.each(window["labels_and_ids"+form_id],function(index,elem){switch(elem){case"type_text":case"type_textarea":case"type_number":case"type_spinner":case"type_own_select":case"type_country":case"type_date":case"type_date_new":case"type_hidden":case"type_paypal_price_new":case"type_phone_new":jQuery("#wdform_"+index+"_element"+form_id).val("");break;case"type_submitter_mail":case"type_password":jQuery("#wdform_"+index+"_element"+form_id).val(""),jQuery("#wdform_"+index+"_1_element"+form_id)&&(jQuery("#wdform_"+index+"_1_element"+form_id).val(""),jQuery("#confirm_"+index+"_"+form_id)&&jQuery("#confirm_"+index+"_"+form_id).remove(),"type_submitter_mail"==elem&&jQuery("#check_email_"+index+"_"+form_id)&&jQuery("#check_email_"+index+"_"+form_id).remove());break;case"type_date_range":jQuery("#wdform_"+index+"_element"+form_id+"0").val(""),jQuery("#wdform_"+index+"_element"+form_id+"1").val("");break;case"type_send_copy":jQuery("#wdform_"+index+"_element"+form_id).prop("checked",!1);break;case"type_phone":jQuery("#wdform_"+index+"_element_first"+form_id+", #wdform_"+index+"_element_last"+form_id).val("");break;case"type_name":jQuery("#wdform_"+index+"_element_first"+form_id+", #wdform_"+index+"_element_last"+form_id+", #wdform_"+index+"_element_title"+form_id+", #wdform_"+index+"_element_middle"+form_id).val("");break;case"type_address":jQuery("#wdform_"+index+"_street1"+form_id+", #wdform_"+index+"_street2"+form_id+", #wdform_"+index+"_city"+form_id+", #wdform_"+index+"_state"+form_id+", #wdform_"+index+"_postal"+form_id+", #wdform_"+index+"_country"+form_id).val("");break;case"type_checkbox":jQuery("#form"+form_id+" div[wdid='"+index+"'] .checkbox-div input").prop("checked",!1),jQuery("#wdform_"+index+"_other_br"+form_id).remove(),jQuery("#wdform_"+index+"_other_input"+form_id).remove();break;case"type_radio":jQuery("#form"+form_id+" div[wdid='"+index+"'] .radio-div input").prop("checked",!1),jQuery("#wdform_"+index+"_other_br"+form_id).remove(),jQuery("#wdform_"+index+"_other_input"+form_id).remove();break;case"type_time":jQuery("#wdform_"+index+"_hh"+form_id+", #wdform_"+index+"_mm"+form_id+", #wdform_"+index+"_ss"+form_id+", #wdform_"+index+"_am_pm"+form_id).val("");break;case"type_date_fields":jQuery("#wdform_"+index+"_day"+form_id+", #wdform_"+index+"_month"+form_id+", #wdform_"+index+"_year"+form_id).val("");break;case"type_file_upload":jQuery("#wdform_"+index+"_element"+form_id+"_save").remove();break;case"type_paypal_price":jQuery("#wdform_"+index+"_element_dollars"+form_id+", #wdform_"+index+"_element_cents"+form_id).val("");break;case"type_paypal_select":jQuery("#wdform_"+index+"_element"+form_id+", #wdform_"+index+"_element_quantity"+form_id+", #form"+form_id+" div[wdid='"+index+"'] .paypal-property select").val("");break;case"type_paypal_radio":jQuery("#wdform_"+index+"_element_quantity"+form_id+",#form"+form_id+" div[wdid='"+index+"'] .paypal-property select").val(""),jQuery("#form"+form_id+" div[wdid='"+index+"'] .radio-div input").prop("checked",!1);break;case"type_paypal_shipping":jQuery("#form"+form_id+" div[wdid='"+index+"'] .radio-div input").prop("checked",!1);break;case"type_paypal_checkbox":jQuery("#wdform_"+index+"_element_quantity"+form_id+",#form"+form_id+" div[wdid='"+index+"'] .paypal-property select").val(""),jQuery("#form"+form_id+" div[wdid='"+index+"'] .checkbox-div input").prop("checked",!1);break;case"type_star_rating":jQuery("#wdform_"+index+"_selected_star_amount"+form_id).val(""),jQuery("#wdform_"+index+"_element"+form_id+" img").attr("src",fm_objectL10n.plugin_url+"/images/star.png");break;case"type_scale_rating":jQuery("#form"+form_id+" div[wdid='"+index+"'] .radio-div input").prop("checked",!1);break;case"type_slider":jQuery("#wdform_"+index+"_element"+form_id).slider({value:eval(0)}),jQuery("#wdform_"+index+"_element_value"+form_id).html("0");break;case"type_range":jQuery("#wdform_"+index+"_element"+form_id+"0, #wdform_"+index+"_element"+form_id+"1").val("");break;case"type_grading":jQuery("#wdform_"+index+"_element"+form_id+" input").val("");break;case"type_matrix":jQuery("#wdform_"+index+"_element"+form_id+" .radio-div input").prop("checked",!1),jQuery("#wdform_"+index+"_element"+form_id+" .checkbox-div input").prop("checked",!1),jQuery("#wdform_"+index+"_element"+form_id+" input[type='text']").val(""),jQuery("#wdform_"+index+"_element"+form_id+" select").val("");break;case"type_paypal_total":jQuery("#wdform_"+index+"div_total"+form_id).html("$0"),jQuery("#wdform_"+index+"paypal_products"+form_id).empty();break;case"type_captcha":jQuery("#wd_captcha_input"+form_id).val("")}})}function fm_save_form(e){jQuery('<input type="hidden" name="save_or_submit'+e+'" value ="save" />').appendTo("#form"+e),window["onsubmit_js"+e](),jQuery("#form"+e+" button").each(function(){jQuery(this).attr("disabled","disabled")}),fm_set_input_value("fm_empty_field_validation"+e,jQuery("#fm_empty_field_validation"+e).attr("data-value")),jQuery("#form"+e).submit()}function fm_clear_form(e){1==confirm(fm_objectL10n.fm_clear_data)&&(jQuery("#form"+e+" button").each(function(){jQuery(this).attr("disabled","disabled")}),jQuery.get(fm_objectL10n.form_maker_admin_ajax+"?action=FMClearProg&addon_task=clear_data&nonce="+fm_ajax.ajaxnonce+"&form_id="+e).done(function(){window.location=jQuery("#form"+e).attr("action")}))}function fm_set_input_value(e,t){jQuery("#"+e).val(t)}function formOnload(i){var n;-1!=navigator.userAgent.toLowerCase().indexOf("msie")&&8===parseInt(navigator.userAgent.toLowerCase().split("msie")[1])&&(jQuery("#form"+i).find(jQuery("input[type='radio']")).click(function(){jQuery("input[type='radio']+label").removeClass("if-ie-div-label"),jQuery("input[type='radio']:checked+label").addClass("if-ie-div-label")}),jQuery("#form"+i).find(jQuery("input[type='radio']:checked+label")).addClass("if-ie-div-label"),jQuery("#form"+i).find(jQuery("input[type='checkbox']")).click(function(){jQuery("input[type='checkbox']+label").removeClass("if-ie-div-label"),jQuery("input[type='checkbox']:checked+label").addClass("if-ie-div-label")}),jQuery("#form"+i).find(jQuery("input[type='checkbox']:checked+label")).addClass("if-ie-div-label")),jQuery.each(window["check_regExp_all"+i],function(e,t){var r={};r[e]=t,jQuery("div[wdid='"+e+"'] input").blur(function(){wd_check_regExp(i,r)}).focus(function(){jQuery("#form"+i+" #wd_exp_"+e).remove(),jQuery("#form"+i+" div[wdid='"+e+"'] .wdform-label-section:first .error_label_exp").removeClass("error_label_exp")})}),jQuery.each(window["check_paypal_price_min_max"+i],function(e,t){var r={};r[e]=t,jQuery("div[wdid='"+e+"'] input").blur(function(){wd_check_price_min_max(i,r)}).focus(function(){jQuery("#form"+i+" #wd_price_"+e).remove(),jQuery("#form"+i+" div[wdid='"+e+"'] .wdform-label-section:first .error_label_price").removeClass("error_label_price")})}),jQuery.each(window["spinner_check"+i],function(e,t){var r={};r[e]=t,jQuery("div[wdid='"+e+"'] input").blur(function(){wd_spinner_check(i,r)}).focus(function(){jQuery("#form"+i+" #wd_price_"+e).remove(),jQuery("#form"+i+" div[wdid='"+e+"'] .wdform-label-section:first .error_label_price").removeClass("error_label_price")})}),jQuery.each(window["file_upload_check"+i],function(e,t){var r={};r[e]=t,jQuery("div[wdid='"+e+"'] input").change(function(){wd_file_upload_check(i,r)})}),jQuery("#form"+i+" input").on("keypress",function(e){if(13==(e.keyCode?e.keyCode:e.which))return!1}),jQuery("div[type='type_number'] input, div[type='type_phone'] input, div[type='type_spinner'] input, div[type='type_range'] input, .wdform-quantity, div[type='type_paypal_price_new'] input").keypress(function(e){return check_isnum(e)}),jQuery("div[type='type_grading'] input").keypress(function(e){return check_isnum_or_minus(e)}),jQuery("div[type='type_paypal_checkbox'] input[type='checkbox'], div[type='type_paypal_radio'] input[type='radio'], div[type='type_paypal_shipping'] input[type='radio']").click(function(){set_total_value(i)}),jQuery("div[type='type_paypal_select'] select, div[type='type_paypal_price'] input, div[type='type_paypal_price_new'] input").change(function(){set_total_value(i)}),jQuery(".wdform-quantity").change(function(){set_total_value(i)}),jQuery("div[type='type_address'] select").change(function(){set_total_value(i)}),jQuery("div[type='type_time'] input").blur(function(){add_0(this)}),jQuery(".wdform-element-section").each(function(){if("type_stripe"==jQuery(this).parent().parent().attr("type"))return!0;jQuery(this).parent()[0].style.width||0==parseInt(jQuery(this).width())||0==jQuery(this).parent().find(jQuery(".wdform-label-section")).length||"table-cell"==jQuery(this).css("display")&&("type_captcha"!=jQuery(this).parent().attr("type")?jQuery(this).parent().css("width",parseInt(jQuery(this).width())+parseInt(jQuery(this).parent().find(jQuery(".wdform-label-section"))[0].style.width)+15):jQuery(this).parent().css("width",2*parseInt(jQuery(this).parent().find(jQuery(".captcha_input"))[0].style.width)+50+parseInt(jQuery(this).parent().find(jQuery(".wdform-label-section"))[0].style.width)+15)),parseInt(jQuery(this)[0].style.width.replace("px",""))<parseInt(jQuery(this).css("min-width").replace("px",""))&&jQuery(this).css("min-width",parseInt(jQuery(this)[0].style.width.replace("px",""))-10)}),jQuery(".wdform-label").each(function(){parseInt(jQuery(this).height())>=2*parseInt(jQuery(this).css("line-height").replace("px",""))&&(jQuery(this).parent().css("max-width",jQuery(this).parent().width()),jQuery(this).parent().css("width",""))}),(n=jQuery).fn.shuffle=function(){var i=n(this).find(".wd-choice"),t=n.map(i,function(){var e,t=(e=i.length,Math.floor(Math.random()*e)),r=n(i[parseInt(t)]).clone(!0)[0];return i.splice(t,1),r});return n(this).find(".wd-choice").each(function(e){n(this).replaceWith(n(t[e]))}),n(t)},window["onload_js"+i](),"function"==typeof window["before_load"+i]&&window["before_load"+i]()}function fm_document_ready(e){jQuery("#form"+e).hasClass("fm-form-submitted")&&"function"==typeof window["after_submit"+e]&&window["after_submit"+e]();var t=jQuery("#form"+e+" .wdform-page-and-images").length;window["form_view_count"+e]=t,1<window["form_view_count"+e]&&(firstid=jQuery("#form"+e+" .wdform_page").first().attr("id"),firstid=firstid.split("form_view"),window["first_form_view"+e]=firstid[1],generate_page_nav(window["first_form_view"+e],e,window["form_view_count"+e])),fm_initilize_form(e),window["condition_js"+e](),jQuery("#form"+e).closest(".fm-form-container").removeAttr("style")}function fm_check(e,t,r){if(!wd_is_filled(t,void 0,r))return!1;if(1==window["checkStripe"+t]){var i=jQuery("form[id='form"+t+"']");if("none"!=i.find(".wdfm_stripe_elem").first().closest(".wdform-page-and-images").css("display")&&"none"!=i.find(".wdfm_stripe_elem").first().parents(".wdform_row").parents(".wdform_row").css("display")&&0==wdfm_call_stripe(!1))return!1}return!!wd_check_regExp(t)&&(!!wd_check_price_min_max(t)&&(!!wd_spinner_check(t)&&(!!wd_file_upload_check(t)&&0!=window["check_js"+t](e,t))))}function fmRecaptchaInit(){jQuery(".g-recaptcha").each(function(){if(type=jQuery(this).attr("data-size"),"invisible"==type)r=jQuery(this).attr("data-form_id"),grecaptcha.render(jQuery(this).attr("id"),{sitekey:jQuery(this).attr("data-sitekey"),badge:jQuery(this).attr("data-badge"),callback:function(){fm_submit(r)}});else if("v3"==type){if("undefined"==jQuery(this).attr("data-sitekey")||""==jQuery(this).attr("data-sitekey"))return;var t=jQuery(this).attr("data-id"),r=jQuery(this).attr("data-form-id"),e=jQuery(this).attr("data-sitekey");grecaptcha.ready(function(){grecaptcha.execute(e).then(function(e){document.getElementById("recaptchaV3Response_"+r+t).value=e})})}else grecaptcha.render(jQuery(this).attr("id"),{sitekey:jQuery(this).attr("data-sitekey"),theme:"light"})})}function wd_change_state_input(e,t){if(document.getElementById(e+"_country"+t)&&document.getElementById(e+"_state"+t)){var r=!1,i=document.getElementById(e+"_state"+t);if("United States"==document.getElementById(e+"_country"+t).value){var n=document.createElement("select"),a=fm_objectL10n.states;for(var o in a){(d=document.createElement("option")).setAttribute("value",o),d.innerHTML=a[o],n.appendChild(d)}r=!0}else if("Canada"==document.getElementById(e+"_country"+t).value){n=document.createElement("select"),a=fm_objectL10n.provinces;for(var o in a){var d;(d=document.createElement("option")).setAttribute("value",o),d.innerHTML=a[o],n.appendChild(d)}r=!0}else if("SELECT"==document.getElementById(e+"_state"+t).tagName){n=document.createElement("input");r=!0}if(r){n.setAttribute("type","text"),n.setAttribute("id",e+"_state"+t),n.setAttribute("name","wdform_"+(parseInt(e.replace("wdform_",""))+3)+"_state"+t),n.setAttribute("class","wd-width-100");var l=i.parentNode;l.removeChild(i),l.insertBefore(n,l.firstChild)}}}function fm_privacy_policy_check(e){var t=jQuery(e),r=t.parents(".wdform_row").find(".button-submit");t.is(":checked")?r.removeAttr("disabled"):r.attr("disabled","disabled")}jQuery(document).on("mouseenter",".sel-imul",function(){selenter=!0}),jQuery(document).on("mouseleave",".sel-imul",function(){selenter=!1}),jQuery(document).click(function(){selenter||(jQuery(".sel-options").hide(),jQuery(".sel-imul").removeClass("act"))}),function(t){"function"==typeof define&&define.amd?define(["jquery"],function(e){t(e,window,document)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),window,document):t(jQuery,window,document)}(function(l,d,e,a){"use strict";var o="intlTelInput",r=1,i={allowDropdown:!0,autoHideDialCode:!0,autoPlaceholder:"polite",customPlaceholder:null,dropdownContainer:"",excludeCountries:[],formatOnDisplay:!0,geoIpLookup:null,initialCountry:"",nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",preferredCountries:["us","gb"],separateDialCode:!1,utilsScript:""},s=38,u=40,m=13,c=27,t=43,_=65,f=90,p=32,n=9,y=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"];function h(e,t){this.telInput=l(e),this.options=l.extend({},i,t),this.ns="."+o+r++,this.isGoodBrowser=Boolean(e.setSelectionRange),this.hadInitialPlaceholder=Boolean(l(e).attr("placeholder"))}l(d).on("load",function(){l.fn[o].windowLoaded=!0}),h.prototype={_init:function(){return this.options.nationalMode&&(this.options.autoHideDialCode=!1),this.options.separateDialCode&&(this.options.autoHideDialCode=this.options.nationalMode=!1),this.isMobile=/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),this.isMobile&&(l("body").addClass("iti-mobile"),this.options.dropdownContainer||(this.options.dropdownContainer="body")),this.autoCountryDeferred=new l.Deferred,this.utilsScriptDeferred=new l.Deferred,this._processCountryData(),this._generateMarkup(),this._setInitialState(),this._initListeners(),this._initRequests(),[this.autoCountryDeferred,this.utilsScriptDeferred]},_processCountryData:function(){this._processAllCountries(),this._processCountryCodes(),this._processPreferredCountries()},_addCountryCode:function(e,t,r){t in this.countryCodes||(this.countryCodes[t]=[]);var i=r||0;this.countryCodes[t][i]=e},_filterCountries:function(e,t){var r;for(r=0;r<e.length;r++)e[r]=e[r].toLowerCase();for(this.countries=[],r=0;r<w.length;r++)t(l.inArray(w[r].iso2,e))&&this.countries.push(w[r])},_processAllCountries:function(){this.options.onlyCountries.length?this._filterCountries(this.options.onlyCountries,function(e){return-1<e}):this.options.excludeCountries.length?this._filterCountries(this.options.excludeCountries,function(e){return-1==e}):this.countries=w},_processCountryCodes:function(){this.countryCodes={};for(var e=0;e<this.countries.length;e++){var t=this.countries[e];if(this._addCountryCode(t.iso2,t.dialCode,t.priority),t.areaCodes)for(var r=0;r<t.areaCodes.length;r++)this._addCountryCode(t.iso2,t.dialCode+t.areaCodes[r])}},_processPreferredCountries:function(){this.preferredCountries=[];for(var e=0;e<this.options.preferredCountries.length;e++){var t=this.options.preferredCountries[e].toLowerCase(),r=this._getCountryData(t,!1,!0);r&&this.preferredCountries.push(r)}},_generateMarkup:function(){this.telInput.attr("autocomplete","off");var e="intl-tel-input";this.options.allowDropdown&&(e+=" allow-dropdown"),this.options.separateDialCode&&(e+=" separate-dial-code"),this.telInput.wrap(l("<div>",{class:e})),this.flagsContainer=l("<div>",{class:"flag-container"}).insertBefore(this.telInput);var t=l("<div>",{class:"selected-flag"});t.appendTo(this.flagsContainer),this.selectedFlagInner=l("<div>",{class:"iti-flag"}).appendTo(t),this.options.separateDialCode&&(this.selectedDialCode=l("<div>",{class:"selected-dial-code"}).appendTo(t)),this.options.allowDropdown?(t.attr("tabindex","0"),l("<div>",{class:"iti-arrow"}).appendTo(t),this.countryList=l("<ul>",{class:"country-list hide"}),this.preferredCountries.length&&(this._appendListItems(this.preferredCountries,"preferred"),l("<li>",{class:"divider"}).appendTo(this.countryList)),this._appendListItems(this.countries,""),this.countryListItems=this.countryList.children(".country"),this.options.dropdownContainer?this.dropdown=l("<div>",{class:"intl-tel-input iti-container"}).append(this.countryList):this.countryList.appendTo(this.flagsContainer)):this.countryListItems=l()},_appendListItems:function(e,t){for(var r="",i=0;i<e.length;i++){var n=e[i];r+="<li class='country "+t+"' data-dial-code='"+n.dialCode+"' data-country-code='"+n.iso2+"'>",r+="<div class='flag-box'><div class='iti-flag "+n.iso2+"'></div></div>",r+="<span class='country-name'>"+n.name+"</span>",r+="<span class='dial-code'>+"+n.dialCode+"</span>",r+="</li>"}this.countryList.append(r)},_setInitialState:function(){var e=this.telInput.val();this._getDialCode(e)&&!this._isRegionlessNanp(e)?this._updateFlagFromNumber(e):"auto"!==this.options.initialCountry&&(this.options.initialCountry?this._setFlag(this.options.initialCountry.toLowerCase()):(this.defaultCountry=this.preferredCountries.length?this.preferredCountries[0].iso2:this.countries[0].iso2,e||this._setFlag(this.defaultCountry)),e||this.options.nationalMode||this.options.autoHideDialCode||this.options.separateDialCode||this.telInput.val("+"+this.selectedCountryData.dialCode)),e&&this._updateValFromNumber(e)},_initListeners:function(){this._initKeyListeners(),this.options.autoHideDialCode&&this._initFocusListeners(),this.options.allowDropdown&&this._initDropdownListeners()},_initDropdownListeners:function(){var t=this,e=this.telInput.closest("label");e.length&&e.on("click"+this.ns,function(e){t.countryList.hasClass("hide")?t.telInput.focus():e.preventDefault()}),this.selectedFlagInner.parent().on("click"+this.ns,function(e){!t.countryList.hasClass("hide")||t.telInput.prop("disabled")||t.telInput.prop("readonly")||t._showDropdown()}),this.flagsContainer.on("keydown"+t.ns,function(e){!t.countryList.hasClass("hide")||e.which!=s&&e.which!=u&&e.which!=p&&e.which!=m||(e.preventDefault(),e.stopPropagation(),t._showDropdown()),e.which==n&&t._closeDropdown()})},_initRequests:function(){var e=this;this.options.utilsScript?l.fn[o].windowLoaded?l.fn[o].loadUtils(this.options.utilsScript,this.utilsScriptDeferred):l(d).on("load",function(){l.fn[o].loadUtils(e.options.utilsScript,e.utilsScriptDeferred)}):this.utilsScriptDeferred.resolve(),"auto"===this.options.initialCountry?this._loadAutoCountry():this.autoCountryDeferred.resolve()},_loadAutoCountry:function(){l.fn[o].autoCountry?this.handleAutoCountry():l.fn[o].startedLoadingAutoCountry||(l.fn[o].startedLoadingAutoCountry=!0,"function"==typeof this.options.geoIpLookup&&this.options.geoIpLookup(function(e){l.fn[o].autoCountry=e.toLowerCase(),setTimeout(function(){l(".intl-tel-input input").intlTelInput("handleAutoCountry")})}))},_initKeyListeners:function(){var e=this;this.telInput.on("keyup"+this.ns,function(){e._updateFlagFromNumber(e.telInput.val())&&e._triggerCountryChange()}),this.telInput.on("cut"+this.ns+" paste"+this.ns,function(){setTimeout(function(){e._updateFlagFromNumber(e.telInput.val())&&e._triggerCountryChange()})})},_cap:function(e){var t=this.telInput.attr("maxlength");return t&&e.length>t?e.substr(0,t):e},_initFocusListeners:function(){var r=this;this.telInput.on("mousedown"+this.ns,function(e){r.telInput.is(":focus")||r.telInput.val()||(e.preventDefault(),r.telInput.focus())}),this.telInput.on("focus"+this.ns,function(e){r.telInput.val()||r.telInput.prop("readonly")||!r.selectedCountryData.dialCode||(r.telInput.val("+"+r.selectedCountryData.dialCode),r.telInput.one("keypress.plus"+r.ns,function(e){e.which==t&&r.telInput.val("")}),setTimeout(function(){var e=r.telInput[0];if(r.isGoodBrowser){var t=r.telInput.val().length;e.setSelectionRange(t,t)}}))});var e=this.telInput.prop("form");e&&l(e).on("submit"+this.ns,function(){r._removeEmptyDialCode()}),this.telInput.on("blur"+this.ns,function(){r._removeEmptyDialCode()})},_removeEmptyDialCode:function(){var e=this.telInput.val();if("+"==e.charAt(0)){var t=this._getNumeric(e);t&&this.selectedCountryData.dialCode!=t||this.telInput.val("")}this.telInput.off("keypress.plus"+this.ns)},_getNumeric:function(e){return e.replace(/\D/g,"")},_showDropdown:function(){this._setDropdownPosition();var e=this.countryList.children(".active");e.length&&(this._highlightListItem(e),this._scrollTo(e)),this._bindDropdownListeners(),this.selectedFlagInner.children(".iti-arrow").addClass("up")},_setDropdownPosition:function(){var e=this;if(this.options.dropdownContainer&&this.dropdown.appendTo(this.options.dropdownContainer),this.dropdownHeight=this.countryList.removeClass("hide").outerHeight(),!this.isMobile){var t=this.telInput.offset(),r=t.top,i=l(d).scrollTop(),n=r+this.telInput.outerHeight()+this.dropdownHeight<i+l(d).height(),a=r-this.dropdownHeight>i;if(this.countryList.toggleClass("dropup",!n&&a),this.options.dropdownContainer){var o=!n&&a?0:this.telInput.innerHeight();this.dropdown.css({top:r+o,left:t.left}),l(d).on("scroll"+this.ns,function(){e._closeDropdown()})}}},_bindDropdownListeners:function(){var t=this;this.countryList.on("mouseover"+this.ns,".country",function(e){t._highlightListItem(l(this))}),this.countryList.on("click"+this.ns,".country",function(e){t._selectListItem(l(this))});var r=!0;l("html").on("click"+this.ns,function(e){r||t._closeDropdown(),r=!1});var i="",n=null;l(e).on("keydown"+this.ns,function(e){e.preventDefault(),e.which==s||e.which==u?t._handleUpDownKey(e.which):e.which==m?t._handleEnterKey():e.which==c?t._closeDropdown():(e.which>=_&&e.which<=f||e.which==p)&&(n&&clearTimeout(n),i+=String.fromCharCode(e.which),t._searchForCountry(i),n=setTimeout(function(){i=""},1e3))})},_handleUpDownKey:function(e){var t=this.countryList.children(".highlight").first(),r=e==s?t.prev():t.next();r.length&&(r.hasClass("divider")&&(r=e==s?r.prev():r.next()),this._highlightListItem(r),this._scrollTo(r))},_handleEnterKey:function(){var e=this.countryList.children(".highlight").first();e.length&&this._selectListItem(e)},_searchForCountry:function(e){for(var t=0;t<this.countries.length;t++)if(this._startsWith(this.countries[t].name,e)){var r=this.countryList.children("[data-country-code="+this.countries[t].iso2+"]").not(".preferred");this._highlightListItem(r),this._scrollTo(r,!0);break}},_startsWith:function(e,t){return e.substr(0,t.length).toUpperCase()==t},_updateValFromNumber:function(e){if(this.options.formatOnDisplay&&d.intlTelInputUtils&&this.selectedCountryData){var t=this.options.separateDialCode||!this.options.nationalMode&&"+"==e.charAt(0)?intlTelInputUtils.numberFormat.INTERNATIONAL:intlTelInputUtils.numberFormat.NATIONAL;e=intlTelInputUtils.formatNumber(e,this.selectedCountryData.iso2,t)}e=this._beforeSetNumber(e),this.telInput.val(e)},_updateFlagFromNumber:function(e){e&&this.options.nationalMode&&this.selectedCountryData&&"1"==this.selectedCountryData.dialCode&&"+"!=e.charAt(0)&&("1"!=e.charAt(0)&&(e="1"+e),e="+"+e);var t=this._getDialCode(e),r=null,i=this._getNumeric(e);if(t){var n=this.countryCodes[this._getNumeric(t)],a=this.selectedCountryData&&-1<l.inArray(this.selectedCountryData.iso2,n),o="+1"==t&&4<=i.length;if((!(this.selectedCountryData&&"1"==this.selectedCountryData.dialCode)||!this._isRegionlessNanp(i))&&(!a||o))for(var d=0;d<n.length;d++)if(n[d]){r=n[d];break}}else"+"==e.charAt(0)&&i.length?r="":e&&"+"!=e||(r=this.defaultCountry);return null!==r&&this._setFlag(r)},_isRegionlessNanp:function(e){var t=this._getNumeric(e);if("1"!=t.charAt(0))return!1;var r=t.substr(1,3);return-1<l.inArray(r,y)},_highlightListItem:function(e){this.countryListItems.removeClass("highlight"),e.addClass("highlight")},_getCountryData:function(e,t,r){for(var i=t?w:this.countries,n=0;n<i.length;n++)if(i[n].iso2==e)return i[n];if(r)return null;throw new Error("No country data for '"+e+"'")},_setFlag:function(e){var t=this.selectedCountryData&&this.selectedCountryData.iso2?this.selectedCountryData:{};this.selectedCountryData=e?this._getCountryData(e,!1,!1):{},this.selectedCountryData.iso2&&(this.defaultCountry=this.selectedCountryData.iso2),this.selectedFlagInner.attr("class","iti-flag "+e);var r=e?this.selectedCountryData.name+": +"+this.selectedCountryData.dialCode:"Unknown";if(this.selectedFlagInner.parent().attr("title",r),this.options.separateDialCode){var i=this.selectedCountryData.dialCode?"+"+this.selectedCountryData.dialCode:"",n=this.telInput.parent();t.dialCode&&n.removeClass("iti-sdc-"+(t.dialCode.length+1)),i&&n.addClass("iti-sdc-"+i.length),this.selectedDialCode.text(i)}return this._updatePlaceholder(),this.countryListItems.removeClass("active"),e&&this.countryListItems.find(".iti-flag."+e).first().closest(".country").addClass("active"),t.iso2!==e},_updatePlaceholder:function(){var e="aggressive"===this.options.autoPlaceholder||!this.hadInitialPlaceholder&&(!0===this.options.autoPlaceholder||"polite"===this.options.autoPlaceholder);if(d.intlTelInputUtils&&e&&this.selectedCountryData){var t=intlTelInputUtils.numberType[this.options.placeholderNumberType],r=this.selectedCountryData.iso2?intlTelInputUtils.getExampleNumber(this.selectedCountryData.iso2,this.options.nationalMode,t):"";r=this._beforeSetNumber(r),"function"==typeof this.options.customPlaceholder&&(r=this.options.customPlaceholder(r,this.selectedCountryData)),this.telInput.attr("placeholder",r)}},_selectListItem:function(e){var t=this._setFlag(e.attr("data-country-code"));if(this._closeDropdown(),this._updateDialCode(e.attr("data-dial-code"),!0),this.telInput.focus(),this.isGoodBrowser){var r=this.telInput.val().length;this.telInput[0].setSelectionRange(r,r)}t&&this._triggerCountryChange()},_closeDropdown:function(){this.countryList.addClass("hide"),this.selectedFlagInner.children(".iti-arrow").removeClass("up"),l(e).off(this.ns),l("html").off(this.ns),this.countryList.off(this.ns),this.options.dropdownContainer&&(this.isMobile||l(d).off("scroll"+this.ns),this.dropdown.detach())},_scrollTo:function(e,t){var r=this.countryList,i=r.height(),n=r.offset().top,a=n+i,o=e.outerHeight(),d=e.offset().top,l=d+o,s=d-n+r.scrollTop(),u=i/2-o/2;if(d<n)t&&(s-=u),r.scrollTop(s);else if(a<l){t&&(s+=u);var m=i-o;r.scrollTop(s-m)}},_updateDialCode:function(e,t){var r,i=this.telInput.val();if(e="+"+e,"+"==i.charAt(0)){var n=this._getDialCode(i);r=n?i.replace(n,e):e}else{if(this.options.nationalMode||this.options.separateDialCode)return;if(i)r=e+i;else{if(!t&&this.options.autoHideDialCode)return;r=e}}this.telInput.val(r)},_getDialCode:function(e){var t="";if("+"==e.charAt(0))for(var r="",i=0;i<e.length;i++){var n=e.charAt(i);if(l.isNumeric(n)&&(r+=n,this.countryCodes[r]&&(t=e.substr(0,i+1)),4==r.length))break}return t},_getFullNumber:function(){var e=l.trim(this.telInput.val()),t=this.selectedCountryData.dialCode,r=this._getNumeric(e),i="1"==r.charAt(0)?r:"1"+r;return(this.options.separateDialCode?"+"+t:"+"!=e.charAt(0)&&"1"!=e.charAt(0)&&t&&"1"==t.charAt(0)&&4==t.length&&t!=i.substr(0,4)?t.substr(1):"")+e},_beforeSetNumber:function(e){if(this.options.separateDialCode){var t=this._getDialCode(e);if(t){null!==this.selectedCountryData.areaCodes&&(t="+"+this.selectedCountryData.dialCode);var r=" "===e[t.length]||"-"===e[t.length]?t.length+1:t.length;e=e.substr(r)}}return this._cap(e)},_triggerCountryChange:function(){this.telInput.trigger("countrychange",this.selectedCountryData)},handleAutoCountry:function(){"auto"===this.options.initialCountry&&(this.defaultCountry=l.fn[o].autoCountry,this.telInput.val()||this.setCountry(this.defaultCountry),this.autoCountryDeferred.resolve())},handleUtils:function(){d.intlTelInputUtils&&(this.telInput.val()&&this._updateValFromNumber(this.telInput.val()),this._updatePlaceholder()),this.utilsScriptDeferred.resolve()},destroy:function(){if(this.allowDropdown&&(this._closeDropdown(),this.selectedFlagInner.parent().off(this.ns),this.telInput.closest("label").off(this.ns)),this.options.autoHideDialCode){var e=this.telInput.prop("form");e&&l(e).off(this.ns)}this.telInput.off(this.ns),this.telInput.parent().before(this.telInput).remove()},getExtension:function(){return d.intlTelInputUtils?intlTelInputUtils.getExtension(this._getFullNumber(),this.selectedCountryData.iso2):""},getNumber:function(e){return d.intlTelInputUtils?intlTelInputUtils.formatNumber(this._getFullNumber(),this.selectedCountryData.iso2,e):""},getNumberType:function(){return d.intlTelInputUtils?intlTelInputUtils.getNumberType(this._getFullNumber(),this.selectedCountryData.iso2):-99},getSelectedCountryData:function(){return this.selectedCountryData||{}},getValidationError:function(){return d.intlTelInputUtils?intlTelInputUtils.getValidationError(this._getFullNumber(),this.selectedCountryData.iso2):-99},isValidNumber:function(){var e=l.trim(this._getFullNumber()),t=this.options.nationalMode?this.selectedCountryData.iso2:"";return d.intlTelInputUtils?intlTelInputUtils.isValidNumber(e,t):null},setCountry:function(e){e=e.toLowerCase(),this.selectedFlagInner.hasClass(e)||(this._setFlag(e),this._updateDialCode(this.selectedCountryData.dialCode,!1),this._triggerCountryChange())},setNumber:function(e){var t=this._updateFlagFromNumber(e);this._updateValFromNumber(e),t&&this._triggerCountryChange()}},l.fn[o]=function(r){var t,i=arguments;if(r===a||"object"==typeof r){var n=[];return this.each(function(){if(!l.data(this,"plugin_"+o)){var e=new h(this,r),t=e._init();n.push(t[0]),n.push(t[1]),l.data(this,"plugin_"+o,e)}}),l.when.apply(null,n)}if("string"==typeof r&&"_"!==r[0])return this.each(function(){var e=l.data(this,"plugin_"+o);e instanceof h&&"function"==typeof e[r]&&(t=e[r].apply(e,Array.prototype.slice.call(i,1))),"destroy"===r&&l.data(this,"plugin_"+o,null)}),t!==a?t:this},l.fn[o].getCountryData=function(){return w},l.fn[o].loadUtils=function(e,t){l.fn[o].loadedUtilsScript?t&&t.resolve():(l.fn[o].loadedUtilsScript=!0,l.ajax({type:"GET",url:e,complete:function(){l(".intl-tel-input input").intlTelInput("handleUtils")},dataType:"script",cache:!0}))},l.fn[o].version="11.0.0",l.fn[o].defaults=i;for(var w=[["Afghanistan","af","93"],["Albania","al","355"],["Algeria","dz","213"],["American Samoa","as","1684"],["Andorra","ad","376"],["Angola","ao","244"],["Anguilla","ai","1264"],["Antigua and Barbuda","ag","1268"],["Argentina","ar","54"],["Armenia","am","374"],["Aruba","aw","297"],["Australia","au","61",0],["Austria","at","43"],["Azerbaijan","az","994"],["Bahamas","bs","1242"],["Bahrain","bh","973"],["Bangladesh","bd","880"],["Barbados","bb","1246"],["Belarus","by","375"],["Belgium","be","32"],["Belize","bz","501"],["Benin","bj","229"],["Bermuda","bm","1441"],["Bhutan","bt","975"],["Bolivia","bo","591"],["Bosnia and Herzegovina","ba","387"],["Botswana","bw","267"],["Brazil","br","55"],["British Indian Ocean Territory","io","246"],["British Virgin Islands","vg","1284"],["Brunei","bn","673"],["Bulgaria","bg","359"],["Burkina Faso","bf","226"],["Burundi","bi","257"],["Cambodia","kh","855"],["Cameroon","cm","237"],["Canada","ca","1",1,["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde","cv","238"],["Caribbean Netherlands","bq","599",1],["Cayman Islands","ky","1345"],["Central African Republic","cf","236"],["Chad","td","235"],["Chile","cl","56"],["China","cn","86"],["Christmas Island","cx","61",2],["Cocos (Keeling) Islands","cc","61",1],["Colombia","co","57"],["Comoros","km","269"],["Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)","cd","243"],["Congo (Republic) (Congo-Brazzaville)","cg","242"],["Cook Islands","ck","682"],["Costa Rica","cr","506"],["Cote d'Ivoire","ci","225"],["Croatia","hr","385"],["Cuba","cu","53"],["Curacao","cw","599",0],["Cyprus","cy","357"],["Czech Republic","cz","420"],["Denmark","dk","45"],["Djibouti","dj","253"],["Dominica","dm","1767"],["Dominican Republic","do","1",2,["809","829","849"]],["Ecuador","ec","593"],["Egypt","eg","20"],["El Salvador","sv","503"],["Equatorial Guinea","gq","240"],["Eritrea","er","291"],["Estonia","ee","372"],["Ethiopia","et","251"],["Falkland Islands","fk","500"],["Faroe Islands","fo","298"],["Fiji","fj","679"],["Finland","fi","358",0],["France","fr","33"],["French Guiana","gf","594"],["French Polynesia","pf","689"],["Gabon","ga","241"],["Gambia","gm","220"],["Georgia","ge","995"],["Germany","de","49"],["Ghana","gh","233"],["Gibraltar","gi","350"],["Greece","gr","30"],["Greenland","gl","299"],["Grenada","gd","1473"],["Guadeloupe","gp","590",0],["Guam","gu","1671"],["Guatemala","gt","502"],["Guernsey","gg","44",1],["Guinea","gn","224"],["Guinea-Bissau","gw","245"],["Guyana","gy","592"],["Haiti","ht","509"],["Honduras","hn","504"],["Hong Kong","hk","852"],["Hungary","hu","36"],["Iceland","is","354"],["India","in","91"],["Indonesia","id","62"],["Iran","ir","98"],["Iraq","iq","964"],["Ireland","ie","353"],["Isle of Man","im","44",2],["Israel","il","972"],["Italy","it","39",0],["Jamaica","jm","1876"],["Japan","jp","81"],["Jersey","je","44",3],["Jordan","jo","962"],["Kazakhstan","kz","7",1],["Kenya","ke","254"],["Kiribati","ki","686"],["Kosovo","xk","383"],["Kuwait","kw","965"],["Kyrgyzstan","kg","996"],["Laos","la","856"],["Latvia","lv","371"],["Lebanon","lb","961"],["Lesotho","ls","266"],["Liberia","lr","231"],["Libya","ly","218"],["Liechtenstein","li","423"],["Lithuania","lt","370"],["Luxembourg","lu","352"],["Macau","mo","853"],["Macedonia","mk","389"],["Madagascar","mg","261"],["Malawi","mw","265"],["Malaysia","my","60"],["Maldives","mv","960"],["Mali","ml","223"],["Malta","mt","356"],["Marshall Islands","mh","692"],["Martinique","mq","596"],["Mauritania","mr","222"],["Mauritius","mu","230"],["Mayotte","yt","262",1],["Mexico","mx","52"],["Micronesia","fm","691"],["Moldova","md","373"],["Monaco","mc","377"],["Mongolia","mn","976"],["Montenegro","me","382"],["Montserrat","ms","1664"],["Morocco","ma","212",0],["Mozambique","mz","258"],["Myanmar (Burma)","mm","95"],["Namibia","na","264"],["Nauru","nr","674"],["Nepal","np","977"],["Netherlands (Nederland)","nl","31"],["New Caledonia","nc","687"],["New Zealand","nz","64"],["Nicaragua","ni","505"],["Niger","ne","227"],["Nigeria","ng","234"],["Niue","nu","683"],["Norfolk Island","nf","672"],["North Korea","kp","850"],["Northern Mariana Islands","mp","1670"],["Norway (Norge)","no","47",0],["Oman","om","968"],["Pakistan","pk","92"],["Palau","pw","680"],["Palestine","ps","970"],["Panama","pa","507"],["Papua New Guinea","pg","675"],["Paraguay","py","595"],["Peru","pe","51"],["Philippines","ph","63"],["Poland","pl","48"],["Portugal","pt","351"],["Puerto Rico","pr","1",3,["787","939"]],["Qatar","qa","974"],["Reunion","re","262",0],["Romania","ro","40"],["Russia","ru","7",0],["Rwanda","rw","250"],["Saint Barthelemy","bl","590",1],["Saint Helena","sh","290"],["Saint Kitts and Nevis","kn","1869"],["Saint Lucia","lc","1758"],["Saint Martin","mf","590",2],["Saint Pierre and Miquelon","pm","508"],["Saint Vincent and the Grenadines","vc","1784"],["Samoa","ws","685"],["San Marino","sm","378"],["Sao Tome and Principe","st","239"],["Saudi Arabia","sa","966"],["Senegal","sn","221"],["Serbia","rs","381"],["Seychelles","sc","248"],["Sierra Leone","sl","232"],["Singapore","sg","65"],["Sint Maarten","sx","1721"],["Slovakia","sk","421"],["Slovenia","si","386"],["Solomon Islands","sb","677"],["Somalia","so","252"],["South Africa","za","27"],["South Korea","kr","82"],["South Sudan","ss","211"],["Spain","es","34"],["Sri Lanka","lk","94"],["Sudan","sd","249"],["Suriname","sr","597"],["Svalbard and Jan Mayen","sj","47",1],["Swaziland","sz","268"],["Sweden (Sverige)","se","46"],["Switzerland","ch","41"],["Syria","sy","963"],["Taiwan","tw","886"],["Tajikistan","tj","992"],["Tanzania","tz","255"],["Thailand","th","66"],["Timor-Leste","tl","670"],["Togo","tg","228"],["Tokelau","tk","690"],["Tonga","to","676"],["Trinidad and Tobago","tt","1868"],["Tunisia","tn","216"],["Turkey","tr","90"],["Turkmenistan","tm","993"],["Turks and Caicos Islands","tc","1649"],["Tuvalu","tv","688"],["U.S. Virgin Islands","vi","1340"],["Uganda","ug","256"],["Ukraine","ua","380"],["United Arab Emirates","ae","971"],["United Kingdom","gb","44",0],["United States","us","1",0],["Uruguay","uy","598"],["Uzbekistan","uz","998"],["Vanuatu","vu","678"],["Vatican City","va","39",1],["Venezuela","ve","58"],["Vietnam","vn","84"],["Wallis and Futuna","wf","681"],["Western Sahara","eh","212",1],["Yemen","ye","967"],["Zambia","zm","260"],["Zimbabwe","zw","263"],["Aland Islands","ax","358",1]],v=0;v<w.length;v++){var g=w[v];w[v]={name:g[0],iso2:g[1],dialCode:g[2],priority:g[3]||0,areaCodes:g[4]||null}}});var gmapdata=new Array,gmapmarker=new Array;function if_gmap_init(e,t){if(document.getElementById(e+"_element"+t)){map=document.getElementById(e+"_element"+t);var r=parseInt(map.getAttribute("zoom")),i=map.getAttribute("center_x"),n=map.getAttribute("center_y"),a=new google.maps.LatLng(n,i);return gmapdata[e]=new google.maps.Map(document.getElementById(e+"_element"+t),{center:a,zoom:r,mapTypeId:"roadmap"}),gmapmarker[e]=new Array,!1}draggab=!1,map=document.getElementById(e);r=parseInt(map.getAttribute("zoom")),i=map.getAttribute("long"),n=map.getAttribute("lat"),a=new google.maps.LatLng(n,i);return gmapdata=new google.maps.Map(document.getElementById(e),{center:a,zoom:r,mapTypeId:"roadmap"}),geocoder=new google.maps.Geocoder,(gmapmarker=new google.maps.Marker({map:gmapdata,position:a,draggable:draggab})).setDraggable(draggab),infoW=new google.maps.InfoWindow,google.maps.event.addListener(gmapdata,"mouseover",function(e){document.getElementById("longval")||(gmapmarker.draggable=!1)}),google.maps.event.addListener(gmapdata,"click",function(e){document.getElementById("longval")&&(document.getElementById("longval").value=e.latLng.lng().toFixed(6),document.getElementById("latval").value=e.latLng.lat().toFixed(6),gmapmarker.setPosition(e.latLng),if_gmap_updateMap(),geocoder.geocode({latLng:gmapmarker.getPosition()},function(e,t){t==google.maps.GeocoderStatus.OK&&e[0]&&document.getElementById("addrval")&&(document.getElementById("addrval").value=e[0].formatted_address)}))}),google.maps.event.addListener(gmapmarker,"drag",function(){document.getElementById("longval")&&(geocoder.geocode({latLng:gmapmarker.getPosition()},function(e,t){t==google.maps.GeocoderStatus.OK&&e[0]&&document.getElementById("addrval")&&(document.getElementById("addrval").value=e[0].formatted_address)}),if_gmap_updateMap(),document.getElementById("latval").value=gmapmarker.getPosition().lat().toFixed(6),document.getElementById("longval").value=gmapmarker.getPosition().lng().toFixed(6))}),google.maps.event.addListener(gmapmarker,"click",function(){infoW.setContent('<div style="overflow: hidden;">'+document.getElementById(e).getAttribute("info")+"</div>");infoW.setOptions({maxWidth:"300"}),infoW.open(this.getMap(),this)}),document.getElementById("longval")&&(document.getElementById("longval").value=i,document.getElementById("latval").value=n,geocoder.geocode({latLng:gmapmarker.getPosition()},function(e,t){t==google.maps.GeocoderStatus.OK&&e[0]&&document.getElementById("addrval")&&(document.getElementById("addrval").value=e[0].formatted_address)})),!1}function add_marker_on_map(e,t,r,i,n,a,o){var d=new google.maps.LatLng(i,r);return gmapmarker[e][t]=new google.maps.Marker({map:gmapdata[e],position:d,draggable:o}),gmapmarker[e][t].setDraggable(o),o&&google.maps.event.addListener(gmapmarker[e][t],"drag",function(){document.getElementById(e+"_lat"+a).value=gmapmarker[e][t].getPosition().lat().toFixed(6),document.getElementById(e+"_long"+a).value=gmapmarker[e][t].getPosition().lng().toFixed(6)}),infoW=new google.maps.InfoWindow,google.maps.event.addListener(gmapmarker[e][t],"click",function(){infoW.setContent('<div style="overflow: hidden;">'+document.getElementById(e+"_element"+a).getAttribute("info"+t)+"</div>");infoW.setOptions({maxWidth:"300"}),infoW.open(this.getMap(),this)}),!1}
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: webdorado,10web,wdsupport,formmakersupport
|
|
3 |
Tags: form, forms, form builder, contact form, feedback, custom form, contact, web contact form, captcha, email, form manager, survey
|
4 |
Requires at least: 4.6
|
5 |
Tested up to: 5.2
|
6 |
-
Stable tag: 1.13.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -562,8 +562,13 @@ Where **{{field_id}}** is the ID of the field you wish to prefill. Also, **{{par
|
|
562 |
|
563 |
== Changelog ==
|
564 |
|
|
|
|
|
|
|
|
|
|
|
565 |
= 1.13.16 =
|
566 |
-
*
|
567 |
|
568 |
= 1.13.15 =
|
569 |
* Added: Use AJAX to submit forms (optional).
|
3 |
Tags: form, forms, form builder, contact form, feedback, custom form, contact, web contact form, captcha, email, form manager, survey
|
4 |
Requires at least: 4.6
|
5 |
Tested up to: 5.2
|
6 |
+
Stable tag: 1.13.17
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
562 |
|
563 |
== Changelog ==
|
564 |
|
565 |
+
= 1.13.17 =
|
566 |
+
* Fixed: Spam protection.
|
567 |
+
* Fixed: Counting form views.
|
568 |
+
* Fixed: Error message on submitting form with existing username.
|
569 |
+
|
570 |
= 1.13.16 =
|
571 |
+
* Added: Webinar banner.
|
572 |
|
573 |
= 1.13.15 =
|
574 |
* Added: Use AJAX to submit forms (optional).
|