Contact Form by WD – responsive drag & drop contact form builder tool - Version 1.13.18

Version Description

  • Fixed: Conflict with common mod_security rules.
Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 Contact Form by WD – responsive drag & drop contact form builder tool
Version 1.13.18
Comparing to
See all releases

Code changes from version 1.13.12 to 1.13.18

admin/controllers/Blocked_ips_fm.php CHANGED
@@ -31,7 +31,6 @@ class FMControllerBlocked_ips_fmc extends CFMAdminController {
31
  public function execute() {
32
  $task = WDW_FM_Library(self::PLUGIN)->get('task');
33
  $id = (int) WDW_FM_Library(self::PLUGIN)->get('current_id', 0);
34
-
35
  if ( method_exists($this, $task) ) {
36
  check_admin_referer(WDFMInstance(self::PLUGIN)->nonce, WDFMInstance(self::PLUGIN)->nonce);
37
  $block_action = $this->bulk_action_name;
@@ -96,7 +95,6 @@ class FMControllerBlocked_ips_fmc extends CFMAdminController {
96
  }
97
  WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
98
  'page' => $this->page,
99
- 'task' => 'display',
100
  ($message === 2 ? 'message' : 'msg') => $message,
101
  ), admin_url('admin.php')));
102
  }
@@ -109,7 +107,6 @@ class FMControllerBlocked_ips_fmc extends CFMAdminController {
109
  $page = WDW_FM_Library(self::PLUGIN)->get('page');
110
 
111
  $ip = WDW_FM_Library(self::PLUGIN)->get('ip','');
112
-
113
  $insert = $this->model->insert_fm_blocked(array('ip' => $ip,), array('%s',));
114
  if( !$insert ){
115
  $message = 2;
31
  public function execute() {
32
  $task = WDW_FM_Library(self::PLUGIN)->get('task');
33
  $id = (int) WDW_FM_Library(self::PLUGIN)->get('current_id', 0);
 
34
  if ( method_exists($this, $task) ) {
35
  check_admin_referer(WDFMInstance(self::PLUGIN)->nonce, WDFMInstance(self::PLUGIN)->nonce);
36
  $block_action = $this->bulk_action_name;
95
  }
96
  WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
97
  'page' => $this->page,
 
98
  ($message === 2 ? 'message' : 'msg') => $message,
99
  ), admin_url('admin.php')));
100
  }
107
  $page = WDW_FM_Library(self::PLUGIN)->get('page');
108
 
109
  $ip = WDW_FM_Library(self::PLUGIN)->get('ip','');
 
110
  $insert = $this->model->insert_fm_blocked(array('ip' => $ip,), array('%s',));
111
  if( !$insert ){
112
  $message = 2;
admin/controllers/Manage_fm.php CHANGED
@@ -1189,10 +1189,16 @@ function after_submit() {
1189
  }";
1190
  $id = (int) WDW_FM_Library(self::PLUGIN)->get('current_id', 0);
1191
  $title = WDW_FM_Library(self::PLUGIN)->get('title', '');
 
1192
  $form_front = WDW_FM_Library(self::PLUGIN)->get('form_front', '', false);
 
 
1193
  $sortable = WDW_FM_Library(self::PLUGIN)->get('sortable', 0);
1194
  $counter = WDW_FM_Library(self::PLUGIN)->get('counter', 0);
 
1195
  $label_order = WDW_FM_Library(self::PLUGIN)->get('label_order', '');
 
 
1196
  $pagination = WDW_FM_Library(self::PLUGIN)->get('pagination', '');
1197
  $show_title = WDW_FM_Library(self::PLUGIN)->get('show_title', '');
1198
  $show_numbers = WDW_FM_Library(self::PLUGIN)->get('show_numbers', '');
@@ -1200,8 +1206,13 @@ function after_submit() {
1200
  $private_key = WDW_FM_Library(self::PLUGIN)->get('private_key', '');
1201
  $recaptcha_score = WDW_FM_Library(self::PLUGIN)->get('recaptcha_score', '');
1202
  $recaptcha_theme = WDW_FM_Library(self::PLUGIN)->get('recaptcha_theme', '');
 
1203
  $label_order_current = WDW_FM_Library(self::PLUGIN)->get('label_order_current', '');
 
 
1204
  $form_fields = WDW_FM_Library(self::PLUGIN)->get('form_fields', '', false);
 
 
1205
  $header_title = WDW_FM_Library(self::PLUGIN)->get('header_title', '');
1206
  $header_description = WDW_FM_Library(self::PLUGIN)->get('header_description', '', FALSE);
1207
  $header_image_url = WDW_FM_Library(self::PLUGIN)->get('header_image_url', '');
@@ -1267,13 +1278,13 @@ function after_submit() {
1267
  'savedb' => 1,
1268
  'sendemail' => 1,
1269
  'requiredmark' => '*',
1270
- 'from_mail' => '{adminemail}',
1271
  'from_name' => '',
1272
  'reply_to' => '',
1273
  'send_to' => '',
1274
  'autogen_layout' => 1,
1275
  'custom_front' => '',
1276
- 'mail_from_user' => '{adminemail}',
1277
  'mail_from_name_user' => '',
1278
  'reply_to_user' => '',
1279
  'condition' => '',
1189
  }";
1190
  $id = (int) WDW_FM_Library(self::PLUGIN)->get('current_id', 0);
1191
  $title = WDW_FM_Library(self::PLUGIN)->get('title', '');
1192
+
1193
  $form_front = WDW_FM_Library(self::PLUGIN)->get('form_front', '', false);
1194
+ $form_front = urldecode(base64_decode($form_front));
1195
+
1196
  $sortable = WDW_FM_Library(self::PLUGIN)->get('sortable', 0);
1197
  $counter = WDW_FM_Library(self::PLUGIN)->get('counter', 0);
1198
+
1199
  $label_order = WDW_FM_Library(self::PLUGIN)->get('label_order', '');
1200
+ $label_order = urldecode(base64_decode($label_order));
1201
+
1202
  $pagination = WDW_FM_Library(self::PLUGIN)->get('pagination', '');
1203
  $show_title = WDW_FM_Library(self::PLUGIN)->get('show_title', '');
1204
  $show_numbers = WDW_FM_Library(self::PLUGIN)->get('show_numbers', '');
1206
  $private_key = WDW_FM_Library(self::PLUGIN)->get('private_key', '');
1207
  $recaptcha_score = WDW_FM_Library(self::PLUGIN)->get('recaptcha_score', '');
1208
  $recaptcha_theme = WDW_FM_Library(self::PLUGIN)->get('recaptcha_theme', '');
1209
+
1210
  $label_order_current = WDW_FM_Library(self::PLUGIN)->get('label_order_current', '');
1211
+ $label_order_current = urldecode(base64_decode($label_order_current));
1212
+
1213
  $form_fields = WDW_FM_Library(self::PLUGIN)->get('form_fields', '', false);
1214
+ $form_fields = urldecode(base64_decode($form_fields));
1215
+
1216
  $header_title = WDW_FM_Library(self::PLUGIN)->get('header_title', '');
1217
  $header_description = WDW_FM_Library(self::PLUGIN)->get('header_description', '', FALSE);
1218
  $header_image_url = WDW_FM_Library(self::PLUGIN)->get('header_image_url', '');
1278
  'savedb' => 1,
1279
  'sendemail' => 1,
1280
  'requiredmark' => '*',
1281
+ 'from_mail' => '',
1282
  'from_name' => '',
1283
  'reply_to' => '',
1284
  'send_to' => '',
1285
  'autogen_layout' => 1,
1286
  'custom_front' => '',
1287
+ 'mail_from_user' => '',
1288
  'mail_from_name_user' => '',
1289
  'reply_to_user' => '',
1290
  'condition' => '',
admin/models/Manage_fm.php CHANGED
@@ -3566,7 +3566,7 @@ class FMModelManage_fmc extends CFMAdminModel {
3566
  $row->hide_mobile = 0;
3567
  $row->scrollbox_closing = 1;
3568
  $row->scrollbox_minimize = 1;
3569
- $row->scrollbox_minimize_text = '';
3570
  $row->display_on = 'home,post,page';
3571
  $row->posts_include = '';
3572
  $row->pages_include = '';
3566
  $row->hide_mobile = 0;
3567
  $row->scrollbox_closing = 1;
3568
  $row->scrollbox_minimize = 1;
3569
+ $row->scrollbox_minimize_text = 'The form is minimized';
3570
  $row->display_on = 'home,post,page';
3571
  $row->posts_include = '';
3572
  $row->pages_include = '';
admin/models/Options_fm.php CHANGED
@@ -8,8 +8,8 @@ class FMModelOptions_fmc extends CFMAdminModel {
8
  * Save data to DB.
9
  */
10
  public function save_db() {
11
- $option_key = WDFMInstance(self::PLUGIN)->handle_prefix . '_settings';
12
- $fm_settings = WDFMInstance(self::PLUGIN)->fm_settings;
13
  $public_key = WDW_FM_Library(self::PLUGIN)->get('public_key', '');
14
  $private_key = WDW_FM_Library(self::PLUGIN)->get('private_key', '');
15
  $recaptcha_score = WDW_FM_Library(self::PLUGIN)->get('recaptcha_score', '');
@@ -17,9 +17,11 @@ class FMModelOptions_fmc extends CFMAdminModel {
17
  $fm_shortcode = (isset($_POST['fm_shortcode']) ? "old" : '');
18
  $fm_advanced_layout = WDW_FM_Library(self::PLUGIN)->get('fm_advanced_layout', '0');
19
  $fm_enable_wp_editor = WDW_FM_Library(self::PLUGIN)->get('fm_enable_wp_editor', '1');
 
 
20
  $fm_developer_mode = WDW_FM_Library(self::PLUGIN)->get('fm_developer_mode', '0');
21
  $map_key = WDW_FM_Library(self::PLUGIN)->get('map_key', '');
22
- update_option( $option_key, array(
23
  'public_key' => $public_key,
24
  'private_key' => $private_key,
25
  'recaptcha_score' => $recaptcha_score,
@@ -28,9 +30,13 @@ class FMModelOptions_fmc extends CFMAdminModel {
28
  'fm_shortcode' => $fm_shortcode,
29
  'fm_advanced_layout' => $fm_advanced_layout,
30
  'fm_enable_wp_editor' => $fm_enable_wp_editor,
 
 
31
  'fm_developer_mode' => $fm_developer_mode,
32
  'ajax_export_per_page' => !empty($fm_settings['ajax_export_per_page']) ? $fm_settings['ajax_export_per_page'] : 1000
33
  ));
 
34
  return 8;
35
  }
36
  }
 
8
  * Save data to DB.
9
  */
10
  public function save_db() {
11
+ $option_key = WDFMInstance(self::PLUGIN)->handle_prefix . '_settings';
12
+ $fm_settings = WDFMInstance(self::PLUGIN)->fm_settings;
13
  $public_key = WDW_FM_Library(self::PLUGIN)->get('public_key', '');
14
  $private_key = WDW_FM_Library(self::PLUGIN)->get('private_key', '');
15
  $recaptcha_score = WDW_FM_Library(self::PLUGIN)->get('recaptcha_score', '');
17
  $fm_shortcode = (isset($_POST['fm_shortcode']) ? "old" : '');
18
  $fm_advanced_layout = WDW_FM_Library(self::PLUGIN)->get('fm_advanced_layout', '0');
19
  $fm_enable_wp_editor = WDW_FM_Library(self::PLUGIN)->get('fm_enable_wp_editor', '1');
20
+ $fm_antispam = WDW_FM_Library(self::PLUGIN)->get('fm_antispam', '0');
21
+ $fm_ajax_submit = WDW_FM_Library(self::PLUGIN)->get('fm_ajax_submit', '0');
22
  $fm_developer_mode = WDW_FM_Library(self::PLUGIN)->get('fm_developer_mode', '0');
23
  $map_key = WDW_FM_Library(self::PLUGIN)->get('map_key', '');
24
+ update_option( $option_key, array(
25
  'public_key' => $public_key,
26
  'private_key' => $private_key,
27
  'recaptcha_score' => $recaptcha_score,
30
  'fm_shortcode' => $fm_shortcode,
31
  'fm_advanced_layout' => $fm_advanced_layout,
32
  'fm_enable_wp_editor' => $fm_enable_wp_editor,
33
+ 'fm_antispam' => $fm_antispam,
34
+ 'fm_ajax_submit' => $fm_ajax_submit,
35
  'fm_developer_mode' => $fm_developer_mode,
36
  'ajax_export_per_page' => !empty($fm_settings['ajax_export_per_page']) ? $fm_settings['ajax_export_per_page'] : 1000
37
  ));
38
+
39
  return 8;
40
  }
41
  }
42
+
admin/models/Uninstall_fm.php CHANGED
@@ -40,6 +40,8 @@ class FMModelUninstall_fmc extends CFMAdminModel {
40
  delete_option('fmc_settings');
41
  delete_option('fm_subscribe_done');
42
  delete_option('cfm_subscribe_done');
 
 
43
  delete_option('tenweb_notice_status');
44
  delete_option('wd_bk_notice_status');
45
  wp_delete_post($email_verification_post_id);
40
  delete_option('fmc_settings');
41
  delete_option('fm_subscribe_done');
42
  delete_option('cfm_subscribe_done');
43
+ delete_option('fm_subscribe_popup');
44
+ delete_option('cfm_subscribe_popup');
45
  delete_option('tenweb_notice_status');
46
  delete_option('wd_bk_notice_status');
47
  wp_delete_post($email_verification_post_id);
admin/views/Manage_fm.php CHANGED
@@ -362,13 +362,13 @@ class FMViewManage_fmc extends FMAdminView_fmc {
362
  quicktags({id : cur_id});
363
  });
364
  },
365
- /*create: function( event, ui ) {
366
- jQuery( '.fm-topbar-links-container > a' ).attr( 'href','https://help.10web.io/hc/en-us/articles/'+ ui.tab.data( 'help-url' ) );
367
  },
368
  activate: function( event, ui ) {
369
  jQuery('#fm_tab_active').val(ui.newTab.index());
370
- jQuery( '.fm-topbar-links-container > a' ).attr( 'href','https://help.10web.io/hc/en-us/articles/'+ ui.newTab.data( 'help-url' ) );
371
- },*/
372
  beforeActivate: function( event, ui ) {
373
  if (ui.newTab.index() != 0) {
374
  jQuery('.button_revisions').addClass('fm-hide');
362
  quicktags({id : cur_id});
363
  });
364
  },
365
+ create: function( event, ui ) {
366
+ jQuery( '.fm-topbar-links-container > a:first-child' ).attr( 'href','https://help.10web.io/hc/en-us/articles/'+ ui.tab.data( 'help-url' ) + '?utm_source=form_maker&utm_medium=free_plugin' );
367
  },
368
  activate: function( event, ui ) {
369
  jQuery('#fm_tab_active').val(ui.newTab.index());
370
+ jQuery( '.fm-topbar-links-container > a:first-child' ).attr( 'href','https://help.10web.io/hc/en-us/articles/'+ ui.newTab.data( 'help-url' ) + '?utm_source=form_maker&utm_medium=free_plugin' );
371
+ },
372
  beforeActivate: function( event, ui ) {
373
  if (ui.newTab.index() != 0) {
374
  jQuery('.button_revisions').addClass('fm-hide');
admin/views/Options_fm.php CHANGED
@@ -62,7 +62,9 @@ class FMViewOptions_fmc extends FMAdminView_fmc {
62
  $csv_delimiter = isset($fm_settings['csv_delimiter']) ? $fm_settings['csv_delimiter'] : ',';
63
  $fm_advanced_layout = isset($fm_settings['fm_advanced_layout']) && $fm_settings['fm_advanced_layout'] == '1' ? '1' : '0';
64
  $fm_enable_wp_editor = !isset($fm_settings['fm_enable_wp_editor']) ? '1' : $fm_settings['fm_enable_wp_editor'];
 
65
  $fm_developer_mode = !isset($fm_settings['fm_developer_mode']) ? '0' : $fm_settings['fm_developer_mode'];
 
66
 
67
  $map_key = isset($fm_settings['map_key']) ? $fm_settings['map_key'] : '';
68
  $uninstall_href = add_query_arg( array( 'page' => 'uninstall' . WDFMInstance(self::PLUGIN)->menu_postfix), admin_url('admin.php') );
@@ -141,13 +143,29 @@ class FMViewOptions_fmc extends FMAdminView_fmc {
141
  <label class="wd-label-radio" for="fm_enable_wp_editor-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
142
  <p class="description"><?php _e('Form Header Description text and Layout fields boxes of Form Maker will use TinyMCE editor, in case this setting is enabled.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
143
  </span>
144
- <span class="wd-group">
 
 
 
 
 
 
 
 
145
  <label class="wd-label"><?php _e('Developer mode', WDFMInstance(self::PLUGIN)->prefix); ?></label>
146
  <input <?php echo checked($fm_developer_mode, '1'); ?> id="fm_developer_mode-1" class="wd-radio" value="1" name="fm_developer_mode" type="radio"/>
147
  <label class="wd-label-radio" for="fm_developer_mode-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
148
  <input <?php echo checked($fm_developer_mode, '0'); ?> id="fm_developer_mode-0" class="wd-radio" value="0" name="fm_developer_mode" type="radio"/>
149
  <label class="wd-label-radio" for="fm_developer_mode-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
150
- <p class="description"><?php _e('', WDFMInstance(self::PLUGIN)->prefix); ?></p>
 
 
 
 
 
 
 
 
151
  </span>
152
  <span class="wd-group">
153
  <label class="wd-label"><?php echo sprintf(__('Uninstall %s', WDFMInstance(self::PLUGIN)->prefix), WDFMInstance(self::PLUGIN)->nicename); ?></label>
62
  $csv_delimiter = isset($fm_settings['csv_delimiter']) ? $fm_settings['csv_delimiter'] : ',';
63
  $fm_advanced_layout = isset($fm_settings['fm_advanced_layout']) && $fm_settings['fm_advanced_layout'] == '1' ? '1' : '0';
64
  $fm_enable_wp_editor = !isset($fm_settings['fm_enable_wp_editor']) ? '1' : $fm_settings['fm_enable_wp_editor'];
65
+ $fm_ajax_submit = !isset($fm_settings['fm_ajax_submit']) ? '0' : $fm_settings['fm_ajax_submit'];
66
  $fm_developer_mode = !isset($fm_settings['fm_developer_mode']) ? '0' : $fm_settings['fm_developer_mode'];
67
+ $fm_antispam = !isset($fm_settings['fm_antispam']) ? '0' : $fm_settings['fm_antispam'];
68
 
69
  $map_key = isset($fm_settings['map_key']) ? $fm_settings['map_key'] : '';
70
  $uninstall_href = add_query_arg( array( 'page' => 'uninstall' . WDFMInstance(self::PLUGIN)->menu_postfix), admin_url('admin.php') );
143
  <label class="wd-label-radio" for="fm_enable_wp_editor-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
144
  <p class="description"><?php _e('Form Header Description text and Layout fields boxes of Form Maker will use TinyMCE editor, in case this setting is enabled.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
145
  </span>
146
+ <span class="wd-group">
147
+ <label class="wd-label"><?php _e('Antispam', WDFMInstance(self::PLUGIN)->prefix); ?></label>
148
+ <input <?php echo checked($fm_antispam, '1'); ?> id="fm_antispam-1" class="wd-radio" value="1" name="fm_antispam" type="radio"/>
149
+ <label class="wd-label-radio" for="fm_antispam-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
150
+ <input <?php echo checked($fm_antispam, '0'); ?> id="fm_antispam-0" class="wd-radio" value="0" name="fm_antispam" type="radio"/>
151
+ <label class="wd-label-radio" for="fm_antispam-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
152
+ <p class="description"><?php _e('Enable antispam to protect your forms from junk submissions.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
153
+ </span>
154
+ <span class="wd-group">
155
  <label class="wd-label"><?php _e('Developer mode', WDFMInstance(self::PLUGIN)->prefix); ?></label>
156
  <input <?php echo checked($fm_developer_mode, '1'); ?> id="fm_developer_mode-1" class="wd-radio" value="1" name="fm_developer_mode" type="radio"/>
157
  <label class="wd-label-radio" for="fm_developer_mode-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
158
  <input <?php echo checked($fm_developer_mode, '0'); ?> id="fm_developer_mode-0" class="wd-radio" value="0" name="fm_developer_mode" type="radio"/>
159
  <label class="wd-label-radio" for="fm_developer_mode-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
160
+ <p class="description"><?php _e('Do not use minified JS and CSS files. Enable this option if You need to debug JS or CSS issues.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
161
+ </span>
162
+ <span class="wd-group">
163
+ <label class="wd-label"><?php _e('Ajax submit', WDFMInstance(self::PLUGIN)->prefix); ?></label>
164
+ <input <?php echo checked($fm_ajax_submit, '1'); ?> id="fm_ajax_submit-1" class="wd-radio" value="1" name="fm_ajax_submit" type="radio"/>
165
+ <label class="wd-label-radio" for="fm_ajax_submit-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
166
+ <input <?php echo checked($fm_ajax_submit, '0'); ?> id="fm_ajax_submit-0" class="wd-radio" value="0" name="fm_ajax_submit" type="radio"/>
167
+ <label class="wd-label-radio" for="fm_ajax_submit-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
168
+ <p class="description"><?php _e('Enable AJAX submit to submit forms without reloading the page.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
169
  </span>
170
  <span class="wd-group">
171
  <label class="wd-label"><?php echo sprintf(__('Uninstall %s', WDFMInstance(self::PLUGIN)->prefix), WDFMInstance(self::PLUGIN)->nicename); ?></label>
contact-form-maker.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Contact Form Maker
4
  * Plugin URI: https://web-dorado.com/products/form-maker-wordpress.html
5
  * Description: WordPress Contact Form Maker is a simple contact form builder, which allows the user with almost no knowledge of programming to create and edit different type of contact forms.
6
- * Version: 1.13.12
7
  * Author: WebDorado Form Builder Team
8
  * Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -53,6 +53,7 @@ final class WDCFM {
53
  * Plugin menu slug.
54
  */
55
  public $prefix = '';
 
56
  public $css_prefix = '';
57
  public $js_prefix = '';
58
 
@@ -97,8 +98,8 @@ final class WDCFM {
97
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
98
  $this->front_urls = $this->get_front_urls();
99
  $this->main_file = plugin_basename(__FILE__);
100
- $this->plugin_version = '1.13.12';
101
- $this->db_version = '2.13.12';
102
  $this->menu_postfix = ($this->is_free == 2 ? '_fmc' : '_fm');
103
  $this->plugin_postfix = ($this->is_free == 2 ? '_fmc' : '');
104
  $this->menu_slug = 'manage' . $this->menu_postfix;
@@ -109,7 +110,13 @@ final class WDCFM {
109
  $this->nicename = ($this->is_free == 2 ? __('Contact Form', $this->prefix) : __('Form Maker', $this->prefix));
110
  $this->slug = ($this->is_free == 2 ? 'contact-form-maker' : 'form-maker');
111
  $this->fm_settings = get_option( $this->handle_prefix . '_settings' );
112
- if ( empty($this->fm_settings['fm_developer_mode']) ) {
 
 
 
 
 
 
113
  $this->fm_settings['fm_developer_mode'] = 0;
114
  }
115
  }
@@ -162,7 +169,8 @@ final class WDCFM {
162
  }
163
  add_action('wp_ajax_fmc_reload_input', array($this, 'form_maker_ajax_frontend'));
164
  add_action('wp_ajax_nopriv_fmc_reload_input', array($this, 'form_maker_ajax_frontend'));
165
-
 
166
  // Add media button to WP editor.
167
  add_action('wp_ajax_FMShortocde' . $this->plugin_postfix, array($this, 'form_maker_ajax'));
168
  add_filter('media_buttons_context', array($this, 'media_button'));
@@ -240,7 +248,7 @@ final class WDCFM {
240
  }
241
 
242
  public function enqueue_editor_styles() {
243
- wp_enqueue_style($this->handle_prefix . '-icons', $this->plugin_url . '/fonts/style.css', array(), '1.0.0');
244
  }
245
 
246
  public function enqueue_elementor_widget_scripts(){
@@ -710,7 +718,7 @@ final class WDCFM {
710
  ));
711
  }
712
  wp_register_style($this->handle_prefix . '-topbar', $this->plugin_url . '/css/topbar.css', array(), $this->plugin_version);
713
- wp_register_style($this->handle_prefix . '-icons', $this->plugin_url . '/fonts/style.css', array(), '1.0.0');
714
 
715
  wp_localize_script($localize_key_all, 'fm_ajax', array(
716
  'ajaxnonce' => wp_create_nonce('fm_ajax_nonce'),
@@ -829,7 +837,6 @@ final class WDCFM {
829
  if ( wp_verify_nonce($ajax_nonce , 'fm_ajax_nonce') == FALSE ) {
830
  die(-1);
831
  }
832
-
833
  if ( !empty($page) && in_array($page, $allowed_pages)
834
  && !empty($action) && in_array($action, $allowed_actions) ) {
835
  $this->register_frontend_ajax_scripts();
@@ -1036,7 +1043,9 @@ final class WDCFM {
1036
  wp_register_style($this->handle_prefix . '-googlefonts', 'https://fonts.googleapis.com/css?family=' . $fonts . '&subset=greek,latin,greek-ext,vietnamese,cyrillic-ext,latin-ext,cyrillic', null, null);
1037
 
1038
  wp_register_script($this->handle_prefix . '-g-recaptcha', 'https://www.google.com/recaptcha/api.js?onload=fmRecaptchaInit&render=explicit');
1039
- wp_register_script($this->handle_prefix . '-g-recaptcha-v3', 'https://www.google.com/recaptcha/api.js?onload=fmRecaptchaInit&render=' . $fm_settings['public_key']);
 
 
1040
  // Register admin styles to use in frontend submissions.
1041
  wp_register_script('gmap_form_back', $front_plugin_url . '/js/if_gmap_back_end.js', array(), $this->plugin_version);
1042
 
@@ -1225,12 +1234,16 @@ final class WDCFM {
1225
  $recaptcha_keys = $wpdb->get_row('SELECT `public_key`, `private_key` FROM ' . $wpdb->prefix . 'formmaker WHERE public_key!="" and private_key!=""', ARRAY_A);
1226
  $public_key = isset($recaptcha_keys['public_key']) ? $recaptcha_keys['public_key'] : '';
1227
  $private_key = isset($recaptcha_keys['private_key']) ? $recaptcha_keys['private_key'] : '';
1228
- add_option($option_key, array('public_key' => $public_key, 'private_key' => $private_key, 'csv_delimiter' => ',', 'map_key' => '', 'fm_advanced_layout' => 0, 'fm_enable_wp_editor' => 1, 'fm_developer_mode' => 0, 'ajax_export_per_page' => 1000));
1229
  }
1230
  elseif ( !isset($fm_settings['fm_enable_wp_editor']) ) {
1231
  $fm_settings['fm_enable_wp_editor'] = 1;
1232
  update_option( $option_key, $fm_settings );
1233
  }
 
 
 
 
1234
  if ( !isset($fm_settings['fm_developer_mode']) ) {
1235
  $fm_settings['fm_developer_mode'] = 0;
1236
  update_option( $option_key, $fm_settings );
3
  * Plugin Name: Contact Form Maker
4
  * Plugin URI: https://web-dorado.com/products/form-maker-wordpress.html
5
  * Description: WordPress Contact Form Maker is a simple contact form builder, which allows the user with almost no knowledge of programming to create and edit different type of contact forms.
6
+ * Version: 1.13.18
7
  * Author: WebDorado Form Builder Team
8
  * Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
53
  * Plugin menu slug.
54
  */
55
  public $prefix = '';
56
+ public $handle_prefix = '';
57
  public $css_prefix = '';
58
  public $js_prefix = '';
59
 
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.18';
102
+ $this->db_version = '2.13.18';
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;
110
  $this->nicename = ($this->is_free == 2 ? __('Contact Form', $this->prefix) : __('Form Maker', $this->prefix));
111
  $this->slug = ($this->is_free == 2 ? 'contact-form-maker' : 'form-maker');
112
  $this->fm_settings = get_option( $this->handle_prefix . '_settings' );
113
+ if ( empty($this->fm_settings['fm_advanced_layout']) ) {
114
+ $this->fm_settings['fm_advanced_layout'] = 0;
115
+ }
116
+ if ( empty($this->fm_settings['fm_antispam']) ) {
117
+ $this->fm_settings['fm_antispam'] = 0;
118
+ }
119
+ if ( empty($this->fm_settings['fm_developer_mode']) ) {
120
  $this->fm_settings['fm_developer_mode'] = 0;
121
  }
122
  }
169
  }
170
  add_action('wp_ajax_fmc_reload_input', array($this, 'form_maker_ajax_frontend'));
171
  add_action('wp_ajax_nopriv_fmc_reload_input', array($this, 'form_maker_ajax_frontend'));
172
+ add_action('wp_ajax_fmc_submit_form', array($this, 'FM_front_end_main')); //Show statistics
173
+ add_action( 'wp_ajax_nopriv_fmc_submit_form', array($this, 'FM_front_end_main') );
174
  // Add media button to WP editor.
175
  add_action('wp_ajax_FMShortocde' . $this->plugin_postfix, array($this, 'form_maker_ajax'));
176
  add_filter('media_buttons_context', array($this, 'media_button'));
248
  }
249
 
250
  public function enqueue_editor_styles() {
251
+ wp_enqueue_style($this->handle_prefix . '-icons', $this->plugin_url . '/css/fonts.css', array(), '1.0.1');
252
  }
253
 
254
  public function enqueue_elementor_widget_scripts(){
718
  ));
719
  }
720
  wp_register_style($this->handle_prefix . '-topbar', $this->plugin_url . '/css/topbar.css', array(), $this->plugin_version);
721
+ wp_register_style($this->handle_prefix . '-icons', $this->plugin_url . '/css/fonts.css', array(), '1.0.1');
722
 
723
  wp_localize_script($localize_key_all, 'fm_ajax', array(
724
  'ajaxnonce' => wp_create_nonce('fm_ajax_nonce'),
837
  if ( wp_verify_nonce($ajax_nonce , 'fm_ajax_nonce') == FALSE ) {
838
  die(-1);
839
  }
 
840
  if ( !empty($page) && in_array($page, $allowed_pages)
841
  && !empty($action) && in_array($action, $allowed_actions) ) {
842
  $this->register_frontend_ajax_scripts();
1043
  wp_register_style($this->handle_prefix . '-googlefonts', 'https://fonts.googleapis.com/css?family=' . $fonts . '&subset=greek,latin,greek-ext,vietnamese,cyrillic-ext,latin-ext,cyrillic', null, null);
1044
 
1045
  wp_register_script($this->handle_prefix . '-g-recaptcha', 'https://www.google.com/recaptcha/api.js?onload=fmRecaptchaInit&render=explicit');
1046
+ if ( isset($fm_settings['public_key']) ) {
1047
+ wp_register_script($this->handle_prefix . '-g-recaptcha-v3', 'https://www.google.com/recaptcha/api.js?onload=fmRecaptchaInit&render=' . $fm_settings['public_key']);
1048
+ }
1049
  // Register admin styles to use in frontend submissions.
1050
  wp_register_script('gmap_form_back', $front_plugin_url . '/js/if_gmap_back_end.js', array(), $this->plugin_version);
1051
 
1234
  $recaptcha_keys = $wpdb->get_row('SELECT `public_key`, `private_key` FROM ' . $wpdb->prefix . 'formmaker WHERE public_key!="" and private_key!=""', ARRAY_A);
1235
  $public_key = isset($recaptcha_keys['public_key']) ? $recaptcha_keys['public_key'] : '';
1236
  $private_key = isset($recaptcha_keys['private_key']) ? $recaptcha_keys['private_key'] : '';
1237
+ add_option($option_key, array('public_key' => $public_key, 'private_key' => $private_key, 'csv_delimiter' => ',', 'map_key' => '', 'fm_advanced_layout' => 0, 'fm_enable_wp_editor' => 1, 'fm_antispam' => 0, 'fm_developer_mode' => 0, 'ajax_export_per_page' => 1000));
1238
  }
1239
  elseif ( !isset($fm_settings['fm_enable_wp_editor']) ) {
1240
  $fm_settings['fm_enable_wp_editor'] = 1;
1241
  update_option( $option_key, $fm_settings );
1242
  }
1243
+ if ( !isset($fm_settings['fm_antispam']) ) {
1244
+ $fm_settings['fm_antispam'] = 0;
1245
+ update_option( $option_key, $fm_settings );
1246
+ }
1247
  if ( !isset($fm_settings['fm_developer_mode']) ) {
1248
  $fm_settings['fm_developer_mode'] = 0;
1249
  update_option( $option_key, $fm_settings );
fonts/style.css → css/fonts.css RENAMED
@@ -1,9 +1,9 @@
1
  @font-face {
2
  font-family: 'fm-icons';
3
  src:
4
- url('fonts/fm-icons.ttf?cj1n1r') format('truetype'),
5
- url('fonts/fm-icons.woff?cj1n1r') format('woff'),
6
- url('fonts/fm-icons.svg?cj1n1r#fm-icons') format('svg');
7
  font-weight: normal;
8
  font-style: normal;
9
  }
@@ -54,3 +54,6 @@
54
  .fm-ico-close:before {
55
  content: "\e909";
56
  }
 
 
 
1
  @font-face {
2
  font-family: 'fm-icons';
3
  src:
4
+ url('fonts/fm-icons.ttf?wjdy97') format('truetype'),
5
+ url('fonts/fm-icons.woff?wjdy97') format('woff'),
6
+ url('fonts/fm-icons.svg?wjdy97#fm-icons') format('svg');
7
  font-weight: normal;
8
  font-style: normal;
9
  }
54
  .fm-ico-close:before {
55
  content: "\e909";
56
  }
57
+ .fm-ico-spinner:before {
58
+ content: "\e90a";
59
+ }
{fonts → css}/fonts/fm-icons.svg RENAMED
@@ -17,4 +17,5 @@
17
  <glyph unicode="&#xe907;" glyph-name="delete" d="M1007.37 138.752l-309.33 309.248 309.248 309.248c10.195 10.232 16.497 24.348 16.497 39.936s-6.303 29.704-16.499 39.938l-106.412 106.33c-10.214 10.234-24.336 16.565-39.936 16.565s-29.722-6.331-39.935-16.564l-309.249-309.249-309.166 309.248c-10.214 10.234-24.336 16.565-39.936 16.565s-29.722-6.331-39.935-16.564l-106.251-106.333c-10.195-10.232-16.497-24.348-16.497-39.936s6.303-29.704 16.499-39.938l309.144-309.246-309.146-309.248c-10.195-10.232-16.497-24.348-16.497-39.936s6.303-29.704 16.499-39.938l106.392-106.494c10.232-10.195 24.348-16.497 39.936-16.497s29.704 6.303 39.938 16.499l309.246 309.246 309.248-309.248c10.232-10.195 24.348-16.497 39.936-16.497s29.704 6.303 39.938 16.499l106.494 106.494c10.147 10.212 16.419 24.285 16.419 39.823 0 15.65-6.363 29.814-16.642 40.047l-0.002 0.002z" />
18
  <glyph unicode="&#xe908;" glyph-name="form-maker" horiz-adv-x="1234" d="M77.847-64c-0.041 0-0.091 0-0.14 0-42.917 0-77.708 34.791-77.708 77.708 0 0.049 0 0.098 0 0.147v-0.008 868.305c0 0.041 0 0.091 0 0.14 0 42.917 34.791 77.708 77.708 77.708 0.049 0 0.098 0 0.147 0h1077.892c0.048 0 0.106 0 0.163 0 42.904 0 77.684-34.78 77.684-77.684 0-0.057 0-0.115 0-0.172v0.009-868.305c0-0.048 0-0.106 0-0.163 0-42.904-34.78-77.684-77.684-77.684-0.057 0-0.115 0-0.172 0h0.009zM35.933 882.153v-868.305c0-0.069-0.001-0.151-0.001-0.233 0-23.007 18.651-41.658 41.658-41.658 0.082 0 0.164 0 0.246 0.001h1077.91c0.069 0 0.151-0.001 0.233-0.001 23.007 0 41.658 18.651 41.658 41.658 0 0.082 0 0.164-0.001 0.246v-0.013 868.305c0 0.069 0.001 0.151 0.001 0.233 0 23.007-18.651 41.658-41.658 41.658-0.082 0-0.164 0-0.246-0.001h-1077.887c-0.076 0.001-0.166 0.001-0.257 0.001-23.007 0-41.658-18.651-41.658-41.658 0-0.082 0-0.164 0.001-0.246v0.013zM145.524 57.553c-0.092-0.002-0.199-0.003-0.308-0.003-9.756 0-17.664 7.908-17.664 17.664 0 0.148 0.002 0.296 0.005 0.443v-0.022 216.669c-0.002 0.098-0.003 0.213-0.003 0.329 0 9.743 7.898 17.641 17.641 17.641 0.116 0 0.231-0.001 0.346-0.003h947.928c0.098 0.002 0.213 0.003 0.329 0.003 9.743 0 17.641-7.898 17.641-17.641 0-0.116-0.001-0.231-0.003-0.346v0.017-216.669c-0.026-9.912-8.055-17.94-17.964-17.967h-0.003zM163.491 93.487h912.012v180.852h-912.012zM145.524 370.153c-0.098-0.002-0.213-0.003-0.329-0.003-9.743 0-17.641 7.898-17.641 17.641 0 0.116 0.001 0.231 0.003 0.346v-0.017 91.020c-0.002 0.091-0.003 0.198-0.003 0.305 0 9.756 7.908 17.664 17.664 17.664 0.107 0 0.214-0.001 0.321-0.003h947.929c0.098 0.002 0.213 0.003 0.329 0.003 9.743 0 17.641-7.898 17.641-17.641 0-0.116-0.001-0.231-0.003-0.346v0.017-91.020c-0.026-9.912-8.055-17.94-17.964-17.967h-0.003zM163.491 406.109h912.012v55.063h-912.012zM842.473 557.591c-0.098-0.002-0.213-0.003-0.329-0.003-9.743 0-17.641 7.898-17.641 17.641 0 0.116 0.001 0.231 0.003 0.346v-0.017 89.204c-0.002 0.098-0.003 0.213-0.003 0.329 0 9.743 7.898 17.641 17.641 17.641 0.116 0 0.231-0.001 0.346-0.003h251.584c0.098 0.002 0.213 0.003 0.329 0.003 9.743 0 17.641-7.898 17.641-17.641 0-0.116-0.001-0.231-0.003-0.346v0.017-89.204c-0.040-9.907-8.060-17.927-17.963-17.967h-0.004zM859.834 593.524h215.575v53.295h-215.482zM522.775 557.591c-0.098-0.002-0.213-0.003-0.329-0.003-9.743 0-17.641 7.898-17.641 17.641 0 0.116 0.001 0.231 0.003 0.346v-0.017 89.204c-0.002 0.098-0.003 0.213-0.003 0.329 0 9.743 7.898 17.641 17.641 17.641 0.116 0 0.231-0.001 0.346-0.003h251.491c0.098 0.002 0.213 0.003 0.329 0.003 9.743 0 17.641-7.898 17.641-17.641 0-0.116-0.001-0.231-0.003-0.346v0.017-89.204c-0.040-9.907-8.060-17.927-17.963-17.967h-0.004zM540.137 593.524h215.575v53.295h-215.575zM145.524 557.591c-0.098-0.002-0.213-0.003-0.329-0.003-9.743 0-17.641 7.898-17.641 17.641 0 0.116 0.001 0.231 0.003 0.346v-0.017 244.317c-0.002 0.098-0.003 0.213-0.003 0.329 0 9.743 7.898 17.641 17.641 17.641 0.116 0 0.231-0.001 0.346-0.003h251.491c0.098 0.002 0.213 0.003 0.329 0.003 9.743 0 17.641-7.898 17.641-17.641 0-0.116-0.001-0.231-0.003-0.346v0.017-244.364c-0.040-9.907-8.060-17.927-17.963-17.967h-0.004zM163.491 593.524h215.575v208.384h-215.575zM842.473 713.309c-0.098-0.002-0.213-0.003-0.329-0.003-9.743 0-17.641 7.898-17.641 17.641 0 0.116 0.001 0.231 0.003 0.346v-0.017 89.088c-0.002 0.098-0.003 0.213-0.003 0.329 0 9.743 7.898 17.641 17.641 17.641 0.116 0 0.231-0.001 0.346-0.003h251.584c0.098 0.002 0.213 0.003 0.329 0.003 9.743 0 17.641-7.898 17.641-17.641 0-0.116-0.001-0.231-0.003-0.346v0.017-89.111c-0.026-9.912-8.055-17.94-17.964-17.967h-0.003zM859.834 749.242h215.575v53.271h-215.482zM522.775 713.309c-0.098-0.002-0.213-0.003-0.329-0.003-9.743 0-17.641 7.898-17.641 17.641 0 0.116 0.001 0.231 0.003 0.346v-0.017 89.088c-0.002 0.098-0.003 0.213-0.003 0.329 0 9.743 7.898 17.641 17.641 17.641 0.116 0 0.231-0.001 0.346-0.003h251.491c0.098 0.002 0.213 0.003 0.328 0.003 9.756 0 17.664-7.908 17.664-17.664 0-0.107-0.001-0.215-0.003-0.322v0.016-89.111c-0.026-9.912-8.055-17.94-17.964-17.967h-0.003zM540.137 749.242h215.575v53.271h-215.575z" />
19
  <glyph unicode="&#xe909;" glyph-name="close" d="M572.191 447.468l110.387 110.387c8.094 8.092 13.101 19.272 13.101 31.621 0 24.694-20.018 44.712-44.712 44.712-12.344 0-23.52-5.002-31.611-13.091l-110.387-110.408-110.408 110.408c-8.091 8.088-19.267 13.091-31.611 13.091-24.694 0-44.712-20.018-44.712-44.712 0-12.349 5.007-23.529 13.101-31.621l110.387-110.387-110.387-110.387c-8.112-8.099-13.13-19.295-13.13-31.662 0-24.71 20.031-44.741 44.741-44.741 12.342 0 23.517 4.997 31.611 13.079l110.386 110.386 110.387-110.387c8.104-8.109 19.302-13.125 31.672-13.125 24.73 0 44.777 20.047 44.777 44.777 0 12.36-5.008 23.55-13.105 31.652v0zM512-64c-0.032 0-0.069 0-0.107 0-36.485 0-72.085 3.788-106.429 10.993l3.357-0.589c-69.46 14.522-130.869 41.294-184.82 78.175l1.749-1.129c-81.681 55.669-145.4 132.172-184.227 221.953l-1.281 3.327c-11.933 27.285-22.224 59.427-29.253 92.77l-0.586 3.323c-6.615 31.021-10.402 66.663-10.402 103.188s3.788 72.167 10.992 106.552l-0.59-3.364c14.522 69.46 41.294 130.869 78.175 184.82l-1.129-1.749c55.669 81.681 132.172 145.4 221.953 184.227l3.327 1.281c27.286 11.927 59.428 22.211 92.771 29.233l3.321 0.585c31.021 6.615 66.663 10.402 103.188 10.402s72.167-3.788 106.552-10.992l-3.364 0.59c69.46-14.522 130.869-41.294 184.82-78.175l-1.749 1.129c81.681-55.669 145.4-132.172 184.227-221.953l1.281-3.327c11.934-27.292 22.225-59.44 29.254-92.791l0.586-3.322c6.615-31.021 10.402-66.663 10.402-103.188s-3.788-72.167-10.992-106.552l0.59 3.364c-14.522-69.46-41.294-130.869-78.175-184.82l1.129 1.749c-55.669-81.681-132.172-145.4-221.953-184.227l-3.327-1.281c-27.292-11.934-59.44-22.225-92.791-29.254l-3.322-0.586c-30.926-6.59-66.458-10.363-102.871-10.363-0.108 0-0.216 0-0.324 0h0.016zM512 881.234c-239.268 0-433.234-193.965-433.234-433.234s193.965-433.234 433.234-433.234c239.268 0 433.234 193.965 433.234 433.234v0c-0.28 239.156-194.078 432.954-433.207 433.234h-0.027z" />
 
20
  </font></defs></svg>
17
  <glyph unicode="&#xe907;" glyph-name="delete" d="M1007.37 138.752l-309.33 309.248 309.248 309.248c10.195 10.232 16.497 24.348 16.497 39.936s-6.303 29.704-16.499 39.938l-106.412 106.33c-10.214 10.234-24.336 16.565-39.936 16.565s-29.722-6.331-39.935-16.564l-309.249-309.249-309.166 309.248c-10.214 10.234-24.336 16.565-39.936 16.565s-29.722-6.331-39.935-16.564l-106.251-106.333c-10.195-10.232-16.497-24.348-16.497-39.936s6.303-29.704 16.499-39.938l309.144-309.246-309.146-309.248c-10.195-10.232-16.497-24.348-16.497-39.936s6.303-29.704 16.499-39.938l106.392-106.494c10.232-10.195 24.348-16.497 39.936-16.497s29.704 6.303 39.938 16.499l309.246 309.246 309.248-309.248c10.232-10.195 24.348-16.497 39.936-16.497s29.704 6.303 39.938 16.499l106.494 106.494c10.147 10.212 16.419 24.285 16.419 39.823 0 15.65-6.363 29.814-16.642 40.047l-0.002 0.002z" />
18
  <glyph unicode="&#xe908;" glyph-name="form-maker" horiz-adv-x="1234" d="M77.847-64c-0.041 0-0.091 0-0.14 0-42.917 0-77.708 34.791-77.708 77.708 0 0.049 0 0.098 0 0.147v-0.008 868.305c0 0.041 0 0.091 0 0.14 0 42.917 34.791 77.708 77.708 77.708 0.049 0 0.098 0 0.147 0h1077.892c0.048 0 0.106 0 0.163 0 42.904 0 77.684-34.78 77.684-77.684 0-0.057 0-0.115 0-0.172v0.009-868.305c0-0.048 0-0.106 0-0.163 0-42.904-34.78-77.684-77.684-77.684-0.057 0-0.115 0-0.172 0h0.009zM35.933 882.153v-868.305c0-0.069-0.001-0.151-0.001-0.233 0-23.007 18.651-41.658 41.658-41.658 0.082 0 0.164 0 0.246 0.001h1077.91c0.069 0 0.151-0.001 0.233-0.001 23.007 0 41.658 18.651 41.658 41.658 0 0.082 0 0.164-0.001 0.246v-0.013 868.305c0 0.069 0.001 0.151 0.001 0.233 0 23.007-18.651 41.658-41.658 41.658-0.082 0-0.164 0-0.246-0.001h-1077.887c-0.076 0.001-0.166 0.001-0.257 0.001-23.007 0-41.658-18.651-41.658-41.658 0-0.082 0-0.164 0.001-0.246v0.013zM145.524 57.553c-0.092-0.002-0.199-0.003-0.308-0.003-9.756 0-17.664 7.908-17.664 17.664 0 0.148 0.002 0.296 0.005 0.443v-0.022 216.669c-0.002 0.098-0.003 0.213-0.003 0.329 0 9.743 7.898 17.641 17.641 17.641 0.116 0 0.231-0.001 0.346-0.003h947.928c0.098 0.002 0.213 0.003 0.329 0.003 9.743 0 17.641-7.898 17.641-17.641 0-0.116-0.001-0.231-0.003-0.346v0.017-216.669c-0.026-9.912-8.055-17.94-17.964-17.967h-0.003zM163.491 93.487h912.012v180.852h-912.012zM145.524 370.153c-0.098-0.002-0.213-0.003-0.329-0.003-9.743 0-17.641 7.898-17.641 17.641 0 0.116 0.001 0.231 0.003 0.346v-0.017 91.020c-0.002 0.091-0.003 0.198-0.003 0.305 0 9.756 7.908 17.664 17.664 17.664 0.107 0 0.214-0.001 0.321-0.003h947.929c0.098 0.002 0.213 0.003 0.329 0.003 9.743 0 17.641-7.898 17.641-17.641 0-0.116-0.001-0.231-0.003-0.346v0.017-91.020c-0.026-9.912-8.055-17.94-17.964-17.967h-0.003zM163.491 406.109h912.012v55.063h-912.012zM842.473 557.591c-0.098-0.002-0.213-0.003-0.329-0.003-9.743 0-17.641 7.898-17.641 17.641 0 0.116 0.001 0.231 0.003 0.346v-0.017 89.204c-0.002 0.098-0.003 0.213-0.003 0.329 0 9.743 7.898 17.641 17.641 17.641 0.116 0 0.231-0.001 0.346-0.003h251.584c0.098 0.002 0.213 0.003 0.329 0.003 9.743 0 17.641-7.898 17.641-17.641 0-0.116-0.001-0.231-0.003-0.346v0.017-89.204c-0.040-9.907-8.060-17.927-17.963-17.967h-0.004zM859.834 593.524h215.575v53.295h-215.482zM522.775 557.591c-0.098-0.002-0.213-0.003-0.329-0.003-9.743 0-17.641 7.898-17.641 17.641 0 0.116 0.001 0.231 0.003 0.346v-0.017 89.204c-0.002 0.098-0.003 0.213-0.003 0.329 0 9.743 7.898 17.641 17.641 17.641 0.116 0 0.231-0.001 0.346-0.003h251.491c0.098 0.002 0.213 0.003 0.329 0.003 9.743 0 17.641-7.898 17.641-17.641 0-0.116-0.001-0.231-0.003-0.346v0.017-89.204c-0.040-9.907-8.060-17.927-17.963-17.967h-0.004zM540.137 593.524h215.575v53.295h-215.575zM145.524 557.591c-0.098-0.002-0.213-0.003-0.329-0.003-9.743 0-17.641 7.898-17.641 17.641 0 0.116 0.001 0.231 0.003 0.346v-0.017 244.317c-0.002 0.098-0.003 0.213-0.003 0.329 0 9.743 7.898 17.641 17.641 17.641 0.116 0 0.231-0.001 0.346-0.003h251.491c0.098 0.002 0.213 0.003 0.329 0.003 9.743 0 17.641-7.898 17.641-17.641 0-0.116-0.001-0.231-0.003-0.346v0.017-244.364c-0.040-9.907-8.060-17.927-17.963-17.967h-0.004zM163.491 593.524h215.575v208.384h-215.575zM842.473 713.309c-0.098-0.002-0.213-0.003-0.329-0.003-9.743 0-17.641 7.898-17.641 17.641 0 0.116 0.001 0.231 0.003 0.346v-0.017 89.088c-0.002 0.098-0.003 0.213-0.003 0.329 0 9.743 7.898 17.641 17.641 17.641 0.116 0 0.231-0.001 0.346-0.003h251.584c0.098 0.002 0.213 0.003 0.329 0.003 9.743 0 17.641-7.898 17.641-17.641 0-0.116-0.001-0.231-0.003-0.346v0.017-89.111c-0.026-9.912-8.055-17.94-17.964-17.967h-0.003zM859.834 749.242h215.575v53.271h-215.482zM522.775 713.309c-0.098-0.002-0.213-0.003-0.329-0.003-9.743 0-17.641 7.898-17.641 17.641 0 0.116 0.001 0.231 0.003 0.346v-0.017 89.088c-0.002 0.098-0.003 0.213-0.003 0.329 0 9.743 7.898 17.641 17.641 17.641 0.116 0 0.231-0.001 0.346-0.003h251.491c0.098 0.002 0.213 0.003 0.328 0.003 9.756 0 17.664-7.908 17.664-17.664 0-0.107-0.001-0.215-0.003-0.322v0.016-89.111c-0.026-9.912-8.055-17.94-17.964-17.967h-0.003zM540.137 749.242h215.575v53.271h-215.575z" />
19
  <glyph unicode="&#xe909;" glyph-name="close" d="M572.191 447.468l110.387 110.387c8.094 8.092 13.101 19.272 13.101 31.621 0 24.694-20.018 44.712-44.712 44.712-12.344 0-23.52-5.002-31.611-13.091l-110.387-110.408-110.408 110.408c-8.091 8.088-19.267 13.091-31.611 13.091-24.694 0-44.712-20.018-44.712-44.712 0-12.349 5.007-23.529 13.101-31.621l110.387-110.387-110.387-110.387c-8.112-8.099-13.13-19.295-13.13-31.662 0-24.71 20.031-44.741 44.741-44.741 12.342 0 23.517 4.997 31.611 13.079l110.386 110.386 110.387-110.387c8.104-8.109 19.302-13.125 31.672-13.125 24.73 0 44.777 20.047 44.777 44.777 0 12.36-5.008 23.55-13.105 31.652v0zM512-64c-0.032 0-0.069 0-0.107 0-36.485 0-72.085 3.788-106.429 10.993l3.357-0.589c-69.46 14.522-130.869 41.294-184.82 78.175l1.749-1.129c-81.681 55.669-145.4 132.172-184.227 221.953l-1.281 3.327c-11.933 27.285-22.224 59.427-29.253 92.77l-0.586 3.323c-6.615 31.021-10.402 66.663-10.402 103.188s3.788 72.167 10.992 106.552l-0.59-3.364c14.522 69.46 41.294 130.869 78.175 184.82l-1.129-1.749c55.669 81.681 132.172 145.4 221.953 184.227l3.327 1.281c27.286 11.927 59.428 22.211 92.771 29.233l3.321 0.585c31.021 6.615 66.663 10.402 103.188 10.402s72.167-3.788 106.552-10.992l-3.364 0.59c69.46-14.522 130.869-41.294 184.82-78.175l-1.749 1.129c81.681-55.669 145.4-132.172 184.227-221.953l1.281-3.327c11.934-27.292 22.225-59.44 29.254-92.791l0.586-3.322c6.615-31.021 10.402-66.663 10.402-103.188s-3.788-72.167-10.992-106.552l0.59 3.364c-14.522-69.46-41.294-130.869-78.175-184.82l1.129 1.749c-55.669-81.681-132.172-145.4-221.953-184.227l-3.327-1.281c-27.292-11.934-59.44-22.225-92.791-29.254l-3.322-0.586c-30.926-6.59-66.458-10.363-102.871-10.363-0.108 0-0.216 0-0.324 0h0.016zM512 881.234c-239.268 0-433.234-193.965-433.234-433.234s193.965-433.234 433.234-433.234c239.268 0 433.234 193.965 433.234 433.234v0c-0.28 239.156-194.078 432.954-433.207 433.234h-0.027z" />
20
+ <glyph unicode="&#xe90a;" glyph-name="spinner" d="M384 832c0 70.688 57.312 128 128 128s128-57.312 128-128c0-70.688-57.312-128-128-128s-128 57.312-128 128zM655.52 719.52c0 70.688 57.312 128 128 128s128-57.312 128-128c0-70.688-57.312-128-128-128s-128 57.312-128 128zM832 448c0 35.36 28.64 64 64 64s64-28.64 64-64c0-35.36-28.64-64-64-64s-64 28.64-64 64zM719.52 176.48c0 35.36 28.64 64 64 64s64-28.64 64-64c0-35.36-28.64-64-64-64s-64 28.64-64 64zM448 64c0 0 0 0 0 0 0 35.36 28.64 64 64 64s64-28.64 64-64c0 0 0 0 0 0 0-35.36-28.64-64-64-64s-64 28.64-64 64zM176.48 176.48c0 0 0 0 0 0 0 35.36 28.64 64 64 64s64-28.64 64-64c0 0 0 0 0 0 0-35.36-28.64-64-64-64s-64 28.64-64 64zM144.48 719.52c0 0 0 0 0 0 0 53.024 42.976 96 96 96s96-42.976 96-96c0 0 0 0 0 0 0-53.024-42.976-96-96-96s-96 42.976-96 96zM56 448c0 39.776 32.224 72 72 72s72-32.224 72-72c0-39.776-32.224-72-72-72s-72 32.224-72 72z" />
21
  </font></defs></svg>
{fonts → css}/fonts/fm-icons.ttf RENAMED
Binary file
{fonts → css}/fonts/fm-icons.woff RENAMED
Binary file
{fonts → css/fonts}/icons/close.svg RENAMED
File without changes
{fonts → css/fonts}/icons/collapse.svg RENAMED
File without changes
{fonts → css/fonts}/icons/delete.svg RENAMED
File without changes
{fonts → css/fonts}/icons/draggable.svg RENAMED
File without changes
{fonts → css/fonts}/icons/duplicate.svg RENAMED
File without changes
{fonts → css/fonts}/icons/edit.svg RENAMED
File without changes
{fonts → css/fonts}/icons/expand.svg RENAMED
File without changes
{fonts → css/fonts}/icons/form-maker.svg RENAMED
File without changes
{fonts → css/fonts}/icons/plus-circled.svg RENAMED
File without changes
{fonts → css/fonts}/icons/plus.svg RENAMED
File without changes
css/fonts/icons/spinner.svg ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <!-- Generated by IcoMoon.io -->
2
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
3
+ <title>spinner</title>
4
+ <path d="M12 4c0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.209-1.791 4-4 4s-4-1.791-4-4zM20.485 7.515c0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.209-1.791 4-4 4s-4-1.791-4-4zM26 16c0-1.105 0.895-2 2-2s2 0.895 2 2c0 1.105-0.895 2-2 2s-2-0.895-2-2zM22.485 24.485c0-1.105 0.895-2 2-2s2 0.895 2 2c0 1.105-0.895 2-2 2s-2-0.895-2-2zM14 28c0 0 0 0 0 0 0-1.105 0.895-2 2-2s2 0.895 2 2c0 0 0 0 0 0 0 1.105-0.895 2-2 2s-2-0.895-2-2zM5.515 24.485c0 0 0 0 0 0 0-1.105 0.895-2 2-2s2 0.895 2 2c0 0 0 0 0 0 0 1.105-0.895 2-2 2s-2-0.895-2-2zM4.515 7.515c0 0 0 0 0 0 0-1.657 1.343-3 3-3s3 1.343 3 3c0 0 0 0 0 0 0 1.657-1.343 3-3 3s-3-1.343-3-3zM1.75 16c0-1.243 1.007-2.25 2.25-2.25s2.25 1.007 2.25 2.25c0 1.243-1.007 2.25-2.25 2.25s-2.25-1.007-2.25-2.25z"></path>
5
+ </svg>
css/form_maker_frontend.css CHANGED
@@ -586,6 +586,13 @@ div[type="type_file_upload"] .wdform-element-section {
586
  .image_left_right .fm-header-img {
587
  display: block;
588
  }
 
 
 
 
 
 
 
589
  }
590
 
591
  @media screen and (min-width: 481px) and (max-width: 768px){
@@ -792,6 +799,7 @@ input[type=number].wd-type-number {
792
  .fm-form .button-submit,
793
  .fm-form .button-reset:not(:last-child) {
794
  margin-right: 15px;
 
795
  }
796
 
797
  .fm-form .ui-spinner input[type="number"] {
@@ -1121,6 +1129,28 @@ div[type="type_slider"] .label {
1121
  background-size: 10%;
1122
  z-index: 100100;
1123
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1124
  .fm-col-1 {
1125
  flex: 0 1 100% !important;;
1126
  width: 100% !important;;
@@ -1146,4 +1176,8 @@ div[type="type_slider"] .label {
1146
 
1147
  .wdform_percentage_title {
1148
  margin-left: 5px;
1149
- }
 
 
 
 
586
  .image_left_right .fm-header-img {
587
  display: block;
588
  }
589
+
590
+ .fm-form .g-recaptcha:not([data-size="invisible"]) {
591
+ transform: scale(0.77);
592
+ -webkit-transform: scale(0.77);
593
+ transform-origin: 0 0;
594
+ -webkit-transform-origin: 0 0;
595
+ }
596
  }
597
 
598
  @media screen and (min-width: 481px) and (max-width: 768px){
799
  .fm-form .button-submit,
800
  .fm-form .button-reset:not(:last-child) {
801
  margin-right: 15px;
802
+ position: relative;
803
  }
804
 
805
  .fm-form .ui-spinner input[type="number"] {
1129
  background-size: 10%;
1130
  z-index: 100100;
1131
  }
1132
+
1133
+ .fm-submit-loading {
1134
+ display: none;
1135
+ margin: 0 5px;
1136
+ position: relative;
1137
+ vertical-align: top;
1138
+ }
1139
+
1140
+ .fm-submit-loading.spinner:before {
1141
+ right: 0;
1142
+ }
1143
+
1144
+ @keyframes spinner {
1145
+ to {transform: rotate(360deg);}
1146
+ }
1147
+
1148
+ .fm-submit-loading.spinner:before {
1149
+ box-sizing: border-box;
1150
+ position: absolute;
1151
+ animation: spinner .6s linear infinite;
1152
+ }
1153
+
1154
  .fm-col-1 {
1155
  flex: 0 1 100% !important;;
1156
  width: 100% !important;;
1176
 
1177
  .wdform_percentage_title {
1178
  margin-left: 5px;
1179
+ }
1180
+ .button-submit[disabled] {
1181
+ opacity: 0.5;
1182
+ pointer-events: none;
1183
+ }
css/styles.min.css CHANGED
@@ -6,4 +6,4 @@
6
  * Licensed under the MIT license - http://opensource.org/licenses/MIT
7
  *
8
  * Copyright (c) 2016 Daniel Eden
9
- */.fm-animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.fm-animated.infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.fm-animated.hinge{-webkit-animation-duration:2s;animation-duration:2s}.fm-animated.bounceIn,.fm-animated.bounceOut,.fm-animated.flipOutX,.fm-animated.flipOutY{-webkit-animation-duration:.75s;animation-duration:.75s}@-webkit-keyframes bounce{20%,53%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}@keyframes bounce{20%,53%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}.bounce{-webkit-animation-name:bounce;animation-name:bounce;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes flash{50%,from,to{opacity:1}25%,75%{opacity:0}}@keyframes flash{50%,from,to{opacity:1}25%,75%{opacity:0}}.flash{-webkit-animation-name:flash;animation-name:flash}@-webkit-keyframes pulse{from{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes pulse{from{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.pulse{-webkit-animation-name:pulse;animation-name:pulse}@-webkit-keyframes rubberBand{from{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes rubberBand{from{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.rubberBand{-webkit-animation-name:rubberBand;animation-name:rubberBand}@-webkit-keyframes shake{from,to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes shake{from,to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.shake{-webkit-animation-name:shake;animation-name:shake}@-webkit-keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}.headShake{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-name:headShake;animation-name:headShake}@-webkit-keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0deg)}}@keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0deg)}}.swing{-webkit-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;animation-name:swing}@-webkit-keyframes tada{from{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes tada{from{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.tada{-webkit-animation-name:tada;animation-name:tada}@-webkit-keyframes wobble{from{-webkit-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}to{-webkit-transform:none;transform:none}}@keyframes wobble{from{-webkit-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}to{-webkit-transform:none;transform:none}}.wobble{-webkit-animation-name:wobble;animation-name:wobble}@-webkit-keyframes jello{11.1%,from,to{-webkit-transform:none;transform:none}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skewX(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}@keyframes jello{11.1%,from,to{-webkit-transform:none;transform:none}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skewX(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}.jello{-webkit-animation-name:jello;animation-name:jello;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes bounceIn{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes bounceIn{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.bounceIn{-webkit-animation-name:bounceIn;animation-name:bounceIn}@-webkit-keyframes bounceInDown{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInDown{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}.bounceInDown{-webkit-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInLeft{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}.bounceInLeft{-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInRight{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}.bounceInRight{-webkit-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceInUp{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes bounceInUp{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.bounceInUp{-webkit-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}.bounceOut{-webkit-animation-name:bounceOut;animation-name:bounceOut}@-webkit-keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.bounceOutDown{-webkit-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.bounceOutLeft{-webkit-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.bounceOutRight{-webkit-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.bounceOutUp{-webkit-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}.fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes fadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInDownBig{from{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDownBig{from{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInDownBig{-webkit-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeft{from{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeft{from{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInLeftBig{from{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeftBig{from{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInRightBig{from{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRightBig{from{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInRightBig{-webkit-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInUpBig{from{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUpBig{from{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInUpBig{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeOut{from{opacity:1}to{opacity:0}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}.fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutDown{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes fadeOutDown{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.fadeOutDown{-webkit-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutDownBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes fadeOutDownBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeft{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes fadeOutLeft{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.fadeOutLeft{-webkit-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutLeftBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes fadeOutLeftBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRight{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fadeOutRight{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.fadeOutRight{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutRightBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes fadeOutRightBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes fadeOutUp{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes fadeOutUp{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.fadeOutUp{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutUpBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes fadeOutUpBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes flip{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,-360deg);transform:perspective(400px) rotate3d(0,1,0,-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}@keyframes flip{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,-360deg);transform:perspective(400px) rotate3d(0,1,0,-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}.fm-animated.flip{-webkit-backface-visibility:visible;backface-visibility:visible;-webkit-animation-name:flip;animation-name:flip}@-webkit-keyframes flipInX{from{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInX{from{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInX{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInX;animation-name:flipInX}@-webkit-keyframes flipInY{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInY{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInY;animation-name:flipInY}@-webkit-keyframes flipOutX{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@keyframes flipOutX{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}.flipOutX{-webkit-animation-name:flipOutX;animation-name:flipOutX;-webkit-backface-visibility:visible!important;backface-visibility:visible!important}@-webkit-keyframes flipOutY{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}@keyframes flipOutY{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}.flipOutY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipOutY;animation-name:flipOutY}@-webkit-keyframes lightSpeedIn{from{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}to{-webkit-transform:none;transform:none;opacity:1}}@keyframes lightSpeedIn{from{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}to{-webkit-transform:none;transform:none;opacity:1}}.lightSpeedIn{-webkit-animation-name:lightSpeedIn;animation-name:lightSpeedIn;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedOut{from{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}@keyframes lightSpeedOut{from{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}.lightSpeedOut{-webkit-animation-name:lightSpeedOut;animation-name:lightSpeedOut;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes rotateIn{from{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateIn{from{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}.rotateIn{-webkit-animation-name:rotateIn;animation-name:rotateIn}@-webkit-keyframes rotateInDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft}@-webkit-keyframes rotateInDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInDownRight{-webkit-animation-name:rotateInDownRight;animation-name:rotateInDownRight}@-webkit-keyframes rotateInUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft}@-webkit-keyframes rotateInUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInUpRight{-webkit-animation-name:rotateInUpRight;animation-name:rotateInUpRight}@-webkit-keyframes rotateOut{from{-webkit-transform-origin:center;transform-origin:center;opacity:1}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}@keyframes rotateOut{from{-webkit-transform-origin:center;transform-origin:center;opacity:1}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}.rotateOut{-webkit-animation-name:rotateOut;animation-name:rotateOut}@-webkit-keyframes rotateOutDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}@keyframes rotateOutDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}.rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft}@-webkit-keyframes rotateOutDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight}@-webkit-keyframes rotateOutUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft}@-webkit-keyframes rotateOutUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}@keyframes rotateOutUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}.rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight}@-webkit-keyframes hinge{0%{-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}@keyframes hinge{0%{-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}.hinge{-webkit-animation-name:hinge;animation-name:hinge}@-webkit-keyframes rollIn{from{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes rollIn{from{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:none;transform:none}}.rollIn{-webkit-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}@keyframes rollOut{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}.rollOut{-webkit-animation-name:rollOut;animation-name:rollOut}@-webkit-keyframes zoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}.zoomIn{-webkit-animation-name:zoomIn;animation-name:zoomIn}@-webkit-keyframes zoomInDown{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInDown{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInDown{-webkit-animation-name:zoomInDown;animation-name:zoomInDown}@-webkit-keyframes zoomInLeft{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInLeft{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInLeft{-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft}@-webkit-keyframes zoomInRight{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInRight{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInRight{-webkit-animation-name:zoomInRight;animation-name:zoomInRight}@-webkit-keyframes zoomInUp{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInUp{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInUp{-webkit-animation-name:zoomInUp;animation-name:zoomInUp}@-webkit-keyframes zoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes zoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}.zoomOut{-webkit-animation-name:zoomOut;animation-name:zoomOut}@-webkit-keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomOutDown{-webkit-animation-name:zoomOutDown;animation-name:zoomOutDown}@-webkit-keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}@keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}.zoomOutLeft{-webkit-animation-name:zoomOutLeft;animation-name:zoomOutLeft}@-webkit-keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}@keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}.zoomOutRight{-webkit-animation-name:zoomOutRight;animation-name:zoomOutRight}@-webkit-keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomOutUp{-webkit-animation-name:zoomOutUp;animation-name:zoomOutUp}@-webkit-keyframes slideInDown{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInDown{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInDown{-webkit-animation-name:slideInDown;animation-name:slideInDown}@-webkit-keyframes slideInLeft{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInLeft{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInLeft{-webkit-animation-name:slideInLeft;animation-name:slideInLeft}@-webkit-keyframes slideInRight{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInRight{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInRight{-webkit-animation-name:slideInRight;animation-name:slideInRight}@-webkit-keyframes slideInUp{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInUp{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInUp{-webkit-animation-name:slideInUp;animation-name:slideInUp}@-webkit-keyframes slideOutDown{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes slideOutDown{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.slideOutDown{-webkit-animation-name:slideOutDown;animation-name:slideOutDown}@-webkit-keyframes slideOutLeft{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes slideOutLeft{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.slideOutLeft{-webkit-animation-name:slideOutLeft;animation-name:slideOutLeft}@-webkit-keyframes slideOutRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes slideOutRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.slideOutRight{-webkit-animation-name:slideOutRight;animation-name:slideOutRight}@-webkit-keyframes slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.slideOutUp{-webkit-animation-name:slideOutUp;animation-name:slideOutUp}.fm-form *{box-sizing:border-box}.wdform_map img{max-width:none!important}.wdform_row .wdform-field .wdform_map{width:inherit!important}.checkbox-div,.checkbox-div *,.radio-div,.radio-div *,.wdform-page-button{-moz-box-sizing:content-box!important;box-sizing:content-box!important;-webkit-box-sizing:content-box!important}.page_percentage_deactive,.page_percentage_deactive *{word-wrap:normal}.wdform_percentage_arrow,.wdform_percentage_text{vertical-align:top!important}div[type=type_button],div[type=type_submit_reset]{justify-content:flex-end}div[type=type_captcha] .wdform-element-section *{vertical-align:middle}.file-upload-status{direction:inherit!important}.fm_datepicker.ui-datepicker{z-index:1000!important;font-size:15px!important;background:#f2f2f2!important;border:1px solid #f2f2f2!important;color:#777!important}.fm_datepicker .ui-widget-header{border:1px solid #e2e2e2!important;background:#e6e6e6!important;color:#cc0c0c}.fm_datepicker .ui-state-default,.fm_datepicker .ui-widget-content .ui-state-default,.fm_datepicker .ui-widget-header .ui-state-default{border:1px solid #e3e3e3!important;background:#fff!important;color:#8c8c8c!important}.fm_datepicker .ui-state-focus,.fm_datepicker .ui-state-hover,.fm_datepicker .ui-widget-content .ui-state-focus,.fm_datepicker .ui-widget-content .ui-state-hover,.fm_datepicker .ui-widget-header .ui-state-focus,.fm_datepicker .ui-widget-header .ui-state-hover{border:1px solid #d2d2d2!important;background:#dcdcdc!important;font-weight:700!important}.fm_datepicker .ui-state-highlight,.fm_datepicker .ui-widget-content .ui-state-highlight,.fm_datepicker .ui-widget-header .ui-state-highlight{border:1px solid #a9a9a9!important;background:#a9a9a9!important;color:#fff!important}.fm_datepicker .ui-state-active,.fm_datepicker .ui-widget-content .ui-state-active,.fm_datepicker .ui-widget-header .ui-state-active{border:1px solid #a2a2a2!important;background:#dcdcdc!important;color:#272727!important}.fm_datepicker .ui-icon,.fm_datepicker .ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)!important}.fm_datepicker.ui-datepicker{font-size:15px!important}.fm_datepicker.ui-datepicker{background:#f2f2f2!important;border:1px solid #f2f2f2!important;color:#777!important}.fm_datepicker .ui-widget-header{border:1px solid #e2e2e2!important;background:#e6e6e6!important;color:#cc0c0c}.fm_datepicker .ui-state-default,.fm_datepicker .ui-widget-content .ui-state-default,.fm_datepicker .ui-widget-header .ui-state-default{border:1px solid #e3e3e3!important;background:#fff!important;color:#8c8c8c!important}.fm_datepicker .ui-state-focus,.fm_datepicker .ui-state-hover,.fm_datepicker .ui-widget-content .ui-state-focus,.fm_datepicker .ui-widget-content .ui-state-hover,.fm_datepicker .ui-widget-header .ui-state-focus,.fm_datepicker .ui-widget-header .ui-state-hover{border:1px solid #d2d2d2!important;background:#dcdcdc!important;font-weight:700!important}.fm_datepicker .ui-state-highlight,.fm_datepicker .ui-widget-content .ui-state-highlight,.fm_datepicker .ui-widget-header .ui-state-highlight{border:1px solid #a9a9a9!important;background:#a9a9a9!important;color:#fff!important}.fm_datepicker .ui-state-active,.fm_datepicker .ui-widget-content .ui-state-active,.fm_datepicker .ui-widget-header .ui-state-active{border:1px solid #a2a2a2!important;background:#dcdcdc!important;color:#272727!important}.fm_datepicker .ui-icon,.fm_datepicker .ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)!important}.fm_datepicker#ui-datepicker-div{z-index:2147483647!important}.error_label,.error_label_check_mail,.error_label_check_pass,.error_label_confirm,.error_label_exp,.error_label_price,.error_label_upload,.wd-error-label{color:red!important}.fm-not-filled{color:red;font-size:13px;width:100%;padding-left:10px}.fm-form-container .fm-form div[type=type_phone_new] input[type=text]{padding-right:6px!important;padding-left:52px!important}.fm-form .other_input{max-width:150px}.fm-form a,.fm-form a:focus,.fm-form input,.fm-form input:focus,.fm-form select,.fm-form select:focus,.fm-form textarea,.fm-form textarea:focus{outline:0!important}.fm-form a,.fm-form button{cursor:pointer}.fm-form label{display:inline}.fm-form .wdform_section{display:flex;display:-webkit-flex;-webkit-flex-direction:row;flex-direction:row}.fm-form .wdform_column:first-child:nth-last-child(1){width:100%}.fm-form .wdform_column:first-child:nth-last-child(2),.fm-form .wdform_column:first-child:nth-last-child(2)~.wdform_column{width:50%}.fm-form .wdform_column:first-child:nth-last-child(3),.fm-form .wdform_column:first-child:nth-last-child(3)~.wdform_column{width:33.33%}.fm-form .wdform_column:first-child:nth-last-child(4),.fm-form .wdform_column:first-child:nth-last-child(4)~.wdform_column{width:25%}.fm-form .wdform_column:first-child:nth-last-child(5),.fm-form .wdform_column:first-child:nth-last-child(5)~.wdform_column{width:20%}.fm-form .wdform-field:not([type=type_hidden]){padding:10px 10px}.fm-form .wdform-label-section{text-align:left;margin-bottom:5px}div[type=type_file_upload] .wdform-element-section,div[type=type_submit_reset] .wdform-element-section{min-width:inherit}.wdform-element-section{text-align:left;line-height:initial}.fm-topbar{width:100%;left:0;z-index:999999}.fm-scrollbox{box-sizing:border-box;position:fixed;transition:bottom .4s ease 0s;z-index:999999;opacity:1;bottom:0}.fm-popover-content,.fm-scrollbox-form{width:100%}.fm-scrollbox-form.float-right{float:right}.fm-scrollbox-form.float-left{float:left}.fm-minimize-text{position:fixed;transition:bottom .4s ease 0s;z-index:99999;opacity:1;bottom:0;width:100%}.fm-popover-background{position:fixed;background-color:#000;left:0;top:0;width:100%;height:100%;z-index:1100000001;opacity:.7}.fm-popover{box-sizing:border-box;position:fixed;left:0;top:0;overflow:auto;width:100%;height:100%;outline:0!important;display:block;z-index:1100000002}.fm-popover-container{position:absolute;width:100%;height:100%;left:0;top:0;padding:20px 10px;box-sizing:border-box;text-align:center}.fm-popover-container:before{content:'';display:inline-block;height:100%;vertical-align:middle}.fm-popover-inner-background{position:absolute;width:100%;height:100%;left:0;top:0;z-index:1100000003}.fm-popover-content{position:relative;display:inline-block;max-width:95%;vertical-align:middle;margin:0 auto;text-align:left;z-index:1100000005}.fm-form .wdform-date{width:120px;vertical-align:top}.wdform_grading{margin:2px}.wdform_grading input{display:inline}.fm-form .wdform-page-button{display:inline-block;outline:0;cursor:pointer}.fm-form .page_active,.fm-form .page_deactive{text-align:center;display:inline-block;cursor:pointer}.fm-form .page_percentage_active,.fm-form .page_percentage_deactive{display:inline-block}.fm-form .wdform-section-break-div{border:none}.fm-form .wdform_tr_section_break{clear:both}.fm-form .captcha_refresh{width:30px;height:30px;border-width:0;margin:0;padding:0;vertical-align:middle;cursor:pointer;background-image:url(../images/refresh_black.png)}.fm-form .fm-right label span{float:right;left:5px;position:relative;top:5px}.fm-form .checkbox-div label,.fm-form .radio-div{margin:0 5px}.fm-form .if-ie-div-label{opacity:1!important}.fm-form .wdform-matrix-cell select{width:60px}.fm-form .wdform-matrix-table{display:table;border-spacing:0}.fm-form .wdform-matrix-column{text-align:left;display:table-cell}.fm-form .wdform-matrix-cell{text-align:center;display:table-cell;padding:6px 10px}.fm-form .wdform-matrix-head>div{display:table-cell;text-align:center}.fm-form .wdform-matrix-head{display:table-row}.fm-form .wdform-matrix-row0{background:#dfdfdf;display:table-row}.fm-form .wdform-matrix-row1{background:#e9e9e9;display:table-row}.fm-form .paypal-property .wdform-quantity{width:55px}.fm-form .paypal-property select{width:85px}.wdform_map img{max-width:none!important}.wdform_row .wdform-field .wdform_map{width:inherit!important}.checkbox-div,.checkbox-div *,.radio-div,.radio-div *,.wdform-page-button{-moz-box-sizing:content-box!important;box-sizing:content-box!important;-webkit-box-sizing:content-box!important}.page_percentage_deactive,.page_percentage_deactive *{word-wrap:normal}.wdform_percentage_arrow,.wdform_percentage_text{vertical-align:top!important}.fm_hide_mobile{display:none!important}.fm-hide{display:none!important}.fm-show{display:block!important}.fm-align-right{text-align:right}.fm-align-left{text-align:left}.fm-align-center{text-align:center}.fm-form .file-upload-status{position:static;direction:inherit!important}.fm-form .wdform_page{display:block!important;margin:0!important;float:none!important}.fm_mobile_full{width:100%!important;padding:0 5%!important}.fm-clear{content:'';display:block;clear:both}.fm-topbar .fm-header-bg{display:table-cell;vertical-align:middle}.fm-topbar .fm-header{display:table-cell}.fm-header{vertical-align:middle;display:table}.image_left_right .fm-header-img{display:table-cell;vertical-align:middle;text-align:center}.image_left_right .fm-header-text{display:table-cell;vertical-align:middle}@media screen and (max-width:768px){.fm-minimize-text,.fm-popover-content,.fm-scrollbox-form{width:95%!important}.fm-form-container .fm-scrollbox{width:97%!important}}@media screen and (max-width:480px){.fm-form{width:100%!important}.wdform-page-and-images{padding:0!important}.wdform_column{padding:2px!important}.image_left_right .fm-header-img,.image_left_right .fm-header-text{display:block}}@media screen and (min-width:481px) and (max-width:768px){.fm-form{width:100%!important}.image_left_right .fm-header-img,.image_left_right .fm-header-text{display:block}}.fm-form-container .fm-form .fm-message{width:100%;color:#333;margin:0 0 15px 0;padding:15px 15px;text-align:left}.fm-form-container .fm-form .fm-message.fm-notice-success{background:#e0ffc7;border:1px solid #b4d39b}.fm-form-container .fm-form .fm-message.fm-notice-error{background:#fbeaea;border:1px solid #eed3d7}.fm-form-container .fm-form .fm-message.fm-warning-error{background:#fff8e5;border:1px solid #ffb900}.fm-form-container .fm-form .fm-message.fm-notice-dismiss{background:#deefff;border:1px solid #5b9dd9}.fm-form .wd-float-left{float:left}.fm-form .wd-float-right{float:right}.fm-form .wd-hidden{display:none}.fm-form .wd-block{display:block}.fm-form .wd-inline-block{display:inline-block}.fm-form .wd-table{display:table}.fm-form .wd-table-group{display:table-row-group}.fm-form .wd-table-cell{display:table-cell}.fm-form .wd-table-row{display:table-row}.fm-form .wd-vertical-middle{vertical-align:middle}.fm-form .wd-vertical-top{vertical-align:top}.fm-form .wd-width-100{width:100%}.fm-form .wd-width-90{width:90%}.fm-form .wd-width-80{width:80%}.fm-form .wd-width-70{width:70%}.fm-form .wd-width-60{width:60%}.fm-form .wd-width-50{width:50%}.fm-form .wd-width-40{width:40%}.fm-form .wd-width-49{width:49%}.fm-form .wd-width-33{width:33.3%}.fm-form .wd-width-30{width:30%}.fm-form .wd-width-20{width:20%}.fm-form .wd-width-10{width:10%}.fm-form .wd-width-5{width:5%}.fm-form .time_box{text-align:right;width:50px}.fm-form-container .fm-form .wdform_row select.am_pm_select{background-size:0;vertical-align:middle}.fm-form .wd-name-separator{margin:0 4px;padding:0}.fm-form .wd-clear{clear:both}.checkbox-div-right{margin:3px 8px 0 0}.fm-form .wd-paypal-cent{width:30px}.fm-form .paypal-property{margin-top:5px}.fm-form .wd-scale-rating{border-spacing:7px}.fm-form .wdform_grading input{width:70px}.fm-form .wdform_grading label{margin-left:5px}.fm-form .wd-calendar-button{width:20px;height:20px;margin:0 0 0 -25px;color:inherit;font-size:20px}.rtl .fm-form .wd-calendar-button{margin:0 -25px 0 0}input[type=number].wd-type-number::-webkit-inner-spin-button,input[type=number].wd-type-number::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number].wd-type-number{-moz-appearance:textfield;appearance:none}.fm-form .button-reset:not(:last-child),.fm-form .button-submit{margin-right:15px}.fm-form .ui-spinner input[type=number]{border:none}.rtl .wdform-label-section.wd-float-left{float:right;text-align:right}.rtl .fm-form .intl-tel-input .selected-flag{padding:0 8px 0 0}.rtl .wdform-element-section{text-align:right}.rtl .ui-spinner input{text-align:left}.rtl .fm-form-container .fm-form div[type=type_phone_new] input[type=text]{padding-left:6px!important;padding-right:52px!important}.rtl .fm-form .wdform-label-section{text-align:right}.rtl .fm-form .button-submit{margin-left:15px;margin-right:0}.fm-form-container .fm-form{display:block;background:0 0;border:none!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.fm-form-container .fm-form .image_left_right.fm-header{padding:0!important}.fm-form-container .fm-form.header_left_right .wdform-page-and-images{display:table-cell}.fm-form-container .fm-form.header_left_right .fm-header{display:table-cell!important;vertical-align:middle}.fm-form-container .fm-minimize-text div{background-color:#fff;border:none!important;cursor:pointer;color:#444}.fm-form-container .fm-minimize-text div:hover{border:none!important;outline:0;cursor:pointer}.fm-form-container .fm-pages .page_active,.fm-form-container .fm-pages .page_deactive{cursor:pointer}.fm-form-container .fm-pages .page_percentage_active{min-width:7%}.fm-form-container .fm-action-buttons{font-family:monospace;text-align:center;cursor:pointer}.fm-form-container .fm-form .checkbox-div label span,.fm-form-container .fm-form .radio-div label span{border:none;display:inline-block;vertical-align:middle}.fm-form-container .fm-form .checkbox-div input[type=checkbox]:checked label span:after,.fm-form-container .fm-form .radio-div input[type=radio]:checked label span:after{content:"";display:block}.fm-form-container .fm-form input[type=number].time_box{min-width:45px}.fm-form-container .fm-popover .fm-popover-content,.fm-form-container .fm-scrollbox .fm-scrollbox-form{position:relative}.fm-form-container .fm-popover .fm-form,.fm-form-container .fm-scrollbox .fm-form,.fm-form-container .fm-topbar .fm-form{background:#fff;border:1px solid #ccc}@media screen and (max-width:768px){.fm-form .wdform_section{-webkit-flex-direction:column;flex-direction:column}.fm-form .wdform_column{width:100%!important}.fm-form-container .fm-form .wdform-field{-webkit-flex-direction:column;flex-direction:column}.fm-form-container .fm-form .wdform-element-section,.fm-form-container .fm-form .wdform-label-section{width:100%}}.fm-form .wd-flex{display:flex;display:-webkit-flex}.fm-form .wd-flex-column{-webkit-flex-direction:column;flex-direction:column}.fm-form .wd-flex-row{-webkit-flex-direction:row;flex-direction:row}.fm-form .wd-flex-row-reverse{-webkit-flex-direction:row-reverse;flex-direction:row-reverse}.fm-form .wd-flex-wrap{-webkit-flex-wrap:wrap;flex-wrap:wrap}.fm-form .wd-align-items{-webkit-align-items:baseline;align-items:baseline}.fm-form .wdform_row .wd-align-items-center{-webkit-align-items:center;align-items:center}.fm-form .wd-justify-content{-webkit-justify-content:space-between;justify-content:space-between}.fm-form .wd-justify-content-left{-webkit-justify-content:flex-start;justify-content:flex-start}.fm-form .wd-justify-content-right{-webkit-justify-content:flex-end;justify-content:flex-end}.fm-form .wd-justify-content-center{-webkit-justify-content:center;justify-content:center}.fm-form .wdform-field{-webkit-align-items:baseline;align-items:baseline}.checkbox-div.wd-flex,.fm-form .wdform-element-section{-webkit-align-items:baseline;align-items:baseline}.fm-form .wd-choice{align-items:center;margin:0 5px 5px 5px}.fm-form textarea{resize:vertical}.fm-form .intl-tel-input{width:100%}.fm-form .wd-address{padding-bottom:8px}.fm-form .wd-choice label{cursor:pointer;margin:0 5px;word-break:break-all}.fm-form div[type=type_date_new] .wdform-element-section,.fm-form div[type=type_date_range] .wdform-element-section{align-items:center}.fm-form div[class^=div_total]{margin-bottom:10px}.fm-form div[class^=paypal_tax]{margin-top:10px}.fm-form .ui-slider-handle,.fm-form .ui-slider-range{padding:0!important}.fm-form label[for]{cursor:pointer}.fm-form .wdform-required{margin:0 5px}.fm-form .fm-header-description{text-align:justify}.wdform_star_rating img{cursor:pointer}.fm-message p{margin:0!important;padding:0!important}.arithmetic_captcha_img,.captcha_img{margin:0}div[type=type_slider] .label{color:inherit;background:0 0}.fm-form .form-group{margin:0;padding:0}.fm-form-container .fm-form .fm-gdpr-checkbox{display:initial!important;margin-right:5px}.fm-form .wdform_row{position:relative}.fm-form-builder .wdform_page{display:flex}.fm-form-builder .wdform_section{flex-direction:column;flex:1}.fm-form-builder .wdform_row{flex:1}.wdform_column{display:flex;flex-direction:column}.fm-form-builder .wdform_column{width:initial!important;flex-direction:row}.fm-form-builder .wdform_section{display:inline-block;flex-wrap:unset;vertical-align:top}.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(1){width:100%}.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(2),.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(2)~.wdform_section{width:100%}.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(3),.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(3)~.wdform_section{width:50%}.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(4),.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(4)~.wdform_section{width:33.33%}@media screen and (max-width:768px){.fm-form .fm-form-builder .wdform_column,.fm-form .fm-form-builder .wdform_section{width:100%!important}.fm-form-container .fm-form-builder .fm-form .wdform-element-section,.fm-form-container .fm-form-builder .fm-form .wdform-label-section{width:100%}}.fm-loading{width:100%;height:100%;top:0;left:0;position:absolute;background-color:rgba(0,0,0,.25);background-image:url(../images/spinner.gif);background-position:center;background-repeat:no-repeat;background-size:10%;z-index:100100}.fm-col-1{flex:0 1 100%!important;width:100%!important}.fm-col-2{flex:0 1 50%!important;width:50%!important}.fm-col-3{flex:0 1 33.33%!important;width:33.33%!important}.fm-col-4{flex:0 1 25%!important;width:25%!important}#div_percentage,.wdform_percentage_arrow,.wdform_percentage_title{display:inline-block}.wdform_percentage_title{margin-left:5px}.intl-tel-input{position:relative;display:inline-block}.intl-tel-input *{box-sizing:border-box;-moz-box-sizing:border-box}.intl-tel-input .hide{display:none}.intl-tel-input .v-hide{visibility:hidden}.intl-tel-input input,.intl-tel-input input[type=tel],.intl-tel-input input[type=text]{position:relative;z-index:0;margin-top:0!important;margin-bottom:0!important;padding-right:36px;margin-right:0}.intl-tel-input .flag-container{position:absolute;top:0;bottom:0;right:0;padding:1px}.intl-tel-input .selected-flag{z-index:1;position:relative;width:36px;height:100%;padding:0 0 0 8px}.intl-tel-input .selected-flag .iti-flag{position:absolute;top:0;bottom:0;margin:auto}.intl-tel-input .selected-flag .iti-arrow{position:absolute;top:50%;margin-top:-2px;right:6px;width:0;height:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:4px solid #555}.rtl .intl-tel-input .selected-flag .iti-arrow{left:6px;right:auto}.intl-tel-input .selected-flag .iti-arrow.up{border-top:none;border-bottom:4px solid #555}.intl-tel-input .country-list{position:absolute;z-index:2;list-style:none;text-align:left;padding:0;margin:0 0 0 -1px;box-shadow:1px 1px 4px rgba(0,0,0,.2);background-color:#fff;border:1px solid #ccc;white-space:nowrap;max-height:200px;overflow-y:scroll}.intl-tel-input .country-list.dropup{bottom:100%;margin-bottom:-1px}.intl-tel-input .country-list .flag-box{display:inline-block;width:20px}@media (max-width:500px){.intl-tel-input .country-list{white-space:normal}}.intl-tel-input .country-list .divider{padding-bottom:5px;margin-bottom:5px;border-bottom:1px solid #ccc}.intl-tel-input .country-list .country{padding:5px 10px}.intl-tel-input .country-list .country .dial-code{color:#999}.intl-tel-input .country-list .country.highlight{background-color:rgba(0,0,0,.05)}.intl-tel-input .country-list .country-name,.intl-tel-input .country-list .dial-code,.intl-tel-input .country-list .flag-box{vertical-align:middle}.intl-tel-input .country-list .country-name,.intl-tel-input .country-list .flag-box{margin-right:6px}.intl-tel-input.allow-dropdown input,.intl-tel-input.allow-dropdown input[type=tel],.intl-tel-input.allow-dropdown input[type=text],.intl-tel-input.separate-dial-code input,.intl-tel-input.separate-dial-code input[type=tel],.intl-tel-input.separate-dial-code input[type=text]{padding-right:6px;padding-left:52px;margin-left:0}.intl-tel-input.allow-dropdown .flag-container,.intl-tel-input.separate-dial-code .flag-container{right:auto;left:0}.rtl .intl-tel-input.allow-dropdown .flag-container,.rtl .intl-tel-input.separate-dial-code .flag-container{left:auto;right:0}.intl-tel-input.allow-dropdown .selected-flag,.intl-tel-input.separate-dial-code .selected-flag{width:46px}.intl-tel-input.allow-dropdown .flag-container:hover{cursor:pointer}.intl-tel-input.allow-dropdown .flag-container:hover .selected-flag{background-color:rgba(0,0,0,.05)}.intl-tel-input.allow-dropdown input[disabled]+.flag-container:hover,.intl-tel-input.allow-dropdown input[readonly]+.flag-container:hover{cursor:default}.intl-tel-input.allow-dropdown input[disabled]+.flag-container:hover .selected-flag,.intl-tel-input.allow-dropdown input[readonly]+.flag-container:hover .selected-flag{background-color:transparent}.intl-tel-input.separate-dial-code .selected-flag{background-color:rgba(0,0,0,.05);display:table}.intl-tel-input.separate-dial-code .selected-dial-code{display:table-cell;vertical-align:middle;padding-left:28px}.intl-tel-input.separate-dial-code.iti-sdc-2 input,.intl-tel-input.separate-dial-code.iti-sdc-2 input[type=tel],.intl-tel-input.separate-dial-code.iti-sdc-2 input[type=text]{padding-left:66px}.intl-tel-input.separate-dial-code.iti-sdc-2 .selected-flag{width:60px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-2 input,.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-2 input[type=tel],.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-2 input[type=text]{padding-left:76px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-2 .selected-flag{width:70px}.intl-tel-input.separate-dial-code.iti-sdc-3 input,.intl-tel-input.separate-dial-code.iti-sdc-3 input[type=tel],.intl-tel-input.separate-dial-code.iti-sdc-3 input[type=text]{padding-left:74px}.intl-tel-input.separate-dial-code.iti-sdc-3 .selected-flag{width:68px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-3 input,.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-3 input[type=tel],.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-3 input[type=text]{padding-left:84px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-3 .selected-flag{width:78px}.intl-tel-input.separate-dial-code.iti-sdc-4 input,.intl-tel-input.separate-dial-code.iti-sdc-4 input[type=tel],.intl-tel-input.separate-dial-code.iti-sdc-4 input[type=text]{padding-left:82px}.intl-tel-input.separate-dial-code.iti-sdc-4 .selected-flag{width:76px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-4 input,.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-4 input[type=tel],.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-4 input[type=text]{padding-left:92px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-4 .selected-flag{width:86px}.intl-tel-input.separate-dial-code.iti-sdc-5 input,.intl-tel-input.separate-dial-code.iti-sdc-5 input[type=tel],.intl-tel-input.separate-dial-code.iti-sdc-5 input[type=text]{padding-left:90px}.intl-tel-input.separate-dial-code.iti-sdc-5 .selected-flag{width:84px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-5 input,.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-5 input[type=tel],.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-5 input[type=text]{padding-left:100px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-5 .selected-flag{width:94px}.intl-tel-input.iti-container{position:absolute;top:-1000px;left:-1000px;z-index:1060;padding:1px}.intl-tel-input.iti-container:hover{cursor:pointer}.iti-mobile .intl-tel-input.iti-container{top:30px;bottom:30px;left:30px;right:30px;position:fixed}.iti-mobile .intl-tel-input .country-list{max-height:100%;width:100%}.iti-mobile .intl-tel-input .country-list .country{padding:10px 10px;line-height:1.5em}.iti-flag{width:20px}.iti-flag.be{width:18px}.iti-flag.ch{width:15px}.iti-flag.mc{width:19px}.iti-flag.ne{width:18px}.iti-flag.np{width:13px}.iti-flag.va{width:15px}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (-o-min-device-pixel-ratio:2 / 1),only screen and (min-device-pixel-ratio:2),only screen and (min-resolution:192dpi),only screen and (min-resolution:2dppx){.iti-flag{background-size:5630px 15px}}.iti-flag.ac{height:10px;background-position:0 0}.iti-flag.ad{height:14px;background-position:-22px 0}.iti-flag.ae{height:10px;background-position:-44px 0}.iti-flag.af{height:14px;background-position:-66px 0}.iti-flag.ag{height:14px;background-position:-88px 0}.iti-flag.ai{height:10px;background-position:-110px 0}.iti-flag.al{height:15px;background-position:-132px 0}.iti-flag.am{height:10px;background-position:-154px 0}.iti-flag.ao{height:14px;background-position:-176px 0}.iti-flag.aq{height:14px;background-position:-198px 0}.iti-flag.ar{height:13px;background-position:-220px 0}.iti-flag.as{height:10px;background-position:-242px 0}.iti-flag.at{height:14px;background-position:-264px 0}.iti-flag.au{height:10px;background-position:-286px 0}.iti-flag.aw{height:14px;background-position:-308px 0}.iti-flag.ax{height:13px;background-position:-330px 0}.iti-flag.az{height:10px;background-position:-352px 0}.iti-flag.ba{height:10px;background-position:-374px 0}.iti-flag.bb{height:14px;background-position:-396px 0}.iti-flag.bd{height:12px;background-position:-418px 0}.iti-flag.be{height:15px;background-position:-440px 0}.iti-flag.bf{height:14px;background-position:-460px 0}.iti-flag.bg{height:12px;background-position:-482px 0}.iti-flag.bh{height:12px;background-position:-504px 0}.iti-flag.bi{height:12px;background-position:-526px 0}.iti-flag.bj{height:14px;background-position:-548px 0}.iti-flag.bl{height:14px;background-position:-570px 0}.iti-flag.bm{height:10px;background-position:-592px 0}.iti-flag.bn{height:10px;background-position:-614px 0}.iti-flag.bo{height:14px;background-position:-636px 0}.iti-flag.bq{height:14px;background-position:-658px 0}.iti-flag.br{height:14px;background-position:-680px 0}.iti-flag.bs{height:10px;background-position:-702px 0}.iti-flag.bt{height:14px;background-position:-724px 0}.iti-flag.bv{height:15px;background-position:-746px 0}.iti-flag.bw{height:14px;background-position:-768px 0}.iti-flag.by{height:10px;background-position:-790px 0}.iti-flag.bz{height:14px;background-position:-812px 0}.iti-flag.ca{height:10px;background-position:-834px 0}.iti-flag.cc{height:10px;background-position:-856px 0}.iti-flag.cd{height:15px;background-position:-878px 0}.iti-flag.cf{height:14px;background-position:-900px 0}.iti-flag.cg{height:14px;background-position:-922px 0}.iti-flag.ch{height:15px;background-position:-944px 0}.iti-flag.ci{height:14px;background-position:-961px 0}.iti-flag.ck{height:10px;background-position:-983px 0}.iti-flag.cl{height:14px;background-position:-1005px 0}.iti-flag.cm{height:14px;background-position:-1027px 0}.iti-flag.cn{height:14px;background-position:-1049px 0}.iti-flag.co{height:14px;background-position:-1071px 0}.iti-flag.cp{height:14px;background-position:-1093px 0}.iti-flag.cr{height:12px;background-position:-1115px 0}.iti-flag.cu{height:10px;background-position:-1137px 0}.iti-flag.cv{height:12px;background-position:-1159px 0}.iti-flag.cw{height:14px;background-position:-1181px 0}.iti-flag.cx{height:10px;background-position:-1203px 0}.iti-flag.cy{height:13px;background-position:-1225px 0}.iti-flag.cz{height:14px;background-position:-1247px 0}.iti-flag.de{height:12px;background-position:-1269px 0}.iti-flag.dg{height:10px;background-position:-1291px 0}.iti-flag.dj{height:14px;background-position:-1313px 0}.iti-flag.dk{height:15px;background-position:-1335px 0}.iti-flag.dm{height:10px;background-position:-1357px 0}.iti-flag.do{height:13px;background-position:-1379px 0}.iti-flag.dz{height:14px;background-position:-1401px 0}.iti-flag.ea{height:14px;background-position:-1423px 0}.iti-flag.ec{height:14px;background-position:-1445px 0}.iti-flag.ee{height:13px;background-position:-1467px 0}.iti-flag.eg{height:14px;background-position:-1489px 0}.iti-flag.eh{height:10px;background-position:-1511px 0}.iti-flag.er{height:10px;background-position:-1533px 0}.iti-flag.es{height:14px;background-position:-1555px 0}.iti-flag.et{height:10px;background-position:-1577px 0}.iti-flag.eu{height:14px;background-position:-1599px 0}.iti-flag.fi{height:12px;background-position:-1621px 0}.iti-flag.fj{height:10px;background-position:-1643px 0}.iti-flag.fk{height:10px;background-position:-1665px 0}.iti-flag.fm{height:11px;background-position:-1687px 0}.iti-flag.fo{height:15px;background-position:-1709px 0}.iti-flag.fr{height:14px;background-position:-1731px 0}.iti-flag.ga{height:15px;background-position:-1753px 0}.iti-flag.gb{height:10px;background-position:-1775px 0}.iti-flag.gd{height:12px;background-position:-1797px 0}.iti-flag.ge{height:14px;background-position:-1819px 0}.iti-flag.gf{height:14px;background-position:-1841px 0}.iti-flag.gg{height:14px;background-position:-1863px 0}.iti-flag.gh{height:14px;background-position:-1885px 0}.iti-flag.gi{height:10px;background-position:-1907px 0}.iti-flag.gl{height:14px;background-position:-1929px 0}.iti-flag.gm{height:14px;background-position:-1951px 0}.iti-flag.gn{height:14px;background-position:-1973px 0}.iti-flag.gp{height:14px;background-position:-1995px 0}.iti-flag.gq{height:14px;background-position:-2017px 0}.iti-flag.gr{height:14px;background-position:-2039px 0}.iti-flag.gs{height:10px;background-position:-2061px 0}.iti-flag.gt{height:13px;background-position:-2083px 0}.iti-flag.gu{height:11px;background-position:-2105px 0}.iti-flag.gw{height:10px;background-position:-2127px 0}.iti-flag.gy{height:12px;background-position:-2149px 0}.iti-flag.hk{height:14px;background-position:-2171px 0}.iti-flag.hm{height:10px;background-position:-2193px 0}.iti-flag.hn{height:10px;background-position:-2215px 0}.iti-flag.hr{height:10px;background-position:-2237px 0}.iti-flag.ht{height:12px;background-position:-2259px 0}.iti-flag.hu{height:10px;background-position:-2281px 0}.iti-flag.ic{height:14px;background-position:-2303px 0}.iti-flag.id{height:14px;background-position:-2325px 0}.iti-flag.ie{height:10px;background-position:-2347px 0}.iti-flag.il{height:15px;background-position:-2369px 0}.iti-flag.im{height:10px;background-position:-2391px 0}.iti-flag.in{height:14px;background-position:-2413px 0}.iti-flag.io{height:10px;background-position:-2435px 0}.iti-flag.iq{height:14px;background-position:-2457px 0}.iti-flag.ir{height:12px;background-position:-2479px 0}.iti-flag.is{height:15px;background-position:-2501px 0}.iti-flag.it{height:14px;background-position:-2523px 0}.iti-flag.je{height:12px;background-position:-2545px 0}.iti-flag.jm{height:10px;background-position:-2567px 0}.iti-flag.jo{height:10px;background-position:-2589px 0}.iti-flag.jp{height:14px;background-position:-2611px 0}.iti-flag.ke{height:14px;background-position:-2633px 0}.iti-flag.kg{height:12px;background-position:-2655px 0}.iti-flag.kh{height:13px;background-position:-2677px 0}.iti-flag.ki{height:10px;background-position:-2699px 0}.iti-flag.km{height:12px;background-position:-2721px 0}.iti-flag.kn{height:14px;background-position:-2743px 0}.iti-flag.kp{height:10px;background-position:-2765px 0}.iti-flag.kr{height:14px;background-position:-2787px 0}.iti-flag.kw{height:10px;background-position:-2809px 0}.iti-flag.ky{height:10px;background-position:-2831px 0}.iti-flag.kz{height:10px;background-position:-2853px 0}.iti-flag.la{height:14px;background-position:-2875px 0}.iti-flag.lb{height:14px;background-position:-2897px 0}.iti-flag.lc{height:10px;background-position:-2919px 0}.iti-flag.li{height:12px;background-position:-2941px 0}.iti-flag.lk{height:10px;background-position:-2963px 0}.iti-flag.lr{height:11px;background-position:-2985px 0}.iti-flag.ls{height:14px;background-position:-3007px 0}.iti-flag.lt{height:12px;background-position:-3029px 0}.iti-flag.lu{height:12px;background-position:-3051px 0}.iti-flag.lv{height:10px;background-position:-3073px 0}.iti-flag.ly{height:10px;background-position:-3095px 0}.iti-flag.ma{height:14px;background-position:-3117px 0}.iti-flag.mc{height:15px;background-position:-3139px 0}.iti-flag.md{height:10px;background-position:-3160px 0}.iti-flag.me{height:10px;background-position:-3182px 0}.iti-flag.mf{height:14px;background-position:-3204px 0}.iti-flag.mg{height:14px;background-position:-3226px 0}.iti-flag.mh{height:11px;background-position:-3248px 0}.iti-flag.mk{height:10px;background-position:-3270px 0}.iti-flag.ml{height:14px;background-position:-3292px 0}.iti-flag.mm{height:14px;background-position:-3314px 0}.iti-flag.mn{height:10px;background-position:-3336px 0}.iti-flag.mo{height:14px;background-position:-3358px 0}.iti-flag.mp{height:10px;background-position:-3380px 0}.iti-flag.mq{height:14px;background-position:-3402px 0}.iti-flag.mr{height:14px;background-position:-3424px 0}.iti-flag.ms{height:10px;background-position:-3446px 0}.iti-flag.mt{height:14px;background-position:-3468px 0}.iti-flag.mu{height:14px;background-position:-3490px 0}.iti-flag.mv{height:14px;background-position:-3512px 0}.iti-flag.mw{height:14px;background-position:-3534px 0}.iti-flag.mx{height:12px;background-position:-3556px 0}.iti-flag.my{height:10px;background-position:-3578px 0}.iti-flag.mz{height:14px;background-position:-3600px 0}.iti-flag.na{height:14px;background-position:-3622px 0}.iti-flag.nc{height:10px;background-position:-3644px 0}.iti-flag.ne{height:15px;background-position:-3666px 0}.iti-flag.nf{height:10px;background-position:-3686px 0}.iti-flag.ng{height:10px;background-position:-3708px 0}.iti-flag.ni{height:12px;background-position:-3730px 0}.iti-flag.nl{height:14px;background-position:-3752px 0}.iti-flag.no{height:15px;background-position:-3774px 0}.iti-flag.np{height:15px;background-position:-3796px 0}.iti-flag.nr{height:10px;background-position:-3811px 0}.iti-flag.nu{height:10px;background-position:-3833px 0}.iti-flag.nz{height:10px;background-position:-3855px 0}.iti-flag.om{height:10px;background-position:-3877px 0}.iti-flag.pa{height:14px;background-position:-3899px 0}.iti-flag.pe{height:14px;background-position:-3921px 0}.iti-flag.pf{height:14px;background-position:-3943px 0}.iti-flag.pg{height:15px;background-position:-3965px 0}.iti-flag.ph{height:10px;background-position:-3987px 0}.iti-flag.pk{height:14px;background-position:-4009px 0}.iti-flag.pl{height:13px;background-position:-4031px 0}.iti-flag.pm{height:14px;background-position:-4053px 0}.iti-flag.pn{height:10px;background-position:-4075px 0}.iti-flag.pr{height:14px;background-position:-4097px 0}.iti-flag.ps{height:10px;background-position:-4119px 0}.iti-flag.pt{height:14px;background-position:-4141px 0}.iti-flag.pw{height:13px;background-position:-4163px 0}.iti-flag.py{height:11px;background-position:-4185px 0}.iti-flag.qa{height:8px;background-position:-4207px 0}.iti-flag.re{height:14px;background-position:-4229px 0}.iti-flag.ro{height:14px;background-position:-4251px 0}.iti-flag.rs{height:14px;background-position:-4273px 0}.iti-flag.ru{height:14px;background-position:-4295px 0}.iti-flag.rw{height:14px;background-position:-4317px 0}.iti-flag.sa{height:14px;background-position:-4339px 0}.iti-flag.sb{height:10px;background-position:-4361px 0}.iti-flag.sc{height:10px;background-position:-4383px 0}.iti-flag.sd{height:10px;background-position:-4405px 0}.iti-flag.se{height:13px;background-position:-4427px 0}.iti-flag.sg{height:14px;background-position:-4449px 0}.iti-flag.sh{height:10px;background-position:-4471px 0}.iti-flag.si{height:10px;background-position:-4493px 0}.iti-flag.sj{height:15px;background-position:-4515px 0}.iti-flag.sk{height:14px;background-position:-4537px 0}.iti-flag.sl{height:14px;background-position:-4559px 0}.iti-flag.sm{height:15px;background-position:-4581px 0}.iti-flag.sn{height:14px;background-position:-4603px 0}.iti-flag.so{height:14px;background-position:-4625px 0}.iti-flag.sr{height:14px;background-position:-4647px 0}.iti-flag.ss{height:10px;background-position:-4669px 0}.iti-flag.st{height:10px;background-position:-4691px 0}.iti-flag.sv{height:12px;background-position:-4713px 0}.iti-flag.sx{height:14px;background-position:-4735px 0}.iti-flag.sy{height:14px;background-position:-4757px 0}.iti-flag.sz{height:14px;background-position:-4779px 0}.iti-flag.ta{height:10px;background-position:-4801px 0}.iti-flag.tc{height:10px;background-position:-4823px 0}.iti-flag.td{height:14px;background-position:-4845px 0}.iti-flag.tf{height:14px;background-position:-4867px 0}.iti-flag.tg{height:13px;background-position:-4889px 0}.iti-flag.th{height:14px;background-position:-4911px 0}.iti-flag.tj{height:10px;background-position:-4933px 0}.iti-flag.tk{height:10px;background-position:-4955px 0}.iti-flag.tl{height:10px;background-position:-4977px 0}.iti-flag.tm{height:14px;background-position:-4999px 0}.iti-flag.tn{height:14px;background-position:-5021px 0}.iti-flag.to{height:10px;background-position:-5043px 0}.iti-flag.tr{height:14px;background-position:-5065px 0}.iti-flag.tt{height:12px;background-position:-5087px 0}.iti-flag.tv{height:10px;background-position:-5109px 0}.iti-flag.tw{height:14px;background-position:-5131px 0}.iti-flag.tz{height:14px;background-position:-5153px 0}.iti-flag.ua{height:14px;background-position:-5175px 0}.iti-flag.ug{height:14px;background-position:-5197px 0}.iti-flag.um{height:11px;background-position:-5219px 0}.iti-flag.us{height:11px;background-position:-5241px 0}.iti-flag.uy{height:14px;background-position:-5263px 0}.iti-flag.uz{height:10px;background-position:-5285px 0}.iti-flag.va{height:15px;background-position:-5307px 0}.iti-flag.vc{height:14px;background-position:-5324px 0}.iti-flag.ve{height:14px;background-position:-5346px 0}.iti-flag.vg{height:10px;background-position:-5368px 0}.iti-flag.vi{height:14px;background-position:-5390px 0}.iti-flag.vn{height:14px;background-position:-5412px 0}.iti-flag.vu{height:12px;background-position:-5434px 0}.iti-flag.wf{height:14px;background-position:-5456px 0}.iti-flag.ws{height:10px;background-position:-5478px 0}.iti-flag.xk{height:15px;background-position:-5500px 0}.iti-flag.ye{height:14px;background-position:-5522px 0}.iti-flag.yt{height:14px;background-position:-5544px 0}.iti-flag.za{height:14px;background-position:-5566px 0}.iti-flag.zm{height:14px;background-position:-5588px 0}.iti-flag.zw{height:10px;background-position:-5610px 0}.iti-flag{width:20px;height:15px;box-shadow:0 0 1px 0 #888;background-image:url(../images/flags.png);background-repeat:no-repeat;background-color:#dbdbdb;background-position:20px 0}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (-o-min-device-pixel-ratio:2 / 1),only screen and (min-device-pixel-ratio:2),only screen and (min-resolution:192dpi),only screen and (min-resolution:2dppx){.iti-flag{background-image:url(../images/flags@2x.png)}}.iti-flag.np{background-color:transparent}
6
  * Licensed under the MIT license - http://opensource.org/licenses/MIT
7
  *
8
  * Copyright (c) 2016 Daniel Eden
9
+ */.fm-animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.fm-animated.infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.fm-animated.hinge{-webkit-animation-duration:2s;animation-duration:2s}.fm-animated.bounceIn,.fm-animated.bounceOut,.fm-animated.flipOutX,.fm-animated.flipOutY{-webkit-animation-duration:.75s;animation-duration:.75s}@-webkit-keyframes bounce{20%,53%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}@keyframes bounce{20%,53%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}.bounce{-webkit-animation-name:bounce;animation-name:bounce;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes flash{50%,from,to{opacity:1}25%,75%{opacity:0}}@keyframes flash{50%,from,to{opacity:1}25%,75%{opacity:0}}.flash{-webkit-animation-name:flash;animation-name:flash}@-webkit-keyframes pulse{from{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes pulse{from{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.pulse{-webkit-animation-name:pulse;animation-name:pulse}@-webkit-keyframes rubberBand{from{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes rubberBand{from{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.rubberBand{-webkit-animation-name:rubberBand;animation-name:rubberBand}@-webkit-keyframes shake{from,to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes shake{from,to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.shake{-webkit-animation-name:shake;animation-name:shake}@-webkit-keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}.headShake{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-name:headShake;animation-name:headShake}@-webkit-keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0deg)}}@keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0deg)}}.swing{-webkit-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;animation-name:swing}@-webkit-keyframes tada{from{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes tada{from{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.tada{-webkit-animation-name:tada;animation-name:tada}@-webkit-keyframes wobble{from{-webkit-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}to{-webkit-transform:none;transform:none}}@keyframes wobble{from{-webkit-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}to{-webkit-transform:none;transform:none}}.wobble{-webkit-animation-name:wobble;animation-name:wobble}@-webkit-keyframes jello{11.1%,from,to{-webkit-transform:none;transform:none}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skewX(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}@keyframes jello{11.1%,from,to{-webkit-transform:none;transform:none}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skewX(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}.jello{-webkit-animation-name:jello;animation-name:jello;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes bounceIn{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes bounceIn{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.bounceIn{-webkit-animation-name:bounceIn;animation-name:bounceIn}@-webkit-keyframes bounceInDown{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInDown{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}.bounceInDown{-webkit-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInLeft{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}.bounceInLeft{-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInRight{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}.bounceInRight{-webkit-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceInUp{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes bounceInUp{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.bounceInUp{-webkit-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}.bounceOut{-webkit-animation-name:bounceOut;animation-name:bounceOut}@-webkit-keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.bounceOutDown{-webkit-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.bounceOutLeft{-webkit-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.bounceOutRight{-webkit-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.bounceOutUp{-webkit-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}.fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes fadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInDownBig{from{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDownBig{from{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInDownBig{-webkit-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeft{from{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeft{from{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInLeftBig{from{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeftBig{from{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInRightBig{from{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRightBig{from{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInRightBig{-webkit-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInUpBig{from{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUpBig{from{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInUpBig{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeOut{from{opacity:1}to{opacity:0}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}.fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutDown{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes fadeOutDown{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.fadeOutDown{-webkit-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutDownBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes fadeOutDownBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeft{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes fadeOutLeft{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.fadeOutLeft{-webkit-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutLeftBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes fadeOutLeftBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRight{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fadeOutRight{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.fadeOutRight{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutRightBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes fadeOutRightBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes fadeOutUp{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes fadeOutUp{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.fadeOutUp{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutUpBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes fadeOutUpBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes flip{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,-360deg);transform:perspective(400px) rotate3d(0,1,0,-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}@keyframes flip{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,-360deg);transform:perspective(400px) rotate3d(0,1,0,-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}.fm-animated.flip{-webkit-backface-visibility:visible;backface-visibility:visible;-webkit-animation-name:flip;animation-name:flip}@-webkit-keyframes flipInX{from{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInX{from{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInX{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInX;animation-name:flipInX}@-webkit-keyframes flipInY{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInY{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInY;animation-name:flipInY}@-webkit-keyframes flipOutX{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@keyframes flipOutX{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}.flipOutX{-webkit-animation-name:flipOutX;animation-name:flipOutX;-webkit-backface-visibility:visible!important;backface-visibility:visible!important}@-webkit-keyframes flipOutY{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}@keyframes flipOutY{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}.flipOutY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipOutY;animation-name:flipOutY}@-webkit-keyframes lightSpeedIn{from{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}to{-webkit-transform:none;transform:none;opacity:1}}@keyframes lightSpeedIn{from{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}to{-webkit-transform:none;transform:none;opacity:1}}.lightSpeedIn{-webkit-animation-name:lightSpeedIn;animation-name:lightSpeedIn;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedOut{from{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}@keyframes lightSpeedOut{from{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}.lightSpeedOut{-webkit-animation-name:lightSpeedOut;animation-name:lightSpeedOut;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes rotateIn{from{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateIn{from{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}.rotateIn{-webkit-animation-name:rotateIn;animation-name:rotateIn}@-webkit-keyframes rotateInDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft}@-webkit-keyframes rotateInDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInDownRight{-webkit-animation-name:rotateInDownRight;animation-name:rotateInDownRight}@-webkit-keyframes rotateInUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft}@-webkit-keyframes rotateInUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInUpRight{-webkit-animation-name:rotateInUpRight;animation-name:rotateInUpRight}@-webkit-keyframes rotateOut{from{-webkit-transform-origin:center;transform-origin:center;opacity:1}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}@keyframes rotateOut{from{-webkit-transform-origin:center;transform-origin:center;opacity:1}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}.rotateOut{-webkit-animation-name:rotateOut;animation-name:rotateOut}@-webkit-keyframes rotateOutDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}@keyframes rotateOutDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}.rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft}@-webkit-keyframes rotateOutDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight}@-webkit-keyframes rotateOutUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft}@-webkit-keyframes rotateOutUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}@keyframes rotateOutUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}.rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight}@-webkit-keyframes hinge{0%{-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}@keyframes hinge{0%{-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}.hinge{-webkit-animation-name:hinge;animation-name:hinge}@-webkit-keyframes rollIn{from{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes rollIn{from{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:none;transform:none}}.rollIn{-webkit-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}@keyframes rollOut{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}.rollOut{-webkit-animation-name:rollOut;animation-name:rollOut}@-webkit-keyframes zoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}.zoomIn{-webkit-animation-name:zoomIn;animation-name:zoomIn}@-webkit-keyframes zoomInDown{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInDown{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInDown{-webkit-animation-name:zoomInDown;animation-name:zoomInDown}@-webkit-keyframes zoomInLeft{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInLeft{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInLeft{-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft}@-webkit-keyframes zoomInRight{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInRight{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInRight{-webkit-animation-name:zoomInRight;animation-name:zoomInRight}@-webkit-keyframes zoomInUp{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInUp{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInUp{-webkit-animation-name:zoomInUp;animation-name:zoomInUp}@-webkit-keyframes zoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes zoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}.zoomOut{-webkit-animation-name:zoomOut;animation-name:zoomOut}@-webkit-keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomOutDown{-webkit-animation-name:zoomOutDown;animation-name:zoomOutDown}@-webkit-keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}@keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}.zoomOutLeft{-webkit-animation-name:zoomOutLeft;animation-name:zoomOutLeft}@-webkit-keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}@keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}.zoomOutRight{-webkit-animation-name:zoomOutRight;animation-name:zoomOutRight}@-webkit-keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomOutUp{-webkit-animation-name:zoomOutUp;animation-name:zoomOutUp}@-webkit-keyframes slideInDown{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInDown{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInDown{-webkit-animation-name:slideInDown;animation-name:slideInDown}@-webkit-keyframes slideInLeft{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInLeft{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInLeft{-webkit-animation-name:slideInLeft;animation-name:slideInLeft}@-webkit-keyframes slideInRight{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInRight{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInRight{-webkit-animation-name:slideInRight;animation-name:slideInRight}@-webkit-keyframes slideInUp{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInUp{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInUp{-webkit-animation-name:slideInUp;animation-name:slideInUp}@-webkit-keyframes slideOutDown{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes slideOutDown{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.slideOutDown{-webkit-animation-name:slideOutDown;animation-name:slideOutDown}@-webkit-keyframes slideOutLeft{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes slideOutLeft{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.slideOutLeft{-webkit-animation-name:slideOutLeft;animation-name:slideOutLeft}@-webkit-keyframes slideOutRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes slideOutRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.slideOutRight{-webkit-animation-name:slideOutRight;animation-name:slideOutRight}@-webkit-keyframes slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.slideOutUp{-webkit-animation-name:slideOutUp;animation-name:slideOutUp}.fm-form *{box-sizing:border-box}.wdform_map img{max-width:none!important}.wdform_row .wdform-field .wdform_map{width:inherit!important}.checkbox-div,.checkbox-div *,.radio-div,.radio-div *,.wdform-page-button{-moz-box-sizing:content-box!important;box-sizing:content-box!important;-webkit-box-sizing:content-box!important}.page_percentage_deactive,.page_percentage_deactive *{word-wrap:normal}.wdform_percentage_arrow,.wdform_percentage_text{vertical-align:top!important}div[type=type_button],div[type=type_submit_reset]{justify-content:flex-end}div[type=type_captcha] .wdform-element-section *{vertical-align:middle}.file-upload-status{direction:inherit!important}.fm_datepicker.ui-datepicker{z-index:1000!important;font-size:15px!important;background:#f2f2f2!important;border:1px solid #f2f2f2!important;color:#777!important}.fm_datepicker .ui-widget-header{border:1px solid #e2e2e2!important;background:#e6e6e6!important;color:#cc0c0c}.fm_datepicker .ui-state-default,.fm_datepicker .ui-widget-content .ui-state-default,.fm_datepicker .ui-widget-header .ui-state-default{border:1px solid #e3e3e3!important;background:#fff!important;color:#8c8c8c!important}.fm_datepicker .ui-state-focus,.fm_datepicker .ui-state-hover,.fm_datepicker .ui-widget-content .ui-state-focus,.fm_datepicker .ui-widget-content .ui-state-hover,.fm_datepicker .ui-widget-header .ui-state-focus,.fm_datepicker .ui-widget-header .ui-state-hover{border:1px solid #d2d2d2!important;background:#dcdcdc!important;font-weight:700!important}.fm_datepicker .ui-state-highlight,.fm_datepicker .ui-widget-content .ui-state-highlight,.fm_datepicker .ui-widget-header .ui-state-highlight{border:1px solid #a9a9a9!important;background:#a9a9a9!important;color:#fff!important}.fm_datepicker .ui-state-active,.fm_datepicker .ui-widget-content .ui-state-active,.fm_datepicker .ui-widget-header .ui-state-active{border:1px solid #a2a2a2!important;background:#dcdcdc!important;color:#272727!important}.fm_datepicker .ui-icon,.fm_datepicker .ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)!important}.fm_datepicker.ui-datepicker{font-size:15px!important}.fm_datepicker.ui-datepicker{background:#f2f2f2!important;border:1px solid #f2f2f2!important;color:#777!important}.fm_datepicker .ui-widget-header{border:1px solid #e2e2e2!important;background:#e6e6e6!important;color:#cc0c0c}.fm_datepicker .ui-state-default,.fm_datepicker .ui-widget-content .ui-state-default,.fm_datepicker .ui-widget-header .ui-state-default{border:1px solid #e3e3e3!important;background:#fff!important;color:#8c8c8c!important}.fm_datepicker .ui-state-focus,.fm_datepicker .ui-state-hover,.fm_datepicker .ui-widget-content .ui-state-focus,.fm_datepicker .ui-widget-content .ui-state-hover,.fm_datepicker .ui-widget-header .ui-state-focus,.fm_datepicker .ui-widget-header .ui-state-hover{border:1px solid #d2d2d2!important;background:#dcdcdc!important;font-weight:700!important}.fm_datepicker .ui-state-highlight,.fm_datepicker .ui-widget-content .ui-state-highlight,.fm_datepicker .ui-widget-header .ui-state-highlight{border:1px solid #a9a9a9!important;background:#a9a9a9!important;color:#fff!important}.fm_datepicker .ui-state-active,.fm_datepicker .ui-widget-content .ui-state-active,.fm_datepicker .ui-widget-header .ui-state-active{border:1px solid #a2a2a2!important;background:#dcdcdc!important;color:#272727!important}.fm_datepicker .ui-icon,.fm_datepicker .ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)!important}.fm_datepicker#ui-datepicker-div{z-index:2147483647!important}.error_label,.error_label_check_mail,.error_label_check_pass,.error_label_confirm,.error_label_exp,.error_label_price,.error_label_upload,.wd-error-label{color:red!important}.fm-not-filled{color:red;font-size:13px;width:100%;padding-left:10px}.fm-form-container .fm-form div[type=type_phone_new] input[type=text]{padding-right:6px!important;padding-left:52px!important}.fm-form .other_input{max-width:150px}.fm-form a,.fm-form a:focus,.fm-form input,.fm-form input:focus,.fm-form select,.fm-form select:focus,.fm-form textarea,.fm-form textarea:focus{outline:0!important}.fm-form a,.fm-form button{cursor:pointer}.fm-form label{display:inline}.fm-form .wdform_section{display:flex;display:-webkit-flex;-webkit-flex-direction:row;flex-direction:row}.fm-form .wdform_column:first-child:nth-last-child(1){width:100%}.fm-form .wdform_column:first-child:nth-last-child(2),.fm-form .wdform_column:first-child:nth-last-child(2)~.wdform_column{width:50%}.fm-form .wdform_column:first-child:nth-last-child(3),.fm-form .wdform_column:first-child:nth-last-child(3)~.wdform_column{width:33.33%}.fm-form .wdform_column:first-child:nth-last-child(4),.fm-form .wdform_column:first-child:nth-last-child(4)~.wdform_column{width:25%}.fm-form .wdform_column:first-child:nth-last-child(5),.fm-form .wdform_column:first-child:nth-last-child(5)~.wdform_column{width:20%}.fm-form .wdform-field:not([type=type_hidden]){padding:10px 10px}.fm-form .wdform-label-section{text-align:left;margin-bottom:5px}div[type=type_file_upload] .wdform-element-section,div[type=type_submit_reset] .wdform-element-section{min-width:inherit}.wdform-element-section{text-align:left;line-height:initial}.fm-topbar{width:100%;left:0;z-index:999999}.fm-scrollbox{box-sizing:border-box;position:fixed;transition:bottom .4s ease 0s;z-index:999999;opacity:1;bottom:0}.fm-popover-content,.fm-scrollbox-form{width:100%}.fm-scrollbox-form.float-right{float:right}.fm-scrollbox-form.float-left{float:left}.fm-minimize-text{position:fixed;transition:bottom .4s ease 0s;z-index:99999;opacity:1;bottom:0;width:100%}.fm-popover-background{position:fixed;background-color:#000;left:0;top:0;width:100%;height:100%;z-index:1100000001;opacity:.7}.fm-popover{box-sizing:border-box;position:fixed;left:0;top:0;overflow:auto;width:100%;height:100%;outline:0!important;display:block;z-index:1100000002}.fm-popover-container{position:absolute;width:100%;height:100%;left:0;top:0;padding:20px 10px;box-sizing:border-box;text-align:center}.fm-popover-container:before{content:'';display:inline-block;height:100%;vertical-align:middle}.fm-popover-inner-background{position:absolute;width:100%;height:100%;left:0;top:0;z-index:1100000003}.fm-popover-content{position:relative;display:inline-block;max-width:95%;vertical-align:middle;margin:0 auto;text-align:left;z-index:1100000005}.fm-form .wdform-date{width:120px;vertical-align:top}.wdform_grading{margin:2px}.wdform_grading input{display:inline}.fm-form .wdform-page-button{display:inline-block;outline:0;cursor:pointer}.fm-form .page_active,.fm-form .page_deactive{text-align:center;display:inline-block;cursor:pointer}.fm-form .page_percentage_active,.fm-form .page_percentage_deactive{display:inline-block}.fm-form .wdform-section-break-div{border:none}.fm-form .wdform_tr_section_break{clear:both}.fm-form .captcha_refresh{width:30px;height:30px;border-width:0;margin:0;padding:0;vertical-align:middle;cursor:pointer;background-image:url(../images/refresh_black.png)}.fm-form .fm-right label span{float:right;left:5px;position:relative;top:5px}.fm-form .checkbox-div label,.fm-form .radio-div{margin:0 5px}.fm-form .if-ie-div-label{opacity:1!important}.fm-form .wdform-matrix-cell select{width:60px}.fm-form .wdform-matrix-table{display:table;border-spacing:0}.fm-form .wdform-matrix-column{text-align:left;display:table-cell}.fm-form .wdform-matrix-cell{text-align:center;display:table-cell;padding:6px 10px}.fm-form .wdform-matrix-head>div{display:table-cell;text-align:center}.fm-form .wdform-matrix-head{display:table-row}.fm-form .wdform-matrix-row0{background:#dfdfdf;display:table-row}.fm-form .wdform-matrix-row1{background:#e9e9e9;display:table-row}.fm-form .paypal-property .wdform-quantity{width:55px}.fm-form .paypal-property select{width:85px}.wdform_map img{max-width:none!important}.wdform_row .wdform-field .wdform_map{width:inherit!important}.checkbox-div,.checkbox-div *,.radio-div,.radio-div *,.wdform-page-button{-moz-box-sizing:content-box!important;box-sizing:content-box!important;-webkit-box-sizing:content-box!important}.page_percentage_deactive,.page_percentage_deactive *{word-wrap:normal}.wdform_percentage_arrow,.wdform_percentage_text{vertical-align:top!important}.fm_hide_mobile{display:none!important}.fm-hide{display:none!important}.fm-show{display:block!important}.fm-align-right{text-align:right}.fm-align-left{text-align:left}.fm-align-center{text-align:center}.fm-form .file-upload-status{position:static;direction:inherit!important}.fm-form .wdform_page{display:block!important;margin:0!important;float:none!important}.fm_mobile_full{width:100%!important;padding:0 5%!important}.fm-clear{content:'';display:block;clear:both}.fm-topbar .fm-header-bg{display:table-cell;vertical-align:middle}.fm-topbar .fm-header{display:table-cell}.fm-header{vertical-align:middle;display:table}.image_left_right .fm-header-img{display:table-cell;vertical-align:middle;text-align:center}.image_left_right .fm-header-text{display:table-cell;vertical-align:middle}@media screen and (max-width:768px){.fm-minimize-text,.fm-popover-content,.fm-scrollbox-form{width:95%!important}.fm-form-container .fm-scrollbox{width:97%!important}}@media screen and (max-width:480px){.fm-form{width:100%!important}.wdform-page-and-images{padding:0!important}.wdform_column{padding:2px!important}.image_left_right .fm-header-img,.image_left_right .fm-header-text{display:block}.fm-form .g-recaptcha:not([data-size=invisible]){transform:scale(.77);-webkit-transform:scale(.77);transform-origin:0 0;-webkit-transform-origin:0 0}}@media screen and (min-width:481px) and (max-width:768px){.fm-form{width:100%!important}.image_left_right .fm-header-img,.image_left_right .fm-header-text{display:block}}.fm-form-container .fm-form .fm-message{width:100%;color:#333;margin:0 0 15px 0;padding:15px 15px;text-align:left}.fm-form-container .fm-form .fm-message.fm-notice-success{background:#e0ffc7;border:1px solid #b4d39b}.fm-form-container .fm-form .fm-message.fm-notice-error{background:#fbeaea;border:1px solid #eed3d7}.fm-form-container .fm-form .fm-message.fm-warning-error{background:#fff8e5;border:1px solid #ffb900}.fm-form-container .fm-form .fm-message.fm-notice-dismiss{background:#deefff;border:1px solid #5b9dd9}.fm-form .wd-float-left{float:left}.fm-form .wd-float-right{float:right}.fm-form .wd-hidden{display:none}.fm-form .wd-block{display:block}.fm-form .wd-inline-block{display:inline-block}.fm-form .wd-table{display:table}.fm-form .wd-table-group{display:table-row-group}.fm-form .wd-table-cell{display:table-cell}.fm-form .wd-table-row{display:table-row}.fm-form .wd-vertical-middle{vertical-align:middle}.fm-form .wd-vertical-top{vertical-align:top}.fm-form .wd-width-100{width:100%}.fm-form .wd-width-90{width:90%}.fm-form .wd-width-80{width:80%}.fm-form .wd-width-70{width:70%}.fm-form .wd-width-60{width:60%}.fm-form .wd-width-50{width:50%}.fm-form .wd-width-40{width:40%}.fm-form .wd-width-49{width:49%}.fm-form .wd-width-33{width:33.3%}.fm-form .wd-width-30{width:30%}.fm-form .wd-width-20{width:20%}.fm-form .wd-width-10{width:10%}.fm-form .wd-width-5{width:5%}.fm-form .time_box{text-align:right;width:50px}.fm-form-container .fm-form .wdform_row select.am_pm_select{background-size:0;vertical-align:middle}.fm-form .wd-name-separator{margin:0 4px;padding:0}.fm-form .wd-clear{clear:both}.checkbox-div-right{margin:3px 8px 0 0}.fm-form .wd-paypal-cent{width:30px}.fm-form .paypal-property{margin-top:5px}.fm-form .wd-scale-rating{border-spacing:7px}.fm-form .wdform_grading input{width:70px}.fm-form .wdform_grading label{margin-left:5px}.fm-form .wd-calendar-button{width:20px;height:20px;margin:0 0 0 -25px;color:inherit;font-size:20px}.rtl .fm-form .wd-calendar-button{margin:0 -25px 0 0}input[type=number].wd-type-number::-webkit-inner-spin-button,input[type=number].wd-type-number::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number].wd-type-number{-moz-appearance:textfield;appearance:none}.fm-form .button-reset:not(:last-child),.fm-form .button-submit{margin-right:15px;position:relative}.fm-form .ui-spinner input[type=number]{border:none}.rtl .wdform-label-section.wd-float-left{float:right;text-align:right}.rtl .fm-form .intl-tel-input .selected-flag{padding:0 8px 0 0}.rtl .wdform-element-section{text-align:right}.rtl .ui-spinner input{text-align:left}.rtl .fm-form-container .fm-form div[type=type_phone_new] input[type=text]{padding-left:6px!important;padding-right:52px!important}.rtl .fm-form .wdform-label-section{text-align:right}.rtl .fm-form .button-submit{margin-left:15px;margin-right:0}.fm-form-container .fm-form{display:block;background:0 0;border:none!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.fm-form-container .fm-form .image_left_right.fm-header{padding:0!important}.fm-form-container .fm-form.header_left_right .wdform-page-and-images{display:table-cell}.fm-form-container .fm-form.header_left_right .fm-header{display:table-cell!important;vertical-align:middle}.fm-form-container .fm-minimize-text div{background-color:#fff;border:none!important;cursor:pointer;color:#444}.fm-form-container .fm-minimize-text div:hover{border:none!important;outline:0;cursor:pointer}.fm-form-container .fm-pages .page_active,.fm-form-container .fm-pages .page_deactive{cursor:pointer}.fm-form-container .fm-pages .page_percentage_active{min-width:7%}.fm-form-container .fm-action-buttons{font-family:monospace;text-align:center;cursor:pointer}.fm-form-container .fm-form .checkbox-div label span,.fm-form-container .fm-form .radio-div label span{border:none;display:inline-block;vertical-align:middle}.fm-form-container .fm-form .checkbox-div input[type=checkbox]:checked label span:after,.fm-form-container .fm-form .radio-div input[type=radio]:checked label span:after{content:"";display:block}.fm-form-container .fm-form input[type=number].time_box{min-width:45px}.fm-form-container .fm-popover .fm-popover-content,.fm-form-container .fm-scrollbox .fm-scrollbox-form{position:relative}.fm-form-container .fm-popover .fm-form,.fm-form-container .fm-scrollbox .fm-form,.fm-form-container .fm-topbar .fm-form{background:#fff;border:1px solid #ccc}@media screen and (max-width:768px){.fm-form .wdform_section{-webkit-flex-direction:column;flex-direction:column}.fm-form .wdform_column{width:100%!important}.fm-form-container .fm-form .wdform-field{-webkit-flex-direction:column;flex-direction:column}.fm-form-container .fm-form .wdform-element-section,.fm-form-container .fm-form .wdform-label-section{width:100%}}.fm-form .wd-flex{display:flex;display:-webkit-flex}.fm-form .wd-flex-column{-webkit-flex-direction:column;flex-direction:column}.fm-form .wd-flex-row{-webkit-flex-direction:row;flex-direction:row}.fm-form .wd-flex-row-reverse{-webkit-flex-direction:row-reverse;flex-direction:row-reverse}.fm-form .wd-flex-wrap{-webkit-flex-wrap:wrap;flex-wrap:wrap}.fm-form .wd-align-items{-webkit-align-items:baseline;align-items:baseline}.fm-form .wdform_row .wd-align-items-center{-webkit-align-items:center;align-items:center}.fm-form .wd-justify-content{-webkit-justify-content:space-between;justify-content:space-between}.fm-form .wd-justify-content-left{-webkit-justify-content:flex-start;justify-content:flex-start}.fm-form .wd-justify-content-right{-webkit-justify-content:flex-end;justify-content:flex-end}.fm-form .wd-justify-content-center{-webkit-justify-content:center;justify-content:center}.fm-form .wdform-field{-webkit-align-items:baseline;align-items:baseline}.checkbox-div.wd-flex,.fm-form .wdform-element-section{-webkit-align-items:baseline;align-items:baseline}.fm-form .wd-choice{align-items:center;margin:0 5px 5px 5px}.fm-form textarea{resize:vertical}.fm-form .intl-tel-input{width:100%}.fm-form .wd-address{padding-bottom:8px}.fm-form .wd-choice label{cursor:pointer;margin:0 5px;word-break:break-all}.fm-form div[type=type_date_new] .wdform-element-section,.fm-form div[type=type_date_range] .wdform-element-section{align-items:center}.fm-form div[class^=div_total]{margin-bottom:10px}.fm-form div[class^=paypal_tax]{margin-top:10px}.fm-form .ui-slider-handle,.fm-form .ui-slider-range{padding:0!important}.fm-form label[for]{cursor:pointer}.fm-form .wdform-required{margin:0 5px}.fm-form .fm-header-description{text-align:justify}.wdform_star_rating img{cursor:pointer}.fm-message p{margin:0!important;padding:0!important}.arithmetic_captcha_img,.captcha_img{margin:0}div[type=type_slider] .label{color:inherit;background:0 0}.fm-form .form-group{margin:0;padding:0}.fm-form-container .fm-form .fm-gdpr-checkbox{display:initial!important;margin-right:5px}.fm-form .wdform_row{position:relative}.fm-form-builder .wdform_page{display:flex}.fm-form-builder .wdform_section{flex-direction:column;flex:1}.fm-form-builder .wdform_row{flex:1}.wdform_column{display:flex;flex-direction:column}.fm-form-builder .wdform_column{width:initial!important;flex-direction:row}.fm-form-builder .wdform_section{display:inline-block;flex-wrap:unset;vertical-align:top}.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(1){width:100%}.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(2),.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(2)~.wdform_section{width:100%}.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(3),.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(3)~.wdform_section{width:50%}.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(4),.fm-form .fm-form-builder .wdform_section:first-child:nth-last-child(4)~.wdform_section{width:33.33%}@media screen and (max-width:768px){.fm-form .fm-form-builder .wdform_column,.fm-form .fm-form-builder .wdform_section{width:100%!important}.fm-form-container .fm-form-builder .fm-form .wdform-element-section,.fm-form-container .fm-form-builder .fm-form .wdform-label-section{width:100%}}.fm-loading{width:100%;height:100%;top:0;left:0;position:absolute;background-color:rgba(0,0,0,.25);background-image:url(../images/spinner.gif);background-position:center;background-repeat:no-repeat;background-size:10%;z-index:100100}.fm-submit-loading{display:none;margin:0 5px;position:relative;vertical-align:top}.fm-submit-loading.spinner:before{right:0}@keyframes spinner{to{transform:rotate(360deg)}}.fm-submit-loading.spinner:before{box-sizing:border-box;position:absolute;animation:spinner .6s linear infinite}.fm-col-1{flex:0 1 100%!important;width:100%!important}.fm-col-2{flex:0 1 50%!important;width:50%!important}.fm-col-3{flex:0 1 33.33%!important;width:33.33%!important}.fm-col-4{flex:0 1 25%!important;width:25%!important}#div_percentage,.wdform_percentage_arrow,.wdform_percentage_title{display:inline-block}.wdform_percentage_title{margin-left:5px}.button-submit[disabled]{opacity:.5;pointer-events:none}.intl-tel-input{position:relative;display:inline-block}.intl-tel-input *{box-sizing:border-box;-moz-box-sizing:border-box}.intl-tel-input .hide{display:none}.intl-tel-input .v-hide{visibility:hidden}.intl-tel-input input,.intl-tel-input input[type=tel],.intl-tel-input input[type=text]{position:relative;z-index:0;margin-top:0!important;margin-bottom:0!important;padding-right:36px;margin-right:0}.intl-tel-input .flag-container{position:absolute;top:0;bottom:0;right:0;padding:1px}.intl-tel-input .selected-flag{z-index:1;position:relative;width:36px;height:100%;padding:0 0 0 8px}.intl-tel-input .selected-flag .iti-flag{position:absolute;top:0;bottom:0;margin:auto}.intl-tel-input .selected-flag .iti-arrow{position:absolute;top:50%;margin-top:-2px;right:6px;width:0;height:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:4px solid #555}.rtl .intl-tel-input .selected-flag .iti-arrow{left:6px;right:auto}.intl-tel-input .selected-flag .iti-arrow.up{border-top:none;border-bottom:4px solid #555}.intl-tel-input .country-list{position:absolute;z-index:2;list-style:none;text-align:left;padding:0;margin:0 0 0 -1px;box-shadow:1px 1px 4px rgba(0,0,0,.2);background-color:#fff;border:1px solid #ccc;white-space:nowrap;max-height:200px;overflow-y:scroll}.intl-tel-input .country-list.dropup{bottom:100%;margin-bottom:-1px}.intl-tel-input .country-list .flag-box{display:inline-block;width:20px}@media (max-width:500px){.intl-tel-input .country-list{white-space:normal}}.intl-tel-input .country-list .divider{padding-bottom:5px;margin-bottom:5px;border-bottom:1px solid #ccc}.intl-tel-input .country-list .country{padding:5px 10px}.intl-tel-input .country-list .country .dial-code{color:#999}.intl-tel-input .country-list .country.highlight{background-color:rgba(0,0,0,.05)}.intl-tel-input .country-list .country-name,.intl-tel-input .country-list .dial-code,.intl-tel-input .country-list .flag-box{vertical-align:middle}.intl-tel-input .country-list .country-name,.intl-tel-input .country-list .flag-box{margin-right:6px}.intl-tel-input.allow-dropdown input,.intl-tel-input.allow-dropdown input[type=tel],.intl-tel-input.allow-dropdown input[type=text],.intl-tel-input.separate-dial-code input,.intl-tel-input.separate-dial-code input[type=tel],.intl-tel-input.separate-dial-code input[type=text]{padding-right:6px;padding-left:52px;margin-left:0}.intl-tel-input.allow-dropdown .flag-container,.intl-tel-input.separate-dial-code .flag-container{right:auto;left:0}.rtl .intl-tel-input.allow-dropdown .flag-container,.rtl .intl-tel-input.separate-dial-code .flag-container{left:auto;right:0}.intl-tel-input.allow-dropdown .selected-flag,.intl-tel-input.separate-dial-code .selected-flag{width:46px}.intl-tel-input.allow-dropdown .flag-container:hover{cursor:pointer}.intl-tel-input.allow-dropdown .flag-container:hover .selected-flag{background-color:rgba(0,0,0,.05)}.intl-tel-input.allow-dropdown input[disabled]+.flag-container:hover,.intl-tel-input.allow-dropdown input[readonly]+.flag-container:hover{cursor:default}.intl-tel-input.allow-dropdown input[disabled]+.flag-container:hover .selected-flag,.intl-tel-input.allow-dropdown input[readonly]+.flag-container:hover .selected-flag{background-color:transparent}.intl-tel-input.separate-dial-code .selected-flag{background-color:rgba(0,0,0,.05);display:table}.intl-tel-input.separate-dial-code .selected-dial-code{display:table-cell;vertical-align:middle;padding-left:28px}.intl-tel-input.separate-dial-code.iti-sdc-2 input,.intl-tel-input.separate-dial-code.iti-sdc-2 input[type=tel],.intl-tel-input.separate-dial-code.iti-sdc-2 input[type=text]{padding-left:66px}.intl-tel-input.separate-dial-code.iti-sdc-2 .selected-flag{width:60px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-2 input,.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-2 input[type=tel],.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-2 input[type=text]{padding-left:76px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-2 .selected-flag{width:70px}.intl-tel-input.separate-dial-code.iti-sdc-3 input,.intl-tel-input.separate-dial-code.iti-sdc-3 input[type=tel],.intl-tel-input.separate-dial-code.iti-sdc-3 input[type=text]{padding-left:74px}.intl-tel-input.separate-dial-code.iti-sdc-3 .selected-flag{width:68px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-3 input,.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-3 input[type=tel],.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-3 input[type=text]{padding-left:84px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-3 .selected-flag{width:78px}.intl-tel-input.separate-dial-code.iti-sdc-4 input,.intl-tel-input.separate-dial-code.iti-sdc-4 input[type=tel],.intl-tel-input.separate-dial-code.iti-sdc-4 input[type=text]{padding-left:82px}.intl-tel-input.separate-dial-code.iti-sdc-4 .selected-flag{width:76px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-4 input,.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-4 input[type=tel],.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-4 input[type=text]{padding-left:92px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-4 .selected-flag{width:86px}.intl-tel-input.separate-dial-code.iti-sdc-5 input,.intl-tel-input.separate-dial-code.iti-sdc-5 input[type=tel],.intl-tel-input.separate-dial-code.iti-sdc-5 input[type=text]{padding-left:90px}.intl-tel-input.separate-dial-code.iti-sdc-5 .selected-flag{width:84px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-5 input,.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-5 input[type=tel],.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-5 input[type=text]{padding-left:100px}.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-5 .selected-flag{width:94px}.intl-tel-input.iti-container{position:absolute;top:-1000px;left:-1000px;z-index:1060;padding:1px}.intl-tel-input.iti-container:hover{cursor:pointer}.iti-mobile .intl-tel-input.iti-container{top:30px;bottom:30px;left:30px;right:30px;position:fixed}.iti-mobile .intl-tel-input .country-list{max-height:100%;width:100%}.iti-mobile .intl-tel-input .country-list .country{padding:10px 10px;line-height:1.5em}.iti-flag{width:20px}.iti-flag.be{width:18px}.iti-flag.ch{width:15px}.iti-flag.mc{width:19px}.iti-flag.ne{width:18px}.iti-flag.np{width:13px}.iti-flag.va{width:15px}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (-o-min-device-pixel-ratio:2 / 1),only screen and (min-device-pixel-ratio:2),only screen and (min-resolution:192dpi),only screen and (min-resolution:2dppx){.iti-flag{background-size:5630px 15px}}.iti-flag.ac{height:10px;background-position:0 0}.iti-flag.ad{height:14px;background-position:-22px 0}.iti-flag.ae{height:10px;background-position:-44px 0}.iti-flag.af{height:14px;background-position:-66px 0}.iti-flag.ag{height:14px;background-position:-88px 0}.iti-flag.ai{height:10px;background-position:-110px 0}.iti-flag.al{height:15px;background-position:-132px 0}.iti-flag.am{height:10px;background-position:-154px 0}.iti-flag.ao{height:14px;background-position:-176px 0}.iti-flag.aq{height:14px;background-position:-198px 0}.iti-flag.ar{height:13px;background-position:-220px 0}.iti-flag.as{height:10px;background-position:-242px 0}.iti-flag.at{height:14px;background-position:-264px 0}.iti-flag.au{height:10px;background-position:-286px 0}.iti-flag.aw{height:14px;background-position:-308px 0}.iti-flag.ax{height:13px;background-position:-330px 0}.iti-flag.az{height:10px;background-position:-352px 0}.iti-flag.ba{height:10px;background-position:-374px 0}.iti-flag.bb{height:14px;background-position:-396px 0}.iti-flag.bd{height:12px;background-position:-418px 0}.iti-flag.be{height:15px;background-position:-440px 0}.iti-flag.bf{height:14px;background-position:-460px 0}.iti-flag.bg{height:12px;background-position:-482px 0}.iti-flag.bh{height:12px;background-position:-504px 0}.iti-flag.bi{height:12px;background-position:-526px 0}.iti-flag.bj{height:14px;background-position:-548px 0}.iti-flag.bl{height:14px;background-position:-570px 0}.iti-flag.bm{height:10px;background-position:-592px 0}.iti-flag.bn{height:10px;background-position:-614px 0}.iti-flag.bo{height:14px;background-position:-636px 0}.iti-flag.bq{height:14px;background-position:-658px 0}.iti-flag.br{height:14px;background-position:-680px 0}.iti-flag.bs{height:10px;background-position:-702px 0}.iti-flag.bt{height:14px;background-position:-724px 0}.iti-flag.bv{height:15px;background-position:-746px 0}.iti-flag.bw{height:14px;background-position:-768px 0}.iti-flag.by{height:10px;background-position:-790px 0}.iti-flag.bz{height:14px;background-position:-812px 0}.iti-flag.ca{height:10px;background-position:-834px 0}.iti-flag.cc{height:10px;background-position:-856px 0}.iti-flag.cd{height:15px;background-position:-878px 0}.iti-flag.cf{height:14px;background-position:-900px 0}.iti-flag.cg{height:14px;background-position:-922px 0}.iti-flag.ch{height:15px;background-position:-944px 0}.iti-flag.ci{height:14px;background-position:-961px 0}.iti-flag.ck{height:10px;background-position:-983px 0}.iti-flag.cl{height:14px;background-position:-1005px 0}.iti-flag.cm{height:14px;background-position:-1027px 0}.iti-flag.cn{height:14px;background-position:-1049px 0}.iti-flag.co{height:14px;background-position:-1071px 0}.iti-flag.cp{height:14px;background-position:-1093px 0}.iti-flag.cr{height:12px;background-position:-1115px 0}.iti-flag.cu{height:10px;background-position:-1137px 0}.iti-flag.cv{height:12px;background-position:-1159px 0}.iti-flag.cw{height:14px;background-position:-1181px 0}.iti-flag.cx{height:10px;background-position:-1203px 0}.iti-flag.cy{height:13px;background-position:-1225px 0}.iti-flag.cz{height:14px;background-position:-1247px 0}.iti-flag.de{height:12px;background-position:-1269px 0}.iti-flag.dg{height:10px;background-position:-1291px 0}.iti-flag.dj{height:14px;background-position:-1313px 0}.iti-flag.dk{height:15px;background-position:-1335px 0}.iti-flag.dm{height:10px;background-position:-1357px 0}.iti-flag.do{height:13px;background-position:-1379px 0}.iti-flag.dz{height:14px;background-position:-1401px 0}.iti-flag.ea{height:14px;background-position:-1423px 0}.iti-flag.ec{height:14px;background-position:-1445px 0}.iti-flag.ee{height:13px;background-position:-1467px 0}.iti-flag.eg{height:14px;background-position:-1489px 0}.iti-flag.eh{height:10px;background-position:-1511px 0}.iti-flag.er{height:10px;background-position:-1533px 0}.iti-flag.es{height:14px;background-position:-1555px 0}.iti-flag.et{height:10px;background-position:-1577px 0}.iti-flag.eu{height:14px;background-position:-1599px 0}.iti-flag.fi{height:12px;background-position:-1621px 0}.iti-flag.fj{height:10px;background-position:-1643px 0}.iti-flag.fk{height:10px;background-position:-1665px 0}.iti-flag.fm{height:11px;background-position:-1687px 0}.iti-flag.fo{height:15px;background-position:-1709px 0}.iti-flag.fr{height:14px;background-position:-1731px 0}.iti-flag.ga{height:15px;background-position:-1753px 0}.iti-flag.gb{height:10px;background-position:-1775px 0}.iti-flag.gd{height:12px;background-position:-1797px 0}.iti-flag.ge{height:14px;background-position:-1819px 0}.iti-flag.gf{height:14px;background-position:-1841px 0}.iti-flag.gg{height:14px;background-position:-1863px 0}.iti-flag.gh{height:14px;background-position:-1885px 0}.iti-flag.gi{height:10px;background-position:-1907px 0}.iti-flag.gl{height:14px;background-position:-1929px 0}.iti-flag.gm{height:14px;background-position:-1951px 0}.iti-flag.gn{height:14px;background-position:-1973px 0}.iti-flag.gp{height:14px;background-position:-1995px 0}.iti-flag.gq{height:14px;background-position:-2017px 0}.iti-flag.gr{height:14px;background-position:-2039px 0}.iti-flag.gs{height:10px;background-position:-2061px 0}.iti-flag.gt{height:13px;background-position:-2083px 0}.iti-flag.gu{height:11px;background-position:-2105px 0}.iti-flag.gw{height:10px;background-position:-2127px 0}.iti-flag.gy{height:12px;background-position:-2149px 0}.iti-flag.hk{height:14px;background-position:-2171px 0}.iti-flag.hm{height:10px;background-position:-2193px 0}.iti-flag.hn{height:10px;background-position:-2215px 0}.iti-flag.hr{height:10px;background-position:-2237px 0}.iti-flag.ht{height:12px;background-position:-2259px 0}.iti-flag.hu{height:10px;background-position:-2281px 0}.iti-flag.ic{height:14px;background-position:-2303px 0}.iti-flag.id{height:14px;background-position:-2325px 0}.iti-flag.ie{height:10px;background-position:-2347px 0}.iti-flag.il{height:15px;background-position:-2369px 0}.iti-flag.im{height:10px;background-position:-2391px 0}.iti-flag.in{height:14px;background-position:-2413px 0}.iti-flag.io{height:10px;background-position:-2435px 0}.iti-flag.iq{height:14px;background-position:-2457px 0}.iti-flag.ir{height:12px;background-position:-2479px 0}.iti-flag.is{height:15px;background-position:-2501px 0}.iti-flag.it{height:14px;background-position:-2523px 0}.iti-flag.je{height:12px;background-position:-2545px 0}.iti-flag.jm{height:10px;background-position:-2567px 0}.iti-flag.jo{height:10px;background-position:-2589px 0}.iti-flag.jp{height:14px;background-position:-2611px 0}.iti-flag.ke{height:14px;background-position:-2633px 0}.iti-flag.kg{height:12px;background-position:-2655px 0}.iti-flag.kh{height:13px;background-position:-2677px 0}.iti-flag.ki{height:10px;background-position:-2699px 0}.iti-flag.km{height:12px;background-position:-2721px 0}.iti-flag.kn{height:14px;background-position:-2743px 0}.iti-flag.kp{height:10px;background-position:-2765px 0}.iti-flag.kr{height:14px;background-position:-2787px 0}.iti-flag.kw{height:10px;background-position:-2809px 0}.iti-flag.ky{height:10px;background-position:-2831px 0}.iti-flag.kz{height:10px;background-position:-2853px 0}.iti-flag.la{height:14px;background-position:-2875px 0}.iti-flag.lb{height:14px;background-position:-2897px 0}.iti-flag.lc{height:10px;background-position:-2919px 0}.iti-flag.li{height:12px;background-position:-2941px 0}.iti-flag.lk{height:10px;background-position:-2963px 0}.iti-flag.lr{height:11px;background-position:-2985px 0}.iti-flag.ls{height:14px;background-position:-3007px 0}.iti-flag.lt{height:12px;background-position:-3029px 0}.iti-flag.lu{height:12px;background-position:-3051px 0}.iti-flag.lv{height:10px;background-position:-3073px 0}.iti-flag.ly{height:10px;background-position:-3095px 0}.iti-flag.ma{height:14px;background-position:-3117px 0}.iti-flag.mc{height:15px;background-position:-3139px 0}.iti-flag.md{height:10px;background-position:-3160px 0}.iti-flag.me{height:10px;background-position:-3182px 0}.iti-flag.mf{height:14px;background-position:-3204px 0}.iti-flag.mg{height:14px;background-position:-3226px 0}.iti-flag.mh{height:11px;background-position:-3248px 0}.iti-flag.mk{height:10px;background-position:-3270px 0}.iti-flag.ml{height:14px;background-position:-3292px 0}.iti-flag.mm{height:14px;background-position:-3314px 0}.iti-flag.mn{height:10px;background-position:-3336px 0}.iti-flag.mo{height:14px;background-position:-3358px 0}.iti-flag.mp{height:10px;background-position:-3380px 0}.iti-flag.mq{height:14px;background-position:-3402px 0}.iti-flag.mr{height:14px;background-position:-3424px 0}.iti-flag.ms{height:10px;background-position:-3446px 0}.iti-flag.mt{height:14px;background-position:-3468px 0}.iti-flag.mu{height:14px;background-position:-3490px 0}.iti-flag.mv{height:14px;background-position:-3512px 0}.iti-flag.mw{height:14px;background-position:-3534px 0}.iti-flag.mx{height:12px;background-position:-3556px 0}.iti-flag.my{height:10px;background-position:-3578px 0}.iti-flag.mz{height:14px;background-position:-3600px 0}.iti-flag.na{height:14px;background-position:-3622px 0}.iti-flag.nc{height:10px;background-position:-3644px 0}.iti-flag.ne{height:15px;background-position:-3666px 0}.iti-flag.nf{height:10px;background-position:-3686px 0}.iti-flag.ng{height:10px;background-position:-3708px 0}.iti-flag.ni{height:12px;background-position:-3730px 0}.iti-flag.nl{height:14px;background-position:-3752px 0}.iti-flag.no{height:15px;background-position:-3774px 0}.iti-flag.np{height:15px;background-position:-3796px 0}.iti-flag.nr{height:10px;background-position:-3811px 0}.iti-flag.nu{height:10px;background-position:-3833px 0}.iti-flag.nz{height:10px;background-position:-3855px 0}.iti-flag.om{height:10px;background-position:-3877px 0}.iti-flag.pa{height:14px;background-position:-3899px 0}.iti-flag.pe{height:14px;background-position:-3921px 0}.iti-flag.pf{height:14px;background-position:-3943px 0}.iti-flag.pg{height:15px;background-position:-3965px 0}.iti-flag.ph{height:10px;background-position:-3987px 0}.iti-flag.pk{height:14px;background-position:-4009px 0}.iti-flag.pl{height:13px;background-position:-4031px 0}.iti-flag.pm{height:14px;background-position:-4053px 0}.iti-flag.pn{height:10px;background-position:-4075px 0}.iti-flag.pr{height:14px;background-position:-4097px 0}.iti-flag.ps{height:10px;background-position:-4119px 0}.iti-flag.pt{height:14px;background-position:-4141px 0}.iti-flag.pw{height:13px;background-position:-4163px 0}.iti-flag.py{height:11px;background-position:-4185px 0}.iti-flag.qa{height:8px;background-position:-4207px 0}.iti-flag.re{height:14px;background-position:-4229px 0}.iti-flag.ro{height:14px;background-position:-4251px 0}.iti-flag.rs{height:14px;background-position:-4273px 0}.iti-flag.ru{height:14px;background-position:-4295px 0}.iti-flag.rw{height:14px;background-position:-4317px 0}.iti-flag.sa{height:14px;background-position:-4339px 0}.iti-flag.sb{height:10px;background-position:-4361px 0}.iti-flag.sc{height:10px;background-position:-4383px 0}.iti-flag.sd{height:10px;background-position:-4405px 0}.iti-flag.se{height:13px;background-position:-4427px 0}.iti-flag.sg{height:14px;background-position:-4449px 0}.iti-flag.sh{height:10px;background-position:-4471px 0}.iti-flag.si{height:10px;background-position:-4493px 0}.iti-flag.sj{height:15px;background-position:-4515px 0}.iti-flag.sk{height:14px;background-position:-4537px 0}.iti-flag.sl{height:14px;background-position:-4559px 0}.iti-flag.sm{height:15px;background-position:-4581px 0}.iti-flag.sn{height:14px;background-position:-4603px 0}.iti-flag.so{height:14px;background-position:-4625px 0}.iti-flag.sr{height:14px;background-position:-4647px 0}.iti-flag.ss{height:10px;background-position:-4669px 0}.iti-flag.st{height:10px;background-position:-4691px 0}.iti-flag.sv{height:12px;background-position:-4713px 0}.iti-flag.sx{height:14px;background-position:-4735px 0}.iti-flag.sy{height:14px;background-position:-4757px 0}.iti-flag.sz{height:14px;background-position:-4779px 0}.iti-flag.ta{height:10px;background-position:-4801px 0}.iti-flag.tc{height:10px;background-position:-4823px 0}.iti-flag.td{height:14px;background-position:-4845px 0}.iti-flag.tf{height:14px;background-position:-4867px 0}.iti-flag.tg{height:13px;background-position:-4889px 0}.iti-flag.th{height:14px;background-position:-4911px 0}.iti-flag.tj{height:10px;background-position:-4933px 0}.iti-flag.tk{height:10px;background-position:-4955px 0}.iti-flag.tl{height:10px;background-position:-4977px 0}.iti-flag.tm{height:14px;background-position:-4999px 0}.iti-flag.tn{height:14px;background-position:-5021px 0}.iti-flag.to{height:10px;background-position:-5043px 0}.iti-flag.tr{height:14px;background-position:-5065px 0}.iti-flag.tt{height:12px;background-position:-5087px 0}.iti-flag.tv{height:10px;background-position:-5109px 0}.iti-flag.tw{height:14px;background-position:-5131px 0}.iti-flag.tz{height:14px;background-position:-5153px 0}.iti-flag.ua{height:14px;background-position:-5175px 0}.iti-flag.ug{height:14px;background-position:-5197px 0}.iti-flag.um{height:11px;background-position:-5219px 0}.iti-flag.us{height:11px;background-position:-5241px 0}.iti-flag.uy{height:14px;background-position:-5263px 0}.iti-flag.uz{height:10px;background-position:-5285px 0}.iti-flag.va{height:15px;background-position:-5307px 0}.iti-flag.vc{height:14px;background-position:-5324px 0}.iti-flag.ve{height:14px;background-position:-5346px 0}.iti-flag.vg{height:10px;background-position:-5368px 0}.iti-flag.vi{height:14px;background-position:-5390px 0}.iti-flag.vn{height:14px;background-position:-5412px 0}.iti-flag.vu{height:12px;background-position:-5434px 0}.iti-flag.wf{height:14px;background-position:-5456px 0}.iti-flag.ws{height:10px;background-position:-5478px 0}.iti-flag.xk{height:15px;background-position:-5500px 0}.iti-flag.ye{height:14px;background-position:-5522px 0}.iti-flag.yt{height:14px;background-position:-5544px 0}.iti-flag.za{height:14px;background-position:-5566px 0}.iti-flag.zm{height:14px;background-position:-5588px 0}.iti-flag.zw{height:10px;background-position:-5610px 0}.iti-flag{width:20px;height:15px;box-shadow:0 0 1px 0 #888;background-image:url(../images/flags.png);background-repeat:no-repeat;background-color:#dbdbdb;background-position:20px 0}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (-o-min-device-pixel-ratio:2 / 1),only screen and (min-device-pixel-ratio:2),only screen and (min-resolution:192dpi),only screen and (min-resolution:2dppx){.iti-flag{background-image:url(../images/flags@2x.png)}}.iti-flag.np{background-color:transparent}@font-face{font-family:fm-icons;src:url(fonts/fm-icons.ttf?wjdy97) format('truetype'),url(fonts/fm-icons.woff?wjdy97) format('woff'),url(fonts/fm-icons.svg?wjdy97#fm-icons) format('svg');font-weight:400;font-style:normal}[class*=" fm-ico-"],[class^=fm-ico-]{font-family:fm-icons!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fm-ico-form-maker:before{content:"\e908";color:#6e7883}.fm-ico-plus-circle:before{content:"\e900"}.fm-ico-plus:before{content:"\e901"}.fm-ico-collapse:before{content:"\e902"}.fm-ico-expand:before{content:"\e906"}.fm-ico-duplicate:before{content:"\e904"}.fm-ico-edit:before{content:"\e905"}.fm-ico-delete:before{content:"\e907"}.fm-ico-draggable:before{content:"\e903"}.fm-ico-close:before{content:"\e909"}.fm-ico-spinner:before{content:"\e90a"}
form_maker_insert.php CHANGED
@@ -299,17 +299,17 @@ class WDCFMInsert {
299
  $form_maker_row = $wpdb->get_var('SELECT * FROM ' . $wpdb->prefix . 'formmaker' . (!WDFMInstance(self::PLUGIN)->is_free ? '' : ' WHERE id' . (WDFMInstance(self::PLUGIN)->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')'));
300
  if ( !$form_maker_row ) {
301
  $insert_form_id = array();
302
- $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `header_hide`, `jsversion`, `privacy`) VALUES (NULL, 'Contact Us', 'embedded', '{adminemail}', '<div class=\"wdform-page-and-images fm-form-builder\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"true\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"2\" class=\"wdform_row\">%2 - Name%</div></div><div class=\"wdform_column\"><div wdid=\"3\" class=\"wdform_row\">%3 - Email%</div></div><div class=\"wdform_column\"><div wdid=\"4\" class=\"wdform_row\">%4 - Subject%</div></div><div class=\"wdform_column\"><div wdid=\"5\" class=\"wdform_row\">%5 - Message%</div></div><div class=\"wdform_column\"><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', 1, '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}\r\n// Occurs after form is submitted and reloaded\r\nfunction after_submit() {\r\n \r\n}', '', '', 1, '{all}', '{all}', 6, 1, '2#**id**#Name#**label**#type_text#****#3#**id**#Email#**label**#type_submitter_mail#****#4#**id**#Subject#**label**#type_text#****#5#**id**#Message#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#2_elementform_id_temp#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '2#**id**#Name#**label**#type_text#****#3#**id**#Email#**label**#type_submitter_mail#****#4#**id**#Subject#**label**#type_text#****#5#**id**#Message#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', 0, 'testmode', '', '', 0, '2*:*id*:*type_text*:*type*:*Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*w_class*:**:*new_field*:*3*:*id*:*type_submitter_mail*:*type*:*Email*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no*:*w_verification*:*Email confirmation*:*w_verification_label*:**:*w_verification_placeholder*:*no*:*w_autofill*:**:*new_field*:*4*:*id*:*type_text*:*type*:*Subject*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*w_class*:**:*new_field*:*5*:*id*:*type_textarea*:*type*:*Message*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*', 1, 1, '*', '{adminemail}', '', '', '', 1, '', '{adminemail}', '', '', '', '', '', '', '', '', '', 1, 1, 1, 1, 'administrator,', 0, '', '', 0, 0, 0, 0, 1, 'Contact Us', 'You may contact us by filling in this form any time you need professional support or have any questions. You can also fill in the form to leave your comments or feedback.', '', 'none', 0, 1, 0, '');");
303
  $insert_form_id[] = $wpdb->insert_id;
304
- $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `header_hide`, `jsversion`, `privacy`) VALUES (NULL, 'Client List Form', 'embedded', '{adminemail}', '<div class=\"wdform-page-and-images fm-form-builder\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"true\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"2\" class=\"wdform_row\">%2 - First Name%</div></div><div class=\"wdform_column\"><div wdid=\"3\" class=\"wdform_row\">%3 - Last Name%</div></div><div class=\"wdform_column\"><div wdid=\"4\" class=\"wdform_row\">%4 - Email%</div></div><div class=\"wdform_column\"><div wdid=\"5\" class=\"wdform_row\">%5 - Phone%</div></div><div class=\"wdform_column\"><div wdid=\"6\" class=\"wdform_row\">%6 - Website%</div></div><div class=\"wdform_column\"><div wdid=\"7\" class=\"wdform_row\">%7 - Address%</div></div><div class=\"wdform_column\"><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', 1, '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}// Occurs after form is submitted and reloaded\r\nfunction after_submit() {\r\n \r\n}', '', '', 1, '{all}', '{all}', 13, 1, '2#**id**#First Name#**label**#type_text#****#3#**id**#Last Name#**label**#type_text#****#4#**id**#Email#**label**#type_submitter_mail#****#5#**id**#Phone#**label**#type_text#****#6#**id**#Website#**label**#type_text#****#7#**id**#Street Address#**label**#type_address#****#8#**id**#Street Address Line 2#**label**#type_address#****#9#**id**#City#**label**#type_address#****#10#**id**#State / Province / Region#**label**#type_address#****#11#**id**#Postal / Zip Code#**label**#type_address#****#12#**id**#Country#**label**#type_address#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#7_street1form_id_temp#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '2#**id**#First Name#**label**#type_text#****#3#**id**#Last Name#**label**#type_text#****#4#**id**#Email#**label**#type_submitter_mail#****#5#**id**#Phone#**label**#type_text#****#6#**id**#Website#**label**#type_text#****#7#**id**#Street Address#**label**#type_address#****#8#**id**#Street Address Line 2#**label**#type_address#****#9#**id**#City#**label**#type_address#****#10#**id**#State / Province / Region#**label**#type_address#****#11#**id**#Postal / Zip Code#**label**#type_address#****#12#**id**#Country#**label**#type_address#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', 0, 'testmode', '', '', 0, '2*:*id*:*type_text*:*type*:*First Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*w_class*:**:*new_field*:*3*:*id*:*type_text*:*type*:*Last Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*w_class*:**:*new_field*:*4*:*id*:*type_submitter_mail*:*type*:*Email*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no*:*w_verification*:*Email confirmation*:*w_verification_label*:**:*w_verification_placeholder*:*no*:*w_autofill*:**:*new_field*:*5*:*id*:*type_text*:*type*:*Phone*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*w_class*:**:*new_field*:*6*:*id*:*type_text*:*type*:*Website*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:*http://example.com*:*w_title*:*no*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*w_class*:**:*new_field*:*7*:*id*:*type_address*:*type*:*Address*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:*Street Address***Street Address Line 2***City***State / Province / Region***Postal / Zip Code***Country*:*w_mini_labels*:*no***no***no***no***no***no***no*:*w_disabled_fields*:*no*:*w_required*:*wdform_address*:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*', 1, 1, '*', '{adminemail}', '', '', '', 1, '', '{adminemail}', '', '', '', '', '', '', '', '', '', 1, 1, 1, 1, 'administrator,', 0, '', '', 0, 0, 0, 0, 1, '', '', '', 'none', 0, 1, 0, '');");
305
  $insert_form_id[] = $wpdb->insert_id;
306
 
307
  if ( WDFMInstance(self::PLUGIN)->is_free != 2 ) {
308
- $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `header_hide`, `jsversion`, `privacy`) VALUES (NULL, 'Feedback Form', 'embedded', '{adminemail}', '<div class=\"wdform-page-and-images fm-form-builder\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"true\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"3\" class=\"wdform_row\">%3 - Name%</div></div><div class=\"wdform_column\"><div wdid=\"4\" class=\"wdform_row\">%4 - Email%</div></div><div class=\"wdform_column\"><div wdid=\"5\" class=\"wdform_row\" style=\"position: relative; left: 0px; top: 0px;\">%5 - CMS%</div></div><div class=\"wdform_column\"><div wdid=\"6\" class=\"wdform_row\">%6 - Extension%</div></div><div class=\"wdform_column\"><div wdid=\"7\" class=\"wdform_row\">%7 - Plugin%</div></div><div class=\"wdform_column\"><div wdid=\"2\" class=\"wdform_row\" style=\"position: relative; left: 0px; top: 0px;\">%2 - Subject%</div></div><div class=\"wdform_column\"><div wdid=\"8\" class=\"wdform_row\">%8 - Message%</div></div><div class=\"wdform_column\"><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', 3, '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}// Occurs after form is submitted and reloaded\r\nfunction after_submit() {\r\n \r\n}', '', '', 1, '{all}', '{all}', 9, 1, '3#**id**#Name#**label**#type_name#****#4#**id**#Email#**label**#type_submitter_mail#****#5#**id**#CMS#**label**#type_radio#****#6#**id**#Extension#**label**#type_own_select#****#7#**id**#Plugin#**label**#type_own_select#****#2#**id**#Subject#**label**#type_text#****#8#**id**#Message#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#2_elementform_id_temp#**id**#Text#**label**#type_text#****#', '3#**id**#Name#**label**#type_name#****#4#**id**#Email#**label**#type_submitter_mail#****#5#**id**#CMS#**label**#type_radio#****#6#**id**#Extension#**label**#type_own_select#****#7#**id**#Plugin#**label**#type_own_select#****#2#**id**#Subject#**label**#type_text#****#8#**id**#Message#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', 0, '0', '', 'USD', 0, '3*:*id*:*type_name*:*type*:*Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:***********:*w_first_val*:*First***Last*******:*w_title*:*Title*********Middle*:*w_mini_labels*:**:*w_size*:*normal*:*w_name_format*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no***no*:*w_name_fields*:*no*:*w_autofill*:**:*new_field*:*4*:*id*:*type_submitter_mail*:*type*:*Email*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no*:*w_verification*:*Email confirmation*:*w_verification_label*:**:*w_verification_placeholder*:*no*:*w_autofill*:**:*new_field*:*5*:*id*:*type_radio*:*type*:*CMS*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*hor*:*w_flow*:*Joomla!***Wordpress*:*w_choices*:*false***false*:*w_choices_checked*:*1*:*w_rowcol*:*yes*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Joomla!***Wordpress*:*w_choices_value*:*****:*w_choices_params*:**:*w_class*:**:*new_field*:*6*:*id*:*type_own_select*:*type*:*Extension*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:*Select extension***Form Maker***Gallery WD***Spider Calendar*:*w_choices*:*true***false***false***false*:*w_choices_checked*:*true***false***false***false*:*w_choices_disabled*:*yes*:*w_required*:*no*:*w_value_disabled*:****Form Maker***Gallery WD***Spider Calendar*:*w_choices_value*:***********:*w_choices_params*:*wdform_select*:*w_class*:**:*new_field*:*7*:*id*:*type_own_select*:*type*:*Plugin*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:*Select plugin***Form Maker***Photo Gallery***Ecommerce WD*:*w_choices*:*true***false***false***false*:*w_choices_checked*:*true***false***false***false*:*w_choices_disabled*:*yes*:*w_required*:*no*:*w_value_disabled*:****Form Maker***Photo Gallery***Ecommerce WD*:*w_choices_value*:***********:*w_choices_params*:*wdform_select*:*w_class*:**:*new_field*:*2*:*id*:*type_text*:*type*:*Subject*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*w_class*:**:*new_field*:*8*:*id*:*type_textarea*:*type*:*Message*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*true*:*w_act*:**:*new_field*:*', 1, 1, '*', '{adminemail}', '', '', '', 1, '', '{adminemail}', '', '', '1*:*show_hide*:*6*:*field_label*:*and*:*all_any*:*5***==***Joomla!*:*next_condition*:**:*new_condition*:*1*:*show_hide*:*7*:*field_label*:*and*:*all_any*:*5***==***Wordpress*:*next_condition*:**:*new_condition*:*', '', '', '', '', '', '', 1, 1, 1, 1, 'administrator,', 0, '', '', 0, 0, 0, 0, 1, 'Feedback Form', 'You may contact us by filling in this form any time you need professional support or have any questions. You can also fill in the form to leave your comments or feedback.', '" . WDFMInstance(self::PLUGIN)->plugin_url . "/images/demo/2.png', 'flash', 0, 1, 0, '');");
309
  $insert_form_id[] = $wpdb->insert_id;
310
- $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `header_hide`, `jsversion`, `privacy`) VALUES (NULL, 'Business Demographic Survey', 'embedded', '{adminemail}', '<div class=\"wdform-page-and-images fm-form-builder\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"true\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"2\" class=\"wdform_row\">%2 - What is your employment status?%</div></div><div class=\"wdform_column\"><div wdid=\"3\" class=\"wdform_row\">%3 - What is your level of education?%</div></div><div class=\"wdform_column\"><div wdid=\"4\" class=\"wdform_row\">%4 - In which industry do you work?%</div></div><div class=\"wdform_column\"><div wdid=\"6\" class=\"wdform_row\">%6 - What is the annual revenue of your company?%</div></div><div class=\"wdform_column\"><div wdid=\"5\" class=\"wdform_row\">%5 - Enter characters for verification.%</div></div><div class=\"wdform_column\"><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', 4, '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}// Occurs after form is submitted and reloaded\r\nfunction after_submit() {\r\n \r\n}', '', '', 1, '{all}', '{all}', 7, 1, '2#**id**#What is your employment status?#**label**#type_radio#****#3#**id**#What is your level of education?#**label**#type_radio#****#4#**id**#In which industry do you work?#**label**#type_own_select#****#6#**id**#What is the annual revenue of your company?#**label**#type_radio#****#5#**id**#Enter characters for verification.#**label**#type_captcha#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#6_elementform_id_temp0#**id**#What is your employment status?#**label**#type_radio#****#6_elementform_id_temp1#**id**#What is your level of education?#**label**#type_radio#****#6_elementform_id_temp2#**id**#In which industry do you work?#**label**#type_own_select#****#6_elementform_id_temp3#**id**#Enter characters for verification.#**label**#type_captcha#****#6_elementform_id_temp4#**id**#type_submit_reset_1#**label**#type_submit_reset#****#6_elementform_id_temp5#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '2#**id**#What is your employment status?#**label**#type_radio#****#3#**id**#What is your level of education?#**label**#type_radio#****#4#**id**#In which industry do you work?#**label**#type_own_select#****#6#**id**#What is the annual revenue of your company?#**label**#type_radio#****#5#**id**#Enter characters for verification.#**label**#type_captcha#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', 0, 'testmode', '', '', 0, '2*:*id*:*type_radio*:*type*:*What is your employment status?*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*ver*:*w_flow*:*Employed full time***Trade or Vocational degree***Not employed, but looking for work***Not employed and not looking for work***Retired***Student***Homemaker***Prefer not to answer*:*w_choices*:*false***false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Employed full time***Trade or Vocational degree***Not employed, but looking for work***Not employed and not looking for work***Retired***Student***Homemaker***Prefer not to answer*:*w_choices_value*:***********************:*w_choices_params*:**:*w_class*:**:*new_field*:*3*:*id*:*type_radio*:*type*:*What is your level of education?*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*ver*:*w_flow*:*Some high school***High school graduate or equivalent***Trade or Vocational Degree***Some college***Associate degree***Bachelor\'s degree***Graduate or Professional degree***Prefer not to answer*:*w_choices*:*false***false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Some high school***High school graduate or equivalent***Trade or Vocational Degree***Some college***Associate degree***Bachelor\'s degree***Graduate or Professional degree***Prefer not to answer*:*w_choices_value*:***********************:*w_choices_params*:**:*w_class*:**:*new_field*:*4*:*id*:*type_own_select*:*type*:*In which industry do you work?*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:*Select industry***Agriculture***Engineering***Information Technologies***Media***Local Business*:*w_choices*:*true***false***false***false***false***false*:*w_choices_checked*:*true***false***false***false***false***false*:*w_choices_disabled*:*no*:*w_required*:*no*:*w_value_disabled*:****Agriculture***Engineering***Information Technologies***Media***Local Business*:*w_choices_value*:*****************:*w_choices_params*:*wdform_select*:*w_class*:**:*new_field*:*6*:*id*:*type_radio*:*type*:*What is the annual revenue of your company?*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*ver*:*w_flow*:*Under $10,000***$10,001 to $50,000***$50,001 to $100,000***$100,001 to $500,000***$500,001 to $1 Million***$1 Million to $10 Million***$10 Million to $50 Million***$50 Million to $100 Million***Over $100 Million*:*w_choices*:*false***false***false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Under $10,000***$10,001 to $50,000***$50,001 to $100,000***$100,001 to $500,000***$500,001 to $1 Million***$1 Million to $10 Million***$10 Million to $50 Million***$50 Million to $100 Million***Over $100 Million*:*w_choices_value*:**************************:*w_choices_params*:**:*w_class*:**:*new_field*:*5*:*id*:*type_captcha*:*type*:*Enter characters for verification.*:*w_field_label*:**:*w_field_label_size*:*left*:*w_field_label_pos*:*yes*:*w_hide_label*:*6*:*w_digit*:**:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*', 1, 1, '*', '{adminemail}', '', '', '', 1, '', '{adminemail}', '', '', '', '', '', '', '', '', '', 1, 1, 1, 1, 'administrator,', 0, '', '', 0, 0, 0, 0, 1, 'Business Demographic Survey', 'Thank you for joining our business demographic survey. Please give us your feedback by filling in the information bellow.', '', 'none', 1, 1, 0, '');");
311
  $insert_form_id[] = $wpdb->insert_id;
312
- $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `header_hide`, `jsversion`, `privacy`) VALUES (NULL, 'Cupcake Order Form', 'embedded', '{adminemail}', '<div class=\"wdform-page-and-images fm-form-builder\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"true\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"2\" class=\"wdform_row\">%2 - Name%</div></div><div class=\"wdform_column\"><div wdid=\"3\" class=\"wdform_row\">%3 - Email%</div></div><div class=\"wdform_column\"><div wdid=\"4\" class=\"wdform_row\">%4 - Date%</div></div><div class=\"wdform_column\"><div wdid=\"5\" class=\"wdform_row\">%5 - Cupcakes Flavors (1 doz. minimum)%</div></div><div class=\"wdform_column\"><div wdid=\"6\" class=\"wdform_row\">%6 - Quantity%</div></div><div class=\"wdform_column\"><div wdid=\"7\" class=\"wdform_row\">%7 - Details (if any)%</div></div><div class=\"wdform_column\"><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', 6, '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}// Occurs after form is submitted and reloaded\r\nfunction after_submit() {\r\n \r\n}', '', '', 1, '{all}', '{all}', 8, 1, '2#**id**#Name#**label**#type_name#****#3#**id**#Email#**label**#type_submitter_mail#****#4#**id**#Date#**label**#type_date_new#****#5#**id**#Cupcakes Flavors (1 doz. minimum)#**label**#type_radio#****#6#**id**#Quantity#**label**#type_spinner#****#7#**id**#Details (if any)#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#5_elementform_id_temp0#**id**#Name#**label**#type_name#****#5_elementform_id_temp1#**id**#Email#**label**#type_submitter_mail#****#5_elementform_id_temp2#**id**#Date#**label**#type_date_new#****#5_elementform_id_temp3#**id**#Name:* Email:* Date* Cupcakes Flavors (1 doz. minimum)#**label**#type_radio#****#5_elementform_id_temp4#**id**#Quantity#**label**#type_spinner#****#5_elementform_id_temp5#**id**#Details (if any)#**label**#type_textarea#****#5_elementform_id_temp6#**id**#type_submit_reset_1#**label**#type_submit_reset#****#5_elementform_id_temp7#**id**#Name#**label**#type_name#****#5_elementform_id_temp8#**id**#Email#**label**#type_submitter_mail#****#5_elementform_id_temp9#**id**#Date#**label**#type_date_new#****#5_elementform_id_temp10#**id**#type_submit_reset_1#**label**#type_submit_reset#****#5_elementform_id_temp11#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '2#**id**#Name#**label**#type_name#****#3#**id**#Email#**label**#type_submitter_mail#****#4#**id**#Date#**label**#type_date_new#****#5#**id**#Cupcakes Flavors (1 doz. minimum)#**label**#type_radio#****#6#**id**#Quantity#**label**#type_spinner#****#7#**id**#Details (if any)#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', 0, 'testmode', '', '', 0, '2*:*id*:*type_name*:*type*:*Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:***********:*w_first_val*:***********:*w_title*:*Title*********Middle*:*w_mini_labels*:**:*w_size*:*normal*:*w_name_format*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no***no*:*w_name_fields*:*no*:*w_autofill*:**:*new_field*:*3*:*id*:*type_submitter_mail*:*type*:*Email*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no*:*w_verification*:*Email confirmation*:*w_verification_label*:**:*w_verification_placeholder*:*no*:*w_autofill*:**:*new_field*:*4*:*id*:*type_date_new*:*type*:*Date*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_date*:*yes*:*w_required*:*yes*:*w_show_image*:**:*w_class*:*mm/dd/yy*:*w_format*:*0*:*w_start_day*:**:*w_default_date*:**:*w_min_date*:**:*w_max_date*:**:*w_invalid_dates*:*yes***yes***yes***yes***yes***yes***yes*:*w_show_days*:*yes*:*w_hide_time*:*...*:*w_but_val*:*no*:*w_disable_past_days*:**:*new_field*:*5*:*id*:*type_radio*:*type*:*Cupcakes Flavors (1 doz. minimum)*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*ver*:*w_flow*:*Red Velvet***Vanilla***Chocolate***Guinness***Coconut***Lemon***Chocolate Mint*:*w_choices*:*false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Red Velvet***Vanilla***Chocolate***Guinness***Coconut***Lemon***Chocolate Mint*:*w_choices_value*:********************:*w_choices_params*:**:*w_class*:**:*new_field*:*6*:*id*:*type_spinner*:*type*:*Quantity*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:*60*:*w_field_width*:**:*w_field_min_value*:**:*w_field_max_value*:*1*:*w_field_step*:*null*:*w_field_value*:*no*:*w_required*:**:*w_class*:**:*new_field*:*7*:*id*:*type_textarea*:*type*:*Details (if any)*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*', 1, 1, '*', '{adminemail}', '', '', '', 1, '', '{adminemail}', '', '', '', '', '', '', '', '', '', 1, 1, 1, 1, 'administrator,', 0, '', '', 0, 0, 0, 0, 1, 'Cupcake Order Form', '', '', 'none', 1, 1, 0, '');");
313
  $insert_form_id[] = $wpdb->insert_id;
314
  }
315
  else {
299
  $form_maker_row = $wpdb->get_var('SELECT * FROM ' . $wpdb->prefix . 'formmaker' . (!WDFMInstance(self::PLUGIN)->is_free ? '' : ' WHERE id' . (WDFMInstance(self::PLUGIN)->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')'));
300
  if ( !$form_maker_row ) {
301
  $insert_form_id = array();
302
+ $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `header_hide`, `jsversion`, `privacy`) VALUES (NULL, 'Contact Us', 'embedded', '{adminemail}', '<div class=\"wdform-page-and-images fm-form-builder\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"true\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"2\" class=\"wdform_row\">%2 - Name%</div></div><div class=\"wdform_column\"><div wdid=\"3\" class=\"wdform_row\">%3 - Email%</div></div><div class=\"wdform_column\"><div wdid=\"4\" class=\"wdform_row\">%4 - Subject%</div></div><div class=\"wdform_column\"><div wdid=\"5\" class=\"wdform_row\">%5 - Message%</div></div><div class=\"wdform_column\"><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', 1, '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}\r\n// Occurs after form is submitted and reloaded\r\nfunction after_submit() {\r\n \r\n}', '', '', 1, '{all}', '{all}', 6, 1, '2#**id**#Name#**label**#type_text#****#3#**id**#Email#**label**#type_submitter_mail#****#4#**id**#Subject#**label**#type_text#****#5#**id**#Message#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#2_elementform_id_temp#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '2#**id**#Name#**label**#type_text#****#3#**id**#Email#**label**#type_submitter_mail#****#4#**id**#Subject#**label**#type_text#****#5#**id**#Message#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', 0, 'testmode', '', '', 0, '2*:*id*:*type_text*:*type*:*Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*w_class*:**:*new_field*:*3*:*id*:*type_submitter_mail*:*type*:*Email*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no*:*w_verification*:*Email confirmation*:*w_verification_label*:**:*w_verification_placeholder*:*no*:*w_autofill*:**:*new_field*:*4*:*id*:*type_text*:*type*:*Subject*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*w_class*:**:*new_field*:*5*:*id*:*type_textarea*:*type*:*Message*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*', 1, 1, '*', '', '', '', '', 1, '', '', '', '', '', '', '', '', '', '', '', 1, 1, 1, 1, 'administrator,', 0, '', '', 0, 0, 0, 0, 1, 'Contact Us', 'You may contact us by filling in this form any time you need professional support or have any questions. You can also fill in the form to leave your comments or feedback.', '', 'none', 0, 1, 0, '');");
303
  $insert_form_id[] = $wpdb->insert_id;
304
+ $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `header_hide`, `jsversion`, `privacy`) VALUES (NULL, 'Client List Form', 'embedded', '{adminemail}', '<div class=\"wdform-page-and-images fm-form-builder\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"true\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"2\" class=\"wdform_row\">%2 - First Name%</div></div><div class=\"wdform_column\"><div wdid=\"3\" class=\"wdform_row\">%3 - Last Name%</div></div><div class=\"wdform_column\"><div wdid=\"4\" class=\"wdform_row\">%4 - Email%</div></div><div class=\"wdform_column\"><div wdid=\"5\" class=\"wdform_row\">%5 - Phone%</div></div><div class=\"wdform_column\"><div wdid=\"6\" class=\"wdform_row\">%6 - Website%</div></div><div class=\"wdform_column\"><div wdid=\"7\" class=\"wdform_row\">%7 - Address%</div></div><div class=\"wdform_column\"><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', 1, '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}// Occurs after form is submitted and reloaded\r\nfunction after_submit() {\r\n \r\n}', '', '', 1, '{all}', '{all}', 13, 1, '2#**id**#First Name#**label**#type_text#****#3#**id**#Last Name#**label**#type_text#****#4#**id**#Email#**label**#type_submitter_mail#****#5#**id**#Phone#**label**#type_text#****#6#**id**#Website#**label**#type_text#****#7#**id**#Street Address#**label**#type_address#****#8#**id**#Street Address Line 2#**label**#type_address#****#9#**id**#City#**label**#type_address#****#10#**id**#State / Province / Region#**label**#type_address#****#11#**id**#Postal / Zip Code#**label**#type_address#****#12#**id**#Country#**label**#type_address#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#7_street1form_id_temp#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '2#**id**#First Name#**label**#type_text#****#3#**id**#Last Name#**label**#type_text#****#4#**id**#Email#**label**#type_submitter_mail#****#5#**id**#Phone#**label**#type_text#****#6#**id**#Website#**label**#type_text#****#7#**id**#Street Address#**label**#type_address#****#8#**id**#Street Address Line 2#**label**#type_address#****#9#**id**#City#**label**#type_address#****#10#**id**#State / Province / Region#**label**#type_address#****#11#**id**#Postal / Zip Code#**label**#type_address#****#12#**id**#Country#**label**#type_address#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', 0, 'testmode', '', '', 0, '2*:*id*:*type_text*:*type*:*First Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*w_class*:**:*new_field*:*3*:*id*:*type_text*:*type*:*Last Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*w_class*:**:*new_field*:*4*:*id*:*type_submitter_mail*:*type*:*Email*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no*:*w_verification*:*Email confirmation*:*w_verification_label*:**:*w_verification_placeholder*:*no*:*w_autofill*:**:*new_field*:*5*:*id*:*type_text*:*type*:*Phone*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*w_class*:**:*new_field*:*6*:*id*:*type_text*:*type*:*Website*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:*http://example.com*:*w_title*:*no*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*w_class*:**:*new_field*:*7*:*id*:*type_address*:*type*:*Address*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:*Street Address***Street Address Line 2***City***State / Province / Region***Postal / Zip Code***Country*:*w_mini_labels*:*no***no***no***no***no***no***no*:*w_disabled_fields*:*no*:*w_required*:*wdform_address*:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*', 1, 1, '*', '', '', '', '', 1, '', '', '', '', '', '', '', '', '', '', '', 1, 1, 1, 1, 'administrator,', 0, '', '', 0, 0, 0, 0, 1, '', '', '', 'none', 0, 1, 0, '');");
305
  $insert_form_id[] = $wpdb->insert_id;
306
 
307
  if ( WDFMInstance(self::PLUGIN)->is_free != 2 ) {
308
+ $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `header_hide`, `jsversion`, `privacy`) VALUES (NULL, 'Feedback Form', 'embedded', '{adminemail}', '<div class=\"wdform-page-and-images fm-form-builder\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"true\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"3\" class=\"wdform_row\">%3 - Name%</div></div><div class=\"wdform_column\"><div wdid=\"4\" class=\"wdform_row\">%4 - Email%</div></div><div class=\"wdform_column\"><div wdid=\"5\" class=\"wdform_row\" style=\"position: relative; left: 0px; top: 0px;\">%5 - CMS%</div></div><div class=\"wdform_column\"><div wdid=\"6\" class=\"wdform_row\">%6 - Extension%</div></div><div class=\"wdform_column\"><div wdid=\"7\" class=\"wdform_row\">%7 - Plugin%</div></div><div class=\"wdform_column\"><div wdid=\"2\" class=\"wdform_row\" style=\"position: relative; left: 0px; top: 0px;\">%2 - Subject%</div></div><div class=\"wdform_column\"><div wdid=\"8\" class=\"wdform_row\">%8 - Message%</div></div><div class=\"wdform_column\"><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', 3, '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}// Occurs after form is submitted and reloaded\r\nfunction after_submit() {\r\n \r\n}', '', '', 1, '{all}', '{all}', 9, 1, '3#**id**#Name#**label**#type_name#****#4#**id**#Email#**label**#type_submitter_mail#****#5#**id**#CMS#**label**#type_radio#****#6#**id**#Extension#**label**#type_own_select#****#7#**id**#Plugin#**label**#type_own_select#****#2#**id**#Subject#**label**#type_text#****#8#**id**#Message#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#2_elementform_id_temp#**id**#Text#**label**#type_text#****#', '3#**id**#Name#**label**#type_name#****#4#**id**#Email#**label**#type_submitter_mail#****#5#**id**#CMS#**label**#type_radio#****#6#**id**#Extension#**label**#type_own_select#****#7#**id**#Plugin#**label**#type_own_select#****#2#**id**#Subject#**label**#type_text#****#8#**id**#Message#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', 0, '0', '', 'USD', 0, '3*:*id*:*type_name*:*type*:*Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:***********:*w_first_val*:*First***Last*******:*w_title*:*Title*********Middle*:*w_mini_labels*:**:*w_size*:*normal*:*w_name_format*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no***no*:*w_name_fields*:*no*:*w_autofill*:**:*new_field*:*4*:*id*:*type_submitter_mail*:*type*:*Email*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no*:*w_verification*:*Email confirmation*:*w_verification_label*:**:*w_verification_placeholder*:*no*:*w_autofill*:**:*new_field*:*5*:*id*:*type_radio*:*type*:*CMS*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*hor*:*w_flow*:*Joomla!***Wordpress*:*w_choices*:*false***false*:*w_choices_checked*:*1*:*w_rowcol*:*yes*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Joomla!***Wordpress*:*w_choices_value*:*****:*w_choices_params*:**:*w_class*:**:*new_field*:*6*:*id*:*type_own_select*:*type*:*Extension*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:*Select extension***Form Maker***Gallery WD***Spider Calendar*:*w_choices*:*true***false***false***false*:*w_choices_checked*:*true***false***false***false*:*w_choices_disabled*:*yes*:*w_required*:*no*:*w_value_disabled*:****Form Maker***Gallery WD***Spider Calendar*:*w_choices_value*:***********:*w_choices_params*:*wdform_select*:*w_class*:**:*new_field*:*7*:*id*:*type_own_select*:*type*:*Plugin*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:*Select plugin***Form Maker***Photo Gallery***Ecommerce WD*:*w_choices*:*true***false***false***false*:*w_choices_checked*:*true***false***false***false*:*w_choices_disabled*:*yes*:*w_required*:*no*:*w_value_disabled*:****Form Maker***Photo Gallery***Ecommerce WD*:*w_choices_value*:***********:*w_choices_params*:*wdform_select*:*w_class*:**:*new_field*:*2*:*id*:*type_text*:*type*:*Subject*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*w_class*:**:*new_field*:*8*:*id*:*type_textarea*:*type*:*Message*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*true*:*w_act*:**:*new_field*:*', 1, 1, '*', '', '', '', '', 1, '', '', '', '', '1*:*show_hide*:*6*:*field_label*:*and*:*all_any*:*5***==***Joomla!*:*next_condition*:**:*new_condition*:*1*:*show_hide*:*7*:*field_label*:*and*:*all_any*:*5***==***Wordpress*:*next_condition*:**:*new_condition*:*', '', '', '', '', '', '', 1, 1, 1, 1, 'administrator,', 0, '', '', 0, 0, 0, 0, 1, 'Feedback Form', 'You may contact us by filling in this form any time you need professional support or have any questions. You can also fill in the form to leave your comments or feedback.', '" . WDFMInstance(self::PLUGIN)->plugin_url . "/images/demo/2.png', 'flash', 0, 1, 0, '');");
309
  $insert_form_id[] = $wpdb->insert_id;
310
+ $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `header_hide`, `jsversion`, `privacy`) VALUES (NULL, 'Business Demographic Survey', 'embedded', '{adminemail}', '<div class=\"wdform-page-and-images fm-form-builder\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"true\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"2\" class=\"wdform_row\">%2 - What is your employment status?%</div></div><div class=\"wdform_column\"><div wdid=\"3\" class=\"wdform_row\">%3 - What is your level of education?%</div></div><div class=\"wdform_column\"><div wdid=\"4\" class=\"wdform_row\">%4 - In which industry do you work?%</div></div><div class=\"wdform_column\"><div wdid=\"6\" class=\"wdform_row\">%6 - What is the annual revenue of your company?%</div></div><div class=\"wdform_column\"><div wdid=\"5\" class=\"wdform_row\">%5 - Enter characters for verification.%</div></div><div class=\"wdform_column\"><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', 4, '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}// Occurs after form is submitted and reloaded\r\nfunction after_submit() {\r\n \r\n}', '', '', 1, '{all}', '{all}', 7, 1, '2#**id**#What is your employment status?#**label**#type_radio#****#3#**id**#What is your level of education?#**label**#type_radio#****#4#**id**#In which industry do you work?#**label**#type_own_select#****#6#**id**#What is the annual revenue of your company?#**label**#type_radio#****#5#**id**#Enter characters for verification.#**label**#type_captcha#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#6_elementform_id_temp0#**id**#What is your employment status?#**label**#type_radio#****#6_elementform_id_temp1#**id**#What is your level of education?#**label**#type_radio#****#6_elementform_id_temp2#**id**#In which industry do you work?#**label**#type_own_select#****#6_elementform_id_temp3#**id**#Enter characters for verification.#**label**#type_captcha#****#6_elementform_id_temp4#**id**#type_submit_reset_1#**label**#type_submit_reset#****#6_elementform_id_temp5#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '2#**id**#What is your employment status?#**label**#type_radio#****#3#**id**#What is your level of education?#**label**#type_radio#****#4#**id**#In which industry do you work?#**label**#type_own_select#****#6#**id**#What is the annual revenue of your company?#**label**#type_radio#****#5#**id**#Enter characters for verification.#**label**#type_captcha#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', 0, 'testmode', '', '', 0, '2*:*id*:*type_radio*:*type*:*What is your employment status?*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*ver*:*w_flow*:*Employed full time***Trade or Vocational degree***Not employed, but looking for work***Not employed and not looking for work***Retired***Student***Homemaker***Prefer not to answer*:*w_choices*:*false***false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Employed full time***Trade or Vocational degree***Not employed, but looking for work***Not employed and not looking for work***Retired***Student***Homemaker***Prefer not to answer*:*w_choices_value*:***********************:*w_choices_params*:**:*w_class*:**:*new_field*:*3*:*id*:*type_radio*:*type*:*What is your level of education?*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*ver*:*w_flow*:*Some high school***High school graduate or equivalent***Trade or Vocational Degree***Some college***Associate degree***Bachelor\'s degree***Graduate or Professional degree***Prefer not to answer*:*w_choices*:*false***false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Some high school***High school graduate or equivalent***Trade or Vocational Degree***Some college***Associate degree***Bachelor\'s degree***Graduate or Professional degree***Prefer not to answer*:*w_choices_value*:***********************:*w_choices_params*:**:*w_class*:**:*new_field*:*4*:*id*:*type_own_select*:*type*:*In which industry do you work?*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:*Select industry***Agriculture***Engineering***Information Technologies***Media***Local Business*:*w_choices*:*true***false***false***false***false***false*:*w_choices_checked*:*true***false***false***false***false***false*:*w_choices_disabled*:*no*:*w_required*:*no*:*w_value_disabled*:****Agriculture***Engineering***Information Technologies***Media***Local Business*:*w_choices_value*:*****************:*w_choices_params*:*wdform_select*:*w_class*:**:*new_field*:*6*:*id*:*type_radio*:*type*:*What is the annual revenue of your company?*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*ver*:*w_flow*:*Under $10,000***$10,001 to $50,000***$50,001 to $100,000***$100,001 to $500,000***$500,001 to $1 Million***$1 Million to $10 Million***$10 Million to $50 Million***$50 Million to $100 Million***Over $100 Million*:*w_choices*:*false***false***false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Under $10,000***$10,001 to $50,000***$50,001 to $100,000***$100,001 to $500,000***$500,001 to $1 Million***$1 Million to $10 Million***$10 Million to $50 Million***$50 Million to $100 Million***Over $100 Million*:*w_choices_value*:**************************:*w_choices_params*:**:*w_class*:**:*new_field*:*5*:*id*:*type_captcha*:*type*:*Enter characters for verification.*:*w_field_label*:**:*w_field_label_size*:*left*:*w_field_label_pos*:*yes*:*w_hide_label*:*6*:*w_digit*:**:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*', 1, 1, '*', '', '', '', '', 1, '', '', '', '', '', '', '', '', '', '', '', 1, 1, 1, 1, 'administrator,', 0, '', '', 0, 0, 0, 0, 1, 'Business Demographic Survey', 'Thank you for joining our business demographic survey. Please give us your feedback by filling in the information bellow.', '', 'none', 1, 1, 0, '');");
311
  $insert_form_id[] = $wpdb->insert_id;
312
+ $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `header_hide`, `jsversion`, `privacy`) VALUES (NULL, 'Cupcake Order Form', 'embedded', '{adminemail}', '<div class=\"wdform-page-and-images fm-form-builder\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"true\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"2\" class=\"wdform_row\">%2 - Name%</div></div><div class=\"wdform_column\"><div wdid=\"3\" class=\"wdform_row\">%3 - Email%</div></div><div class=\"wdform_column\"><div wdid=\"4\" class=\"wdform_row\">%4 - Date%</div></div><div class=\"wdform_column\"><div wdid=\"5\" class=\"wdform_row\">%5 - Cupcakes Flavors (1 doz. minimum)%</div></div><div class=\"wdform_column\"><div wdid=\"6\" class=\"wdform_row\">%6 - Quantity%</div></div><div class=\"wdform_column\"><div wdid=\"7\" class=\"wdform_row\">%7 - Details (if any)%</div></div><div class=\"wdform_column\"><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', 6, '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}// Occurs after form is submitted and reloaded\r\nfunction after_submit() {\r\n \r\n}', '', '', 1, '{all}', '{all}', 8, 1, '2#**id**#Name#**label**#type_name#****#3#**id**#Email#**label**#type_submitter_mail#****#4#**id**#Date#**label**#type_date_new#****#5#**id**#Cupcakes Flavors (1 doz. minimum)#**label**#type_radio#****#6#**id**#Quantity#**label**#type_spinner#****#7#**id**#Details (if any)#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#5_elementform_id_temp0#**id**#Name#**label**#type_name#****#5_elementform_id_temp1#**id**#Email#**label**#type_submitter_mail#****#5_elementform_id_temp2#**id**#Date#**label**#type_date_new#****#5_elementform_id_temp3#**id**#Name:* Email:* Date* Cupcakes Flavors (1 doz. minimum)#**label**#type_radio#****#5_elementform_id_temp4#**id**#Quantity#**label**#type_spinner#****#5_elementform_id_temp5#**id**#Details (if any)#**label**#type_textarea#****#5_elementform_id_temp6#**id**#type_submit_reset_1#**label**#type_submit_reset#****#5_elementform_id_temp7#**id**#Name#**label**#type_name#****#5_elementform_id_temp8#**id**#Email#**label**#type_submitter_mail#****#5_elementform_id_temp9#**id**#Date#**label**#type_date_new#****#5_elementform_id_temp10#**id**#type_submit_reset_1#**label**#type_submit_reset#****#5_elementform_id_temp11#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '2#**id**#Name#**label**#type_name#****#3#**id**#Email#**label**#type_submitter_mail#****#4#**id**#Date#**label**#type_date_new#****#5#**id**#Cupcakes Flavors (1 doz. minimum)#**label**#type_radio#****#6#**id**#Quantity#**label**#type_spinner#****#7#**id**#Details (if any)#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', 0, 'testmode', '', '', 0, '2*:*id*:*type_name*:*type*:*Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:***********:*w_first_val*:***********:*w_title*:*Title*********Middle*:*w_mini_labels*:**:*w_size*:*normal*:*w_name_format*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no***no*:*w_name_fields*:*no*:*w_autofill*:**:*new_field*:*3*:*id*:*type_submitter_mail*:*type*:*Email*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no*:*w_verification*:*Email confirmation*:*w_verification_label*:**:*w_verification_placeholder*:*no*:*w_autofill*:**:*new_field*:*4*:*id*:*type_date_new*:*type*:*Date*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_date*:*yes*:*w_required*:*yes*:*w_show_image*:**:*w_class*:*mm/dd/yy*:*w_format*:*0*:*w_start_day*:**:*w_default_date*:**:*w_min_date*:**:*w_max_date*:**:*w_invalid_dates*:*yes***yes***yes***yes***yes***yes***yes*:*w_show_days*:*yes*:*w_hide_time*:*...*:*w_but_val*:*no*:*w_disable_past_days*:**:*new_field*:*5*:*id*:*type_radio*:*type*:*Cupcakes Flavors (1 doz. minimum)*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*ver*:*w_flow*:*Red Velvet***Vanilla***Chocolate***Guinness***Coconut***Lemon***Chocolate Mint*:*w_choices*:*false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Red Velvet***Vanilla***Chocolate***Guinness***Coconut***Lemon***Chocolate Mint*:*w_choices_value*:********************:*w_choices_params*:**:*w_class*:**:*new_field*:*6*:*id*:*type_spinner*:*type*:*Quantity*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:*60*:*w_field_width*:**:*w_field_min_value*:**:*w_field_max_value*:*1*:*w_field_step*:*null*:*w_field_value*:*no*:*w_required*:**:*w_class*:**:*new_field*:*7*:*id*:*type_textarea*:*type*:*Details (if any)*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*', 1, 1, '*', '', '', '', '', 1, '', '', '', '', '', '', '', '', '', '', '', 1, 1, 1, 1, 'administrator,', 0, '', '', 0, 0, 0, 0, 1, 'Cupcake Order Form', '', '', 'none', 1, 1, 0, '');");
313
  $insert_form_id[] = $wpdb->insert_id;
314
  }
315
  else {
framework/WDW_FM_Library.php CHANGED
@@ -923,7 +923,7 @@ class WDW_FMC_Library {
923
  $row->hide_mobile = 0;
924
  $row->scrollbox_closing = 1;
925
  $row->scrollbox_minimize = 1;
926
- $row->scrollbox_minimize_text = '';
927
  $row->display_on = 'home,post,page';
928
  $row->posts_include = '';
929
  $row->pages_include = '';
@@ -4860,7 +4860,9 @@ class WDW_FMC_Library {
4860
  // $from_str .= "<" . $from . ">";
4861
  // $headers[] = $from_str;
4862
  self::$email_from = $from;
4863
- add_filter('wp_mail_from', array('WDW_FMC_Library', 'mail_from'));
 
 
4864
  }
4865
 
4866
  if ( isset($header_arr['content_type']) && $header_arr['content_type'] ) {
@@ -4879,7 +4881,9 @@ class WDW_FMC_Library {
4879
  $reply_to = $header_arr['reply_to'];
4880
  $reply_to = trim($reply_to);
4881
  $reply_to = trim($reply_to, ',');
4882
- $headers[] = "Reply-To: <" . $reply_to . ">";
 
 
4883
  }
4884
 
4885
  if ( isset($header_arr['cc']) && $header_arr['cc'] ) {
@@ -4896,6 +4900,14 @@ class WDW_FMC_Library {
4896
  $headers[] = "Bcc: " . $bcc;
4897
  }
4898
 
 
 
 
 
 
 
 
 
4899
  $sent = wp_mail($recipient, $subject, $message, $headers, $attachment);
4900
 
4901
  remove_filter('wp_mail_content_type', array('WDW_FMC_Library', 'mail_content_type'));
923
  $row->hide_mobile = 0;
924
  $row->scrollbox_closing = 1;
925
  $row->scrollbox_minimize = 1;
926
+ $row->scrollbox_minimize_text = 'The form is minimized';
927
  $row->display_on = 'home,post,page';
928
  $row->posts_include = '';
929
  $row->pages_include = '';
4860
  // $from_str .= "<" . $from . ">";
4861
  // $headers[] = $from_str;
4862
  self::$email_from = $from;
4863
+ if ( is_email( $from ) ) {
4864
+ add_filter('wp_mail_from', array('WDW_FM_Library', 'mail_from'));
4865
+ }
4866
  }
4867
 
4868
  if ( isset($header_arr['content_type']) && $header_arr['content_type'] ) {
4881
  $reply_to = $header_arr['reply_to'];
4882
  $reply_to = trim($reply_to);
4883
  $reply_to = trim($reply_to, ',');
4884
+ if ( is_email( $reply_to ) ) {
4885
+ $headers[] = "Reply-To: <" . $reply_to . ">";
4886
+ }
4887
  }
4888
 
4889
  if ( isset($header_arr['cc']) && $header_arr['cc'] ) {
4900
  $headers[] = "Bcc: " . $bcc;
4901
  }
4902
 
4903
+ $temp = array();
4904
+ if( !empty( $attachment ) ) {
4905
+ foreach ( $attachment as $att ) {
4906
+ $temp[] = ABSPATH . $att;
4907
+ }
4908
+ $attachment = $temp;
4909
+ }
4910
+
4911
  $sent = wp_mail($recipient, $subject, $message, $headers, $attachment);
4912
 
4913
  remove_filter('wp_mail_content_type', array('WDW_FMC_Library', 'mail_content_type'));
frontend/controllers/form_maker.php CHANGED
@@ -39,12 +39,12 @@ class FMControllerForm_maker_fmc {
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,19 +56,25 @@ class FMControllerForm_maker_fmc {
56
  * @return string|void
57
  */
58
  public function display( $id = 0, $type = '' ) {
59
- $fm_settings = get_option(WDFMInstance(self::PLUGIN)->is_free == 2 ? 'fmc_settings' : 'fm_settings');
 
 
 
 
 
 
 
 
 
 
 
60
  if ( $type == 'embedded' ) {
61
  $result = $this->model->showform($id, $type);
62
  if ( !$result ) {
63
  return;
64
  }
65
- if ( $this->fm_bot_validation( $id ) ) {
66
- $ok = $this->model->savedata($result[0], $id);
67
- if ( is_numeric($ok) ) {
68
- $this->model->remove($ok);
69
- }
70
- $this->model->increment_views_count($id);
71
- }
72
  return $this->view->display($result, $fm_settings, $id, $type);
73
  }
74
  else {
@@ -87,6 +93,7 @@ class FMControllerForm_maker_fmc {
87
  */
88
  public function autoload_form( $forms = array(), $fm_settings = array() ) {
89
  $fm_forms = array();
 
90
  foreach ($forms as $key => $form) {
91
  $display_on_this = FALSE;
92
  $error = 'success';
@@ -188,13 +195,7 @@ class FMControllerForm_maker_fmc {
188
  if ( !$form_result ) {
189
  continue;
190
  }
191
- if ( $this->fm_bot_validation( $id ) ) {
192
- $ok = $this->model->savedata($form_result[0], $id);
193
- if ( is_numeric($ok) ) {
194
- $this->model->remove($ok);
195
- }
196
- $this->model->increment_views_count($id);
197
- }
198
  $params = array();
199
  $params['id'] = $id;
200
  $params['type'] = $type;
@@ -211,23 +212,6 @@ class FMControllerForm_maker_fmc {
211
  return implode($fm_forms);
212
  }
213
 
214
- /**
215
- * Bot validation.
216
- *
217
- * @param int $form_id
218
- *
219
- * @return bool
220
- */
221
- public function fm_bot_validation( $form_id ) {
222
- 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 ])) ){
223
- WDW_FM_Library(self::PLUGIN)->start_session();
224
- $_SESSION['massage_after_submit' . $form_id] = addslashes(addslashes(__('Error, something went wrong.', WDFMInstance(self::PLUGIN)->prefix)));
225
- $_SESSION['error_or_no' . $form_id] = TRUE;
226
- return false;
227
- }
228
- return true;
229
- }
230
-
231
  public function fm_reload_input() {
232
  global $wpdb;
233
  $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') != '' ) {
67
+ $type = WDW_FM_Library(self::PLUGIN)->get('formType');
68
+ $id = WDW_FM_Library(self::PLUGIN)->get('current_id');
69
+ }
70
+
71
  if ( $type == 'embedded' ) {
72
  $result = $this->model->showform($id, $type);
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
@@ -822,7 +822,18 @@ class FMModelForm_maker_fmc {
822
  }
823
  }
824
  }
825
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-submit:hover {' .
 
 
 
 
 
 
 
 
 
 
 
826
  (!empty( $form_theme[ 'SHPBGColor' ] ) ? 'background-color:' . $form_theme[ 'SHPBGColor' ] . ' !important;' : '') .
827
  (!empty( $form_theme[ 'SHPColor' ] ) ? 'color:' . $form_theme[ 'SHPColor' ] . ' !important;' : '') .
828
  '}';
@@ -1093,171 +1104,189 @@ class FMModelForm_maker_fmc {
1093
  * @return array|mixed
1094
  */
1095
  public function savedata( $form = 0, $id = 0 ) {
1096
- WDFMInstance(self::PLUGIN)->fm_form_nonce = sprintf( WDFMInstance(self::PLUGIN)->fm_form_nonce, $id );
1097
- $fm_settings = WDFMInstance(self::PLUGIN)->fm_settings;
1098
- $all_files = array();
1099
- $correct = FALSE;
 
 
 
1100
  $id_for_old = $id;
1101
  if ( !$form->form_front ) {
1102
  $id = '';
1103
  }
1104
- if ( isset( $_POST[ "counter" . $id ] ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1105
  WDW_FM_Library(self::PLUGIN)->start_session();
1106
- if ( (isset( $_POST[ "save_or_submit" . $id ] ) && $_POST[ "save_or_submit" . $id ] != 'save') ) {
1107
- if ( isset( $_POST[ "captcha_input" ] ) ) {
1108
- $captcha_input = esc_html( $_POST[ "captcha_input" ] );
1109
- $session_wd_captcha_code = isset( $_SESSION[ $id . '_wd_captcha_code' ] ) ? $_SESSION[ $id . '_wd_captcha_code' ] : '-';
1110
- if ( md5( $captcha_input ) == $session_wd_captcha_code ) {
1111
- $correct = TRUE;
1112
- } else {
1113
- $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Error, incorrect Security code.', WDFMInstance(self::PLUGIN)->prefix ) ) );
1114
- $_SESSION[ 'message_captcha' ] = $_SESSION[ 'massage_after_submit' . $id ];
1115
- $_SESSION[ 'error_or_no' . $id ] = 1;
1116
- }
1117
- } elseif ( isset( $_POST[ "arithmetic_captcha_input" ] ) ) {
1118
- $arithmetic_captcha_input = esc_html( $_POST[ "arithmetic_captcha_input" ] );
1119
- $session_wd_arithmetic_captcha_code = isset( $_SESSION[ $id . '_wd_arithmetic_captcha_code' ] ) ? $_SESSION[ $id . '_wd_arithmetic_captcha_code' ] : '-';
1120
- if ( md5( $arithmetic_captcha_input ) == $session_wd_arithmetic_captcha_code ) {
1121
- $correct = TRUE;
1122
- } else {
1123
- $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Error, incorrect Security code.', WDFMInstance(self::PLUGIN)->prefix ) ) );
1124
- $_SESSION[ 'message_captcha' ] = $_SESSION[ 'massage_after_submit' . $id ];
1125
- $_SESSION[ 'error_or_no' . $id ] = 1;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1126
  }
1127
- } elseif ( isset( $_POST[ "g-recaptcha-response" ] ) ) {
1128
- $privatekey = isset( $fm_settings[ 'private_key' ] ) ? $fm_settings[ 'private_key' ] : '';
1129
- $captcha = $_POST[ 'g-recaptcha-response' ];
1130
- $url = 'https://www.google.com/recaptcha/api/siteverify';
1131
- $data = array(
1132
- 'secret' => $privatekey,
1133
- 'response' => $captcha,
1134
- 'remoteip' => $_SERVER[ 'REMOTE_ADDR' ],
1135
- );
1136
- $response = wp_remote_post( $url, array( 'body' => $data ) );
1137
- if ( !is_wp_error( $response ) ) {
1138
- $jsonResponse = json_decode(wp_remote_retrieve_body($response), TRUE);
1139
- if ( $jsonResponse['success'] == "true" ) {
1140
- $correct = TRUE;
1141
- }
1142
- else {
1143
- $_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)));
1144
- $_SESSION['message_captcha'] = $_SESSION['massage_after_submit' . $id];
1145
- $_SESSION['error_or_no' . $id] = 1;
1146
- $correct = FALSE;
1147
- }
1148
- }
1149
- } elseif ( isset( $_POST['recaptcha_response'.$id] ) ){
1150
- // Build POST request:
1151
- $recaptcha_url = 'https://www.google.com/recaptcha/api/siteverify';
1152
- $recaptcha_secret = isset( $fm_settings[ 'private_key' ] ) ? $fm_settings[ 'private_key' ] : '';
1153
- $recaptcha_response = $_POST['recaptcha_response'.$id];
1154
-
1155
- // Make and decode POST request:
1156
- $recaptcha = file_get_contents($recaptcha_url . '?secret=' . $recaptcha_secret . '&response=' . $recaptcha_response);
1157
- $recaptcha = json_decode($recaptcha, true);
1158
- if ( $recaptcha['success'] ) {
1159
- $recaptcha_settings_score = isset($fm_settings[ 'recaptcha_score' ]) ? floatval($fm_settings[ 'recaptcha_score' ]) : 0.5;
1160
- // Take action based on the score returned:
1161
- if ( floatval($recaptcha['score']) >= $recaptcha_settings_score ) {
1162
- $correct = TRUE;
1163
- } else {
1164
- $_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 ) ) );
1165
- $_SESSION[ 'message_captcha' ] = $_SESSION[ 'massage_after_submit' . $id ];
1166
- $_SESSION[ 'error_or_no' . $id ] = 1;
1167
- $correct = FALSE;
1168
- }
1169
- } else {
1170
- $_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 ) ) );
1171
- $_SESSION[ 'message_captcha' ] = $_SESSION[ 'massage_after_submit' . $id ];
1172
- $_SESSION[ 'error_or_no' . $id ] = 1;
1173
- $correct = FALSE;
1174
  }
1175
- } else {
1176
- if ( preg_match( '(type_arithmetic_captcha|type_captcha|type_recaptcha)', $form->label_order_current ) === 1 ) {
1177
- $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Error, incorrect Security code.', WDFMInstance(self::PLUGIN)->prefix ) ) );
1178
- $_SESSION[ 'message_captcha' ] = $_SESSION[ 'massage_after_submit' . $id ];
1179
- $_SESSION[ 'error_or_no' . $id ] = 1;
1180
- $correct = FALSE;
1181
- } else {
1182
- $correct = TRUE;
1183
  }
1184
  }
 
 
 
 
 
1185
  }
1186
- else {
1187
- $correct = TRUE;
1188
- }
1189
- if (
1190
- (isset($_POST[WDFMInstance(self::PLUGIN)->fm_form_nonce]) && !wp_verify_nonce($_POST[WDFMInstance(self::PLUGIN)->fm_form_nonce], WDFMInstance(self::PLUGIN)->fm_form_nonce))
1191
- // @TODO should be fixed to the next version!!!
1192
- // || ! $this->fm_empty_field_validation($id)
1193
- // || ! $this->check_http_referer()
1194
- ) {
1195
- $_SESSION['massage_after_submit' . $id] = addslashes(addslashes(__('Error, something went wrong.', WDFMInstance(self::PLUGIN)->prefix)));
1196
  $_SESSION['error_or_no' . $id] = 1;
1197
- $correct = FALSE;
1198
  }
1199
-
1200
- if ( $correct ) {
1201
- global $wpdb;
1202
- $ip = $_SERVER['REMOTE_ADDR'];
1203
- $blocked_ip = $wpdb->get_var( $wpdb->prepare( 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_blocked WHERE ip="%s"', $ip ) );
1204
- if ( $blocked_ip ) {
1205
- $_SESSION[ 'massage_after_submit' . $id ] = addslashes( __( 'Your ip is blacklisted. Please contact the website administrator.', WDFMInstance(self::PLUGIN)->prefix ) );
1206
- wp_redirect( $_SERVER["REQUEST_URI"] ); //to be checked
1207
- exit;
1208
- }
1209
- if ( isset( $_POST[ "save_or_submit" . $id ] ) && $_POST[ "save_or_submit" . $id ] == 'save' ) {
1210
- if ( WDFMInstance(self::PLUGIN)->is_free != 2 ) {
1211
- $current_user = wp_get_current_user();
1212
- $userid = '';
1213
- $username = '';
1214
- $useremail = '';
1215
- $adminemail = get_option( 'admin_email' );
1216
- $current_page_url = WDW_FM_Library(self::PLUGIN)->get_current_page_url();
1217
- if ( $current_user->ID != 0 ) {
1218
- $userid = $current_user->ID;
1219
- $username = $current_user->display_name;
1220
- $useremail = $current_user->user_email;
1221
- }
1222
- $custom_fields = array(
1223
- "ip" => $ip,
1224
- "subid" => '',
1225
- "userid" => $userid,
1226
- 'adminemail' => $adminemail,
1227
- "useremail" => $useremail,
1228
- "username" => $username,
1229
- 'pageurl' => $current_page_url,
1230
- 'formtitle' => $form->title
1231
- );
1232
- do_action( 'WD_FM_SAVE_PROG_save_progress_init', array( 'id' => $id, 'addon_task' => 'save_progress', 'form' => $form, 'custom_fields' => $custom_fields ) );
1233
- }
1234
- return $all_files;
 
 
 
 
1235
  }
1236
  else {
1237
- $result_temp = $this->save_db( $id_for_old );
1238
- $this->ip_exceeded_limit( $id, $ip );
1239
  // Enqueue any message from an extension to display.
1240
  if ( isset( $result_temp[ 'message' ] ) ) {
1241
  $_SESSION['massage_after_submit' . $id] = $result_temp['message'];
1242
  $_SESSION['error_or_no' . $id ] = 0;
1243
  }
1244
- if ( isset( $result_temp['error'] ) ) {
1245
- $this->remove( $result_temp['group_id'] );
1246
- $_SESSION[ 'error_or_no' . $id ] = 1;
1247
- }
1248
- else {
1249
- if ( WDFMInstance(self::PLUGIN)->is_free != 2 ) {
1250
- do_action( 'WD_FM_SAVE_PROG_save_progress_init', array( 'id' => $id, 'addon_task' => 'clear_data' ) );
1251
- }
1252
- $this->gen_mail( $result_temp['group_id'], $result_temp['all_files'], $id_for_old, $result_temp['redirect_url'] );
1253
  }
 
1254
  }
1255
  }
1256
  }
1257
-
1258
- return $all_files;
1259
  }
1260
 
 
 
 
 
 
 
 
 
 
 
 
1261
  /**
1262
  * Select data from db for labels.
1263
  *
@@ -1351,10 +1380,10 @@ class FMModelForm_maker_fmc {
1351
  $wp_username = $current_user->display_name;
1352
  $wp_useremail = $current_user->user_email;
1353
  }
1354
- $chgnac = TRUE;
1355
  $paypal = array();
1356
  $all_files = array();
1357
- $frontend_parmas = array();
1358
  $paypal['item_name'] = array();
1359
  $paypal['quantity'] = array();
1360
  $paypal['amount'] = array();
@@ -1435,6 +1464,11 @@ class FMModelForm_maker_fmc {
1435
  $i = $label_id[ $key ];
1436
 
1437
  $missing_required_field = FALSE;
 
 
 
 
 
1438
  $invalid_email_address = FALSE;
1439
  $required = (isset($params[$i]) && strpos($params[$i], '*:*yes*:*w_required*:*') !== FALSE ? 1 : 0);
1440
  if ( !in_array( $i, $disabled_fields ) ) {
@@ -1510,12 +1544,16 @@ class FMModelForm_maker_fmc {
1510
  $value1 = isset( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) : "";
1511
  $value2 = isset( $_POST[ 'wdform_' . $i . "_ss" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_ss" . $id ] ) : "";
1512
  $value3 = isset( $_POST[ 'wdform_' . $i . "_am_pm" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_am_pm" . $id ] ) : '';
1513
- $value = ($value0) . ':' . ($value1);
1514
- if ( $value2 ) {
1515
- $value .= ':' . ($value2);
1516
  }
1517
- if ( $value3 ) {
1518
- $value .= ' ' . $value3;
 
 
 
 
 
1519
  }
1520
  if ( $required && ( !isset( $_POST[ 'wdform_' . $i . "_hh" . $id ] ) || !isset( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) ) ) {
1521
  $missing_required_field = TRUE;
@@ -1551,7 +1589,7 @@ class FMModelForm_maker_fmc {
1551
  }
1552
  case "type_file_upload": {
1553
  if ( WDFMInstance(self::PLUGIN)->is_demo ) {
1554
- $value = '';
1555
  } else {
1556
  if ( isset( $_POST[ 'wdform_' . $i . "_file_url" . $id . '_save' ] ) ) {
1557
  $file_url = isset( $_POST[ 'wdform_' . $i . "_file_url" . $id . '_save' ] ) ? stripslashes( $_POST[ 'wdform_' . $i . "_file_url" . $id . '_save' ] ) : NULL;
@@ -2165,9 +2203,9 @@ class FMModelForm_maker_fmc {
2165
  $fvals[ '{' . $i . '}' ] = rtrim( $fvals[ '{' . $i . '}' ], ', ' );
2166
  }
2167
 
2168
- if ( $type == "type_file_upload" ) {
2169
  $fvals['{' . $i . '(link)}'] = rtrim( $fvals['{' . $i . '}'], ', ' );
2170
- }
2171
 
2172
  if ( $form->savedb ) {
2173
  $submition_data = array(
@@ -2189,7 +2227,7 @@ class FMModelForm_maker_fmc {
2189
  if ( !$save_or_no ) {
2190
  return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFMInstance(self::PLUGIN)->prefix ) ) );
2191
  }
2192
- $chgnac = FALSE;
2193
  } else {
2194
  $fvals[ '{' . $i . '}' ] = '';
2195
  }
@@ -2387,14 +2425,16 @@ class FMModelForm_maker_fmc {
2387
  }
2388
  }
2389
  }
2390
- if ( $chgnac ) {
2391
  WDW_FM_Library(self::PLUGIN)->start_session();
2392
  if ( $form->submit_text_type != 4 ) {
2393
  $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Nothing was submitted.', WDFMInstance(self::PLUGIN)->prefix ) ) );
2394
  }
2395
  $_SESSION[ 'error_or_no' . $id ] = 1;
2396
  $_SESSION[ 'form_submit_type' . $id ] = $form->submit_text_type . ',' . $form->id . ',' . $group_id;
2397
- wp_redirect( $_SERVER[ "REQUEST_URI" ] );
 
 
2398
  exit;
2399
  }
2400
 
@@ -2578,11 +2618,10 @@ class FMModelForm_maker_fmc {
2578
  */
2579
  public function increment_views_count( $id = 0 ) {
2580
  global $wpdb;
2581
- $vives_form = $wpdb->get_var( $wpdb->prepare( "SELECT views FROM " . $wpdb->prefix . "formmaker_views WHERE form_id=%d", $id ) );
2582
- if ( isset( $vives_form ) ) {
2583
- $vives_form = $vives_form + 1;
2584
  $wpdb->update( $wpdb->prefix . "formmaker_views", array(
2585
- 'views' => $vives_form,
2586
  ), array( 'form_id' => $id ), array(
2587
  '%d',
2588
  ), array( '%d' ) );
@@ -3512,13 +3551,16 @@ class FMModelForm_maker_fmc {
3512
  }
3513
  }
3514
 
 
 
 
3515
  if ( !$str ) {
3516
  wp_redirect( html_entity_decode( $redirect_url ) );
3517
  exit;
3518
  }
3519
  else {
3520
  $_SESSION[ 'redirect_paypal' . $id ] = 1;
3521
- $str .= "&return=" . urlencode( add_query_arg( array( 'succes' => time() ), $redirect_url ) );
3522
  wp_redirect( $str );
3523
  exit;
3524
  }
@@ -3550,6 +3592,9 @@ class FMModelForm_maker_fmc {
3550
  case "type_number": {
3551
  $element = isset( $_POST[ 'wdform_' . $key . "_element" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id ] : NULL;
3552
  if ( isset( $element ) ) {
 
 
 
3553
  $new_value = $element;
3554
  }
3555
  break;
@@ -4034,7 +4079,7 @@ class FMModelForm_maker_fmc {
4034
  $max_second = 20;
4035
  $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));
4036
  if ( $row >= 4) {
4037
- if( ! $wpdb->get_var($wpdb->prepare( 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_blocked WHERE ip="%s"', $ip )) ) {
4038
  $wpdb->insert($wpdb->prefix . 'formmaker_blocked', array('ip' => $ip), array('%s') );
4039
  }
4040
  }
822
  }
823
  }
824
  }
825
+
826
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-submit .fm-submit-loading.spinner{' .
827
+ (!empty( $form_theme[ 'SPFontSize' ] ) ? 'width:' . $form_theme[ 'SPFontSize' ] . 'px !important;' : '') .
828
+ (!empty( $form_theme[ 'SPFontSize' ] ) ? 'height:' . $form_theme[ 'SPFontSize' ] . 'px !important;' : '') .
829
+ '}';
830
+
831
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-submit .fm-submit-loading.spinner:before{' .
832
+ (!empty( $form_theme[ 'SPColor' ] ) ? 'color:' . $form_theme[ 'SPColor' ] . ' !important;' : '') .
833
+ (!empty( $form_theme[ 'SPFontSize' ] ) ? 'font-size:' . $form_theme[ 'SPFontSize' ] . 'px !important;' : '') .
834
+ '}';
835
+
836
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-submit:hover {' .
837
  (!empty( $form_theme[ 'SHPBGColor' ] ) ? 'background-color:' . $form_theme[ 'SHPBGColor' ] . ' !important;' : '') .
838
  (!empty( $form_theme[ 'SHPColor' ] ) ? 'color:' . $form_theme[ 'SHPColor' ] . ' !important;' : '') .
839
  '}';
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();
1387
  $paypal['item_name'] = array();
1388
  $paypal['quantity'] = array();
1389
  $paypal['amount'] = array();
1464
  $i = $label_id[ $key ];
1465
 
1466
  $missing_required_field = FALSE;
1467
+ if ( $form && $form->gdpr_checkbox == 1 ) {
1468
+ if( !isset($_POST['fm_privacy_policy' . $id]) ) {
1469
+ return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( addslashes( sprintf( __( '%s Submission failed. Your consent to collect personal data is required.', WDFMInstance(self::PLUGIN)->prefix ),'') ) ) );
1470
+ }
1471
+ }
1472
  $invalid_email_address = FALSE;
1473
  $required = (isset($params[$i]) && strpos($params[$i], '*:*yes*:*w_required*:*') !== FALSE ? 1 : 0);
1474
  if ( !in_array( $i, $disabled_fields ) ) {
1544
  $value1 = isset( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) : "";
1545
  $value2 = isset( $_POST[ 'wdform_' . $i . "_ss" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_ss" . $id ] ) : "";
1546
  $value3 = isset( $_POST[ 'wdform_' . $i . "_am_pm" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_am_pm" . $id ] ) : '';
1547
+ if ( !$value0 && !$value1 && !$value2 ) {
1548
+ $value = "";
 
1549
  }
1550
+ else {
1551
+ $value = $value0 ? ($value0) . " : " : "00 : ";
1552
+ $value .= $value1 ? ($value1) : "00";
1553
+ $value .= $value2 ? " : " . ($value2) : "";
1554
+ if ( $value3 ) {
1555
+ $value .= ' ' . $value3;
1556
+ }
1557
  }
1558
  if ( $required && ( !isset( $_POST[ 'wdform_' . $i . "_hh" . $id ] ) || !isset( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) ) ) {
1559
  $missing_required_field = TRUE;
1589
  }
1590
  case "type_file_upload": {
1591
  if ( WDFMInstance(self::PLUGIN)->is_demo ) {
1592
+ $value = __('This functionality is disabled in demo.', WDFMInstance(self::PLUGIN)->prefix );
1593
  } else {
1594
  if ( isset( $_POST[ 'wdform_' . $i . "_file_url" . $id . '_save' ] ) ) {
1595
  $file_url = isset( $_POST[ 'wdform_' . $i . "_file_url" . $id . '_save' ] ) ? stripslashes( $_POST[ 'wdform_' . $i . "_file_url" . $id . '_save' ] ) : NULL;
2203
  $fvals[ '{' . $i . '}' ] = rtrim( $fvals[ '{' . $i . '}' ], ', ' );
2204
  }
2205
 
2206
+ if ( $type == "type_file_upload" ) {
2207
  $fvals['{' . $i . '(link)}'] = rtrim( $fvals['{' . $i . '}'], ', ' );
2208
+ }
2209
 
2210
  if ( $form->savedb ) {
2211
  $submition_data = 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 ) ) );
2432
  }
2433
  $_SESSION[ 'error_or_no' . $id ] = 1;
2434
  $_SESSION[ 'form_submit_type' . $id ] = $form->submit_text_type . ',' . $form->id . ',' . $group_id;
2435
+ // Add query arg to url to display message on cached pages.
2436
+ $redirect_url = add_query_arg( array( 'succes' => time() ), $_SERVER[ "REQUEST_URI" ] );
2437
+ wp_redirect( $redirect_url );
2438
  exit;
2439
  }
2440
 
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' ) );
3551
  }
3552
  }
3553
 
3554
+ // Add query arg to url to display message on cached pages.
3555
+ $redirect_url = add_query_arg( array( 'succes' => time() ), $redirect_url );
3556
+
3557
  if ( !$str ) {
3558
  wp_redirect( html_entity_decode( $redirect_url ) );
3559
  exit;
3560
  }
3561
  else {
3562
  $_SESSION[ 'redirect_paypal' . $id ] = 1;
3563
+ $str .= "&return=" . urlencode( $redirect_url );
3564
  wp_redirect( $str );
3565
  exit;
3566
  }
3592
  case "type_number": {
3593
  $element = isset( $_POST[ 'wdform_' . $key . "_element" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id ] : NULL;
3594
  if ( isset( $element ) ) {
3595
+ if ( 'type_textarea' == $type ) {
3596
+ $element = nl2br($element);
3597
+ }
3598
  $new_value = $element;
3599
  }
3600
  break;
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
@@ -39,6 +39,10 @@ class FMViewForm_maker_fmc {
39
  $_SESSION['fm_empty_field_validation' . $form_id] = md5(uniqid(rand(), TRUE));
40
  }
41
 
 
 
 
 
42
  if ( !WDW_FM_Library(self::PLUGIN)->elementor_is_active() ) {
43
  wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-frontend');
44
  wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-frontend');
@@ -148,6 +152,19 @@ class FMViewForm_maker_fmc {
148
  $form_maker_front_end .= '<input type="hidden" id="Itemid' . $form_id . '" value="" name="Itemid' . $form_id . '" />';
149
  $form_maker_front_end .= '<input type="text" class="fm-hide" id="fm_bot_validation' . $form_id . '" value="" name="fm_bot_validation' . $form_id . '" />';
150
  $form_maker_front_end .= '<input type="text" class="fm-hide" id="fm_empty_field_validation' . $form_id . '" value="" name="fm_empty_field_validation' . $form_id . '" data-value="'. $_SESSION['fm_empty_field_validation' . $form_id] .'" />';
 
 
 
 
 
 
 
 
 
 
 
 
 
151
  $form_maker_front_end .= $this->get_nonce_field();
152
 
153
  if ( !$fm_hide_form_after_submit ) {
@@ -1607,8 +1624,10 @@ class FMViewForm_maker_fmc {
1607
  $rep = $this->wdform_field('type_gdpr_compliance_checkbox', $param, $row, $gdpr_checkbox_html, FALSE);
1608
  $disabled_submit = 'disabled="disabled"';
1609
  }
1610
-
1611
- $html = '<button ' . $disabled_submit . ' type="button" class="button-submit" ' . $submit_onclick . ' ' . $param['attributes'] . '>' . $param['w_submit_title'] . '</button>';
 
 
1612
  $html .= '<button ' . $disabled_reset . ' type="button" class="button-reset ' . $param['w_act'] . '" ' . $reset_onclick . ' ' . $param['attributes'] . '>' . $param['w_reset_title'] . '</button>';
1613
 
1614
  // Generate field.
@@ -1794,7 +1813,7 @@ class FMViewForm_maker_fmc {
1794
  $closing = $form->topbar_closing;
1795
  $hide_duration = $form->topbar_hide_duration;
1796
  $hide_mobile = wp_is_mobile() && $form->hide_mobile ? FALSE : TRUE;
1797
- if ($display_on_this && $hide_mobile) {
1798
  WDW_FM_Library(self::PLUGIN)->start_session();
1799
  if (isset($_SESSION['fm_hide_form_after_submit' . $id]) && $_SESSION['fm_hide_form_after_submit' . $id] == 1) {
1800
  if ($error == 'success') {
@@ -1827,7 +1846,7 @@ class FMViewForm_maker_fmc {
1827
  $fm_form .= $this->display($form_result, $fm_settings, $id, $type);
1828
  $fm_form .= '<div id="fm-action-buttons' . $id . '" class="fm-action-buttons">';
1829
  if ($closing) {
1830
- $fm_form .= '<span id="closing-form' . $id . '" class="closing-form dashicons dashicons-no" onclick="fm_hide_form(' . $id . ', ' . $hide_duration . ', function(){
1831
  jQuery(\'#fm-topbar' . $id . '\').css(\'display\', \'none\');
1832
  })">
1833
  </span>';
@@ -1848,7 +1867,7 @@ class FMViewForm_maker_fmc {
1848
  $hide_mobile_class = wp_is_mobile() ? 'fm_mobile_full' : '';
1849
  $hide_mobile = wp_is_mobile() && $form->hide_mobile ? FALSE : TRUE;
1850
  $left_right_class = $form->scrollbox_position ? 'float-right' : 'float-left';
1851
- if ($display_on_this && $hide_mobile) {
1852
  WDW_FM_Library(self::PLUGIN)->start_session();
1853
  if ( isset($_SESSION['fm_hide_form_after_submit' . $id]) && $_SESSION['fm_hide_form_after_submit' . $id] == 1 ) {
1854
  if ( $error == 'success' ) {
@@ -1907,10 +1926,10 @@ class FMViewForm_maker_fmc {
1907
  $fm_form .= $this->display($form_result, $fm_settings, $id, $type);
1908
  $fm_form .= '<div id="fm-action-buttons' . $id . '" class="fm-action-buttons">';
1909
  if ($minimize) {
1910
- $fm_form .= '<span id="minimize-form' . $id . '" class="minimize-form dashicons dashicons-minus" onclick="minimize_form(' . $id . ')"></span>';
1911
  }
1912
  if ($closing) {
1913
- $fm_form .= '<span id="closing-form' . $id . '" class="closing-form dashicons dashicons-no" onclick="fm_hide_form(' . $id . ', ' . $hide_duration . ', function(){ jQuery(\'#fm-scrollbox' . $id . '\').removeClass(\'fm-show\').addClass(\'fm-hide\'); });"></span>';
1914
  }
1915
  $fm_form .= '</div>';
1916
  $fm_form .= '</div>';
@@ -1925,8 +1944,7 @@ class FMViewForm_maker_fmc {
1925
  $frequency = $form->popover_frequency;
1926
  $hide_mobile = wp_is_mobile() && $form->hide_mobile ? FALSE : TRUE;
1927
  $hide_mobile_class = wp_is_mobile() ? 'fm_mobile_full' : '';
1928
-
1929
- if ($display_on_this && $hide_mobile) {
1930
  WDW_FM_Library(self::PLUGIN)->start_session();
1931
  if (isset($_SESSION['fm_hide_form_after_submit' . $id]) && $_SESSION['fm_hide_form_after_submit' . $id] == 1) {
1932
  if ($error == 'success') {
@@ -1995,7 +2013,7 @@ class FMViewForm_maker_fmc {
1995
  <div class="fm-popover-content">';
1996
  $fm_form .= $this->display($form_result, $fm_settings, $id, $type);
1997
  $fm_form .= '<div id="fm-action-buttons' . $id . '" class="fm-action-buttons">';
1998
- $fm_form .= '<span id="closing-form' . $id . '" class="closing-form dashicons dashicons-no" onclick="fm_hide_form(' . $id . ', ' . $frequency . ', function(){
1999
  jQuery(\'#fm-popover-background' . $id . '\').css(\'display\', \'none\');
2000
  jQuery(\'#fm-popover' . $id . '\').css(\'display\', \'none\');
2001
  });"></span>
39
  $_SESSION['fm_empty_field_validation' . $form_id] = md5(uniqid(rand(), TRUE));
40
  }
41
 
42
+ if ( $fm_settings['fm_developer_mode'] ) {
43
+ wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-icons', WDFMInstance(self::PLUGIN)->plugin_url . '/css/fonts.css', array(), '1.0.1');
44
+ }
45
+
46
  if ( !WDW_FM_Library(self::PLUGIN)->elementor_is_active() ) {
47
  wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-frontend');
48
  wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-frontend');
152
  $form_maker_front_end .= '<input type="hidden" id="Itemid' . $form_id . '" value="" name="Itemid' . $form_id . '" />';
153
  $form_maker_front_end .= '<input type="text" class="fm-hide" id="fm_bot_validation' . $form_id . '" value="" name="fm_bot_validation' . $form_id . '" />';
154
  $form_maker_front_end .= '<input type="text" class="fm-hide" id="fm_empty_field_validation' . $form_id . '" value="" name="fm_empty_field_validation' . $form_id . '" data-value="'. $_SESSION['fm_empty_field_validation' . $form_id] .'" />';
155
+ if (isset($fm_settings['fm_ajax_submit']) && $fm_settings['fm_ajax_submit']) {
156
+ $form_submit_url = add_query_arg( array(
157
+ 'action' => 'fmc_submit_form',
158
+ 'current_id' => $form_id,
159
+ 'formType' => $formType ), admin_url('admin-ajax.php'));
160
+ $form_maker_front_end .= '<input type="hidden" id="fm_ajax_url' . $form_id.'" data-ajax_url="'. $form_submit_url .'" />';
161
+ if($row->submit_text_type == 1 || $row->submit_text_type == 3) {
162
+ $action_after_sub = 0;
163
+ } else {
164
+ $action_after_sub = $row->article_id;
165
+ }
166
+ $form_maker_front_end .= '<input type="hidden" id="fm_ajax_redirect_url' . $form_id.'" data-ajax_redirect_url="'. $action_after_sub .'" />';
167
+ }
168
  $form_maker_front_end .= $this->get_nonce_field();
169
 
170
  if ( !$fm_hide_form_after_submit ) {
1624
  $rep = $this->wdform_field('type_gdpr_compliance_checkbox', $param, $row, $gdpr_checkbox_html, FALSE);
1625
  $disabled_submit = 'disabled="disabled"';
1626
  }
1627
+ $ajax_submit_status = isset($fm_settings['fm_ajax_submit']) ? $fm_settings['fm_ajax_submit'] : 0;
1628
+ $html = '<button ' . $disabled_submit . ' type="button" class="button-submit" ' . $submit_onclick . ' ' . $param['attributes'] . ' data-ajax="'.$ajax_submit_status.'">';
1629
+ $html .= '<span class="fm-submit-loading spinner fm-ico-spinner"></span>' . $param['w_submit_title'];
1630
+ $html .= '</button>';
1631
  $html .= '<button ' . $disabled_reset . ' type="button" class="button-reset ' . $param['w_act'] . '" ' . $reset_onclick . ' ' . $param['attributes'] . '>' . $param['w_reset_title'] . '</button>';
1632
 
1633
  // Generate field.
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) {
1819
  if ($error == 'success') {
1846
  $fm_form .= $this->display($form_result, $fm_settings, $id, $type);
1847
  $fm_form .= '<div id="fm-action-buttons' . $id . '" class="fm-action-buttons">';
1848
  if ($closing) {
1849
+ $fm_form .= '<span id="closing-form' . $id . '" class="closing-form fm-ico-delete" onclick="fm_hide_form(' . $id . ', ' . $hide_duration . ', function(){
1850
  jQuery(\'#fm-topbar' . $id . '\').css(\'display\', \'none\');
1851
  })">
1852
  </span>';
1867
  $hide_mobile_class = wp_is_mobile() ? 'fm_mobile_full' : '';
1868
  $hide_mobile = wp_is_mobile() && $form->hide_mobile ? FALSE : TRUE;
1869
  $left_right_class = $form->scrollbox_position ? 'float-right' : 'float-left';
1870
+ if ($display_on_this && $hide_mobile || $fm_settings['fm_ajax_submit']) {
1871
  WDW_FM_Library(self::PLUGIN)->start_session();
1872
  if ( isset($_SESSION['fm_hide_form_after_submit' . $id]) && $_SESSION['fm_hide_form_after_submit' . $id] == 1 ) {
1873
  if ( $error == 'success' ) {
1926
  $fm_form .= $this->display($form_result, $fm_settings, $id, $type);
1927
  $fm_form .= '<div id="fm-action-buttons' . $id . '" class="fm-action-buttons">';
1928
  if ($minimize) {
1929
+ $fm_form .= '<span id="minimize-form' . $id . '" class="minimize-form fm-ico-expand" onclick="minimize_form(' . $id . ')"></span>';
1930
  }
1931
  if ($closing) {
1932
+ $fm_form .= '<span id="closing-form' . $id . '" class="closing-form fm-ico-delete" onclick="fm_hide_form(' . $id . ', ' . $hide_duration . ', function(){ jQuery(\'#fm-scrollbox' . $id . '\').removeClass(\'fm-show\').addClass(\'fm-hide\'); });"></span>';
1933
  }
1934
  $fm_form .= '</div>';
1935
  $fm_form .= '</div>';
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) {
1950
  if ($error == 'success') {
2013
  <div class="fm-popover-content">';
2014
  $fm_form .= $this->display($form_result, $fm_settings, $id, $type);
2015
  $fm_form .= '<div id="fm-action-buttons' . $id . '" class="fm-action-buttons">';
2016
+ $fm_form .= '<span id="closing-form' . $id . '" class="closing-form fm-ico-delete" onclick="fm_hide_form(' . $id . ', ' . $frequency . ', function(){
2017
  jQuery(\'#fm-popover-background' . $id . '\').css(\'display\', \'none\');
2018
  jQuery(\'#fm-popover' . $id . '\').css(\'display\', \'none\');
2019
  });"></span>
images/tw-gb/icon.svg CHANGED
@@ -1,76 +1,10 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 21.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
- viewBox="0 0 20 14.4" style="enable-background:new 0 0 20 14.4;" xml:space="preserve">
5
- <style type="text/css">
6
- .st0{fill:#F4F4F4;}
7
- .st1{fill:#36B2E2;}
8
- .st2{fill:none;}
9
- .st3{fill:#555D66;}
10
- </style>
11
- <g>
12
- <g>
13
- <g id="XMLID_43896_">
14
- <path class="st0" d="M-154.2-24.5h-135.5c-5.1,0-9.3,4.2-9.3,9.3v91.4c0,5.1,4.2,9.3,9.3,9.3h135.5c5.1,0,9.3-4.2,9.3-9.3v-91.4
15
- C-144.9-20.3-149.1-24.5-154.2-24.5z"/>
16
- </g>
17
- <rect id="XMLID_27593_" x="-220.4" y="36.1" class="st1" width="63.8" height="3.9"/>
18
- <rect id="XMLID_172_" x="-220.4" y="27.1" class="st1" width="63.8" height="3.9"/>
19
- <rect id="XMLID_170_" x="-220.4" y="19.1" class="st1" width="63.8" height="3.9"/>
20
- <rect id="XMLID_42880_" x="-220.4" y="43.9" class="st1" width="63.8" height="3.9"/>
21
- <rect id="XMLID_42649_" x="-287.3" y="51.7" class="st1" width="130.8" height="3.9"/>
22
- <rect id="XMLID_42418_" x="-287.3" y="59.5" class="st1" width="130.8" height="3.9"/>
23
- <rect id="XMLID_42187_" x="-220.4" y="1.2" class="st1" width="18" height="13.1"/>
24
- <rect id="XMLID_41956_" x="-197.5" y="1.2" class="st1" width="18" height="13.1"/>
25
- <rect id="XMLID_41725_" x="-174.6" y="1.2" class="st1" width="18" height="13.1"/>
26
- <rect id="XMLID_39345_" x="-287.3" y="1.2" class="st1" width="54.7" height="38.4"/>
27
- <path id="XMLID_27261_" class="st2" d="M-237.4,37.9c-0.8-3.9-2.2-7.6-4.4-10.9c-1.8-2.7-4.1-5-6.5-7.1c-0.2-0.2-0.8-0.3-0.4-0.8
28
- c0.5-0.6,0.1-1-0.4-1.2c-0.7-0.3-0.5-0.6-0.1-1c3.7-4.5,4.6-9.5,2.1-14.7c-0.1-0.3-0.3-0.6-0.4-0.8c-2.5-4.7-6.6-7.3-12.3-7.2
29
- c-5.5,0.1-9.7,2.5-12.1,7.2c-0.1,0.2-0.2,0.4-0.3,0.6c-2.4,5-1.8,10,1.7,14.5c0.5,0.6,1,1.1-0.1,1.5c-0.2,0.1-0.5,0.3-0.4,0.6
30
- c0.2,0.7-0.4,1-0.8,1.3c-5.5,4.5-9.1,10.2-10.5,17.2c-0.4,1.9-0.4,1.9,1.4,2.8c42.8,0,42.8,0,42.8,0S-237.2,38.7-237.4,37.9z
31
- M-249.9,21c-0.1,0.1-0.2,0.3-0.4,0.4c-4.2,3.7-6.8,8.4-8.5,13.6c-0.1,0.2-0.1,0.5-0.2,0.7c-0.2,0.5-0.4,1-1.1,1
32
- c-0.7,0-1-0.5-1.1-1c-0.4-1.1-0.7-2.3-1.1-3.4c-1.2-3.1-2.8-5.9-4.9-8.4c-1-1.1-0.7-1.1-1.8,0c-3.9,4.4-6.5,9.4-8.1,15
33
- c-0.1,0.3-0.7,0.8-0.7,0.8s-1.8-0.7-1.6-1.5c1.5-5.9,4.5-11,8.9-15.3c0.2-0.2,0.5-0.4,0.7-0.7c0.2-0.2,0.6-0.3,0.3-0.7
34
- s-0.6,0-0.8,0.2c-0.6,0.6-1.2,1.1-1.8,1.8c-3.8,4.1-6.5,8.8-8,14.2c-0.1,0.3,0.1,0.9-0.5,0.7c-0.6-0.1-0.4-0.6-0.4-1
35
- c1.4-6.9,5-12.5,10.4-17c0.7-0.5,1-0.3,1.5,0.1c4.1,3.7,6.6,8.4,8.3,13.6c0.1,0.4,0.2,0.7,0.4,1.1c0.2,0.5,0.5,0.7,0.9,0.2
36
- c-0.1-0.1-0.2-0.3-0.3-0.4c-0.6-0.5-0.5-1.3-0.7-2c-0.4-1.5-0.7-3-0.9-4.6c0-0.1,0-0.2,0-0.3c-0.4-0.7,1.2-1.3,0.1-2
37
- c-0.7-0.4-0.8-1.3-1.1-2c-0.6,0.2-0.7,0.8-1.3,1.2c-1.5-2.3-3.2-4.4-5.2-6.3c-0.1-0.2-0.3-0.3-0.1-0.5c0.1-0.2,0.3-0.2,0.6-0.1
38
- c0.2,0.2,0.4,0.3,0.7,0.5c4.7,3.5,11.3,3.4,15.9-0.1c0.2-0.2,0.4-0.4,0.7-0.5c0.3-0.2,0.6,0,0.7,0.2c0.3,0.3-0.1,0.4-0.2,0.6
39
- c-2,1.8-3.7,3.8-5.1,6.1c-0.4,0-0.4-0.5-0.8-0.6c-0.3,0.7-0.6,1.5-1.3,1.9c-0.3,0.2-0.3,0.4-0.1,0.6c0.5,0.6,0.4,1.3,0.2,2
40
- c-0.2,1.1-0.8,2-0.7,3.1c0.5-0.1,0.5-0.6,0.6-0.9c1.6-3.8,3.7-7.2,6.6-10c0.3-0.2,0.5-0.5,0.8-0.7c0.1-0.1,0.3-0.2,0.5,0
41
- C-249.9,20.5-249.7,20.8-249.9,21z"/>
42
- <g id="XMLID_27027_">
43
-
44
- <image style="overflow:visible;opacity:0.1;enable-background:new ;" width="52" height="53" xlink:href="8E868446.png" transform="matrix(1 0 0 1 -286.02 -9.7034)">
45
- </image>
46
- <g>
47
- <g>
48
- <path class="st0" d="M-237.3,37.9c-0.8-3.9-2.2-7.6-4.4-10.9c-1.8-2.7-4.1-5-6.5-7.1c-0.2-0.2-0.8-0.3-0.4-0.8
49
- c0.5-0.6,0.1-1-0.4-1.2c-0.7-0.3-0.5-0.6-0.1-1c3.7-4.5,4.6-9.5,2.1-14.7c-0.1-0.3-0.3-0.6-0.4-0.8c-2.5-4.7-6.6-7.3-12.3-7.2
50
- c-5.5,0.1-9.7,2.5-12.1,7.2c-0.1,0.2-0.2,0.4-0.3,0.6c-2.5,5-1.9,10,1.6,14.5c0.5,0.6,1,1.1-0.1,1.5c-0.2,0.1-0.5,0.3-0.4,0.6
51
- c0.2,0.7-0.4,1-0.8,1.3c-5.5,4.5-9.1,10.2-10.5,17.2c-0.4,1.9-0.4,1.9,1.4,2.8c42.8,0,42.8,0,42.8,0S-237.2,38.7-237.3,37.9z
52
- M-249.9,21c-0.1,0.1-0.2,0.3-0.4,0.4c-4.2,3.7-6.8,8.4-8.5,13.6c-0.1,0.2-0.1,0.5-0.2,0.7c-0.2,0.5-0.4,1-1.1,1
53
- c-0.7,0-1-0.5-1.1-1c-0.4-1.1-0.7-2.3-1.1-3.4c-1.2-3.1-2.8-5.9-4.9-8.4c-1-1.1-0.7-1.1-1.8,0c-3.9,4.4-6.5,9.4-8.1,15
54
- c-0.1,0.3-0.7,0.8-0.7,0.8s-1.8-0.7-1.6-1.5c1.5-5.9,4.5-11,8.9-15.3c0.2-0.2,0.5-0.4,0.7-0.7c0.2-0.2,0.6-0.3,0.3-0.7
55
- s-0.6,0-0.8,0.2c-0.6,0.6-1.2,1.1-1.8,1.8c-3.8,4.1-6.5,8.8-8,14.2c-0.1,0.3,0.1,0.9-0.5,0.7c-0.6-0.1-0.4-0.6-0.4-1
56
- c1.4-6.9,5-12.5,10.4-17c0.7-0.5,1-0.3,1.5,0.1c4.1,3.7,6.6,8.4,8.3,13.6c0.1,0.4,0.2,0.7,0.4,1.1c0.2,0.5,0.5,0.7,0.9,0.2
57
- c-0.1-0.1-0.2-0.3-0.3-0.4c-0.6-0.5-0.5-1.3-0.7-2c-0.4-1.5-0.7-3-0.9-4.6c0-0.1,0-0.2,0-0.3c-0.4-0.7,1.2-1.3,0.1-2
58
- c-0.7-0.4-0.8-1.3-1.1-2c-0.6,0.2-0.7,0.8-1.3,1.2c-1.5-2.3-3.2-4.4-5.2-6.3c-0.1-0.2-0.3-0.3-0.1-0.5c0.1-0.2,0.3-0.2,0.6-0.1
59
- c0.2,0.2,0.4,0.3,0.7,0.5c4.7,3.5,11.3,3.4,15.9-0.1c0.2-0.2,0.4-0.4,0.7-0.5c0.3-0.2,0.6,0,0.7,0.2c0.3,0.3-0.1,0.4-0.2,0.6
60
- c-2,1.8-3.7,3.8-5.1,6.1c-0.4,0-0.4-0.5-0.8-0.6c-0.3,0.7-0.6,1.5-1.3,1.9c-0.3,0.2-0.3,0.4-0.1,0.6c0.5,0.6,0.4,1.3,0.2,2
61
- c-0.2,1.1-0.8,2-0.7,3.1c0.5-0.1,0.5-0.6,0.6-0.9c1.6-3.8,3.7-7.2,6.6-10c0.3-0.2,0.5-0.5,0.8-0.7c0.1-0.1,0.3-0.2,0.5,0
62
- C-249.8,20.5-249.7,20.8-249.9,21z"/>
63
- </g>
64
- </g>
65
- </g>
66
- </g>
67
- </g>
68
- <path class="st3" d="M5.1,2.7c-0.9,0-1.6,0.7-1.6,1.6s0.7,1.6,1.6,1.6s1.6-0.7,1.6-1.6S6,2.7,5.1,2.7z M5.1,5.7
69
- c-0.8,0-1.4-0.6-1.4-1.4s0.6-1.4,1.4-1.4s1.4,0.6,1.4,1.4S5.9,5.7,5.1,5.7z"/>
70
- <path class="st3" d="M18.8,0.1H1.2C0.6,0.1,0,0.6,0,1.3v11.8c0,0.7,0.5,1.2,1.2,1.2h17.6c0.7,0,1.2-0.5,1.2-1.2V1.3
71
- C20,0.6,19.4,0.1,18.8,0.1z M16.1,3.4h2.3v1.7h-2.3V3.4z M13.2,3.4h2.3v1.7h-2.3V3.4z M10.2,3.4h2.3v1.7h-2.3V3.4z M10.2,5.7h8.3
72
- v0.5h-8.3V5.7z M10.2,6.7h8.3v0.5h-8.3V6.7z M10.2,7.9h8.3v0.5h-8.3V7.9z M10.2,8.9h8.3v0.5h-8.3V8.9z M1.5,8.1L1.5,8.1l0-4.7h1.9
73
- c0.3-0.6,1-1,1.7-1s1.4,0.4,1.7,1h1.8v4.7h0v0.3H2.6l1.3-1.9l0.8,1.2C4.8,7.9,5,7.9,5.2,7.8c0,0,0,0,0.1-0.1c0,0,0,0,0,0l1.3-1.5
74
- c0.1-0.2,0.1-0.4,0-0.5C6.4,5.6,6.1,5.6,6,5.7L5,6.9L4.2,5.7c0,0,0,0,0,0c0,0-0.1-0.1-0.1-0.1C3.9,5.5,3.7,5.5,3.5,5.7L1.7,8.4
75
- c0,0,0,0,0,0H1.5V8.1z M18.5,11.4H1.5v-0.5h16.9V11.4z M18.5,10.4H1.5V9.9h16.9V10.4z"/>
76
  </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="575 368 20 14.641">
2
+ <defs>
3
+ <style>
4
+ .cls-1 {
5
+ fill: #555d66;
6
+ }
7
+ </style>
8
+ </defs>
9
+ <path id="Form_Maker_2_" data-name="Form Maker (2)" class="cls-1" d="M19.4,0H.585A.59.59,0,0,0,0,.585V14.056a.59.59,0,0,0,.585.585h18.83A.59.59,0,0,0,20,14.056V.585A.611.611,0,0,0,19.4,0ZM6.622,2.407H12.34v.878H6.622V2.407Zm0,1.622H12.34v.878H6.622C6.622,4.894,6.622,4.455,6.622,4.029Zm0,1.463H12.34V6.37H6.622C6.622,6.356,6.622,5.785,6.622,5.492ZM1.649,2.407H6.037V6.356H1.649V2.407Zm16.676,10.4H1.649V9.721H18.324Zm0-4.1H1.649V7.394H18.324Zm0-2.354H12.766V5.479h5.559Zm0-1.463H12.766V4.029h5.559Zm0-1.6H12.766V2.447h5.559Z" transform="translate(575 368)"/>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  </svg>
js/form_maker_manage.js CHANGED
@@ -158,7 +158,7 @@ function refresh_() {
158
  });
159
  jQuery("#take div").removeClass("ui-sortable ui-sortable-disabled ui-sortable-handle");
160
  jQuery( "#add_field_cont" ).remove(); // remove add new button from div content
161
- document.getElementById('form_front').value = document.getElementById('take').innerHTML;
162
  }
163
 
164
  function fm_add_submission_email(toAdd_id, value_id, parent_id, cfm_url) {
158
  });
159
  jQuery("#take div").removeClass("ui-sortable ui-sortable-disabled ui-sortable-handle");
160
  jQuery( "#add_field_cont" ).remove(); // remove add new button from div content
161
+ document.getElementById('form_front').value = btoa(encodeURI(document.getElementById('take').innerHTML));
162
  }
163
 
164
  function fm_add_submission_email(toAdd_id, value_id, parent_id, cfm_url) {
js/form_maker_manage_edit.js CHANGED
@@ -294,7 +294,7 @@ function FormManageSubmitButton(check_for_changes) {
294
  }
295
  }
296
  if (!check_for_changes) {
297
- document.getElementById('label_order_current').value = tox;
298
  }
299
 
300
  for (x = 0; x < l_id_array.length; x++) {
@@ -303,8 +303,8 @@ function FormManageSubmitButton(check_for_changes) {
303
  }
304
  }
305
  if (!check_for_changes) {
306
- document.getElementById('label_order').value = tox;
307
- document.getElementById('form_fields').value = form_fields;
308
  refresh_();
309
  document.getElementById('pagination').value = document.getElementById('pages').getAttribute("type");
310
  document.getElementById('show_title').value = document.getElementById('pages').getAttribute("show_title");
294
  }
295
  }
296
  if (!check_for_changes) {
297
+ document.getElementById('label_order_current').value = btoa(encodeURI(tox));
298
  }
299
 
300
  for (x = 0; x < l_id_array.length; x++) {
303
  }
304
  }
305
  if (!check_for_changes) {
306
+ document.getElementById('label_order').value = btoa(encodeURI(tox));
307
+ document.getElementById('form_fields').value = btoa(encodeURI(form_fields));
308
  refresh_();
309
  document.getElementById('pagination').value = document.getElementById('pages').getAttribute("type");
310
  document.getElementById('show_title').value = document.getElementById('pages').getAttribute("show_title");
js/main_div_front_end.js CHANGED
@@ -621,7 +621,7 @@ function make_page_steps_front(form_view, form_id, form_view_count) {
621
  next_checkable = (document.getElementById(form_id + 'form_view' + form_view).getAttribute('next_checkable') == 'true');
622
  previous_checkable = (document.getElementById(form_id + 'form_view' + form_view).getAttribute('previous_checkable') == 'true');
623
  k = 0;
624
- jQuery('.wdform-page-and-images').each(function () {
625
  var index = jQuery(this).find('.wdform_page').attr('id');
626
  j = index.split("form_view")[1];
627
  if (document.getElementById(form_id + 'form_view' + j)) {
@@ -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(!window["check_before_submit" + form_id][wdid + "_" + form_id]) {
973
  condition_confirm_email = true;
974
  }
975
  else {
@@ -1781,7 +1781,43 @@ function fm_submit_form(form_id) {
1781
 
1782
  function fm_submit(form_id) {
1783
  fm_set_input_value('fm_empty_field_validation' + form_id, jQuery('#fm_empty_field_validation' + form_id).attr('data-value') );
1784
- jQuery("#form"+form_id).submit();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1785
  }
1786
 
1787
  function fm_reset_form(form_id) {
621
  next_checkable = (document.getElementById(form_id + 'form_view' + form_view).getAttribute('next_checkable') == 'true');
622
  previous_checkable = (document.getElementById(form_id + 'form_view' + form_view).getAttribute('previous_checkable') == 'true');
623
  k = 0;
624
+ jQuery('#form'+form_id+' .wdform-page-and-images').each(function () {
625
  var index = jQuery(this).find('.wdform_page').attr('id');
626
  j = index.split("form_view")[1];
627
  if (document.getElementById(form_id + 'form_view' + j)) {
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 {
1781
 
1782
  function fm_submit(form_id) {
1783
  fm_set_input_value('fm_empty_field_validation' + form_id, jQuery('#fm_empty_field_validation' + form_id).attr('data-value') );
1784
+ var ajax_submit = jQuery("#form" + form_id + " .button-submit").attr("data-ajax");
1785
+ if( ajax_submit != '0' ) {
1786
+ jQuery('#form'+form_id+' .fm-submit-loading').css('display','inline-block');
1787
+ var form = jQuery('#form'+form_id)[0];
1788
+ var formData = new FormData(form);
1789
+ var ajax_url = jQuery('#fm_ajax_url' + form_id).data("ajax_url");
1790
+ var after_submit_redirect_url = jQuery('#form'+form_id+' #fm_ajax_redirect_url'+form_id).data('ajax_redirect_url');
1791
+ jQuery.ajax({
1792
+ type: "POST",
1793
+ enctype: 'multipart/form-data',
1794
+ url: ajax_url,
1795
+ data: formData,
1796
+ contentType: false,
1797
+ processData: false,
1798
+ success: function(response) {
1799
+ jQuery("#form" + form_id + " .button-submit").removeAttr("disabled");
1800
+ jQuery('#form'+form_id+' .fm-submit-loading').hide();
1801
+ var result = jQuery(response).find('#form'+form_id).html();
1802
+ jQuery('#form'+form_id).html(result);
1803
+ var error = false;
1804
+ if(jQuery(result).find('.fm-not-filled.message_captcha').length > 0 || jQuery(result).find('.fm-notice-error').length > 0 || result.indexOf('class="fm-message fm-notice-error"') > -1) {
1805
+ error = true;
1806
+ }
1807
+
1808
+ if ( after_submit_redirect_url != 0 && !error) {
1809
+ window.location.replace(after_submit_redirect_url);
1810
+ }
1811
+ },
1812
+ complete: function() {
1813
+ if ( typeof window['after_submit' + form_id] === 'function' ) {
1814
+ window['after_submit' + form_id]();
1815
+ }
1816
+ }
1817
+ });
1818
+ } else {
1819
+ jQuery("#form" + form_id).submit();
1820
+ }
1821
  }
1822
 
1823
  function fm_reset_form(form_id) {
js/manage-edit-scripts.min.js CHANGED
@@ -1 +1 @@
1
- function fm_admin_ready(){jQuery(".wd-header a").on("click",function(){jQuery("input[name='task']").val("add"),jQuery(this).parents("form").submit()}),set_no_items(),jQuery(".wd-datepicker").each(function(){jQuery(this).datepicker(),jQuery(this).datepicker("option","dateFormat",jQuery(this).data("format"))}),jQuery(".hndle:not(.readonly), .handlediv").each(function(){jQuery(this).off("click").on("click",function(){fm_toggle_postbox(this)})}),jQuery(".wd-has-placeholder .dashicons.dashicons-list-view, .wd-editor-placeholder .dashicons.dashicons-list-view").each(function(){jQuery(this).attr("title",form_maker.add_placeholder)}),jQuery(document).on("click",".wd-has-placeholder .dashicons.dashicons-list-view, .wd-editor-placeholder .dashicons.dashicons-list-view",function(){fm_placeholders_popup(jQuery(this).data("id"))}),fm_disabled_uninstall_btn(),jQuery(".fm-uninstall-form #check_yes").on("click",function(){fm_disabled_uninstall_btn()}),void 0!==jQuery(document).tooltip&&jQuery(document).tooltip({show:null,items:".wd-info",content:function(){if(jQuery(this).is(".wd-info"))return jQuery("#"+jQuery(this).data("id")).html()},open:function(e,t){if(void 0===e.originalEvent)return!1;var i=jQuery(t.tooltip).attr("id");jQuery("div.ui-tooltip").not("#"+i).remove()},close:function(e,t){t.tooltip.hover(function(){jQuery(this).stop(!0).fadeTo(400,1)},function(){jQuery(this).fadeOut("400",function(){jQuery(this).remove()})})},position:{my:"center top+30",at:"center top",using:function(e,t){jQuery(this).css(e),jQuery("<div>").addClass("tooltip-arrow").addClass(t.vertical).addClass(t.horizontal).appendTo(this)}}})}function wd_insert_placeholder(e,t){var i=document.getElementById(e);if(tinyMCE.get(e)&&tinyMCE.get(e).focus(),"none"!=i.style.display)if(i.focus(),document.selection)sel=document.selection.createRange(),sel.text=t;else if(i.selectionStart||"0"==i.selectionStart){var a=i.selectionStart,n=i.selectionEnd;i.value=i.value.substring(0,a)+"{"+t+"}"+i.value.substring(n,i.value.length)}else i.value+="{"+t+"}";else tinyMCE.execCommand("mceInsertContent",!1,"{"+t+"}")}function fm_toggle_postbox(e){jQuery(e).parent(".postbox").toggleClass("closed")}function fm_option_tabs_mail_validation(){return!0}function fm_clear_input_value(e){jQuery("#"+e).val("")}function set_no_items(){jQuery(".colspanchange").attr("colspan",jQuery(".wd-form table.adminlist>thead>tr>th:visible").length+jQuery(".wd-form table.adminlist>thead>tr>td:visible").length)}function search(e){var t=jQuery(e).parents("form");t.attr("action",window.location+"&paged=1&s="+jQuery("input[name='s']").val()),t.submit()}function input_search(e,t){return 13==(e.keyCode?e.keyCode:e.which)&&search(t),!0}function input_pagination(e,t){if(13==(e.keyCode?e.keyCode:e.which)){var i=jQuery(t).parents("form"),a=jQuery(t).val();if(a<=jQuery(t).parents(".pagination-links").data("pages-count")&&0<a){var n=new RegExp("&nonce_fm="+nonce_fm,"g"),l=i.attr("action").replace(n,"").replace(/&paged=(\d+)/,"")+"&paged="+a;i.attr("action",l),location.href=l}}return!0}function fm_select_value(e){e.focus(),e.select()}function fm_doNothing(e){13==(e.keyCode?e.keyCode:e.which?e.which:e.charCode)&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}function wd_bulk_action(e){var t=jQuery("select[name='bulk_action']").val();if(-1!=t){if(!jQuery("input[name^='check']").is(":checked"))return void alert(form_maker.select_at_least_one_item);if("delete"==t&&!confirm(form_maker.delete_confirmation))return!1;jQuery("input[name='task']").val(t),jQuery(e).parents("form").submit()}}function fm_ajax_save(e){var t=jQuery("#"+e).action,i=jQuery("#search_value").val(),a=jQuery("#current_id").val(),n=jQuery("#page_number").val(),l=(jQuery("#search_or_not").val(),jQuery("#ids_string").val()),d=jQuery("#image_order_by").val(),_=jQuery("#asc_or_desc").val(),r=jQuery("#ajax_task").val(),o=jQuery("#image_current_id").val();return ids_array=l.split(","),jQuery.ajax({type:"POST",url:t,data:{search_value:i,current_id:a,page_number:n,image_order_by:d,asc_or_desc:_,ids_string:l,task:"ajax_search",ajax_task:r,image_current_id:o,nonce:fm_ajax.ajaxnonce},success:function(e){var t=jQuery(e).find("#images_table").html();jQuery("#images_table").html(t);t=jQuery(e).find("#tablenav-pages").html();jQuery("#tablenav-pages").html(t),jQuery("#show_hide_weights").val("Hide order column"),fm_show_hide_weights(),fm_run_checkbox()}}),!1}function fm_run_checkbox(){jQuery("tbody").children().children(".check-column").find(":checkbox").click(function(e){if("undefined"==e.shiftKey)return!0;if(e.shiftKey){if(!i)return!0;d=jQuery(i).closest("form").find(":checkbox"),f=d.index(i),j=d.index(this),h=jQuery(this).prop("checked"),0<f&&0<j&&f!=j&&d.slice(f,j).prop("checked",function(){return!!jQuery(this).closest("tr").is(":visible")&&h})}i=this;var t=jQuery(this).closest("tbody").find(":checkbox").filter(":visible").not(":checked");return jQuery(this).closest("table").children("thead, tfoot").find(":checkbox").prop("checked",function(){return 0==t.length}),!0}),jQuery("thead, tfoot").find(".check-column :checkbox").click(function(e){var t=jQuery(this).prop("checked"),i="undefined"!=typeof toggleWithKeyboard&&toggleWithKeyboard,a=e.shiftKey||i;jQuery(this).closest("table").children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",function(){return!jQuery(this).is(":hidden")&&(a?jQuery(this).prop("checked"):!!t)}),jQuery(this).closest("table").children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",function(){return!a&&!!t})})}function fm_set_input_value(e,t){document.getElementById(e)&&(document.getElementById(e).value=t)}function fm_form_submit(e,t,i,a){document.getElementById(t)&&document.getElementById(t).submit(),e.preventDefault?e.preventDefault():e.returnValue=!1}function fm_check_required(e,t){return""==jQuery("#"+e).val()&&(alert(t+" field is required."),jQuery("#"+e).attr("style","border-color: #FF0000; border-style: solid; border-width: 1px;"),jQuery("#"+e).focus(),jQuery("html, body").animate({scrollTop:jQuery("#"+e).offset().top-200},500),!0)}function fm_show_hide_weights(){var a;"Show order column"==jQuery("#show_hide_weights").val()?(jQuery(".connectedSortable").css("cursor","default"),jQuery("#tbody_arr").find(".handle").hide(0),jQuery("#th_order").show(0),jQuery("#tbody_arr").find(".fm_order").show(0),jQuery("#show_hide_weights").val("Hide order column"),jQuery("#tbody_arr").sortable()&&jQuery("#tbody_arr").sortable("disable")):(jQuery(".connectedSortable").css("cursor","move"),a=jQuery("#page_number")&&""!=jQuery("#page_number").val()&&1!=jQuery("#page_number").val()?20*(jQuery("#page_number").val()-1)+1:1,jQuery("#tbody_arr").sortable({handle:".connectedSortable",connectWith:".connectedSortable",update:function(e,t){jQuery("#draganddrop").attr("style",""),jQuery("#draganddrop").html("<strong><p>Changes made in this table should be saved.</p></strong>");var i=a;jQuery(".fm_order").each(function(e){jQuery(this).find("input").val()&&jQuery(this).find("input").val(i++)})}}),jQuery("#tbody_arr").sortable("enable"),jQuery("#tbody_arr").find(".handle").show(0),jQuery("#tbody_arr").find(".handle").attr("class","handle connectedSortable"),jQuery("#th_order").hide(0),jQuery("#tbody_arr").find(".fm_order").hide(0),jQuery("#show_hide_weights").val("Show order column"))}function fm_popup(e){if(void 0===e)e="";var a,l,d;(a=function(){var e,t,i=jQuery("#TB_window"),a=jQuery(window).height(),n=jQuery(window).width();e=l&&l<n-90?l:n-40,t=d&&d<a-60?d:a-40,i.size()&&(i.width(e).height(t),jQuery("#TB_iframeContent").width(e).height(t-27),i.css({"margin-left":"-"+parseInt(e/2,10)+"px"}),void 0!==document.body.style.maxWidth&&i.css({top:(a-t)/2,"margin-top":"0"}))})(),jQuery(window).resize(function(){a()}),jQuery("a.thickbox-preview"+e).click(function(){tb_click.call(this);var e=jQuery(this).parents(".available-theme").find(".activatelink"),t="",i=jQuery(this).attr("href");return l=(l=i.match(/&width=[0-9]+/))?parseInt(l[0].replace(/[^0-9]+/g,""),10):jQuery(window).width()-120,d=(d=i.match(/&height=[0-9]+/))?parseInt(d[0].replace(/[^0-9]+/g,""),10):jQuery(window).height()-120,t=e.length?'&nbsp; <a href="'+(e.attr("href")||"")+'" target="_top" class="tb-theme-preview-link">'+(e.attr("title")||"")+"</a>":'&nbsp; <span class="tb-theme-preview-link">'+(jQuery(this).attr("title")||"")+"</span>",jQuery("#TB_title").css({"background-color":"#222",color:"#dfdfdf"}),jQuery("#TB_closeAjaxWindow").css({float:"right"}),jQuery("#TB_ajaxWindowTitle").css({float:"left"}).html(t),jQuery("#TB_iframeContent").width("100%"),a(),!1}),jQuery(".theme-detail").click(function(){return jQuery(this).siblings(".themedetaildiv").toggle(),!1})}function bwg_inputs(){jQuery(".fm_int_input").keypress(function(e){var t=e.which||e.paramlist_keyCode;return!(31<t&&(t<48||57<t)&&46!=t&&45!=t)})}function fm_check_isnum(e){var t=e.which||e.paramlist_keyCode;return!(31<t&&(t<48||58<t)&&46!=t&&45!=t&&(t<65||70<t)&&(t<97||102<t))}function fm_change_payment_method(e){switch(e){case"paypal":jQuery(".fm_payment_option").show(),jQuery(".fm_paypal_option").show(),jQuery(".fm_payment_option_stripe").hide();break;case"stripe":jQuery(".fm_payment_option").hide(),jQuery(".fm_paypal_option").hide(),jQuery(".fm_payment_option_stripe").show();break;default:jQuery(".fm_payment_option").hide(),jQuery(".fm_paypal_option").hide(),jQuery(".fm_payment_option_stripe").hide()}}function stopRKey(e){var t=(e=e||(event||null)).target?e.target:e.srcElement?e.srcElement:null;if(13==e.keyCode&&("text"==t.type||"search"==t.type))return!1}function fmRemoveHeaderImage(e,t){jQuery("#header_image_url").val(""),jQuery("#header_image").css("background-image",""),jQuery("#header_image").addClass("fm-hide")}function fmOpenMediaUploader(e,t){void 0===t&&(t=!1),e.preventDefault();var i=wp.media({title:"Upload",button:{text:"Add Image"},multiple:!1}).on("select",function(){var e=i.state().get("selection").first().toJSON();jQuery("#header_image_url").val(e.url),jQuery("#header_image").css("background-image",'url("'+e.url+'")'),jQuery("#header_image").css("background-position","center"),jQuery("#header_image").removeClass("fm-hide")}).open();return!1}function fm_toggle_posts(e){jQuery(e).prop("checked")?jQuery(".fm-posts-show, .fm-cat-show").removeClass("fm-hide").addClass("fm-show"):jQuery(".fm-posts-show, .fm-cat-show").removeClass("fm-show").addClass("fm-hide")}function fm_toggle_pages(e){jQuery(e).prop("checked")?jQuery(".fm-pages-show").removeClass("fm-hide").addClass("fm-show"):jQuery(".fm-pages-show").removeClass("fm-show").addClass("fm-hide")}function fm_apply_options(e){fm_set_input_value("task",e),document.getElementById("manage_form").submit()}function pp_live_search(e,t,i){var a=e,n=a.val(),l=a.data("post_type");setTimeout(function(){n===a.val()&&jQuery.ajax({type:"POST",url:ajaxurl,data:{action:"manage_fmc",task:"fm_live_search",nonce:fm_ajax.ajaxnonce,pp_live_search:n,pp_post_type:l,pp_full_content:i},beforeSend:function(e){a.css("width","95%"),a.parent().find(".fm-loading").css("display","inline-block")},success:function(e){a.css("width","100%"),a.parent().find(".fm-loading").css("display","none"),a.closest(".fm-pp").find(".pp_search_results").replaceWith(e)},error:function(e){console.log(e)}})},t)}function fm_toggle(e){jQuery(e).parent().next().toggleClass("hide")}function change_tab(e){jQuery(".fm-subscriber-header .fm-button").removeClass("active-button"),jQuery(".fm-subscriber-header ."+e).addClass("active-button"),jQuery(".fm-subscriber-content").hide(),jQuery("."+e+"-tab").show()}function change_form_type(e){jQuery("#fieldset_id").val(e),jQuery(".fm-form-types span").removeClass("active"),jQuery(".fm-form-types").find(".fm-"+e).addClass("active"),jQuery("#type_settings_fieldset .wd-group").removeClass("fm-show").addClass("fm-hide")}function change_hide_show(e){jQuery("."+e+".fm-hide").removeClass("fm-hide").addClass("fm-temporary"),jQuery("."+e+".fm-show").removeClass("fm-show").addClass("fm-hide"),jQuery("."+e+".fm-show-table").removeClass("fm-show-table").addClass("fm-hide"),jQuery("."+e+".fm-temporary").removeClass("fm-temporary").addClass("fm-show"),"fm-embedded"!=e&&(fm_toggle_posts(jQuery(".pp_display_on #pt3")),fm_toggle_pages(jQuery(".pp_display_on #pt4")))}function fm_change_radio_checkbox_text(e){var t=[];t.stripemode=["Test","Live"],t.checkout_mode=["Testmode","Production"],t.mail_mode=["Text","HTML"],t.mail_mode_user=["Text","HTML"],t.value=["1","0"],t.popover_show_on=["Page Exit","Page Load"],t.topbar_position=["Bottom","Top"],t.scrollbox_position=["Left","Right"],jQuery(e).val(t.value[jQuery(e).val()]),jQuery(e).next().val(jQuery(e).val());var i=t[jQuery(e).attr("name")];jQuery(e).find("label").html(i[jQuery(e).val()]),jQuery(e).hasClass("fm-text-yes")?(jQuery(e).removeClass("fm-text-yes").addClass("fm-text-no"),jQuery(e).find("span").animate({right:parseInt(jQuery(e).css("width"))-14+"px"},400,function(){})):(jQuery(e).removeClass("fm-text-no").addClass("fm-text-yes"),jQuery(e).find("span").animate({right:0},400,function(){}))}function fm_show_hide(e){jQuery("."+e).hasClass("fm-hide")?jQuery("."+e).removeClass("fm-hide").addClass("fm-show"):jQuery("."+e).removeClass("fm-show").addClass("fm-hide")}function fm_delete_ip(e){jQuery("#td_ip_"+e+" .loading").css("display","initial");var i=jQuery("#blocked_ips").attr("action");jQuery.ajax({type:"POST",url:i,data:{current_id:e,nonce_fm:jQuery("#nonce_fm").val(),task:"delete_blocked_ip"},success:function(e){var t=parseInt(jQuery(e).find("#total_for_paging").html());isNaN(t)||(i=i.replace(/(paged=)[^\&]+/,"$1"+t)),jQuery("#blocked_ips").parent(".wrap").load(i+" #blocked_ips",function(){window.history.pushState(null,null,i),0!=jQuery(".updated").length?jQuery(" .updated p strong").html("Items Successfully Deleted"):jQuery("<div class='updated below-h2'><p><strong>Items Successfully Deleted.</strong></p></div>").insertBefore("#blocked_ips"),set_no_items()})}})}function fm_save_ip(t){var i=jQuery("#ip"+t).val();url=jQuery("#blocked_ips").attr("action"),jQuery.ajax({type:"POST",url:url,data:{ip:i,nonce_fm:jQuery("#nonce_fm").val(),task:"insert_blocked_ip"},success:function(e){jQuery("#td_ip_"+t).html('<a id="ip'+t+'" class="pointer" title="Edit" onclick="fm_edit_ip('+t+')">'+i+"</a>"),jQuery(".insert, .error").hide(),jQuery("#fm_blocked_ips_message").html("<div class='updated'><strong><p>Items Successfully Inserted.</p></strong></div>"),jQuery("#fm_blocked_ips_message").show()}})}function fm_insert_blocked_ip(){jQuery("#tr .loading").css("display","initial");var e=jQuery("#fm_ip").val(),t=window.location.href;jQuery.ajax({type:"POST",url:t,data:{ip:e,nonce_fm:jQuery("#nonce_fm").val(),task:"insert_blocked_ip",last_id:1},success:function(e){jQuery("#blocked_ips").parent(".wrap").load(t+" #blocked_ips",function(){window.history.pushState(null,null,t),0!=jQuery(".updated").length?jQuery(".updated p strong").html("Items Successfully Saved"):jQuery("<div class='updated below-h2'><p><strong>Items Successfully Saved.</strong></p></div>").insertBefore("#blocked_ips")})}})}function fm_edit_ip(e){var t='<input id="ip'+e+'" class="input_th'+e+' ip_input" type="text" onkeypress="if(event.keyCode == 13){ if (fm_check_required(\'ip'+e+"', 'IP')) {return false;} fm_update_blocked_ip("+e+'); } return fm_check_isnum(event); " value="'+jQuery("#ip"+e).html()+'" name="ip'+e+'"/>';t+='<input type="button" class="button ip_save" style="margin-left: 5px" onclick="if (fm_check_required(\'ip'+e+"', 'IP')) {return false;} fm_update_blocked_ip("+e+'); return false;" value="Save"><div class="loading">',t+="<img src="+plugin_url+"/images/loading.gif></div>",jQuery("#td_ip_"+e).html(t)}function fm_enter_ip(e){if(13==e.which){if(fm_check_required("fm_ip","IP"))return!1;e.preventDefault(),fm_insert_blocked_ip()}}function fm_update_blocked_ip(e){jQuery("#td_ip_"+e+" .loading").css("display","initial");var t=jQuery("#ip"+e).val(),i=window.location.href;jQuery.ajax({type:"POST",url:i,data:{ip:t,current_id:e,nonce_fm:jQuery("#nonce_fm").val(),task:"update_blocked_ip"},success:function(e){jQuery(".wrap").load(i+" #blocked_ips",function(){0!=jQuery(".updated").length?(window.history.pushState(null,null,i),jQuery(".updated p strong").html("Items Successfully Updated")):jQuery("<div class='updated below-h2'><p><strong>Items Successfully Updated.</strong></p></div>").insertBefore("#blocked_ips")})}})}function onEnableChange(e,t,i){var a=jQuery("#"+e+" #"+t);"1"==i?a.removeClass("hidden"):a.addClass("hidden")}function show_stats(){var e=jQuery(".fm-statistics .fm_error_sorted_label_key");""!=jQuery("#sorted_label_key").val()?(e.hide(),jQuery(".fm-div_stats-loading").addClass("is-active"),jQuery.ajax({dataType:"json",type:"POST",url:show_stats_url,data:{sorted_label_key:jQuery("#sorted_label_key").val(),startdate:jQuery("#startstats").val(),enddate:jQuery("#endstats").val(),nonce:fm_ajax.ajaxnonce},beforeSend:function(e){},error:function(e){},success:function(e){jQuery(".fm-div_stats-loading").removeClass("is-active"),e.html&&jQuery("#div_stats").html(e.html)}})):e.show()}function fm_loading_show(){jQuery("#fm_loading").show()}function fm_loading_hide(){jQuery("#fm_loading").hide(),"function"==typeof add_scroll_width&&add_scroll_width(),set_no_items()}function getFormLocalStorage(){var e={};formId=getAllUrlParams().current_id;var t=localStorage.getItem("fm_form"+formId);return null!=t&&(e=jQuery.parseJSON(t)),e}function getAllUrlParams(e){var t=e?e.split("?")[1]:window.location.search.slice(1),i={};if(t)for(var a=(t=t.split("#")[0]).split("&"),n=0;n<a.length;n++){var l=a[n].split("="),d=void 0,_=l[0].replace(/\[\d*\]/,function(e){return d=e.slice(1,-1),""}),r=void 0===l[1]||l[1];_=_.toLowerCase(),r=r.toLowerCase(),i[_]?("string"==typeof i[_]&&(i[_]=[i[_]]),void 0===d?i[_].push(r):i[_][d]=r):i[_]=r}return i}function fm_disabled_uninstall_btn(){jQuery(".fm-uninstall-form .fm-uninstall-btn").prop("disabled",!0),jQuery(".fm-uninstall-form #check_yes").is(":checked")&&jQuery(".fm-uninstall-form .fm-uninstall-btn").prop("disabled",!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 fm_row_handle(e){var t=jQuery(e);t.find(".wdform_row_handle").remove();var i=jQuery('<div class="wdform_row_handle"><span class="fm-ico-draggable"></span><span title="Remove the column" class="page_toolbar fm-ico-delete" onclick="fm_remove_row_popup(this);"></span>'+"<span class=\"add-new-field\" onclick=\"jQuery('#cur_column').removeAttr('id');jQuery(this).parent().parent().attr('id', 'cur_column').val(1);popup_ready(); Enable(); return false;\">"+form_maker_manage.add_new_field+'</span><div class="fm-divider"></div></div>');t.prepend(i),i.after('<div class="fm-section-overlay"></div>')}function sortable_columns(){jQuery("#take").sortable({cursor:"move",placeholder:"highlight",tolerance:"pointer",handle:".form_id_tempform_view_img .fm-ico-draggable",items:"> .wdform-page-and-images",axis:"y",update:function(e,t){refresh_page_numbers()}}),jQuery(".wdform_page").sortable({connectWith:".wdform_page",cursor:"move",placeholder:"highlight",tolerance:"pointer",handle:".wdform_row_handle",cancel:".add-new-field, .page_toolbar",items:"> .wdform_section",create:function(e,t){jQuery(e.target).find(".wdform_section").each(function(){fm_row_handle(this)})},start:function(e,t){jQuery(".wdform_row_empty").hide()},stop:function(e,t){fm_rows_refresh(),jQuery(".wdform_row_empty").show()}}),jQuery(".wdform_column").sortable({connectWith:".wdform_column",cursor:"move",placeholder:"highlight",tolerance:"pointer",cancel:".wdform_section_handle",items:"> .wdform_row, #add_field",start:function(e,t){jQuery(".add-new-button").off("click"),jQuery(".wdform_column").removeClass("fm-hidden"),jQuery("#cur_column").removeAttr("id")},stop:function(e,t){return"add_field_cont"!=t.item.parent().attr("id")&&("add_field"==t.item.attr("id")&&"add_field_cont"!=t.item.parent().attr("id")?(nextID=jQuery("#add_field").next(".wdform_row").attr("wdid"),jQuery("#add_field").parent().attr("id","cur_column"),popup_ready(),Enable(),jQuery(".add-new-button").removeAttr("onclick"),!1):(jQuery(".wdform_column:not(#add_field_cont):empty").addClass("fm-hidden"),void fm_columns_refresh()))}})}function all_sortable_events(){fm_rows_refresh(),fm_columns_refresh(),jQuery(".wdform_row, .wdform_tr_section_break").off("hover, touchstart").on("hover, touchstart",function(e){if(!jQuery(this).find(".wdform_arrows").is(":visible"))return jQuery(".wdform_arrows").hide(),jQuery(this).find(".wdform_arrows").show(),e.preventDefault(),!1}).off("mouseleave").on("mouseleave",function(){jQuery(this).find(".wdform_arrows").hide()}),jQuery(".wdform_section_handle, .wdform_row_handle").off("hover, touchstart").on("hover, touchstart",function(e){jQuery(this).parent().addClass("fm-hover")}).off("mouseleave").on("mouseleave",function(){jQuery(this).parent().removeClass("fm-hover")})}function fm_change_radio(e){jQuery(e).hasClass("fm-yes")?(jQuery(e).val("0"),jQuery(e).next().val("0"),jQuery(e).removeClass("fm-yes").addClass("fm-no"),jQuery(e).find("span").animate({right:parseInt(jQuery(e).css("width"))-14+"px"},400,function(){})):(jQuery(e).val("1"),jQuery(e).next().val("1"),jQuery(e).find("span").animate({right:0},400,function(){jQuery(e).removeClass("fm-no").addClass("fm-yes")})),"mail_verify"==jQuery(e).next().attr("name")&&show_verify_options(1==jQuery(e).val())}function enable_drag(){jQuery(".wdform_column").sortable("enable"),jQuery(".wdform_arrows_advanced").hide(),jQuery(".wdform_field").css("cursor",""),jQuery("#add_field .wdform_field").css("cursor",""),all_sortable_events()}function refresh_(){document.getElementById("counter").value=gen,jQuery(".wdform-page-and-images").each(function(){var e=jQuery(this);e.find("[id^=page_next_]").removeAttr("src"),e.find("[id^=page_previous_]").removeAttr("src"),e.find(".form_id_tempform_view_img").remove()}),jQuery("#take div").removeClass("ui-sortable ui-sortable-disabled ui-sortable-handle"),jQuery("#add_field_cont").remove(),document.getElementById("form_front").value=document.getElementById("take").innerHTML}function fm_add_submission_email(e,t,i,a){var n=jQuery("#"+t).val();if(n){var l=jQuery("<p>").attr("class","fm_mail_input").prependTo("#"+i);jQuery("<span>").attr("class","mail_name").text(n).appendTo(l),jQuery("<span>").attr("class","dashicons dashicons-trash").attr("onclick","fm_delete_mail(this, '"+n+"')").attr("title","Delete Email").appendTo(l),jQuery("#"+t).val(""),jQuery("#"+e).val(jQuery("#"+e).val()+n+",")}}function fm_delete_mail(e,t){jQuery(e).parent().remove(),jQuery("#mail").val(jQuery("#mail").val().replace(t+",",""))}function form_maker_options_tabs(e){return jQuery("#fieldset_id").val(e),jQuery(".fm_fieldset_active").removeClass("fm_fieldset_active").addClass("fm_fieldset_deactive"),jQuery("#"+e+"_fieldset").removeClass("fm_fieldset_deactive").addClass("fm_fieldset_active"),jQuery(".fm_fieldset_tab").removeClass("active"),jQuery("#"+e).addClass("active"),!1}function set_type(e){switch(e){case"post":document.getElementById("post").removeAttribute("style"),document.getElementById("page").setAttribute("style","display:none"),document.getElementById("custom_text").setAttribute("style","display:none"),document.getElementById("url").setAttribute("style","display:none");break;case"page":document.getElementById("page").removeAttribute("style"),document.getElementById("post").setAttribute("style","display:none"),document.getElementById("custom_text").setAttribute("style","display:none"),document.getElementById("url").setAttribute("style","display:none");break;case"custom_text":document.getElementById("page").setAttribute("style","display:none"),document.getElementById("post").setAttribute("style","display:none"),document.getElementById("custom_text").removeAttribute("style"),document.getElementById("url").setAttribute("style","display:none");break;case"url":document.getElementById("page").setAttribute("style","display:none"),document.getElementById("post").setAttribute("style","display:none"),document.getElementById("custom_text").setAttribute("style","display:none"),document.getElementById("url").removeAttribute("style");break;case"none":document.getElementById("page").setAttribute("style","display:none"),document.getElementById("post").setAttribute("style","display:none"),document.getElementById("custom_text").setAttribute("style","display:none"),document.getElementById("url").setAttribute("style","display:none")}}function check_isnum(e){var t=e.which||e.keyCode;return!(31<t&&(t<48||57<t)&&46!=t&&45!=t&&(t<35||40<t))}function fm_check_email(e){if(document.getElementById(e)&&""!=jQuery("#"+e).val()){for(var t=jQuery("#"+e).val().split(","),i=/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,61}$/,a=0;a<t.length;a++){var n=t[a].replace(/^\s+|\s+$/g,"");if(n&&!i.test(n)&&-1===n.indexOf("{")){if(alert("This is not a valid email address."),jQuery("#submenu li a").hasClass("active")){var l=jQuery("#submenu .active").attr("id");if(void 0!==(_=jQuery("#"+e).closest(".fm_fieldset_deactive").attr("id")))if(l!=(r=_.split("_fieldset")[0])){var d=l+"_fieldset";jQuery("#"+d).removeClass("fm_fieldset_active"),jQuery("#"+d).removeClass("fm_fieldset_deactive"),jQuery("#"+_).addClass("fm_fieldset_active"),jQuery("#submenu .active").removeClass("active"),jQuery("#"+r).addClass("active")}}else{var _;if(void 0!==(_=jQuery("#"+e).closest(".fm_fieldset_deactive").attr("id"))){var r=_.split("_fieldset");r=r[0],jQuery("#"+_).removeClass("fm_fieldset_deactive"),jQuery("#"+_).addClass("fm_fieldset_active"),jQuery("#"+r).addClass("active")}}return jQuery("#"+e).css("border","1px solid #FF0000"),jQuery("#"+e).focus(),jQuery("html, body").animate({scrollTop:jQuery("#"+e).offset().top-200},500),!0}}jQuery("#"+e).css("border","1px solid #ddd")}return!1}function wdhide(e){document.getElementById(e).style.display="none"}function wdshow(e){document.getElementById(e).style.display="block"}function delete_field_condition(e){var t=e.split("_");document.getElementById("condition"+t[0]).removeChild(document.getElementById("condition_div"+e))}function change_choices(e,t,i,a){switch(e=e.split("_"),global_index=e[0],id=e[1],index=e[2],ids_array=t.split("@@**@@"),types_array=i.split("@@**@@"),params_array=a.split("@@**@@"),types_array[id]){case"type_text":case"type_password":case"type_textarea":case"type_name":case"type_submitter_mail":case"type_number":case"type_phone":case"type_paypal_price":case"type_paypal_price_new":case"type_spinner":case"type_date_new":case"type_phone_new":if("type_number"==types_array[id]||"type_phone"==types_array[id])var n="return check_isnum_space(event)";else if("type_paypal_price"==types_array[id]||"type_paypal_price_new"==types_array[id])n="return check_isnum_point(event)";else n="";if("SELECT"==document.getElementById("field_value"+global_index+"_"+index).tagName){document.getElementById("condition_div"+global_index+"_"+index).removeChild(document.getElementById("field_value"+global_index+"_"+index));var l=document.createElement("input");l.setAttribute("id","field_value"+global_index+"_"+index),l.setAttribute("type","text"),l.setAttribute("value",""),l.setAttribute("class","fm_condition_field_input_value"),l.setAttribute("onKeyPress",n),document.getElementById("condition_div"+global_index+"_"+index).insertBefore(l,document.getElementById("delete_condition"+global_index+"_"+index)),document.getElementById("condition_div"+global_index+"_"+index).insertBefore(document.createTextNode(" "),document.getElementById("delete_condition"+global_index+"_"+index))}else document.getElementById("field_value"+global_index+"_"+index).value="",document.getElementById("field_value"+global_index+"_"+index).setAttribute("onKeyPress",n);break;case"type_own_select":case"type_radio":case"type_checkbox":for("type_own_select"==types_array[id]?w_size=params_array[id].split("*:*w_size*:*"):w_size=params_array[id].split("*:*w_flow*:*"),w_choices=w_size[1].split("*:*w_choices*:*"),w_choices_array=w_choices[0].split("***"),-1!==w_size[1].indexOf("*:*w_value_disabled*:*")?(w_value_disabled=w_size[1].split("*:*w_value_disabled*:*"),w_choices_value=w_value_disabled[1].split("*:*w_choices_value*:*"),w_choices_value_array=w_choices_value[0].split("***")):w_choices_value_array=w_choices_array,(_=document.createElement("select")).setAttribute("id","field_value"+global_index+"_"+index),_.setAttribute("class","fm_condition_field_select_value"),"type_checkbox"==types_array[id]&&(_.setAttribute("multiple","multiple"),_.setAttribute("class","multiple_select")),k=0;k<w_choices_array.length;k++){(d=document.createElement("option")).setAttribute("id","choise_"+global_index+"_"+k),d.setAttribute("value",w_choices_value_array[k]),d.innerHTML=w_choices_array[k],-1===w_choices_array[k].indexOf("[")&&-1===w_choices_array[k].indexOf("]")&&_.appendChild(d)}document.getElementById("condition_div"+global_index+"_"+index).removeChild(document.getElementById("field_value"+global_index+"_"+index)),document.getElementById("condition_div"+global_index+"_"+index).insertBefore(_,document.getElementById("delete_condition"+global_index+"_"+index)),document.getElementById("condition_div"+global_index+"_"+index).insertBefore(document.createTextNode(" "),document.getElementById("delete_condition"+global_index+"_"+index));break;case"type_paypal_select":case"type_paypal_radio":case"type_paypal_checkbox":case"type_paypal_shipping":for("type_paypal_select"==types_array[id]?w_size=params_array[id].split("*:*w_size*:*"):w_size=params_array[id].split("*:*w_flow*:*"),w_choices=w_size[1].split("*:*w_choices*:*"),w_choices_array=w_choices[0].split("***"),w_choices_price=w_choices[1].split("*:*w_choices_price*:*"),w_choices_price_array=w_choices_price[0].split("***"),(_=document.createElement("select")).setAttribute("id","field_value"+global_index+"_"+index),_.setAttribute("class","fm_condition_field_select_value"),"type_paypal_checkbox"==types_array[id]&&(_.setAttribute("multiple","multiple"),_.setAttribute("class","multiple_select")),k=0;k<w_choices_array.length;k++){var d;(d=document.createElement("option")).setAttribute("id","choise_"+global_index+"_"+k),d.setAttribute("value",w_choices_array[k]+"*:*value*:*"+w_choices_price_array[k]),d.innerHTML=w_choices_array[k],-1===w_choices_array[k].indexOf("[")&&-1===w_choices_array[k].indexOf("]")&&_.appendChild(d)}document.getElementById("condition_div"+global_index+"_"+index).removeChild(document.getElementById("field_value"+global_index+"_"+index)),document.getElementById("condition_div"+global_index+"_"+index).insertBefore(_,document.getElementById("delete_condition"+global_index+"_"+index)),document.getElementById("condition_div"+global_index+"_"+index).insertBefore(document.createTextNode(" "),document.getElementById("delete_condition"+global_index+"_"+index));break;case"type_address":var _;countries=form_maker.countries,(_=document.createElement("select")).setAttribute("id","field_value"+global_index+"_"+m),_.setAttribute("class","fm_condition_field_select_value"),jQuery.each(countries,function(e,t){var i=document.createElement("option");_.setAttribute("id","field_value"+global_index+"_"+index),i.setAttribute("value",t),i.innerHTML=t,_.appendChild(i)}),document.getElementById("condition_div"+global_index+"_"+index).removeChild(document.getElementById("field_value"+global_index+"_"+index)),document.getElementById("condition_div"+global_index+"_"+index).insertBefore(_,document.getElementById("delete_condition"+global_index+"_"+index)),document.getElementById("condition_div"+global_index+"_"+index).insertBefore(document.createTextNode(" "),document.getElementById("delete_condition"+global_index+"_"+index))}}function add_condition_fields(a,e,t,n,l){for(ids=e.split("@@**@@"),labels=t.split("@@**@@"),types=n.split("@@**@@"),params=l.split("@@**@@"),i=500;0<=i&&!document.getElementById("condition_div"+a+"_"+i);i--);m=i+1;var d=document.createElement("div");d.setAttribute("id","condition_div"+a+"_"+m);var _=document.createElement("select");for(_.setAttribute("id","field_labels"+a+"_"+m),_.setAttribute("onchange","change_choices(options[selectedIndex].id+'_"+m+"','"+e+"','"+n+"','"+l.replace(/\'/g,"\\'")+"')"),_.setAttribute("class","fm_condition_field_labels"),k=0;k<labels.length;k++)if(ids[k]!=document.getElementById("fields"+a).value){var r=document.createElement("option");r.setAttribute("id",a+"_"+k),r.setAttribute("value",ids[k]),r.innerHTML=labels[k],_.appendChild(r)}d.appendChild(_),d.appendChild(document.createTextNode(" "));var o=document.createElement("select");o.setAttribute("id","is_select"+a+"_"+m),o.setAttribute("class","fm_condition_is_select");var s=document.createElement("option");s.setAttribute("id","is"),s.setAttribute("value","=="),s.innerHTML="is";var u=document.createElement("option");u.setAttribute("id","is_not"),u.setAttribute("value","!="),u.innerHTML="is not";var c=document.createElement("option");c.setAttribute("id","like"),c.setAttribute("value","%"),c.innerHTML="like";var p=document.createElement("option");p.setAttribute("id","not_like"),p.setAttribute("value","!%"),p.innerHTML="not like";var f=document.createElement("option");f.setAttribute("id","empty"),f.setAttribute("value","="),f.innerHTML="empty";var y=document.createElement("option");if(y.setAttribute("id","not_empty"),y.setAttribute("value","!"),y.innerHTML="not empty",o.appendChild(s),o.appendChild(u),o.appendChild(c),o.appendChild(p),o.appendChild(f),o.appendChild(y),d.appendChild(o),d.appendChild(document.createTextNode(" ")),ids[0]!=document.getElementById("fields"+a).value)var h=0;else h=1;switch(types[h]){case"type_text":case"type_star_rating":case"type_password":case"type_textarea":case"type_name":case"type_submitter_mail":case"type_phone":case"type_number":case"type_paypal_price":case"type_paypal_price_new":case"type_spinner":case"type_date_new":case"type_phone_new":if("type_number"==types[h]||"type_phone"==types[h])var b="return check_isnum_space(event)";else if("type_paypal_price"==types[h]||"type_paypal_price_new"==types[h])b="return check_isnum_point(event)";else b="";var v=document.createElement("input");v.setAttribute("id","field_value"+a+"_"+m),v.setAttribute("type","text"),v.setAttribute("value",""),v.setAttribute("class","fm_condition_field_input_value"),v.setAttribute("onKeyPress",b),d.appendChild(v);break;case"type_checkbox":case"type_radio":case"type_own_select":for("type_own_select"==types[h]?w_size=params[h].split("*:*w_size*:*"):w_size=params[h].split("*:*w_flow*:*"),w_choices=w_size[1].split("*:*w_choices*:*"),w_choices_array=w_choices[0].split("***"),-1!==w_size[1].indexOf("*:*w_value_disabled*:*")?(w_value_disabled=w_size[1].split("*:*w_value_disabled*:*"),w_choices_value=w_value_disabled[1].split("*:*w_choices_value*:*"),w_choices_value_array=w_choices_value[0].split("***")):w_choices_value_array=w_choices_array,(g=document.createElement("select")).setAttribute("id","field_value"+a+"_"+m),g.style.cssText="vertical-align: top; width:200px;","type_checkbox"==types[h]&&(g.setAttribute("multiple","multiple"),g.setAttribute("class","multiple_select")),k=0;k<w_choices_array.length;k++){(w=document.createElement("option")).setAttribute("id","choise_"+a+"_"+k),w.setAttribute("value",w_choices_value_array[k]),w.innerHTML=w_choices_array[k],-1===w_choices_array[k].indexOf("[")&&-1===w_choices_array[k].indexOf("]")&&g.appendChild(w)}d.appendChild(g);break;case"type_paypal_select":case"type_paypal_checkbox":case"type_paypal_radio":case"type_paypal_shipping":for("type_paypal_select"==types[h]?w_size=params[h].split("*:*w_size*:*"):w_size=params[h].split("*:*w_flow*:*"),w_choices=w_size[1].split("*:*w_choices*:*"),w_choices_array=w_choices[0].split("***"),w_choices_price=w_choices[1].split("*:*w_choices_price*:*"),w_choices_price_array=w_choices_price[0].split("***"),(g=document.createElement("select")).setAttribute("id","field_value"+a+"_"+m),g.style.cssText="vertical-align: top; width:200px;","type_paypal_checkbox"==types[h]&&(g.setAttribute("multiple","multiple"),g.setAttribute("class","multiple_select")),k=0;k<w_choices_array.length;k++){var w;(w=document.createElement("option")).setAttribute("id","choise_"+a+"_"+k),w.setAttribute("value",w_choices_array[k]+"*:*value*:*"+w_choices_price_array[k]),w.innerHTML=w_choices_array[k],-1===w_choices_array[k].indexOf("[")&&-1===w_choices_array[k].indexOf("]")&&g.appendChild(w)}d.appendChild(g);break;case"type_address":var g;countries=form_maker.countries,(g=document.createElement("select")).setAttribute("id","field_value"+a+"_"+m),g.setAttribute("class","fm_condition_field_select_value"),jQuery.each(countries,function(e,t){var i=document.createElement("option");i.setAttribute("id","choise_"+a+"_"+k),i.setAttribute("value",t),i.innerHTML=t,g.appendChild(i)}),d.appendChild(g)}d.appendChild(document.createTextNode(" "));var E=document.createElement("span");E.setAttribute("class","dashicons dashicons-trash"),E.setAttribute("id","delete_condition"+a+"_"+m),E.setAttribute("onClick",'delete_field_condition("'+a+"_"+m+'")'),E.style.cssText="vertical-align: middle",d.appendChild(E),document.getElementById("condition"+a).appendChild(d)}function add_condition(e,t,a,n,l,d){for(i=500;0<=i&&!document.getElementById("condition"+i);i--);num=i+1,ids=l.split("@@**@@"),labels=d.split("@@**@@");var _=document.createElement("div");_.setAttribute("id","condition"+num),_.setAttribute("class","fm_condition");var r=document.createElement("div");r.setAttribute("id","conditional_fileds"+num);var o=document.createElement("select");o.setAttribute("id","show_hide"+num),o.setAttribute("name","show_hide"+num),o.setAttribute("class","fm_condition_show_hide");var m=document.createElement("option");m.setAttribute("value","1"),m.innerHTML="show";var s=document.createElement("option");s.setAttribute("value","0"),s.innerHTML="hide",o.appendChild(m),o.appendChild(s);var u=document.createElement("select");for(u.setAttribute("id","fields"+num),u.setAttribute("name","fields"+num),u.setAttribute("class","fm_condition_fields"),k=0;k<labels.length;k++){var c=document.createElement("option");c.setAttribute("value",ids[k]),c.innerHTML=labels[k],u.appendChild(c)}var p=document.createElement("span");p.innerHTML="if";var f=document.createElement("select");f.setAttribute("id","all_any"+num),f.setAttribute("name","all_any"+num),f.setAttribute("class","fm_condition_all_any");var y=document.createElement("option");y.setAttribute("value","and"),y.innerHTML="all";var h=document.createElement("option");h.setAttribute("value","or"),h.innerHTML="any",f.appendChild(y),f.appendChild(h);var b=document.createElement("span");b.style.maxWidth="235px",b.style.width="100%",b.style.display="inline-block",b.innerHTML="of the following match:";var v=document.createElement("span");v.setAttribute("class","dashicons dashicons-plus-alt"),v.setAttribute("onClick",'add_condition_fields("'+num+'", "'+e+'", "'+t.replace(/\'/g,"\\'").replace(/\"/g,"&quot;")+'", "'+a.replace(/\'/g,"\\'").replace(/\"/g,"&quot;")+'", "'+n.replace(/\'/g,"\\'").replace(/\"/g,"&quot;")+'")');var w=document.createElement("span");w.setAttribute("class","dashicons dashicons-trash"),w.setAttribute("onClick",'delete_condition("'+num+'")'),r.appendChild(o),r.appendChild(document.createTextNode(" ")),r.appendChild(u),r.appendChild(document.createTextNode(" ")),r.appendChild(p),r.appendChild(document.createTextNode(" ")),r.appendChild(f),r.appendChild(document.createTextNode(" ")),r.appendChild(b),r.appendChild(document.createTextNode(" ")),r.appendChild(w),r.appendChild(document.createTextNode(" ")),r.appendChild(v),_.appendChild(r),document.getElementById("conditions_fieldset_wrap").appendChild(_)}function delete_condition(e){document.getElementById("conditions_fieldset_wrap").removeChild(document.getElementById("condition"+e))}function acces_level(e){var t="";for(i=0;i<=parseInt(e);i++)document.getElementById("user_"+i).checked&&(t=t+document.getElementById("user_"+i).value+",");document.getElementById("user_id_wd").value=t}function check_isnum_space(e){var t=e.which||e.keyCode;return 32==t||!(31<t&&(t<48||57<t))}function check_isnum_point(e){var t=e.which||e.keyCode;return 46==t||!(31<t&&(t<48||57<t))}function check_stripe_required_fields(){if(jQuery("#paypal_mode2").prop("checked"))for("1"==jQuery("#stripemode").val()?(fields=["live_sec","live_pub"],fields_titles=["Live secret key","Live publishable key"]):(fields=["test_sec","test_pub"],fields_titles=["Test secret key","Test publishable key"]),i=0;i<fields.length;i++)if(!jQuery("#"+fields[i]).val())return jQuery("#"+fields[i]).focus(),alert(fields_titles[i]+" is required."),!0;return!1}function check_calculator_required_fields(){var i=0;return jQuery(jQuery("#wd_calculated_field_table").find('[id^="wdc_equation_"]')).each(function(){if(""==jQuery(this).val()){var e=jQuery(this).attr("id").replace("wdc_equation_",""),t=jQuery(jQuery("#wd_calculated_field_table").find("[data-field='"+e+"']")).html();i=1,jQuery(this).focus(),alert("Set equation for the field "+t)}if(1==i)return!1}),1==i}function set_theme(){theme_id="0"==jQuery("#theme").val()?default_theme:jQuery("#theme").val(),jQuery("#edit_css").attr("onclick","window.open('"+theme_edit_url+"&current_id="+theme_id+"'); return false;"),1==jQuery("#theme option:selected").attr("data-version")?jQuery("#old_theme_notice").show():jQuery("#old_theme_notice").hide()}jQuery(document).on("ready fm_tab_loaded, ready fm_tab_email_loaded",function(){fm_admin_ready()}),jQuery(window).on("load",function(){jQuery("#fm_loading").hide(),jQuery("#fm_admin_container").show(),"function"==typeof add_scroll_width&&add_scroll_width(),set_no_items()}),document.onkeypress=stopRKey,jQuery(document).ready(function(){jQuery(".pp_display_on #pt0").click(function(){var e=jQuery(this).prop("checked");jQuery('.pp_display_on input[type="checkbox"]').prop("checked",e),e?jQuery(".fm-posts-show, .fm-pages-show, .fm-cat-show").removeClass("fm-hide").addClass("fm-show"):jQuery(".fm-posts-show, .fm-pages-show, .fm-cat-show").removeClass("fm-show").addClass("fm-hide")}),jQuery('.pp_display_on input[type="checkbox"]:not("#pt0")').click(function(){var e=jQuery(this).prop("checked");jQuery(".pp_display_on #pt0").prop("checked")&&!e&&jQuery(".pp_display_on #pt0").prop("checked",!1)}),jQuery(".pp_display_on #pt4").click(function(){fm_toggle_pages(this)}),jQuery(".pp_display_on #pt3").click(function(){fm_toggle_posts(this)}),jQuery("body").on("focusin",".pp_search_posts",function(){var e=jQuery(this);e.closest("ul").find(".pp_live_search").removeClass("fm-hide"),e.hasClass("already_triggered")||(e.addClass("already_triggered"),pp_live_search(e,500,!0))}),jQuery(document).click(function(){jQuery(".pp_live_search").addClass("fm-hide")}),jQuery("body").on("click",".fm-pp",function(){return!1}),jQuery("body").on("input",".pp_search_posts",function(){pp_live_search(jQuery(this),500,!0)}),jQuery("body").on("click",".pp_search_results li",function(){var e=jQuery(this);if(!e.hasClass("pp_no_res")){var t=e.text(),i=e.data("post_id"),a=e.closest(".fm-pp"),n=a.find(".pp_selected"),l=a.find(".pp_exclude"),d='<span data-post_id="'+i+'">'+t+'<span class="pp_selected_remove">x</span></span>';-1===n.html().indexOf('data-post_id="'+i+'"')&&(n.append(d),""===l.val()?l.val(i):l.val(function(e,t){return t+","+i}))}return!1}),jQuery("body").on("click",".pp_selected span.pp_selected_remove",function(){var e=jQuery(this).parent(),t=e.closest(".fm-pp").find(".pp_exclude"),i=t.val(),a=e.data("post_id");if(-1!==i.indexOf(a)){var n,l=-1!==i.indexOf(","+a)?","+a:a+",";l=-1!==i.indexOf(",")?l:a;n=i.replace(l,""),t.val(n)}return e.remove(),!1}),jQuery("body").on("click",'.pp_display_on_categories input[name="display_on_categories[]"]',function(){var e=jQuery('.pp_display_on_categories input[name="display_on_categories[]"]'),t=jQuery(".fm-display-all-categories");if("select_all_categories"==jQuery(this).val())jQuery(this).is(":checked")?e.prop("checked",!0):e.prop("checked",!1);else{var i=jQuery('input[name="display_on_categories[]"]:checked').length,a=parseInt(t.attr("data-categories-count"));jQuery(this).prop("checked")||(i-=1),t.prop("checked",!1),i==a&&t.prop("checked",!0)}})}),function(_){_.fn.serializeObject=function(){var n=this,l={},t={},d={validate:/^[a-zA-Z][a-zA-Z0-9_]*(?:\[(?:\d*|[a-zA-Z0-9_]+)\])*$/,key:/[a-zA-Z0-9_]+|(?=\[\])/g,push:/^$/,fixed:/^\d+$/,named:/^[a-zA-Z0-9_]+$/};return this.build=function(e,t,i){return e[t]=i,e},this.push_counter=function(e){return void 0===t[e]&&(t[e]=0),t[e]++},_.each(_(this).serializeArray(),function(){if(d.validate.test(this.name)){for(var e,t=this.name.match(d.key),i=this.value,a=this.name;void 0!==(e=t.pop());)a=a.replace(new RegExp("\\["+e+"\\]$"),""),e.match(d.push)?i=n.build([],n.push_counter(a),i):e.match(d.fixed)?i=n.build([],e,i):e.match(d.named)&&(i=n.build({},e,i));l=_.extend(!0,l,i)}}),l}}(jQuery),jQuery(document).on("dblclick",".wdform_row, .wdform_tr_section_break",function(){edit(jQuery(this).attr("wdid"))}),function(t){function i(e,t){if(!(1<e.originalEvent.touches.length)){e.preventDefault();var i=e.originalEvent.changedTouches[0],a=document.createEvent("MouseEvents");a.initMouseEvent(t,!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(a)}}if(t.support.touch="ontouchend"in document,t.support.touch){var a,e=t.ui.mouse.prototype,n=e._mouseInit,l=e._mouseDestroy;e._touchStart=function(e){!a&&this._mouseCapture(e.originalEvent.changedTouches[0])&&(a=!0,this._touchMoved=!1,i(e,"mouseover"),i(e,"mousemove"),i(e,"mousedown"))},e._touchMove=function(e){a&&(this._touchMoved=!0,i(e,"mousemove"))},e._touchEnd=function(e){a&&(i(e,"mouseup"),i(e,"mouseout"),this._touchMoved||i(e,"click"),a=!1)},e._mouseInit=function(){var e=this;e.element.bind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),n.call(e)},e._mouseDestroy=function(){var e=this;e.element.unbind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),l.call(e)}}}(jQuery);var gmapdata=new Array,gmapmarker=new Array,c;function if_gmap_init(e){map=document.getElementById(e+"_elementform_id_temp");var t=parseInt(map.getAttribute("zoom")),i=map.getAttribute("center_x"),a=map.getAttribute("center_y"),n=new google.maps.LatLng(a,i);return gmapdata[e]=new google.maps.Map(document.getElementById(e+"_elementform_id_temp"),{center:n,zoom:t,mapTypeId:"roadmap"}),google.maps.event.addListener(gmapdata[e],"zoom_changed",function(){document.getElementById(e+"_elementform_id_temp").setAttribute("zoom",gmapdata[e].getZoom())}),gmapmarker[e]=new Array,!1}function update_position(e,i){var t=document.getElementById("longval"+i).value,a=document.getElementById("latval"+i).value;0<t.length?1==isNaN(parseFloat(t))&&(t=2.294254):t=2.294254,0<a.length?1==isNaN(parseFloat(a))&&(a=48.858334):a=48.858334;var n=new google.maps.LatLng(a,t);gmapmarker[e][i].setPosition(n),gmapdata[e].setCenter(n),cur_zoom=gmapdata[e].getZoom(),gmapdata[e].setZoom(cur_zoom),geocoder=new google.maps.Geocoder,geocoder.geocode({latLng:gmapmarker[e][i].getPosition()},function(e,t){t==google.maps.GeocoderStatus.OK&&e[0]&&document.getElementById("addrval"+i)&&(document.getElementById("addrval"+i).value=e[0].formatted_address)});var l=document.getElementById(e+"_elementform_id_temp");return l.setAttribute("long"+i,t),l.setAttribute("lat"+i,a),!1}function remove_marker(e,t){gmapmarker[e][t].setMap(null)}function add_marker_on_map(t,i,e,a,n,l){if(map=document.getElementById(t+"_elementform_id_temp"),null==e){var d=gmapdata[t].getCenter();a=gmapdata[t].getCenter().lat(),e=gmapdata[t].getCenter().lng()}else d=new google.maps.LatLng(a,e);return geocoder=new google.maps.Geocoder,gmapmarker[t][i]=new google.maps.Marker({map:gmapdata[t],position:d,draggable:l}),gmapmarker[t][i].setDraggable(l),infoW=new google.maps.InfoWindow,google.maps.event.addListener(gmapdata[t],"mouseover",function(e){document.getElementById("longval"+i)||gmapmarker[t][i].setDraggable(!1)}),google.maps.event.addListener(gmapmarker[t][i],"drag",function(){document.getElementById("longval"+i)&&(geocoder.geocode({latLng:gmapmarker[t][i].getPosition()},function(e,t){t==google.maps.GeocoderStatus.OK&&e[0]&&document.getElementById("addrval"+i)&&(document.getElementById("addrval"+i).value=e[0].formatted_address)}),map.setAttribute("long"+i,gmapmarker[t][i].getPosition().lng().toFixed(6)),map.setAttribute("lat"+i,gmapmarker[t][i].getPosition().lat().toFixed(6)),document.getElementById("latval"+i).value=gmapmarker[t][i].getPosition().lat().toFixed(6),document.getElementById("longval"+i).value=gmapmarker[t][i].getPosition().lng().toFixed(6))}),google.maps.event.addListener(gmapmarker[t][i],"click",function(){infoW.setContent('<div style="overflow: hidden;">'+document.getElementById(t+"_elementform_id_temp").getAttribute("info"+i)+"</div>");infoW.setOptions({maxWidth:"300"}),infoW.open(this.getMap(),this)}),document.getElementById("longval"+i)&&(document.getElementById("longval"+i).value=e,document.getElementById("latval"+i).value=a,geocoder.geocode({latLng:gmapmarker[t][i].getPosition()},function(e,t){t==google.maps.GeocoderStatus.OK&&e[0]&&document.getElementById("addrval"+i)&&(document.getElementById("addrval"+i).value=e[0].formatted_address)}),map.setAttribute("long"+i,e),map.setAttribute("lat"+i,a)),!1}function changeAddress(i,a){var e=document.getElementById("addrval"+a).value;geocoder.geocode({address:e},function(e,t){t==google.maps.GeocoderStatus.OK&&(gmapdata[i].setCenter(e[0].geometry.location),gmapmarker[i][a].setPosition(e[0].geometry.location),document.getElementById("latval"+a).value=gmapmarker[i][a].getPosition().lat().toFixed(6),document.getElementById("longval"+a).value=gmapmarker[i][a].getPosition().lng().toFixed(6),map.setAttribute("long"+a,gmapmarker[i][a].getPosition().lng().toFixed(6)),map.setAttribute("lat"+a,gmapmarker[i][a].getPosition().lat().toFixed(6)))})}function change_info(e,t,i){map=document.getElementById(t+"_elementform_id_temp"),map.setAttribute("info"+i,e)}function if_gmap_updateMap(e){map=document.getElementById(e+"_elementform_id_temp"),w_long=gmapdata[e].getCenter().lng(),w_lat=gmapdata[e].getCenter().lat(),map.setAttribute("center_x",w_long),map.setAttribute("center_y",w_lat)}!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(r,_,e,l){"use strict";var d="intlTelInput",i=1,a={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:""},o=38,m=40,s=13,u=27,t=43,c=65,p=90,f=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=r(e),this.options=r.extend({},a,t),this.ns="."+d+i++,this.isGoodBrowser=Boolean(e.setSelectionRange),this.hadInitialPlaceholder=Boolean(r(e).attr("placeholder"))}r(_).on("load",function(){r.fn[d].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&&(r("body").addClass("iti-mobile"),this.options.dropdownContainer||(this.options.dropdownContainer="body")),this.autoCountryDeferred=new r.Deferred,this.utilsScriptDeferred=new r.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,i){t in this.countryCodes||(this.countryCodes[t]=[]);var a=i||0;this.countryCodes[t][a]=e},_filterCountries:function(e,t){var i;for(i=0;i<e.length;i++)e[i]=e[i].toLowerCase();for(this.countries=[],i=0;i<b.length;i++)t(r.inArray(b[i].iso2,e))&&this.countries.push(b[i])},_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=b},_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 i=0;i<t.areaCodes.length;i++)this._addCountryCode(t.iso2,t.dialCode+t.areaCodes[i])}},_processPreferredCountries:function(){this.preferredCountries=[];for(var e=0;e<this.options.preferredCountries.length;e++){var t=this.options.preferredCountries[e].toLowerCase(),i=this._getCountryData(t,!1,!0);i&&this.preferredCountries.push(i)}},_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(r("<div>",{class:e})),this.flagsContainer=r("<div>",{class:"flag-container"}).insertBefore(this.telInput);var t=r("<div>",{class:"selected-flag"});t.appendTo(this.flagsContainer),this.selectedFlagInner=r("<div>",{class:"iti-flag"}).appendTo(t),this.options.separateDialCode&&(this.selectedDialCode=r("<div>",{class:"selected-dial-code"}).appendTo(t)),this.options.allowDropdown?(t.attr("tabindex","0"),r("<div>",{class:"iti-arrow"}).appendTo(t),this.countryList=r("<ul>",{class:"country-list hide"}),this.preferredCountries.length&&(this._appendListItems(this.preferredCountries,"preferred"),r("<li>",{class:"divider"}).appendTo(this.countryList)),this._appendListItems(this.countries,""),this.countryListItems=this.countryList.children(".country"),this.options.dropdownContainer?this.dropdown=r("<div>",{class:"intl-tel-input iti-container"}).append(this.countryList):this.countryList.appendTo(this.flagsContainer)):this.countryListItems=r()},_appendListItems:function(e,t){for(var i="",a=0;a<e.length;a++){var n=e[a];i+="<li class='country "+t+"' data-dial-code='"+n.dialCode+"' data-country-code='"+n.iso2+"'>",i+="<div class='flag-box'><div class='iti-flag "+n.iso2+"'></div></div>",i+="<span class='country-name'>"+n.name+"</span>",i+="<span class='dial-code'>+"+n.dialCode+"</span>",i+="</li>"}this.countryList.append(i)},_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!=o&&e.which!=m&&e.which!=f&&e.which!=s||(e.preventDefault(),e.stopPropagation(),t._showDropdown()),e.which==n&&t._closeDropdown()})},_initRequests:function(){var e=this;this.options.utilsScript?r.fn[d].windowLoaded?r.fn[d].loadUtils(this.options.utilsScript,this.utilsScriptDeferred):r(_).on("load",function(){r.fn[d].loadUtils(e.options.utilsScript,e.utilsScriptDeferred)}):this.utilsScriptDeferred.resolve(),"auto"===this.options.initialCountry?this._loadAutoCountry():this.autoCountryDeferred.resolve()},_loadAutoCountry:function(){r.fn[d].autoCountry?this.handleAutoCountry():r.fn[d].startedLoadingAutoCountry||(r.fn[d].startedLoadingAutoCountry=!0,"function"==typeof this.options.geoIpLookup&&this.options.geoIpLookup(function(e){r.fn[d].autoCountry=e.toLowerCase(),setTimeout(function(){r(".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 i=this;this.telInput.on("mousedown"+this.ns,function(e){i.telInput.is(":focus")||i.telInput.val()||(e.preventDefault(),i.telInput.focus())}),this.telInput.on("focus"+this.ns,function(e){i.telInput.val()||i.telInput.prop("readonly")||!i.selectedCountryData.dialCode||(i.telInput.val("+"+i.selectedCountryData.dialCode),i.telInput.one("keypress.plus"+i.ns,function(e){e.which==t&&i.telInput.val("")}),setTimeout(function(){var e=i.telInput[0];if(i.isGoodBrowser){var t=i.telInput.val().length;e.setSelectionRange(t,t)}}))});var e=this.telInput.prop("form");e&&r(e).on("submit"+this.ns,function(){i._removeEmptyDialCode()}),this.telInput.on("blur"+this.ns,function(){i._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(),i=t.top,a=r(_).scrollTop(),n=i+this.telInput.outerHeight()+this.dropdownHeight<a+r(_).height(),l=i-this.dropdownHeight>a;if(this.countryList.toggleClass("dropup",!n&&l),this.options.dropdownContainer){var d=!n&&l?0:this.telInput.innerHeight();this.dropdown.css({top:i+d,left:t.left}),r(_).on("scroll"+this.ns,function(){e._closeDropdown()})}}},_bindDropdownListeners:function(){var t=this;this.countryList.on("mouseover"+this.ns,".country",function(e){t._highlightListItem(r(this))}),this.countryList.on("click"+this.ns,".country",function(e){t._selectListItem(r(this))});var i=!0;r("html").on("click"+this.ns,function(e){i||t._closeDropdown(),i=!1});var a="",n=null;r(e).on("keydown"+this.ns,function(e){e.preventDefault(),e.which==o||e.which==m?t._handleUpDownKey(e.which):e.which==s?t._handleEnterKey():e.which==u?t._closeDropdown():(e.which>=c&&e.which<=p||e.which==f)&&(n&&clearTimeout(n),a+=String.fromCharCode(e.which),t._searchForCountry(a),n=setTimeout(function(){a=""},1e3))})},_handleUpDownKey:function(e){var t=this.countryList.children(".highlight").first(),i=e==o?t.prev():t.next();i.length&&(i.hasClass("divider")&&(i=e==o?i.prev():i.next()),this._highlightListItem(i),this._scrollTo(i))},_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 i=this.countryList.children("[data-country-code="+this.countries[t].iso2+"]").not(".preferred");this._highlightListItem(i),this._scrollTo(i,!0);break}},_startsWith:function(e,t){return e.substr(0,t.length).toUpperCase()==t},_updateValFromNumber:function(e){if(this.options.formatOnDisplay&&_.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),i=null,a=this._getNumeric(e);if(t){var n=this.countryCodes[this._getNumeric(t)],l=this.selectedCountryData&&-1<r.inArray(this.selectedCountryData.iso2,n),d="+1"==t&&4<=a.length;if((!(this.selectedCountryData&&"1"==this.selectedCountryData.dialCode)||!this._isRegionlessNanp(a))&&(!l||d))for(var _=0;_<n.length;_++)if(n[_]){i=n[_];break}}else"+"==e.charAt(0)&&a.length?i="":e&&"+"!=e||(i=this.defaultCountry);return null!==i&&this._setFlag(i)},_isRegionlessNanp:function(e){var t=this._getNumeric(e);if("1"!=t.charAt(0))return!1;var i=t.substr(1,3);return-1<r.inArray(i,y)},_highlightListItem:function(e){this.countryListItems.removeClass("highlight"),e.addClass("highlight")},_getCountryData:function(e,t,i){for(var a=t?b:this.countries,n=0;n<a.length;n++)if(a[n].iso2==e)return a[n];if(i)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 i=e?this.selectedCountryData.name+": +"+this.selectedCountryData.dialCode:"Unknown";if(this.selectedFlagInner.parent().attr("title",i),this.options.separateDialCode){var a=this.selectedCountryData.dialCode?"+"+this.selectedCountryData.dialCode:"",n=this.telInput.parent();t.dialCode&&n.removeClass("iti-sdc-"+(t.dialCode.length+1)),a&&n.addClass("iti-sdc-"+a.length),this.selectedDialCode.text(a)}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(_.intlTelInputUtils&&e&&this.selectedCountryData){var t=intlTelInputUtils.numberType[this.options.placeholderNumberType],i=this.selectedCountryData.iso2?intlTelInputUtils.getExampleNumber(this.selectedCountryData.iso2,this.options.nationalMode,t):"";i=this._beforeSetNumber(i),"function"==typeof this.options.customPlaceholder&&(i=this.options.customPlaceholder(i,this.selectedCountryData)),this.telInput.attr("placeholder",i)}},_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 i=this.telInput.val().length;this.telInput[0].setSelectionRange(i,i)}t&&this._triggerCountryChange()},_closeDropdown:function(){this.countryList.addClass("hide"),this.selectedFlagInner.children(".iti-arrow").removeClass("up"),r(e).off(this.ns),r("html").off(this.ns),this.countryList.off(this.ns),this.options.dropdownContainer&&(this.isMobile||r(_).off("scroll"+this.ns),this.dropdown.detach())},_scrollTo:function(e,t){var i=this.countryList,a=i.height(),n=i.offset().top,l=n+a,d=e.outerHeight(),_=e.offset().top,r=_+d,o=_-n+i.scrollTop(),m=a/2-d/2;if(_<n)t&&(o-=m),i.scrollTop(o);else if(l<r){t&&(o+=m);var s=a-d;i.scrollTop(o-s)}},_updateDialCode:function(e,t){var i,a=this.telInput.val();if(e="+"+e,"+"==a.charAt(0)){var n=this._getDialCode(a);i=n?a.replace(n,e):e}else{if(this.options.nationalMode||this.options.separateDialCode)return;if(a)i=e+a;else{if(!t&&this.options.autoHideDialCode)return;i=e}}this.telInput.val(i)},_getDialCode:function(e){var t="";if("+"==e.charAt(0))for(var i="",a=0;a<e.length;a++){var n=e.charAt(a);if(r.isNumeric(n)&&(i+=n,this.countryCodes[i]&&(t=e.substr(0,a+1)),4==i.length))break}return t},_getFullNumber:function(){var e=r.trim(this.telInput.val()),t=this.selectedCountryData.dialCode,i=this._getNumeric(e),a="1"==i.charAt(0)?i:"1"+i;return(this.options.separateDialCode?"+"+t:"+"!=e.charAt(0)&&"1"!=e.charAt(0)&&t&&"1"==t.charAt(0)&&4==t.length&&t!=a.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 i=" "===e[t.length]||"-"===e[t.length]?t.length+1:t.length;e=e.substr(i)}}return this._cap(e)},_triggerCountryChange:function(){this.telInput.trigger("countrychange",this.selectedCountryData)},handleAutoCountry:function(){"auto"===this.options.initialCountry&&(this.defaultCountry=r.fn[d].autoCountry,this.telInput.val()||this.setCountry(this.defaultCountry),this.autoCountryDeferred.resolve())},handleUtils:function(){_.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&&r(e).off(this.ns)}this.telInput.off(this.ns),this.telInput.parent().before(this.telInput).remove()},getExtension:function(){return _.intlTelInputUtils?intlTelInputUtils.getExtension(this._getFullNumber(),this.selectedCountryData.iso2):""},getNumber:function(e){return _.intlTelInputUtils?intlTelInputUtils.formatNumber(this._getFullNumber(),this.selectedCountryData.iso2,e):""},getNumberType:function(){return _.intlTelInputUtils?intlTelInputUtils.getNumberType(this._getFullNumber(),this.selectedCountryData.iso2):-99},getSelectedCountryData:function(){return this.selectedCountryData||{}},getValidationError:function(){return _.intlTelInputUtils?intlTelInputUtils.getValidationError(this._getFullNumber(),this.selectedCountryData.iso2):-99},isValidNumber:function(){var e=r.trim(this._getFullNumber()),t=this.options.nationalMode?this.selectedCountryData.iso2:"";return _.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()}},r.fn[d]=function(i){var t,a=arguments;if(i===l||"object"==typeof i){var n=[];return this.each(function(){if(!r.data(this,"plugin_"+d)){var e=new h(this,i),t=e._init();n.push(t[0]),n.push(t[1]),r.data(this,"plugin_"+d,e)}}),r.when.apply(null,n)}if("string"==typeof i&&"_"!==i[0])return this.each(function(){var e=r.data(this,"plugin_"+d);e instanceof h&&"function"==typeof e[i]&&(t=e[i].apply(e,Array.prototype.slice.call(a,1))),"destroy"===i&&r.data(this,"plugin_"+d,null)}),t!==l?t:this},r.fn[d].getCountryData=function(){return b},r.fn[d].loadUtils=function(e,t){r.fn[d].loadedUtilsScript?t&&t.resolve():(r.fn[d].loadedUtilsScript=!0,r.ajax({type:"GET",url:e,complete:function(){r(".intl-tel-input input").intlTelInput("handleUtils")},dataType:"script",cache:!0}))},r.fn[d].version="11.0.0",r.fn[d].defaults=a;for(var b=[["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<b.length;v++){var w=b[v];b[v]={name:w[0],iso2:w[1],dialCode:w[2],priority:w[3]||0,areaCodes:w[4]||null}}}),j=2;var need_enable=!0,a=new Array,is_addon_stripe_active,is_addon_calculator_active,nextID;if(-1!=ajaxurl.indexOf("://"))var url_for_ajax=ajaxurl;else var url_for_ajax=location.protocol+"//"+location.host+ajaxurl;function isNumber(e){return!isNaN(parseFloat(e))&&isFinite(e)}function disable_past_days(e,t){document.getElementById(t+"_buttonform_id_temp").setAttribute("format",e)}function set_send(e){"yes"==document.getElementById(e).value?document.getElementById(e).setAttribute("value","no"):document.getElementById(e).setAttribute("value","yes")}function show_datepicker(e){jQuery("#"+e).datepicker("show")}function hide_time(e){"no"==document.getElementById(e+"form_id_temp").value?document.getElementById(e+"form_id_temp").value="yes":document.getElementById(e+"form_id_temp").value="no"}function show_week_days(id,week_day){week_day&&(1==document.getElementById("el_show_"+week_day).checked?document.getElementById(id+"_show_week_days").setAttribute(week_day,"yes"):document.getElementById(id+"_show_week_days").setAttribute(week_day,"no")),jQuery("input[name^="+id+"_elementform_id_temp]").datepicker("option","beforeShowDay",function(date){for(var w_hide_sunday="yes"==jQuery("#"+id+"_show_week_days").attr("sunday")?"true":"day != 0",w_hide_monday="yes"==jQuery("#"+id+"_show_week_days").attr("monday")?"true":"day != 1",w_hide_tuesday="yes"==jQuery("#"+id+"_show_week_days").attr("tuesday")?"true":"day != 2",w_hide_wednesday="yes"==jQuery("#"+id+"_show_week_days").attr("wednesday")?"true":"day != 3",w_hide_thursday="yes"==jQuery("#"+id+"_show_week_days").attr("thursday")?"true":"day != 4",w_hide_friday="yes"==jQuery("#"+id+"_show_week_days").attr("friday")?"true":"day != 5",w_hide_saturday="yes"==jQuery("#"+id+"_show_week_days").attr("saturday")?"true":"day != 6",invalid_dates=jQuery("#"+id+"_invalid_dates_id_temp").val(),invalid_dates_finish=[],invalid_dates_start=invalid_dates.split(","),invalid_date_range=[],i=0;i<invalid_dates_start.length;i++)if(invalid_dates_start[i]=invalid_dates_start[i].trim(),invalid_dates_start[i].length<11)invalid_dates_finish.push(invalid_dates_start[i]);else if(4<invalid_dates_start[i].indexOf("-"))invalid_date_range.push(invalid_dates_start[i].split("-"));else{var invalid_date_array=invalid_dates_start[i].split("-"),start_invalid_day=invalid_date_array[0]+"-"+invalid_date_array[1]+"-"+invalid_date_array[2],end_invalid_day=invalid_date_array[3]+"-"+invalid_date_array[4]+"-"+invalid_date_array[5];invalid_date_range.push([start_invalid_day,end_invalid_day])}jQuery.each(invalid_date_range,function(e,t){for(var i=new Date(t[0]);i<=new Date(t[1]);i.setDate(i.getDate()+1))invalid_dates_finish.push(jQuery.datepicker.formatDate("mm/dd/yy",i))});var string_days=jQuery.datepicker.formatDate("mm/dd/yy",date),day=date.getDay();return[-1==invalid_dates_finish.indexOf(string_days)&&eval(w_hide_sunday)&&eval(w_hide_monday)&&eval(w_hide_tuesday)&&eval(w_hide_wednesday)&&eval(w_hide_thursday)&&eval(w_hide_friday)&&eval(w_hide_saturday)]})}function set_sel_am_pm(e){e.options[0].selected?(e.options[0].setAttribute("selected","selected"),e.options[1].removeAttribute("selected")):(e.options[1].setAttribute("selected","selected"),e.options[0].removeAttribute("selected"))}function change_captcha_digit(e){captcha=document.getElementById("_wd_captchaform_id_temp"),document.getElementById("captcha_digit").value?(captcha.setAttribute("digit",e),captcha.setAttribute("src",url_for_ajax+"?action=formmakerwdcaptcha_fmc&digit="+e+"&nonce="+fm_ajax.ajaxnonce+"&i=form_id_temp"),document.getElementById("_wd_captcha_inputform_id_temp").style.width=10*document.getElementById("captcha_digit").value+15+"px"):(captcha.setAttribute("digit","6"),captcha.setAttribute("src",url_for_ajax+"?action=formmakerwdcaptcha_fmc&digit=6&nonce="+fm_ajax.ajaxnonce+"&i=form_id_temp"),document.getElementById("_wd_captcha_inputform_id_temp").style.width="75px")}function check_isnum_interval(e,t,i,a){var n=e.which||e.keyCode;return!(31<n&&(n<48||57<n))&&(val=""+document.getElementById(t).value+String.fromCharCode(n),!(2<val.length)&&("00"!=val&&!(val<i||val>a)))}function check_isnum_point(e){var t=e.which||e.keyCode;return 46==t||!(31<t&&(t<48||57<t))}function check_isnum_price(e,t){var i=e.which||e.keyCode;return!((""==t||-1<t.indexOf("."))&&31<i&&(i<48||57<i))&&!(31<i&&46!=i&&(i<48||57<i))}function check_isspacebar(e){return 32!=(e.which||e.keyCode)}function change_w_label(e,t){document.getElementById(e)&&(document.getElementById(e).innerHTML=t)}function change_w(e,t){document.getElementById(e).setAttribute("width",t)}function change_h(e,t){document.getElementById(e).setAttribute("height",t)}function change_key(e,t){document.getElementById("wd_recaptchaform_id_temp").setAttribute(t,e)}function captcha_refresh(e){srcArr=document.getElementById(e+"form_id_temp").src.split("&r="),document.getElementById(e+"form_id_temp").src=srcArr[0]+"&r="+Math.floor(100*Math.random()),document.getElementById(e+"_inputform_id_temp").value=""}function up_row(e){for("undefined"!=typeof event&&event.stopPropagation(),wdform_field=document.getElementById("wdform_field"+e),wdform_row=wdform_field.parentNode,wdform_column=wdform_row.parentNode,wdform_section=wdform_column.parentNode,wdform_page=wdform_section.parentNode,k=0;wdform_column.childNodes[k]&&(!wdform_column.childNodes[k].getAttribute("wdid")||e!=wdform_column.childNodes[k].getAttribute("wdid"));)k++;if(0!=k)return up=wdform_column.childNodes[k-1],down=wdform_column.childNodes[k],wdform_column.removeChild(down),void wdform_column.insertBefore(down,up);wdform_section.previousSibling&&wdform_section.previousSibling.getAttribute("type")?wdform_section.previousSibling.previousSibling.firstChild.appendChild(wdform_row):page_up(e)}function down_row(e){for("undefined"!=typeof event&&event.stopPropagation(),wdform_field=document.getElementById("wdform_field"+e),wdform_row=wdform_field.parentNode,wdform_column=wdform_row.parentNode,wdform_section=wdform_column.parentNode,wdform_page=wdform_section.parentNode,l=wdform_column.childNodes.length,k=0;wdform_column.childNodes[k]&&(!wdform_column.childNodes[k].getAttribute("wdid")||e!=wdform_column.childNodes[k].getAttribute("wdid"));)k++;if(k!=l-1)return up=wdform_column.childNodes[k],down=wdform_column.childNodes[k+2],wdform_column.removeChild(up),down||(down=null),void wdform_column.insertBefore(up,down);wdform_section.nextSibling.getAttribute("type")?wdform_section.nextSibling.nextSibling.firstChild.appendChild(wdform_row):page_down(e)}function right_row(e){if("undefined"!=typeof event&&event.stopPropagation(),wdform_field=document.getElementById("wdform_field"+e),wdform_row=wdform_field.parentNode,wdform_column=wdform_row.parentNode,wdform_section=wdform_column.parentNode,null!=wdform_column.nextSibling)wdform_column_next=wdform_column.nextSibling,wdform_column_next.appendChild(wdform_row);else{var t=document.createElement("div");t.setAttribute("class","wdform_column"),wdform_section.appendChild(t),t.appendChild(wdform_row)}sortable_columns()}function left_row(e){"undefined"!=typeof event&&event.stopPropagation(),wdform_field=document.getElementById("wdform_field"+e),wdform_row=wdform_field.parentNode,wdform_column=wdform_row.parentNode,wdform_section=wdform_column.parentNode,null!=wdform_column.previousSibling&&(wdform_column_next=wdform_column.previousSibling,wdform_column_next.appendChild(wdform_row)),sortable_columns()}function page_up(e){for("undefined"!=typeof event&&event.stopPropagation(),wdform_field=document.getElementById("wdform_field"+e),wdform_row=wdform_field.parentNode,wdform_column=wdform_row.parentNode,wdform_section=wdform_column.parentNode,wdform_page=wdform_section.parentNode,wdform_page_and_images=wdform_page.parentNode;wdform_page_and_images;){if(wdform_page_and_images=wdform_page_and_images.previousSibling,!wdform_page_and_images)return void alert("Unable to move");if(jQuery(wdform_page_and_images.firstChild).is(":visible"))break}n=wdform_page_and_images.getElementsByClassName("wdform_page")[0].childNodes.length,wdform_page_and_images.getElementsByClassName("wdform_page")[0].childNodes[n-2].firstChild.appendChild(wdform_row),refresh_pages(e)}function page_down(e){for("undefined"!=typeof event&&event.stopPropagation(),wdform_field=document.getElementById("wdform_field"+e),wdform_row=wdform_field.parentNode,wdform_column=wdform_row.parentNode,wdform_section=wdform_column.parentNode,wdform_page=wdform_section.parentNode,wdform_page_and_images=wdform_page.parentNode;wdform_page_and_images;){if(wdform_page_and_images=wdform_page_and_images.nextSibling,!wdform_page_and_images||"add_field_cont"==wdform_page_and_images.id)return void alert("Unable to move");if(jQuery(wdform_page_and_images.firstChild).is(":visible"))break}wdform_page_and_images.getElementsByClassName("wdform_page")[0].firstChild.firstChild.insertBefore(wdform_row,wdform_page_and_images.firstChild.firstChild.firstChild.firstChild),refresh_pages(e)}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 Disable(){}function all_labels(){for(labels=new Array,k=1;k<=form_view_max;k++)if(document.getElementById("form_id_tempform_view"+k))for(wdform_page=document.getElementById("form_id_tempform_view"+k),remove_whitespace(wdform_page),n=wdform_page.childNodes.length-2,z=0;z<=n;z++)if(!wdform_page.childNodes[z].getAttribute("wdid"))for(wdform_section=wdform_page.childNodes[z],x=0;x<wdform_section.childNodes.length;x++)if(wdform_column=wdform_section.childNodes[x],wdform_column.firstChild)for(y=0;y<wdform_column.childNodes.length;y++)wdform_row=wdform_column.childNodes[y],3!=wdform_row.nodeType&&(wdid=wdform_row.getAttribute("wdid"),wdid&&labels.push(document.getElementById(wdid+"_element_labelform_id_temp").innerHTML));return labels}function set_checked(e,t){return checking=document.getElementById(e+"_elementform_id_temp"+t),checking.checked&&checking.setAttribute("checked","checked"),!(!checking.checked&&(checking.removeAttribute("checked"),checking.getAttribute("other")&&1==checking.getAttribute("other")))||(document.getElementById(e+"_other_inputform_id_temp")&&(document.getElementById(e+"_other_inputform_id_temp").parentNode.removeChild(document.getElementById(e+"_other_brform_id_temp")),document.getElementById(e+"_other_inputform_id_temp").parentNode.removeChild(document.getElementById(e+"_other_inputform_id_temp"))),!1)}function set_default(e,t){for(k=0;k<100;k++)document.getElementById(e+"_elementform_id_temp"+k)&&(document.getElementById(e+"_elementform_id_temp"+k).checked?document.getElementById(e+"_elementform_id_temp"+t).setAttribute("checked","checked"):document.getElementById(e+"_elementform_id_temp"+k).removeAttribute("checked"));document.getElementById(e+"_other_inputform_id_temp")&&(document.getElementById(e+"_other_inputform_id_temp").parentNode.removeChild(document.getElementById(e+"_other_brform_id_temp")),document.getElementById(e+"_other_inputform_id_temp").parentNode.removeChild(document.getElementById(e+"_other_inputform_id_temp")))}function set_select(e){for(p=e.length-1;0<=p;p--)e.options[p].selected?e.options[p].setAttribute("selected","selected"):e.options[p].removeAttribute("selected")}function add_0(e){input=document.getElementById(e),1==input.value.length&&(input.value="0"+input.value,input.setAttribute("value",input.value))}function label_top_stripe(e){document.getElementById(e+"_label_sectionform_id_temp").style.display="block",document.getElementById(e+"_element_sectionform_id_temp").style.display="block"}function label_left_stripe(e){document.getElementById(e+"_label_sectionform_id_temp").style.display="table-cell",document.getElementById(e+"_element_sectionform_id_temp").style.display="table-cell"}function change_value_range(e,t,i){jQuery("#"+e).datepicker("option",t,i)}function change_func(e,t){document.getElementById(e).setAttribute("onclick",t)}function change_in_value(e,t){t=(t=t.replace(/(<([^>]+)>)/gi,"")).replace(/"/g,"&quot;"),document.getElementById(e).setAttribute("value",t)}function change_size(e,t){switch(document.getElementById(t+"_elementform_id_temp").style.width=e+"px",document.getElementById(t+"_element_input")&&(document.getElementById(t+"_element_input").style.width=e+"px"),e){case"111":document.getElementById(t+"_elementform_id_temp").setAttribute("rows","2");break;case"222":document.getElementById(t+"_elementform_id_temp").setAttribute("rows","4");break;case"444":document.getElementById(t+"_elementform_id_temp").setAttribute("rows","8")}}function getIFrameDocument(e){var t=null;return document.getElementById(e)&&document.getElementById(e).contentDocument?t=document.getElementById(e).contentDocument:document.getElementById(e)&&(t=document.frames[e].document),t}function format_extended(t,e,i,a,n){w_size=document.getElementById(t+"_element_firstform_id_temp").style.width,tr_name1=document.getElementById(t+"_tr_name1"),tr_name2=document.getElementById(t+"_tr_name2");var l=document.createElement("div");l.setAttribute("id",t+"_td_name_input_title"),l.style.display="table-cell";var d=document.createElement("div");d.setAttribute("id",t+"_td_name_input_middle"),d.style.display="table-cell";var _=document.createElement("div");_.setAttribute("id",t+"_td_name_label_title"),_.setAttribute("align","left"),_.style.display="table-cell";var r=document.createElement("div");r.setAttribute("id",t+"_td_name_label_middle"),r.setAttribute("align","left"),r.style.display="table-cell";var o=document.createElement("input");o.setAttribute("type","text"),o.style.cssText="margin: 0px 10px 0px 0px; padding: 0px; width:40px",o.setAttribute("id",t+"_element_titleform_id_temp"),o.setAttribute("name",t+"_element_titleform_id_temp"),e==a?o.setAttribute("value",a):o.setAttribute("value",e),o.setAttribute("title",a);var m=document.createElement("label");m.setAttribute("class","mini_label"),m.setAttribute("id",t+"_mini_label_title"),m.innerHTML=w_mini_labels[0];var s=document.createElement("input");s.setAttribute("type","text"),s.style.cssText="padding: 0px; width:"+w_size,s.setAttribute("id",t+"_element_middleform_id_temp"),s.setAttribute("name",t+"_element_middleform_id_temp"),i==n?s.setAttribute("value",n):s.setAttribute("value",i),s.setAttribute("title",n);var u=document.createElement("label");u.setAttribute("class","mini_label"),u.setAttribute("id",t+"_mini_label_middle"),u.innerHTML=w_mini_labels[3],first_input=document.getElementById(t+"_td_name_input_first"),last_input=document.getElementById(t+"_td_name_input_last"),first_label=document.getElementById(t+"_td_name_label_first"),last_label=document.getElementById(t+"_td_name_label_last"),l.appendChild(o),d.appendChild(s),tr_name1.insertBefore(l,first_input),tr_name1.insertBefore(d,null),_.appendChild(m),r.appendChild(u),tr_name2.insertBefore(_,first_label),tr_name2.insertBefore(r,null);var c=document.createTextNode("-"),p=document.createTextNode("-"),f=document.createElement("input");f.setAttribute("id","el_first_value_title"),f.setAttribute("type","text"),f.setAttribute("value",a),f.style.cssText="width:50px; margin-left:4px; margin-right:4px",f.setAttribute("onKeyUp","change_input_value(this.value,'"+t+"_element_titleform_id_temp')");var y=document.createElement("input");y.setAttribute("id","el_first_value_middle"),y.setAttribute("type","text"),y.setAttribute("value",n),y.style.cssText="width:100px; margin-left:4px",y.setAttribute("onKeyUp","change_input_value(this.value,'"+t+"_element_middleform_id_temp')"),el_first_value_first=document.getElementById("el_first_value_first"),parent=el_first_value_first.parentNode,parent.insertBefore(c,el_first_value_first),parent.insertBefore(f,c),parent.appendChild(p),parent.appendChild(y),refresh_attr(t,"type_name"),refresh_id_name(t,"type_name"),jQuery(document).ready(function(){jQuery("label#"+t+"_mini_label_title").on("click",function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='title' size='10' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.title").focus(),jQuery("input.title").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_title").text(e)})}}),jQuery("label#"+t+"_mini_label_middle").on("click",function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='middle' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.middle").focus(),jQuery("input.middle").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_middle").text(e)})}})})}function format_normal(e){tr_name1=document.getElementById(e+"_tr_name1"),tr_name2=document.getElementById(e+"_tr_name2"),td_name_input1=document.getElementById(e+"_td_name_input_title"),td_name_input4=document.getElementById(e+"_td_name_input_middle"),td_name_label1=document.getElementById(e+"_td_name_label_title"),td_name_label4=document.getElementById(e+"_td_name_label_middle"),tr_name1.removeChild(td_name_input1),tr_name1.removeChild(td_name_input4),tr_name2.removeChild(td_name_label1),tr_name2.removeChild(td_name_label4),el_first_value_first=document.getElementById("el_first_value_first"),parent=el_first_value_first.parentNode,parent.removeChild(document.getElementById("el_first_value_title").nextSibling),parent.removeChild(document.getElementById("el_first_value_title")),parent.removeChild(document.getElementById("el_first_value_middle").previousSibling),parent.removeChild(document.getElementById("el_first_value_middle")),refresh_attr(e,"type_name"),refresh_id_name(e,"type_name")}function type_number(e,t,i,a,l,d,_,r,o,m,s,u){document.getElementById("element_type").value="type_number",delete_last_child();var c=document.createElement("div");c.setAttribute("id","edit_div");var p=document.createElement("table");p.setAttribute("id","edit_main_table"),p.setAttribute("cellpadding","3"),p.setAttribute("cellspacing","0");var f=document.createElement("tr"),y=document.createElement("tr"),h=document.createElement("tr"),b=document.createElement("tr"),v=document.createElement("tr"),w=document.createElement("tr"),g=document.createElement("tr"),E=document.createElement("tr"),A=document.createElement("tr"),x=document.createElement("td"),k=document.createElement("td"),I=document.createElement("td"),C=document.createElement("td"),B=document.createElement("td"),Q=document.createElement("td"),T=document.createElement("td"),M=document.createElement("td"),L=document.createElement("td"),z=document.createElement("td"),q=document.createElement("td"),H=document.createElement("td"),N=document.createElement("td"),S=(document.createElement("td"),document.createElement("td")),D=document.createElement("td"),P=document.createElement("td"),O=document.createElement("td"),K=document.createElement("label");K.setAttribute("class","fm-field-label"),K.setAttribute("for","edit_for_label"),K.innerHTML="Field label";var U=document.createElement("textarea");U.setAttribute("id","edit_for_label"),U.setAttribute("rows","4"),U.setAttribute("onKeyUp","change_label('"+e+"_element_labelform_id_temp', this.value)"),U.innerHTML=t;var F=document.createElement("label");F.setAttribute("class","fm-field-label"),F.setAttribute("for","edit_for_label_size"),F.innerHTML="Field label size(px) ";var R=document.createElement("input");R.setAttribute("id","edit_for_label_size"),R.setAttribute("type","text"),R.setAttribute("value",i),R.setAttribute("onKeyPress","return check_isnum(event)"),R.setAttribute("onKeyUp","change_w_style('"+e+"_label_sectionform_id_temp', this.value)");var W=document.createElement("label");W.setAttribute("class","fm-field-label"),W.innerHTML="Field label position";var V=document.createElement("input");V.setAttribute("id","edit_for_label_position_top"),V.setAttribute("type","radio"),V.setAttribute("name","edit_for_label_position"),V.setAttribute("onchange","label_left("+e+")");var $=document.createElement("label");$.setAttribute("for","edit_for_label_position_top"),$.innerHTML="Left";var G=document.createElement("input");G.setAttribute("id","edit_for_label_position_left"),G.setAttribute("type","radio"),G.setAttribute("name","edit_for_label_position"),G.setAttribute("onchange","label_top("+e+")");var Y=document.createElement("label");Y.setAttribute("for","edit_for_label_position_left"),Y.innerHTML="Top","top"==a?G.setAttribute("checked","checked"):V.setAttribute("checked","checked");var Z=document.createElement("label");Z.setAttribute("class","fm-field-label"),Z.setAttribute("for","edit_for_input_size"),Z.innerHTML="Field size(px) ";var X=document.createElement("input");X.setAttribute("id","edit_for_input_size"),X.setAttribute("type","text"),X.setAttribute("value",l),X.setAttribute("onKeyPress","return check_isnum(event)"),X.setAttribute("onKeyUp","change_w_style('"+e+"_elementform_id_temp', this.value)");var J=document.createElement("label");J.setAttribute("class","fm-field-label"),J.setAttribute("for","el_first_value_input"),J.innerHTML="Placeholder ";var ee=document.createElement("input");ee.setAttribute("id","el_first_value_input"),ee.setAttribute("type","text"),ee.setAttribute("value",_),ee.setAttribute("onKeyUp","change_input_value(this.value,'"+e+"_elementform_id_temp');");var te=document.createElement("label");te.setAttribute("class","fm-field-label"),te.setAttribute("for","el_required"),te.innerHTML="Required";var ie=document.createElement("input");ie.setAttribute("id","el_required"),ie.setAttribute("type","checkbox"),ie.setAttribute("onclick","set_required('"+e+"_required')"),"yes"==r&&ie.setAttribute("checked","checked");var ae=document.createElement("label");ae.setAttribute("class","fm-field-label"),ae.setAttribute("for","el_unique"),ae.innerHTML="Allow only unique values";var ne=document.createElement("input");ne.setAttribute("id","el_unique"),ne.setAttribute("type","checkbox"),ne.setAttribute("onclick","set_unique('"+e+"_uniqueform_id_temp')"),"yes"==o&&ne.setAttribute("checked","checked");var le=document.createElement("label");le.setAttribute("class","fm-field-label"),le.setAttribute("for","el_style_textarea"),le.innerHTML="Class name";var de=document.createElement("input");de.setAttribute("id","el_style_textarea"),de.setAttribute("type","text"),de.setAttribute("value",m),de.setAttribute("onChange","change_class(this.value,'"+e+"')");var _e=document.createElement("label");_e.setAttribute("class","fm-field-label"),_e.innerHTML="Additional Attributes";var re=document.createElement("img");re.setAttribute("src",plugin_url+"/images/add.png?ver=1.8.0"),re.style.cssText="cursor:pointer; margin-left:68px",re.setAttribute("title","add"),re.setAttribute("onClick","add_attr("+e+", 'type_text')");var oe=document.createElement("table");oe.setAttribute("id","attributes"),oe.setAttribute("border","0"),oe.style.cssText="margin-left:0px";var me=document.createElement("tr");me.setAttribute("idi","0");var se=document.createElement("th");se.style.cssText="width:100px";var ue=document.createElement("th");ue.style.cssText="width:100px";var ce=document.createElement("th");ce.style.cssText="width:10px";var pe=document.createElement("label");pe.style.cssText="color:#000; font-weight:bold; font-size: 11px",pe.innerHTML="Name";var fe=document.createElement("label");for(fe.style.cssText="color:#000; font-weight:bold; font-size: 11px",fe.innerHTML="Value",oe.appendChild(me),me.appendChild(se),me.appendChild(ue),me.appendChild(ce),se.appendChild(pe),ue.appendChild(fe),n=s.length,j=1;j<=n;j++){var ye=document.createElement("tr");ye.setAttribute("id","attr_row_"+j),ye.setAttribute("idi",j);var he=document.createElement("td");he.style.cssText="width:100px";var be=document.createElement("td");be.style.cssText="width:100px";var ve=document.createElement("td"),we=document.createElement("input");we.setAttribute("type","text"),we.setAttribute("class","fm-field-choice"),we.setAttribute("value",s[j-1]),we.setAttribute("id","attr_name"+j),we.setAttribute("onChange","change_attribute_name("+e+", this, 'type_text')");var ge=document.createElement("input");ge.setAttribute("type","text"),ge.setAttribute("class","fm-field-choice"),ge.setAttribute("value",u[j-1]),ge.setAttribute("id","attr_value"+j),ge.setAttribute("onChange","change_attribute_value("+e+", "+j+", 'type_text')");var Ee=document.createElement("img");Ee.setAttribute("id","el_choices"+j+"_remove"),Ee.setAttribute("src",plugin_url+"/images/delete.png?ver=1.8.0"),Ee.style.cssText="cursor:pointer; vertical-align:middle; margin:2px",Ee.setAttribute("onClick","remove_attr("+j+", "+e+", 'type_text')"),oe.appendChild(ye),ye.appendChild(he),ye.appendChild(be),ye.appendChild(ve),he.appendChild(we),be.appendChild(ge),ve.appendChild(Ee)}var Ae=document.getElementById("edit_table"),je=document.createElement("br"),xe=document.createElement("br");x.appendChild(K),k.appendChild(U),P.appendChild(F),O.appendChild(R),I.appendChild(W),C.appendChild(V),C.appendChild($),C.appendChild(je),C.appendChild(G),C.appendChild(Y),B.appendChild(Z),Q.appendChild(X),T.appendChild(J),M.appendChild(ee),L.appendChild(le),z.appendChild(de),q.appendChild(te),H.appendChild(ie),S.appendChild(ae),D.appendChild(ne),N.appendChild(_e),N.appendChild(re),N.appendChild(xe),N.appendChild(oe),N.setAttribute("colspan","2"),f.appendChild(x),f.appendChild(k),A.appendChild(P),A.appendChild(O),y.appendChild(I),y.appendChild(C),h.appendChild(B),h.appendChild(Q),b.appendChild(T),b.appendChild(M),v.appendChild(L),v.appendChild(z),w.appendChild(q),w.appendChild(H),E.appendChild(S),E.appendChild(D),g.appendChild(N),p.appendChild(f),p.appendChild(A),p.appendChild(y),p.appendChild(h),p.appendChild(b),p.appendChild(v),p.appendChild(w),p.appendChild(E),p.appendChild(g),c.appendChild(p),Ae.appendChild(c),add_id_and_name(e,"type_text"),element="input",type="text";var ke=document.createElement("input");ke.setAttribute("type","hidden"),ke.setAttribute("value","type_number"),ke.setAttribute("name",e+"_typeform_id_temp"),ke.setAttribute("id",e+"_typeform_id_temp");var Ie=document.createElement("input");Ie.setAttribute("type","hidden"),Ie.setAttribute("value",r),Ie.setAttribute("name",e+"_requiredform_id_temp"),Ie.setAttribute("id",e+"_requiredform_id_temp");var Ce=document.createElement("input");Ce.setAttribute("type","hidden"),Ce.setAttribute("value",o),Ce.setAttribute("name",e+"_uniqueform_id_temp"),Ce.setAttribute("id",e+"_uniqueform_id_temp");var Be=document.createElement(element);Be.setAttribute("type",type),Be.style.cssText="width:"+l+"px;",Be.setAttribute("id",e+"_elementform_id_temp"),Be.setAttribute("name",e+"_elementform_id_temp"),Be.setAttribute("value",d),Be.setAttribute("title",_),Be.setAttribute("placeholder",_),Be.setAttribute("onKeyPress","return check_isnum(event)");var Qe=document.createElement("div");Qe.setAttribute("id","main_div");var Te=document.createElement("div");Te.setAttribute("id",e+"_elemet_tableform_id_temp");var Me=document.createElement("div");Me.setAttribute("align","left"),Me.style.display="table-cell",Me.style.width=i+"px",Me.setAttribute("id",e+"_label_sectionform_id_temp");var Le=document.createElement("div");Le.setAttribute("align","left"),Le.style.display="table-cell",Le.setAttribute("id",e+"_element_sectionform_id_temp");var ze=document.createElement("span");ze.setAttribute("id",e+"_element_labelform_id_temp"),ze.innerHTML=t,ze.setAttribute("class","label"),ze.style.verticalAlign="top";var qe=document.createElement("span");qe.setAttribute("id",e+"_required_elementform_id_temp"),qe.innerHTML="",qe.setAttribute("class","required"),qe.style.verticalAlign="top","yes"==r&&(qe.innerHTML=" *");var He=document.getElementById("show_table");Me.appendChild(ze),Me.appendChild(qe),Le.appendChild(ke),Le.appendChild(Ie),Le.appendChild(Ce),Le.appendChild(Be),Te.appendChild(Me),Te.appendChild(Le),Qe.appendChild(Te),He.appendChild(Qe),"top"==a&&label_top(e),change_class(m,e),refresh_attr(e,"type_text")}function type_wdeditor(e,t,i,a,l,d,_,r,o,m,s){document.getElementById("element_type").value="type_wdeditor",delete_last_child();var u=document.createElement("div");u.setAttribute("id","edit_div");var c=document.createElement("table");c.setAttribute("id","edit_main_table"),c.setAttribute("cellpadding","3"),c.setAttribute("cellspacing","0");var p=document.createElement("tr"),f=document.createElement("tr"),y=document.createElement("tr"),h=document.createElement("tr"),b=document.createElement("tr"),v=document.createElement("tr"),w=document.createElement("tr"),g=document.createElement("tr"),E=document.createElement("td"),A=document.createElement("td"),x=document.createElement("td"),k=document.createElement("td"),I=document.createElement("td"),C=document.createElement("td");C.style.cssText="padding-top:10px";var B=document.createElement("td"),Q=document.createElement("td");Q.style.cssText="padding-top:10px";var T=document.createElement("td"),M=document.createElement("td");M.style.cssText="padding-top:10px";var L=document.createElement("td"),z=document.createElement("td");z.style.cssText="padding-top:10px";var q=document.createElement("td"),H=document.createElement("td"),N=document.createElement("td"),S=document.createElement("td"),D=document.createElement("label");D.setAttribute("class","fm-field-label"),D.setAttribute("for","edit_for_label"),D.innerHTML="Field label";var P=document.createElement("textarea");P.setAttribute("id","edit_for_label"),P.setAttribute("rows","4"),P.setAttribute("onKeyUp","change_label('"+e+"_element_labelform_id_temp', this.value)"),P.innerHTML=t;var O=document.createElement("label");O.setAttribute("class","fm-field-label"),O.setAttribute("for","edit_for_label_size"),O.innerHTML="Field label size(px) ";var K=document.createElement("input");K.setAttribute("id","edit_for_label_size"),K.setAttribute("type","text"),K.setAttribute("value",i),K.setAttribute("onKeyPress","return check_isnum(event)"),K.setAttribute("onKeyUp","change_w_style('"+e+"_label_sectionform_id_temp', this.value)");var U=document.createElement("label");U.setAttribute("class","fm-field-label"),U.setAttribute("for","edit_for_label_position_top"),U.innerHTML="Field label position";var F=document.createElement("input");F.setAttribute("id","edit_for_label_position_top"),F.setAttribute("type","radio"),F.setAttribute("value","left"),F.setAttribute("name","edit_for_label_position"),F.setAttribute("onchange","label_left("+e+")"),Left=document.createTextNode("Left");var R=document.createElement("input");R.setAttribute("id","edit_for_label_position_left"),R.setAttribute("type","radio"),R.setAttribute("value","top"),R.setAttribute("name","edit_for_label_position"),R.setAttribute("onchange","label_top("+e+")"),Top=document.createTextNode("Top"),"top"==a?R.setAttribute("checked","checked"):F.setAttribute("checked","checked");var W=document.createElement("label");W.style.cssText="color:#000; font-weight:bold; font-size: 13px",W.innerHTML="Field size(px) ";var V=document.createElement("input");V.setAttribute("id","edit_for_input_size"),V.setAttribute("type","text"),V.setAttribute("value",l),V.style.cssText="margin-right:2px; width: 60px",V.setAttribute("name","edit_for_size"),V.setAttribute("onKeyPress","return check_isnum(event)"),V.setAttribute("onKeyUp","change_w_style('"+e+"_elementform_id_temp', this.value)"),X=document.createTextNode("x");var $=document.createElement("input");$.setAttribute("id","edit_for_input_size"),$.setAttribute("type","text"),$.setAttribute("value",d),$.style.cssText="margin-left:2px; width:60px",$.setAttribute("name","edit_for_size"),$.setAttribute("onKeyPress","return check_isnum(event)"),$.setAttribute("onKeyUp","change_h_style('"+e+"_elementform_id_temp', this.value)");var G=document.createElement("label");G.style.cssText="color:#000; font-weight:bold; font-size: 13px",G.innerHTML="Placeholder";var Y=document.createElement("input");Y.setAttribute("id","el_first_value_input"),Y.setAttribute("type","text"),Y.setAttribute("value",_),Y.setAttribute("onKeyUp","change_input_value(this.value,'"+e+"_elementform_id_temp')");var Z=document.createElement("label");Z.setAttribute("class","fm-field-label"),Z.setAttribute("for","el_send"),Z.innerHTML="Required";var J=document.createElement("input");J.setAttribute("id","el_send"),J.setAttribute("type","checkbox"),J.setAttribute("value","yes"),J.setAttribute("onclick","set_required('"+e+"_required')"),"yes"==r&&J.setAttribute("checked","checked");var ee=document.createElement("label");ee.setAttribute("class","fm-field-label"),ee.setAttribute("for","element_style"),ee.innerHTML="Class name";var te=document.createElement("input");te.setAttribute("id","element_style"),te.setAttribute("type","text"),te.setAttribute("value",o),te.setAttribute("onChange","change_class(this.value,'"+e+"')");var ie=document.createElement("label");ie.setAttribute("class","fm-field-label"),ie.setAttribute("for","el_choices_add"),ie.innerHTML="Additional Attributes";var ae=document.createElement("img");ae.setAttribute("id","el_choices_add"),ae.setAttribute("src",plugin_url+"/images/add.png?ver=1.8.0"),ae.style.cssText="cursor:pointer; margin-left:68px",ae.setAttribute("title","add"),ae.setAttribute("onClick","add_attr("+e+", 'type_text')");var ne=document.createElement("table");ne.setAttribute("id","attributes"),ne.setAttribute("border","0"),ne.style.cssText="margin-left:0px";var le=document.createElement("tr");le.setAttribute("idi","0");var de=document.createElement("th");de.style.cssText="width:100px";var _e=document.createElement("th");_e.style.cssText="width:100px";var re=document.createElement("th");re.style.cssText="width:10px";var oe=document.createElement("label");oe.style.cssText="color:#000; font-weight:bold; font-size: 11px",oe.innerHTML="Name";var me=document.createElement("label");for(me.style.cssText="color:#000; font-weight:bold; font-size: 11px",me.innerHTML="Value",ne.appendChild(le),le.appendChild(de),le.appendChild(_e),le.appendChild(re),de.appendChild(oe),_e.appendChild(me),n=m.length,j=1;j<=n;j++){var se=document.createElement("tr");se.setAttribute("id","attr_row_"+j),se.setAttribute("idi",j);var ue=document.createElement("td");ue.style.cssText="width:100px";var ce=document.createElement("td");ce.style.cssText="width:100px";var pe=document.createElement("td"),fe=document.createElement("input");fe.setAttribute("type","text"),fe.setAttribute("class","fm-field-choice"),fe.setAttribute("value",m[j-1]),fe.setAttribute("id","attr_name"+j),fe.setAttribute("onChange","change_attribute_name("+e+", this, 'type_text')");var ye=document.createElement("input");ye.setAttribute("type","text"),ye.setAttribute("class","fm-field-choice"),ye.setAttribute("value",s[j-1]),ye.setAttribute("id","attr_value"+j),ye.setAttribute("onChange","change_attribute_value("+e+", "+j+", 'type_text')");var he=document.createElement("img");he.setAttribute("id","el_choices"+j+"_remove"),he.setAttribute("src",plugin_url+"/images/delete.png?ver=1.8.0"),he.style.cssText="cursor:pointer; vertical-align:middle; margin:2px",he.setAttribute("align","top"),he.setAttribute("onClick","remove_attr("+j+", "+e+", 'type_text')"),ne.appendChild(se),se.appendChild(ue),se.appendChild(ce),se.appendChild(pe),ue.appendChild(fe),ce.appendChild(ye),pe.appendChild(he)}var be=document.getElementById("edit_table"),ve=document.createElement("br"),we=(document.createElement("br"),document.createElement("br"),document.createElement("br")),ge=(document.createElement("br"),document.createElement("br"),document.createElement("br"));E.appendChild(D),A.appendChild(P),N.appendChild(O),S.appendChild(K),x.appendChild(U),k.appendChild(F),k.appendChild(el_label_left),k.appendChild(ve),k.appendChild(R),k.appendChild(el_label_top),I.appendChild(W),C.appendChild(V),C.appendChild(X),C.appendChild($),B.appendChild(G),Q.appendChild(Y),T.appendChild(ee),M.appendChild(te),L.appendChild(Z),z.appendChild(J),q.appendChild(ie),q.appendChild(ae),q.appendChild(ge),q.appendChild(ne),q.setAttribute("colspan","2"),p.appendChild(E),p.appendChild(A),g.appendChild(N),g.appendChild(S),f.appendChild(x),f.appendChild(k),y.appendChild(I),y.appendChild(C),h.appendChild(B),h.appendChild(Q),b.appendChild(T),b.appendChild(M),v.appendChild(L),v.appendChild(z),w.appendChild(q),w.appendChild(H),c.appendChild(p),c.appendChild(g),c.appendChild(f),c.appendChild(y),c.appendChild(h),c.appendChild(b),c.appendChild(v),c.appendChild(w),u.appendChild(c),be.appendChild(u),add_id_and_name(e,"type_text"),element="editor";var Ee=document.createElement("input");Ee.setAttribute("type","hidden"),Ee.setAttribute("value","type_wdeditor"),Ee.setAttribute("name",e+"_typeform_id_temp"),Ee.setAttribute("id",e+"_typeform_id_temp");var Ae=document.createElement("input");Ae.setAttribute("type","hidden"),Ae.setAttribute("value",r),Ae.setAttribute("name",e+"_requiredform_id_temp"),Ae.setAttribute("id",e+"_requiredform_id_temp");var je=document.createElement("div");je.setAttribute("id","main_div");var xe=document.createElement("div");xe.setAttribute("id",e+"_elemet_tableform_id_temp");var ke=document.createElement("div");ke.setAttribute("align","left"),ke.style.display="table-cell",ke.style.width=i+"px",ke.setAttribute("id",e+"_label_sectionform_id_temp");var Ie=document.createElement("div");Ie.setAttribute("align","left"),Ie.style.display="table-cell",Ie.setAttribute("id",e+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br"),we=document.createElement("br"),document.createElement("br");var Ce=document.createElement("span");Ce.setAttribute("id",e+"_element_labelform_id_temp"),Ce.innerHTML=t,Ce.setAttribute("class","label");var Be=document.createElement("span");Be.setAttribute("id",e+"_required_elementform_id_temp"),Be.innerHTML="",Be.setAttribute("class","required"),"yes"==r&&(Be.innerHTML=" *");var Qe=document.createElement("input");Qe.setAttribute("id",e+"_elementform_id_temp"),Qe.setAttribute("name",e+"_elementform_id_temp"),Qe.setAttribute("type","hidden"),Qe.style.width=l+"px",Qe.style.height=d+"px",Qe.setAttribute("title",_);var Te=document.createElement("span");Te.style.color="red",Te.style.fontStyle="italic",Te.innerHTML="Editor doesn't display in back end",Left=document.createTextNode(e+"_editorform_id_temp");var Me=document.createElement("div");Me.style.display="none";var Le=document.getElementById("show_table");ke.appendChild(Ce),ke.appendChild(Be),Ie.appendChild(Ee),Ie.appendChild(Ae),Ie.appendChild(Qe),Ie.appendChild(Te),Me.appendChild(Left),Ie.appendChild(Me),xe.appendChild(ke),xe.appendChild(Ie),je.appendChild(xe),je.appendChild(we),Le.appendChild(je),"top"==a&&label_top(e),change_class(o,e),refresh_attr(e,"type_text")}function change_input_range(e,t){var i="";""!=document.getElementById("el_range_"+e+"1").value&&(i=document.getElementById("el_range_"+e+"1").value),""!=document.getElementById("el_range_"+e+"2").value&&(""==document.getElementById("el_range_"+e+"1").value&&(i="0"),i=i+"."+document.getElementById("el_range_"+e+"2").value),document.getElementById(t+"_range_"+e+"form_id_temp").value=i}function explode(e,t){return 2!=arguments.length||void 0===e||void 0===t?null:""!==e&&!1!==e&&null!==e&&("function"==typeof e||"object"==typeof e||"function"==typeof t||"object"==typeof t?{0:""}:(!0===e&&(e="1"),t.toString().split(e.toString())))}function type_paypal_price(t,e,i,a,l,d,_,r,o,m,s,u,c,p,f){document.getElementById("element_type").value="type_paypal_price",delete_last_child();var y=document.createElement("div");y.setAttribute("id","edit_div");var h=document.createElement("table");h.setAttribute("id","edit_main_table"),h.setAttribute("cellpadding","3"),h.setAttribute("cellspacing","0");var b=document.createElement("tr"),v=document.createElement("tr"),w=document.createElement("tr"),g=document.createElement("tr"),E=document.createElement("tr"),A=document.createElement("tr"),x=document.createElement("tr"),k=document.createElement("tr"),I=document.createElement("tr"),C=document.createElement("tr"),B=document.createElement("td"),Q=document.createElement("td"),T=document.createElement("td"),M=document.createElement("td"),L=document.createElement("td"),z=document.createElement("td");z.style.cssText="line-height:20px";var q=document.createElement("td"),H=document.createElement("td"),N=document.createElement("td"),S=document.createElement("td"),D=document.createElement("td"),P=document.createElement("td"),O=document.createElement("td"),K=document.createElement("td"),U=document.createElement("td"),F=document.createElement("td"),R=document.createElement("td"),W=document.createElement("td"),V=document.createElement("td"),$=document.createElement("td"),G=document.createElement("label");G.setAttribute("class","fm-field-label"),G.setAttribute("for","edit_for_label"),G.innerHTML="Field label";var Y=document.createElement("textarea");Y.setAttribute("id","edit_for_label"),Y.setAttribute("rows","4"),Y.setAttribute("onKeyUp","change_label('"+t+"_element_labelform_id_temp', this.value)"),Y.innerHTML=e;var Z=document.createElement("label");Z.setAttribute("class","fm-field-label"),Z.setAttribute("for","edit_for_label_size"),Z.innerHTML="Field label size(px) ";var X=document.createElement("input");X.setAttribute("id","edit_for_label_size"),X.setAttribute("type","text"),X.setAttribute("value",i),X.setAttribute("onKeyPress","return check_isnum(event)"),X.setAttribute("onKeyUp","change_w_style('"+t+"_label_sectionform_id_temp', this.value)");var J=document.createElement("label");J.setAttribute("class","fm-field-label"),J.innerHTML="Field label position";var ee=document.createElement("input");ee.setAttribute("id","edit_for_label_position_top"),ee.setAttribute("type","radio"),ee.setAttribute("name","edit_for_label_position"),ee.setAttribute("onchange","label_left("+t+")");var te=document.createElement("label");te.setAttribute("for","edit_for_label_position_top"),te.innerHTML="Left";var ie=document.createElement("input");ie.setAttribute("id","edit_for_label_position_left"),ie.setAttribute("type","radio"),ie.setAttribute("name","edit_for_label_position"),ie.setAttribute("onchange","label_top("+t+")");var ae=document.createElement("label");ae.setAttribute("for","edit_for_label_position_left"),ae.innerHTML="Top","top"==a?ie.setAttribute("checked","checked"):ee.setAttribute("checked","checked"),w_range_minarray=explode(".",p),w_range_maxarray=explode(".",f);var ne=document.createElement("label");ne.setAttribute("class","fm-field-label"),ne.innerHTML="Range ";var le=document.createTextNode("Min"),de=document.createElement("input");de.setAttribute("type","text"),de.setAttribute("id","el_range_min1"),w_range_minarray[0]&&de.setAttribute("value",w_range_minarray[0]),de.style.cssText="width:60px; margin-right:4px;margin-left:8px",de.setAttribute("onKeyPress","return check_isnum(event)"),de.setAttribute("onChange","change_input_range('min', '"+t+"')");var _e=document.createTextNode("."),re=document.createElement("input");re.setAttribute("type","text"),re.setAttribute("id","el_range_min2"),w_range_minarray[1]&&re.setAttribute("value",w_range_minarray[1]),re.style.cssText="width:30px; margin-left:4px",re.setAttribute("onKeyPress","return check_isnum(event)"),re.setAttribute("onChange","change_input_range('min', '"+t+"')");var oe=document.createTextNode("Max"),me=document.createElement("input");me.setAttribute("type","text"),me.setAttribute("id","el_range_max1"),w_range_maxarray[0]&&me.setAttribute("value",w_range_maxarray[0]),me.style.cssText="width:60px; margin-right:4px; margin-left:7px",me.setAttribute("onKeyPress","return check_isnum(event)"),me.setAttribute("onChange","change_input_range('max', '"+t+"')");var se=document.createTextNode("."),ue=document.createElement("input");ue.setAttribute("type","text"),ue.setAttribute("id","el_range_max2"),w_range_maxarray[1]&&ue.setAttribute("value",w_range_maxarray[1]),ue.style.cssText="width:30px; margin-left:4px",ue.setAttribute("onKeyPress","return check_isnum(event)"),ue.setAttribute("onChange","change_input_range('max', '"+t+"')");var ce=document.createTextNode("-"),pe=document.createElement("label");pe.setAttribute("class","fm-field-label"),pe.setAttribute("for","el_first_value_first"),pe.innerHTML="Placeholder ";var fe=document.createElement("input");fe.setAttribute("id","el_first_value_first"),fe.setAttribute("type","text"),fe.setAttribute("value",d[0]),fe.style.cssText="width:120px; margin-right:4px",fe.setAttribute("onKeyPress","return check_isnum(event)"),fe.setAttribute("onKeyUp","change_input_value(this.value,'"+t+"_element_dollarsform_id_temp')");var ye=document.createElement("input");ye.setAttribute("id","el_first_value_last"),ye.setAttribute("type","text"),ye.setAttribute("value",d[1]),ye.style.cssText="width:67px; margin-left:4px; margin-right:4px",ye.setAttribute("onKeyPress","return check_isnum_interval(event,'"+t+"_element_centsform_id_temp',0,99)"),ye.setAttribute("onKeyUp","change_input_value(this.value,'"+t+"_element_centsform_id_temp')");var he=document.createElement("label");he.setAttribute("class","fm-field-label"),he.setAttribute("for","edit_for_input_size"),he.innerHTML="Field size(px) ";var be=document.createElement("input");be.setAttribute("id","edit_for_input_size"),be.setAttribute("type","text"),be.setAttribute("value",r),be.setAttribute("onKeyPress","return check_isnum(event)"),be.setAttribute("onKeyUp","change_w_style('"+t+"_element_dollarsform_id_temp', this.value);");var ve=document.createElement("label");ve.setAttribute("class","fm-field-label"),ve.setAttribute("for","el_required"),ve.innerHTML="Required";var we=document.createElement("input");we.setAttribute("id","el_required"),we.setAttribute("type","checkbox"),we.setAttribute("onclick","set_required('"+t+"_required')"),"yes"==o&&we.setAttribute("checked","checked");var ge=document.createElement("label");ge.setAttribute("class","fm-field-label"),ge.setAttribute("for","el_hide_cents"),ge.innerHTML="Hide Cents";var Ee=document.createElement("input");Ee.setAttribute("id","el_hide_cents"),Ee.setAttribute("type","checkbox"),Ee.setAttribute("onclick","hide_show_cents(this.checked, "+t+")"),"yes"==m&&Ee.setAttribute("checked","checked");var Ae=document.createElement("label");Ae.setAttribute("class","fm-field-label"),Ae.setAttribute("for","el_style_textarea"),Ae.innerHTML="Class name";var je=document.createElement("input");je.setAttribute("id","el_style_textarea"),je.setAttribute("type","text"),je.setAttribute("value",s),je.setAttribute("onChange","change_class(this.value,'"+t+"')");var xe=document.createElement("label");xe.setAttribute("class","fm-field-label"),xe.innerHTML="Additional Attributes";var ke=document.createElement("img");ke.setAttribute("src",plugin_url+"/images/add.png?ver=1.8.0"),ke.style.cssText="cursor:pointer; margin-left:68px",ke.setAttribute("title","add"),ke.setAttribute("onClick","add_attr("+t+", 'type_paypal_price')");var Ie=document.createElement("table");Ie.setAttribute("id","attributes"),Ie.setAttribute("border","0"),Ie.style.cssText="margin-left:0px";var Ce=document.createElement("tr");Ce.setAttribute("idi","0");var Be=document.createElement("th");Be.style.cssText="width:100px";var Qe=document.createElement("th");Qe.style.cssText="width:100px";var Te=document.createElement("th");Te.style.cssText="width:10px";var Me=document.createElement("label");Me.style.cssText="color:#000; font-weight:bold; font-size: 11px",Me.innerHTML="Name";var Le=document.createElement("label");for(Le.style.cssText="color:#000; font-weight:bold; font-size: 11px",Le.innerHTML="Value",Ie.appendChild(Ce),Ce.appendChild(Be),Ce.appendChild(Qe),Ce.appendChild(Te),Be.appendChild(Me),Qe.appendChild(Le),n=u.length,j=1;j<=n;j++){var ze=document.createElement("tr");ze.setAttribute("id","attr_row_"+j),ze.setAttribute("idi",j);var qe=document.createElement("td");qe.style.cssText="width:100px";var He=document.createElement("td");He.style.cssText="width:100px";var Ne=document.createElement("td"),Se=document.createElement("input");Se.setAttribute("type","text"),Se.setAttribute("class","fm-field-choice"),Se.setAttribute("value",u[j-1]),Se.setAttribute("id","attr_name"+j),Se.setAttribute("onChange","change_attribute_name("+t+", this, 'type_paypal_price')");var De=document.createElement("input");De.setAttribute("type","text"),De.setAttribute("class","fm-field-choice"),De.setAttribute("value",c[j-1]),De.setAttribute("id","attr_value"+j),De.setAttribute("onChange","change_attribute_value("+t+", "+j+", 'type_paypal_price')");var Pe=document.createElement("img");Pe.setAttribute("id","el_choices"+j+"_remove"),Pe.setAttribute("src",plugin_url+"/images/delete.png?ver=1.8.0"),Pe.style.cssText="cursor:pointer; vertical-align:middle; margin:2px",Pe.setAttribute("onClick","remove_attr("+j+", "+t+", 'type_paypal_price')"),Ie.appendChild(ze),ze.appendChild(qe),ze.appendChild(He),ze.appendChild(Ne),qe.appendChild(Se),He.appendChild(De),Ne.appendChild(Pe)}var Oe=document.getElementById("edit_table"),Ke=document.createElement("br"),Ue=document.createElement("br"),Fe=(document.createElement("br"),document.createElement("br"));document.createElement("br"),document.createElement("br"),document.createElement("br");B.appendChild(G),Q.appendChild(Y),V.appendChild(Z),$.appendChild(X),T.appendChild(J),M.appendChild(ee),M.appendChild(te),M.appendChild(Ke),M.appendChild(ie),M.appendChild(ae),L.appendChild(ne),z.appendChild(le),z.appendChild(de),z.appendChild(_e),z.appendChild(re),z.appendChild(Ue),z.appendChild(oe),z.appendChild(me),z.appendChild(se),z.appendChild(ue),R.appendChild(pe),W.appendChild(fe),W.appendChild(ce),W.appendChild(ye),O.appendChild(he),K.appendChild(be),q.appendChild(Ae),H.appendChild(je),N.appendChild(ve),S.appendChild(we),U.appendChild(ge),F.appendChild(Ee),D.appendChild(xe),D.appendChild(ke),D.appendChild(Fe),D.appendChild(Ie),D.setAttribute("colspan","2"),b.appendChild(B),b.appendChild(Q),C.appendChild(V),C.appendChild($),v.appendChild(T),v.appendChild(M),w.appendChild(L),w.appendChild(z),x.appendChild(O),x.appendChild(K),g.appendChild(q),g.appendChild(H),E.appendChild(N),E.appendChild(S),A.appendChild(D),A.appendChild(P),k.appendChild(U),k.appendChild(F),I.appendChild(R),I.appendChild(W),h.appendChild(b),h.appendChild(C),h.appendChild(v),h.appendChild(w),h.appendChild(I),h.appendChild(x),h.appendChild(g),h.appendChild(E),h.appendChild(k),h.appendChild(A),y.appendChild(h),Oe.appendChild(y),add_id_and_name(t,"type_name");var Re=document.createElement("input");Re.setAttribute("type","hidden"),Re.setAttribute("value","type_paypal_price"),Re.setAttribute("name",t+"_typeform_id_temp"),Re.setAttribute("id",t+"_typeform_id_temp");var We=document.createElement("input");We.setAttribute("type","hidden"),We.setAttribute("value",o),We.setAttribute("name",t+"_requiredform_id_temp"),We.setAttribute("id",t+"_requiredform_id_temp");var Ve=document.createElement("input");Ve.setAttribute("type","hidden"),Ve.setAttribute("value",p),Ve.setAttribute("name",t+"_range_minform_id_temp"),Ve.setAttribute("id",t+"_range_minform_id_temp");var $e=document.createElement("input");$e.setAttribute("type","hidden"),$e.setAttribute("value",f),$e.setAttribute("name",t+"_range_maxform_id_temp"),$e.setAttribute("id",t+"_range_maxform_id_temp");var Ge=document.createElement("div");Ge.setAttribute("id","main_div");var Ye=document.createElement("div");Ye.setAttribute("class","fm-editable-label"),edit_labels=document.createTextNode("The labels of the fields are editable. Please, click on the label to edit."),Ye.appendChild(edit_labels);var Ze=document.createElement("div");Ze.setAttribute("id",t+"_elemet_tableform_id_temp");var Xe=document.createElement("div");Xe.setAttribute("align","left"),Xe.style.display="table-cell",Xe.style.width=i+"px",Xe.setAttribute("id",t+"_label_sectionform_id_temp");var Je=document.createElement("div");Je.setAttribute("align","left"),Je.style.display="table-cell",Je.setAttribute("id",t+"_element_sectionform_id_temp");var et=document.createElement("div");et.setAttribute("id",t+"_table_price"),et.style.display="table";var tt=document.createElement("div");tt.setAttribute("id",t+"_tr_price1"),tt.style.display="table-row";var it=document.createElement("div");it.setAttribute("id",t+"_tr_price2"),it.style.display="table-row";var at=document.createElement("div");at.setAttribute("id",t+"_td_name_currency"),at.style.display="table-cell";var nt=document.createElement("div");nt.setAttribute("id",t+"_td_name_dollars"),nt.style.display="table-cell";var lt=document.createElement("div");lt.setAttribute("id",t+"_td_name_divider"),lt.style.display="table-cell";var dt=document.createElement("div");dt.setAttribute("id",t+"_td_name_cents"),dt.style.display="table-cell";var _t=document.createElement("div");_t.style.display="table-cell";var rt=document.createElement("div");rt.setAttribute("align","left"),rt.style.display="table-cell";var ot=document.createElement("div");ot.setAttribute("id",t+"_td_name_label_divider"),ot.style.display="table-cell";var mt=document.createElement("div");mt.setAttribute("align","left"),mt.setAttribute("id",t+"_td_name_label_cents"),mt.style.display="table-cell";var st=document.createElement("span");st.setAttribute("id",t+"_element_labelform_id_temp"),st.innerHTML=e,st.setAttribute("class","label"),st.style.verticalAlign="top";var ut=document.createElement("span");ut.setAttribute("id",t+"_required_elementform_id_temp"),ut.innerHTML="",ut.setAttribute("class","required"),ut.style.verticalAlign="top","yes"==o&&(ut.innerHTML=" *");var ct=document.createElement("span");ct.setAttribute("class","wdform_colon"),ct.style.cssText="font-style:bold; vertical-align:middle",ct.innerHTML="\x3c!--repstart--\x3e&nbsp;$&nbsp;\x3c!--repend--\x3e";var pt=document.createElement("label");pt.setAttribute("class","mini_label");var ft=document.createElement("input");ft.setAttribute("type","text"),ft.style.cssText="width:"+r+"px",ft.setAttribute("id",t+"_element_dollarsform_id_temp"),ft.setAttribute("name",t+"_element_dollarsform_id_temp"),ft.setAttribute("value",l[0]),ft.setAttribute("title",d[0]),ft.setAttribute("onKeyPress","return check_isnum(event)");var yt=document.createElement("label");yt.setAttribute("class","mini_label"),yt.setAttribute("id",t+"_mini_label_dollars"),yt.innerHTML=_[0];var ht=document.createElement("span");ht.setAttribute("class","wdform_colon"),ht.style.cssText="font-style:bold; vertical-align:middle",ht.innerHTML="&nbsp;.&nbsp;";var bt=document.createElement("label");bt.setAttribute("class","mini_label");var vt=document.createElement("input");vt.setAttribute("type","text"),vt.style.cssText="width:30px",vt.setAttribute("id",t+"_element_centsform_id_temp"),vt.setAttribute("name",t+"_element_centsform_id_temp"),vt.setAttribute("value",l[1]),vt.setAttribute("title",d[1]),vt.setAttribute("onBlur",'add_0("'+t+'_element_centsform_id_temp")'),vt.setAttribute("onKeyPress","return check_isnum_interval(event,'"+t+"_element_centsform_id_temp',0,99)");var wt=document.createElement("label");wt.setAttribute("class","mini_label"),wt.setAttribute("id",t+"_mini_label_cents"),wt.innerHTML=_[1];var gt=document.getElementById("show_table");Xe.appendChild(st),Xe.appendChild(ut),at.appendChild(ct),nt.appendChild(ft),lt.appendChild(ht),dt.appendChild(vt),tt.appendChild(at),tt.appendChild(nt),tt.appendChild(lt),tt.appendChild(dt),_t.appendChild(pt),rt.appendChild(yt),ot.appendChild(bt),mt.appendChild(wt),it.appendChild(_t),it.appendChild(rt),it.appendChild(ot),it.appendChild(mt),et.appendChild(tt),et.appendChild(it),Je.appendChild(Re),Je.appendChild(We),Je.appendChild(Ve),Je.appendChild($e),Je.appendChild(et),Ze.appendChild(Xe),Ze.appendChild(Je),Ge.appendChild(Ze),Ge.appendChild(Fe),Ge.appendChild(Ye),gt.appendChild(Ge),"top"==a&&label_top(t),"yes"==m&&hide_show_cents(!0,t),change_class(s,t),refresh_attr(t,"type_paypal_price"),jQuery(document).ready(function(){jQuery("label#"+t+"_mini_label_dollars").on("click",function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='dollars' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery(e).focus(),jQuery("input.dollars").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_dollars").text(e)})}}),jQuery("label#"+t+"_mini_label_cents").on("click",function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='cents' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.cents").focus(),jQuery("input.cents").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_cents").text(e)})}})})}function hide_show_cents(e,t){td_divider=document.getElementById(t+"_td_name_divider"),td_cents=document.getElementById(t+"_td_name_cents"),td_divider_label=document.getElementById(t+"_td_name_label_divider"),td_cents_label=document.getElementById(t+"_td_name_label_cents"),change_input_value("",t+"_element_centsform_id_temp"),document.getElementById("el_first_value_last").value="",document.getElementById(t+"_element_centsform_id_temp").value="",td_cents_label.style.display=e?(td_divider.style.display="none",td_cents.style.display="none",td_divider_label.style.display="none"):(td_divider.style.display="table-cell",td_cents.style.display="table-cell",td_divider_label.style.display="table-cell")}function type_date(e,t,i,a,l,d,_,r,o,m,s,u){document.getElementById("element_type").value="type_date",delete_last_child();var c=document.createElement("div");c.setAttribute("id","edit_div");var p=document.createElement("table");p.setAttribute("id","edit_main_table"),p.setAttribute("cellpadding","3"),p.setAttribute("cellspacing","0");var f=document.createElement("tr"),y=document.createElement("tr"),h=document.createElement("tr"),b=document.createElement("tr");b.style.cssText="display:none;";var v=document.createElement("tr"),w=document.createElement("tr"),g=document.createElement("tr"),E=document.createElement("tr"),A=document.createElement("tr"),x=document.createElement("td"),k=document.createElement("td"),I=document.createElement("td"),C=document.createElement("td"),B=document.createElement("td"),Q=document.createElement("td"),T=document.createElement("td"),M=document.createElement("td"),L=document.createElement("td"),z=document.createElement("td"),q=document.createElement("td"),H=document.createElement("td"),N=document.createElement("td"),S=document.createElement("td"),D=document.createElement("td"),P=document.createElement("td"),O=document.createElement("td"),K=document.createElement("td"),U=document.createElement("label");U.setAttribute("for","edit_for_label"),U.setAttribute("class","fm-field-label"),U.innerHTML="Field label";var F=document.createElement("textarea");F.setAttribute("id","edit_for_label"),F.setAttribute("rows","4"),F.setAttribute("onKeyUp","change_label('"+e+"_element_labelform_id_temp', this.value)"),F.innerHTML=t;var R=document.createElement("label");R.setAttribute("class","fm-field-label"),R.setAttribute("for","edit_for_label_size"),R.innerHTML="Field label size(px) ";var W=document.createElement("input");W.setAttribute("id","edit_for_label_size"),W.setAttribute("type","text"),W.setAttribute("value",i),W.setAttribute("onKeyPress","return check_isnum(event)"),W.setAttribute("onKeyUp","change_w_style('"+e+"_label_sectionform_id_temp', this.value)");var V=document.createElement("label");V.setAttribute("class","fm-field-label"),V.innerHTML="Field label position";var $=document.createElement("input");$.setAttribute("id","edit_for_label_position_top"),$.setAttribute("type","radio"),$.setAttribute("name","edit_for_label_position"),$.setAttribute("onchange","label_left("+e+")");var G=document.createElement("label");G.setAttribute("for","edit_for_label_position_top"),G.innerHTML="Left";var Y=document.createElement("input");Y.setAttribute("id","edit_for_label_position_left"),Y.setAttribute("type","radio"),Y.setAttribute("name","edit_for_label_position"),Y.setAttribute("onchange","label_top("+e+")");var Z=document.createElement("label");Z.setAttribute("for","edit_for_label_position_left"),Z.innerHTML="Top","top"==a?Y.setAttribute("checked","checked"):$.setAttribute("checked","checked");var X=document.createElement("label");X.setAttribute("class","fm-field-label"),X.setAttribute("for","date_format"),X.innerHTML="Date format";var J=document.createElement("input");J.setAttribute("id","date_format"),J.setAttribute("type","text"),J.setAttribute("value",r),J.setAttribute("onChange","change_date_format(this.value,'"+e+"', 'format')");var ee=document.createElement("label");ee.setAttribute("class","fm-field-label"),ee.setAttribute("for","button_value"),ee.innerHTML="Date Picker label";var te=document.createElement("input");te.setAttribute("id","button_value"),te.setAttribute("type","text"),te.setAttribute("value",o),te.style.cssText="width:150px;",te.setAttribute("onKeyUp","change_file_value(this.value,'"+e+"_buttonform_id_temp')");var ie=document.createElement("label");ie.setAttribute("class","fm-field-label"),ie.setAttribute("for","el_disable_past_days"),ie.innerHTML="Allow selecting dates starting from current day";var ae=document.createElement("input");ae.setAttribute("id","el_disable_past_days"),ae.setAttribute("type","checkbox"),ae.setAttribute("onclick","change_date_format(this.checked, '"+e+"', 'dis_days')"),"yes"==u&&ae.setAttribute("checked","checked");var ne=document.createElement("label");ne.setAttribute("class","fm-field-label"),ne.setAttribute("for","el_style_textarea"),ne.innerHTML="Class name";var le=document.createElement("input");le.setAttribute("id","el_style_textarea"),le.setAttribute("type","text"),le.setAttribute("value",_),le.setAttribute("onChange","change_class(this.value,'"+e+"')");var de=document.createElement("label");de.setAttribute("class","fm-field-label"),de.setAttribute("for","el_required"),de.innerHTML="Required";var _e=document.createElement("input");_e.setAttribute("id","el_required"),_e.setAttribute("type","checkbox"),_e.setAttribute("onclick","set_required('"+e+"_required')"),"yes"==d&&_e.setAttribute("checked","checked");var re=document.createElement("label");re.setAttribute("class","fm-field-label"),re.innerHTML="Additional Attributes";var oe=document.createElement("img");oe.setAttribute("src",plugin_url+"/images/add.png?ver=1.8.0"),oe.style.cssText="cursor:pointer; margin-left:68px",oe.setAttribute("title","add"),oe.setAttribute("onClick","add_attr("+e+", 'type_date')");var me=document.createElement("table");me.setAttribute("id","attributes"),me.setAttribute("border","0"),me.style.cssText="margin-left:0px";var se=document.createElement("tr");se.setAttribute("idi","0");var ue=document.createElement("th");ue.style.cssText="width:100px";var ce=document.createElement("th");ce.style.cssText="width:100px";var pe=document.createElement("th");pe.style.cssText="width:10px";var fe=document.createElement("label");fe.style.cssText="color:#000; font-weight:bold; font-size: 11px",fe.innerHTML="Name";var ye=document.createElement("label");for(ye.style.cssText="color:#000; font-weight:bold; font-size: 11px",ye.innerHTML="Value",me.appendChild(se),se.appendChild(ue),se.appendChild(ce),se.appendChild(pe),ue.appendChild(fe),ce.appendChild(ye),n=m.length,j=1;j<=n;j++){var he=document.createElement("tr");he.setAttribute("id","attr_row_"+j),he.setAttribute("idi",j);var be=document.createElement("td");be.style.cssText="width:100px";var ve=document.createElement("td");ve.style.cssText="width:100px";var we=document.createElement("td"),ge=document.createElement("input");ge.setAttribute("type","text"),ge.setAttribute("class","fm-field-choice"),ge.setAttribute("value",m[j-1]),ge.setAttribute("id","attr_name"+j),ge.setAttribute("onChange","change_attribute_name("+e+", this, 'type_date')");var Ee=document.createElement("input");Ee.setAttribute("type","text"),Ee.setAttribute("class","fm-field-choice"),Ee.setAttribute("value",s[j-1]),Ee.setAttribute("id","attr_value"+j),Ee.setAttribute("onChange","change_attribute_value("+e+", "+j+", 'type_date')");var Ae=document.createElement("img");Ae.setAttribute("id","el_choices"+j+"_remove"),Ae.setAttribute("src",plugin_url+"/images/delete.png?ver=1.8.0"),Ae.style.cssText="cursor:pointer; vertical-align:middle; margin:2px",Ae.setAttribute("onClick","remove_attr("+j+", "+e+", 'type_date')"),me.appendChild(he),he.appendChild(be),he.appendChild(ve),he.appendChild(we),be.appendChild(ge),ve.appendChild(Ee),we.appendChild(Ae)}var je=document.getElementById("edit_table"),xe=document.createElement("br"),ke=document.createElement("br");x.appendChild(U),k.appendChild(F),D.appendChild(R),P.appendChild(W),I.appendChild(V),C.appendChild($),C.appendChild(G),C.appendChild(xe),C.appendChild(Y),C.appendChild(Z),B.appendChild(X),Q.appendChild(J),T.appendChild(ee),M.appendChild(te),O.appendChild(ie),K.appendChild(ae),L.appendChild(ne),z.appendChild(le),q.appendChild(de),H.appendChild(_e),N.appendChild(re),N.appendChild(oe),N.appendChild(ke),N.appendChild(me),N.setAttribute("colspan","2"),f.appendChild(x),f.appendChild(k),E.appendChild(D),E.appendChild(P),y.appendChild(I),y.appendChild(C),h.appendChild(B),h.appendChild(Q),b.appendChild(T),b.appendChild(M),A.appendChild(O),A.appendChild(K),v.appendChild(L),v.appendChild(z),w.appendChild(q),w.appendChild(H),g.appendChild(N),g.appendChild(S),p.appendChild(f),p.appendChild(E),p.appendChild(y),p.appendChild(h),p.appendChild(b),p.appendChild(A),p.appendChild(v),p.appendChild(w),p.appendChild(g),c.appendChild(p),je.appendChild(c),add_id_and_name(e,"type_text");var Ie=document.createElement("input");Ie.setAttribute("type","hidden"),Ie.setAttribute("value","type_date"),Ie.setAttribute("name",e+"_typeform_id_temp"),Ie.setAttribute("id",e+"_typeform_id_temp");var Ce=document.createElement("input");Ce.setAttribute("type","hidden"),Ce.setAttribute("value",d),Ce.setAttribute("name",e+"_requiredform_id_temp"),Ce.setAttribute("id",e+"_requiredform_id_temp");var Be=document.createElement("input");Be.setAttribute("type","hidden"),Be.setAttribute("value",u),Be.setAttribute("id",e+"_dis_past_daysform_id_temp"),Be.setAttribute("name",e+"_dis_past_daysform_id_temp");var Qe=document.createElement("div");Qe.setAttribute("id","main_div");var Te=document.createElement("div");Te.setAttribute("id",e+"_elemet_tableform_id_temp");var Me=document.createElement("div");Me.setAttribute("align","left"),Me.style.display="table-cell",Me.style.width=i+"px",Me.setAttribute("id",e+"_label_sectionform_id_temp");var Le=document.createElement("div");Le.setAttribute("align","left"),Le.style.display="table-cell",Le.setAttribute("id",e+"_element_sectionform_id_temp");var ze=document.createElement("div");ze.setAttribute("id",e+"_table_date"),ze.style.display="table";var qe=document.createElement("div");qe.setAttribute("id",e+"_tr_date1"),qe.style.display="table-row";var He=document.createElement("div");He.setAttribute("id",e+"_tr_date2"),He.style.display="table-row";var Ne=document.createElement("div");Ne.setAttribute("id",e+"_td_date_input1"),Ne.style.display="table-cell";var Se=document.createElement("div");Se.setAttribute("id",e+"_td_date_input2"),Se.style.display="table-cell";var De=document.createElement("div");De.setAttribute("id",e+"_td_date_input3"),De.style.display="table-cell";var Pe=document.createElement("div");Pe.setAttribute("id",e+"_td_date_label1"),Pe.style.display="table-cell";var Oe=document.createElement("div");Oe.setAttribute("id",e+"_td_date_label2"),Oe.style.display="table-cell";var Ke=document.createElement("div");Ke.setAttribute("id",e+"_td_date_label3"),Ke.style.display="table-cell";var Ue=document.createElement("br"),Fe=(document.createElement("br"),document.createElement("span"));Fe.setAttribute("id",e+"_element_labelform_id_temp"),Fe.innerHTML=t,Fe.setAttribute("class","label"),Fe.style.verticalAlign="top";var Re=document.createElement("span");Re.setAttribute("id",e+"_required_elementform_id_temp"),Re.innerHTML="",Re.setAttribute("class","required"),Re.style.verticalAlign="top","yes"==d&&(Re.innerHTML=" *");var We=document.createElement("input");We.setAttribute("type","text"),We.setAttribute("value",l),We.setAttribute("class","wdform-date"),We.setAttribute("id",e+"_elementform_id_temp"),We.setAttribute("name",e+"_elementform_id_temp"),We.setAttribute("maxlength","10"),We.setAttribute("size","10");var Ve=document.createElement("input");Ve.setAttribute("id",e+"_buttonform_id_temp"),Ve.setAttribute("class","button"),Ve.setAttribute("type","reset"),Ve.setAttribute("value",o),Ve.setAttribute("format",r);var $e=document.getElementById("show_table");Me.appendChild(Fe),Me.appendChild(Re),Le.appendChild(Ie),Le.appendChild(Ce),Le.appendChild(Be),Le.appendChild(We),Le.appendChild(Ve),Te.appendChild(Me),Te.appendChild(Le),Qe.appendChild(Te),Qe.appendChild(Ue),$e.appendChild(Qe),"top"==a&&label_top(e),change_class(_,e),refresh_attr(e,"type_date")}function form_maker_getElementsByAttribute(e,t,i,a){for(var n,l,d="*"==t&&e.all?e.all:e.getElementsByTagName(t),_=new Array,r=void 0!==a?new RegExp("(^|\\s)"+a+"(\\s|$)"):null,o=0;o<d.length;o++)"string"==typeof(n=(l=d[o]).getAttribute&&l.getAttribute(i))&&0<n.length&&(void 0===a||r&&r.test(n))&&_.push(l);return _}function change_element_attribute(e,t,i){"w_readonly"==i||"w_hide_field"==i?"yes"==document.getElementById(t+"_elementform_id_temp").getAttribute(i)?document.getElementById(t+"_elementform_id_temp").setAttribute(i,"no"):document.getElementById(t+"_elementform_id_temp").setAttribute(i,"yes"):document.getElementById(t+"_elementform_id_temp").setAttribute(i,e)}function change_input_style(e){document.getElementById(e+"_elementform_id_temp").getAttribute("readonly")?document.getElementById(e+"_elementform_id_temp").removeAttribute("readonly"):document.getElementById(e+"_elementform_id_temp").setAttribute("readonly","readonly")}function change_src(e,t,i){for(var a=0;a<=e;a++)document.getElementById(t+"_star_"+a).src=plugin_url+"/images/star_"+document.getElementById(t+"_star_colorform_id_temp").value+".png"}function reset_src(e,t){for(var i=0;i<=e;i++)document.getElementById(t+"_star_"+i).src=plugin_url+"/images/star.png"}function select_star_rating(e,t,i){}function change_range_width(e,t,i){document.getElementById(t+"_elementform_id_temp0").style.cssText="width:"+e+"px",document.getElementById(t+"_elementform_id_temp1").style.cssText="width:"+e+"px",document.getElementById(t+"_range_widthform_id_temp").value=e}function go_to_type_paypal_price(e){w_attr_name=[],w_attr_value=[],w_first_val=["",""],w_title=["",""],w_mini_labels=["Dollars","Cents"],type_paypal_price(e,"Amount","100","left",w_first_val,w_title,w_mini_labels,"100","no","no","",w_attr_name,w_attr_value,"","")}function go_to_type_number(e){w_attr_name=[],w_attr_value=[],type_number(e,"Number:","100","left","200","","","no","no","",w_attr_name,w_attr_value)}function go_to_type_wdeditor(e){w_attr_name=[],w_attr_value=[],type_wdeditor(e,"Editor:","100","left","380","200","","no","",w_attr_name,w_attr_value)}function go_to_type_date(e){w_attr_name=[],w_attr_value=[],type_date(e,"Date:","100","left","","no","","%Y-%m-%d","...",w_attr_name,w_attr_value,"no")}function remove_section_break(e){var t=jQuery("#wdform_field"+e).parent(),i=t.next(),a=t.prev();i.find(".wdform_column").each(function(e,t){var i=a.children().eq(e);!i||i.hasClass("wdform_column_empty")?a.find(".wdform_column_empty").before(t):jQuery(t).find(".wdform_row").each(function(e,t){i.append(t)})}),t.remove(),i.remove()}function fm_remove_section(e){var t=jQuery(".fm-row-deleting").first().closest(".wdform_section"),i=t.prev(".wdform_tr_section_break");if(!e){var a=t.prevAll(".wdform_section:first");if(a.length||(a=t.nextAll(".wdform_section:first")),!a.length)return;t.find(".wdform_column").each(function(e,t){a.append(t)})}i.remove(),t.remove()}function remove_row(e){var t=document.getElementById("wdform_field"+e).parentNode;t.parentNode.removeChild(t)}function destroyChildren(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function show_or_hide(e){jQuery("#form_id_tempform_view"+e).is(":visible")?hide_form_view(e):show_form_view(e)}function show_form_view(e){jQuery("#form_id_tempform_view"+e).show()}function hide_form_view(e){jQuery("#form_id_tempform_view"+e).hide()}function generate_buttons(e){var t;form_view_elemet=document.getElementById("form_id_tempform_view"+e),(t=document.createElement("div")).setAttribute("valign","middle"),t.setAttribute("align","left"),t.style.display="inline-block",t.style.width="40%",page_nav.appendChild(t),form_view_elemet.parentNode.previousSibling&&("DIV"==form_view_elemet.parentNode.previousSibling.tagName?table=!0:form_view_elemet.parentNode.previousSibling.previousSibling&&"DIV"==form_view_elemet.parentNode.previousSibling.previousSibling.tagName?table=!0:table=!1,table&&(form_view_elemet.getAttribute("previous_title")?(previous_title=form_view_elemet.getAttribute("previous_title"),previous_type=form_view_elemet.getAttribute("previous_type"),previous_class=form_view_elemet.getAttribute("previous_class")):(previous_title="Previous",previous_type="button",previous_class=""),next_or_previous="previous",previous=make_pagebreak_button(next_or_previous,previous_title,previous_type,previous_class,e),t.appendChild(previous))),(t=document.createElement("div")).setAttribute("id","page_numbersform_id_temp"+e),t.setAttribute("valign","middle"),t.setAttribute("align","center"),t.style.display="inline-block",t.style.width="20%",page_nav.appendChild(t),(t=document.createElement("div")).setAttribute("valign","middle"),t.setAttribute("align","right"),t.style.display="inline-block",t.style.width="40%",page_nav.appendChild(t),form_view_elemet.parentNode.nextSibling&&("DIV"==form_view_elemet.parentNode.nextSibling.tagName?table=!0:form_view_elemet.parentNode.nextSibling.nextSibling&&"DIV"==form_view_elemet.parentNode.nextSibling.nextSibling.tagName?table=!0:table=!1,table&&(form_view_elemet.getAttribute("previous_title")?(next_title=form_view_elemet.getAttribute("next_title"),next_type=form_view_elemet.getAttribute("next_type"),next_class=form_view_elemet.getAttribute("next_class")):(next_title="Next",next_type="button",next_class=""),next_or_previous="next",next=make_pagebreak_button(next_or_previous,next_title,next_type,next_class,e),t.appendChild(next)))}function generate_page_nav(e){form_view=e,document.getElementById("form_id_tempform_view"+e).parentNode.style.borderWidth="1px",jQuery(".wdform-page-and-images").each(function(){var e=jQuery(this).find(".form_id_tempform_view_img").attr("id").split("form_id_tempform_view_img");t=e[1],page_nav=document.getElementById("form_id_temppage_nav"+t),destroyChildren(page_nav),generate_buttons(t)}),generate_page_bar(),refresh_page_numbers()}function remove_page(e){jQuery("#fm_delete_page_id").val(e),fm_popup_toggle("fm_delete_page_popup_container")}function remove_field(e,t){jQuery("#fm_delete_field_id").val(e),fm_popup_toggle("fm_delete_field_popup_container"),void 0!==t&&(t.stopPropagation(),t.preventDefault())}function fm_remove_column_popup(e){jQuery(".wdform_column").removeClass("fm-column-deleting"),jQuery(e).closest(".wdform_column").addClass("fm-column-deleting"),fm_popup_toggle("fm_delete_column_popup_container")}function fm_remove_row_popup(e){jQuery(".wdform_section").removeClass("fm-row-deleting"),jQuery(e).closest(".wdform_section").addClass("fm-row-deleting"),fm_popup_toggle("fm_delete_row_popup_container")}function fm_remove_column(){jQuery(".fm-column-deleting").remove()}function remove_page_only(){id=jQuery("#fm_delete_page_id").val(),refresh_pages_without_deleting(id)}function remove_page_all(){id=jQuery("#fm_delete_page_id").val(),form_view_elemet=document.getElementById("form_id_tempform_view"+id);var e=jQuery(".wdform-page-and-images").length;if(2==e&&(jQuery(".form_id_tempform_view_img").removeClass("form_view_show").addClass("form_view_hide"),jQuery("*[id*=form_id_temppage_nav]").empty()),1==e)return form_view_elemet.innerHTML="",tbody=form_view_elemet,tr=document.createElement("div"),tr.setAttribute("class","wdform_section"),tr.style.display="table-row",tr_page_nav=document.createElement("div"),tr_page_nav.setAttribute("valign","top"),tr_page_nav.setAttribute("class","wdform_footer"),tr_page_nav.style.width="100%",td_page_nav=document.createElement("div"),td_page_nav.style.width="100%",table_min_page_nav=document.createElement("div"),table_min_page_nav.style.width="100%",table_min_page_nav.style.display="table",tbody_min_page_nav=document.createElement("div"),tbody_min_page_nav.style.display="table-row-group",tr_min_page_nav=document.createElement("div"),tr_min_page_nav.setAttribute("id","form_id_temppage_nav"+form_view),tr_min_page_nav.style.display="table-row",table_min=document.createElement("div"),table_min.setAttribute("class","wdform_column"),tr.appendChild(table_min),tbody_min_page_nav.appendChild(tr_min_page_nav),table_min_page_nav.appendChild(tbody_min_page_nav),td_page_nav.appendChild(table_min_page_nav),tr_page_nav.appendChild(td_page_nav),tbody.appendChild(tr),void tbody.appendChild(tr_page_nav);form_view_table=form_view_elemet.parentNode,document.getElementById("take").removeChild(form_view_table),refresh_pages(id)}function refresh_pages(e){temp=1,destroyChildren(document.getElementById("pages"));var t=jQuery(".wdform-page-and-images").length;generate_page_bar(),1<t?jQuery("#page_bar").removeClass("form_view_hide"):(destroyChildren(document.getElementById("edit_page_navigation")),jQuery("#page_bar").addClass("form_view_hide"),jQuery(".wdform_page").removeAttr("style"))}function refresh_pages_without_deleting(e){var t=jQuery("#form_id_tempform_view"+e);t.find(".wdform_row");2==jQuery(".wdform-page-and-images").length&&(jQuery(".form_id_tempform_view_img").removeClass("form_view_show").addClass("form_view_hide"),jQuery("*[id*=form_id_temppage_nav]").empty());var i=t.parent(),a=i.prevAll(".wdform-page-and-images:first");a.length||(a=i.nextAll(".wdform-page-and-images:first")),a.length&&(i.find(".wdform_section").each(function(e,t){var i=a.find(".wdform_section").eq(e);i.length?jQuery(t).find(".wdform_column:not(:empty)").each(function(e,t){i.append(t)}):a.find(".wdform_row_empty").before(t)}),i.remove(),refresh_pages(e),all_sortable_events())}function make_page_steps_front(){destroyChildren(document.getElementById("pages")),show_title=document.getElementById("el_show_title_input").checked,k=0,jQuery(".wdform-page-and-images").each(function(){var e=jQuery(this).find(".wdform_page").attr("id");j=e.split("form_id_tempform_view")[1],document.getElementById("form_id_tempform_view"+j).getAttribute("page_title")?w_pages=document.getElementById("form_id_tempform_view"+j).getAttribute("page_title"):w_pages="",k++,page_number=document.createElement("span"),page_number.setAttribute("id","page_"+j),page_number.setAttribute("onClick",'generate_page_nav("'+j+'")'),j==form_view?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("pages").appendChild(page_number)})}function make_page_percentage_front(){destroyChildren(document.getElementById("pages")),show_title=document.getElementById("el_show_title_input").checked;var e=document.createElement("div");e.setAttribute("class","page_percentage_deactive");var t=document.createElement("div");t.setAttribute("id","div_percentage"),t.setAttribute("class","page_percentage_active");var i=document.createElement("b");t.appendChild(i),k=0,cur_page_title="",jQuery(".wdform-page-and-images").each(function(){var e=jQuery(this).find(".wdform_page").attr("id");if(j=e.split("form_id_tempform_view")[1],document.getElementById("form_id_tempform_view"+j).getAttribute("page_title")?w_pages=document.getElementById("form_id_tempform_view"+j).getAttribute("page_title"):w_pages="",k++,j==form_view){if(show_title){var t=document.createElement("span");1==k?t.style.paddingLeft="30px":t.style.paddingLeft="5px",t.innerHTML=w_pages}page_number=k}}),i.innerHTML=Math.round((page_number-1)/k*100)+"%",t.style.width=(page_number-1)/k*100+"%",e.appendChild(t),cur_page_title&&e.appendChild(cur_page_title),document.getElementById("pages").appendChild(e)}function make_page_none_front(){var e=document.createElement("div");e.innerHTML="NO PAGE BAR",jQuery("#pages").empty(),jQuery("#pages").append(e)}function generate_page_bar(){need_enable=!1,el_page_navigation(),add(0,!1),need_enable=!0}function remove_add_(e){attr_name=new Array,attr_value=new Array;var t=document.getElementById(e);for(atr=t.attributes,v=0;v<30;v++)atr[v]&&0==atr[v].name.indexOf("add_")&&(attr_name.push(atr[v].name.replace("add_","")),attr_value.push(atr[v].value),t.removeAttribute(atr[v].name),v--);for(v=0;v<attr_name.length;v++)t.setAttribute(attr_name[v],attr_value[v])}function duplicate(e,a){if(jQuery("#wdform_field"+e).closest(".wdform_column").after("<div id='cur_column' class='wdform_column'></div>"),type=document.getElementById("wdform_field"+e).getAttribute("type"),document.getElementById(e+"_element_labelform_id_temp").innerHTML&&(w_field_label=document.getElementById(e+"_element_labelform_id_temp").innerHTML),labels=all_labels(),m=0,t=!0,"type_section_break"!=type){for(;t;)for(m++,k=0;k<labels.length&&(t=!0,labels[k]!=w_field_label+"("+m+")");k++)t=!1;w_field_label=w_field_label+"("+m+")"}switch(k=0,w_choices=new Array,w_choices_value=new Array,w_choices_params=new Array,w_choices_checked=new Array,w_choices_disabled=new Array,w_allow_other_num=0,w_property=new Array,w_property_values=new Array,w_choices_price=new Array,t=0,document.getElementById(e+"_label_sectionform_id_temp")&&("block"==document.getElementById(e+"_label_sectionform_id_temp").style.display?w_field_label_pos="top":w_field_label_pos="left"),document.getElementById(e+"_elementform_id_temp")&&(s=document.getElementById(e+"_elementform_id_temp").style.width,w_size=s.substring(0,s.length-2)),document.getElementById(e+"_label_sectionform_id_temp")&&(s=document.getElementById(e+"_label_sectionform_id_temp").style.width,w_field_label_size=s.substring(0,s.length-2)),document.getElementById(e+"_requiredform_id_temp")&&(w_required=document.getElementById(e+"_requiredform_id_temp").value),document.getElementById(e+"_uniqueform_id_temp")&&(w_unique=document.getElementById(e+"_uniqueform_id_temp").value),document.getElementById(e+"_label_sectionform_id_temp")&&(w_class=document.getElementById(e+"_label_sectionform_id_temp").getAttribute("class"),w_class||(w_class="")),type){case"type_editor":w_editor=document.getElementById("wdform_field"+e).innerHTML,type_editor(gen,w_editor);break;case"type_section_break":w_editor=document.getElementById(e+"_element_sectionform_id_temp").innerHTML,type_section_break(gen,w_editor);break;case"type_send_copy":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_first_val=document.getElementById(e+"_elementform_id_temp").checked,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_send_copy(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_first_val,w_required,w_attr_name,w_attr_value);break;case"type_text":w_first_val=document.getElementById(e+"_elementform_id_temp").value,w_title=document.getElementById(e+"_elementform_id_temp").title,w_regExp_status=document.getElementById(e+"_regExpStatusform_id_temp").value,w_regExp_value=unescape(document.getElementById(e+"_regExp_valueform_id_temp").value),w_regExp_common=document.getElementById(e+"_regExp_commonform_id_temp").value,w_regExp_arg=document.getElementById(e+"_regArgumentform_id_temp").value,w_regExp_alert=document.getElementById(e+"_regExp_alertform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_readonly=document.getElementById(e+"_readonlyform_id_temp").value,w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,type_text(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_first_val,w_title,w_required,w_regExp_status,w_regExp_value,w_regExp_common,w_regExp_arg,w_regExp_alert,w_unique,w_attr_name,w_attr_value,w_readonly);break;case"type_number":w_first_val=document.getElementById(e+"_elementform_id_temp").value,w_title=document.getElementById(e+"_elementform_id_temp").title,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_number(gen,w_field_label,w_field_label_size,w_field_label_pos,w_size,w_first_val,w_title,w_required,w_unique,w_class,w_attr_name,w_attr_value);break;case"type_password":w_placeholder_value=document.getElementById(e+"_elementform_id_temp").placeholder,w_verification=document.getElementById(e+"_verification_id_temp").value,document.getElementById(e+"_1_element_labelform_id_temp").innerHTML?w_verification_label=document.getElementById(e+"_1_element_labelform_id_temp").innerHTML:w_verification_label=" ",w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_password(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_required,w_unique,w_class,w_verification,w_verification_label,w_placeholder_value,w_attr_name,w_attr_value);break;case"type_textarea":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_first_val=document.getElementById(e+"_elementform_id_temp").value,w_title=document.getElementById(e+"_elementform_id_temp").title,s=document.getElementById(e+"_elementform_id_temp").style.height,w_size_h=s.substring(0,s.length-2),atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_textarea(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_size_h,w_first_val,w_title,w_required,w_unique,w_class,w_attr_name,w_attr_value);break;case"type_wdeditor":w_title=document.getElementById(e+"_elementform_id_temp").title,s=document.getElementById(e+"_elementform_id_temp").style.height,w_size_h=s.substring(0,s.length-2),w=document.getElementById(e+"_elementform_id_temp").style.width,w_size_w=w.substring(0,w.length-2),atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_wdeditor(gen,w_field_label,w_field_label_size,w_field_label_pos,w_size_w,w_size_h,w_title,w_required,w_class,w_attr_name,w_attr_value);break;case"type_phone":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_first_val=[document.getElementById(e+"_element_firstform_id_temp").value,document.getElementById(e+"_element_lastform_id_temp").value],w_title=[document.getElementById(e+"_element_firstform_id_temp").title,document.getElementById(e+"_element_lastform_id_temp").title],s=document.getElementById(e+"_element_lastform_id_temp").style.width,w_size=s.substring(0,s.length-2),w_mini_labels=[document.getElementById(e+"_mini_label_area_code").innerHTML,document.getElementById(e+"_mini_label_phone_number").innerHTML],atrs=return_attributes(e+"_element_firstform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_phone(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_first_val,w_title,w_mini_labels,w_required,w_unique,w_class,w_attr_name,w_attr_value);break;case"type_phone_new":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_first_val=document.getElementById(e+"_elementform_id_temp").value,w_top_country=document.getElementById(e+"_elementform_id_temp").getAttribute("top-country"),atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_phone_new(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_first_val,w_top_country,w_required,w_unique,w_class,w_attr_name,w_attr_value);break;case"type_name":if(document.getElementById(e+"_enable_fieldsform_id_temp")){w_name_format="normal",w_first_val=[document.getElementById(e+"_element_firstform_id_temp").value,document.getElementById(e+"_element_lastform_id_temp").value],w_title=[document.getElementById(e+"_element_firstform_id_temp").title,document.getElementById(e+"_element_lastform_id_temp").title];for(var l=["title","middle"],d=0;d<2;d++)w_first_val.push(document.getElementById(e+"_element_"+l[d]+"form_id_temp")?document.getElementById(e+"_element_"+l[d]+"form_id_temp").value:""),w_title.push(document.getElementById(e+"_element_"+l[d]+"form_id_temp")?document.getElementById(e+"_element_"+l[d]+"form_id_temp").title:"")}else document.getElementById(e+"_element_middleform_id_temp")?w_name_format="extended":w_name_format="normal","normal"==w_name_format?(w_first_val=[document.getElementById(e+"_element_firstform_id_temp").value,document.getElementById(e+"_element_lastform_id_temp").value],w_title=[document.getElementById(e+"_element_firstform_id_temp").title,document.getElementById(e+"_element_lastform_id_temp").title]):(w_first_val=[document.getElementById(e+"_element_firstform_id_temp").value,document.getElementById(e+"_element_lastform_id_temp").value,document.getElementById(e+"_element_titleform_id_temp").value,document.getElementById(e+"_element_middleform_id_temp").value],w_title=[document.getElementById(e+"_element_firstform_id_temp").title,document.getElementById(e+"_element_lastform_id_temp").title,document.getElementById(e+"_element_titleform_id_temp").title,document.getElementById(e+"_element_middleform_id_temp").title]);document.getElementById(e+"_mini_label_title")?w_mini_title=document.getElementById(e+"_mini_label_title").innerHTML:w_mini_title="Title",document.getElementById(e+"_mini_label_middle")?w_mini_middle=document.getElementById(e+"_mini_label_middle").innerHTML:w_mini_middle="Middle",w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_mini_labels=[w_mini_title,document.getElementById(e+"_mini_label_first").innerHTML,document.getElementById(e+"_mini_label_last").innerHTML,w_mini_middle],w_name_title=document.getElementById(e+"_enable_fieldsform_id_temp")?document.getElementById(e+"_enable_fieldsform_id_temp").getAttribute("title"):"normal"==w_name_format?"no":"yes",w_name_middle=document.getElementById(e+"_enable_fieldsform_id_temp")?document.getElementById(e+"_enable_fieldsform_id_temp").getAttribute("middle"):"normal"==w_name_format?"no":"yes",w_name_fields=[w_name_title,w_name_middle],w_autofill=document.getElementById(e+"_autofillform_id_temp").value,s=document.getElementById(e+"_element_firstform_id_temp").style.width,w_size=s.substring(0,s.length-2),atrs=return_attributes(e+"_element_firstform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_name(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_first_val,w_title,w_mini_labels,w_size,w_name_format,w_required,w_unique,w_class,w_attr_name,w_attr_value,w_name_fields,w_autofill);break;case"type_paypal_price":w_first_val=[document.getElementById(e+"_element_dollarsform_id_temp").value,document.getElementById(e+"_element_centsform_id_temp").value],w_title=[document.getElementById(e+"_element_dollarsform_id_temp").title,document.getElementById(e+"_element_centsform_id_temp").title],"none"==document.getElementById(e+"_td_name_cents").style.display?w_hide_cents="yes":w_hide_cents="no",s=document.getElementById(e+"_element_dollarsform_id_temp").style.width,w_size=s.substring(0,s.length-2),atrs=return_attributes(e+"_element_dollarsform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_range_min=document.getElementById(e+"_range_minform_id_temp").value,w_range_max=document.getElementById(e+"_range_maxform_id_temp").value,w_mini_labels=[document.getElementById(e+"_mini_label_dollars").innerHTML,document.getElementById(e+"_mini_label_cents").innerHTML],type_paypal_price(gen,w_field_label,w_field_label_size,w_field_label_pos,w_first_val,w_title,w_mini_labels,w_size,w_required,w_hide_cents,w_class,w_attr_name,w_attr_value,w_range_min,w_range_max);break;case"type_paypal_price_new":w_first_val=document.getElementById(e+"_elementform_id_temp").value,w_title=document.getElementById(e+"_elementform_id_temp").title,s=document.getElementById(e+"_elementform_id_temp").style.width,w_size=s.substring(0,s.length-2),atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_range_min=document.getElementById(e+"_range_minform_id_temp").value,w_range_max=document.getElementById(e+"_range_maxform_id_temp").value,w_readonly=document.getElementById(e+"_readonlyform_id_temp").value,w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,"none"==document.getElementById(e+"_td_name_currency").style.display?w_currency="yes":w_currency="no",type_paypal_price_new(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_first_val,w_title,w_size,w_required,w_class,w_attr_name,w_attr_value,w_range_min,w_range_max,w_readonly,w_currency);break;case"type_address":s=document.getElementById(e+"_div_address").style.width,w_size=s.substring(0,s.length-2),document.getElementById(e+"_mini_label_street1")?w_street1=document.getElementById(e+"_mini_label_street1").innerHTML:w_street1=document.getElementById(e+"_street1form_id_temp").value,document.getElementById(e+"_mini_label_street2")?w_street2=document.getElementById(e+"_mini_label_street2").innerHTML:w_street2=document.getElementById(e+"_street2form_id_temp").value,document.getElementById(e+"_mini_label_city")?w_city=document.getElementById(e+"_mini_label_city").innerHTML:w_city=document.getElementById(e+"_cityform_id_temp").value,document.getElementById(e+"_mini_label_state")?w_state=document.getElementById(e+"_mini_label_state").innerHTML:w_state=document.getElementById(e+"_stateform_id_temp").value,document.getElementById(e+"_mini_label_postal")?w_postal=document.getElementById(e+"_mini_label_postal").innerHTML:w_postal=document.getElementById(e+"_postalform_id_temp").value,document.getElementById(e+"_mini_label_country")?w_country=document.getElementById(e+"_mini_label_country").innerHTML:w_country=document.getElementById(e+"_countryform_id_temp").value,w_mini_labels=[w_street1,w_street2,w_city,w_state,w_postal,w_country];var _=document.getElementById(e+"_disable_fieldsform_id_temp");w_street1_dis=_.getAttribute("street1"),w_street2_dis=_.getAttribute("street2"),w_city_dis=_.getAttribute("city"),w_state_dis=_.getAttribute("state"),w_us_states_dis=_.getAttribute("us_states"),w_postal_dis=_.getAttribute("postal"),w_country_dis=_.getAttribute("country"),w_disabled_fields=[w_street1_dis,w_street2_dis,w_city_dis,w_state_dis,w_postal_dis,w_country_dis,w_us_states_dis],w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_street1form_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_address(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_mini_labels,w_disabled_fields,w_required,w_class,w_attr_name,w_attr_value);break;case"type_submitter_mail":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_first_val=document.getElementById(e+"_elementform_id_temp").value,w_title=document.getElementById(e+"_elementform_id_temp").title,w_autofill=document.getElementById(e+"_autofillform_id_temp").value,w_verification=document.getElementById(e+"_verification_id_temp").value,w_verification_placeholder=document.getElementById(e+"_1_elementform_id_temp").title,document.getElementById(e+"_1_element_labelform_id_temp").innerHTML?w_verification_label=document.getElementById(e+"_1_element_labelform_id_temp").innerHTML:w_verification_label=" ",atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_submitter_mail(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_first_val,w_title,w_required,w_unique,w_class,w_verification,w_verification_label,w_verification_placeholder,w_attr_name,w_attr_value,w_autofill);break;case"type_checkbox":if(w_randomize=document.getElementById(e+"_randomizeform_id_temp").value,w_allow_other=document.getElementById(e+"_allow_otherform_id_temp").value,document.getElementById(e+"_rowcol_numform_id_temp").value?(document.getElementById(e+"_table_little").getAttribute("for_hor")?w_flow="hor":w_flow="ver",w_rowcol=document.getElementById(e+"_rowcol_numform_id_temp").value):(document.getElementById(e+"_hor")?w_flow="hor":w_flow="ver",w_rowcol=1),v=0,"ver"==w_flow){var r=document.getElementById(e+"_table_little");for(k=0;k<r.childNodes.length;k++){var o=r.childNodes[k];for(m=0;m<o.childNodes.length;m++){var u=o.childNodes[m].getAttribute("idi");document.getElementById(e+"_elementform_id_temp"+u).getAttribute("other")&&"1"==document.getElementById(e+"_elementform_id_temp"+u).getAttribute("other")&&(w_allow_other_num=t),w_choices[t]=document.getElementById(e+"_label_element"+u).innerHTML,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+u).checked,w_choices_value[t]=document.getElementById(e+"_elementform_id_temp"+u).value,document.getElementById(e+"_label_element"+u).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+u).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+u).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+u).getAttribute("db_info"):w_choices_params[t]="",t++,v=u}}}else{var c=(p=(r=document.getElementById(e+"_table_little")).childNodes)[0].childNodes;for(k=0;k<c.length;k++)for(m=0;m<p.length;m++)if(p[m].childNodes[k]){u=(o=p[m].childNodes[k]).getAttribute("idi");document.getElementById(e+"_elementform_id_temp"+u).getAttribute("other")&&"1"==document.getElementById(e+"_elementform_id_temp"+u).getAttribute("other")&&(w_allow_other_num=t),w_choices[t]=document.getElementById(e+"_label_element"+u).innerHTML,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+u).checked,w_choices_value[t]=document.getElementById(e+"_elementform_id_temp"+u).value,document.getElementById(e+"_label_element"+u).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+u).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+u).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+u).getAttribute("db_info"):w_choices_params[t]="",t++,v=u}}document.getElementById(e+"_option_left_right")?w_field_option_pos=document.getElementById(e+"_option_left_right").value:w_field_option_pos="left",w_value_disabled=document.getElementById(e+"_value_disabledform_id_temp").value,w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"+v),w_attr_name=atrs[0],w_attr_value=atrs[1],type_checkbox(gen,w_field_label,w_field_label_size,w_field_label_pos,w_field_option_pos,w_hide_label,w_flow,w_choices,w_choices_checked,w_rowcol,w_required,w_randomize,w_allow_other,w_allow_other_num,w_class,w_attr_name,w_attr_value,w_value_disabled,w_choices_value,w_choices_params);break;case"type_paypal_checkbox":for(document.getElementById(e+"_hor")?w_flow="hor":w_flow="ver",w_randomize=document.getElementById(e+"_randomizeform_id_temp").value,w_allow_other=document.getElementById(e+"_allow_otherform_id_temp").value,v=0,k=0;k<100;k++)if(document.getElementById(e+"_elementform_id_temp"+k)&&(document.getElementById(e+"_elementform_id_temp"+k).getAttribute("other")&&"1"==document.getElementById(e+"_elementform_id_temp"+k).getAttribute("other")&&(w_allow_other_num=t),w_choices[t]=document.getElementById(e+"_label_element"+k).innerHTML,w_choices_price[t]=document.getElementById(e+"_elementform_id_temp"+k).value,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+k).checked,document.getElementById(e+"_label_element"+k).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+k).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+k).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+k).getAttribute("db_info"):w_choices_params[t]="",t++,v=k),document.getElementById(e+"_propertyform_id_temp"+k))if(w_property.push(document.getElementById(e+"_property_label_form_id_temp"+k).innerHTML),document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length)for(w_property_values[w_property.length-1]=new Array,m=0;m<document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length;m++)w_property_values[w_property.length-1].push(document.getElementById(e+"_propertyform_id_temp"+k).childNodes[m].value);else w_property_values.push("");w_quantity="no",w_quantity_value=1,document.getElementById(e+"_element_quantityform_id_temp")&&(w_quantity="yes",w_quantity_value=document.getElementById(e+"_element_quantityform_id_temp").value),document.getElementById(e+"_option_left_right")?w_field_option_pos=document.getElementById(e+"_option_left_right").value:w_field_option_pos="left",w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"+v),w_attr_name=atrs[0],w_attr_value=atrs[1],type_paypal_checkbox(gen,w_field_label,w_field_label_size,w_field_label_pos,w_field_option_pos,w_hide_label,w_flow,w_choices,w_choices_price,w_choices_checked,w_required,w_randomize,w_allow_other,w_allow_other_num,w_class,w_attr_name,w_attr_value,w_property,w_property_values,w_quantity,w_quantity_value,w_choices_params);break;case"type_radio":if(w_randomize=document.getElementById(e+"_randomizeform_id_temp").value,w_allow_other=document.getElementById(e+"_allow_otherform_id_temp").value,document.getElementById(e+"_rowcol_numform_id_temp").value?(document.getElementById(e+"_table_little").getAttribute("for_hor")?w_flow="hor":w_flow="ver",w_rowcol=document.getElementById(e+"_rowcol_numform_id_temp").value):(document.getElementById(e+"_table_little").getAttribute("for_hor")?w_flow="hor":w_flow="ver",w_rowcol=1),v=0,"ver"==w_flow){r=document.getElementById(e+"_table_little");for(k=0;k<r.childNodes.length;k++){o=r.childNodes[k];for(m=0;m<o.childNodes.length;m++){u=o.childNodes[m].getAttribute("idi");document.getElementById(e+"_elementform_id_temp"+u).getAttribute("other")&&"1"==document.getElementById(e+"_elementform_id_temp"+u).getAttribute("other")&&(w_allow_other_num=t),w_choices[t]=document.getElementById(e+"_label_element"+u).innerHTML,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+u).checked,w_choices_value[t]=document.getElementById(e+"_elementform_id_temp"+u).value,document.getElementById(e+"_label_element"+u).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+u).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+u).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+u).getAttribute("db_info"):w_choices_params[t]="",t++,v=u}}}else{var p;c=(p=(r=document.getElementById(e+"_table_little")).childNodes)[0].childNodes;for(k=0;k<c.length;k++)for(m=0;m<p.length;m++)if(p[m].childNodes[k]){u=(o=p[m].childNodes[k]).getAttribute("idi");document.getElementById(e+"_elementform_id_temp"+u).getAttribute("other")&&"1"==document.getElementById(e+"_elementform_id_temp"+u).getAttribute("other")&&(w_allow_other_num=t),w_choices[t]=document.getElementById(e+"_label_element"+u).innerHTML,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+u).checked,w_choices_value[t]=document.getElementById(e+"_elementform_id_temp"+u).value,document.getElementById(e+"_label_element"+u).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+u).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+u).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+u).getAttribute("db_info"):w_choices_params[t]="",t++,v=u}}document.getElementById(e+"_option_left_right")?w_field_option_pos=document.getElementById(e+"_option_left_right").value:w_field_option_pos="left",w_value_disabled=document.getElementById(e+"_value_disabledform_id_temp").value,w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"+v),w_attr_name=atrs[0],w_attr_value=atrs[1],type_radio(gen,w_field_label,w_field_label_size,w_field_label_pos,w_field_option_pos,w_hide_label,w_flow,w_choices,w_choices_checked,w_rowcol,w_required,w_randomize,w_allow_other,w_allow_other_num,w_class,w_attr_name,w_attr_value,w_value_disabled,w_choices_value,w_choices_params);break;case"type_paypal_radio":for(document.getElementById(e+"_hor")?w_flow="hor":w_flow="ver",w_randomize=document.getElementById(e+"_randomizeform_id_temp").value,w_allow_other=document.getElementById(e+"_allow_otherform_id_temp").value,v=0,k=0;k<100;k++)if(document.getElementById(e+"_elementform_id_temp"+k)&&(document.getElementById(e+"_elementform_id_temp"+k).getAttribute("other")&&"1"==document.getElementById(e+"_elementform_id_temp"+k).getAttribute("other")&&(w_allow_other_num=t),w_choices[t]=document.getElementById(e+"_label_element"+k).innerHTML,w_choices_price[t]=document.getElementById(e+"_elementform_id_temp"+k).value,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+k).checked,document.getElementById(e+"_label_element"+k).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+k).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+k).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+k).getAttribute("db_info"):w_choices_params[t]="",t++,v=k),document.getElementById(e+"_propertyform_id_temp"+k))if(w_property.push(document.getElementById(e+"_property_label_form_id_temp"+k).innerHTML),document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length)for(w_property_values[w_property.length-1]=new Array,m=0;m<document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length;m++)w_property_values[w_property.length-1].push(document.getElementById(e+"_propertyform_id_temp"+k).childNodes[m].value);else w_property_values.push("");w_quantity="no",w_quantity_value=1,document.getElementById(e+"_element_quantityform_id_temp")&&(w_quantity="yes",w_quantity_value=document.getElementById(e+"_element_quantityform_id_temp").value),document.getElementById(e+"_option_left_right")?w_field_option_pos=document.getElementById(e+"_option_left_right").value:w_field_option_pos="left",w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"+v),w_attr_name=atrs[0],w_attr_value=atrs[1],type_paypal_radio(gen,w_field_label,w_field_label_size,w_field_label_pos,w_field_option_pos,w_hide_label,w_flow,w_choices,w_choices_price,w_choices_checked,w_required,w_randomize,w_allow_other,w_allow_other_num,w_class,w_attr_name,w_attr_value,w_property,w_property_values,w_quantity,w_quantity_value,w_choices_params);break;case"type_paypal_shipping":for(document.getElementById(e+"_hor")?w_flow="hor":w_flow="ver",w_randomize=document.getElementById(e+"_randomizeform_id_temp").value,w_allow_other=document.getElementById(e+"_allow_otherform_id_temp").value,v=0,k=0;k<100;k++)if(document.getElementById(e+"_elementform_id_temp"+k)&&(document.getElementById(e+"_elementform_id_temp"+k).getAttribute("other")&&"1"==document.getElementById(e+"_elementform_id_temp"+k).getAttribute("other")&&(w_allow_other_num=t),w_choices[t]=document.getElementById(e+"_label_element"+k).innerHTML,w_choices_price[t]=document.getElementById(e+"_elementform_id_temp"+k).value,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+k).checked,document.getElementById(e+"_label_element"+k).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+k).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+k).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+k).getAttribute("db_info"):w_choices_params[t]="",t++,v=k),document.getElementById(e+"_propertyform_id_temp"+k))if(w_property.push(document.getElementById(e+"_property_label_form_id_temp"+k).innerHTML),document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length)for(w_property_values[w_property.length-1]=new Array,m=0;m<document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length;m++)w_property_values[w_property.length-1].push(document.getElementById(e+"_propertyform_id_temp"+k).childNodes[m].value);else w_property_values.push("");document.getElementById(e+"_option_left_right")?w_field_option_pos=document.getElementById(e+"_option_left_right").value:w_field_option_pos="left",w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"+v),w_attr_name=atrs[0],w_attr_value=atrs[1],type_paypal_shipping(gen,w_field_label,w_field_label_size,w_field_label_pos,w_field_option_pos,w_hide_label,w_flow,w_choices,w_choices_price,w_choices_checked,w_required,w_randomize,w_allow_other,w_allow_other_num,w_class,w_attr_name,w_attr_value,w_property,w_property_values,w_choices_params);break;case"type_paypal_total":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_size=jQuery("#"+e+"paypal_totalform_id_temp").css("width")?jQuery("#"+e+"paypal_totalform_id_temp").css("width").substring(0,jQuery("#"+e+"paypal_totalform_id_temp").css("width").length-2):"300",type_paypal_total(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_class,w_size);break;case"type_stripe":type_stripe(gen,w_size,w_field_label_size,w_field_label_pos,w_class);break;case"type_star_rating":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_star_amount=document.getElementById(e+"_star_amountform_id_temp").value,w_field_label_col=document.getElementById(e+"_star_colorform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_star_rating(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_field_label_col,w_star_amount,w_required,w_class,w_attr_name,w_attr_value);break;case"type_scale_rating":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_mini_labels=[document.getElementById(e+"_mini_label_worst").innerHTML,document.getElementById(e+"_mini_label_best").innerHTML],w_scale_amount=document.getElementById(e+"_scale_amountform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_scale_rating(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_mini_labels,w_scale_amount,w_required,w_class,w_attr_name,w_attr_value);break;case"type_spinner":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_field_min_value=document.getElementById(e+"_min_valueform_id_temp").value,w_field_max_value=document.getElementById(e+"_max_valueform_id_temp").value,w_field_width=document.getElementById(e+"_spinner_widthform_id_temp").value,w_field_step=document.getElementById(e+"_stepform_id_temp").value,w_field_value=document.getElementById(e+"_elementform_id_temp").getAttribute("aria-valuenow"),atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_spinner(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_field_width,w_field_min_value,w_field_max_value,w_field_step,w_field_value,w_required,w_class,w_attr_name,w_attr_value);break;case"type_slider":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_field_min_value=document.getElementById(e+"_slider_min_valueform_id_temp").value,w_field_max_value=document.getElementById(e+"_slider_max_valueform_id_temp").value,w_field_step=document.getElementById(e+"_slider_stepform_id_temp")&&document.getElementById(e+"_slider_stepform_id_temp").value?document.getElementById(e+"_slider_stepform_id_temp").value:1,w_field_width=document.getElementById(e+"_slider_widthform_id_temp").value,w_field_value=document.getElementById(e+"_slider_valueform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_slider(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_field_width,w_field_min_value,w_field_max_value,w_field_step,w_field_value,w_required,w_class,w_attr_name,w_attr_value);break;case"type_range":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_field_range_width=document.getElementById(e+"_range_widthform_id_temp").value,w_field_range_step=document.getElementById(e+"_range_stepform_id_temp").value,w_field_value1=document.getElementById(e+"_elementform_id_temp0").getAttribute("aria-valuenow"),w_field_value2=document.getElementById(e+"_elementform_id_temp1").getAttribute("aria-valuenow"),atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_mini_labels=[document.getElementById(e+"_mini_label_from").innerHTML,document.getElementById(e+"_mini_label_to").innerHTML],type_range(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_field_range_width,w_field_range_step,w_field_value1,w_field_value2,w_mini_labels,w_required,w_class,w_attr_name,w_attr_value);break;case"type_grading":for(w_total=document.getElementById(e+"_grading_totalform_id_temp").value,w_items=[],k=0;k<100;k++)document.getElementById(e+"_label_elementform_id_temp"+k)&&w_items.push(document.getElementById(e+"_label_elementform_id_temp"+k).innerHTML);w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_grading(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_items,w_total,w_required,w_class,w_attr_name,w_attr_value),refresh_grading_items(e);break;case"type_matrix":for(w_rows=[],w_rows[0]="",k=1;k<100;k++)document.getElementById(e+"_label_elementform_id_temp"+k+"_0")&&w_rows.push(document.getElementById(e+"_label_elementform_id_temp"+k+"_0").innerHTML);for(w_columns=[],w_columns[0]="",k=1;k<100;k++)document.getElementById(e+"_label_elementform_id_temp0_"+k)&&w_columns.push(document.getElementById(e+"_label_elementform_id_temp0_"+k).innerHTML);w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_field_input_type=document.getElementById(e+"_input_typeform_id_temp").value,w_textbox_size=document.getElementById(e+"_textbox_sizeform_id_temp")?document.getElementById(e+"_textbox_sizeform_id_temp").value:"100",atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_matrix(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_field_input_type,w_rows,w_columns,w_required,w_class,w_attr_name,w_attr_value,w_textbox_size),refresh_matrix(e);break;case"type_time":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_hhform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_hh=document.getElementById(e+"_hhform_id_temp").value,w_mm=document.getElementById(e+"_mmform_id_temp").value,document.getElementById(e+"_ssform_id_temp")?(w_ss=document.getElementById(e+"_ssform_id_temp").value,w_sec="1",w_mini_label_ss=document.getElementById(e+"_mini_label_ss").innerHTML):(w_ss="",w_sec="0",w_mini_label_ss=""),document.getElementById(e+"_am_pm_select")?(w_am_pm=document.getElementById(e+"_am_pmform_id_temp").value,w_time_type="12",w_mini_labels=[document.getElementById(e+"_mini_label_hh").innerHTML,document.getElementById(e+"_mini_label_mm").innerHTML,w_mini_label_ss,document.getElementById(e+"_mini_label_am_pm").innerHTML]):(w_am_pm=0,w_time_type="24",w_mini_labels=[document.getElementById(e+"_mini_label_hh").innerHTML,document.getElementById(e+"_mini_label_mm").innerHTML,w_mini_label_ss,"AM/PM"]),type_time(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_time_type,w_am_pm,w_sec,w_hh,w_mm,w_ss,w_mini_labels,w_required,w_class,w_attr_name,w_attr_value);break;case"type_date":atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_date=document.getElementById(e+"_elementform_id_temp").value,w_format=document.getElementById(e+"_buttonform_id_temp").getAttribute("format"),w_but_val=document.getElementById(e+"_buttonform_id_temp").value,w_disable_past_days=document.getElementById(e+"_dis_past_daysform_id_temp")?document.getElementById(e+"_dis_past_daysform_id_temp").value:"no",type_date(gen,w_field_label,w_field_label_size,w_field_label_pos,w_date,w_required,w_class,w_format,w_but_val,w_attr_name,w_attr_value,w_disable_past_days);break;case"type_date_new":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_date=document.getElementById(e+"_elementform_id_temp").value,w_format=document.getElementById(e+"_buttonform_id_temp").getAttribute("format"),w_but_val=document.getElementById(e+"_buttonform_id_temp").value,w_start_day=document.getElementById(e+"_start_dayform_id_temp").value,w_default_date=document.getElementById(e+"_default_date_id_temp").value,w_min_date=document.getElementById(e+"_min_date_id_temp").value,w_max_date=document.getElementById(e+"_max_date_id_temp").value,w_invalid_dates=document.getElementById(e+"_invalid_dates_id_temp").value,w_hide_time=document.getElementById(e+"_hide_timeform_id_temp").value,w_show_image=document.getElementById(e+"_show_imageform_id_temp").value,w_disable_past_days=document.getElementById(e+"_dis_past_daysform_id_temp")?document.getElementById(e+"_dis_past_daysform_id_temp").value:"no";var f=document.getElementById(e+"_show_week_days");w_sunday=f.getAttribute("sunday"),w_monday=f.getAttribute("monday"),w_tuesday=f.getAttribute("tuesday"),w_wednesday=f.getAttribute("wednesday"),w_thursday=f.getAttribute("thursday"),w_friday=f.getAttribute("friday"),w_saturday=f.getAttribute("saturday"),w_show_days=[w_sunday,w_monday,w_tuesday,w_wednesday,w_thursday,w_friday,w_saturday],type_date_new(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_date,w_required,w_show_image,w_class,w_format,w_start_day,w_default_date,w_min_date,w_max_date,w_invalid_dates,w_show_days,w_hide_time,w_but_val,w_attr_name,w_attr_value,w_disable_past_days);break;case"type_date_range":atrs=return_attributes(e+"_elementform_id_temp0"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_date="",w_format=document.getElementById(e+"_buttonform_id_temp").getAttribute("format"),w_but_val=document.getElementById(e+"_buttonform_id_temp").value,w_default_date_start=document.getElementById(e+"_default_date_id_temp_start").value,w_default_date_end=document.getElementById(e+"_default_date_id_temp_end").value,w_min_date=document.getElementById(e+"_min_date_id_temp").value,w_start_day=document.getElementById(e+"_start_dayform_id_temp").value,w_max_date=document.getElementById(e+"_max_date_id_temp").value,w_invalid_dates=document.getElementById(e+"_invalid_dates_id_temp").value,w_hide_time=document.getElementById(e+"_hide_timeform_id_temp").value,w_show_image=document.getElementById(e+"_show_imageform_id_temp").value,w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,s=document.getElementById(e+"_elementform_id_temp0").style.width,w_size=s.substring(0,s.length-2),w_disable_past_days=document.getElementById(e+"_dis_past_daysform_id_temp")?document.getElementById(e+"_dis_past_daysform_id_temp").value:"no";f=document.getElementById(e+"_show_week_days");w_sunday=f.getAttribute("sunday"),w_monday=f.getAttribute("monday"),w_tuesday=f.getAttribute("tuesday"),w_wednesday=f.getAttribute("wednesday"),w_thursday=f.getAttribute("thursday"),w_friday=f.getAttribute("friday"),w_saturday=f.getAttribute("saturday"),w_show_days=[w_sunday,w_monday,w_tuesday,w_wednesday,w_thursday,w_friday,w_saturday],type_date_range(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_date,w_required,w_show_image,w_class,w_format,w_start_day,w_default_date_start,w_default_date_end,w_min_date,w_max_date,w_invalid_dates,w_show_days,w_hide_time,w_but_val,w_attr_name,w_attr_value,w_disable_past_days);break;case"type_date_fields":atrs=return_attributes(e+"_dayform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_day=document.getElementById(e+"_dayform_id_temp").value,w_month=document.getElementById(e+"_monthform_id_temp").value,w_year=document.getElementById(e+"_yearform_id_temp").value,w_day_type=document.getElementById(e+"_dayform_id_temp").tagName,w_month_type=document.getElementById(e+"_monthform_id_temp").tagName,w_year_type=document.getElementById(e+"_yearform_id_temp").tagName,w_day_label=document.getElementById(e+"_day_label").innerHTML,w_month_label=document.getElementById(e+"_month_label").innerHTML,w_year_label=document.getElementById(e+"_year_label").innerHTML,s=document.getElementById(e+"_dayform_id_temp").style.width,w_day_size=s.substring(0,s.length-2),s=document.getElementById(e+"_monthform_id_temp").style.width,w_month_size=s.substring(0,s.length-2),s=document.getElementById(e+"_yearform_id_temp").style.width,w_year_size=s.substring(0,s.length-2),w_from=document.getElementById(e+"_yearform_id_temp").getAttribute("from"),w_to=document.getElementById(e+"_yearform_id_temp").getAttribute("to"),w_divider=document.getElementById(e+"_separator1").innerHTML,w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,type_date_fields(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_day,w_month,w_year,w_day_type,w_month_type,w_year_type,w_day_label,w_month_label,w_year_label,w_day_size,w_month_size,w_year_size,w_required,w_class,w_from,w_to,w_divider,w_attr_name,w_attr_value);break;case"type_own_select":jQuery("#"+e+"_elementform_id_temp option").each(function(){w_choices[t]=jQuery(this).html(),w_choices_value[t]=jQuery(this).val(),w_choices_checked[t]=jQuery(this)[0].selected,jQuery(this).attr("where")?w_choices_params[t]=jQuery(this).attr("where")+"[where_order_by]"+jQuery(this).attr("order_by")+"[db_info]"+jQuery(this).attr("db_info"):w_choices_params[t]="",jQuery(this).val()?w_choices_disabled[t]=!1:w_choices_disabled[t]=!0,t++}),w_value_disabled=document.getElementById(e+"_value_disabledform_id_temp").value,w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_own_select(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_choices,w_choices_checked,w_required,w_value_disabled,w_class,w_attr_name,w_attr_value,w_choices_disabled,w_choices_value,w_choices_params);break;case"type_paypal_select":for(jQuery("#"+e+"_elementform_id_temp option").each(function(){w_choices[t]=jQuery(this).html(),w_choices_price[t]=jQuery(this).val(),w_choices_checked[t]=jQuery(this)[0].selected,jQuery(this).attr("where")?w_choices_params[t]=jQuery(this).attr("where")+"[where_order_by]"+jQuery(this).attr("order_by")+"[db_info]"+jQuery(this).attr("db_info"):w_choices_params[t]="",""==jQuery(this)[0].value?w_choices_disabled[t]=!0:w_choices_disabled[t]=!1,t++}),k=0;k<100;k++)if(document.getElementById(e+"_propertyform_id_temp"+k))if(w_property.push(document.getElementById(e+"_property_label_form_id_temp"+k).innerHTML),document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length)for(w_property_values[w_property.length-1]=new Array,m=0;m<document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length;m++)w_property_values[w_property.length-1].push(document.getElementById(e+"_propertyform_id_temp"+k).childNodes[m].value);else w_property_values.push("");w_quantity="no",w_quantity_value=1,document.getElementById(e+"_element_quantityform_id_temp")&&(w_quantity="yes",w_quantity_value=document.getElementById(e+"_element_quantityform_id_temp").value),w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_paypal_select(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_choices,w_choices_price,w_choices_checked,w_required,w_quantity,w_quantity_value,w_class,w_attr_name,w_attr_value,w_choices_disabled,w_property,w_property_values,w_choices_params);break;case"type_country":for(w_countries=[],select_=document.getElementById(e+"_elementform_id_temp"),n=select_.childNodes.length,i=0;i<n;i++)w_countries.push(select_.childNodes[i].value);w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_country(gen,w_field_label,w_field_label_size,w_hide_label,w_countries,w_field_label_pos,w_size,w_required,w_class,w_attr_name,w_attr_value);break;case"type_file_upload":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_destination=document.getElementById(e+"_destination").value.replace("***destinationverj"+e+"***","").replace("***destinationskizb"+e+"***",""),w_extension=document.getElementById(e+"_extension").value.replace("***extensionverj"+e+"***","").replace("***extensionskizb"+e+"***",""),w_max_size=document.getElementById(e+"_max_size").value.replace("***max_sizeverj"+e+"***","").replace("***max_sizeskizb"+e+"***",""),w_multiple=document.getElementById(e+"_elementform_id_temp").getAttribute("multiple")?"yes":"no",atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_file_upload(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_destination,w_extension,w_max_size,w_required,w_multiple,w_class,w_attr_name,w_attr_value);break;case"type_map":for(w_lat=[],w_long=[],w_info=[],w_center_x=document.getElementById(e+"_elementform_id_temp").getAttribute("center_x"),w_center_y=document.getElementById(e+"_elementform_id_temp").getAttribute("center_y"),w_zoom=document.getElementById(e+"_elementform_id_temp").getAttribute("zoom"),w_width=parseInt(document.getElementById(e+"_elementform_id_temp").style.width),w_height=parseInt(document.getElementById(e+"_elementform_id_temp").style.height),j=0;j<=20;j++)document.getElementById(e+"_elementform_id_temp").getAttribute("lat"+j)&&(w_lat.push(document.getElementById(e+"_elementform_id_temp").getAttribute("lat"+j)),w_long.push(document.getElementById(e+"_elementform_id_temp").getAttribute("long"+j)),w_info.push(document.getElementById(e+"_elementform_id_temp").getAttribute("info"+j)));atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_map(gen,w_center_x,w_center_y,w_long,w_lat,w_zoom,w_width,w_height,w_class,w_info,w_attr_name,w_attr_value);break;case"type_mark_map":w_info=document.getElementById(e+"_elementform_id_temp").getAttribute("info0"),w_long=document.getElementById(e+"_elementform_id_temp").getAttribute("long0"),w_lat=document.getElementById(e+"_elementform_id_temp").getAttribute("lat0"),w_zoom=document.getElementById(e+"_elementform_id_temp").getAttribute("zoom"),w_width=parseInt(document.getElementById(e+"_elementform_id_temp").style.width),w_height=parseInt(document.getElementById(e+"_elementform_id_temp").style.height),w_center_x=document.getElementById(e+"_elementform_id_temp").getAttribute("center_x"),w_center_y=document.getElementById(e+"_elementform_id_temp").getAttribute("center_y"),w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_mark_map(gen,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_center_x,w_center_y,w_long,w_lat,w_zoom,w_width,w_height,w_class,w_info,w_attr_name,w_attr_value);break;case"type_submit_reset":atrs=return_attributes(e+"_element_submitform_id_temp"),w_act=!("none"==document.getElementById(e+"_element_resetform_id_temp").style.display),w_attr_name=atrs[0],w_attr_value=atrs[1],w_submit_title=document.getElementById(e+"_element_submitform_id_temp").value,w_reset_title=document.getElementById(e+"_element_resetform_id_temp").value,type_submit_reset(gen,w_submit_title,w_reset_title,w_class,w_act,w_attr_name,w_attr_value);break;case"type_button":for(w_title=new Array,w_func=new Array,t=0,v=0,k=0;k<100;k++)document.getElementById(e+"_elementform_id_temp"+k)&&(w_title[t]=document.getElementById(e+"_elementform_id_temp"+k).value,w_func[t]=document.getElementById(e+"_elementform_id_temp"+k).getAttribute("onclick"),t++,v=k);atrs=return_attributes(e+"_elementform_id_temp"+v),w_attr_name=atrs[0],w_attr_value=atrs[1],type_button(gen,w_title,w_func,w_class,w_attr_name,w_attr_value);break;case"type_hidden":w_value=document.getElementById(e+"_elementform_id_temp").value,w_name=document.getElementById(e+"_elementform_id_temp").name,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_hidden(gen,w_name,w_value,w_attr_name,w_attr_value)}add(0,need_enable=!1),need_enable=!0,void 0!==a&&(a.stopPropagation(),a.preventDefault())}function fm_columns_refresh(){jQuery(".wdform_column:not(#add_field_cont):empty").remove(),jQuery(".fm-form-builder .wdform_column:not(#add_field_cont)").before(jQuery('<div class="wdform_column fm-hidden"></div>')),jQuery(".fm-form-builder .wdform_column:not(#add_field_cont):last-child").after(jQuery('<div class="wdform_column fm-hidden"></div>')),jQuery(".fm-form-builder .wdform_section").each(function(){var e=jQuery(this);0==e.find(".wdform_column").length&&e.append('<div class="wdform_column"></div>')}),sortable_columns()}function fm_rows_refresh(){jQuery(".wdform_page").each(function(){jQuery(this).children(".wdform_row_empty").remove(),0===jQuery(this).find(".wdform_row_empty").length&&jQuery(this).find(".wdform_footer").before(jQuery('<div class="wdform_row_empty"><div><span class="add_row_icon fm-ico-plus-circle"></span><span class="add_row_button">'+form_maker_manage.add_column+"</span></div></div>"))}),jQuery(".wdform_row_empty > div").off("click").on("click",function(){var e=jQuery('<div><div class="wdform_column"></div></div>').addClass("wdform_section");jQuery(this).closest(".wdform_row_empty").before(e),fm_row_handle(e),all_sortable_events()}),sortable_columns()}function fm_convert_form_structure(){jQuery(".wdform-page-and-images").each(function(){var e=jQuery(this);e.addClass("fm-form-builder");e.find(".wdform_section").length;e.find(".wdform_section").each(function(){var t=jQuery(this),a=t.find(".wdform_column").length;t.find(".wdform_column").each(function(){var e=jQuery(this),i=jQuery('<div class="wdform_section '+("fm-col-"+a)+'"></div>');e.find(".wdform_row").each(function(){var e=jQuery(this),t=jQuery('<div class="wdform_column"></div>').append(e);i.append(t)}),t.before(i),fm_row_handle(i)}),t.remove()})}),jQuery(".wdform_tr_section_break").remove(),all_sortable_events(),jQuery("#fm-edit-disable-overlay").remove()}function FormManageSubmitButton(e){for(null==e&&(e=!1,jQuery(window).off("beforeunload")),tox="",form_fields="",jQuery("#saving").html('<div class="fm-loading-container"><div class="fm-loading-content"></div></div>'),e||(document.getElementById("take").style.display="none",document.getElementById("page_bar").style.display="none",jQuery(".wdform_section").each(function(){var e=this;jQuery(e).find(".wdform_column").each(function(){!jQuery(this).html()&&1<jQuery(e).children().length&&jQuery(this).remove(),jQuery(this).find(".wdform_section_handle").remove()}),jQuery(this).find(".wdform_row_handle").remove(),jQuery(this).find(".wdform_column_empty").remove()}),jQuery(".wdform_row_empty").remove(),jQuery(".wdform_column:empty").remove(),jQuery(".fm-section-overlay").remove()),remove_whitespace(document.getElementById("take")),l_id_array=labels_id_array,l_label_array=labels_label_array,l_type_array=labels_type_array,l_id_removed=[],x=0;x<l_id_array.length;x++)l_id_removed[l_id_array[x]]=!0;for(t=1;t<=form_view_max;t++)if(document.getElementById("form_id_tempform_view"+t))for(wdform_page=document.getElementById("form_id_tempform_view"+t),remove_whitespace(wdform_page),n=wdform_page.childNodes.length-1,q=0;q<=n;q++)if(wdform_page.childNodes[q].getAttribute("wdid"))id=wdform_page.childNodes[q].getAttribute("wdid"),w_editor=document.getElementById(id+"_element_sectionform_id_temp").innerHTML,form_fields+=id+"*:*id*:*",form_fields+="type_section_break*:*type*:*",form_fields+="custom_"+id+"*:*w_field_label*:*",form_fields+=w_editor+"*:*w_editor*:*",form_fields+="*:*new_field*:*",e||(wdform_page.childNodes[q].innerHTML="%"+id+" - custom_"+id+"%");else if(-1==wdform_page.className.indexOf("fm-form-builder")||-1!=wdform_page.childNodes[q].className.indexOf("wdform_section"))for(wdform_section=wdform_page.childNodes[q],x=0;x<wdform_section.childNodes.length;x++)if(wdform_column=wdform_section.childNodes[x],wdform_column.firstChild)for(y=0;y<wdform_column.childNodes.length;y++)if(is_in_old=!1,wdform_row=wdform_column.childNodes[y],3!=wdform_row.nodeType&&(wdid=wdform_row.getAttribute("wdid"),wdid&&jQuery("#"+wdid+"_element_labelform_id_temp").length)){l_id=wdid,l_label=document.getElementById(wdid+"_element_labelform_id_temp").innerHTML,l_label=l_label.replace(/(\r\n|\n|\r)/gm," "),wdtype=wdform_row.firstChild.getAttribute("type");for(var i=0;i<l_id_array.length;i++)"type_address"==l_type_array[i]?(document.getElementById(l_id+"_mini_label_street1")||document.getElementById(l_id+"_mini_label_street2")||document.getElementById(l_id+"_mini_label_city")||document.getElementById(l_id+"_mini_label_state")||document.getElementById(l_id+"_mini_label_postal")||document.getElementById(l_id+"_mini_label_country"))&&(l_id_removed[l_id_array[i]]=!1):l_id_array[i]==wdid&&(l_id_removed[l_id]=!1);"type_address"==wdtype?(addr_id=parseInt(wdid),id_for_country=addr_id,document.getElementById(id_for_country+"_mini_label_street1")&&(tox=tox+addr_id+"#**id**#"+document.getElementById(id_for_country+"_mini_label_street1").innerHTML+"#**label**#type_address#****#"),addr_id++,document.getElementById(id_for_country+"_mini_label_street2")&&(tox=tox+addr_id+"#**id**#"+document.getElementById(id_for_country+"_mini_label_street2").innerHTML+"#**label**#type_address#****#"),addr_id++,document.getElementById(id_for_country+"_mini_label_city")&&(tox=tox+addr_id+"#**id**#"+document.getElementById(id_for_country+"_mini_label_city").innerHTML+"#**label**#type_address#****#"),addr_id++,document.getElementById(id_for_country+"_mini_label_state")&&(tox=tox+addr_id+"#**id**#"+document.getElementById(id_for_country+"_mini_label_state").innerHTML+"#**label**#type_address#****#"),addr_id++,document.getElementById(id_for_country+"_mini_label_postal")&&(tox=tox+addr_id+"#**id**#"+document.getElementById(id_for_country+"_mini_label_postal").innerHTML+"#**label**#type_address#****#"),addr_id++,document.getElementById(id_for_country+"_mini_label_country")&&(tox=tox+addr_id+"#**id**#"+document.getElementById(id_for_country+"_mini_label_country").innerHTML+"#**label**#type_address#****#")):tox=tox+wdid+"#**id**#"+l_label+"#**label**#"+wdtype+"#****#",id=wdid,form_fields+=wdid+"*:*id*:*",form_fields+=wdtype+"*:*type*:*",w_choices=new Array,w_choices_value=new Array,w_choices_checked=new Array,w_choices_disabled=new Array,w_choices_params=new Array,w_allow_other_num=0,w_property=new Array,w_property_type=new Array,w_property_values=new Array,w_choices_price=new Array,document.getElementById(id+"_element_labelform_id_temp").innerHTML?w_field_label=document.getElementById(id+"_element_labelform_id_temp").innerHTML.replace(/(\r\n|\n|\r)/gm," "):w_field_label=" ",document.getElementById(id+"_label_sectionform_id_temp")&&("block"==document.getElementById(id+"_label_sectionform_id_temp").style.display?w_field_label_pos="top":w_field_label_pos="left"),document.getElementById(id+"_elementform_id_temp")&&(s=document.getElementById(id+"_elementform_id_temp").style.width,w_size=s.substring(0,s.length-2)),document.getElementById(id+"_label_sectionform_id_temp")&&(s=document.getElementById(id+"_label_sectionform_id_temp").style.width,w_field_label_size=s.substring(0,s.length-2)),document.getElementById(id+"_requiredform_id_temp")&&(w_required=document.getElementById(id+"_requiredform_id_temp").value),document.getElementById(id+"_uniqueform_id_temp")&&(w_unique=document.getElementById(id+"_uniqueform_id_temp").value),document.getElementById(id+"_label_sectionform_id_temp")&&(w_class=document.getElementById(id+"_label_sectionform_id_temp").getAttribute("class"),w_class||(w_class="")),gen_form_fields(),e||(wdform_row.innerHTML="%"+id+" - "+l_label+"%")}for(e||(document.getElementById("label_order_current").value=tox),x=0;x<l_id_array.length;x++)l_id_removed[l_id_array[x]]&&(tox=tox+l_id_array[x]+"#**id**#"+l_label_array[x]+"#**label**#"+l_type_array[x]+"#****#");if(e||(document.getElementById("label_order").value=tox,document.getElementById("form_fields").value=form_fields,refresh_(),document.getElementById("pagination").value=document.getElementById("pages").getAttribute("type"),document.getElementById("show_title").value=document.getElementById("pages").getAttribute("show_title"),document.getElementById("show_numbers").value=document.getElementById("pages").getAttribute("show_numbers")),form_changed=!1,e){form_fields!=form_fields_initial&&(form_changed=!0),jQuery(".fm-check-change").each(function(){jQuery(this).val()!=jQuery(this).attr("data-initial-value")&&(form_changed=!0)}),"undefined"!=typeof tinyMCE&&null!=tinyMCE.get("header_description")&&tinyMCE.get("header_description").isDirty()&&(form_changed=!0);var a=decodeURIComponent(jQuery("#header_description_initial_value").val()),l=jQuery("#header_description").val();jQuery("<span>"+a+"</span>").html()!=jQuery("<span>"+l+"</span>").html()&&(form_changed=!0),jQuery("#header_hide_image").prop("checked")!=(1==jQuery("#header_hide_image").attr("data-initial-value"))&&(form_changed=!0)}return!e||!form_changed}function formOnload(rows){for(t=0;t<rows;t++)if(document.getElementById(t+"_typeform_id_temp"))if("type_map"==document.getElementById(t+"_typeform_id_temp").value||"type_mark_map"==document.getElementById(t+"_typeform_id_temp").value)for(if_gmap_init(t),q=0;q<20;q++)document.getElementById(t+"_elementform_id_temp").getAttribute("long"+q)&&(w_long=parseFloat(document.getElementById(t+"_elementform_id_temp").getAttribute("long"+q)),w_lat=parseFloat(document.getElementById(t+"_elementform_id_temp").getAttribute("lat"+q)),w_info=parseFloat(document.getElementById(t+"_elementform_id_temp").getAttribute("info"+q)),add_marker_on_map(t,q,w_long,w_lat,w_info,!1));else if("type_name"==document.getElementById(t+"_typeform_id_temp").value){var myu=t;jQuery(document).ready(function(){jQuery("#"+myu+"_mini_label_first").on("click",function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='first' class='first' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.first").focus(),jQuery("input.first").blur(function(){var e=document.getElementById("first").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_first").text(t)})}}),jQuery("label#"+myu+"_mini_label_last").on("click",function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='last' class='last' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.last").focus(),jQuery("input.last").blur(function(){var e=document.getElementById("last").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_last").text(t)})}}),jQuery("label#"+myu+"_mini_label_title").on("click",function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='title_' class='title_' style='outline:none; border:none; background:none; width:50px;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.title_").focus(),jQuery("input.title_").blur(function(){var e=document.getElementById("title_").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_title").text(t)})}}),jQuery("label#"+myu+"_mini_label_middle").on("click",function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='middle' class='middle' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.middle").focus(),jQuery("input.middle").blur(function(){var e=document.getElementById("middle").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_middle").text(t)})}})})}else if("type_phone"==document.getElementById(t+"_typeform_id_temp").value){var myu=t;jQuery(document).ready(function(){jQuery("label#"+myu+"_mini_label_area_code").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='area_code' class='area_code' size='10' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.area_code").focus(),jQuery("input.area_code").blur(function(){var e=document.getElementById("area_code").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_area_code").text(t)})}}),jQuery("label#"+myu+"_mini_label_phone_number").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='phone_number' class='phone_number' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.phone_number").focus(),jQuery("input.phone_number").blur(function(){var e=document.getElementById("phone_number").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_phone_number").text(t)})}})})}else if("type_date_fields"==document.getElementById(t+"_typeform_id_temp").value){var myu=t;jQuery(document).ready(function(){jQuery("label#"+myu+"_day_label").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='day' class='day' size='8' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.day").focus(),jQuery("input.day").blur(function(){var e=document.getElementById("day").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_day_label").text(t)})}}),jQuery("label#"+myu+"_month_label").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='month' class='month' size='8' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.month").focus(),jQuery("input.month").blur(function(){var e=document.getElementById("month").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_month_label").text(t)})}}),jQuery("label#"+myu+"_year_label").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='year' class='year' size='8' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.year").focus(),jQuery("input.year").blur(function(){var e=document.getElementById("year").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_year_label").text(t)})}})})}else if("type_time"==document.getElementById(t+"_typeform_id_temp").value){var myu=t;jQuery(document).ready(function(){jQuery("label#"+myu+"_mini_label_hh").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='hh' class='hh' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.hh").focus(),jQuery("input.hh").blur(function(){var e=document.getElementById("hh").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_hh").text(t)})}}),jQuery("label#"+myu+"_mini_label_mm").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='mm' class='mm' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.mm").focus(),jQuery("input.mm").blur(function(){var e=document.getElementById("mm").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_mm").text(t)})}}),jQuery("label#"+myu+"_mini_label_ss").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='ss' class='ss' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.ss").focus(),jQuery("input.ss").blur(function(){var e=document.getElementById("ss").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_ss").text(t)})}}),jQuery("label#"+myu+"_mini_label_am_pm").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='am_pm' class='am_pm' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.am_pm").focus(),jQuery("input.am_pm").blur(function(){var e=document.getElementById("am_pm").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_am_pm").text(t)})}})})}else if("type_paypal_price"==document.getElementById(t+"_typeform_id_temp").value){var myu=t;jQuery(document).ready(function(){jQuery("#"+myu+"_mini_label_dollars").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='dollars' class='dollars' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.dollars").focus(),jQuery("input.dollars").blur(function(){var e=document.getElementById("dollars").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_dollars").text(t)})}}),jQuery("label#"+myu+"_mini_label_cents").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='cents' class='cents' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.cents").focus(),jQuery("input.cents").blur(function(){var e=document.getElementById("cents").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_cents").text(t)})}})})}else if("type_address"==document.getElementById(t+"_typeform_id_temp").value){var myu=t;jQuery(document).ready(function(){jQuery("label#"+myu+"_mini_label_street1").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='street1' class='street1' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.street1").focus(),jQuery("input.street1").blur(function(){var e=document.getElementById("street1").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_street1").text(t)})}}),jQuery("label#"+myu+"_mini_label_street2").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='street2' class='street2' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.street2").focus(),jQuery("input.street2").blur(function(){var e=document.getElementById("street2").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_street2").text(t)})}}),jQuery("label#"+myu+"_mini_label_city").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='city' class='city' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.city").focus(),jQuery("input.city").blur(function(){var e=document.getElementById("city").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_city").text(t)})}}),jQuery("label#"+myu+"_mini_label_state").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='state' class='state' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.state").focus(),jQuery("input.state").blur(function(){var e=document.getElementById("state").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_state").text(t)})}}),jQuery("label#"+myu+"_mini_label_postal").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='postal' class='postal' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.postal").focus(),jQuery("input.postal").blur(function(){var e=document.getElementById("postal").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_postal").text(t)})}}),jQuery("label#"+myu+"_mini_label_country").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='country' id='country' class='country' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.country").focus(),jQuery("input.country").blur(function(){var e=document.getElementById("country").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_country").text(t)})}})})}else if("type_scale_rating"==document.getElementById(t+"_typeform_id_temp").value){var myu=t;jQuery(document).ready(function(){jQuery("#"+myu+"_mini_label_worst").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='worst' class='worst' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.worst").focus(),jQuery("input.worst").blur(function(){var e=document.getElementById("worst").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_worst").text(t)})}}),jQuery("label#"+myu+"_mini_label_best").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='best' class='best' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.best").focus(),jQuery("input.best").blur(function(){var e=document.getElementById("best").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_best").text(t)})}})})}else if("type_spinner"==document.getElementById(t+"_typeform_id_temp").value){var spinner_value=document.getElementById(t+"_elementform_id_temp").value,spinner_min_value=document.getElementById(t+"_min_valueform_id_temp").value,spinner_max_value=document.getElementById(t+"_max_valueform_id_temp").value,spinner_step=document.getElementById(t+"_stepform_id_temp").value;jQuery("#"+t+"_elementform_id_temp")[0].spin=null,spinner=jQuery("#"+t+"_elementform_id_temp").spinner(),null==spinner_value&&spinner.spinner("value",""),jQuery("#"+t+"_elementform_id_temp").spinner({min:spinner_min_value}),jQuery("#"+t+"_elementform_id_temp").spinner({max:spinner_max_value}),jQuery("#"+t+"_elementform_id_temp").spinner({step:spinner_step})}else if("type_slider"==document.getElementById(t+"_typeform_id_temp").value){var slider_value=document.getElementById(t+"_slider_valueform_id_temp").value,slider_min_value=document.getElementById(t+"_slider_min_valueform_id_temp").value,slider_max_value=document.getElementById(t+"_slider_max_valueform_id_temp").value,slider_element_value=document.getElementById(t+"_element_valueform_id_temp"),slider_value_save=document.getElementById(t+"_slider_valueform_id_temp");jQuery("#"+t+"_elementform_id_temp")[0].slide=null,jQuery(function(){jQuery("#"+t+"_elementform_id_temp").slider({range:"min",value:eval(slider_value),min:eval(slider_min_value),max:eval(slider_max_value),slide:function(e,t){slider_element_value.innerHTML=""+t.value,slider_value_save.value=""+t.value}})})}else if("type_range"==document.getElementById(t+"_typeform_id_temp").value){var spinner_value0=document.getElementById(t+"_elementform_id_temp0").value,spinner_step=document.getElementById(t+"_range_stepform_id_temp").value;jQuery("#"+t+"_elementform_id_temp0")[0].spin=null,jQuery("#"+t+"_elementform_id_temp1")[0].spin=null,spinner0=jQuery("#"+t+"_elementform_id_temp0").spinner(),null==spinner_value0&&spinner0.spinner("value",""),jQuery("#"+t+"_elementform_id_temp0").spinner({step:spinner_step});var spinner_value1=document.getElementById(t+"_elementform_id_temp1").value;spinner1=jQuery("#"+t+"_elementform_id_temp1").spinner(),null==spinner_value1&&spinner1.spinner("value",""),jQuery("#"+t+"_elementform_id_temp1").spinner({step:spinner_step});var myu=t;jQuery(document).ready(function(){jQuery("#"+myu+"_mini_label_from").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='from' class='from' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.from").focus(),jQuery("input.from").blur(function(){var e=document.getElementById("from").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_from").text(t)})}}),jQuery("label#"+myu+"_mini_label_to").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' id='to' class='to' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.to").focus(),jQuery("input.to").blur(function(){var e=document.getElementById("to").parentNode.id.split("_"),t=jQuery(this).val();jQuery("#"+e[0]+"_mini_label_to").text(t)})}})})}else if("type_date_range"==document.getElementById(t+"_typeform_id_temp").value){var default_date_start=jQuery("#"+t+"_default_date_id_temp_start").val(),default_date_end=jQuery("#"+t+"_default_date_id_temp_end").val(),date_format=jQuery("#"+t+"_buttonform_id_temp").attr("format");jQuery("#"+t+"_elementform_id_temp0").datepicker(),jQuery("#"+t+"_elementform_id_temp1").datepicker(),jQuery("#"+t+"_elementform_id_temp0").datepicker("option","dateFormat",date_format),jQuery("#"+t+"_elementform_id_temp1").datepicker("option","dateFormat",date_format),"today"==default_date_start?jQuery("#"+t+"_elementform_id_temp0").datepicker("setDate",new Date):(-1==default_date_start.indexOf("d")&&-1==default_date_start.indexOf("m")&&-1==default_date_start.indexOf("y")&&-1==default_date_start.indexOf("w")&&""!==default_date_start&&(default_date_start=jQuery.datepicker.formatDate(date_format,new Date(default_date_start))),jQuery("#"+t+"_elementform_id_temp0").datepicker("setDate",default_date_start)),"today"==default_date_end?jQuery("#"+t+"_elementform_id_temp1").datepicker("setDate",new Date):(-1==default_date_end.indexOf("d")&&-1==default_date_end.indexOf("m")&&-1==default_date_end.indexOf("y")&&-1==default_date_end.indexOf("w")&&""!==default_date_end&&(default_date_end=jQuery.datepicker.formatDate(date_format,new Date(default_date_end))),jQuery("#"+t+"_elementform_id_temp1").datepicker("setDate",default_date_end))}else if("type_date_new"==document.getElementById(t+"_typeform_id_temp").value){var default_date=jQuery("#"+t+"_default_date_id_temp").val(),date_format=jQuery("#"+t+"_buttonform_id_temp").attr("format");jQuery("#"+t+"_elementform_id_temp").datepicker(),jQuery("#"+t+"_elementform_id_temp").datepicker("option","dateFormat",date_format),"today"==default_date?jQuery("#"+t+"_elementform_id_temp").datepicker("setDate",new Date):(-1==default_date.indexOf("d")&&-1==default_date.indexOf("m")&&-1==default_date.indexOf("y")&&-1==default_date.indexOf("w")&&""!==default_date&&(default_date=jQuery.datepicker.formatDate(date_format,new Date(default_date))),jQuery("#"+t+"_elementform_id_temp").datepicker("setDate",default_date))}else"type_phone_new"==document.getElementById(t+"_typeform_id_temp").value&&(jQuery("#"+t+"_elementform_id_temp").intlTelInput({nationalMode:!1,preferredCountries:[jQuery("#"+t+"_elementform_id_temp").attr("top-country")]}),jQuery("#"+t+"_elementform_id_temp").intlTelInput("setNumber",jQuery("#"+t+"_elementform_id_temp").val()));remove_whitespace(document.getElementById("take")),form_view=1,form_view_max=1;var form_view_count=jQuery(".wdform-page-and-images").length;if(jQuery(".wdform-page-and-images").each(function(){var e=jQuery(this).find(".wdform_page").attr("id").split("form_id_tempform_view"),t=parseInt(e[1]);form_view_max=t>form_view_max?t:form_view_max,page_toolbar_wrap=document.createElement("div"),page_toolbar_wrap.setAttribute("id","form_id_tempform_view_img"+t),page_toolbar_wrap.setAttribute("class","form_id_tempform_view_img"),page_title=document.createElement("div"),page_title.setAttribute("class","wdform_page_title"),page_title.innerHTML='<span class="fm-ico-draggable"></span>'+document.getElementById("form_id_tempform_view"+t).getAttribute("page_title"),page_toolbar_wrap.appendChild(page_title),page_toolbar=document.createElement("div");var i="none"==document.getElementById("form_id_tempform_view"+t).style.display?"fm-ico-expand":"fm-ico-collapse",a=document.createElement("span");a.setAttribute("title","Show or hide the page"),a.setAttribute("class","page_toolbar dashicons "+i),a.setAttribute("id","show_page_img_"+t),a.setAttribute("onClick",'show_or_hide("'+t+'"); change_show_hide_icon(this);');var n=document.createElement("span");n.setAttribute("title","Delete the page"),n.setAttribute("class","page_toolbar fm-ico-delete"),n.setAttribute("onclick",'remove_page("'+t+'")');var l=document.createElement("span");l.setAttribute("title","Edit the page"),l.setAttribute("class","page_toolbar fm-ico-edit"),l.setAttribute("onclick",'edit_page_break("'+t+'")'),page_toolbar.appendChild(n),page_toolbar.appendChild(l),page_toolbar.appendChild(a),page_toolbar_wrap.appendChild(page_toolbar);var d=document.getElementById("form_id_tempform_view"+t).parentNode;d.insertBefore(page_toolbar_wrap,d.childNodes[0])}),1<form_view_count){firstid=jQuery(".wdform_page").first().attr("id"),firstid=firstid.split("form_id_tempform_view"),first_form_view=firstid[1],form_view=form_view_max,need_enable=!1,generate_page_nav(first_form_view);var icon_edit=document.createElement("span");icon_edit.setAttribute("class","fm-ico-edit"),icon_edit.setAttribute("onclick","el_page_navigation()");var edit_page_navigation=document.getElementById("edit_page_navigation");edit_page_navigation.appendChild(icon_edit),document.getElementById("page_navigation").appendChild(edit_page_navigation),jQuery("#page_bar").removeClass("form_view_hide")}else jQuery("#page_bar").addClass("form_view_hide");1==form_view_count&&jQuery(".form_id_tempform_view_img").addClass("form_view_hide")}function change_show_hide_icon(e){jQuery(e).toggleClass("fm-ico-collapse").toggleClass("fm-ico-expand")}function edit_page_break(e){enable2(),document.getElementById("editing_id").value=e,form_view_element=document.getElementById("form_id_tempform_view"+e),page_title=form_view_element.getAttribute("page_title"),form_view_element.getAttribute("next_title")?(next_title=form_view_element.getAttribute("next_title"),next_type=form_view_element.getAttribute("next_type"),next_class=form_view_element.getAttribute("next_class"),next_checkable=form_view_element.getAttribute("next_checkable"),previous_title=form_view_element.getAttribute("previous_title"),previous_type=form_view_element.getAttribute("previous_type"),previous_class=form_view_element.getAttribute("previous_class"),previous_checkable=form_view_element.getAttribute("previous_checkable"),w_title=[next_title,previous_title],w_type=[next_type,previous_type],w_class=[next_class,previous_class],w_check=[next_checkable,previous_checkable]):(w_title=["Next","Previous"],w_type=["text","text"],w_class=["",""],w_check=["true","true"]),w_attr_name=[],w_attr_value=[],type_page_break(e,page_title,w_title,w_type,w_class,w_check,w_attr_name,w_attr_value)}function fm_popup_toggle(e){jQuery("#"+e).toggleClass("hidden"),jQuery("body").toggleClass("fm-disable-scroll")}function storageAvailable(e){try{var t=window[e],i="__storage_test__";return t.setItem(i,i),t.removeItem(i),!0}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==t.length}}function fm_check_something_really_important(){return is7=jQuery(".wdform_field:not([type=type_section_break])").length,9<=is7&&(fm_limitation_alert(!0),!0)}function filter(e){var t=jQuery(e).val().toLowerCase();if(jQuery(".filtered-fields .inside").html(""),""!=t){var i=!1;jQuery(".field_types_cont .postbox").addClass("hide"),jQuery(".field_types .postbox:not(.filtered-fields) .wd-button").each(function(){"-1"!=jQuery(this).html().toLowerCase().indexOf(t)&&(jQuery(".filtered-fields .inside").append(jQuery(this).clone()),i=!0)}),i||jQuery(".filtered-fields .inside").html(form_maker.nothing_found),jQuery(".field_types_cont .filtered-fields").removeClass("hide")}else jQuery(".field_types_cont .postbox").removeClass("hide"),jQuery(".field_types_cont .filtered-fields").addClass("hide")}function Enable(){for(k=1;k<=form_view_max;k++)if(document.getElementById("form_id_tempform_view"+k))for(wdform_page=document.getElementById("form_id_tempform_view"+k),remove_whitespace(wdform_page),n=wdform_page.childNodes.length-2,z=0;z<=n;z++)if(!wdform_page.childNodes[z].getAttribute("wdid"))for(wdform_section=wdform_page.childNodes[z],x=0;x<wdform_section.childNodes.length;x++)if(wdform_column=wdform_section.childNodes[x],wdform_column.firstChild)for(y=0;y<wdform_column.childNodes.length;y++)wdform_row=wdform_column.childNodes[y],wdid=wdform_row.getAttribute("wdid"),wdid}function enable2(){fm_add_field_button(),jQuery(".add-popup").slideToggle(200),jQuery(".popup-title").html(form_maker.edit_field),jQuery(".wd-add-button").html(form_maker.update),jQuery(".field_types").hide(),jQuery("#field_container").addClass("field_container_full")}function edit(e,a){switch(need_enable&&enable2(),document.getElementById("editing_id").value=e,type=document.getElementById("wdform_field"+e).getAttribute("type"),k=0,w_choices=new Array,w_choices_value=new Array,w_choices_params=new Array,w_choices_checked=new Array,w_choices_disabled=new Array,f=0,h=new Array,b=new Array,w_choices_price=new Array,t=0,document.getElementById(e+"_element_labelform_id_temp").innerHTML?w_field_label=document.getElementById(e+"_element_labelform_id_temp").innerHTML:w_field_label=" ",document.getElementById(e+"_label_sectionform_id_temp")&&("block"==document.getElementById(e+"_label_sectionform_id_temp").style.display?w_field_label_pos="top":w_field_label_pos="left"),document.getElementById(e+"_elementform_id_temp")&&(s=document.getElementById(e+"_elementform_id_temp").style.width,""==s?w_size=s:w_size=s.substring(0,s.length-2)),document.getElementById(e+"_label_sectionform_id_temp")&&(s=document.getElementById(e+"_label_sectionform_id_temp").style.width,""==s?w_field_label_size=s:w_field_label_size=s.substring(0,s.length-2)),document.getElementById(e+"_requiredform_id_temp")&&(w_required=document.getElementById(e+"_requiredform_id_temp").value),document.getElementById(e+"_uniqueform_id_temp")&&(w_unique=document.getElementById(e+"_uniqueform_id_temp").value),document.getElementById(e+"_label_sectionform_id_temp")&&(w_class=document.getElementById(e+"_label_sectionform_id_temp").getAttribute("class"),w_class||(w_class="")),type){case"type_editor":w_editor=document.getElementById("wdform_field"+e).innerHTML,type_editor(e,w_editor);break;case"type_section_break":w_editor=document.getElementById(e+"_element_sectionform_id_temp").innerHTML,type_section_break(e,w_editor);break;case"type_send_copy":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_first_val=document.getElementById(e+"_elementform_id_temp").checked,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_send_copy(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_first_val,w_required,w_attr_name,w_attr_value);break;case"type_text":w_first_val=document.getElementById(e+"_elementform_id_temp").value,w_title=document.getElementById(e+"_elementform_id_temp").title,w_regExp_status=document.getElementById(e+"_regExpStatusform_id_temp").value,w_regExp_value=unescape(document.getElementById(e+"_regExp_valueform_id_temp").value),w_regExp_common=document.getElementById(e+"_regExp_commonform_id_temp").value,w_regExp_arg=document.getElementById(e+"_regArgumentform_id_temp").value,w_regExp_alert=document.getElementById(e+"_regExp_alertform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_readonly=document.getElementById(e+"_readonlyform_id_temp").value,w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,type_text(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_first_val,w_title,w_required,w_regExp_status,w_regExp_value,w_regExp_common,w_regExp_arg,w_regExp_alert,w_unique,w_attr_name,w_attr_value,w_readonly,w_class);break;case"type_number":w_first_val=document.getElementById(e+"_elementform_id_temp").value,w_title=document.getElementById(e+"_elementform_id_temp").title,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_number(e,w_field_label,w_field_label_size,w_field_label_pos,w_size,w_first_val,w_title,w_required,w_unique,w_class,w_attr_name,w_attr_value);break;case"type_password":w_placeholder_value=document.getElementById(e+"_elementform_id_temp").placeholder,w_verification=document.getElementById(e+"_verification_id_temp").value,document.getElementById(e+"_1_element_labelform_id_temp").innerHTML?w_verification_label=document.getElementById(e+"_1_element_labelform_id_temp").innerHTML:w_verification_label=" ",w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_password(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_required,w_unique,w_class,w_verification,w_verification_label,w_placeholder_value,w_attr_name,w_attr_value);break;case"type_textarea":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_first_val=document.getElementById(e+"_elementform_id_temp").value,w_title=document.getElementById(e+"_elementform_id_temp").title,s=document.getElementById(e+"_elementform_id_temp").style.height,w_size_h=s.substring(0,s.length-2),atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_textarea(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_size_h,w_first_val,w_title,w_required,w_unique,w_class,w_attr_name,w_attr_value);break;case"type_wdeditor":w_title=document.getElementById(e+"_elementform_id_temp").title,s=document.getElementById(e+"_elementform_id_temp").style.height,w_size_h=s.substring(0,s.length-2),w=document.getElementById(e+"_elementform_id_temp").style.width,w_size_w=w.substring(0,w.length-2),atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_wdeditor(e,w_field_label,w_field_label_size,w_field_label_pos,w_size_w,w_size_h,w_title,w_required,w_class,w_attr_name,w_attr_value);break;case"type_phone":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_first_val=[document.getElementById(e+"_element_firstform_id_temp").value,document.getElementById(e+"_element_lastform_id_temp").value],w_title=[document.getElementById(e+"_element_firstform_id_temp").title,document.getElementById(e+"_element_lastform_id_temp").title],s=document.getElementById(e+"_element_lastform_id_temp").style.width,w_size=s.substring(0,s.length-2),w_mini_labels=[document.getElementById(e+"_mini_label_area_code").innerHTML,document.getElementById(e+"_mini_label_phone_number").innerHTML],atrs=return_attributes(e+"_element_firstform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_phone(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_first_val,w_title,w_mini_labels,w_required,w_unique,w_class,w_attr_name,w_attr_value);break;case"type_phone_new":var l=jQuery("#"+e+"_elementform_id_temp").intlTelInput("getSelectedCountryData");w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_first_val=document.getElementById(e+"_elementform_id_temp").value,w_top_country=l.iso2,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_phone_new(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_first_val,w_top_country,w_required,w_unique,w_class,w_attr_name,w_attr_value);break;case"type_name":if(document.getElementById(e+"_enable_fieldsform_id_temp")){w_name_format="normal",w_first_val=[document.getElementById(e+"_element_firstform_id_temp").value,document.getElementById(e+"_element_lastform_id_temp").value],w_title=[document.getElementById(e+"_element_firstform_id_temp").title,document.getElementById(e+"_element_lastform_id_temp").title];for(var d=["title","middle"],_=0;_<2;_++)w_first_val.push(document.getElementById(e+"_element_"+d[_]+"form_id_temp")?document.getElementById(e+"_element_"+d[_]+"form_id_temp").value:""),w_title.push(document.getElementById(e+"_element_"+d[_]+"form_id_temp")?document.getElementById(e+"_element_"+d[_]+"form_id_temp").title:"")}else document.getElementById(e+"_element_middleform_id_temp")?w_name_format="extended":w_name_format="normal","normal"==w_name_format?(w_first_val=[document.getElementById(e+"_element_firstform_id_temp").value,document.getElementById(e+"_element_lastform_id_temp").value],w_title=[document.getElementById(e+"_element_firstform_id_temp").title,document.getElementById(e+"_element_lastform_id_temp").title]):(w_first_val=[document.getElementById(e+"_element_firstform_id_temp").value,document.getElementById(e+"_element_lastform_id_temp").value,document.getElementById(e+"_element_titleform_id_temp").value,document.getElementById(e+"_element_middleform_id_temp").value],w_title=[document.getElementById(e+"_element_firstform_id_temp").title,document.getElementById(e+"_element_lastform_id_temp").title,document.getElementById(e+"_element_titleform_id_temp").title,document.getElementById(e+"_element_middleform_id_temp").title]);document.getElementById(e+"_mini_label_title")?w_mini_title=document.getElementById(e+"_mini_label_title").innerHTML:w_mini_title="Title",document.getElementById(e+"_mini_label_middle")?w_mini_middle=document.getElementById(e+"_mini_label_middle").innerHTML:w_mini_middle="Middle",w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_mini_labels=[w_mini_title,document.getElementById(e+"_mini_label_first").innerHTML,document.getElementById(e+"_mini_label_last").innerHTML,w_mini_middle],w_name_title=document.getElementById(e+"_enable_fieldsform_id_temp")?document.getElementById(e+"_enable_fieldsform_id_temp").getAttribute("title"):"normal"==w_name_format?"no":"yes",w_name_middle=document.getElementById(e+"_enable_fieldsform_id_temp")?document.getElementById(e+"_enable_fieldsform_id_temp").getAttribute("middle"):"normal"==w_name_format?"no":"yes",w_name_fields=[w_name_title,w_name_middle],w_autofill=document.getElementById(e+"_autofillform_id_temp").value,s=document.getElementById(e+"_element_firstform_id_temp").style.width,w_size=s.substring(0,s.length-2),atrs=return_attributes(e+"_element_firstform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_name(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_first_val,w_title,w_mini_labels,w_size,w_name_format,w_required,w_unique,w_class,w_attr_name,w_attr_value,w_name_fields,w_autofill);break;case"type_paypal_price":w_first_val=[document.getElementById(e+"_element_dollarsform_id_temp").value,document.getElementById(e+"_element_centsform_id_temp").value],w_title=[document.getElementById(e+"_element_dollarsform_id_temp").title,document.getElementById(e+"_element_centsform_id_temp").title],"none"==document.getElementById(e+"_td_name_cents").style.display?w_hide_cents="yes":w_hide_cents="no",s=document.getElementById(e+"_element_dollarsform_id_temp").style.width,w_size=s.substring(0,s.length-2),atrs=return_attributes(e+"_element_dollarsform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_range_min=document.getElementById(e+"_range_minform_id_temp").value,w_range_max=document.getElementById(e+"_range_maxform_id_temp").value,w_mini_labels=[document.getElementById(e+"_mini_label_dollars").innerHTML,document.getElementById(e+"_mini_label_cents").innerHTML],type_paypal_price(e,w_field_label,w_field_label_size,w_field_label_pos,w_first_val,w_title,w_mini_labels,w_size,w_required,w_hide_cents,w_class,w_attr_name,w_attr_value,w_range_min,w_range_max);break;case"type_paypal_price_new":w_first_val=document.getElementById(e+"_elementform_id_temp").value,w_title=document.getElementById(e+"_elementform_id_temp").title,s=document.getElementById(e+"_elementform_id_temp").style.width,w_size=s.substring(0,s.length-2),atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_range_min=document.getElementById(e+"_range_minform_id_temp").value,w_range_max=document.getElementById(e+"_range_maxform_id_temp").value,w_readonly=document.getElementById(e+"_readonlyform_id_temp").value,w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,"none"==document.getElementById(e+"_td_name_currency").style.display?w_currency="yes":w_currency="no",type_paypal_price_new(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_first_val,w_title,w_size,w_required,w_class,w_attr_name,w_attr_value,w_range_min,w_range_max,w_readonly,w_currency);break;case"type_address":s=document.getElementById(e+"_div_address").style.width,w_size=s.substring(0,s.length-2),document.getElementById(e+"_mini_label_street1")?w_street1=document.getElementById(e+"_mini_label_street1").innerHTML:w_street1=document.getElementById(e+"_street1form_id_temp").value,document.getElementById(e+"_mini_label_street2")?w_street2=document.getElementById(e+"_mini_label_street2").innerHTML:w_street2=document.getElementById(e+"_street2form_id_temp").value,document.getElementById(e+"_mini_label_city")?w_city=document.getElementById(e+"_mini_label_city").innerHTML:w_city=document.getElementById(e+"_cityform_id_temp").value,document.getElementById(e+"_mini_label_state")?w_state=document.getElementById(e+"_mini_label_state").innerHTML:w_state=document.getElementById(e+"_stateform_id_temp").value,document.getElementById(e+"_mini_label_postal")?w_postal=document.getElementById(e+"_mini_label_postal").innerHTML:w_postal=document.getElementById(e+"_postalform_id_temp").value,document.getElementById(e+"_mini_label_country")?w_country=document.getElementById(e+"_mini_label_country").innerHTML:w_country=document.getElementById(e+"_countryform_id_temp").value,w_mini_labels=[w_street1,w_street2,w_city,w_state,w_postal,w_country];var r=document.getElementById(e+"_disable_fieldsform_id_temp");w_street1_dis=r.getAttribute("street1"),w_street2_dis=r.getAttribute("street2"),w_city_dis=r.getAttribute("city"),w_state_dis=r.getAttribute("state"),w_us_states_dis=r.getAttribute("us_states"),w_postal_dis=r.getAttribute("postal"),w_country_dis=r.getAttribute("country"),w_disabled_fields=[w_street1_dis,w_street2_dis,w_city_dis,w_state_dis,w_postal_dis,w_country_dis,w_us_states_dis],w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_street1form_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_address(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_mini_labels,w_disabled_fields,w_required,w_class,w_attr_name,w_attr_value);break;case"type_submitter_mail":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_first_val=document.getElementById(e+"_elementform_id_temp").value,w_title=document.getElementById(e+"_elementform_id_temp").title,w_autofill=document.getElementById(e+"_autofillform_id_temp").value,w_verification=document.getElementById(e+"_verification_id_temp").value,w_verification_placeholder=document.getElementById(e+"_1_elementform_id_temp").title,document.getElementById(e+"_1_element_labelform_id_temp").innerHTML?w_verification_label=document.getElementById(e+"_1_element_labelform_id_temp").innerHTML:w_verification_label=" ",atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_submitter_mail(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_first_val,w_title,w_required,w_unique,w_class,w_verification,w_verification_label,w_verification_placeholder,w_attr_name,w_attr_value,w_autofill);break;case"type_checkbox":if(w_randomize=document.getElementById(e+"_randomizeform_id_temp").value,w_allow_other=document.getElementById(e+"_allow_otherform_id_temp").value,document.getElementById(e+"_rowcol_numform_id_temp").value?(document.getElementById(e+"_table_little").getAttribute("for_hor")?w_flow="hor":w_flow="ver",w_rowcol=document.getElementById(e+"_rowcol_numform_id_temp").value):(document.getElementById(e+"_hor")?w_flow="hor":w_flow="ver",w_rowcol=1),v=0,"ver"==w_flow){var o=document.getElementById(e+"_table_little");for(k=0;k<o.childNodes.length;k++){var u=o.childNodes[k];for(m=0;m<u.childNodes.length;m++){var c=u.childNodes[m].getAttribute("idi");document.getElementById(e+"_elementform_id_temp"+c).getAttribute("other")&&"1"==document.getElementById(e+"_elementform_id_temp"+c).getAttribute("other")&&(f=t),w_choices[t]=document.getElementById(e+"_label_element"+c).innerHTML,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+c).checked,w_choices_value[t]=document.getElementById(e+"_elementform_id_temp"+c).value,document.getElementById(e+"_label_element"+c).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+c).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+c).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+c).getAttribute("db_info"):w_choices_params[t]="",t++,v=c}}}else{var p=(y=(o=document.getElementById(e+"_table_little")).childNodes)[0].childNodes;for(k=0;k<p.length;k++)for(m=0;m<y.length;m++)if(y[m].childNodes[k]){c=(u=y[m].childNodes[k]).getAttribute("idi");document.getElementById(e+"_elementform_id_temp"+c).getAttribute("other")&&"1"==document.getElementById(e+"_elementform_id_temp"+c).getAttribute("other")&&(f=t),w_choices[t]=document.getElementById(e+"_label_element"+c).innerHTML,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+c).checked,w_choices_value[t]=document.getElementById(e+"_elementform_id_temp"+c).value,document.getElementById(e+"_label_element"+c).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+c).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+c).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+c).getAttribute("db_info"):w_choices_params[t]="",t++,v=c}}document.getElementById(e+"_option_left_right")?w_field_option_pos=document.getElementById(e+"_option_left_right").value:w_field_option_pos="left",w_value_disabled=document.getElementById(e+"_value_disabledform_id_temp").value,w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"+v),w_attr_name=atrs[0],w_attr_value=atrs[1],type_checkbox(e,w_field_label,w_field_label_size,w_field_label_pos,w_field_option_pos,w_hide_label,w_flow,w_choices,w_choices_checked,w_rowcol,w_required,w_randomize,w_allow_other,f,w_class,w_attr_name,w_attr_value,w_value_disabled,w_choices_value,w_choices_params);break;case"type_paypal_checkbox":document.getElementById(e+"_hor")?w_flow="hor":w_flow="ver",w_randomize=document.getElementById(e+"_randomizeform_id_temp").value,w_allow_other=document.getElementById(e+"_allow_otherform_id_temp").value;var f=v=0;o=document.getElementById(e+"_table_little");for(k=0;k<o.childNodes.length;k++){u=o.childNodes[k];for(m=0;m<u.childNodes.length;m++){c=u.childNodes[m].getAttribute("idi");w_choices[t]=document.getElementById(e+"_label_element"+c).innerHTML,w_choices_price[t]=document.getElementById(e+"_elementform_id_temp"+c).value,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+c).checked,document.getElementById(e+"_label_element"+c).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+c).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+c).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+c).getAttribute("db_info"):w_choices_params[t]="",t++,v=c}}for("hor"==w_flow&&flow_hor(e),k=0;k<100;k++)if(document.getElementById(e+"_propertyform_id_temp"+k))if(h.push(document.getElementById(e+"_property_label_form_id_temp"+k).innerHTML),document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length)for(b[h.length-1]=new Array,m=0;m<document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length;m++)b[h.length-1].push(document.getElementById(e+"_propertyform_id_temp"+k).childNodes[m].value);else b.push("");w_quantity="no",w_quantity_value=1,document.getElementById(e+"_element_quantityform_id_temp")&&(w_quantity="yes",w_quantity_value=document.getElementById(e+"_element_quantityform_id_temp").value),document.getElementById(e+"_option_left_right")?w_field_option_pos=document.getElementById(e+"_option_left_right").value:w_field_option_pos="left",w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"+v),w_attr_name=atrs[0],w_attr_value=atrs[1],type_paypal_checkbox(e,w_field_label,w_field_label_size,w_field_label_pos,w_field_option_pos,w_hide_label,w_flow,w_choices,w_choices_price,w_choices_checked,w_required,w_randomize,w_allow_other,f,w_class,w_attr_name,w_attr_value,h,b,w_quantity,w_quantity_value,w_choices_params);break;case"type_radio":if(w_randomize=document.getElementById(e+"_randomizeform_id_temp").value,w_allow_other=document.getElementById(e+"_allow_otherform_id_temp").value,document.getElementById(e+"_rowcol_numform_id_temp").value?(document.getElementById(e+"_table_little").getAttribute("for_hor")?w_flow="hor":w_flow="ver",w_rowcol=document.getElementById(e+"_rowcol_numform_id_temp").value):(document.getElementById(e+"_table_little").getAttribute("for_hor")?w_flow="hor":w_flow="ver",w_rowcol=1),v=0,"ver"==w_flow){o=document.getElementById(e+"_table_little");for(k=0;k<o.childNodes.length;k++){u=o.childNodes[k];for(m=0;m<u.childNodes.length;m++){c=u.childNodes[m].getAttribute("idi");document.getElementById(e+"_elementform_id_temp"+c).getAttribute("other")&&"1"==document.getElementById(e+"_elementform_id_temp"+c).getAttribute("other")&&(f=t),w_choices[t]=document.getElementById(e+"_label_element"+c).innerHTML,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+c).checked,w_choices_value[t]=document.getElementById(e+"_elementform_id_temp"+c).value,document.getElementById(e+"_label_element"+c).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+c).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+c).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+c).getAttribute("db_info"):w_choices_params[t]="",t++,v=c}}}else{var y;p=(y=(o=document.getElementById(e+"_table_little")).childNodes)[0].childNodes;for(k=0;k<p.length;k++)for(m=0;m<y.length;m++)if(y[m].childNodes[k]){c=(u=y[m].childNodes[k]).getAttribute("idi");document.getElementById(e+"_elementform_id_temp"+c).getAttribute("other")&&"1"==document.getElementById(e+"_elementform_id_temp"+c).getAttribute("other")&&(f=t),w_choices[t]=document.getElementById(e+"_label_element"+c).innerHTML,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+c).checked,w_choices_value[t]=document.getElementById(e+"_elementform_id_temp"+c).value,document.getElementById(e+"_label_element"+c).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+c).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+c).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+c).getAttribute("db_info"):w_choices_params[t]="",t++,v=c}}document.getElementById(e+"_option_left_right")?w_field_option_pos=document.getElementById(e+"_option_left_right").value:w_field_option_pos="left",w_value_disabled=document.getElementById(e+"_value_disabledform_id_temp").value,w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"+v),w_attr_name=atrs[0],w_attr_value=atrs[1],type_radio(e,w_field_label,w_field_label_size,w_field_label_pos,w_field_option_pos,w_hide_label,w_flow,w_choices,w_choices_checked,w_rowcol,w_required,w_randomize,w_allow_other,f,w_class,w_attr_name,w_attr_value,w_value_disabled,w_choices_value,w_choices_params);break;case"type_paypal_radio":document.getElementById(e+"_hor")?w_flow="hor":w_flow="ver",w_randomize=document.getElementById(e+"_randomizeform_id_temp").value,w_allow_other=document.getElementById(e+"_allow_otherform_id_temp").value;f=v=0,o=document.getElementById(e+"_table_little");for(k=0;k<o.childNodes.length;k++){u=o.childNodes[k];for(m=0;m<u.childNodes.length;m++){c=u.childNodes[m].getAttribute("idi");w_choices[t]=document.getElementById(e+"_label_element"+c).innerHTML,w_choices_price[t]=document.getElementById(e+"_elementform_id_temp"+c).value,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+c).checked,document.getElementById(e+"_label_element"+c).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+c).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+c).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+c).getAttribute("db_info"):w_choices_params[t]="",t++,v=c}}for("hor"==w_flow&&flow_hor(e),k=0;k<100;k++)if(document.getElementById(e+"_propertyform_id_temp"+k))if(h.push(document.getElementById(e+"_property_label_form_id_temp"+k).innerHTML),document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length)for(b[h.length-1]=new Array,m=0;m<document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length;m++)b[h.length-1].push(document.getElementById(e+"_propertyform_id_temp"+k).childNodes[m].value);else b.push("");w_quantity="no",w_quantity_value=1,document.getElementById(e+"_element_quantityform_id_temp")&&(w_quantity="yes",w_quantity_value=document.getElementById(e+"_element_quantityform_id_temp").value),document.getElementById(e+"_option_left_right")?w_field_option_pos=document.getElementById(e+"_option_left_right").value:w_field_option_pos="left",w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"+v),w_attr_name=atrs[0],w_attr_value=atrs[1],type_paypal_radio(e,w_field_label,w_field_label_size,w_field_label_pos,w_field_option_pos,w_hide_label,w_flow,w_choices,w_choices_price,w_choices_checked,w_required,w_randomize,w_allow_other,f,w_class,w_attr_name,w_attr_value,h,b,w_quantity,w_quantity_value,w_choices_params);break;case"type_paypal_shipping":document.getElementById(e+"_hor")?w_flow="hor":w_flow="ver",w_randomize=document.getElementById(e+"_randomizeform_id_temp").value,w_allow_other=document.getElementById(e+"_allow_otherform_id_temp").value;f=v=0,o=document.getElementById(e+"_table_little");for(k=0;k<o.childNodes.length;k++){u=o.childNodes[k];for(m=0;m<u.childNodes.length;m++){c=u.childNodes[m].getAttribute("idi");w_choices[t]=document.getElementById(e+"_label_element"+c).innerHTML,w_choices_price[t]=document.getElementById(e+"_elementform_id_temp"+c).value,w_choices_checked[t]=document.getElementById(e+"_elementform_id_temp"+c).checked,document.getElementById(e+"_label_element"+c).getAttribute("where")?w_choices_params[t]=document.getElementById(e+"_label_element"+c).getAttribute("where")+"[where_order_by]"+document.getElementById(e+"_label_element"+c).getAttribute("order_by")+"[db_info]"+document.getElementById(e+"_label_element"+c).getAttribute("db_info"):w_choices_params[t]="",t++,v=c}}"hor"==w_flow&&flow_hor(e);var h=[],b=[];document.getElementById(e+"_option_left_right")?w_field_option_pos=document.getElementById(e+"_option_left_right").value:w_field_option_pos="left",w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"+v),w_attr_name=atrs[0],w_attr_value=atrs[1],type_paypal_shipping(e,w_field_label,w_field_label_size,w_field_label_pos,w_field_option_pos,w_hide_label,w_flow,w_choices,w_choices_price,w_choices_checked,w_required,w_randomize,w_allow_other,f,w_class,w_attr_name,w_attr_value,h,b,w_choices_params);break;case"type_paypal_total":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_size=jQuery("#"+e+"paypal_totalform_id_temp").css("width")?jQuery("#"+e+"paypal_totalform_id_temp").css("width").substring(0,jQuery("#"+e+"paypal_totalform_id_temp").css("width").length-2):"300",type_paypal_total(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_class,w_size);break;case"type_stripe":type_stripe(e,w_size,w_field_label_size,w_field_label_pos,w_class);break;case"type_star_rating":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_star_amount=document.getElementById(e+"_star_amountform_id_temp").value,w_field_label_col=document.getElementById(e+"_star_colorform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_star_rating(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_field_label_col,w_star_amount,w_required,w_class,w_attr_name,w_attr_value);break;case"type_scale_rating":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_mini_labels=[document.getElementById(e+"_mini_label_worst").innerHTML,document.getElementById(e+"_mini_label_best").innerHTML],w_scale_amount=document.getElementById(e+"_scale_amountform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_scale_rating(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_mini_labels,w_scale_amount,w_required,w_class,w_attr_name,w_attr_value);break;case"type_spinner":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_field_min_value=document.getElementById(e+"_min_valueform_id_temp").value,w_field_max_value=document.getElementById(e+"_max_valueform_id_temp").value,w_field_width=document.getElementById(e+"_spinner_widthform_id_temp").value,w_field_step=document.getElementById(e+"_stepform_id_temp").value,w_field_value=document.getElementById(e+"_elementform_id_temp").getAttribute("aria-valuenow"),atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_spinner(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_field_width,w_field_min_value,w_field_max_value,w_field_step,w_field_value,w_required,w_class,w_attr_name,w_attr_value);break;case"type_slider":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_field_min_value=document.getElementById(e+"_slider_min_valueform_id_temp").value,w_field_max_value=document.getElementById(e+"_slider_max_valueform_id_temp").value,w_field_step=document.getElementById(e+"_slider_stepform_id_temp")&&document.getElementById(e+"_slider_stepform_id_temp").value?document.getElementById(e+"_slider_stepform_id_temp").value:1,w_field_width=document.getElementById(e+"_slider_widthform_id_temp").value,w_field_value=document.getElementById(e+"_slider_valueform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_slider(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_field_width,w_field_min_value,w_field_max_value,w_field_step,w_field_value,w_required,w_class,w_attr_name,w_attr_value);break;case"type_range":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_field_range_width=document.getElementById(e+"_range_widthform_id_temp").value,w_field_range_step=document.getElementById(e+"_range_stepform_id_temp").value,w_field_value1=document.getElementById(e+"_elementform_id_temp0").getAttribute("aria-valuenow"),w_field_value2=document.getElementById(e+"_elementform_id_temp1").getAttribute("aria-valuenow"),atrs=return_attributes(e+"_elementform_id_temp0"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_mini_labels=[document.getElementById(e+"_mini_label_from").innerHTML,document.getElementById(e+"_mini_label_to").innerHTML],type_range(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_field_range_width,w_field_range_step,w_field_value1,w_field_value2,w_mini_labels,w_required,w_class,w_attr_name,w_attr_value);break;case"type_grading":for(w_total=document.getElementById(e+"_grading_totalform_id_temp").value,w_items=[],k=0;k<100;k++)document.getElementById(e+"_label_elementform_id_temp"+k)&&w_items.push(document.getElementById(e+"_label_elementform_id_temp"+k).innerHTML);w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_grading(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_items,w_total,w_required,w_class,w_attr_name,w_attr_value),refresh_grading_items(e);break;case"type_matrix":for(w_rows=[],w_rows[0]="",k=1;k<100;k++)document.getElementById(e+"_label_elementform_id_temp"+k+"_0")&&w_rows.push(document.getElementById(e+"_label_elementform_id_temp"+k+"_0").innerHTML);for(w_columns=[],w_columns[0]="",k=1;k<100;k++)document.getElementById(e+"_label_elementform_id_temp0_"+k)&&w_columns.push(document.getElementById(e+"_label_elementform_id_temp0_"+k).innerHTML);w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_field_input_type=document.getElementById(e+"_input_typeform_id_temp").value,w_textbox_size=document.getElementById(e+"_textbox_sizeform_id_temp")?document.getElementById(e+"_textbox_sizeform_id_temp").value:"100",atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_matrix(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_field_input_type,w_rows,w_columns,w_required,w_class,w_attr_name,w_attr_value,w_textbox_size),refresh_matrix(e);break;case"type_time":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_hhform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_hh=document.getElementById(e+"_hhform_id_temp").value,w_mm=document.getElementById(e+"_mmform_id_temp").value,document.getElementById(e+"_ssform_id_temp")?(w_ss=document.getElementById(e+"_ssform_id_temp").value,w_sec="1",w_mini_label_ss=document.getElementById(e+"_mini_label_ss").innerHTML):(w_ss="",w_sec="0",w_mini_label_ss=""),document.getElementById(e+"_am_pm_select")?(w_am_pm=document.getElementById(e+"_am_pmform_id_temp").value,w_time_type="12",w_mini_labels=[document.getElementById(e+"_mini_label_hh").innerHTML,document.getElementById(e+"_mini_label_mm").innerHTML,w_mini_label_ss,document.getElementById(e+"_mini_label_am_pm").innerHTML]):(w_am_pm=0,w_time_type="24",w_mini_labels=[document.getElementById(e+"_mini_label_hh").innerHTML,document.getElementById(e+"_mini_label_mm").innerHTML,w_mini_label_ss,"AM/PM"]),type_time(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_time_type,w_am_pm,w_sec,w_hh,w_mm,w_ss,w_mini_labels,w_required,w_class,w_attr_name,w_attr_value);break;case"type_date":atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_date=document.getElementById(e+"_elementform_id_temp").value,w_format=document.getElementById(e+"_buttonform_id_temp").getAttribute("format"),w_but_val=document.getElementById(e+"_buttonform_id_temp").value,w_disable_past_days=document.getElementById(e+"_dis_past_daysform_id_temp")?document.getElementById(e+"_dis_past_daysform_id_temp").value:"no",type_date(e,w_field_label,w_field_label_size,w_field_label_pos,w_date,w_required,w_class,w_format,w_but_val,w_attr_name,w_attr_value,w_disable_past_days);break;case"type_date_new":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_date=document.getElementById(e+"_elementform_id_temp").value,w_format=document.getElementById(e+"_buttonform_id_temp").getAttribute("format"),w_but_val=document.getElementById(e+"_buttonform_id_temp").value,w_start_day=document.getElementById(e+"_start_dayform_id_temp").value,w_default_date=document.getElementById(e+"_default_date_id_temp").value,w_min_date=document.getElementById(e+"_min_date_id_temp").value,w_max_date=document.getElementById(e+"_max_date_id_temp").value,w_invalid_dates=document.getElementById(e+"_invalid_dates_id_temp").value,w_hide_time=document.getElementById(e+"_hide_timeform_id_temp").value,w_show_image=document.getElementById(e+"_show_imageform_id_temp").value,w_disable_past_days=document.getElementById(e+"_dis_past_daysform_id_temp")?document.getElementById(e+"_dis_past_daysform_id_temp").value:"no";var g=document.getElementById(e+"_show_week_days");w_sunday=g.getAttribute("sunday"),w_monday=g.getAttribute("monday"),w_tuesday=g.getAttribute("tuesday"),w_wednesday=g.getAttribute("wednesday"),w_thursday=g.getAttribute("thursday"),w_friday=g.getAttribute("friday"),w_saturday=g.getAttribute("saturday"),w_show_days=[w_sunday,w_monday,w_tuesday,w_wednesday,w_thursday,w_friday,w_saturday],type_date_new(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_date,w_required,w_show_image,w_class,w_format,w_start_day,w_default_date,w_min_date,w_max_date,w_invalid_dates,w_show_days,w_hide_time,w_but_val,w_attr_name,w_attr_value,w_disable_past_days);break;case"type_date_range":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp0"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_date="",w_format=document.getElementById(e+"_buttonform_id_temp").getAttribute("format"),w_but_val=document.getElementById(e+"_buttonform_id_temp").value,s=document.getElementById(e+"_elementform_id_temp0").style.width,w_size=s.substring(0,s.length-2),w_start_day=document.getElementById(e+"_start_dayform_id_temp").value,w_default_date_start=document.getElementById(e+"_default_date_id_temp_start").value,w_default_date_end=document.getElementById(e+"_default_date_id_temp_end").value,w_min_date=document.getElementById(e+"_min_date_id_temp").value,w_max_date=document.getElementById(e+"_max_date_id_temp").value,w_invalid_dates=document.getElementById(e+"_invalid_dates_id_temp").value,w_hide_time=document.getElementById(e+"_hide_timeform_id_temp").value,w_show_image=document.getElementById(e+"_show_imageform_id_temp").value,w_disable_past_days=document.getElementById(e+"_dis_past_daysform_id_temp")?document.getElementById(e+"_dis_past_daysform_id_temp").value:"no";g=document.getElementById(e+"_show_week_days");w_sunday=g.getAttribute("sunday"),w_monday=g.getAttribute("monday"),w_tuesday=g.getAttribute("tuesday"),w_wednesday=g.getAttribute("wednesday"),w_thursday=g.getAttribute("thursday"),w_friday=g.getAttribute("friday"),w_saturday=g.getAttribute("saturday"),w_show_days=[w_sunday,w_monday,w_tuesday,w_wednesday,w_thursday,w_friday,w_saturday],type_date_range(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_date,w_required,w_show_image,w_class,w_format,w_start_day,w_default_date_start,w_default_date_end,w_min_date,w_max_date,w_invalid_dates,w_show_days,w_hide_time,w_but_val,w_attr_name,w_attr_value,w_disable_past_days);break;case"type_date_fields":atrs=return_attributes(e+"_dayform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_day=document.getElementById(e+"_dayform_id_temp").value,w_month=document.getElementById(e+"_monthform_id_temp").value,w_year=document.getElementById(e+"_yearform_id_temp").value,w_day_type=document.getElementById(e+"_dayform_id_temp").tagName,w_month_type=document.getElementById(e+"_monthform_id_temp").tagName,w_year_type=document.getElementById(e+"_yearform_id_temp").tagName,w_day_label=document.getElementById(e+"_day_label").innerHTML,w_month_label=document.getElementById(e+"_month_label").innerHTML,w_year_label=document.getElementById(e+"_year_label").innerHTML,s=document.getElementById(e+"_dayform_id_temp").style.width,w_day_size=s.substring(0,s.length-2),s=document.getElementById(e+"_monthform_id_temp").style.width,w_month_size=s.substring(0,s.length-2),s=document.getElementById(e+"_yearform_id_temp").style.width,w_year_size=s.substring(0,s.length-2),w_from=document.getElementById(e+"_yearform_id_temp").getAttribute("from"),w_to=document.getElementById(e+"_yearform_id_temp").getAttribute("to"),w_divider=document.getElementById(e+"_separator1").innerHTML,w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,type_date_fields(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_day,w_month,w_year,w_day_type,w_month_type,w_year_type,w_day_label,w_month_label,w_year_label,w_day_size,w_month_size,w_year_size,w_required,w_class,w_from,w_to,w_divider,w_attr_name,w_attr_value);break;case"type_own_select":jQuery("#"+e+"_elementform_id_temp option").each(function(){w_choices[t]=jQuery(this).html(),w_choices_value[t]=jQuery(this).val(),w_choices_checked[t]=jQuery(this)[0].selected,jQuery(this).attr("where")?w_choices_params[t]=jQuery(this).attr("where")+"[where_order_by]"+jQuery(this).attr("order_by")+"[db_info]"+jQuery(this).attr("db_info"):w_choices_params[t]="",jQuery(this).val()?w_choices_disabled[t]=!1:w_choices_disabled[t]=!0,t++}),w_value_disabled=document.getElementById(e+"_value_disabledform_id_temp").value,w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_own_select(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_choices,w_choices_checked,w_required,w_value_disabled,w_class,w_attr_name,w_attr_value,w_choices_disabled,w_choices_value,w_choices_params);break;case"type_paypal_select":for(jQuery("#"+e+"_elementform_id_temp option").each(function(){w_choices[t]=jQuery(this).html(),w_choices_price[t]=jQuery(this).val(),w_choices_checked[t]=jQuery(this)[0].selected,jQuery(this).attr("where")?w_choices_params[t]=jQuery(this).attr("where")+"[where_order_by]"+jQuery(this).attr("order_by")+"[db_info]"+jQuery(this).attr("db_info"):w_choices_params[t]="",""==jQuery(this)[0].value?w_choices_disabled[t]=!0:w_choices_disabled[t]=!1,t++}),k=0;k<100;k++)if(document.getElementById(e+"_propertyform_id_temp"+k))if(h.push(document.getElementById(e+"_property_label_form_id_temp"+k).innerHTML),document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length)for(b[h.length-1]=new Array,m=0;m<document.getElementById(e+"_propertyform_id_temp"+k).childNodes.length;m++)b[h.length-1].push(document.getElementById(e+"_propertyform_id_temp"+k).childNodes[m].value);else b.push("");w_quantity="no",w_quantity_value=1,document.getElementById(e+"_element_quantityform_id_temp")&&(w_quantity="yes",w_quantity_value=document.getElementById(e+"_element_quantityform_id_temp").value),w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_paypal_select(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_choices,w_choices_price,w_choices_checked,w_required,w_quantity,w_quantity_value,w_class,w_attr_name,w_attr_value,w_choices_disabled,h,b,w_choices_params);break;case"type_country":for(w_countries=[],select_=document.getElementById(e+"_elementform_id_temp"),n=select_.childNodes.length,i=0;i<n;i++)w_countries.push(select_.childNodes[i].value);w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_country(e,w_field_label,w_field_label_size,w_hide_label,w_countries,w_field_label_pos,w_size,w_required,w_class,w_attr_name,w_attr_value);break;case"type_file_upload":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_destination=document.getElementById(e+"_destination").value.replace("***destinationverj"+e+"***","").replace("***destinationskizb"+e+"***",""),w_extension=document.getElementById(e+"_extension").value.replace("***extensionverj"+e+"***","").replace("***extensionskizb"+e+"***",""),w_max_size=document.getElementById(e+"_max_size").value.replace("***max_sizeverj"+e+"***","").replace("***max_sizeskizb"+e+"***",""),w_multiple=document.getElementById(e+"_elementform_id_temp").getAttribute("multiple")?"yes":"no",atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_file_upload(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_destination,w_extension,w_max_size,w_required,w_multiple,w_class,w_attr_name,w_attr_value);break;case"type_captcha":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_digit=document.getElementById("_wd_captchaform_id_temp").getAttribute("digit"),atrs=return_attributes("_wd_captchaform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_captcha(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_digit,w_class,w_attr_name,w_attr_value);break;case"type_arithmetic_captcha":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_count=document.getElementById("_wd_arithmetic_captchaform_id_temp").getAttribute("operations_count"),w_operations=document.getElementById("_wd_arithmetic_captchaform_id_temp").getAttribute("operations"),w_input_size=document.getElementById("_wd_arithmetic_captchaform_id_temp").getAttribute("input_size"),atrs=return_attributes("_wd_captchaform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_arithmetic_captcha(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_count,w_operations,w_class,w_input_size,w_attr_name,w_attr_value);break;case"type_recaptcha":w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,w_type=document.getElementById("wd_recaptchaform_id_temp").getAttribute("w_type"),w_position=document.getElementById("wd_recaptchaform_id_temp").getAttribute("position"),type_recaptcha(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_type,w_position);break;case"type_map":for(w_lat=[],w_long=[],w_info=[],w_center_x=document.getElementById(e+"_elementform_id_temp").getAttribute("center_x"),w_center_y=document.getElementById(e+"_elementform_id_temp").getAttribute("center_y"),w_zoom=document.getElementById(e+"_elementform_id_temp").getAttribute("zoom"),w_width=""==document.getElementById(e+"_elementform_id_temp").style.width?"":parseInt(document.getElementById(e+"_elementform_id_temp").style.width),w_height=parseInt(document.getElementById(e+"_elementform_id_temp").style.height),j=0;j<=20;j++)document.getElementById(e+"_elementform_id_temp").getAttribute("lat"+j)&&(w_lat.push(document.getElementById(e+"_elementform_id_temp").getAttribute("lat"+j)),w_long.push(document.getElementById(e+"_elementform_id_temp").getAttribute("long"+j)),w_info.push(document.getElementById(e+"_elementform_id_temp").getAttribute("info"+j)));atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_map(e,w_center_x,w_center_y,w_long,w_lat,w_zoom,w_width,w_height,w_class,w_info,w_attr_name,w_attr_value);break;case"type_mark_map":w_info=document.getElementById(e+"_elementform_id_temp").getAttribute("info0"),w_long=document.getElementById(e+"_elementform_id_temp").getAttribute("long0"),w_lat=document.getElementById(e+"_elementform_id_temp").getAttribute("lat0"),w_zoom=document.getElementById(e+"_elementform_id_temp").getAttribute("zoom"),w_width=""==document.getElementById(e+"_elementform_id_temp").style.width?"":parseInt(document.getElementById(e+"_elementform_id_temp").style.width),w_height=parseInt(document.getElementById(e+"_elementform_id_temp").style.height),w_center_x=document.getElementById(e+"_elementform_id_temp").getAttribute("center_x"),w_center_y=document.getElementById(e+"_elementform_id_temp").getAttribute("center_y"),w_hide_label=document.getElementById(e+"_hide_labelform_id_temp").value,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_mark_map(e,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_center_x,w_center_y,w_long,w_lat,w_zoom,w_width,w_height,w_class,w_info,w_attr_name,w_attr_value);break;case"type_submit_reset":atrs=return_attributes(e+"_element_submitform_id_temp"),w_act=!("none"==document.getElementById(e+"_element_resetform_id_temp").style.display),w_attr_name=atrs[0],w_attr_value=atrs[1],w_submit_title=document.getElementById(e+"_element_submitform_id_temp").value,w_reset_title=document.getElementById(e+"_element_resetform_id_temp").value,type_submit_reset(e,w_submit_title,w_reset_title,w_class,w_act,w_attr_name,w_attr_value);break;case"type_button":for(w_title=new Array,w_func=new Array,t=0,v=0,k=0;k<100;k++)document.getElementById(e+"_elementform_id_temp"+k)&&(w_title[t]=document.getElementById(e+"_elementform_id_temp"+k).value,w_func[t]=document.getElementById(e+"_elementform_id_temp"+k).getAttribute("onclick"),t++,v=k);atrs=return_attributes(e+"_elementform_id_temp"+v),w_attr_name=atrs[0],w_attr_value=atrs[1],type_button(e,w_title,w_func,w_class,w_attr_name,w_attr_value);break;case"type_hidden":w_value=document.getElementById(e+"_elementform_id_temp").value,w_name=document.getElementById(e+"_elementform_id_temp").name,atrs=return_attributes(e+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],type_hidden(e,w_name,w_value,w_attr_name,w_attr_value)}void 0!==a&&(a.stopPropagation(),a.preventDefault())}function fm_add_page(){for(t=form_view_max;0<t;t--)if(document.getElementById("form_id_tempform_view"+t)){form_view=t;break}if(form_view_count=jQuery(".wdform-page-and-images").length,1==form_view_count){(a=document.createElement("span")).setAttribute("title","Edit the pagination options"),a.setAttribute("class","page_toolbar fm-ico-edit"),a.setAttribute("onclick","el_page_navigation()");var e=document.getElementById("edit_page_navigation");e.appendChild(a),document.getElementById("page_navigation").appendChild(e)}jQuery("#page_bar").removeClass("form_view_hide"),old_to_gen=form_view,form_view_max++,form_view=form_view_max,1<form_view&&jQuery(".form_id_tempform_view_img").removeClass("form_view_hide"),table=document.createElement("div"),table.setAttribute("class","wdform-page-and-images fm-form-builder"),form_tempform_view=document.createElement("div"),form_tempform_view.setAttribute("id","form_id_tempform_view"+form_view),form_tempform_view.setAttribute("page_title","Untitled Page"),form_tempform_view.setAttribute("class","wdform_page"),page_toolbar_wrap=document.createElement("div"),page_toolbar_wrap.setAttribute("id","form_id_tempform_view_img"+form_view),page_toolbar_wrap.setAttribute("class","form_id_tempform_view_img"),page_title_div=document.createElement("div"),page_title_div.setAttribute("class","wdform_page_title"),page_toolbar_wrap.appendChild(page_title_div),page_toolbar=document.createElement("div");var i=document.createElement("span");i.setAttribute("title","Show or hide the page"),i.setAttribute("class","page_toolbar fm-ico-collapse"),i.setAttribute("id","show_page_img_"+form_view),i.setAttribute("onClick",'show_or_hide("'+form_view+'"); change_show_hide_icon(this);');var a,n=document.createElement("span");n.setAttribute("title","Delete the page"),n.setAttribute("class","page_toolbar fm-ico-delete"),n.setAttribute("onclick",'remove_page("'+form_view+'")'),(a=document.createElement("span")).setAttribute("title","Edit the page"),a.setAttribute("class","page_toolbar fm-ico-edit"),a.setAttribute("onclick",'edit_page_break("'+form_view+'")'),page_toolbar.appendChild(n),page_toolbar.appendChild(a),page_toolbar.appendChild(i),page_toolbar_wrap.appendChild(page_toolbar),tr=document.createElement("div"),tr.setAttribute("class","wdform_section"),tr_page_nav=document.createElement("div"),tr_page_nav.setAttribute("valign","top"),tr_page_nav.setAttribute("class","wdform_footer"),tr_page_nav.style.width="100%",td_page_nav=document.createElement("div"),td_page_nav.style.width="100%",table_min_page_nav=document.createElement("div"),table_min_page_nav.style.width="100%",table_min_page_nav.style.display="table",tbody_min_page_nav=document.createElement("div"),tbody_min_page_nav.style.display="table-row-group",tr_min_page_nav=document.createElement("div"),tr_min_page_nav.setAttribute("id","form_id_temppage_nav"+form_view),tr_min_page_nav.style.display="table-row",table_min=document.createElement("div"),table_min.setAttribute("class","wdform_column"),table_min1=document.createElement("div"),table_min1.setAttribute("class","wdform_column"),tr.appendChild(table_min),tbody_min_page_nav.appendChild(tr_min_page_nav),table_min_page_nav.appendChild(tbody_min_page_nav),td_page_nav.appendChild(table_min_page_nav),tr_page_nav.appendChild(td_page_nav),form_tempform_view.appendChild(tr),form_tempform_view.appendChild(tr_page_nav),table.appendChild(page_toolbar_wrap),table.appendChild(form_tempform_view),document.getElementById("take").insertBefore(table,document.getElementById("add_field_cont")),form_view_element=document.getElementById("form_id_tempform_view"+form_view),form_view_element.setAttribute("next_title","Next"),form_view_element.setAttribute("next_type","text"),form_view_element.setAttribute("next_class","wdform-page-button"),form_view_element.setAttribute("next_checkable","true"),form_view_element.setAttribute("previous_title","Previous"),form_view_element.setAttribute("previous_type","text"),form_view_element.setAttribute("previous_class","wdform-page-button"),form_view_element.setAttribute("previous_checkable","false"),form_view_element.setAttribute("page_title","Untitled Page"),page_title_div.innerHTML='<span class="fm-ico-draggable"></span>Untitled Page',2==form_view_count?(generate_page_nav(form_view),generate_page_nav(old_to_gen)):generate_page_nav(form_view),all_sortable_events(),jQuery(".wdform_arrows").hide(),draggable_page_break(nextID,form_view_max),nextID="",form_view_element.scrollIntoView()}function add(e,a,d){if("type_grading"==document.getElementById("element_type").value){for(k=100;0<k&&!document.getElementById("el_items"+k);k--);m=k;var _="";for(i=0;i<=m;i++)document.getElementById("el_items"+i)&&(_=_+document.getElementById("el_items"+i).value+":");_+=document.getElementById("element_total").value,document.getElementById("editing_id").value?id=document.getElementById("editing_id").value:id=gen;var r=document.createElement("input");r.setAttribute("id",id+"_hidden_itemform_id_temp"),r.setAttribute("name",id+"_hidden_itemform_id_temp"),r.setAttribute("type","hidden"),r.setAttribute("value",_),(p=document.getElementById(id+"_element_sectionform_id_temp")).appendChild(r)}if("type_matrix"==document.getElementById("element_type").value){for(i=100;0<i&&!document.getElementById("el_rows"+i);i--);for(m=i,i=100;0<i&&!document.getElementById("el_columns"+i);i--);n=i;var o="",s="",u="",c="";for(i=1;i<=m;i++)document.getElementById("el_rows"+i)&&(o=o+document.getElementById("el_rows"+i).value+"***",u+=i+",");for(i=1;i<=n;i++)document.getElementById("el_columns"+i)&&(s=s+document.getElementById("el_columns"+i).value+"***",c+=i+",");document.getElementById("editing_id").value?id=document.getElementById("editing_id").value:id=gen;var p=document.getElementById(id+"_element_sectionform_id_temp"),f=document.createElement("input");f.setAttribute("id",id+"_hidden_rowform_id_temp"),f.setAttribute("name",id+"_hidden_rowform_id_temp"),f.setAttribute("type","hidden"),f.setAttribute("value",o);var y=document.createElement("input");y.setAttribute("id",id+"_row_idsform_id_temp"),y.setAttribute("name",id+"_row_idsform_id_temp"),y.setAttribute("type","hidden"),y.setAttribute("value",u);var h=document.createElement("input");h.setAttribute("id",id+"_hidden_columnform_id_temp"),h.setAttribute("name",id+"_hidden_columnform_id_temp"),h.setAttribute("type","hidden"),h.setAttribute("value",s);var b=document.createElement("input");b.setAttribute("id",id+"_column_idsform_id_temp"),b.setAttribute("name",id+"_column_idsform_id_temp"),b.setAttribute("type","hidden"),b.setAttribute("value",c),p.appendChild(f),p.appendChild(y),p.appendChild(h),p.appendChild(b)}if("type_section_break"==document.getElementById("element_type").value){for(form_view=0,t=form_view_max;0<t;t--)if(document.getElementById("form_id_tempform_view"+t)&&jQuery("#form_id_tempform_view"+t).is(":visible")){form_view=t;break}if(0==form_view)return void alert("The pages are closed");if(document.getElementById("editing_id").value)i=document.getElementById("editing_id").value,document.getElementById("editing_id").value="",wdform_field_in_editor=document.getElementById(i+"_element_sectionform_id_temp"),ifr_id="form_maker_editor_ifr",ifr=getIFrameDocument(ifr_id),"none"==document.getElementById("form_maker_editor").style.display?wdform_field_in_editor.innerHTML=ifr.body.innerHTML:wdform_field_in_editor.innerHTML=document.getElementById("form_maker_editor").value;else{i=gen,gen++,(L=document.createElement("div")).setAttribute("wdid",i),L.setAttribute("type","type_section_break"),L.setAttribute("class","wdform_tr_section_break"),(z=document.createElement("div")).setAttribute("id","wdform_field"+i),z.setAttribute("type","type_section_break"),z.setAttribute("class","wdform_field_section_break"),(q=document.createElement("div")).setAttribute("id","wdform_arrows"+i),q.setAttribute("class","wdform_arrows"),q.style.display="none",z.appendChild(q),L.appendChild(z),(x=document.createElement("div")).setAttribute("id",i+"_element_labelform_id_temp"),x.style.color="red",x.innerHTML="Section Break",L.appendChild(x),wdform_page=document.getElementById("form_id_tempform_view"+form_view);var g='<span class="wdform_arrows_basic wdform_arrows_container"><span id="edit_'+i+'" valign="middle" class="element_toolbar"><span title="Edit the field" class="page_toolbar fm-ico-edit" ontouchend="edit(&quot;'+i+'&quot;, event)" onclick="edit(&quot;'+i+'&quot;, event)"></span></span><span id="duplicate_'+i+'" valign="middle" class="element_toolbar"><span title="Duplicate the field" class="page_toolbar fm-ico-duplicate" ontouchend="duplicate(&quot;'+i+'&quot;, event)" onclick="duplicate(&quot;'+i+'&quot;, event)"></span></span><span id="X_'+i+'" valign="middle" align="right" class="element_toolbar"><span title="Remove the field" class="page_toolbar fm-ico-delete" onclick="remove_section_break(&quot;'+i+'&quot;)"></span></span></span>';q.innerHTML=g;var E=document.createElement("div");E.setAttribute("id",i+"_element_sectionform_id_temp"),E.setAttribute("align","left"),E.setAttribute("class","wdform_section_break"),ifr_id="form_maker_editor_ifr",ifr=getIFrameDocument(ifr_id),"none"==document.getElementById("form_maker_editor").style.display?E.innerHTML=ifr.body.innerHTML:E.innerHTML=document.getElementById("form_maker_editor").value,(I=document.createElement("span")).setAttribute("id",i+"_element_labelform_id_temp"),I.innerHTML="Custom HTML"+i,I.style.cssText="display:none",z.appendChild(E),beforeTr=wdform_page.lastChild,wdform_page.insertBefore(L,beforeTr),wdform_section_new=document.createElement("div"),wdform_section_new.setAttribute("class","wdform_section"),wdform_column_new=document.createElement("div"),wdform_column_new.setAttribute("class","wdform_column"),wdform_column_new1=document.createElement("div"),wdform_column_new1.setAttribute("class","wdform_column"),wdform_section_new.appendChild(wdform_column_new1),draggable_section_break(nextID,L),nextID="",j=2}return jQuery(".wdform_arrows").hide(),close_window(),void all_sortable_events()}if("type_page_navigation"==document.getElementById("element_type").value)return document.getElementById("pages").setAttribute("show_title",document.getElementById("el_show_title_input").checked),document.getElementById("pages").setAttribute("show_numbers",document.getElementById("el_show_numbers_input").checked),document.getElementById("el_pagination_steps").checked?(document.getElementById("pages").setAttribute("type","steps"),make_page_steps_front()):document.getElementById("el_pagination_percentage").checked?(document.getElementById("pages").setAttribute("type","percentage"),make_page_percentage_front()):(document.getElementById("pages").setAttribute("type","none"),make_page_none_front()),refresh_page_numbers(),void close_window();if("type_page_break"==document.getElementById("element_type").value&&document.getElementById("editing_id").value){i=document.getElementById("editing_id").value,form_view_element=document.getElementById("form_id_tempform_view"+i),page_title=document.getElementById("_div_between").getAttribute("page_title"),next_title=document.getElementById("_div_between").getAttribute("next_title"),next_type=document.getElementById("_div_between").getAttribute("next_type"),next_class=document.getElementById("_div_between").getAttribute("next_class"),next_checkable=document.getElementById("_div_between").getAttribute("next_checkable"),previous_title=document.getElementById("_div_between").getAttribute("previous_title"),previous_type=document.getElementById("_div_between").getAttribute("previous_type"),previous_class=document.getElementById("_div_between").getAttribute("previous_class"),previous_checkable=document.getElementById("_div_between").getAttribute("previous_checkable"),form_view_element.setAttribute("next_title",next_title),form_view_element.setAttribute("next_type",next_type),form_view_element.setAttribute("next_class",next_class),form_view_element.setAttribute("next_checkable",next_checkable),form_view_element.setAttribute("previous_title",previous_title),form_view_element.setAttribute("previous_type",previous_type),form_view_element.setAttribute("previous_class",previous_class),form_view_element.setAttribute("previous_checkable",previous_checkable),form_view_element.setAttribute("page_title",page_title),document.getElementById("form_id_tempform_view_img"+i).firstChild.innerHTML='<span class="fm-ico-draggable"></span>'+page_title;var A=document.getElementById("_div_between");for(atr=A.attributes,v=0;v<30;v++)atr[v]&&0==atr[v].name.indexOf("add_")&&form_view_element.setAttribute(atr[v].name,atr[v].value);return form_view_count=jQuery(".wdform-page-and-images").length,1!=form_view_count&&generate_page_nav(form_view),sortable_columns(),jQuery(".wdform_arrows").hide(),void close_window()}for(form_view=0,t=form_view_max;0<t;t--)if(document.getElementById("form_id_tempform_view"+t)&&jQuery("#form_id_tempform_view"+t).is(":visible")){form_view=t;break}if(0!=form_view){if("block"==document.getElementById("main_editor").style.display){if(document.getElementById("editing_id").value)i=document.getElementById("editing_id").value,document.getElementById("editing_id").value="",destroyChildren(z=document.getElementById("wdform_field"+i)),ifr_id="form_maker_editor_ifr",ifr=getIFrameDocument(ifr_id),"none"==document.getElementById("form_maker_editor").style.display?z.innerHTML=ifr.body.innerHTML:z.innerHTML=document.getElementById("form_maker_editor").value,j=2;else{var x;i=gen,gen++,(x=document.createElement("option")).setAttribute("id",i+"_sel_el_pos"),x.setAttribute("value",i),x.innerHTML="Custom HTML"+i,l=document.getElementById("form_id_tempform_view"+form_view).childNodes.length,wdform_column=document.getElementById("form_id_tempform_view"+form_view).childNodes[l-2].firstChild,(L=document.createElement("div")).setAttribute("wdid",i),L.setAttribute("class","wdform_row ui-sortable-handle"),(z=document.createElement("div")).setAttribute("id","wdform_field"+i),z.setAttribute("type","type_editor"),z.setAttribute("class","wdform_field"),z.style.cssText="margin-top:0px",(q=document.createElement("div")).setAttribute("id","wdform_arrows"+i),q.setAttribute("class","wdform_arrows"),q.style.display="none",L.appendChild(z),L.appendChild(q);var I;g='<span class="wdform_arrows_advanced wdform_arrows_container"><span id="left_'+i+'" valign="middle" class="element_toolbar"><span title="Move the field to the left" class="page_toolbar dashicons dashicons-arrow-left-alt" onclick="left_row(&quot;'+i+'&quot;)"></span></span><span id="up_'+i+'" valign="middle" class="element_toolbar"><span title="Move the field up" class="page_toolbar dashicons dashicons-arrow-up-alt" onclick="up_row(&quot;'+i+'&quot;)"></span></span><span id="down_'+i+'" valign="middle" class="element_toolbar"><span title="Move the field down" class="page_toolbar dashicons dashicons-arrow-down-alt" onclick="down_row(&quot;'+i+'&quot;)"></span></span><span id="right_'+i+'" valign="middle" class="element_toolbar"><span title="Move the field to the right" class="page_toolbar dashicons dashicons-arrow-right-alt" onclick="right_row(&quot;'+i+'&quot;)"></span></span><span id="page_up_'+i+'" valign="middle" class="element_toolbar"><span title="Move the field to the upper page" class="page_toolbar dashicons dashicons-upload" onclick="page_up(&quot;'+i+'&quot;)"></span></span><span id="page_down_'+i+'" valign="middle" class="element_toolbar"><span title="Move the field to the lower page" class="page_toolbar dashicons dashicons-download" onclick="page_down(&quot;'+i+'&quot;)"></span></span></span><span class="wdform_arrows_basic wdform_arrows_container"><span id="edit_'+i+'" valign="middle" class="element_toolbar"><span title="Edit the field" class="page_toolbar fm-ico-edit" ontouchend="edit(&quot;'+i+'&quot;, event)" onclick="edit(&quot;'+i+'&quot;, event)"></span></span><span id="duplicate_'+i+'" valign="middle" class="element_toolbar"><span title="Duplicate the field" class="page_toolbar fm-ico-duplicate" ontouchend="duplicate(duplicate(&quot;'+i+'&quot;, event))" onclick="duplicate(&quot;'+i+'&quot;, event)"></span></span><span id="X_'+i+'" valign="middle" align="right" class="element_toolbar"><span title="Remove the field" class="page_toolbar fm-ico-delete" ontouchend="remove_field(&quot;'+i+'&quot;, event)" onclick="remove_field(&quot;'+i+'&quot;, event)"></span></span></span>';q.innerHTML=g,ifr_id="form_maker_editor_ifr",ifr=getIFrameDocument(ifr_id),"none"==document.getElementById("form_maker_editor").style.display?z.innerHTML=ifr.body.innerHTML:z.innerHTML=document.getElementById("form_maker_editor").value,(I=document.createElement("span")).setAttribute("id",i+"_element_labelform_id_temp"),I.innerHTML="Custom HTML"+i,I.style.color="red",L.appendChild(I),add_field_in_position(nextID,L),nextID="",j=2}close_window()}else if(document.getElementById("show_table").innerHTML){if(document.getElementById("editing_id").value?i=document.getElementById("editing_id").value:i=gen,type=document.getElementById("element_type").value,"type_hidden"==type&&""==document.getElementById(i+"_elementform_id_temp").name)return void alert("The name of the field is required.");if("type_map"==type){if(void 0===gmapdata[i]||void 0===gmapdata[i].getCenter())return alert("Please go to Global Options to setup the Map API key. It may take up to 5 minutes for API key change to take effect."),!1;if_gmap_updateMap(i)}if("type_mark_map"==type){if(void 0===gmapdata[i]||void 0===gmapdata[i].getCenter())return alert("Please go to Global Options to setup the Map API key. It may take up to 5 minutes for API key change to take effect."),!1;if_gmap_updateMap(i)}if(!document.getElementById(i+"_element_labelform_id_temp").innerHTML)return void alert("The field label is required.");if(document.getElementById("editing_id").value){for(Disable(),i=document.getElementById("editing_id").value,in_lab=!1,labels_array=new Array,w=0;w<gen;w++)w!=i&&document.getElementById(w+"_element_labelform_id_temp")&&labels_array.push(document.getElementById(w+"_element_labelform_id_temp").innerHTML);for(t=0;t<labels_array.length;t++)if(document.getElementById(i+"_element_labelform_id_temp").innerHTML==labels_array[t]){in_lab=!0;break}if(in_lab)return void alert("Sorry, the labels must be unique.");document.getElementById("editing_id").value="",z=document.getElementById("wdform_field"+i),q=document.getElementById("wdform_arrows"+i),destroyChildren(z);var C=document.getElementById(i+"_label_sectionform_id_temp"),B=document.getElementById(i+"_element_sectionform_id_temp");if(z.appendChild(q),z.appendChild(C),z.appendChild(B),"type_submitter_mail"==type||"type_password"==type){var Q=document.createElement("br"),T=document.getElementById(i+"_1_label_sectionform_id_temp"),M=document.getElementById(i+"_1_element_sectionform_id_temp");z.appendChild(Q),z.appendChild(T),z.appendChild(M)}j=2,close_window(),call(i,e)}else{for(i=gen,in_lab=!1,labels_array=new Array,w=0;w<gen;w++)document.getElementById(w+"_element_labelform_id_temp")&&labels_array.push(document.getElementById(w+"_element_labelform_id_temp").innerHTML);for(t=0;t<labels_array.length;t++)if(document.getElementById(i+"_element_labelform_id_temp").innerHTML==labels_array[t]){in_lab=!0;break}if(in_lab)return void alert("Sorry, the labels must be unique.");var L,z,q;"type_address"==type?gen+=6:gen++,l=document.getElementById("form_id_tempform_view"+form_view).childNodes.length,wdform_column=document.getElementById("form_id_tempform_view"+form_view).childNodes[l-2].firstChild,(L=document.createElement("div")).setAttribute("wdid",i),L.setAttribute("class","wdform_row ui-sortable-handle"),(z=document.createElement("div")).setAttribute("id","wdform_field"+i),z.setAttribute("type",type),z.setAttribute("class","wdform_field"),z.style.display="table-cell",(q=document.createElement("div")).setAttribute("id","wdform_arrows"+i),q.setAttribute("class","wdform_arrows"),q.style.display="none",L.appendChild(q),L.appendChild(z);g='<span class="wdform_arrows_advanced wdform_arrows_container"><span id="left_'+i+'" valign="middle" class="element_toolbar"><span title="Move the field to the left" class="page_toolbar dashicons dashicons-arrow-left-alt" onclick="left_row(&quot;'+i+'&quot;)"></span></span><span id="up_'+i+'" valign="middle" class="element_toolbar"><span title="Move the field up" class="page_toolbar dashicons dashicons-arrow-up-alt" onclick="up_row(&quot;'+i+'&quot;)"></span></span><span id="down_'+i+'" valign="middle" class="element_toolbar"><span title="Move the field down" class="page_toolbar dashicons dashicons-arrow-down-alt" onclick="down_row(&quot;'+i+'&quot;)"></span></span><span id="right_'+i+'" valign="middle" class="element_toolbar"><span title="Move the field to the right" class="page_toolbar dashicons dashicons-arrow-right-alt" onclick="right_row(&quot;'+i+'&quot;)"></span></span><span id="page_up_'+i+'" valign="middle" class="element_toolbar"><span title="Move the field to the upper page" class="page_toolbar dashicons dashicons-upload" onclick="page_up(&quot;'+i+'&quot;)"></span></span><span id="page_down_'+i+'" valign="middle" class="element_toolbar"><span title="Move the field to the lower page" class="page_toolbar dashicons dashicons-download" onclick="page_down(&quot;'+i+'&quot;)"></span></span></span><span class="wdform_arrows_basic wdform_arrows_container"><span id="edit_'+i+'" valign="middle" class="element_toolbar"><span title="Edit the field" class="page_toolbar fm-ico-edit" ontouchend="edit(&quot;'+i+'&quot;, event)" onclick="edit(&quot;'+i+'&quot;, event)"></span></span>'+("type_captcha"!=type&&"type_arithmetic_captcha"!=type&&"type_recaptcha"!=type&&"type_send_copy"!=type&&"type_stripe"!=type?'<span id="duplicate_'+i+'" valign="middle" class="element_toolbar"><span title="Duplicate the field" class="page_toolbar fm-ico-duplicate" ontouchend="duplicate(&quot;'+i+'&quot;, event)" onclick="duplicate(&quot;'+i+'&quot;, event)"></span></span>':"")+'<span id="X_'+i+'" valign="middle" align="right" class="element_toolbar"><span title="Remove the field" class="page_toolbar fm-ico-delete" ontouchend="remove_field(&quot;'+i+'&quot;, event)" onclick="remove_field(&quot;'+i+'&quot;, event)"></span></span></span>';q.innerHTML=g;C=document.getElementById(i+"_label_sectionform_id_temp"),B=document.getElementById(i+"_element_sectionform_id_temp");if(z.appendChild(C),z.appendChild(B),"type_submitter_mail"==type||"type_password"==type){Q=document.createElement("br"),T=document.getElementById(i+"_1_label_sectionform_id_temp"),M=document.getElementById(i+"_1_element_sectionform_id_temp");z.appendChild(Q),z.appendChild(T),z.appendChild(M)}add_field_in_position(nextID,L),nextID="",j=2,close_window(),call(i,e)}}else alert("Please select an element to add.");jQuery(".wdform_arrows_advanced").hide(),jQuery(".wdform_page input[type='text'], .wdform_page input[type='password'], .wdform_page input[type='file'], .wdform_page textarea, .wdform_page input[type='checkbox'], .wdform_page input[type='radio'], .wdform_page select").prop("disabled",!0),all_sortable_events()}else alert("The pages are closed")}function move_submit_to_end(e){var t=jQuery(e).children(":not(.fm-hidden)").last();return!!t.find("[type=type_submit_reset]").length&&t}function add_field_in_position(e,t){if(null==e||""==e){var i=jQuery("#cur_column");if(1==i.val()){var a=jQuery('<div class="wdform_column"></div>').append(t),n=move_submit_to_end(i);!1!==n?jQuery(a).insertBefore(n):i.append(a)}else i.append(t)}else beforeTr=document.getElementById("wdform_field"+e).parentNode,wdform_column=beforeTr.parentNode,wdform_column.insertBefore(t,beforeTr);jQuery(window).scrollTop(jQuery(t).offset().top-100),jQuery("#cur_column").removeAttr("id")}function draggable_page_break(e,t){var i=jQuery(".wdform_row[wdid='"+e+"']"),a="form_id_tempform_view"+t;if(!(null==e||""==e||2<get_child_count())){var n=jQuery("#cur_column").parent().parent().attr("id"),l=parseInt(n.substr(n.indexOf("form_id_tempform_view")+21));if(2==t)jQuery("#form_id_tempform_view"+t+" .wdform_section .wdform_column:first-child").append(jQuery(i.nextAll().andSelf()));else if(n==a)jQuery("#form_id_tempform_view"+t+" .wdform_section .wdform_column:first-child").append(jQuery(i.nextAll().andSelf()));else{for(var d=t-l,_=t,r=1;r<d;r++)jQuery("#form_id_tempform_view"+_+" .wdform_section .wdform_column:first-child").append(jQuery("#form_id_tempform_view"+(_-1)+" .wdform_section .wdform_column:first-child .wdform_row")),_--;jQuery("#form_id_tempform_view"+_+" .wdform_section .wdform_column:first-child").append(jQuery(i.nextAll().andSelf()))}jQuery("#cur_column").removeAttr("id")}}function get_child_count(){var e=document.getElementById("cur_column").parentNode;return child=e.children,child.length}function draggable_section_break(e,t){if(null==e||""==e)return beforeTr=wdform_page.lastChild,void wdform_page.insertBefore(wdform_section_new,beforeTr);if(2<get_child_count())return beforeTr=wdform_page.lastChild,void wdform_page.insertBefore(wdform_section_new,beforeTr);beforeTr=document.getElementById("wdform_field"+e).parentNode,wdform_column=beforeTr.parentNode,wdform_section=wdform_column.parentNode,wdform_column.insertBefore(t,beforeTr);var a=jQuery("#cur_column").find("[wdid='"+i+"']");jQuery("<div class='wdform_section curr'><div class='wdform_column ui-sortable'>").insertAfter(a.parent().parent()).append(a.nextAll().andSelf()),jQuery(".wdform_section .wdform_tr_section_break").each(function(){jQuery(this).insertBefore(jQuery(this).parent())}),jQuery("#cur_column").removeAttr("id"),jQuery(".curr").children().appendTo(".curr .wdform_column"),jQuery(".curr").append("<div class='wdform_column ui-sortable'></div>"),jQuery(".curr").removeClass("curr")}function call(e,t){need_enable=!1,after_edit=!1,0==t&&(after_edit=!0,edit(e),add("1",after_edit,e)),need_enable=!0}function popup_ready(){jQuery(".popup-title").html(form_maker.add_field),jQuery("#add-button-cont").html(""),jQuery("#field_container .fm-free-message").addClass("fm-hidden"),jQuery(".field-types-filter").val(""),filter(jQuery(".field-types-filter")),jQuery(".field_types .postbox button.wd-button").removeClass("button-primary"),jQuery(".field_types").show(),jQuery("#field_container").removeClass("field_container_full"),jQuery(".add-popup").slideToggle(200)}function close_window(){need_enable&&popup_ready(),need_enable=!0,document.getElementById("edit_table").innerHTML="",document.getElementById("show_table").innerHTML="",document.getElementById("main_editor").style.display="none",document.getElementById("form_maker_editor_ifr")&&(ifr_id="form_maker_editor_ifr",ifr=getIFrameDocument(ifr_id),ifr.body.innerHTML=""),document.getElementById("form_maker_editor").value="",document.getElementById("editing_id").value="",document.getElementById("element_type").value=""}function addRow(e,t,i,a){if(jQuery(".field_types .postbox button.wd-button").removeClass("button-primary"),jQuery(t).addClass("button-primary"),void 0===a)a="";document.getElementById("show_table").innerHTML&&(document.getElementById("show_table").innerHTML="",document.getElementById("edit_table").innerHTML="");var n=""==jQuery("#editing_id").val()?gen:jQuery("#editing_id").val();window["el_"+i](a,n),fm_add_field_button(t,a)}function fm_add_field_button(e,t){jQuery(e).hasClass("wd-pro-fields")&&"stripe"!=t?(jQuery("#edit_main_table input").attr("disabled","disabled"),jQuery("#edit_main_table textarea").attr("disabled","disabled"),jQuery("#edit_main_table .fm-input-container span.dashicons").attr("onclick",""),jQuery("#add-button-cont").removeClass("add-button-cont").html(""),jQuery("#premium_message").removeClass("fm-hidden"),jQuery("#stripe_message").addClass("fm-hidden"),jQuery("#field_container .popup-body-col").addClass("fm-opacity-40")):"stripe"!=t||0!=is_addon_stripe_active&&0!=is_stripe_enabled?(jQuery("#add-button-cont").addClass("add-button-cont").html('<button class="button button-primary button-hero wd-add-button" onclick="add(0, false); return false;">'+form_maker.add+"</button>"),jQuery("#premium_message").addClass("fm-hidden"),jQuery("#stripe_message").addClass("fm-hidden"),jQuery("#field_container .popup-body-col").removeClass("fm-opacity-40")):(jQuery("#edit_main_table input").attr("disabled","disabled"),jQuery("#edit_main_table textarea").attr("disabled","disabled"),jQuery("#edit_main_table .fm-input-container span.dashicons").attr("onclick",""),jQuery(e).hasClass("wd-pro-fields")||0!=is_stripe_enabled||1!=is_addon_stripe_active?(jQuery("#add-button-cont").removeClass("add-button-cont").html(""),jQuery("#premium_message").addClass("fm-hidden"),jQuery("#stripe_message").removeClass("fm-hidden"),jQuery("#field_container .popup-body-col").addClass("fm-opacity-40")):(jQuery("#add-button-cont").removeClass("add-button-cont").html('<div class="error"><p>'+form_maker.stripe3+"</p></div>"),jQuery("#premium_message").addClass("fm-hidden"),jQuery("#stripe_message").addClass("fm-hidden"),jQuery("#field_container .popup-body-col").removeClass("fm-opacity-40")))}function el_text(e,t){window["go_to_type_"+e](t)}function el_checkbox(e,t){w_choices=["option 1","option 2"],w_choices_checked=[!1,!1],w_choices_value=["option 1","option 2"],w_choices_params=["",""],w_attr_name=[],w_attr_value=[],type_checkbox(t,"Multiple Choice","","top","right","no","ver",w_choices,w_choices_checked,"1","no","no","no","0","",w_attr_name,w_attr_value,"no",w_choices_value,w_choices_params)}function el_radio(e,t){w_choices=["option 1","option 2"],w_choices_checked=[!1,!1],w_choices_value=["option 1","option 2"],w_choices_params=["",""],w_attr_name=[],w_attr_value=[],type_radio(t,"Single Choice","","top","right","no","ver",w_choices,w_choices_checked,"1","no","no","no","0","",w_attr_name,w_attr_value,"no",w_choices_value,w_choices_params)}function el_survey(e,t){window["go_to_type_"+e](t)}function el_time_and_date(e,t){window["go_to_type_"+e](t)}function el_select(e,t){window["go_to_type_"+e](t)}function el_file_upload(e,t){w_attr_name=[],w_attr_value=[],type_file_upload(t,"Upload a File","","top","no","form-maker","jpg, jpeg, png, gif, bmp, tif, tiff, svg, pdf, txt, log, doc, docx, csv, xls, xlsx, pps, ppt, pptx, xml, mp3, mp4, wma, wav, mpg, wmv","2000","no","no","",w_attr_name,w_attr_value)}function el_section_break(e,t){type_section_break(t,"<div class='wdform-section-break-div' style='min-width: 300px; border-top:1px solid'></div>")}function el_page_break(e,t){w_page_title="Untitled Page",w_title=["Next","Previous"],w_type=["text","text"],w_class=["wdform-page-button","wdform-page-button"],w_check=["true","false"],w_attr_name=[],w_attr_value=[],type_page_break("0",w_page_title,w_title,w_type,w_class,w_check,w_attr_name,w_attr_value)}function el_map(e,t){w_long=["2.294254"],w_lat=["48.858334"],w_info=[""],w_attr_name=[],w_attr_value=[],type_map(t,"2.294254","48.858334",w_long,w_lat,"13","370","300","wdform_map",w_info,w_attr_name,w_attr_value)}function el_paypal(e,t){window["go_to_type_"+e](t)}function el_captcha(e,t){document.getElementById("_wd_captchaform_id_temp")||document.getElementById("_wd_arithmetic_captchaform_id_temp")||document.getElementById("wd_recaptchaform_id_temp")?alert(form_maker.captcha_created):window["go_to_type_"+e](t)}function el_button(e,t){window["go_to_type_"+e](t)}function el_editor(e,t){type_editor(t,"")}function create_option_container(e,t,i,a){var n=jQuery('<div class="fm-option-container"'+(void 0!==i?' id="'+i+'"':"")+(0==a?' style="display: none;"':"")+"></div>");if(null!=e){var l=jQuery('<div class="fm-label-container"></div>');l.append(e),n.append(l)}if(null!=t){var d=jQuery('<div class="fm-input-container'+(null==e?" fm-width-100":"")+'"></div>');d.append(t),n.append(d)}return n}function create_advanced_options_container(e,t,i){var a=jQuery("<div"+(null!=t?' id="'+t+'"':"")+' class="postbox closed"'+(0==i?' style="display: none;"':"")+"></div>"),n=jQuery('<button class="handlediv" type="button" aria-expanded="true" onclick="fm_toggle_postbox(this);"><span class="screen-reader-text">Toggle panel</span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class="hndle ui-sortable-handle" onclick="fm_toggle_postbox(this);"><span>Advanced options</span></h2>');return a.append(n),a.append(e),a}function create_field_type(e){return create_option_container(null,jQuery('<span class="fm-field-label">'+jQuery(".wd-button[data-type="+e+"]").first().text()+"</span>"))}function create_label(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_label">Label</label>'),jQuery('<textarea class="fm-width-100" id="edit_for_label" rows="4" onKeyUp="change_label(\''+e+"_element_labelform_id_temp', this.value)\">"+t+"</textarea>"))}function change_label(e,t,i){t=(t=t.replace(/(<([^>]+)>)/gi,"")).replace(/"/g,"&quot;"),i?document.getElementById(i).innerHTML=t:(document.getElementById(e).innerHTML=t,document.getElementById(e).value=t)}function create_label_position(e,t){var i=jQuery('<label class="fm-field-label">Label position</label>'),a=jQuery('<input type="radio" id="edit_for_label_position_left" name="edit_for_label_position" onchange="label_left('+e+')"'+("top"==t?"":' checked="checked"')+" />"),n=jQuery('<label for="edit_for_label_position_left">Left</label>'),l=jQuery('<input type="radio" id="edit_for_label_position_top" name="edit_for_label_position" onchange="label_top('+e+')"'+("top"==t?' checked="checked"':"")+" />"),d=jQuery('<label for="edit_for_label_position_top">Top</label>'),_=a;return create_option_container(i,_=(_=(_=_.add(n)).add(l)).add(d))}function create_label_position_stripe(e,t){var i=jQuery('<label class="fm-field-label">Label position</label>'),a=jQuery('<input type="radio" id="edit_for_label_position_left" name="edit_for_label_position" onchange="label_left_stripe('+e+')"'+("top"==t?"":' checked="checked"')+" />"),n=jQuery('<label for="edit_for_label_position_left">Left</label>'),l=jQuery('<input type="radio" id="edit_for_label_position_top" name="edit_for_label_position" onchange="label_top_stripe('+e+')"'+("top"==t?' checked="checked"':"")+" />"),d=jQuery('<label for="edit_for_label_position_top">Top</label>'),_=a;return create_option_container(i,_=(_=(_=_.add(n)).add(l)).add(d))}function label_left(e){"no"==document.getElementById(e+"_hide_labelform_id_temp").value?document.getElementById(e+"_label_sectionform_id_temp").style.display="table-cell":document.getElementById(e+"_label_sectionform_id_temp").style.display="none",document.getElementById(e+"_element_sectionform_id_temp").style.display="table-cell",document.getElementById(e+"_1_label_sectionform_id_temp")&&("yes"==document.getElementById(e+"_verification_id_temp").value?(document.getElementById(e+"_1_label_sectionform_id_temp").style.display=document.getElementById(e+"_label_sectionform_id_temp").style.display,document.getElementById(e+"_1_element_sectionform_id_temp").style.display=document.getElementById(e+"_element_sectionform_id_temp").style.display):(document.getElementById(e+"_1_label_sectionform_id_temp").style.display="none",document.getElementById(e+"_1_element_sectionform_id_temp").style.display="none"))}function label_top(e){"no"==document.getElementById(e+"_hide_labelform_id_temp").value?(document.getElementById(e+"_label_sectionform_id_temp").style.display="block",document.getElementById(e+"_element_sectionform_id_temp").style.display="block",document.getElementById(e+"_1_label_sectionform_id_temp")&&("yes"==document.getElementById(e+"_verification_id_temp").value?(document.getElementById(e+"_1_label_sectionform_id_temp").style.display=document.getElementById(e+"_label_sectionform_id_temp").style.display,document.getElementById(e+"_1_element_sectionform_id_temp").style.display=document.getElementById(e+"_element_sectionform_id_temp").style.display):(document.getElementById(e+"_1_label_sectionform_id_temp").style.display="none",document.getElementById(e+"_1_element_sectionform_id_temp").style.display="none"))):(document.getElementById(e+"_label_sectionform_id_temp").style.display="none",document.getElementById(e+"_element_sectionform_id_temp").style.display="block",document.getElementById(e+"_1_label_sectionform_id_temp")&&("yes"==document.getElementById(e+"_verification_id_temp").value?(document.getElementById(e+"_1_label_sectionform_id_temp").style.display="none",document.getElementById(e+"_1_element_sectionform_id_temp").style.display="block"):(document.getElementById(e+"_1_label_sectionform_id_temp").style.display="none",document.getElementById(e+"_1_element_sectionform_id_temp").style.display="none")))}function create_hide_label(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_hide_label">Hide label</label>'),jQuery('<input type="checkbox" id="el_hide_label" onchange="hide_label('+e+')"'+("yes"==t?' checked="checked"':"")+" />"))}function hide_label(e){"no"==document.getElementById(e+"_hide_labelform_id_temp").value?(document.getElementById(e+"_hide_labelform_id_temp").value="yes",document.getElementById(e+"_label_sectionform_id_temp").style.display="none",document.getElementById(e+"_1_elementform_id_temp")&&document.getElementById(e+"_1_elementform_id_temp").offsetParent&&(document.getElementById(e+"_1_label_sectionform_id_temp").style.display="none")):(document.getElementById("edit_for_label_position_left").checked?(document.getElementById(e+"_label_sectionform_id_temp").style.display="table-cell",document.getElementById(e+"_element_sectionform_id_temp").style.display="table-cell",document.getElementById(e+"_1_elementform_id_temp")&&document.getElementById(e+"_1_elementform_id_temp").offsetParent&&(document.getElementById(e+"_1_label_sectionform_id_temp").style.display="table-cell",document.getElementById(e+"_1_element_sectionform_id_temp").style.display="table-cell")):(document.getElementById(e+"_label_sectionform_id_temp").style.display="block",document.getElementById(e+"_element_sectionform_id_temp").style.display="block",document.getElementById(e+"_1_elementform_id_temp")&&document.getElementById(e+"_1_elementform_id_temp").offsetParent&&(document.getElementById(e+"_1_label_sectionform_id_temp").style.display="block",document.getElementById(e+"_1_element_sectionform_id_temp").style.display="block")),document.getElementById(e+"_hide_labelform_id_temp").value="no")}function create_placeholder(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_first_value_input">Placeholder</label>'),jQuery('<input type="text" class="fm-width-100" id="el_first_value_input" onKeyUp="change_input_value(this.value,\''+e+'_elementform_id_temp\')" value="'+t.replace(/"/g,"&quot;")+'" />'))}function change_input_value(e,t){input=document.getElementById(t),input.title=e,input.placeholder=e}function create_required(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_required">Required</label>'),jQuery('<input type="checkbox" id="el_required" onchange="set_required(\''+e+"_required')\""+("yes"==t?' checked="checked"':"")+" />"))}function set_required(e,t){"yes"==document.getElementById(e+"form_id_temp").value?(document.getElementById(e+"form_id_temp").setAttribute("value","no"),document.getElementById(e+"_elementform_id_temp").innerHTML="",void 0!==t&&(document.getElementById(t+"_elementform_id_temp").innerHTML="")):(document.getElementById(e+"form_id_temp").setAttribute("value","yes"),document.getElementById(e+"_elementform_id_temp").innerHTML=" *",void 0!==t&&(document.getElementById(t+"_elementform_id_temp").innerHTML=" *"))}function create_field_size(e,t,i,a){return null==i&&(i="'"+e+"_elementform_id_temp'"),create_option_container(jQuery('<label class="fm-field-label" for="edit_for_input_size">Width(px)</label>'),jQuery('<input class="fm-width-100" type="text" id="edit_for_input_size" onKeyPress="return check_isnum(event)" onKeyUp="change_w_style('+i+", this.value, "+a+')" value="'+t+'" /><p class="description">'+form_maker.leave_empty+"</p>"))}function create_field_label_size(e,t,i,a){return null==i&&(i="'"+e+"_label_sectionform_id_temp'"),create_option_container(jQuery('<label class="fm-field-label" for="edit_for_label_size">Label width(px)</label>'),jQuery('<input class="fm-width-100" type="text" id="edit_for_label_size" onKeyPress="return check_isnum(event)" onKeyUp="change_w_style('+i+", this.value, "+a+')" value="'+t+'" /><p class="description">'+form_maker.leave_empty+"</p>"))}function change_w_style(e,t,i){""==t?jQuery("#"+e).css("width",t):(jQuery("#"+e).css("width",t+"px"),i&&(document.getElementById(i).style.width=t+"px"))}function change_h_style(e,t){document.getElementById(e).style.height=t+"px"}function create_readonly(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_readonly">Readonly</label>'),jQuery('<input type="checkbox" id="el_readonly" onchange="set_readonly('+e+')"'+("yes"==t?' checked="checked"':"")+" />"))}function set_readonly(e){"no"==document.getElementById(e+"_readonlyform_id_temp").value?(document.getElementById(e+"_readonlyform_id_temp").value="yes",document.getElementById(e+"_elementform_id_temp").setAttribute("readonly","readonly")):(document.getElementById(e+"_elementform_id_temp").removeAttribute("readonly"),document.getElementById(e+"_readonlyform_id_temp").value="no")}function create_unique_values(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_unique">Allow only unique values</label>'),jQuery('<input type="checkbox" id="el_unique" onchange="set_unique(\''+e+"_uniqueform_id_temp')\""+("yes"==t?' checked="checked"':"")+" />"))}function set_unique(e){"yes"==document.getElementById(e).value?document.getElementById(e).setAttribute("value","no"):document.getElementById(e).setAttribute("value","yes")}function create_regexp(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_regExp_'+e+'">Validation (RegExp.)</label>'),jQuery('<input type="checkbox" id="el_regExp_'+e+'" onchange="set_regExpStatus(\''+e+"_regExpStatus')\""+("yes"==t?' checked="checked"':"")+" />"))}function set_regExpStatus(e){jQuery("#edit_main_tr12, #edit_main_tr13, #edit_main_tr14, #edit_main_tr15").toggle(200),"yes"==document.getElementById(e+"form_id_temp").value?document.getElementById(e+"form_id_temp").setAttribute("value","no"):document.getElementById(e+"form_id_temp").setAttribute("value","yes")}function create_custom_regexp(e,t,i){return create_option_container(jQuery('<label class="fm-field-label regExp_cell" for="regExp_value'+e+'">Regular Expression</label>'),jQuery('<textarea id="regExp_value'+e+'" class="regExp_cell fm-width-100" onKeyUp="change_regExpValue('+e+", this.value , '"+e+"_regExp_valueform_id_temp', '')\">"+i+"</textarea>"),"edit_main_tr12","yes"==t)}function change_regExpValue(e,t,i,a){0<a.length?(document.getElementById("regExp_value"+e).value=a,document.getElementById(i).value=a,document.getElementById(e+"_regExp_commonform_id_temp").value=document.getElementById("common_RegExp"+e).selectedIndex):(document.getElementById(i).value=t,document.getElementById(e+"_regExp_commonform_id_temp").value=t)}function create_common_regexp(e,t,i){var a=jQuery('<label class="fm-field-label regExp_cell">Common Regular Expressions</label>'),n=jQuery('<select class="fm-width-100" id="common_RegExp'+e+'" name="common_RegExp'+e+'" onChange="change_regExpValue('+e+", ' + w_regExp_value + ', '"+e+"_regExp_valueform_id_temp', this.value)\"></select>"),l=0,d=[];for(var _ in d.Select="",d["Name(Latin letters and some symbols)"]="^[a-zA-Z'-'\\s]+$",d["Phone Number(Digits and dashes)"]="^(\\+)?[0-9]+(-[0-9]+)?(-[0-9]+)?(-[0-9]+)?$",d["Integer Number"]="^(-)?[0-9]+$",d["Decimal Number"]="^(-)?[0-9]+(\\.[0-9]+)?$",d["Latin letters and Numbers"]="^[a-z&A-Z0-9]*$",d["Credit Card (16 Digits)"]="^([0-9](\\.)?){15}[0-9]$",d["Zip Code"]="^(\\d{5}-\\d{4}|\\d{5}|\\d{9})$|^([a-zA-Z]\\d[a-zA-Z] \\d[a-zA-Z]\\d)$",d["IP Address"]="^((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})$",d["Date m/d/y (e.g. 12/21/2013)"]="^([0-9]|1[0,1,2])/([0-9]|[0,1,2][0-9]|3[0,1])/[0-9]{4}$",d["Date d.m.y (e.g. 21.12.2013)"]="^([0-9]|[0,1,2][0-9]|3[0,1])\\.([0-9]|1[0,1,2])\\.[0-9]{4}$",d["MySQL Date Format (2013-12-21)"]="^\\d{4}-(0[0-9]|1[0,1,2])-([0,1,2][0-9]|3[0,1])$",d)if(d.hasOwnProperty(_)){var r=jQuery('<option id="edit_for_label_common'+l+'" value="'+d[_]+'"'+(i==l?' selected="selected"':"")+">"+_+"</option>");n.append(r),l++}return create_option_container(a,n,"edit_main_tr13","yes"==t)}function create_case_sensitive(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="el_regArg_'+e+'">Case Insensitive</label>'),jQuery('<input type="checkbox" id="el_regArg_'+e+'" onchange="set_regExpArgument(\''+e+"_regArgument')\""+("i"==i?' checked="checked"':"")+" />"),"edit_main_tr14","yes"==t)}function set_regExpArgument(e){document.getElementById(e+"form_id_temp").value.length<=0?document.getElementById(e+"form_id_temp").setAttribute("value","i"):document.getElementById(e+"form_id_temp").setAttribute("value","")}function create_alert_message(e,t,i){return create_option_container(jQuery('<label class="fm-field-label regExp_cell" for="regExp_alert'+e+'">Alert Message</label>'),jQuery('<textarea id="regExp_alert'+e+'" class="regExp_cell fm-width-100" onKeyUp="change_regExpAlert(this.value, \''+e+"_regExp_alertform_id_temp')\">"+i+"</textarea>"),"edit_main_tr15","yes"==t)}function change_regExpAlert(e,t){document.getElementById(t).value=e}function create_additional_attributes(e,t,i){var a=jQuery('<label class="fm-field-label">Additional Attributes</label>'),l=jQuery('<span class="fm-add-attribute dashicons dashicons-plus-alt" onClick="add_attr('+e+", '"+i+'\')" title="Add"></span>'),d=jQuery('<div id="attributes" class="fm-width-100"></div>'),_=jQuery('<div idi="0" class="fm-width-100"><div class="fm-header-label fm-width-45">Name</div><div class="fm-header-label fm-width-45">Value</div><div></div></div>');for(d.append(_),d.hide(),n=t.length,j=1;j<=n;j++){var r=jQuery('<div idi="'+j+'" id="attr_row_'+j+'" class="fm-width-100"><div class="fm-table-col fm-width-45"><input type="text" class="fm-field-choice" id="attr_name'+j+'" value="'+t[j-1]+'" onChange="change_attribute_name(\''+e+"', this, '"+i+'\')" /></div><div class="fm-table-col fm-width-45"><input type="text" class="fm-field-choice" id="attr_value'+j+'" value="'+w_attr_value[j-1]+'" onChange="change_attribute_value('+e+", "+j+", '"+i+'\')" /></div><div class="fm-table-col"><span class="fm-remove-attribute dashicons dashicons-dismiss" id="el_choices'+j+'_remove" onClick="remove_attr('+j+", "+e+", '"+i+"')\"></span></div></div>");d.append(r),d.show()}var o=a;return create_option_container(null,o=(o=o.add(l)).add(d))}function add_attr(e,t){var i=jQuery("#attributes");i.show(),j=parseInt(i.children().last().attr("idi"))+1,w_attr_name="attribute",w_attr_value="value";var a=jQuery('<div idi="'+j+'" id="attr_row_'+j+'" class="fm-width-100"><div class="fm-table-col fm-width-45"><input type="text" class="fm-field-choice" id="attr_name'+j+'" value="'+w_attr_name+'" onChange="change_attribute_name(\''+e+"', this, '"+t+'\')" /></div><div class="fm-table-col fm-width-45"><input type="text" class="fm-field-choice" id="attr_value'+j+'" value="'+w_attr_value+'" onChange="change_attribute_value('+e+", "+j+", '"+t+'\')" /></div><div class="fm-table-col"><span class="fm-remove-attribute dashicons dashicons-dismiss" id="el_choices'+j+'_remove" onClick="remove_attr('+j+", "+e+", '"+t+"')\"></span></div></div>");i.append(a),refresh_attr(e,t),jQuery("#edit_table").scrollTop(jQuery("#attributes").offset().top)}function change_attribute_name(e,t,i){if(value=t.value,value)if("style"!=value.toLowerCase())if(value!=parseInt(value)){if(-1!=value.indexOf(" ")){return value=value.replace(/\s+/g,""),t.value=value,alert("The name of the attribute cannot contain a space."),void refresh_attr(e,i)}refresh_attr(e,i)}else alert("The name of the attribute cannot be a number.");else alert('Sorry, you cannot add a style attribute here. Use "Class name" instead.');else alert("The name of the attribute is required.")}function change_attribute_value(e,t,i){document.getElementById("attr_name"+t).value?"style"!=document.getElementById("attr_name"+t).value.toLowerCase()?refresh_attr(e,i):alert('Sorry, you cannot add a style attribute here. Use "Class name" instead.'):alert("The name of the attribute is required.")}function remove_attr(e,t,i){tr=jQuery("#attr_row_"+e),table=jQuery("#attributes"),tr.remove(),1==table.children().length&&table.hide(),refresh_attr(t,i)}function refresh_attr(e,t){switch(t){case"type_text":case"type_paypal_price_new":case"type_star_rating":case"type_scale_rating":case"type_spinner":case"type_slider":case"type_grading":case"type_matrix":id_array=Array(),id_array[0]=e+"_elementform_id_temp";break;case"type_paypal_price":id_array=Array(),id_array[0]=e+"_element_dollarsform_id_temp",id_array[1]=e+"_element_centsform_id_temp";break;case"type_range":id_array=Array(),id_array[0]=e+"_elementform_id_temp0",id_array[1]=e+"_elementform_id_temp1";break;case"type_name":id_array=Array(),id_array[0]=e+"_element_firstform_id_temp",id_array[1]=e+"_element_lastform_id_temp",id_array[2]=e+"_element_titleform_id_temp",id_array[3]=e+"_element_middleform_id_temp";break;case"type_address":id_array=Array(),id_array[0]=e+"_street1form_id_temp",id_array[1]=e+"_street2form_id_temp",id_array[2]=e+"_cityform_id_temp",id_array[3]=e+"_stateform_id_temp",id_array[4]=e+"_postalform_id_temp",id_array[5]=e+"_countryform_id_temp";break;case"type_checkbox":case"type_radio":for(id_array=Array(),z=0;z<50;z++)id_array[z]=e+"_elementform_id_temp"+z;break;case"type_time":id_array=Array(),id_array[0]=e+"_hhform_id_temp",id_array[1]=e+"_mmform_id_temp",id_array[2]=e+"_ssform_id_temp",id_array[3]=e+"_am_pmform_id_temp";break;case"type_date":id_array=Array(),id_array[0]=e+"_elementform_id_temp",id_array[1]=e+"_buttonform_id_temp";break;case"type_date_fields":id_array=Array(),id_array[0]=e+"_dayform_id_temp",id_array[1]=e+"_monthform_id_temp",id_array[2]=e+"_yearform_id_temp";break;case"type_captcha":id_array=Array(),id_array[0]="_wd_captchaform_id_temp",id_array[1]="_wd_captcha_inputform_id_temp",id_array[2]="_element_refreshform_id_temp";break;case"type_arithmetic_captcha":id_array=Array(),id_array[0]="_wd_arithmetic_captchaform_id_temp",id_array[1]="_wd_arithmetic_captcha_inputform_id_temp",id_array[2]="_element_refreshform_id_temp";break;case"type_recaptcha":id_array=Array(),id_array[0]="wd_recaptchaform_id_temp";break;case"type_submit_reset":id_array=Array(),id_array[0]=e+"_element_submitform_id_temp",id_array[1]=e+"_element_resetform_id_temp";break;case"type_page_break":id_array=Array(),id_array[0]="_div_between"}for(q=0;q<id_array.length;q++){id=id_array[q];var a=document.getElementById(id);if(a){for(atr=a.attributes,i=0;i<30;i++)atr[i]&&0==atr[i].name.indexOf("add_")&&(a.removeAttribute(atr[i].name),i--);for(i=0;i<10;i++)if(document.getElementById("attr_name"+i))try{a.setAttribute("add_"+document.getElementById("attr_name"+i).value,document.getElementById("attr_value"+i).value)}catch(e){alert("Only letters, numbers, hyphens and underscores are allowed.")}}}}function return_attributes(e){attr_names=new Array,attr_values=new Array;var t=document.getElementById(e);if(t)for(atr=t.attributes,i=0;i<30;i++)atr[i]&&0==atr[i].name.indexOf("add_")&&(attr_names.push(atr[i].name.replace("add_","")),attr_values.push(atr[i].value));return Array(attr_names,attr_values)}function go_to_type_text(e){w_attr_name=[],w_attr_value=[],type_text(e,"Text","","top","no","","","","no","no","","","","Incorrect Value","no",w_attr_name,w_attr_value,"no","")}function delete_last_child(){document.getElementById("form_maker_editor_ifr")&&(ifr_id="form_maker_editor_ifr",ifr=getIFrameDocument(ifr_id),ifr.body.innerHTML=""),document.getElementById("main_editor").style.display="none",jQuery("#form_maker_editor").val(""),jQuery("#show_table").empty(),jQuery("#edit_table").empty()}function type_text(e,t,i,a,n,l,d,_,r,o,m,s,u,c,p,f,y,h,b){jQuery("#element_type").val("type_text"),delete_last_child();var v=jQuery("#edit_table"),w=jQuery('<div id="edit_div"></div>');v.append(w);var g=jQuery('<div id="edit_main_table"></div>');w.append(g),g.append(create_field_type("type_text")),g.append(create_label(e,t)),g.append(create_label_position(e,a)),g.append(create_hide_label(e,n)),g.append(create_required(e,r)),g.append(create_placeholder(e,_)),g.append(create_field_size(e,l));var E=jQuery('<div class="inside"></div>');g.append(create_advanced_options_container(E)),E.append(create_field_label_size(e,i)),E.append(create_readonly(e,h)),E.append(create_unique_values(e,p)),E.append(create_regexp(e,o)),E.append(create_common_regexp(e,o,s)),E.append(create_custom_regexp(e,o,m)),E.append(create_case_sensitive(e,o,u)),E.append(create_alert_message(e,o,c)),E.append(create_class(e,b)),E.append(create_additional_attributes(e,f,"type_text")),element="input",cur_type="text";var A=document.createElement("input");A.setAttribute("type","hidden"),A.setAttribute("value","type_text"),A.setAttribute("name",e+"_typeform_id_temp"),A.setAttribute("id",e+"_typeform_id_temp");var j=document.createElement("input");j.setAttribute("type","hidden"),j.setAttribute("value",r),j.setAttribute("name",e+"_requiredform_id_temp"),j.setAttribute("id",e+"_requiredform_id_temp");var x=document.createElement("input");x.setAttribute("type","hidden"),x.setAttribute("value",h),x.setAttribute("name",e+"_readonlyform_id_temp"),x.setAttribute("id",e+"_readonlyform_id_temp");var k=document.createElement("input");k.setAttribute("type","hidden"),k.setAttribute("value",n),k.setAttribute("name",e+"_hide_labelform_id_temp"),k.setAttribute("id",e+"_hide_labelform_id_temp");var I=document.createElement("input");I.setAttribute("type","hidden"),I.setAttribute("value",p),I.setAttribute("name",e+"_uniqueform_id_temp"),I.setAttribute("id",e+"_uniqueform_id_temp");var C=document.createElement(element);C.setAttribute("type",cur_type),C.style.cssText="width:"+l+"px;",C.setAttribute("id",e+"_elementform_id_temp"),C.setAttribute("name",e+"_elementform_id_temp"),C.setAttribute("value",d),C.setAttribute("title",_),C.setAttribute("placeholder",_),"yes"==h&&C.setAttribute("readonly","readonly");var B=document.createElement("input");B.setAttribute("type","hidden"),B.setAttribute("value",o),B.setAttribute("name",e+"_regExpStatusform_id_temp"),B.setAttribute("id",e+"_regExpStatusform_id_temp");var Q=document.createElement("input");Q.setAttribute("type","hidden"),Q.setAttribute("value",u),Q.setAttribute("name",e+"_regArgumentform_id_temp"),Q.setAttribute("id",e+"_regArgumentform_id_temp");var T=document.createElement("input");T.setAttribute("type","hidden"),T.setAttribute("value",s),T.setAttribute("name",e+"_regExp_commonform_id_temp"),T.setAttribute("id",e+"_regExp_commonform_id_temp");var M=document.createElement("input");M.setAttribute("type","hidden"),M.setAttribute("value",escape(m)),M.setAttribute("name",e+"_regExp_valueform_id_temp"),M.setAttribute("id",e+"_regExp_valueform_id_temp");var L=document.createElement("input");L.setAttribute("type","hidden"),L.setAttribute("value",c),L.setAttribute("name",e+"_regExp_alertform_id_temp"),L.setAttribute("id",e+"_regExp_alertform_id_temp");var z=document.createElement("div");z.setAttribute("id","main_div");var q=document.createElement("div");q.setAttribute("id",e+"_elemet_tableform_id_temp");var H="yes"==n?"none":"table-cell",N=document.createElement("div");N.setAttribute("align","left"),N.style.cssText="display:"+H,N.style.width=i+"px",N.setAttribute("id",e+"_label_sectionform_id_temp");var S=document.createElement("div");S.setAttribute("align","left"),S.style.display="table-cell",S.setAttribute("id",e+"_element_sectionform_id_temp");var D=document.createElement("br"),P=document.createElement("span");P.setAttribute("id",e+"_element_labelform_id_temp"),P.innerHTML=t,P.setAttribute("class","label"),P.style.verticalAlign="top";var O=document.createElement("span");O.setAttribute("id",e+"_required_elementform_id_temp"),O.innerHTML="",O.setAttribute("class","required"),O.style.verticalAlign="top","yes"==r&&(O.innerHTML=" *");var K=document.getElementById("show_table");N.appendChild(P),N.appendChild(O),S.appendChild(A),S.appendChild(j),S.appendChild(x),S.appendChild(k),S.appendChild(B),S.appendChild(M),S.appendChild(T),S.appendChild(L),S.appendChild(Q),S.appendChild(I),S.appendChild(C),q.appendChild(N),q.appendChild(S),z.appendChild(q),z.appendChild(D),K.appendChild(z),jQuery("#main_div").append(form_maker.type_text_description),"top"==a&&label_top(e),change_class(b,e),refresh_attr(e,"type_text")}function create_upload_max_size(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_max_size">Maximum size(KB)</label>'),jQuery('<input type="text" class="fm-width-100" id="edit_for_max_size" onKeyPress="return check_isnum(event)" onChange="change_file_value(this.value,\''+e+"_max_size', '***max_sizeskizb"+e+"***', '***max_sizeverj"+e+'***\')" value="'+t+'" />'))}function change_file_value(e,t,i,a){void 0===i&&(a=i=""),input=document.getElementById(t),input.value=i+e+a,input.setAttribute("value",i+e+a)}function create_upload_destination(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_destination_input">Destination</label>'),jQuery('<b id="el_destination_input_info">'+upload_url.replace(fm_site_url,"")+'/</b><input type="text" class="fm-width-100" id="el_destination_input" onChange="change_file_value(this.value,\''+e+"_destination', '***destinationskizb"+e+"***', '***destinationverj"+e+'***\')" value="'+t.replace(upload_url,"")+'" />'))}function create_upload_extensions(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_extension">Allowed file extensions</label>'),jQuery('<textarea class="fm-width-100" id="edit_for_extension" rows="4" onChange="change_file_value(this.value,\''+e+"_extension', '***extensionskizb"+e+"***', '***extensionverj"+e+"***')\">"+t+"</textarea>"))}function create_class(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_style_textarea">Class name</label>'),jQuery('<input type="text" class="fm-width-100" id="el_style_textarea" onChange="change_class(this.value,'+e+')" value="'+t+'" />'))}function change_class(e,t){document.getElementById(t+"_label_sectionform_id_temp")&&document.getElementById(t+"_label_sectionform_id_temp").setAttribute("class",e),document.getElementById(t+"_element_sectionform_id_temp")&&document.getElementById(t+"_element_sectionform_id_temp").setAttribute("class",e)}function create_multiple_upload(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_multiple">Allow Uploading Multiple Files</label>'),jQuery('<input type="checkbox" id="el_multiple" onchange="set_multiple('+e+', this.checked)"'+("yes"==t?' checked="checked"':"")+" />"))}function set_multiple(e,t){t?document.getElementById(e+"_elementform_id_temp").setAttribute("multiple","multiple"):document.getElementById(e+"_elementform_id_temp").removeAttribute("multiple")}function type_file_upload(e,t,i,a,n,l,d,_,r,o,m,s,u){jQuery("#element_type").val("type_file_upload"),delete_last_child();var c=jQuery("#edit_table"),p=jQuery('<div id="edit_div"></div>');c.append(p);var f=jQuery('<div id="edit_main_table"></div>');p.append(f),f.append(create_field_type("type_file_upload")),f.append(create_label(e,t)),f.append(create_label_position(e,a)),f.append(create_hide_label(e,n)),f.append(create_required(e,r)),f.append(create_upload_extensions(e,d));var y=jQuery('<div class="inside"></div>');f.append(create_advanced_options_container(y)),y.append(create_field_label_size(e,i)),y.append(create_upload_max_size(e,_)),y.append(create_upload_destination(e,l)),y.append(create_class(e,m)),y.append(create_multiple_upload(e,o)),y.append(create_additional_attributes(e,s,"type_file_upload")),element="input",type="file";var h=document.createElement("input");h.setAttribute("type","hidden"),h.setAttribute("value","type_file_upload"),h.setAttribute("name",e+"_typeform_id_temp"),h.setAttribute("id",e+"_typeform_id_temp");var b=document.createElement("input");b.setAttribute("type","hidden"),b.setAttribute("value",r),b.setAttribute("name",e+"_requiredform_id_temp"),b.setAttribute("id",e+"_requiredform_id_temp");var v=document.createElement("input");v.setAttribute("type","hidden"),v.setAttribute("value",n),v.setAttribute("name",e+"_hide_labelform_id_temp"),v.setAttribute("id",e+"_hide_labelform_id_temp");var w=document.createElement(element);w.setAttribute("type",type),w.setAttribute("class","file_upload"),w.setAttribute("id",e+"_elementform_id_temp"),w.setAttribute("name",e+"_fileform_id_temp"),"yes"==o&&w.setAttribute("multiple","multiple");var g=document.createElement("input");g.setAttribute("type","hidden"),g.setAttribute("value","***max_sizeskizb"+e+"***"+_+"***max_sizeverj"+e+"***"),g.setAttribute("id",e+"_max_size"),g.setAttribute("name",e+"_max_size");var E=document.createElement("input");E.setAttribute("type","hidden"),E.setAttribute("value","***destinationskizb"+e+"***"+l+"***destinationverj"+e+"***"),E.setAttribute("id",e+"_destination"),E.setAttribute("name",e+"_destination");var A=document.createElement("input");A.setAttribute("type","hidden"),A.setAttribute("value","***extensionskizb"+e+"***"+d+"***extensionverj"+e+"***"),A.setAttribute("id",e+"_extension"),A.setAttribute("name",e+"_extension");var j=document.createElement("div");j.setAttribute("id","main_div");var x=document.createElement("div");x.setAttribute("id",e+"_elemet_tableform_id_temp");var k="yes"==n?"none":"table-cell",I=document.createElement("div");I.setAttribute("align","left"),I.style.display=k,I.style.width=i+"px",I.setAttribute("id",e+"_label_sectionform_id_temp");var C=document.createElement("div");C.setAttribute("align","left"),C.style.display="table-cell",C.setAttribute("id",e+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var B=document.createElement("br"),Q=(document.createElement("br"),document.createElement("span"));Q.setAttribute("id",e+"_element_labelform_id_temp"),Q.innerHTML=t,Q.setAttribute("class","label"),Q.style.verticalAlign="top";var T=document.createElement("span");T.setAttribute("id",e+"_required_elementform_id_temp"),T.innerHTML="",T.setAttribute("class","required"),T.style.verticalAlign="top","yes"==r&&(T.innerHTML=" *");var M=document.getElementById("show_table");I.appendChild(Q),I.appendChild(T),C.appendChild(v),C.appendChild(h),C.appendChild(b),C.appendChild(g),C.appendChild(E),C.appendChild(A),C.appendChild(w),x.appendChild(I),x.appendChild(C),j.appendChild(x),j.appendChild(B),M.appendChild(j),jQuery("#main_div").append(form_maker.type_file_upload_description),"top"==a&&label_top(e),change_class(m,e),refresh_attr(e,"type_text")}function go_to_type_stripe(e){if(document.getElementById("is_stripe"))return!1;type_stripe(e,"","","top","")}function type_stripe(e,t,i,a,n){jQuery("#element_type").val("type_stripe"),delete_last_child();var l=jQuery("#edit_table"),d=jQuery('<div id="edit_div"></div>');l.append(d);var _=jQuery('<div id="edit_main_table"></div>');d.append(_),_.append(create_field_type("type_stripe")),_.append(create_field_size(e,t)),_.append(create_label_position_stripe(e,a));var r=jQuery('<div class="inside"></div>');_.append(create_advanced_options_container(r)),r.append(create_field_label_size(e,i)),r.append(create_class(e,n));var o=document.createElement("input");o.setAttribute("type","hidden"),o.setAttribute("value","type_stripe"),o.setAttribute("name",e+"_typeform_id_temp"),o.setAttribute("id",e+"_typeform_id_temp");var m=document.createElement("div");m.setAttribute("id","main_div");var s=document.createElement("div");s.setAttribute("id",e+"_elemet_tableform_id_temp");var u=document.createElement("div");u.setAttribute("align","left"),u.style.display="table-cell",u.setAttribute("id",e+"_label_sectionform_id_temp"),u.style.width=i+"px";var c=document.createElement("div");c.setAttribute("align","left"),c.style.display="table-cell",c.setAttribute("id",e+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var p=document.createElement("br"),f=(document.createElement("br"),document.createElement("span"));f.setAttribute("id",e+"_element_labelform_id_temp"),f.innerHTML="stripe",f.setAttribute("class","label"),f.style.display="none";var y=document.getElementById("show_table");u.appendChild(f),c.innerHTML="<div id='"+e+"_elementform_id_temp' style='width:"+t+"px; margin:10px; border: 1px solid #000; min-width:80px;text-align:center;'> Stripe Section</div><input type='hidden' id='is_stripe' />",c.appendChild(o),s.appendChild(u),s.appendChild(c),m.appendChild(s),m.appendChild(p),y.appendChild(m),jQuery("#main_div").append(form_maker.type_stripe_description),"top"==a?label_top_stripe(e):label_left_stripe(),change_class(n,e)}function create_field_size_2(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_input_size">Size(px)</label>'),jQuery('<input type="text" class="fm-width-40" id="edit_for_input_size" onKeyPress="return check_isnum(event)" onKeyUp="change_w_style(\''+e+'_elementform_id_temp\', this.value)" value="'+t+'" />x<input type="text" class="fm-width-40" id="edit_for_input_size" onKeyPress="return check_isnum(event)" onKeyUp="change_h_style(\''+e+'_elementform_id_temp\', this.value)" value="'+i+'" /><p class="description">'+form_maker.leave_empty+"</p>"))}function go_to_type_textarea(e){w_attr_name=[],w_attr_value=[],type_textarea(e,"Textarea","","top","no","","100","","","no","no","",w_attr_name,w_attr_value)}function type_textarea(e,t,i,a,n,l,d,_,r,o,m,s,u,c){jQuery("#element_type").val("type_textarea"),delete_last_child();var p=jQuery("#edit_table"),f=jQuery('<div id="edit_div"></div>');p.append(f);var y=jQuery('<div id="edit_main_table"></div>');f.append(y),y.append(create_field_type("type_textarea")),y.append(create_label(e,t)),y.append(create_label_position(e,a)),y.append(create_hide_label(e,n)),y.append(create_required(e,o)),y.append(create_placeholder(e,r)),y.append(create_field_size_2(e,l,d));var h=jQuery('<div class="inside"></div>');y.append(create_advanced_options_container(h)),h.append(create_field_label_size(e,i)),h.append(create_unique_values(e,m)),h.append(create_class(e,s)),h.append(create_additional_attributes(e,u,"type_textarea")),element="textarea";var b=document.createElement("input");b.setAttribute("type","hidden"),b.setAttribute("value","type_textarea"),b.setAttribute("name",e+"_typeform_id_temp"),b.setAttribute("id",e+"_typeform_id_temp");var v=document.createElement("input");v.setAttribute("type","hidden"),v.setAttribute("value",o),v.setAttribute("name",e+"_requiredform_id_temp"),v.setAttribute("id",e+"_requiredform_id_temp");var w=document.createElement("input");w.setAttribute("type","hidden"),w.setAttribute("value",n),w.setAttribute("name",e+"_hide_labelform_id_temp"),w.setAttribute("id",e+"_hide_labelform_id_temp");var g=document.createElement("input");g.setAttribute("type","hidden"),g.setAttribute("value",m),g.setAttribute("name",e+"_uniqueform_id_temp"),g.setAttribute("id",e+"_uniqueform_id_temp");var E=document.createElement("div");E.setAttribute("id","main_div");var A=document.createElement("div");A.setAttribute("id",e+"_elemet_tableform_id_temp");var j="yes"==n?"none":"table-cell",x=document.createElement("div");x.setAttribute("align","left"),x.style.display=j,x.style.width=i+"px",x.style.verticalAlign="top",x.setAttribute("id",e+"_label_sectionform_id_temp");var k=document.createElement("div");k.setAttribute("align","left"),k.style.display="table-cell",k.setAttribute("id",e+"_element_sectionform_id_temp");var I=document.createElement("span");I.setAttribute("id",e+"_element_labelform_id_temp"),I.innerHTML=t,I.setAttribute("class","label"),I.style.verticalAlign="top";var C=document.createElement("span");C.setAttribute("id",e+"_required_elementform_id_temp"),C.innerHTML="",C.setAttribute("class","required"),C.style.verticalAlign="top","yes"==o&&(C.innerHTML=" *");var B=document.createElement(element);B.style.cssText="width:"+l+"px; height:"+d+"px;",B.setAttribute("id",e+"_elementform_id_temp"),B.setAttribute("name",e+"_elementform_id_temp"),B.setAttribute("title",r),B.setAttribute("placeholder",r),B.setAttribute("value",_),B.innerHTML=_;var Q=document.getElementById("show_table");x.appendChild(I),x.appendChild(C),k.appendChild(b),k.appendChild(v),k.appendChild(w),k.appendChild(g),k.appendChild(B),A.appendChild(x),A.appendChild(k),E.appendChild(A),Q.appendChild(E),jQuery("#main_div").append("<br>"+form_maker.type_textarea_description),"top"==a&&label_top(e),change_class(s,e),refresh_attr(e,"type_text")}function create_spinner_width(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_spinner_width">Width(px)</label>'),jQuery('<input class="fm-width-100" type="text" id="edit_for_spinner_width" onKeyPress="return check_isnum(event)" onKeyUp="change_spinner_width(this.value,'+e+",'form_id_temp')\" value=\""+t+'" /><p class="description">'+form_maker.leave_empty+"</p>"))}function change_spinner_width(e,t,i){document.getElementById(t+"_elementform_id_temp").style.cssText="width:"+e+"px",document.getElementById(t+"_spinner_widthform_id_temp").value=e}function create_spinner_step(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_spinner_step">Step</label>'),jQuery('<input class="fm-width-100" type="text" id="edit_for_spinner_step" onKeyPress="return check_isnum(event)" onKeyUp="change_spinner_step(this.value,'+e+",'form_id_temp')\" value=\""+t+'" />'))}function change_spinner_step(e,t,i){jQuery("#"+t+"_elementform_id_temp").spinner({step:e}),document.getElementById(t+"_stepform_id_temp").value=e}function create_spinner_minvalue(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_spinner_min_value">Min Value</label>'),jQuery('<input class="fm-width-100" type="text" id="edit_for_spinner_min_value" onKeyPress="return check_isnum_or_minus(event)" onKeyUp="change_spinner_min_value(this.value,'+e+",'form_id_temp')\" value=\""+t+'" />'))}function change_spinner_min_value(e,t,i){jQuery("#"+t+"_elementform_id_temp").spinner({min:e}),document.getElementById(t+"_min_valueform_id_temp").value=e}function create_spinner_maxvalue(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_spinner_max_value">Max Value</label>'),jQuery('<input class="fm-width-100" type="text" id="edit_for_spinner_max_value" onKeyPress="return check_isnum_or_minus(event)" onKeyUp="change_spinner_max_value(this.value,'+e+",'form_id_temp')\" value=\""+t+'" />'))}function change_spinner_max_value(e,t,i){jQuery("#"+t+"_elementform_id_temp").spinner({max:e}),document.getElementById(t+"_max_valueform_id_temp").value=e}function go_to_type_spinner(e){w_attr_name=[],w_attr_value=[],type_spinner(e,"Number","","top","no","60","","","1","","no","",w_attr_name,w_attr_value)}function type_spinner(e,t,i,a,n,l,d,_,r,o,m,s,u,c){jQuery("#element_type").val("type_spinner"),delete_last_child();var p=jQuery("#edit_table"),f=jQuery('<div id="edit_div"></div>');p.append(f);var y=jQuery('<div id="edit_main_table"></div>');f.append(y),y.append(create_field_type("type_spinner")),y.append(create_label(e,t)),y.append(create_label_position(e,a)),y.append(create_hide_label(e,n)),y.append(create_required(e,m)),y.append(create_spinner_step(e,r)),y.append(create_spinner_minvalue(e,d)),y.append(create_spinner_maxvalue(e,_)),y.append(create_spinner_width(e,l));var h=jQuery('<div class="inside"></div>');y.append(create_advanced_options_container(h)),h.append(create_field_label_size(e,i)),h.append(create_class(e,s)),h.append(create_additional_attributes(e,u,"type_spinner"));var b=document.createElement("input");b.setAttribute("type","hidden"),b.setAttribute("value","type_spinner"),b.setAttribute("name",e+"_typeform_id_temp"),b.setAttribute("id",e+"_typeform_id_temp");var v=document.createElement("input");v.setAttribute("type","hidden"),v.setAttribute("value",m),v.setAttribute("name",e+"_requiredform_id_temp"),v.setAttribute("id",e+"_requiredform_id_temp");var w=document.createElement("input");w.setAttribute("type","hidden"),w.setAttribute("value",n),w.setAttribute("name",e+"_hide_labelform_id_temp"),w.setAttribute("id",e+"_hide_labelform_id_temp");var g=document.createElement("input");g.setAttribute("type","hidden"),g.setAttribute("value",l),g.setAttribute("name",e+"_spinner_widthform_id_temp"),g.setAttribute("id",e+"_spinner_widthform_id_temp");var E=document.createElement("input");E.setAttribute("type","hidden"),E.setAttribute("value",d),E.setAttribute("id",e+"_min_valueform_id_temp"),E.setAttribute("name",e+"_min_valueform_id_temp");var A=document.createElement("input");A.setAttribute("type","hidden"),A.setAttribute("value",_),A.setAttribute("name",e+"_max_valueform_id_temp"),A.setAttribute("id",e+"_max_valueform_id_temp");var j=document.createElement("input");j.setAttribute("type","hidden"),j.setAttribute("value",r),j.setAttribute("name",e+"_stepform_id_temp"),j.setAttribute("id",e+"_stepform_id_temp");var x=document.createElement("input");x.setAttribute("type",""),x.style.cssText="width:"+l+"px",x.setAttribute("name",e+"_elementform_id_temp"),x.setAttribute("id",e+"_elementform_id_temp"),x.setAttribute("value",o),x.setAttribute("onClick","check_isnum_or_minus(event)"),x.setAttribute("onKeyPress","return check_isnum_or_minus(event)");var k=document.createElement("div");k.setAttribute("id","main_div");var I=document.createElement("div");I.setAttribute("id",e+"_elemet_tableform_id_temp");var C="yes"==n?"none":"table-cell",B=document.createElement("div");B.setAttribute("align","left"),B.style.display=C,B.style.width=i+"px",B.setAttribute("id",e+"_label_sectionform_id_temp");var Q=document.createElement("div");Q.setAttribute("align","left"),Q.style.display="table-cell",Q.setAttribute("id",e+"_element_sectionform_id_temp");var T=document.createElement("br"),M=document.createElement("span");M.setAttribute("id",e+"_element_labelform_id_temp"),M.innerHTML=t,M.setAttribute("class","label");var L=document.createElement("span");L.setAttribute("id",e+"_required_elementform_id_temp"),L.innerHTML="",L.setAttribute("class","required"),"yes"==m&&(L.innerHTML=" *");var z=document.getElementById("show_table");B.appendChild(M),B.appendChild(L),Q.appendChild(w),Q.appendChild(b),Q.appendChild(v),Q.appendChild(g),Q.appendChild(E),Q.appendChild(A),Q.appendChild(j),Q.appendChild(x),I.appendChild(B),I.appendChild(Q),k.appendChild(I),k.appendChild(T),z.appendChild(k),"top"==a&&label_top(e),change_class(s,e),refresh_attr(e,"type_spinner"),jQuery("#"+e+"_elementform_id_temp").spinner();var q=jQuery("#"+e+"_elementform_id_temp").spinner();null==o&&q.spinner("value",""),jQuery("#"+e+"_elementform_id_temp").spinner({min:d}),jQuery("#"+e+"_elementform_id_temp").spinner({max:_}),jQuery("#"+e+"_elementform_id_temp").spinner({step:r}),jQuery("#main_div").append(form_maker.type_number_description)}function create_date_format(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="date_format">Date Format</label>'),jQuery('<input class="fm-width-100" type="text" id="date_format" onChange="change_date_format(this.value, '+e+", 'format')\" value=\""+t+'" />'))}function change_date_format(e,t,i){var a=document.getElementById(t+"_buttonform_id_temp");if("format"==i){document.getElementById(t+"_dis_past_daysform_id_temp").value;a.setAttribute("format",e)}else{document.getElementById(t+"_dis_past_daysform_id_temp").value=1==e?"yes":"no";e=document.getElementById("date_format").value}jQuery("[name^="+t+"_elementform_id_temp]").datepicker("option","dateFormat",e)}function create_week_start(e,t){var i=jQuery('<label class="fm-field-label">First Day of the Week</label>'),a=jQuery('<select class="fm-width-100" id="start_day" name="start_day" onChange="change_start_day(this.value,'+e+')"></select>'),n=0,l=[];for(var d in l[0]=form_maker.sunday,l[1]=form_maker.monday,l[2]=form_maker.tuesday,l[3]=form_maker.wednesday,l[4]=form_maker.thursday,l[5]=form_maker.friday,l[6]=form_maker.saturday,l)if(l.hasOwnProperty(d)){var _=jQuery('<option value="'+d+'"'+(t==n?' selected="selected"':"")+">"+l[d]+"</option>");a.append(_),n++}return create_option_container(i,a)}function change_start_day(e,t){document.getElementById(t+"_start_dayform_id_temp").value=e,jQuery("input[name^="+t+"_elementform_id_temp]").datepicker("option","firstDay",e)}function create_default_date(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="default_date">Default Date</label>'),jQuery('<input class="fm-width-100" type="text" id="default_date" onChange="change_hidden_input_value(this.value, \'default_date\', '+e+", '"+e+'_default_date_id_temp\')" value="'+t+'" />'))}function change_hidden_input_value(element_value,date_fields,id_int,id){document.getElementById(id).value=element_value,"default_date"==date_fields?"today"==element_value?jQuery("#"+id_int+"_elementform_id_temp").datepicker("setDate",new Date):(-1==element_value.indexOf("d")&&-1==element_value.indexOf("m")&&-1==element_value.indexOf("y")&&-1==element_value.indexOf("w")&&""!==element_value&&(element_value=jQuery.datepicker.formatDate(jQuery("#"+id_int+"_buttonform_id_temp").attr("format"),new Date(element_value))),jQuery("#"+id_int+"_elementform_id_temp").datepicker("setDate",element_value)):"minDate"==date_fields||"maxDate"==date_fields?"today"==element_value?jQuery("#"+id_int+"_elementform_id_temp").datepicker("option",date_fields,new Date):(-1==element_value.indexOf("d")&&-1==element_value.indexOf("m")&&-1==element_value.indexOf("y")&&-1==element_value.indexOf("w")&&""!==element_value&&(element_value=jQuery.datepicker.formatDate(jQuery("#"+id_int+"_buttonform_id_temp").attr("format"),new Date(element_value))),jQuery("#"+id_int+"_elementform_id_temp").datepicker("option",date_fields,element_value)):jQuery("#"+id_int+"_elementform_id_temp").datepicker("option","beforeShowDay",function(date){for(var invalid_dates=element_value,invalid_dates_finish=[],invalid_dates_start=invalid_dates.split(","),invalid_date_range=[],i=0;i<invalid_dates_start.length;i++)if(invalid_dates_start[i]=invalid_dates_start[i].trim(),invalid_dates_start[i].length<11)invalid_dates_finish.push(invalid_dates_start[i]);else if(4<invalid_dates_start[i].indexOf("-"))invalid_date_range.push(invalid_dates_start[i].split("-"));else{var invalid_date_array=invalid_dates_start[i].split("-"),start_invalid_day=invalid_date_array[0]+"-"+invalid_date_array[1]+"-"+invalid_date_array[2],end_invalid_day=invalid_date_array[3]+"-"+invalid_date_array[4]+"-"+invalid_date_array[5];invalid_date_range.push([start_invalid_day,end_invalid_day])}jQuery.each(invalid_date_range,function(e,t){for(var i=new Date(t[0]);i<=new Date(t[1]);i.setDate(i.getDate()+1))invalid_dates_finish.push(jQuery.datepicker.formatDate("mm/dd/yy",i))});var w_hide_sunday="yes"==jQuery("#"+id_int+"_show_week_days").attr("sunday")?"true":"day != 0",w_hide_monday="yes"==jQuery("#"+id_int+"_show_week_days").attr("monday")?"true":"day != 1",w_hide_tuesday="yes"==jQuery("#"+id_int+"_show_week_days").attr("tuesday")?"true":"day != 2",w_hide_wednesday="yes"==jQuery("#"+id_int+"_show_week_days").attr("wednesday")?"true":"day != 3",w_hide_thursday="yes"==jQuery("#"+id_int+"_show_week_days").attr("thursday")?"true":"day != 4",w_hide_friday="yes"==jQuery("#"+id_int+"_show_week_days").attr("friday")?"true":"day != 5",w_hide_saturday="yes"==jQuery("#"+id_int+"_show_week_days").attr("saturday")?"true":"day != 6",day=date.getDay(),string_days=jQuery.datepicker.formatDate("mm/dd/yy",date);return[-1==invalid_dates_finish.indexOf(string_days)&&eval(w_hide_sunday)&&eval(w_hide_monday)&&eval(w_hide_tuesday)&&eval(w_hide_wednesday)&&eval(w_hide_thursday)&&eval(w_hide_friday)&&eval(w_hide_saturday)]})}function create_minimum_date(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="min_date">Minimum Date</label>'),jQuery('<input class="fm-width-100" type="text" id="min_date" onChange="'+(1==i?"change_hidden_input_value_range(this.value, 'minDate', 'start', '"+e+"', '"+e+"_min_date_id_temp')":"change_hidden_input_value(this.value, 'minDate', "+e+", '"+e+"_min_date_id_temp')")+'" value="'+t+'" />'))}function create_maximum_date(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="max_date">Maximum Date</label>'),jQuery('<input class="fm-width-100" type="text" id="max_date" onChange="'+(1==i?"change_hidden_input_value_range(this.value, 'maxDate', 'end', "+e+", '"+e+"_max_date_id_temp')":"change_hidden_input_value(this.value, 'maxDate', "+e+", '"+e+"_max_date_id_temp')")+'" value="'+t+'" />'))}function create_excluded_dates(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="invalid_dates">Dates to Exclude</label>'),jQuery('<textarea class="fm-width-100" id="invalid_dates" rows="4" onChange="'+(1==i?"change_hidden_input_value_range(this.value, 'invalide_date', '', "+e+", '"+e+"_invalid_dates_id_temp')":"change_hidden_input_value(this.value, 'invalide_date', "+e+", '"+e+"_invalid_dates_id_temp')")+'">'+t+"</textarea>"))}function create_show_date_picker_button(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="el_show_image">Show Date Picker Button</label>'),jQuery('<input type="checkbox" id="el_show_image" onchange="show_image_datepicker(\''+e+"_show_image', '"+i+"')\""+("yes"==t?' checked="checked"':"")+" />"))}function show_image_datepicker(e,t){"yes"==document.getElementById(e+"form_id_temp").value?("date_range"==t?(jQuery("#"+e+"dateform_id_temp0").removeClass("wd-inline-block"),jQuery("#"+e+"dateform_id_temp0").addClass("wd-hidden"),jQuery("#"+e+"dateform_id_temp1").removeClass("wd-inline-block"),jQuery("#"+e+"dateform_id_temp1").addClass("wd-hidden")):(jQuery("#"+e+"dateform_id_temp").removeClass("wd-inline-block"),jQuery("#"+e+"dateform_id_temp").addClass("wd-hidden")),document.getElementById(e+"form_id_temp").setAttribute("value","no")):("date_range"==t?(jQuery("#"+e+"dateform_id_temp0").removeClass("wd-hidden"),jQuery("#"+e+"dateform_id_temp0").addClass("wd-inline-block"),jQuery("#"+e+"dateform_id_temp1").removeClass("wd-hidden"),jQuery("#"+e+"dateform_id_temp1").addClass("wd-inline-block")):(jQuery("#"+e+"dateform_id_temp").removeClass("wd-hidden"),jQuery("#"+e+"dateform_id_temp").addClass("wd-inline-block")),document.getElementById(e+"form_id_temp").setAttribute("value","yes"))}function create_selectable_week_days(e,t){var i=jQuery('<label class="fm-field-label">Selectable Week Days</label>'),a=jQuery('<input type="checkbox" id="el_show_sunday" onclick="show_week_days('+e+", 'sunday')\""+("yes"==t[0]?' checked="checked"':"")+" />"),n=jQuery('<label for="el_show_sunday">'+form_maker.sunday+"</label>"),l=jQuery('<input type="checkbox" id="el_show_monday" onclick="show_week_days('+e+", 'monday')\""+("yes"==t[1]?' checked="checked"':"")+" />"),d=jQuery('<label for="el_show_monday">'+form_maker.monday+"</label>"),_=jQuery('<input type="checkbox" id="el_show_tuesday" onclick="show_week_days('+e+", 'tuesday')\""+("yes"==t[2]?' checked="checked"':"")+" />"),r=jQuery('<label for="el_show_tuesday">'+form_maker.tuesday+"</label>"),o=jQuery('<input type="checkbox" id="el_show_wednesday" onclick="show_week_days('+e+", 'wednesday')\""+("yes"==t[3]?' checked="checked"':"")+" />"),m=jQuery('<label for="el_show_wednesday">'+form_maker.wednesday+"</label>"),s=jQuery('<input type="checkbox" id="el_show_thursday" onclick="show_week_days('+e+", 'thursday')\""+("yes"==t[4]?' checked="checked"':"")+" />"),u=jQuery('<label for="el_show_thursday">'+form_maker.thursday+"</label>"),c=jQuery('<input type="checkbox" id="el_show_friday" onclick="show_week_days('+e+", 'friday')\""+("yes"==t[5]?' checked="checked"':"")+" />"),p=jQuery('<label for="el_show_friday">'+form_maker.friday+"</label>"),f=jQuery('<input type="checkbox" id="el_show_saturday" onclick="show_week_days('+e+", 'saturday')\""+("yes"==t[6]?' checked="checked"':"")+" />"),y=jQuery('<label for="el_show_saturday">'+form_maker.saturday+"</label>"),h=a;return create_option_container(i,h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=h.add(n)).add(jQuery("<br />"))).add(l)).add(d)).add(jQuery("<br />"))).add(_)).add(r)).add(jQuery("<br />"))).add(o)).add(m)).add(jQuery("<br />"))).add(s)).add(u)).add(jQuery("<br />"))).add(c)).add(p)).add(jQuery("<br />"))).add(f)).add(y))}function go_to_type_date_new(e){w_attr_name=[],w_attr_value=[],w_show_days=["yes","yes","yes","yes","yes","yes","yes"],type_date_new(e,"Date","","top","no","","","no","no","","mm/dd/yy","0","","","","",w_show_days,"yes","...",w_attr_name,w_attr_value,"no")}function type_date_new(i,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_date,w_required,w_show_image,w_class,w_format,w_start_day,w_default_date,w_min_date,w_max_date,w_invalid_dates,w_show_days,w_hide_time,w_but_val,w_attr_name,w_attr_value,w_disable_past_days){jQuery("#element_type").val("type_date_new"),delete_last_child();var t=jQuery("#edit_table"),edit_div=jQuery('<div id="edit_div"></div>');t.append(edit_div);var edit_main_table=jQuery('<div id="edit_main_table"></div>');edit_div.append(edit_main_table),edit_main_table.append(create_field_type("type_date_new")),edit_main_table.append(create_label(i,w_field_label)),edit_main_table.append(create_label_position(i,w_field_label_pos)),edit_main_table.append(create_hide_label(i,w_hide_label)),edit_main_table.append(create_required(i,w_required)),edit_main_table.append(create_field_size(i,w_size)),edit_main_table.append(create_date_format(i,w_format)),edit_main_table.append(create_week_start(i,w_start_day));var advanced_options_container=jQuery('<div class="inside"></div>');edit_main_table.append(create_advanced_options_container(advanced_options_container)),advanced_options_container.append(create_default_date(i,w_default_date)),advanced_options_container.append(create_minimum_date(i,w_min_date)),advanced_options_container.append(create_maximum_date(i,w_max_date)),advanced_options_container.append(create_excluded_dates(i,w_invalid_dates)),advanced_options_container.append(create_selectable_week_days(i,w_show_days)),advanced_options_container.append(create_field_label_size(i,w_field_label_size)),advanced_options_container.append(create_class(i,w_class)),advanced_options_container.append(create_show_date_picker_button(i,w_show_image,"new_date")),advanced_options_container.append(create_additional_attributes(i,w_attr_name,"type_date_new"));var adding_type=document.createElement("input");adding_type.setAttribute("type","hidden"),adding_type.setAttribute("value","type_date_new"),adding_type.setAttribute("name",i+"_typeform_id_temp"),adding_type.setAttribute("id",i+"_typeform_id_temp");var adding_required=document.createElement("input");adding_required.setAttribute("type","hidden"),adding_required.setAttribute("value",w_required),adding_required.setAttribute("name",i+"_requiredform_id_temp"),adding_required.setAttribute("id",i+"_requiredform_id_temp");var adding_hide_label=document.createElement("input");adding_hide_label.setAttribute("type","hidden"),adding_hide_label.setAttribute("value",w_hide_label),adding_hide_label.setAttribute("name",i+"_hide_labelform_id_temp"),adding_hide_label.setAttribute("id",i+"_hide_labelform_id_temp");var adding_dis_past_days=document.createElement("input");adding_dis_past_days.setAttribute("type","hidden"),adding_dis_past_days.setAttribute("value",w_disable_past_days),adding_dis_past_days.setAttribute("id",i+"_dis_past_daysform_id_temp"),adding_dis_past_days.setAttribute("name",i+"_dis_past_daysform_id_temp");var adding_start_day=document.createElement("input");adding_start_day.setAttribute("type","hidden"),adding_start_day.setAttribute("value",w_start_day),adding_start_day.setAttribute("name",i+"_start_dayform_id_temp"),adding_start_day.setAttribute("id",i+"_start_dayform_id_temp");var adding_default_date=document.createElement("input");adding_default_date.setAttribute("type","hidden"),adding_default_date.setAttribute("name",i+"_default_date_id_temp"),adding_default_date.setAttribute("id",i+"_default_date_id_temp"),adding_default_date.setAttribute("value",w_default_date);var adding_min_date=document.createElement("input");adding_min_date.setAttribute("type","hidden"),adding_min_date.setAttribute("name",i+"_min_date_id_temp"),adding_min_date.setAttribute("id",i+"_min_date_id_temp"),adding_min_date.setAttribute("value",w_min_date);var adding_max_date=document.createElement("input");adding_max_date.setAttribute("type","hidden"),adding_max_date.setAttribute("name",i+"_max_date_id_temp"),adding_max_date.setAttribute("id",i+"_max_date_id_temp"),adding_max_date.setAttribute("value",w_max_date);var adding_invalid_dates=document.createElement("input");adding_invalid_dates.setAttribute("type","hidden"),adding_invalid_dates.setAttribute("name",i+"_invalid_dates_id_temp"),adding_invalid_dates.setAttribute("id",i+"_invalid_dates_id_temp"),adding_invalid_dates.setAttribute("value",w_invalid_dates);var adding_show_days=document.createElement("input");adding_show_days.setAttribute("type","hidden"),adding_show_days.setAttribute("name",i+"_show_week_days"),adding_show_days.setAttribute("id",i+"_show_week_days"),adding_show_days.setAttribute("sunday",w_show_days[0]),adding_show_days.setAttribute("monday",w_show_days[1]),adding_show_days.setAttribute("tuesday",w_show_days[2]),adding_show_days.setAttribute("wednesday",w_show_days[3]),adding_show_days.setAttribute("thursday",w_show_days[4]),adding_show_days.setAttribute("friday",w_show_days[5]),adding_show_days.setAttribute("saturday",w_show_days[6]);var adding_show_image=document.createElement("input");adding_show_image.setAttribute("type","hidden"),adding_show_image.setAttribute("value",w_show_image),adding_show_image.setAttribute("name",i+"_show_imageform_id_temp"),adding_show_image.setAttribute("id",i+"_show_imageform_id_temp");var adding_hide_time=document.createElement("input");adding_hide_time.setAttribute("type","hidden"),adding_hide_time.setAttribute("value",w_hide_time),adding_hide_time.setAttribute("name",i+"_hide_timeform_id_temp"),adding_hide_time.setAttribute("id",i+"_hide_timeform_id_temp");var div=document.createElement("div");div.setAttribute("id","main_div");var div_field=document.createElement("div");div_field.setAttribute("id",i+"_elemet_tableform_id_temp");var display_label_div="yes"==w_hide_label?"none":"table-cell",div_label=document.createElement("div");div_label.setAttribute("align","left"),div_label.style.display=display_label_div,div_label.style.width=w_field_label_size+"px",div_label.setAttribute("id",i+"_label_sectionform_id_temp");var div_element=document.createElement("div");div_element.setAttribute("align","left"),div_element.style.display="table-cell",div_element.style.position="relative",div_element.setAttribute("id",i+"_element_sectionform_id_temp");var table_date=document.createElement("div");table_date.setAttribute("id",i+"_table_date"),table_date.style.display="table";var tr_date1=document.createElement("div");tr_date1.setAttribute("id",i+"_tr_date1"),tr_date1.style.display="table-row";var tr_date2=document.createElement("div");tr_date2.setAttribute("id",i+"_tr_date2"),tr_date2.style.display="table-row";var td_date_input1=document.createElement("div");td_date_input1.setAttribute("id",i+"_td_date_input1"),td_date_input1.style.display="table-cell";var td_date_input2=document.createElement("div");td_date_input2.setAttribute("id",i+"_td_date_input2"),td_date_input2.style.display="table-cell";var td_date_input3=document.createElement("div");td_date_input3.setAttribute("id",i+"_td_date_input3"),td_date_input3.style.display="table-cell";var td_date_label1=document.createElement("div");td_date_label1.setAttribute("id",i+"_td_date_label1"),td_date_label1.style.display="table-cell";var td_date_label2=document.createElement("div");td_date_label2.setAttribute("id",i+"_td_date_label2"),td_date_label2.style.display="table-cell";var td_date_label3=document.createElement("div");td_date_label3.setAttribute("id",i+"_td_date_label3"),td_date_label3.style.display="table-cell";var br3=document.createElement("br"),br4=document.createElement("br"),label=document.createElement("span");label.setAttribute("id",i+"_element_labelform_id_temp"),label.innerHTML=w_field_label,label.setAttribute("class","label"),label.style.verticalAlign="top";var required=document.createElement("span");required.setAttribute("id",i+"_required_elementform_id_temp"),required.innerHTML="",required.setAttribute("class","required"),required.style.verticalAlign="top","yes"==w_required&&(required.innerHTML=" *");var adding=document.createElement("input");adding.setAttribute("type","text"),adding.setAttribute("value",w_date),adding.setAttribute("id",i+"_elementform_id_temp"),adding.setAttribute("name",i+"_elementform_id_temp"),adding.style.cssText="width:"+w_size+"px;";var adding_image=document.createElement("span");adding_image.setAttribute("id",i+"_show_imagedateform_id_temp"),adding_image.setAttribute("class","dashicons dashicons-calendar-alt wd-calendar-button "+("yes"==w_show_image?"wd-inline-block":"wd-hidden")),adding_image.setAttribute("onClick","show_datepicker('"+i+"_elementform_id_temp')");var adding_desc_p=document.createElement("p"),adding_desc_b=document.createElement("b"),text_format_1=document.createTextNode("The format can be combinations of the following:"),text_format_2=document.createTextNode("d - day of month (no leading zero)"),text_format_3=document.createTextNode("dd - day of month (two digit)"),text_format_4=document.createTextNode("o - day of the year (no leading zeros)"),text_format_5=document.createTextNode("oo - day of the year (three digit)"),text_format_6=document.createTextNode("D - day name short"),text_format_7=document.createTextNode("DD - day name long"),text_format_8=document.createTextNode("m - month of year (no leading zero)"),text_format_9=document.createTextNode("mm - month of year (two digit)"),text_format_10=document.createTextNode("M - month name short"),text_format_11=document.createTextNode("MM - month name long"),text_format_12=document.createTextNode("y - year (two digit)"),text_format_13=document.createTextNode("yy - year (four digit)"),format_br_1=document.createElement("br"),format_br_2=document.createElement("br"),format_br_3=document.createElement("br"),format_br_4=document.createElement("br"),format_br_5=document.createElement("br"),format_br_6=document.createElement("br"),format_br_7=document.createElement("br"),format_br_8=document.createElement("br"),format_br_9=document.createElement("br"),format_br_10=document.createElement("br"),format_br_11=document.createElement("br"),format_br_12=document.createElement("br"),format_br_13=document.createElement("br"),adding_desc_p_2=document.createElement("p"),adding_desc_b_2=document.createElement("b"),text_default_1=document.createTextNode("Accepted values of Default, Minimum and Maximum:"),text_default_3=document.createTextNode("Date: A fixed date using the date format mm/dd/yy, e.g. 05/25/2016"),text_default_2=document.createTextNode("Empty: No default / minimum / maximum"),text_default_4=document.createTextNode("'today' : current date"),text_default_5=document.createTextNode("Relative date: A number of days/weeks/months/years from today, e.g. '-1d' will be yesterday, '+1y+3m+2w+3d' will be 1 year, 3 months, 2 weeks and 3 days from today."),adding_desc_p_3=document.createElement("p"),adding_desc_b_3=document.createElement("b"),text_default_6=document.createTextNode("Dates to exclude:"),text_default_7=document.createTextNode("Enter comma-separated list of dates and date ranges using the date format 'mm/dd/yy', e.g. 08/15/2016, 06/15/2016-06/20/2016"),default_br_1=document.createElement("br"),default_br_2=document.createElement("br"),default_br_3=document.createElement("br"),default_br_4=document.createElement("br"),default_br_5=document.createElement("br"),default_br_6=document.createElement("br"),default_br_7=document.createElement("br"),dis_past_days="yes"==w_disable_past_days,adding_button=document.createElement("input");adding_button.setAttribute("id",i+"_buttonform_id_temp"),adding_button.setAttribute("class","button"),adding_button.setAttribute("type","hidden"),adding_button.setAttribute("value",w_but_val),adding_button.setAttribute("format",w_format);var main_td=document.getElementById("show_table");div_label.appendChild(label),div_label.appendChild(required),div_element.appendChild(adding_type),div_element.appendChild(adding_required),div_element.appendChild(adding_hide_label),div_element.appendChild(adding_show_image),div_element.appendChild(adding_dis_past_days),div_element.appendChild(adding),div_element.appendChild(adding_image),adding_desc_b.appendChild(text_format_1),adding_desc_p.appendChild(adding_desc_b),adding_desc_p.appendChild(format_br_1),adding_desc_p.appendChild(text_format_2),adding_desc_p.appendChild(format_br_2),adding_desc_p.appendChild(text_format_3),adding_desc_p.appendChild(format_br_3),adding_desc_p.appendChild(text_format_4),adding_desc_p.appendChild(format_br_4),adding_desc_p.appendChild(text_format_5),adding_desc_p.appendChild(format_br_5),adding_desc_p.appendChild(text_format_6),adding_desc_p.appendChild(format_br_6),adding_desc_p.appendChild(text_format_7),adding_desc_p.appendChild(format_br_7),adding_desc_p.appendChild(text_format_8),adding_desc_p.appendChild(format_br_8),adding_desc_p.appendChild(text_format_9),adding_desc_p.appendChild(format_br_9),adding_desc_p.appendChild(text_format_10),adding_desc_p.appendChild(format_br_10),adding_desc_p.appendChild(text_format_11),adding_desc_p.appendChild(format_br_11),adding_desc_p.appendChild(text_format_12),adding_desc_p.appendChild(format_br_12),adding_desc_p.appendChild(text_format_13),adding_desc_p.appendChild(format_br_13),adding_desc_b_2.appendChild(text_default_1),adding_desc_p_2.appendChild(adding_desc_b_2),adding_desc_p_2.appendChild(default_br_1),adding_desc_p_2.appendChild(text_default_2),adding_desc_p_2.appendChild(default_br_2),adding_desc_p_2.appendChild(text_default_3),adding_desc_p_2.appendChild(default_br_3),adding_desc_p_2.appendChild(text_default_4),adding_desc_p_2.appendChild(default_br_4),adding_desc_p_2.appendChild(text_default_5),adding_desc_b_3.appendChild(text_default_6),adding_desc_p_3.appendChild(adding_desc_b_3),adding_desc_p_3.appendChild(default_br_6),adding_desc_p_3.appendChild(text_default_7),adding_desc_p_3.appendChild(default_br_7),div_element.appendChild(adding_default_date),div_element.appendChild(adding_start_day),div_element.appendChild(adding_min_date),div_element.appendChild(adding_max_date),div_element.appendChild(adding_invalid_dates),div_element.appendChild(adding_hide_time),div_element.appendChild(adding_show_days),div_element.appendChild(adding_button),div_field.appendChild(div_label),div_field.appendChild(div_element),div.appendChild(div_field),div.appendChild(br3),div.appendChild(adding_desc_p),div.appendChild(adding_desc_p_2),div.appendChild(adding_desc_p_3),main_td.appendChild(div),"top"==w_field_label_pos&&label_top(i),change_class(w_class,i),refresh_attr(i,"type_text"),jQuery("#"+i+"_elementform_id_temp").datepicker({dateFormat:"mm/dd/yy",minDate:w_min_date,maxDate:w_max_date,firstDay:w_start_day,changeMonth:!0,changeYear:!0,yearRange:"-100:+50",showOtherMonths:!0,selectOtherMonths:!0,beforeShowDay:function(date){for(var invalid_dates=w_invalid_dates,invalid_dates_finish=[],invalid_dates_start=invalid_dates.split(","),invalid_date_range=[],i=0;i<invalid_dates_start.length;i++)if(invalid_dates_start[i]=invalid_dates_start[i].trim(),invalid_dates_start[i].length<11)invalid_dates_finish.push(invalid_dates_start[i]);else if(4<invalid_dates_start[i].indexOf("-"))invalid_date_range.push(invalid_dates_start[i].split("-"));else{var invalid_date_array=invalid_dates_start[i].split("-"),start_invalid_day=invalid_date_array[0]+"-"+invalid_date_array[1]+"-"+invalid_date_array[2],end_invalid_day=invalid_date_array[3]+"-"+invalid_date_array[4]+"-"+invalid_date_array[5];invalid_date_range.push([start_invalid_day,end_invalid_day])}jQuery.each(invalid_date_range,function(e,t){for(var i=new Date(t[0]);i<=new Date(t[1]);i.setDate(i.getDate()+1))invalid_dates_finish.push(jQuery.datepicker.formatDate("mm/dd/yy",i))});var string_days=jQuery.datepicker.formatDate("mm/dd/yy",date),day=date.getDay(),w_hide_sunday="yes"==w_show_days[0]?"true":"day != 0",w_hide_monday="yes"==w_show_days[1]?"true":"day != 1",w_hide_tuesday="yes"==w_show_days[2]?"true":"day != 2",w_hide_wednesday="yes"==w_show_days[3]?"true":"day != 3",w_hide_thursday="yes"==w_show_days[4]?"true":"day != 4",w_hide_friday="yes"==w_show_days[5]?"true":"day != 5",w_hide_saturday="yes"==w_show_days[6]?"true":"day != 6";return[-1==invalid_dates_finish.indexOf(string_days)&&eval(w_hide_sunday)&&eval(w_hide_monday)&&eval(w_hide_tuesday)&&eval(w_hide_wednesday)&&eval(w_hide_thursday)&&eval(w_hide_friday)&&eval(w_hide_saturday)]}}),jQuery("#"+i+"_elementform_id_temp").datepicker("option","dateFormat",w_format),"today"==w_default_date?jQuery("#"+i+"_elementform_id_temp").datepicker("setDate",new Date):(-1==w_default_date.indexOf("d")&&-1==w_default_date.indexOf("m")&&-1==w_default_date.indexOf("y")&&-1==w_default_date.indexOf("w")&&""!==w_default_date&&(w_default_date=jQuery.datepicker.formatDate(w_format,new Date(w_default_date))),jQuery("#"+i+"_elementform_id_temp").datepicker("setDate",w_default_date))}function create_enable_options_value(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="el_disable_value">Enable option\'s value</label>'),jQuery('<input type="checkbox" id="el_disable_value" onchange="refresh_sel_options('+e+", '"+i+"')\""+("yes"==t?' checked="checked"':"")+" />"))}function refresh_sel_options(i,e){if("checkbox"!=e&&"radio"!=e||(jQuery("#el_disable_value").prop("checked")?(jQuery("#"+i+"_value_disabledform_id_temp").val("yes"),jQuery(".el_option_value").removeAttr("disabled")):(jQuery("#"+i+"_value_disabledform_id_temp").val("no"),jQuery(".el_option_value").attr("disabled","disabled")),refresh_rowcol(i,e)),"select"==e){jQuery("#el_disable_value").prop("checked")?(jQuery("#"+i+"_value_disabledform_id_temp").val("yes"),jQuery(".el_option_value").removeAttr("disabled"),jQuery(".el_option_dis").attr("disabled","disabled")):(jQuery("#"+i+"_value_disabledform_id_temp").val("no"),jQuery(".el_option_value").attr("disabled","disabled"),jQuery(".el_option_dis").removeAttr("disabled"));var a=document.getElementById(i+"_elementform_id_temp");a.innerHTML="",jQuery(".change_pos").each(function(){var e=jQuery(this)[0].id,t=document.createElement("option");t.setAttribute("id",i+"_option"+e),jQuery("#el_disable_value").prop("checked")?t.setAttribute("value",jQuery(this).find(jQuery("input[type='text']"))[1].value):jQuery(this).find(jQuery("input[type='checkbox']")).prop("checked")?t.value="":t.setAttribute("value",jQuery(this).find(jQuery("input[type='text']"))[0].value),jQuery(this).find(jQuery(".el_option_params")).val()&&(w_params=jQuery(this).find(jQuery(".el_option_params")).val().split("[where_order_by]"),t.setAttribute("where",w_params[0]),w_params=w_params[1].split("[db_info]"),t.setAttribute("order_by",w_params[0]),t.setAttribute("db_info",w_params[1])),t.setAttribute("onselect","set_select('"+i+"_option"+e+"')"),t.innerHTML=jQuery(this).find(jQuery("input[type='text']"))[0].value,a.appendChild(t)})}form_maker.is_demo?jQuery("#el_choices_add").next().attr("onclick","alert('This feature is disabled in demo.')"):jQuery("#el_choices_add").next().attr("onclick","tb_show('', 'admin-ajax.php?action=select_data_from_db&field_id="+i+"&nonce="+fm_ajax.ajaxnonce+"&field_type="+e+"&value_disabled="+jQuery("#"+i+"_value_disabledform_id_temp").val()+"&width=530&height=370&TB_iframe=1');return false;")}function create_select_options(e,t,i,a,l,d){var _=jQuery('<label class="fm-field-label">Options</label>'),r=jQuery('<button id="el_choices_add" class="fm-add-option button-secondary" onClick="add_choise(\'select\', '+e+'); return false;" title="Add option"><span class="field-type-button fm-add-attribute dashicons dashicons-plus-alt"></span>Option</button>');if(form_maker.is_demo)var o=jQuery('<button class="fm-add-option button-secondary" onClick="alert(\'This feature is disabled in demo.\') return false;" title="Add options from database"><span class="field-type-button fm-add-attribute dashicons dashicons-plus-alt"></span>From Database</button>');else o=jQuery("<button class=\"fm-add-option button-secondary\" onClick=\"tb_show('', 'admin-ajax.php?action=select_data_from_db&nonce="+fm_ajax.ajaxnonce+"&field_id="+e+"&field_type=select&value_disabled="+t+'&width=530&height=370&TB_iframe=1\'); return false;" title="Add options from database"><span class="field-type-button fm-add-attribute dashicons dashicons-plus-alt"></span>From Database</button>');var m=jQuery('<div class="fm-width-100 error">IMPORTANT! Check the "Empty value" checkbox only if you want the option to be considered as empty.</div>'),s=jQuery('<div id="choices" class="fm-width-100 ui-sortable"></div>'),u=jQuery('<div class="fm-width-100"><div class="fm-header-label fm-width-30">Name</div><div class="fm-header-label fm-width-30">Value</div><div class="fm-header-label fm-width-20">Empty value</div><div class="fm-header-label fm-width-10">Delete</div><div class="fm-header-label fm-width-10">Move</div></div>');for(s.append(u),n=i.length,j=0;j<n;j++){var c=jQuery('<div id="'+j+'" class="change_pos fm-width-100"><div class="fm-table-col fm-width-30"><input type="text" class="fm-field-choice" id="el_option'+j+'" value="'+i[j].replace(/"/g,"&quot;")+'" onKeyUp="change_label_name('+j+", '"+e+"_option"+j+"', this.value, 'select')\" onpaste=\"elem=this; change_label_name_on_paste("+j+", '"+e+"_option"+j+"', 'select')\""+(a[j]?' disabled="disabled"':"")+' /></div><div class="fm-table-col fm-width-30"><input type="text" class="fm-field-choice'+(a[j]?"":" el_option_value")+'" id="el_option_value'+j+'" value="'+l[j].replace(/"/g,"&quot;")+'" onKeyUp="change_label_value(\''+e+"_option"+j+"', this.value)\" onpaste=\"change_label_value_on_paste('"+e+"_option"+j+"', this)\""+("no"==t||a[j]?' disabled="disabled"':"")+' /></div><div class="fm-table-col fm-width-20"><input type="checkbox" title="Empty value" class="el_option_dis" id="el_option'+j+'_dis" onClick="dis_option(\''+e+"_option"+j+"', this.checked, "+j+')"'+("yes"==t?' disabled="disabled"':"")+(d[j]?' checked="checked"':"")+' /></div><div class="fm-table-col fm-width-10"><span class="fm-remove-attribute dashicons dashicons-dismiss" id="el_option'+j+'_remove" onClick="remove_option('+j+", "+e+')"></span></div><div class="fm-table-col fm-width-10"><span class="fm-move-attribute fm-ico-draggable el_choices_sortable"></span></div><input type="hidden" class="el_option_params" id="el_option_params'+j+'" value="'+a[j]+'" /></div>');s.append(c)}var p=_;return create_option_container(null,p=(p=(p=(p=p.add(r)).add(o)).add(s)).add(m))}function add_choise(e,t){var i=0;if(jQuery(".change_pos").each(function(){var e=parseInt(jQuery(this)[0].id);i=i<e?e:i}),i+=1,"radio"==e||"checkbox"==e){var a=jQuery("#choices"),n=jQuery('<div id="'+i+'" class="change_pos fm-width-100"><div class="fm-table-col fm-width-40"><input type="text" class="fm-field-choice" id="el_choices'+i+'" value="" onKeyUp="change_label_name(\''+i+"', '"+t+"_label_element"+i+"', this.value, '"+e+"'); change_label_value('"+t+"_elementform_id_temp"+i+"', jQuery('#el_option_value"+i+'\').val())" onpaste="elem=this; change_label_name_on_paste('+i+", '"+t+"_label_element"+i+"', '"+e+"'); change_label_value_on_paste('"+t+"_elementform_id_temp"+i+'\', this)" /></div><div class="fm-table-col fm-width-40"><input type="text" class="fm-field-choice el_option_value" id="el_option_value'+i+'" value="" onKeyUp="change_label_value(\''+t+"_elementform_id_temp"+i+"', this.value)\" onpaste=\"change_label_value_on_paste('"+t+"_elementform_id_temp"+i+"', this)\""+(jQuery("#el_disable_value").prop("checked")?"":'disabled="disabled"')+' /></div><div class="fm-table-col fm-width-10"><span class="fm-remove-attribute dashicons dashicons-dismiss" id="el_choices'+i+'_remove" onClick="remove_choise('+i+","+t+",'"+e+'\')"></span></div><div class="fm-table-col fm-width-10"><span class="fm-move-attribute fm-ico-draggable el_choices_sortable"></span></div></div>');a.append(n),refresh_rowcol(t,e)}if("select"==e){var l=jQuery("#"+t+"_elementform_id_temp"),d=jQuery('<option id="'+t+"_option"+i+'"></option>');l.append(d);a=jQuery("#choices"),n=jQuery('<div id="'+i+'" class="change_pos fm-width-100"><div class="fm-table-col fm-width-30"><input type="text" class="fm-field-choice" id="el_option'+i+'" value="" onKeyUp="change_label_name('+i+", '"+t+"_option"+i+"', this.value, 'select')\" onpaste=\"elem=this; change_label_name_on_paste("+i+", '"+t+"_option"+i+'\', \'select\')" /></div><div class="fm-table-col fm-width-30"><input type="text" class="fm-field-choice el_option_value" id="el_option_value'+i+'" value="" onKeyUp="change_label_value(\''+t+"_option"+i+"', this.value)\" onpaste=\"change_label_value_on_paste('"+t+"_option"+i+"', this)\""+(jQuery("#el_disable_value").prop("checked")?"":'disabled="disabled"')+' /></div><div class="fm-table-col fm-width-20"><input type="checkbox" title="Empty value" class="el_option_dis" id="el_option'+i+'_dis" onClick="dis_option(\''+t+"_option"+i+"', this.checked, "+i+')"'+(jQuery("#el_disable_value").prop("checked")?'disabled="disabled"':"")+' /></div><div class="fm-table-col fm-width-10"><span class="fm-remove-attribute dashicons dashicons-dismiss" id="el_option'+i+'_remove" onClick="remove_option('+i+", "+t+')"></span></div><div class="fm-table-col fm-width-10"><span class="fm-move-attribute fm-ico-draggable el_choices_sortable"></span></div><input type="hidden" id="el_option_params'+i+'" class="el_option_params" value=""></div>');a.append(n)}}function change_label_name(e,t,i,a){jQuery("#"+t).html(i),jQuery("#el_disable_value").prop("checked")||(jQuery("#el_choices"+e).attr("other")||jQuery("#el_option_value"+e).val(i),"select"==a&&jQuery("#"+t).val(i))}function change_label_name_on_paste(e,t,i,a){setTimeout(function(){i=elem.value,jQuery("#"+t).html(i),jQuery("#el_disable_value").prop("checked")||(jQuery("#el_choices"+e).attr("other")||jQuery("#el_option_value"+e).val(i),"select"==a&&jQuery("#"+t).val(i))},100)}function change_label_value(e,t){document.getElementById(e).value=t}function change_label_value_on_paste(e,t){setTimeout(function(){label=t.value,document.getElementById(e).value=label},100)}function dis_option(e,t,i){t?(jQuery("#"+e).val(""),jQuery("#el_option_value"+i).val("")):(jQuery("#"+e).val(jQuery("#"+e).html()),jQuery("#el_option_value"+i).val(jQuery("#el_option"+i).val()))}function remove_option(e,t){var i=document.getElementById(t+"_elementform_id_temp"),a=document.getElementById(t+"_option"+e);i.removeChild(a);var n=document.getElementById("choices"),l=document.getElementById(e);n.removeChild(l)}function go_to_type_own_select(e){w_choices=["Select value","option 1","option 2"],w_choices_value=["","option 1","option 2"],w_choices_params=["","",""],w_choices_checked=["1","0","0"],w_choices_disabled=[!0,!1,!1],w_attr_name=[],w_attr_value=[],type_own_select(e,"Select","","top","no","",w_choices,w_choices_checked,"no","no","wdform_select",w_attr_name,w_attr_value,w_choices_disabled,w_choices_value,w_choices_params)}function type_own_select(i,e,t,a,l,d,_,r,o,m,s,u,c,p,f,y){jQuery("#element_type").val("type_own_select"),delete_last_child();var h=jQuery("#edit_table"),b=jQuery('<div id="edit_div"></div>');h.append(b);var v=jQuery('<div id="edit_main_table"></div>');b.append(v),v.append(create_field_type("type_own_select")),v.append(create_label(i,e)),v.append(create_label_position(i,a)),v.append(create_hide_label(i,l)),v.append(create_required(i,o)),v.append(create_field_size(i,d)),v.append(create_select_options(i,m,_,y,f,p));var w=jQuery('<div class="inside"></div>');v.append(create_advanced_options_container(w)),w.append(create_field_label_size(i,t)),w.append(create_class(i,s)),w.append(create_enable_options_value(i,m,"select")),w.append(create_additional_attributes(i,u,"type_own_select")),n=_.length;var g=document.createElement("input");g.setAttribute("type","hidden"),g.setAttribute("value","type_own_select"),g.setAttribute("name",i+"_typeform_id_temp"),g.setAttribute("id",i+"_typeform_id_temp");var E=document.createElement("input");E.setAttribute("type","hidden"),E.setAttribute("value",o),E.setAttribute("name",i+"_requiredform_id_temp"),E.setAttribute("id",i+"_requiredform_id_temp");var A=document.createElement("input");A.setAttribute("type","hidden"),A.setAttribute("value",l),A.setAttribute("name",i+"_hide_labelform_id_temp"),A.setAttribute("id",i+"_hide_labelform_id_temp");var x=document.createElement("input");x.setAttribute("type","hidden"),x.setAttribute("value",m),x.setAttribute("name",i+"_value_disabledform_id_temp"),x.setAttribute("id",i+"_value_disabledform_id_temp");var k=document.createElement("div");k.setAttribute("id","main_div");var I=document.createElement("div");I.setAttribute("id",i+"_elemet_tableform_id_temp");var C="yes"==l?"none":"table-cell",B=document.createElement("div");B.setAttribute("align","left"),B.style.display=C,B.style.width=t+"px",B.setAttribute("id",i+"_label_sectionform_id_temp");var Q=document.createElement("div");Q.setAttribute("align","left"),Q.style.display="table-cell",Q.setAttribute("id",i+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var T=document.createElement("br"),M=(document.createElement("br"),document.createElement("div"));M.setAttribute("id",i+"_table_little"),M.style.display="table";var L=document.createElement("div");L.setAttribute("id",i+"_element_tr1"),L.style.display="table-row";var z=document.createElement("div");z.setAttribute("id",i+"_element_tr2"),z.style.display="table-row";var q=document.createElement("div");q.setAttribute("valign","top"),q.setAttribute("id",i+"_td_little1"),q.style.display="table-cell";var H=document.createElement("div");H.setAttribute("valign","top"),H.setAttribute("id",i+"_td_little2"),H.style.display="table-cell";var N=document.createElement("span");N.setAttribute("id",i+"_element_labelform_id_temp"),N.innerHTML=e,N.setAttribute("class","label"),N.style.verticalAlign="top";var S=document.createElement("span");S.setAttribute("id",i+"_required_elementform_id_temp"),S.innerHTML="",S.setAttribute("class","required"),S.style.verticalAlign="top","yes"==o&&(S.innerHTML=" *");var D=document.createElement("select");for(D.setAttribute("id",i+"_elementform_id_temp"),D.setAttribute("name",i+"_elementform_id_temp"),D.style.cssText="width:"+d+"px",D.setAttribute("onchange","set_select(this)"),j=0;j<n;j++){var P=document.createElement("option");P.setAttribute("id",i+"_option"+j),"yes"==m?P.setAttribute("value",f[j].replace(/"/g,"&quot;")):p[j]?P.value="":P.setAttribute("value",_[j].replace(/"/g,"&quot;")),y[j]&&(w_params=y[j].split("[where_order_by]"),P.setAttribute("where",w_params[0]),w_params=w_params[1].split("[db_info]"),P.setAttribute("order_by",w_params[0]),P.setAttribute("db_info",w_params[1])),P.setAttribute("onselect","set_select('"+i+"_option"+j+"')"),P.innerHTML=_[j].replace(/"/g,"&quot;"),1==r[j]&&P.setAttribute("selected","selected"),D.appendChild(P)}var O=document.getElementById("show_table");B.appendChild(N),B.appendChild(S),Q.appendChild(A),Q.appendChild(g),Q.appendChild(E),Q.appendChild(x),Q.appendChild(D),I.appendChild(B),I.appendChild(Q),k.appendChild(I),k.appendChild(T),O.appendChild(k),"top"==a&&label_top(i),change_class(s,i),refresh_attr(i,"type_text"),jQuery(function(){jQuery("#choices").sortable({items:".change_pos",handle:".el_choices_sortable",update:function(e,t){refresh_sel_options(i,"select")}})}),jQuery("#main_div").append(form_maker.type_select_description)}function create_relative_position(e,t,i){var a=jQuery('<label class="fm-field-label">Relative Position</label>'),n=jQuery('<input type="radio" id="edit_for_flow_vertical" name="edit_for_flow" value="ver" onchange="refresh_rowcol('+e+",'"+i+"')\""+("hor"==t?"":' checked="checked"')+" />"),l=jQuery('<label for="edit_for_flow_vertical">Vertical</label>'),d=jQuery('<input type="radio" id="edit_for_flow_horizontal" name="edit_for_flow" value="hor" onchange="refresh_rowcol('+e+",'"+i+"')\""+("hor"==t?' checked="checked"':"")+" />"),_=jQuery('<label for="edit_for_flow_horizontal">Horizontal</label>'),r=n;return create_option_container(a,r=(r=(r=r.add(l)).add(d)).add(_))}function refresh_rowcol(l,d){document.getElementById("edit_for_rowcol").value||(document.getElementById("edit_for_rowcol").value=1),document.getElementById(l+"_rowcol_numform_id_temp").value=document.getElementById("edit_for_rowcol").value;var _=document.getElementById(l+"_table_little");if(_.removeAttribute("for_hor"),_.innerHTML="",choeices=jQuery(".change_pos").length,1==document.getElementById("edit_for_flow_vertical").checked){var n=document.getElementById("edit_for_rowcol").value,r=parseInt((choeices+1)/n),o=0,m=1;tr_row=document.createElement("div"),tr_row.setAttribute("id",l+"_element_tr0"),tr_row.style.display="table-row",jQuery(".change_pos").each(function(){var e=jQuery(this)[0].id;n<=o&&(o=0,tr_row=document.createElement("div"),tr_row.setAttribute("id",l+"_element_tr"+m),tr_row.style.display="table-row",m++);var t=document.createElement("div");t.setAttribute("valign","top"),t.setAttribute("id",l+"_td_little"+e),t.setAttribute("idi",e),t.style.display="table-cell";var i=document.createElement("input");i.setAttribute("type",d),i.setAttribute("id",l+"_elementform_id_temp"+e),"checked"==jQuery("#"+l+"_elementform_id_temp"+e).attr("checked")&&i.setAttribute("checked","checked"),"right"==document.getElementById(l+"_option_left_right").value&&(i.style.cssText="float: left !important"),"checkbox"==d&&(i.setAttribute("name",l+"_elementform_id_temp"+e),"yes"==document.getElementById(l+"_allow_otherform_id_temp").value&&"1"==jQuery(this).find("#el_choices"+e).attr("other")?(i.setAttribute("value",""),i.setAttribute("other","1"),i.setAttribute("onclick","if(set_checked('"+l+"','"+e+"','form_id_temp')) show_other_input('"+l+"','form_id_temp');")):("no"==document.getElementById(l+"_value_disabledform_id_temp").value?i.setAttribute("value",jQuery(this).find("#el_choices"+e).val()):i.setAttribute("value",jQuery(this).find("#el_option_value"+e).val()),i.setAttribute("onclick","set_checked('"+l+"','"+e+"','form_id_temp')"))),"radio"==d&&(i.setAttribute("name",l+"_elementform_id_temp"),"yes"==document.getElementById(l+"_allow_otherform_id_temp").value&&"1"==jQuery(this).find("#el_choices"+e).attr("other")?(i.setAttribute("value",""),i.setAttribute("other","1"),i.setAttribute("onClick","set_default('"+l+"','"+e+"','form_id_temp'); show_other_input('"+l+"','form_id_temp');")):("no"==document.getElementById(l+"_value_disabledform_id_temp").value?i.setAttribute("value",jQuery(this).find("#el_choices"+e).val()):i.setAttribute("value",jQuery(this).find("#el_option_value"+e).val()),i.setAttribute("onClick","set_default('"+l+"','"+e+"','form_id_temp')")));var a=document.createElement("label");a.setAttribute("id",l+"_label_element"+e),a.setAttribute("class","ch-rad-label"),a.setAttribute("for",l+"_elementform_id_temp"+e),a.innerHTML=jQuery(this).find("#el_choices"+e).val(),"right"==document.getElementById(l+"_option_left_right").value&&(a.style.cssText="float: none !important"),jQuery(this).find("#el_option_params"+e).val()&&(w_params=jQuery(this).find("#el_option_params"+e).val().split("[where_order_by]"),a.setAttribute("where",w_params[0]),w_params=w_params[1].split("[db_info]"),a.setAttribute("order_by",w_params[0]),a.setAttribute("db_info",w_params[1])),t.appendChild(a),t.appendChild(i),tr_row.appendChild(t),_.appendChild(tr_row),o++})}else{r=document.getElementById("edit_for_rowcol").value,n=parseInt((choeices+1)/r),o=0,m=0;jQuery(".change_pos").each(function(e){var t=jQuery(this)[0].id;o<r&&(tr_row=document.createElement("div"),tr_row.setAttribute("id",l+"_element_tr"+e),tr_row.style.display="table-row");var i=document.createElement("div");i.setAttribute("valign","top"),i.setAttribute("id",l+"_td_little"+t),i.setAttribute("idi",t),i.style.display="table-cell";var a=document.createElement("input");a.setAttribute("type",d),a.setAttribute("id",l+"_elementform_id_temp"+t),"checked"==jQuery("#"+l+"_elementform_id_temp"+t).attr("checked")&&a.setAttribute("checked","checked"),"right"==document.getElementById(l+"_option_left_right").value&&(a.style.cssText="float: left !important"),"checkbox"==d&&(a.setAttribute("name",l+"_elementform_id_temp"+t),"yes"==document.getElementById(l+"_allow_otherform_id_temp").value&&"1"==jQuery(this).find("#el_choices"+t).attr("other")?(a.setAttribute("value",""),a.setAttribute("other","1"),a.setAttribute("onclick","if(set_checked('"+l+"','"+t+"','form_id_temp')) show_other_input('"+l+"','form_id_temp');")):("no"==document.getElementById(l+"_value_disabledform_id_temp").value?a.setAttribute("value",jQuery(this).find("#el_choices"+t).val()):a.setAttribute("value",jQuery(this).find("#el_option_value"+t).val()),a.setAttribute("onclick","set_checked('"+l+"','"+t+"','form_id_temp')"))),"radio"==d&&(a.setAttribute("name",l+"_elementform_id_temp"),"yes"==document.getElementById(l+"_allow_otherform_id_temp").value&&"1"==jQuery(this).find("#el_choices"+t).attr("other")?(a.setAttribute("other","1"),a.setAttribute("onClick","set_default('"+l+"','"+t+"','form_id_temp'); show_other_input('"+l+"','form_id_temp')")):("no"==document.getElementById(l+"_value_disabledform_id_temp").value?a.setAttribute("value",jQuery(this).find("#el_choices"+t).val()):a.setAttribute("value",jQuery(this).find("#el_option_value"+t).val()),a.setAttribute("onClick","set_default('"+l+"','"+t+"','form_id_temp')")));var n=document.createElement("label");n.setAttribute("id",l+"_label_element"+t),n.setAttribute("class","ch-rad-label"),n.setAttribute("for",l+"_elementform_id_temp"+t),n.innerHTML=jQuery(this).find("#el_choices"+t).val(),"right"==document.getElementById(l+"_option_left_right").value&&(n.style.cssText="float: none !important"),jQuery(this).find("#el_option_params"+t).val()&&(w_params=jQuery(this).find("#el_option_params"+t).val().split("[where_order_by]"),n.setAttribute("where",w_params[0]),w_params=w_params[1].split("[db_info]"),n.setAttribute("order_by",w_params[0]),n.setAttribute("db_info",w_params[1])),i.appendChild(n),i.appendChild(a),o<r?(tr_row.appendChild(i),_.appendChild(tr_row)):(m==r&&(m=0),tr_row=document.getElementById(l+"_table_little").childNodes[m],tr_row.appendChild(i),m++),o++}),_.setAttribute("for_hor",l+"_hor")}refresh_attr(l,"type_"+d)}function show_other_input(t){jQuery(".change_pos").each(function(){var e=jQuery(this)[0].id;if(document.getElementById(t+"_elementform_id_temp"+e)&&document.getElementById(t+"_elementform_id_temp"+e).getAttribute("other")&&1==document.getElementById(t+"_elementform_id_temp"+e).getAttribute("other"))return element_other=document.getElementById(t+"_elementform_id_temp"+e),!1});var e=element_other.parentNode,i=document.createElement("br");i.setAttribute("id",t+"_other_brform_id_temp");var a=document.createElement("input");a.setAttribute("id",t+"_other_inputform_id_temp"),a.setAttribute("name",t+"_other_inputform_id_temp"),a.setAttribute("type","text"),a.setAttribute("class","other_input"),e.appendChild(i),e.appendChild(a)}function create_option_label_position(e,t,i){var a=jQuery('<label class="fm-field-label">Option Label Position</label>'),n=jQuery('<input type="radio" id="edit_for_option_position_left" name="edit_for_option_position" onchange="option_left('+e+",'"+i+"')\""+("right"==t?"":' checked="checked"')+" />"),l=jQuery('<label for="edit_for_option_position_left">Left</label>'),d=jQuery('<input type="radio" id="edit_for_option_position_right" name="edit_for_option_position" onchange="option_right('+e+",'"+i+"')\""+("right"==t?' checked="checked"':"")+" />"),_=jQuery('<label for="edit_for_option_position_right">Right</label>'),r=n;return create_option_container(a,r=(r=(r=r.add(l)).add(d)).add(_))}function option_right(e,t){jQuery("#"+e+"_table_little").find(jQuery(".ch-rad-label")).css("cssText","float: none !important;"),jQuery("#"+e+"_table_little").find(jQuery('#main_div input[type="'+t+'"]')).css("cssText","float: left !important;"),jQuery("#"+e+"_option_left_right").val("right")}function option_left(e,t){jQuery("#"+e+"_table_little").find(jQuery(".ch-rad-label")).css("cssText","float: left !important;"),jQuery("#"+e+"_table_little").find(jQuery('#main_div input[type="'+t+'"]')).css("cssText","float: right !important;"),jQuery("#"+e+"_option_left_right").val("left")}function create_rowcol(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_rowcol">Rows/Columns</label>'),jQuery('<input type="text" class="fm-width-100" id="edit_for_rowcol" onChange="refresh_rowcol('+e+",'"+i+'\')" value="'+t+'" />'))}function create_randomize(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_randomize">Randomize in frontend</label>'),jQuery('<input type="checkbox" id="el_randomize" onclick="set_randomize(\''+e+"_randomizeform_id_temp')\""+("yes"==t?' checked="checked"':"")+" />"))}function set_randomize(e){"yes"==document.getElementById(e).value?document.getElementById(e).setAttribute("value","no"):document.getElementById(e).setAttribute("value","yes")}function create_allow_other(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="el_allow_other">Allow other</label>'),jQuery('<input type="checkbox" id="el_allow_other" onclick="set_allow_other('+e+",'"+i+"')\""+("yes"==t?' checked="checked"':"")+" />"))}function set_allow_other(t,i){if("yes"==document.getElementById(t+"_allow_otherform_id_temp").value)document.getElementById(t+"_allow_otherform_id_temp").setAttribute("value","no"),jQuery(".change_pos").each(function(){var e=jQuery(this)[0].id;if(document.getElementById("el_choices"+e)&&document.getElementById("el_choices"+e).getAttribute("other")&&1==document.getElementById("el_choices"+e).getAttribute("other"))return remove_choise(e,t,i),!1});else{document.getElementById(t+"_allow_otherform_id_temp").setAttribute("value","yes");var a=0;jQuery(".change_pos").each(function(){var e=parseInt(jQuery(this)[0].id);a=a<e?e:a}),a+=1;var e=jQuery("#choices"),n=jQuery('<div id="'+a+'" class="change_pos fm-width-100"><div class="fm-table-col fm-width-40"><input type="text" class="fm-field-choice" id="el_choices'+a+'" value="other" other="1" onKeyUp="change_label(\''+t+"_label_element"+a+"', this.value); change_in_value('"+t+"_elementform_id_temp"+a+'\', this.value)" /></div><div class="fm-table-col fm-width-40"><input type="text" class="fm-field-choice" id="el_option_value'+a+'" value="" disabled="disabled" /></div><div class="fm-table-col fm-width-10"></div><div class="fm-table-col fm-width-10"><span class="fm-move-attribute fm-ico-draggable el_choices_sortable"></span></div></div>');e.append(n),refresh_rowcol(t,i)}}function create_radio_options(e,t,i,a,l,d,_,r,o){var m=jQuery('<label class="fm-field-label">Options</label>'),s=jQuery('<button id="el_choices_add" class="fm-add-option button-secondary" onClick="add_choise(\''+o+"', "+e+'); return false;" title="Add option"><span class="field-type-button fm-add-attribute dashicons dashicons-plus-alt"></span>Option</button>');if(form_maker.is_demo)var u=jQuery('<button class="fm-add-option button-secondary" onClick="alert(\'This feature is disabled in demo.\')" title="Add options from database"><span class="field-type-button fm-add-attribute dashicons dashicons-plus-alt"></span>From Database</button>');else u=jQuery("<button class=\"fm-add-option button-secondary\" onClick=\"tb_show('', 'admin-ajax.php?action=select_data_from_db&field_id="+e+"&nonce="+fm_ajax.ajaxnonce+"&field_type=radio&value_disabled="+t+'&width=530&height=370&TB_iframe=1\'); return false;" title="Add options from database"><span class="field-type-button fm-add-attribute dashicons dashicons-plus-alt"></span>From Database</button>');var c=jQuery('<div id="choices" class="fm-width-100 ui-sortable"></div>'),p=jQuery('<div class="fm-width-100"><div class="fm-header-label fm-width-40">Name</div><div class="fm-header-label fm-width-40">Value</div><div class="fm-header-label fm-width-10">Delete</div><div class="fm-header-label fm-width-10">Move</div></div>');for(c.append(p),aaa=!1,n=i.length,j=0;j<n;j++){var f=jQuery('<div id="'+j+'" class="change_pos fm-width-100"><div class="fm-table-col fm-width-40"><input type="text" class="fm-field-choice" id="el_choices'+j+'"'+("yes"==d&&j==_?' other="1"':"")+' value="'+i[j].replace(/"/g,"&quot;")+'" onKeyUp="change_label(\''+e+"_label_element"+j+'\', this.value)" onpaste="elem=this; change_label_name_on_paste('+j+", '"+e+"_label_element"+j+"', '"+o+"'); change_label_value_on_paste('"+e+"_elementform_id_temp"+j+"', this)\""+(a[j]?' disabled="disabled"':"")+' /></div><div class="fm-table-col fm-width-40"><input type="text" class="fm-field-choice'+(a[j]||"yes"==d&&j==_?"":" el_option_value")+'" id="el_option_value'+j+'" value="'+l[j].replace(/"/g,"&quot;")+'" onKeyUp="change_label_value(\''+e+"_elementform_id_temp"+j+"', this.value)\" onpaste=\"change_label_value_on_paste('"+e+"_elementform_id_temp"+j+"', this)\""+("no"==t||a[j]||"yes"==d&&j==_?' disabled="disabled"':"")+' /><input type="hidden" id="el_option_params'+j+'" class="el_option_params" value="'+a[j]+'" /></div><div class="fm-table-col fm-width-10">'+("yes"==d&&j==_?"":'<span class="fm-remove-attribute dashicons dashicons-dismiss" id="el_choices'+j+'_remove" onClick="remove_choise('+j+","+e+",'"+o+"')\"></span>")+'</div><div class="fm-table-col fm-width-10"><span class="fm-move-attribute fm-ico-draggable el_choices_sortable"></span></div></div>');c.append(f),1==r[j]&&"yes"==d&&j==_&&(aaa=!0)}var y=m;return create_option_container(null,y=(y=(y=y.add(s)).add(u)).add(c))}function remove_choise(e,t,i){var a=document.getElementById("choices"),n=document.getElementById(e);a.removeChild(n),refresh_rowcol(t,i)}function type_radio(i,e,t,a,n,l,d,_,r,o,m,s,u,c,p,f,y,h,b,v){jQuery("#element_type").val("type_radio"),delete_last_child();var w=jQuery("#edit_table"),g=jQuery('<div id="edit_div"></div>');w.append(g);var E=jQuery('<div id="edit_main_table"></div>');g.append(E),E.append(create_field_type("type_radio")),E.append(create_label(i,e)),E.append(create_label_position(i,a)),E.append(create_hide_label(i,l)),E.append(create_required(i,m)),E.append(create_relative_position(i,d,"radio")),E.append(create_option_label_position(i,n,"radio")),E.append(create_radio_options(i,h,_,v,b,u,c,r,"radio"));var A=jQuery('<div class="inside"></div>');E.append(create_advanced_options_container(A)),A.append(create_field_label_size(i,t)),A.append(create_class(i,p)),A.append(create_rowcol(i,o,"radio")),A.append(create_randomize(i,s)),A.append(create_enable_options_value(i,h,"radio")),A.append(create_allow_other(i,u,"radio")),A.append(create_additional_attributes(i,f,"type_radio")),element="input",type="radio";var j=document.createElement("input");j.setAttribute("type","hidden"),j.setAttribute("value","type_radio"),j.setAttribute("name",i+"_typeform_id_temp"),j.setAttribute("id",i+"_typeform_id_temp");var x=document.createElement("input");x.setAttribute("type","hidden"),x.setAttribute("value",m),x.setAttribute("name",i+"_requiredform_id_temp"),x.setAttribute("id",i+"_requiredform_id_temp");var k=document.createElement("input");k.setAttribute("type","hidden"),k.setAttribute("value",l),k.setAttribute("name",i+"_hide_labelform_id_temp"),k.setAttribute("id",i+"_hide_labelform_id_temp");var I=document.createElement("input");I.setAttribute("type","hidden"),I.setAttribute("value",s),I.setAttribute("name",i+"_randomizeform_id_temp"),I.setAttribute("id",i+"_randomizeform_id_temp");var C=document.createElement("input");C.setAttribute("type","hidden"),C.setAttribute("value",u),C.setAttribute("name",i+"_allow_otherform_id_temp"),C.setAttribute("id",i+"_allow_otherform_id_temp");var B=document.createElement("input");B.setAttribute("type","hidden"),B.setAttribute("value",o),B.setAttribute("name",i+"_rowcol_numform_id_temp"),B.setAttribute("id",i+"_rowcol_numform_id_temp");var Q=document.createElement("input");Q.setAttribute("type","hidden"),Q.setAttribute("value",n),Q.setAttribute("id",i+"_option_left_right");var T=document.createElement("input");T.setAttribute("type","hidden"),T.setAttribute("value",h),T.setAttribute("name",i+"_value_disabledform_id_temp"),T.setAttribute("id",i+"_value_disabledform_id_temp");var M=document.createElement("div");M.setAttribute("id","main_div");var L=document.createElement("div");L.setAttribute("id",i+"_elemet_tableform_id_temp");var z="yes"==l?"none":"table-cell",q=document.createElement("div");q.setAttribute("align","left"),q.style.display=z,q.style.width=t+"px",q.setAttribute("id",i+"_label_sectionform_id_temp");var H=document.createElement("div");H.setAttribute("align","left"),H.style.display="table-cell",H.setAttribute("id",i+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var N=document.createElement("br"),S=(document.createElement("br"),document.createElement("div"));S.style.display="table";var D=document.createElement("div");D.setAttribute("id",i+"_table_little"),D.style.display="table-row-group",S.appendChild(D);var P=document.createElement("div");P.setAttribute("id",i+"_element_tr1"),P.style.display="table-row";var O=document.createElement("div");O.setAttribute("id",i+"_element_tr2"),O.style.display="table-row";var K=document.createElement("div");K.setAttribute("valign","top"),K.setAttribute("id",i+"_td_little1"),K.style.display="table-cell";var U=document.createElement("div");U.setAttribute("valign","top"),U.setAttribute("id",i+"_td_little2"),U.style.display="table-cell";var F=document.createElement("span");F.setAttribute("id",i+"_element_labelform_id_temp"),F.innerHTML=e,F.setAttribute("class","label"),F.style.verticalAlign="top";var R=document.createElement("span");R.setAttribute("id",i+"_required_elementform_id_temp"),R.innerHTML="",R.setAttribute("class","required"),R.style.verticalAlign="top","yes"==m&&(R.innerHTML=" *");var W=document.getElementById("show_table");q.appendChild(F),q.appendChild(R),H.appendChild(j),H.appendChild(x),H.appendChild(k),H.appendChild(I),H.appendChild(C),H.appendChild(B),H.appendChild(Q),H.appendChild(T),H.appendChild(S),L.appendChild(q),L.appendChild(H),M.appendChild(L),M.appendChild(N),W.appendChild(M),jQuery("#main_div").append(form_maker.type_radio_description),"top"==a&&label_top(i),change_class(p,i),refresh_rowcol(i,"radio"),aaa&&show_other_input(i),jQuery(function(){jQuery("#choices").sortable({items:".change_pos",handle:".el_choices_sortable",update:function(e,t){refresh_rowcol(i,"radio")}})})}function type_checkbox(i,e,t,a,n,l,d,_,r,o,m,s,u,c,p,f,y,h,b,v){jQuery("#element_type").val("type_checkbox"),delete_last_child();var w=jQuery("#edit_table"),g=jQuery('<div id="edit_div"></div>');w.append(g);var E=jQuery('<div id="edit_main_table"></div>');g.append(E),E.append(create_field_type("type_checkbox")),E.append(create_label(i,e)),E.append(create_label_position(i,a)),E.append(create_hide_label(i,l)),E.append(create_required(i,m)),E.append(create_relative_position(i,d,"checkbox")),E.append(create_option_label_position(i,n,"checkbox")),E.append(create_radio_options(i,h,_,v,b,u,c,r,"checkbox"));var A=jQuery('<div class="inside"></div>');E.append(create_advanced_options_container(A)),A.append(create_field_label_size(i,t)),A.append(create_class(i,p)),A.append(create_rowcol(i,o,"checkbox")),A.append(create_randomize(i,s)),A.append(create_enable_options_value(i,h,"checkbox")),A.append(create_allow_other(i,u,"checkbox")),A.append(create_additional_attributes(i,f,"type_checkbox")),element="input",type="checkbox";var j=document.createElement("input");j.setAttribute("type","hidden"),j.setAttribute("value","type_checkbox"),j.setAttribute("name",i+"_typeform_id_temp"),j.setAttribute("id",i+"_typeform_id_temp");var x=document.createElement("input");x.setAttribute("type","hidden"),x.setAttribute("value",m),x.setAttribute("name",i+"_requiredform_id_temp"),x.setAttribute("id",i+"_requiredform_id_temp");var k=document.createElement("input");k.setAttribute("type","hidden"),k.setAttribute("value",l),k.setAttribute("name",i+"_hide_labelform_id_temp"),k.setAttribute("id",i+"_hide_labelform_id_temp");var I=document.createElement("input");I.setAttribute("type","hidden"),I.setAttribute("value",s),I.setAttribute("name",i+"_randomizeform_id_temp"),I.setAttribute("id",i+"_randomizeform_id_temp");var C=document.createElement("input");C.setAttribute("type","hidden"),C.setAttribute("value",u),C.setAttribute("name",i+"_allow_otherform_id_temp"),C.setAttribute("id",i+"_allow_otherform_id_temp");var B=document.createElement("input");B.setAttribute("type","hidden"),B.setAttribute("value",c),B.setAttribute("name",i+"_allow_other_numform_id_temp"),B.setAttribute("id",i+"_allow_other_numform_id_temp");var Q=document.createElement("input");Q.setAttribute("type","hidden"),Q.setAttribute("value",o),Q.setAttribute("name",i+"_rowcol_numform_id_temp"),Q.setAttribute("id",i+"_rowcol_numform_id_temp");var T=document.createElement("input");T.setAttribute("type","hidden"),T.setAttribute("value",n),T.setAttribute("id",i+"_option_left_right");var M=document.createElement("input");M.setAttribute("type","hidden"),M.setAttribute("value",h),M.setAttribute("name",i+"_value_disabledform_id_temp"),M.setAttribute("id",i+"_value_disabledform_id_temp");var L=document.createElement("div");L.setAttribute("id","main_div");var z=document.createElement("div");z.setAttribute("id",i+"_elemet_tableform_id_temp");var q="yes"==l?"none":"table-cell",H=document.createElement("div");H.setAttribute("align","left"),H.style.display=q,H.style.width=t+"px",H.setAttribute("id",i+"_label_sectionform_id_temp");var N=document.createElement("div");N.setAttribute("align","left"),N.style.display="table-cell",N.setAttribute("id",i+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var S=document.createElement("br"),D=(document.createElement("br"),document.createElement("div"));D.style.display="table";var P=document.createElement("div");P.setAttribute("id",i+"_table_little"),P.style.display="table-row-group",D.appendChild(P);var O=document.createElement("span");O.setAttribute("id",i+"_element_labelform_id_temp"),O.innerHTML=e,O.setAttribute("class","label"),O.style.verticalAlign="top";var K=document.createElement("span");K.setAttribute("id",i+"_required_elementform_id_temp"),K.innerHTML="",K.setAttribute("class","required"),K.style.verticalAlign="top","yes"==m&&(K.innerHTML=" *");var U=document.getElementById("show_table");H.appendChild(O),H.appendChild(K),N.appendChild(j),N.appendChild(x),N.appendChild(k),N.appendChild(I),N.appendChild(C),N.appendChild(B),N.appendChild(Q),N.appendChild(T),N.appendChild(M),N.appendChild(D),z.appendChild(H),z.appendChild(N),L.appendChild(z),L.appendChild(S),U.appendChild(L),jQuery("#main_div").append(form_maker.type_checkbox_description),"top"==a&&label_top(i),change_class(p,i),refresh_rowcol(i,"checkbox"),aaa&&show_other_input(i),jQuery(function(){jQuery("#choices").sortable({items:".change_pos",handle:".el_choices_sortable",update:function(e,t){refresh_rowcol(i,"checkbox")}})})}function create_keys(e,t){jQuery('<label class="fm-field-label">Keys</label>');return create_option_container(null,jQuery('<a href="'+admin_url+'?page=options_fmc" target="_blank" class="fm-field-recaptcha-label">'+t+"</a>"))}function create_recaptcha_invisible(e,t){var i=jQuery('<label class="fm-field-label">Type</label>'),a=jQuery('<input type="radio" id="edit_for_recaptcha_type_v2" name="edit_for_recaptcha_type" value="v2" onchange="fm_recaptcha_type('+e+', this.value)"'+("v2"==t?' checked="checked"':"")+" />"),n=jQuery('<label for="edit_for_recaptcha_type_v2">reCAPTCHA v2 (checkbox)</label>'),l=jQuery('<input type="radio" id="edit_for_recaptcha_type_invisible" name="edit_for_recaptcha_type" value="invisible" onchange="fm_recaptcha_type('+e+', this.value)"'+("invisible"==t?' checked="checked"':"")+" />"),d=jQuery('<label for="edit_for_recaptcha_type_invisible">reCAPTCHA v2 (invisible)</label>'),_=jQuery('<input type="radio" id="edit_for_recaptcha_type_v3" name="edit_for_recaptcha_type" value="v3" onchange="fm_recaptcha_type('+e+', this.value)"'+("v3"==t?' checked="checked"':"")+" />"),r=jQuery('<label for="edit_for_recaptcha_type_v3">reCAPTCHA v3</label>'),o=a;return create_option_container(i,o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=o.add(n)).add(jQuery("<br />"))).add(jQuery('<span class="fm-description">Validate users with the "I\'m not a robot" checkbox.</span>'))).add(jQuery("<br />"))).add(l)).add(d)).add(jQuery("<br />"))).add(jQuery('<span class="fm-description">Validate users in the background.</span>'))).add(jQuery("<br />"))).add(_)).add(r)).add(jQuery("<br />"))).add(jQuery('<span class="fm-description">Verify requests with a score.</span>')))}function fm_recaptcha_type(e,t){jQuery("#wd_recaptchaform_id_temp").attr("w_type",t),"invisible"==t?(jQuery("#recaptcha_position").show(),jQuery("#recaptcha_keys_message").show(),jQuery("#recaptcha_advanced").hide(),jQuery("#recaptcha_score").hide(),jQuery("#"+e+"_hide_labelform_id_temp").val("no"),jQuery("#el_hide_label").attr("checked","checked"),hide_label(e)):"v3"==t?(jQuery("#recaptcha_score").show(),jQuery("#recaptcha_keys_message").show(),jQuery("#recaptcha_advanced").hide(),jQuery("#recaptcha_position").hide(),jQuery("#"+e+"_hide_labelform_id_temp").val("no"),jQuery("#el_hide_label").attr("checked","checked"),hide_label(e)):(jQuery("#recaptcha_position").hide(),jQuery("#recaptcha_score").hide(),jQuery("#recaptcha_keys_message").hide(),jQuery("#recaptcha_advanced").show())}function create_recaptcha_score(e,t,i){return create_option_container(jQuery('<label class="fm-field-label">Score</label>'),'ReCaptcha v3 returns a score based on the user interactions with your forms. Scores range from 0.0 to 1.0, with 0.0 indicating abusive traffic and 1.0 indicating good traffic. <a href="'+admin_url+'?page=options_fmc" target="_blank" class="fm-field-recaptcha-label">To change recaptcha score click here</a>',"recaptcha_score","v3"==i)}function create_recaptcha_position(e,t,i){var a=jQuery('<label class="fm-field-label">Display</label>'),n=jQuery('<input type="radio" id="edit_for_recaptcha_position_hidden" name="edit_for_recaptcha_position" value="hidden" onchange="fm_recaptcha_position('+e+', this.value)"'+("hidden"==t?' checked="checked"':"")+" />"),l=jQuery('<label for="edit_for_recaptcha_position_hidden">Hidden</label>'),d=jQuery('<input type="radio" id="edit_for_recaptcha_position_inline" name="edit_for_recaptcha_position" value="inline" onchange="fm_recaptcha_position('+e+', this.value)"'+("inline"==t?' checked="checked"':"")+" />"),_=jQuery('<label for="edit_for_recaptcha_position_inline">Inline</label>'),r=jQuery('<input type="radio" id="edit_for_recaptcha_position_bottomright" name="edit_for_recaptcha_position" value="bottomright" onchange="fm_recaptcha_position('+e+', this.value)"'+("bottomright"==t?' checked="checked"':"")+" />"),o=jQuery('<label for="edit_for_recaptcha_position_bottomright">Bottom-Right</label>'),m=jQuery('<input type="radio" id="edit_for_recaptcha_position_bottomleft" name="edit_for_recaptcha_position" value="bottomleft" onchange="fm_recaptcha_position('+e+', this.value)"'+("bottomleft"==t?' checked="checked"':"")+" />"),s=jQuery('<label for="edit_for_recaptcha_position_bottomleft">Bottom-Left</label>'),u=n;return create_option_container(a,u=(u=(u=(u=(u=(u=(u=(u=(u=(u=u.add(l)).add(jQuery("<br />"))).add(d)).add(_)).add(jQuery("<br />"))).add(r)).add(o)).add(jQuery("<br />"))).add(m)).add(s),"recaptcha_position","invisible"==i)}function fm_recaptcha_position(e,t){jQuery("#wd_recaptchaform_id_temp").attr("position",t)}function go_to_type_recaptcha(e){type_recaptcha(e,"reCAPTCHA","","top","yes","invisible","bottomright",.5)}function type_recaptcha(e,t,i,a,n,l,d,_){jQuery("#element_type").val("type_recaptcha"),delete_last_child();var r=jQuery("#edit_table"),o=jQuery('<div id="edit_div"></div>');r.append(o);var m=jQuery('<div id="edit_main_table"></div>');o.append(m),m.append(create_field_type("type_recaptcha")),m.append(create_recaptcha_invisible(e,l)),m.append(create_recaptcha_position(e,d,l)),m.append(create_recaptcha_score(e,_,l)),m.append(create_keys(e,"To set up recaptcha keys click here"));var s=jQuery('<div class="inside"></div>'),u=!1;"invisible"!=l&&"v3"!=l&&(u=!0),m.append(create_advanced_options_container(s,"recaptcha_advanced",u)),s.append(create_label(e,t)),s.append(create_label_position(e,a)),s.append(create_hide_label(e,n)),s.append(create_field_label_size(e,i)),element="img",type="captcha";var c=document.createElement("input");c.setAttribute("type","hidden"),c.setAttribute("value","type_recaptcha"),c.setAttribute("name",e+"_typeform_id_temp"),c.setAttribute("id",e+"_typeform_id_temp");var p=document.createElement("input");p.setAttribute("type","hidden"),p.setAttribute("value",n),p.setAttribute("name",e+"_hide_labelform_id_temp"),p.setAttribute("id",e+"_hide_labelform_id_temp");var f=document.createElement("div");f.setAttribute("id","recaptcha_keys_message"),f.setAttribute("class","error"),f.innerHTML=form_maker.invisible_recaptcha_error;var y=document.createElement("div");y.setAttribute("id","wd_recaptchaform_id_temp"),y.setAttribute("w_type",l),y.setAttribute("position",d);var h=document.createElement("span");h.style.color="red",h.style.fontStyle="italic",h.innerHTML=form_maker.no_preview,y.appendChild(h);var b=document.createElement("div");b.setAttribute("id","main_div");var v=document.createElement("div");v.setAttribute("id",e+"_elemet_tableform_id_temp");var w="yes"==n?"none":"table-cell",g=document.createElement("div");g.setAttribute("align","left"),g.style.display=w,g.style.width=i+"px",g.setAttribute("id",e+"_label_sectionform_id_temp");var E=document.createElement("div");E.setAttribute("align","left"),E.style.display="table-cell",E.setAttribute("id",e+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var A=document.createElement("br"),j=(document.createElement("br"),document.createElement("span"));j.setAttribute("id",e+"_element_labelform_id_temp"),j.innerHTML=t,j.setAttribute("class","label"),j.style.verticalAlign="top";var x=document.getElementById("show_table");g.appendChild(j),E.appendChild(c),E.appendChild(p),E.appendChild(y),v.appendChild(f),v.appendChild(g),v.appendChild(E),b.appendChild(v),b.appendChild(A),x.appendChild(b),jQuery("#main_div").append(form_maker.type_recaptcha_description),"top"==a&&label_top(e),"v2"==jQuery("input[name='edit_for_recaptcha_type']:checked").val()&&jQuery("#recaptcha_keys_message").hide()}function create_submit_label(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_title">Submit label</label>'),jQuery('<input type="text" class="fm-width-100" id="edit_for_title" onKeyUp="change_label(\''+e+'_element_submitform_id_temp\', this.value)" value="'+t+'" />'))}function create_display_reset(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_reset_active">Display Reset</label>'),jQuery('<input type="checkbox" id="el_reset_active" onclick="active_reset(this.checked, '+e+')"'+(t?' checked="checked"':"")+" />"))}function active_reset(e,t){document.getElementById(t+"_element_resetform_id_temp").style.display=e?"inline":"none"}function create_reset_label(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_title_textarea">Reset label</label>'),jQuery('<input type="text" class="fm-width-100" id="edit_for_title_textarea" onKeyUp="change_label(\''+e+'_element_resetform_id_temp\', this.value)" value="'+t+'" />'))}function go_to_type_submit_reset(e){w_attr_name=[],w_attr_value=[],type_submit_reset(e,"Submit","Reset","",!0,w_attr_name,w_attr_value)}function type_submit_reset(e,t,i,a,n,l,d){jQuery("#element_type").val("type_submit_reset"),delete_last_child();var _=jQuery("#edit_table"),r=jQuery('<div id="edit_div"></div>');_.append(r);var o=jQuery('<div id="edit_main_table"></div>');r.append(o),o.append(create_field_type("type_submit_reset")),o.append(create_submit_label(e,t)),o.append(create_display_reset(e,n)),o.append(create_reset_label(e,i));var m=jQuery('<div class="inside"></div>');o.append(create_advanced_options_container(m)),m.append(create_class(e,a)),m.append(create_additional_attributes(e,l,"type_submit_reset"));var s=document.createElement("br"),u=document.createElement("input");u.setAttribute("type","hidden"),u.setAttribute("value","type_submit_reset"),u.setAttribute("name",e+"_typeform_id_temp"),u.setAttribute("id",e+"_typeform_id_temp");var c=document.createElement("button");c.setAttribute("type","button"),c.setAttribute("class","button button-secondary button-hero button-submit"),c.setAttribute("id",e+"_element_submitform_id_temp"),c.setAttribute("value",t),c.innerHTML=t,c.setAttribute("disabled","disabled");var p=document.createElement("button");p.setAttribute("type","button"),p.setAttribute("class","button button-secondary button-hero button-reset"),n||(p.style.display="none"),p.setAttribute("id",e+"_element_resetform_id_temp"),p.setAttribute("value",i),p.setAttribute("disabled","disabled"),p.innerHTML=i;var f=document.createElement("div");f.setAttribute("id","main_div");var y=document.createElement("div");y.setAttribute("id",e+"_elemet_tableform_id_temp");var h=document.createElement("div");h.setAttribute("align","left"),h.style.display="table-cell",h.setAttribute("id",e+"_label_sectionform_id_temp");var b=document.createElement("div");b.setAttribute("align","left"),b.style.display="table-cell",b.setAttribute("id",e+"_element_sectionform_id_temp");var v=document.createElement("span");v.setAttribute("id",e+"_element_labelform_id_temp"),v.style.cssText="display:none",v.innerHTML="type_submit_reset_"+e;var w=document.getElementById("show_table");h.appendChild(v),b.appendChild(u),b.appendChild(c),b.appendChild(p),y.appendChild(h),y.appendChild(b),f.appendChild(y),f.appendChild(s),w.appendChild(f),jQuery("#main_div").append(form_maker.type_submit_description),change_class(a,e),refresh_attr(e,"type_submit_reset")}function type_editor(e,t){jQuery("#element_type").val("type_editor"),delete_last_child();var i=jQuery("#edit_table"),a=jQuery('<div id="edit_div"></div>');i.append(a);var n,l=jQuery('<div id="edit_main_table"></div>');a.append(l),l.append(create_field_type("type_editor")),iReturnLeft=jQuery("#edit_table").offset().left,document.getElementById("main_editor").style.display="block",document.getElementById("main_editor").style.left=iReturnLeft+15+"px",document.getElementById("main_editor").style.top="120px",document.getElementById("main_editor").style.width=jQuery("#edit_table").width()-30+"px",document.getElementById("form_maker_editor_ifr")&&"none"==document.getElementById("form_maker_editor").style.display?(ifr_id="form_maker_editor_ifr",ifr=getIFrameDocument(ifr_id),ifr.body.innerHTML=t):document.getElementById("form_maker_editor").value=t,(n=document.createElement("div")).setAttribute("id","main_div"),document.getElementById("show_table").appendChild(n),(n=document.createElement("div")).style.width="500px",document.getElementById("edit_table").appendChild(n)}function type_section_break(e,t){jQuery("#element_type").val("type_section_break"),delete_last_child();var i=jQuery("#edit_table"),a=jQuery('<div id="edit_div"></div>');i.append(a);var n,l=jQuery('<div id="edit_main_table"></div>');a.append(l),l.append(create_field_type("type_section_break")),iReturnLeft=jQuery("#edit_table").offset().left,document.getElementById("main_editor").style.display="block",document.getElementById("main_editor").style.left=iReturnLeft+15+"px",document.getElementById("main_editor").style.top="120px",document.getElementById("main_editor").style.width=jQuery("#edit_table").width()-30+"px",document.getElementById("form_maker_editor_ifr")&&"none"==document.getElementById("form_maker_editor").style.display?(ifr_id="form_maker_editor_ifr",ifr=getIFrameDocument(ifr_id),ifr.body.innerHTML=t):document.getElementById("form_maker_editor").value=t,element="div",(n=document.createElement("div")).setAttribute("id","main_div"),document.getElementById("show_table").appendChild(n),(n=document.createElement("div")).style.width="500px",document.getElementById("edit_table").appendChild(n)}function create_page_title(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_page_title_input">Page Title</label>'),jQuery('<input type="text" class="fm-width-100" id="el_page_title_input" name="el_page_title_input" onKeyup="pagebreak_title_change(this.value,'+e+')" value="'+t+'" />'))}function pagebreak_title_change(e){e=e.replace(/(<([^>]+)>)/gi,""),document.getElementById("_div_between").setAttribute("page_title",e),document.getElementById("div_page_title").innerHTML=e+"<br/><br/>"}function create_next_type(e,t){var i=jQuery('<label class="fm-field-label">Next Type</label>'),a=jQuery('<input type="radio" id="el_type_next_text" name="el_type_next" value="text" onclick="pagebreak_type_change(\'next\',\'text\')"'+("text"==t[0]?' checked="checked"':"")+" />"),n=jQuery('<label for="el_type_next_text">Text</label>'),l=jQuery('<input type="radio" id="el_type_next_img" name="el_type_next" value="img" onclick="pagebreak_type_change(\'next\',\'img\')"'+("text"==t[0]?"":' checked="checked"')+" />"),d=jQuery('<label for="el_type_next_img">Image</label>'),_=a;return create_option_container(i,_=(_=(_=_.add(n)).add(l)).add(d))}function pagebreak_type_change(e,t){switch(document.getElementById("_div_between").setAttribute(e+"_type",t),t){case"button":document.getElementById("_div_between").setAttribute(e+"_title",e),(i=document.createElement("label")).setAttribute("class","fm-field-label"),i.setAttribute("for","el_title_"+e),i.setAttribute("id",e+"_label"),i.setAttribute("type","button"),i.innerHTML=e[0].toUpperCase()+e.slice(1)+" "+t+" name",document.getElementById(e+"_label").parentNode.replaceChild(i,document.getElementById(e+"_label")),document.getElementById("el_title_"+e).value=e,(a=document.createElement("button")).setAttribute("id","page_"+e+"_0"),a.setAttribute("class",document.getElementById("_div_between").getAttribute(e+"_class")),a.style.cursor="pointer",a.innerHTML=e,document.getElementById("_element_section_"+e).replaceChild(a,document.getElementById("page_"+e+"_0"));break;case"text":document.getElementById("_div_between").setAttribute(e+"_title",e),(i=document.createElement("label")).setAttribute("class","fm-field-label"),i.setAttribute("for","el_title_"+e),i.setAttribute("id",e+"_label"),i.innerHTML=e[0].toUpperCase()+e.slice(1)+" "+t+" name",document.getElementById(e+"_label").parentNode.replaceChild(i,document.getElementById(e+"_label")),document.getElementById("el_title_"+e).value=e[0].toUpperCase()+e.slice(1),(a=document.createElement("span")).setAttribute("id","page_"+e+"_0"),a.setAttribute("class",document.getElementById("_div_between").getAttribute(e+"_class")),a.style.cursor="pointer",a.innerHTML=e[0].toUpperCase()+e.slice(1),document.getElementById("_element_section_"+e).replaceChild(a,document.getElementById("page_"+e+"_0"));break;case"img":var i,a;document.getElementById("_div_between").setAttribute(e+"_title",plugin_url+"/images/"+e+".png"),(i=document.createElement("label")).setAttribute("class","fm-field-label"),i.setAttribute("for","el_title_"+e),i.setAttribute("id",e+"_label"),i.innerHTML=e[0].toUpperCase()+e.slice(1)+" "+t+" src",document.getElementById(e+"_label").parentNode.replaceChild(i,document.getElementById(e+"_label")),document.getElementById("el_title_"+e).value=plugin_url+"/images/"+e+".png",(a=document.createElement("img")).setAttribute("id","page_"+e+"_0"),a.setAttribute("class",document.getElementById("_div_between").getAttribute(e+"_class")),a.style.cursor="pointer",a.src=plugin_url+"/images/"+e+".png",document.getElementById("_element_section_"+e).replaceChild(a,document.getElementById("page_"+e+"_0"))}}function create_next_text_name(e,t){return create_option_container(jQuery('<label id="next_label" class="fm-field-label" for="el_title_next">Next text name</label>'),jQuery('<input type="text" class="fm-width-100" id="el_title_next" onKeyup="change_pagebreak_label( this.value, \'next\')" onChange="change_pagebreak_label( this.value, \'next\')" value="'+t[0]+'" />'))}function change_pagebreak_label(e,t){button_type=document.getElementById("_div_between").getAttribute(t+"_type"),"img"!=button_type?(document.getElementById("page_"+t+"_0").value=e,document.getElementById("page_"+t+"_0").innerHTML=e):document.getElementById("page_"+t+"_0").src=e,document.getElementById("_div_between").setAttribute(t+"_title",e)}function create_check_required_next(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_check_next_input">Check the required fields</label>'),jQuery('<input type="checkbox" id="el_check_next_input" onclick="set_checkable(\'next\')"'+("true"==t[0]?' checked="checked"':"")+" />"))}function set_checkable(e){document.getElementById("_div_between").setAttribute(e+"_checkable",document.getElementById("el_check_"+e+"_input").checked)}function create_previous_type(e,t){var i=jQuery('<label class="fm-field-label">Previous Type</label>'),a=jQuery('<input type="radio" id="el_type_previous_text" name="el_type_previous" value="text" onclick="pagebreak_type_change(\'previous\',\'text\')"'+("text"==t[1]?' checked="checked"':"")+" />"),n=jQuery('<label for="el_type_previous_text">Text</label>'),l=jQuery('<input type="radio" id="el_type_previous_img" name="el_type_previous" value="img" onclick="pagebreak_type_change(\'previous\',\'img\')"'+("text"==t[1]?"":' checked="checked"')+" />"),d=jQuery('<label for="el_type_previous_img">Image</label>'),_=a;return create_option_container(i,_=(_=(_=_.add(n)).add(l)).add(d))}function create_previous_text_name(e,t){return create_option_container(jQuery('<label id="previous_label" class="fm-field-label" for="el_title_previous">Previous text name</label>'),jQuery('<input type="text" class="fm-width-100" id="el_title_previous" onKeyup="change_pagebreak_label( this.value, \'previous\')" onChange="change_pagebreak_label( this.value, \'previous\')" value="'+t[1]+'" />'))}function create_check_required_previous(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_check_previous_input">Check the required fields</label>'),jQuery('<input type="checkbox" id="el_check_previous_input" onclick="set_checkable(\'previous\')"'+("true"==t[1]?' checked="checked"':"")+" />"))}function create_next_class(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="next_element_style">Next class</label>'),jQuery('<input type="text" class="fm-width-100" id="next_element_style" onChange="change_pagebreak_class(this.value, \'next\')" value="'+t[0]+'" />'))}function create_previous_class(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="previous_element_style">Previous class</label>'),jQuery('<input type="text" class="fm-width-100" id="previous_element_style" onChange="change_pagebreak_class(this.value, \'previous\')" value="'+t[1]+'" />'))}function change_pagebreak_class(e,t){document.getElementById("page_"+t+"_0").setAttribute("class",e),document.getElementById("_div_between").setAttribute(t+"_class",e)}function type_page_break(e,t,i,a,n,l,d,_){jQuery("#element_type").val("type_page_break"),delete_last_child();var r=jQuery("#edit_table"),o=jQuery('<div id="edit_div"></div>');r.append(o);var m=jQuery('<div id="edit_main_table"></div>');o.append(m),m.append(create_field_type("type_page_break")),m.append(create_page_title(e,t)),m.append(create_next_type(e,a)),m.append(create_next_text_name(e,i)),m.append(create_check_required_next(e,l)),m.append(create_previous_type(e,a)),m.append(create_previous_text_name(e,i)),m.append(create_check_required_previous(e,l));var s=jQuery('<div class="inside"></div>');m.append(create_advanced_options_container(s)),s.append(create_next_class(e,n)),s.append(create_previous_class(e,n)),s.append(create_additional_attributes(e,d,"type_page_break"));var u=document.createElement("br"),c=document.createElement("div");c.setAttribute("id","main_div");var p=document.createElement("div");p.setAttribute("id",e+"_elemet_tableform_id_temp");var f=document.createElement("div");f.setAttribute("align","left"),f.style.display="table-cell",f.setAttribute("id",e+"_label_sectionform_id_temp");var y=document.createElement("div");y.setAttribute("align","left"),y.style.display="table-cell",y.setAttribute("id",e+"_element_sectionform_id_temp");var h=document.createElement("div");h.setAttribute("align","right"),h.setAttribute("id","_element_section_next");var b=make_pagebreak_button("next",i[0],a[0],n[0],0);h.appendChild(b);var v=document.createElement("div");v.setAttribute("align","left"),v.setAttribute("id","_element_section_previous");var w=make_pagebreak_button("previous",i[1],a[1],n[1],0);v.appendChild(w);var g=document.createElement("div");g.setAttribute("align","center"),g.setAttribute("style","border:2px solid blue;padding:20px; margin:20px"),g.innerHTM="FIELDS";var E=document.createElement("div");E.innerHTML=t+"<br/><br/>",E.setAttribute("id","div_page_title"),E.setAttribute("align","center");var A=document.createElement("div");A.setAttribute("page_title",t),A.setAttribute("next_type",a[0]),A.setAttribute("next_title",i[0]),A.setAttribute("next_class",n[0]),A.setAttribute("next_checkable",l[0]),A.setAttribute("previous_type",a[1]),A.setAttribute("previous_title",i[1]),A.setAttribute("previous_class",n[1]),A.setAttribute("previous_checkable",l[1]),A.setAttribute("align","center"),A.setAttribute("id","_div_between"),A.innerHTML="--------------------------------------<br />P A G E B R E A K<br />--------------------------------------",y.appendChild(E),y.appendChild(g),y.appendChild(h),y.appendChild(A),y.appendChild(v);var j=document.getElementById("show_table");p.appendChild(y),c.appendChild(p),c.appendChild(u),j.appendChild(c),refresh_attr(e,"type_page_break")}function make_pagebreak_button(e,t,i,a,n){switch(i){case"button":return(l=document.createElement("button")).setAttribute("id","page_"+e+"_"+n),l.setAttribute("type","button"),l.setAttribute("class",a),l.style.cursor="pointer",l.innerHTML=t,l;case"text":return(l=document.createElement("span")).setAttribute("id","page_"+e+"_"+n),l.setAttribute("class",a),l.style.cursor="pointer",l.innerHTML=t,l;case"img":var l;return(l=document.createElement("img")).setAttribute("id","page_"+e+"_"+n),l.setAttribute("class",a),l.style.cursor="pointer",l.src=t,l}}function create_placeholder_name(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_first_value_input">Placeholder</label>'),jQuery('<input type="text" class="fm-width-40" id="el_first_value_first" onKeyUp="change_input_value(this.value,\''+e+'_element_firstform_id_temp\')" value="'+t[0].replace(/"/g,"&quot;")+'" />-<input type="text" class="fm-width-40" id="el_first_value_last" onKeyUp="change_input_value(this.value,\''+e+'_element_lastform_id_temp\')" value="'+t[1].replace(/"/g,"&quot;")+'" />'))}function create_field_size_name(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_input_size">Width(px)</label>'),jQuery('<input class="fm-width-100" type="text" id="edit_for_input_size" onKeyPress="return check_isnum(event)" onKeyUp="change_w_style(\''+e+"_element_firstform_id_temp', this.value); change_w_style('"+e+"_element_middleform_id_temp', this.value); change_w_style('"+e+'_element_lastform_id_temp\', this.value)" value="'+t+'" /><p class="description">'+form_maker.leave_empty+"</p>"))}function create_enable_name_fields(e,t,i){var a=jQuery('<label class="fm-field-label">Enable Field(s)</label>'),n=jQuery('<input type="checkbox" id="el_title" value="no" onclick="enable_name_fields('+e+",'title')\""+("yes"==t[0]?' checked="checked"':"")+" />"),l=jQuery('<label for="el_title" id="el_title_label">'+i[0]+"</label>"),d=jQuery('<input type="checkbox" id="el_middle" value="no" onclick="enable_name_fields('+e+",'middle')\""+("yes"==t[1]?' checked="checked"':"")+" />"),_=jQuery('<label for="el_middle" id="el_middle_label">'+i[3]+"</label>"),r=jQuery('<label id="el_first_label" class="fm-hide">'+i[1]+'</label><label id="el_last_label" class="fm-hide">'+i[2]+"</label>"),o=n;return create_option_container(a,o=(o=(o=(o=o.add(l)).add(d)).add(_)).add(r))}function enable_name_fields(t,e){var i="title"==e?2:3;tr_name1=document.getElementById(t+"_tr_name1"),tr_name2=document.getElementById(t+"_tr_name2"),first_input=document.getElementById(t+"_td_name_input_first"),first_label=document.getElementById(t+"_td_name_label_first");var a="title"==e?"40":document.getElementById("edit_for_input_size").value;if(1==document.getElementById("el_"+e).checked?document.getElementById(t+"_enable_fieldsform_id_temp").setAttribute(e,"yes"):document.getElementById(t+"_enable_fieldsform_id_temp").setAttribute(e,"no"),"yes"==document.getElementById(t+"_enable_fieldsform_id_temp").getAttribute(e)){var n=document.createElement("div");n.setAttribute("id",t+"_td_name_input_"+e),n.style.cssText="display:table-cell";var l=document.createElement("input");l.setAttribute("type","text"),w_title[i]==w_first_val[i]?(l.setAttribute("value",w_first_val[i]),l.setAttribute("placeholder",w_title[i])):l.setAttribute("value",w_first_val[i]),l.setAttribute("id",t+"_element_"+e+"form_id_temp"),l.setAttribute("name",t+"_element_"+e+"form_id_temp"),l.setAttribute("value",w_first_val[i]),l.setAttribute("title",w_title[i]),l.setAttribute("placeholder",w_title[i]),l.style.cssText="margin-right: 10px; width: "+a+"px";var d=document.createElement("div");d.setAttribute("id",t+"_td_name_label_"+e),d.style.cssText="display:table-cell";var _=document.createElement("label");_.setAttribute("class","mini_label"),_.setAttribute("id",t+"_mini_label_"+e),_.innerHTML=document.getElementById("el_"+e+"_label").innerHTML,n.appendChild(l),d.appendChild(_),"title"==e?(tr_name1.insertBefore(n,first_input),tr_name2.insertBefore(d,first_label)):(tr_name1.appendChild(n),tr_name2.appendChild(d))}else document.getElementById(t+"_td_name_input_"+e)&&(tr_name1.removeChild(document.getElementById(t+"_td_name_input_"+e)),tr_name2.removeChild(document.getElementById(t+"_td_name_label_"+e)));var r=document.createTextNode("-"),o=document.createTextNode("-");value_if_empty_width="title"==e?"60":"95";var m=document.createElement("input");m.setAttribute("id","el_first_value_"+e),m.setAttribute("type","text"),m.setAttribute("value",w_title[i]),m.style.cssText="width:"+value_if_empty_width+"px;",m.setAttribute("onKeyUp","change_input_value(this.value,'"+t+"_element_"+e+"form_id_temp')"),el_first_value_first=document.getElementById("el_first_value_first"),parent=el_first_value_first.parentNode,"yes"==document.getElementById(t+"_enable_fieldsform_id_temp").getAttribute(e)?"title"==e?(parent.insertBefore(r,el_first_value_first),parent.insertBefore(m,r)):(parent.appendChild(o),parent.appendChild(m)):document.getElementById("el_first_value_"+e)&&("title"==e?parent.removeChild(document.getElementById("el_first_value_title").nextSibling):parent.removeChild(document.getElementById("el_first_value_middle").previousSibling),parent.removeChild(document.getElementById("el_first_value_"+e))),refresh_attr(t,"type_name"),jQuery(document).ready(function(){jQuery("label#"+t+"_mini_label_title").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='title' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.title").focus(),jQuery("input.title").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_title").text(e),document.getElementById("el_title_label").innerHTML=e})}}),jQuery("label#"+t+"_mini_label_middle").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='middle' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.middle").focus(),jQuery("input.middle").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_middle").text(e),document.getElementById("el_middle_label").innerHTML=e})}})})}function create_autofill_user_name(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_autofill">Autofill with user name</label>'),jQuery('<input type="checkbox" id="el_autofill" onclick="set_autofill(\''+e+"_autofillform_id_temp')\""+("yes"==t?' checked="checked"':"")+" />"))}function set_autofill(e){"yes"==document.getElementById(e).value?document.getElementById(e).value="no":document.getElementById(e).value="yes"}function go_to_type_name(e){w_attr_name=[],w_attr_value=[],w_first_val=["","","",""],w_title=["","","",""],w_mini_labels=["Title","First","Last","Middle"],w_name_fields=["no","no"],type_name(e,"Name","","top","no",w_first_val,w_title,w_mini_labels,"","normal","no","no","",w_attr_name,w_attr_value,w_name_fields,"no")}function type_name(t,e,i,a,n,l,d,_,r,o,m,s,u,c,p,f,y){jQuery("#element_type").val("type_name"),delete_last_child();var h=jQuery("#edit_table"),b=jQuery('<div id="edit_div"></div>');h.append(b);var v=jQuery('<div id="edit_main_table"></div>');b.append(v),v.append(create_field_type("type_name")),v.append(create_label(t,e)),v.append(create_label_position(t,a)),v.append(create_hide_label(t,n)),v.append(create_required(t,m)),v.append(create_placeholder_name(t,d)),v.append(create_field_size_name(t,r));var w=jQuery('<div class="inside"></div>');v.append(create_advanced_options_container(w)),w.append(create_enable_name_fields(t,f,_)),w.append(create_autofill_user_name(t,y)),w.append(create_unique_values(t,s)),w.append(create_field_label_size(t,i)),w.append(create_class(t,u)),w.append(create_additional_attributes(t,c,"type_name"));var g=document.createElement("br"),E=document.createElement("input");E.setAttribute("type","hidden"),E.setAttribute("value","type_name"),E.setAttribute("name",t+"_typeform_id_temp"),E.setAttribute("id",t+"_typeform_id_temp");var A=document.createElement("input");A.setAttribute("type","hidden"),A.setAttribute("value",y),A.setAttribute("name",t+"_autofillform_id_temp"),A.setAttribute("id",t+"_autofillform_id_temp");var j=document.createElement("input");j.setAttribute("type","hidden"),j.setAttribute("value",m),j.setAttribute("name",t+"_requiredform_id_temp"),j.setAttribute("id",t+"_requiredform_id_temp");var x=document.createElement("input");x.setAttribute("type","hidden"),x.setAttribute("value",n),x.setAttribute("name",t+"_hide_labelform_id_temp"),x.setAttribute("id",t+"_hide_labelform_id_temp");var k=document.createElement("input");k.setAttribute("type","hidden"),k.setAttribute("name",t+"_enable_fieldsform_id_temp"),k.setAttribute("id",t+"_enable_fieldsform_id_temp"),k.setAttribute("title",f[0]),k.setAttribute("first","yes"),k.setAttribute("last","yes"),k.setAttribute("middle",f[1]);var I=document.createElement("input");I.setAttribute("type","hidden"),I.setAttribute("value",s),I.setAttribute("name",t+"_uniqueform_id_temp"),I.setAttribute("id",t+"_uniqueform_id_temp"),edit_labels=document.createTextNode("The labels of the fields are editable. Please, click on the label to edit.");var C=document.createElement("div");C.setAttribute("id","main_div");var B=document.createElement("div");B.setAttribute("class","fm-editable-label"),B.appendChild(edit_labels);var Q=document.createElement("div");Q.setAttribute("id",t+"_elemet_tableform_id_temp");var T="yes"==n?"none":"table-cell",M=document.createElement("div");M.setAttribute("align","left"),M.style.display=T,M.style.width=i+"px",M.setAttribute("id",t+"_label_sectionform_id_temp");var L=document.createElement("div");L.setAttribute("align","left"),L.style.display="table-cell",L.setAttribute("id",t+"_element_sectionform_id_temp");var z=document.createElement("div");z.style.display="table",z.setAttribute("id",t+"_table_name"),z.setAttribute("cellpadding","0"),z.setAttribute("cellspacing","0");var q=document.createElement("div");q.style.display="table-row",q.setAttribute("id",t+"_tr_name1");var H=document.createElement("div");H.style.display="table-row",H.setAttribute("id",t+"_tr_name2");var N=document.createElement("div");N.style.display="table-cell",N.setAttribute("id",t+"_td_name_input_first");var S=document.createElement("div");S.style.display="table-cell",S.setAttribute("id",t+"_td_name_input_last");var D=document.createElement("div");D.style.display="table-cell",D.setAttribute("id",t+"_td_name_label_first"),D.setAttribute("align","left");var P=document.createElement("div");P.style.display="table-cell",P.setAttribute("id",t+"_td_name_label_last"),P.setAttribute("align","left");var O=document.createElement("span");O.setAttribute("id",t+"_element_labelform_id_temp"),O.innerHTML=e,O.setAttribute("class","label"),O.style.verticalAlign="top";var K=document.createElement("span");K.setAttribute("id",t+"_required_elementform_id_temp"),K.innerHTML="",K.setAttribute("class","required"),K.style.verticalAlign="top","yes"==m&&(K.innerHTML=" *");var U=document.createElement("input");U.setAttribute("type","text"),U.style.cssText="margin-right: 10px; width:"+r+"px",U.setAttribute("id",t+"_element_firstform_id_temp"),U.setAttribute("name",t+"_element_firstform_id_temp"),U.setAttribute("value",l[0]),U.setAttribute("title",d[0]),U.setAttribute("placeholder",d[0]);var F=document.createElement("label");F.setAttribute("class","mini_label"),F.setAttribute("id",t+"_mini_label_first"),F.innerHTML=_[1];var R=document.createElement("input");R.setAttribute("type","text"),R.style.cssText="margin-right: 10px; width:"+r+"px",R.setAttribute("id",t+"_element_lastform_id_temp"),R.setAttribute("name",t+"_element_lastform_id_temp"),R.setAttribute("value",l[1]),R.setAttribute("title",d[1]),R.setAttribute("placeholder",d[1]);var W=document.createElement("label");W.setAttribute("class","mini_label"),W.setAttribute("id",t+"_mini_label_last"),W.innerHTML=_[2];var V=document.getElementById("show_table");M.appendChild(O),M.appendChild(K),N.appendChild(U),S.appendChild(R),q.appendChild(N),q.appendChild(S),D.appendChild(F),P.appendChild(W),H.appendChild(D),H.appendChild(P),z.appendChild(q),z.appendChild(H),L.appendChild(E),L.appendChild(j),L.appendChild(x),L.appendChild(I),L.appendChild(A),L.appendChild(k),L.appendChild(z),Q.appendChild(M),Q.appendChild(L),C.appendChild(Q),C.appendChild(g),C.appendChild(B),V.appendChild(C),jQuery("#main_div").append("<br>"+form_maker.type_name_description),"top"==a&&label_top(t),change_class(u,t),"yes"==f[0]&&enable_name_fields(t,"title"),"yes"==f[1]&&enable_name_fields(t,"middle"),jQuery(document).ready(function(){jQuery("label#"+t+"_mini_label_first").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='first' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.first").focus(),jQuery("input.first").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_first").text(e),document.getElementById("el_first_label").innerHTML=e})}}),jQuery("label#"+t+"_mini_label_last").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='last' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.last").focus(),jQuery("input.last").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_last").text(e),document.getElementById("el_last_label").innerHTML=e})}})}),refresh_attr(t,"type_name")}function create_autofill_user_email(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_autofill">Autofill with user email</label>'),jQuery('<input type="checkbox" id="el_autofill" onclick="set_autofill(\''+e+"_autofillform_id_temp')\""+("yes"==t?' checked="checked"':"")+" />"))}function create_confirmation_email(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_verification_mail">Confirmation Email</label>'),jQuery('<input type="checkbox" id="el_verification_mail" onclick="verification_mail('+e+')"'+("yes"==t?' checked="checked"':"")+" />"))}function verification_mail(e){document.getElementById("el_verification_mail").checked?(document.getElementById("confirm_validation_label").style.display="block",document.getElementById("confirm_validation_empty").style.display="block",document.getElementById(e+"_verification_id_temp").value="yes",document.getElementById(e+"_1_label_sectionform_id_temp").style.display=document.getElementById(e+"_label_sectionform_id_temp").style.display,document.getElementById(e+"_1_element_sectionform_id_temp").style.display=document.getElementById(e+"_element_sectionform_id_temp").style.display):(document.getElementById("confirm_validation_label").style.display="none",document.getElementById("confirm_validation_empty").style.display="none",document.getElementById(e+"_verification_id_temp").value="no",document.getElementById(e+"_1_label_sectionform_id_temp").style.display="none",document.getElementById(e+"_1_element_sectionform_id_temp").style.display="none")}function create_confirmation_email_label(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_label">Confirmation label</label>'),jQuery('<textarea id="edit_for_label" class="fm-width-100" onKeyUp="change_label(\''+e+"_element_labelform_id_temp', this.value, '"+e+'_1_element_labelform_id_temp\')" rows="4">'+i+"</textarea>"),"confirm_validation_label","yes"==t)}function create_confirmation_email_placeholder(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="el_first_value_verification_input">Confirmation placeholder</label>'),jQuery('<input type="text" class="fm-width-100" id="el_first_value_verification_input" onKeyUp="change_input_value(this.value,\''+e+'_1_elementform_id_temp\')" value="'+i.replace(/"/g,"&quot;")+'" />'),"confirm_validation_empty","yes"==t)}function go_to_type_submitter_mail(e){w_attr_name=[],w_attr_value=[],type_submitter_mail(e,"Email","","top","no","","","","no","no","","no","Email confirmation","",w_attr_name,w_attr_value,"no")}function type_submitter_mail(e,t,i,a,n,l,d,_,r,o,m,s,u,c,p,f,y){jQuery("#element_type").val("type_submitter_mail"),delete_last_child();var h=jQuery("#edit_table"),b=jQuery('<div id="edit_div"></div>');h.append(b);var v=jQuery('<div id="edit_main_table"></div>');b.append(v),v.append(create_field_type("type_submitter_mail")),v.append(create_label(e,t)),v.append(create_label_position(e,a)),v.append(create_hide_label(e,n)),v.append(create_required(e,r)),v.append(create_placeholder(e,_)),v.append(create_field_size(e,l,"'"+e+"_elementform_id_temp'","'"+e+"_1_elementform_id_temp'"));var w=jQuery('<div class="inside"></div>');v.append(create_advanced_options_container(w)),w.append(create_confirmation_email(e,s)),w.append(create_confirmation_email_label(e,s,u)),w.append(create_confirmation_email_placeholder(e,s,c)),w.append(create_autofill_user_email(e,y)),w.append(create_unique_values(e,o)),w.append(create_field_label_size(e,i,"'"+e+"_label_sectionform_id_temp'","'"+e+"_1_label_sectionform_id_temp'")),w.append(create_class(e,m)),w.append(create_additional_attributes(e,p,"type_submitter_mail")),element="input",type="text";var g=document.createElement("input");g.setAttribute("type","hidden"),g.setAttribute("value","type_submitter_mail"),g.setAttribute("name",e+"_typeform_id_temp"),g.setAttribute("id",e+"_typeform_id_temp");var E=document.createElement("input");E.setAttribute("type","hidden"),E.setAttribute("value",y),E.setAttribute("name",e+"_autofillform_id_temp"),E.setAttribute("id",e+"_autofillform_id_temp");var A=document.createElement("input");A.setAttribute("type","hidden"),A.setAttribute("value",r),A.setAttribute("name",e+"_requiredform_id_temp"),A.setAttribute("id",e+"_requiredform_id_temp");var j=document.createElement("input");j.setAttribute("type","hidden"),j.setAttribute("value",n),j.setAttribute("name",e+"_hide_labelform_id_temp"),j.setAttribute("id",e+"_hide_labelform_id_temp");var x=document.createElement("input");x.setAttribute("type","hidden"),x.setAttribute("value",o),x.setAttribute("name",e+"_uniqueform_id_temp"),x.setAttribute("id",e+"_uniqueform_id_temp");var k=document.createElement("input");k.setAttribute("type","hidden"),k.setAttribute("value",s),k.setAttribute("name",e+"_verification_id_temp"),k.setAttribute("id",e+"_verification_id_temp");var I=document.createElement(element);I.setAttribute("type",type),I.style.cssText="width:"+l+"px;",I.setAttribute("id",e+"_elementform_id_temp"),I.setAttribute("name",e+"_elementform_id_temp"),I.setAttribute("value",d),I.setAttribute("title",_),I.setAttribute("placeholder",_);var C=document.createElement(element);C.setAttribute("type",type),C.style.cssText="width:"+l+"px;",C.setAttribute("id",e+"_1_elementform_id_temp"),C.setAttribute("name",e+"_1_elementform_id_temp"),C.setAttribute("placeholder",c),C.setAttribute("title",c);var B=document.createElement("div");B.setAttribute("id","main_div");var Q=document.createElement("div");Q.setAttribute("id",e+"_elemet_tableform_id_temp");var T="yes"==n?"none":"table-cell",M=document.createElement("div");M.setAttribute("align","left"),M.style.display=T,M.style.width=i+"px",M.setAttribute("id",e+"_label_sectionform_id_temp");var L="yes"==n||"no"==s?"none":"table-cell",z=document.createElement("div");z.setAttribute("align","left"),z.style.display=L,z.style.width=i+"px",z.setAttribute("id",e+"_1_label_sectionform_id_temp");var q=document.createElement("div");q.setAttribute("align","left"),q.style.display="table-cell",q.setAttribute("id",e+"_element_sectionform_id_temp");var H="no"==s?"none":"table-cell",N=document.createElement("div");N.setAttribute("align","left"),N.style.display=H,N.setAttribute("id",e+"_1_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var S=document.createElement("br"),D=(document.createElement("br"),document.createElement("br")),P=document.createElement("span");P.setAttribute("id",e+"_element_labelform_id_temp"),P.innerHTML=t,P.setAttribute("class","label"),P.style.verticalAlign="top";var O=document.createElement("span");O.setAttribute("id",e+"_1_element_labelform_id_temp"),O.innerHTML=u,O.setAttribute("class","label"),O.style.verticalAlign="top";var K=document.createElement("span");K.setAttribute("id",e+"_required_elementform_id_temp"),K.innerHTML="",K.setAttribute("class","required"),K.style.verticalAlign="top","yes"==r&&(K.innerHTML=" *");var U=document.createElement("span");U.setAttribute("id",e+"_1_required_elementform_id_temp"),U.innerHTML="",U.setAttribute("class","required"),U.style.verticalAlign="top","yes"==r&&(U.innerHTML=" *");var F=document.getElementById("show_table");M.appendChild(P),M.appendChild(K),z.appendChild(O),z.appendChild(U),q.appendChild(g),q.appendChild(A),q.appendChild(j),q.appendChild(x),q.appendChild(k),q.appendChild(E),q.appendChild(I),N.appendChild(C),Q.appendChild(M),Q.appendChild(q),Q.appendChild(D),Q.appendChild(z),Q.appendChild(N),B.appendChild(Q),B.appendChild(S),F.appendChild(B),jQuery("#main_div").append(form_maker.type_email_description),"top"==a&&label_top(e),change_class(m,e),refresh_attr(e,"type_text")}function go_to_type_phone_new(e){w_attr_name=[],w_attr_value=[],type_phone_new(e,"Phone","","top","no","","","us","no","no","",w_attr_name,w_attr_value)}function type_phone_new(e,t,i,a,n,l,d,_,r,o,m,s,u){jQuery("#element_type").val("type_phone_new"),delete_last_child();var c=jQuery("#edit_table"),p=jQuery('<div id="edit_div"></div>');c.append(p);var f=jQuery('<div id="edit_main_table"></div>');p.append(f),f.append(create_field_type("type_phone_new")),f.append(create_label(e,t)),f.append(create_label_position(e,a)),f.append(create_hide_label(e,n)),f.append(create_required(e,r)),f.append(create_field_size(e,l));var y=jQuery('<div class="inside"></div>');f.append(create_advanced_options_container(y)),y.append(create_unique_values(e,o)),y.append(create_field_label_size(e,i)),y.append(create_class(e,m)),y.append(create_additional_attributes(e,s,"type_phone_new"));var h=document.createElement("br"),b=document.createElement("input");b.setAttribute("type","hidden"),b.setAttribute("value","type_phone_new"),b.setAttribute("name",e+"_typeform_id_temp"),b.setAttribute("id",e+"_typeform_id_temp");var v=document.createElement("input");v.setAttribute("type","hidden"),v.setAttribute("value",r),v.setAttribute("name",e+"_requiredform_id_temp"),v.setAttribute("id",e+"_requiredform_id_temp");var w=document.createElement("input");w.setAttribute("type","hidden"),w.setAttribute("value",n),w.setAttribute("name",e+"_hide_labelform_id_temp"),w.setAttribute("id",e+"_hide_labelform_id_temp");var g=document.createElement("input");g.setAttribute("type","hidden"),g.setAttribute("value",o),g.setAttribute("name",e+"_uniqueform_id_temp"),g.setAttribute("id",e+"_uniqueform_id_temp");var E=document.createElement("div");E.setAttribute("id","main_div");var A=document.createElement("div");A.setAttribute("id",e+"_elemet_tableform_id_temp");var j="yes"==n?"none":"table-cell",x=document.createElement("div");x.setAttribute("align","left"),x.style.display=j,x.style.width=i+"px",x.setAttribute("id",e+"_label_sectionform_id_temp");var k=document.createElement("div");k.setAttribute("align","left"),k.style.display="table-cell",k.setAttribute("id",e+"_element_sectionform_id_temp");var I=document.createElement("div");I.style.display="table",I.setAttribute("id",e+"_table_name");var C=document.createElement("div");C.style.display="table-row",C.setAttribute("id",e+"_tr_name1");var B=document.createElement("div");B.style.display="table-cell",B.setAttribute("id",e+"_td_name_input_first");var Q=document.createElement("span");Q.setAttribute("id",e+"_element_labelform_id_temp"),Q.innerHTML=t,Q.setAttribute("class","label"),Q.style.verticalAlign="top";var T=document.createElement("span");T.setAttribute("id",e+"_required_elementform_id_temp"),T.innerHTML="",T.setAttribute("class","required"),"yes"==r&&(T.innerHTML=" *");var M=document.createElement("input");M.setAttribute("type","text"),M.style.cssText="width:"+l+"px",M.setAttribute("id",e+"_elementform_id_temp"),M.setAttribute("name",e+"_elementform_id_temp"),M.setAttribute("value",d),M.setAttribute("top-country",_);var L=document.getElementById("show_table");x.appendChild(Q),x.appendChild(T),B.appendChild(M),C.appendChild(B),I.appendChild(C),k.appendChild(b),k.appendChild(v),k.appendChild(w),k.appendChild(g),k.appendChild(I),A.appendChild(x),A.appendChild(k),E.appendChild(A),E.appendChild(h),L.appendChild(E),jQuery("#main_div").append(form_maker.type_phone_description),"top"==a&&label_top(e),change_class(m,e),refresh_attr(e,"type_text"),jQuery("#"+e+"_elementform_id_temp").intlTelInput({nationalMode:!1,preferredCountries:[_]})}function create_address_size(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_input_size">Overall width(px)</label>'),jQuery('<input class="fm-width-100" type="text" id="edit_for_input_size" onKeyPress="return check_isnum(event)" onKeyUp="change_w_style(\''+e+'_div_address\', this.value)" value="'+t+'" /><p class="description">'+form_maker.leave_empty+"</p>"))}function create_use_us_states_list(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_us_states">Use list for US states and Canada provinces</label>'),jQuery('<input type="checkbox" id="el_us_states" onclick="disable_fields('+e+",'us_states');\""+("yes"==t[6]?' checked="checked"':"")+" />"))}function disable_fields(i,a){var e=document.getElementById(i+"_div_address");if(a&&(1==document.getElementById("el_"+a).checked?document.getElementById(i+"_disable_fieldsform_id_temp").setAttribute(a,"yes"):document.getElementById(i+"_disable_fieldsform_id_temp").setAttribute(a,"no")),"yes"==document.getElementById(i+"_disable_fieldsform_id_temp").getAttribute("state"))document.getElementById("el_us_states").disabled=!0;else if(document.getElementById("el_us_states").disabled=!1,"us_states"==a)return void change_state_input(i,"form_id_temp");e.innerHTML="";var t=new Array,n=["street1","street2","city","state","postal","country"],d=0;for(l=0;l<6;l++){if("no"==document.getElementById(i+"_disable_fieldsform_id_temp").getAttribute(n[l]))if("street1"==n[l]||"street2"==n[l]){var _=document.createElement("input");_.setAttribute("type","text"),_.style.cssText="width:100%",_.setAttribute("id",i+"_"+n[l]+"form_id_temp"),_.setAttribute("name",parseInt(i)+l+"_"+n[l]+"form_id_temp");var r=document.createElement("label");r.setAttribute("class","mini_label"),r.setAttribute("id",i+"_mini_label_"+n[l]),r.style.cssText="display:block;",r.innerHTML=document.getElementById("el_"+n[l]+"_label").innerHTML,w_mini_labels[l]=document.getElementById("el_"+n[l]+"_label").innerHTML,(m=document.createElement("span")).style.cssText="float:left; width:100%; padding-bottom: 8px; display:block",m.appendChild(_),m.appendChild(r),e.appendChild(m)}else{var o,m;if(d++,"country"!=n[l])(a=document.createElement("input")).setAttribute("type","text"),a.style.cssText="width:100%",a.setAttribute("id",i+"_"+n[l]+"form_id_temp"),a.setAttribute("name",parseInt(i)+l+"_"+n[l]+"form_id_temp"),(o=document.createElement("label")).setAttribute("class","mini_label"),o.setAttribute("id",i+"_mini_label_"+n[l]),o.style.cssText="display:block;",o.innerHTML=document.getElementById("el_"+n[l]+"_label").innerHTML,w_mini_labels[l]=document.getElementById("el_"+n[l]+"_label").innerHTML;else(a=document.createElement("select")).setAttribute("type","text"),a.style.cssText="width:100%",a.setAttribute("id",i+"_countryform_id_temp"),a.setAttribute("name",parseInt(i)+l+"_countryform_id_temp"),a.setAttribute("onChange","change_state_input('"+i+"', 'form_id_temp')"),(o=document.createElement("label")).setAttribute("class","mini_label"),o.setAttribute("id",i+"_mini_label_country"),o.style.cssText="display:block;",o.innerHTML=document.getElementById("el_"+n[l]+"_label").innerHTML,w_mini_labels[l]=document.getElementById("el_"+n[l]+"_label").innerHTML,countries=form_maker.countries,jQuery.each(countries,function(e,t){var i=document.createElement("option");i.setAttribute("value",t),i.innerHTML=t,a.appendChild(i)});if(d%2!=0)(m=document.createElement("span")).style.cssText="float:left; width:48%; padding-bottom: 8px;";else(m=document.createElement("span")).style.cssText="float:right; width:48%; padding-bottom: 8px;";m.appendChild(a),m.appendChild(o),e.appendChild(m)}else{var s=document.createElement("input");s.setAttribute("type","hidden"),s.setAttribute("id",i+"_"+n[l]+"form_id_temp"),s.setAttribute("value",document.getElementById("el_"+n[l]+"_label").innerHTML),s.setAttribute("id_for_label",parseInt(i)+l),t.push(s)}for(k=0;k<t.length;k++)e.appendChild(t[k])}"no"==document.getElementById(i+"_disable_fieldsform_id_temp").getAttribute("state")&&"yes"==document.getElementById(i+"_disable_fieldsform_id_temp").getAttribute("country")&&change_state_input(i,"form_id_temp"),jQuery(document).ready(function(t){t("label#"+i+"_mini_label_street1").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='street1' style='outline:none; border:none; background:none;' value=\""+t(this).text()+'">';t(this).html(e),t("input.street1").focus(),t("input.street1").blur(function(){var e=t(this).val();t("#"+i+"_mini_label_street1").text(e),document.getElementById("el_street1_label").innerHTML=e})}}),t("label#"+i+"_mini_label_street2").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='street2' style='outline:none; border:none; background:none;' value=\""+t(this).text()+'">';t(this).html(e),t("input.street2").focus(),t("input.street2").blur(function(){var e=t(this).val();t("#"+i+"_mini_label_street2").text(e),document.getElementById("el_street2_label").innerHTML=e})}}),t("label#"+i+"_mini_label_city").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='city' style='outline:none; border:none; background:none;' value=\""+t(this).text()+'">';t(this).html(e),t("input.city").focus(),t("input.city").blur(function(){var e=t(this).val();t("#"+i+"_mini_label_city").text(e),document.getElementById("el_city_label").innerHTML=e})}}),t("label#"+i+"_mini_label_state").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='state' style='outline:none; border:none; background:none;' value=\""+t(this).text()+'">';t(this).html(e),t("input.state").focus(),t("input.state").blur(function(){var e=t(this).val();t("#"+i+"_mini_label_state").text(e),document.getElementById("el_state_label").innerHTML=e})}}),t("label#"+i+"_mini_label_postal").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='postal' style='outline:none; border:none; background:none;' value=\""+t(this).text()+'">';t(this).html(e),t("input.postal").focus(),t("input.postal").blur(function(){var e=t(this).val();t("#"+i+"_mini_label_postal").text(e),document.getElementById("el_postal_label").innerHTML=e})}}),t("label#"+i+"_mini_label_country").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='country' style='outline:none; border:none; background:none;' value=\""+t(this).text()+'">';t(this).html(e),t("input.country").focus(),t("input.country").blur(function(){var e=t(this).val();t("#"+i+"_mini_label_country").text(e),document.getElementById("el_country_label").innerHTML=e})}})}),refresh_attr(i,"type_address")}function change_state_input(e,t){if(document.getElementById(e+"_country"+t)&&document.getElementById(e+"_state"+t)&&!document.getElementById("el_state").checked&&!document.getElementById("el_us_states").disabled){var i=!1,a=document.getElementById(e+"_state"+t);if("United States"==document.getElementById(e+"_country"+t).value&&document.getElementById("el_us_states").checked){var n=document.createElement("select"),l=form_maker.states;for(var d in l){(_=document.createElement("option")).setAttribute("value",d),_.innerHTML=l[d],n.appendChild(_)}i=!0}else if("Canada"==document.getElementById(e+"_country"+t).value&&document.getElementById("el_us_states").checked){n=document.createElement("select"),l=form_maker.provinces;for(var d in l){var _;(_=document.createElement("option")).setAttribute("value",d),_.innerHTML=l[d],n.appendChild(_)}i=!0}else if("SELECT"==document.getElementById(e+"_state"+t).tagName){n=document.createElement("input");i=!0}if(i){n.setAttribute("type","text"),n.style.cssText="width: 100%",n.setAttribute("id",e+"_state"+t),n.setAttribute("name",parseInt(e)+3+"_state"+t);var r=a.parentNode;r.removeChild(a),r.insertBefore(n,r.firstChild)}}}function create_disable_address_fields(e,t,i){var a=jQuery('<label class="fm-field-label">Disable Field(s)</label>'),n=jQuery('<input type="checkbox" id="el_street1" value="no" onclick="disable_fields('+e+",'street1')\""+("yes"==t[0]?' checked="checked"':"")+" />"),l=jQuery('<label for="el_street1" id="el_street1_label">'+i[0]+"</label>"),d=jQuery('<input type="checkbox" id="el_street2" value="no" onclick="disable_fields('+e+",'street2')\""+("yes"==t[1]?' checked="checked"':"")+" />"),_=jQuery('<label for="el_street2" id="el_street2_label">'+i[1]+"</label>"),r=jQuery('<input type="checkbox" id="el_city" value="no" onclick="disable_fields('+e+",'city')\""+("yes"==t[2]?' checked="checked"':"")+" />"),o=jQuery('<label for="el_city" id="el_city_label">'+i[2]+"</label>"),m=jQuery('<input type="checkbox" id="el_state" value="no" onclick="disable_fields('+e+",'state')\""+("yes"==t[3]?' checked="checked"':"")+" />"),s=jQuery('<label for="el_state" id="el_state_label">'+i[3]+"</label>"),u=jQuery('<input type="checkbox" id="el_postal" value="no" onclick="disable_fields('+e+",'postal')\""+("yes"==t[4]?' checked="checked"':"")+" />"),c=jQuery('<label for="el_postal" id="el_postal_label">'+i[4]+"</label>"),p=jQuery('<input type="checkbox" id="el_country" value="no" onclick="disable_fields('+e+",'country')\""+("yes"==t[5]?' checked="checked"':"")+" />"),f=jQuery('<label for="el_country" id="el_country_label">'+i[5]+"</label>"),y=n;return create_option_container(a,y=(y=(y=(y=(y=(y=(y=(y=(y=(y=(y=(y=(y=(y=(y=(y=y.add(l)).add(jQuery("<br />"))).add(d)).add(_)).add(jQuery("<br />"))).add(r)).add(o)).add(jQuery("<br />"))).add(m)).add(s)).add(jQuery("<br />"))).add(u)).add(c)).add(jQuery("<br />"))).add(p)).add(f))}function go_to_type_address(e){w_attr_name=[],w_attr_value=[],w_mini_labels=["Street Address","Street Address Line 2","City","State / Province / Region","Postal / Zip Code","Country"],w_disabled_fields=["no","no","no","no","no","no","yes"],type_address(e,"Address","","top","no","",w_mini_labels,w_disabled_fields,"no","wdform_address",w_attr_name,w_attr_value)}function type_address(i,e,t,a,n,l,d,_,r,o,m,s){jQuery("#element_type").val("type_address"),delete_last_child();var u=jQuery("#edit_table"),c=jQuery('<div id="edit_div"></div>');u.append(c);var p=jQuery('<div id="edit_main_table"></div>');c.append(p),p.append(create_field_type("type_address")),p.append(create_label(i,e)),p.append(create_label_position(i,a)),p.append(create_hide_label(i,n)),p.append(create_required(i,r)),p.append(create_address_size(i,l)),p.append(create_use_us_states_list(i,_));var f=jQuery('<div class="inside"></div>');p.append(create_advanced_options_container(f)),f.append(create_disable_address_fields(i,_,d)),f.append(create_field_label_size(i,t)),f.append(create_class(i,o)),f.append(create_additional_attributes(i,m,"type_address"));var y=document.createElement("input");y.setAttribute("type","hidden"),y.setAttribute("value","type_address"),y.setAttribute("name",i+"_typeform_id_temp"),y.setAttribute("id",i+"_typeform_id_temp");var h=document.createElement("input");h.setAttribute("type","hidden"),h.setAttribute("name",i+"_disable_fieldsform_id_temp"),h.setAttribute("id",i+"_disable_fieldsform_id_temp"),h.setAttribute("street1",_[0]),h.setAttribute("street2",_[1]),h.setAttribute("city",_[2]),h.setAttribute("state",_[3]),h.setAttribute("us_states",_[6]),h.setAttribute("postal",_[4]),h.setAttribute("country",_[5]);var b=document.createElement("input");b.setAttribute("type","hidden"),b.setAttribute("value",r),b.setAttribute("name",i+"_requiredform_id_temp"),b.setAttribute("id",i+"_requiredform_id_temp");var v=document.createElement("input");v.setAttribute("type","hidden"),v.setAttribute("value",n),v.setAttribute("name",i+"_hide_labelform_id_temp"),v.setAttribute("id",i+"_hide_labelform_id_temp");var w=document.createElement("div");w.setAttribute("id","main_div");var g=document.createTextNode("The labels of the fields are editable. Please, click on the label to edit."),E=document.createElement("div");E.setAttribute("style","margin-left:4px; color:red; display:inline-block;"),E.appendChild(g);var A=document.createElement("div");A.setAttribute("id",i+"_elemet_tableform_id_temp");var j="yes"==n?"none":"table-cell",x=document.createElement("div");x.setAttribute("align","left"),x.style.display=j,x.style.width=t+"px",x.style.verticalAlign="top",x.setAttribute("id",i+"_label_sectionform_id_temp");var k=document.createElement("div");k.setAttribute("align","left"),k.style.display="table-cell",k.setAttribute("id",i+"_element_sectionform_id_temp");var I=document.createElement("div");I.setAttribute("id",i+"_div_address"),I.style.cssText="width:"+l+"px";var C=document.createElement("span");C.style.cssText="float:left; width:100%; padding-bottom: 8px; display:block";var B=document.createElement("span");B.style.cssText="float:left; width:100%; padding-bottom: 8px; display:block";var Q=document.createElement("span");Q.style.cssText="float:left; width:48%; padding-bottom: 8px;";var T=document.createElement("span");T.style.cssText="float:right; width:48%; padding-bottom: 8px;";var M=document.createElement("span");M.style.cssText="float:left; width:48%; padding-bottom: 8px;";var L=document.createElement("span");L.style.cssText="float:right; width:48%; padding-bottom: 8px;";var z=document.createElement("br"),q=document.createElement("span");q.setAttribute("id",i+"_element_labelform_id_temp"),q.innerHTML=e,q.setAttribute("class","wd_form_label"),q.style.verticalAlign="top";var H=document.createElement("span");H.setAttribute("id",i+"_required_elementform_id_temp"),H.innerHTML="",H.setAttribute("class","required"),H.style.verticalAlign="top","yes"==r&&(H.innerHTML=" *");var N=document.createElement("input");N.setAttribute("type","text"),N.style.cssText="width:100%",N.setAttribute("id",i+"_street1form_id_temp"),N.setAttribute("name",i+"_street1form_id_temp");var S=document.createElement("label");S.setAttribute("class","mini_label"),S.setAttribute("id",i+"_mini_label_street1"),S.style.cssText="display:block;",S.innerHTML=d[0];var D=document.createElement("input");D.setAttribute("type","text"),D.style.cssText="width:100%",D.setAttribute("id",i+"_street2form_id_temp"),D.setAttribute("name",parseInt(i)+1+"_street2form_id_temp");var P=document.createElement("label");P.setAttribute("class","mini_label"),P.setAttribute("id",i+"_mini_label_street2"),P.style.cssText="display:block;",P.innerHTML=d[1];var O=document.createElement("input");O.setAttribute("type","text"),O.style.cssText="width:100%",O.setAttribute("id",i+"_cityform_id_temp"),O.setAttribute("name",parseInt(i)+2+"_cityform_id_temp");var K=document.createElement("label");K.setAttribute("class","mini_label"),K.setAttribute("id",i+"_mini_label_city"),K.style.cssText="display:block;",K.innerHTML=d[2];var U=document.createElement("input");U.setAttribute("type","text"),U.style.cssText="width:100%",U.setAttribute("id",i+"_stateform_id_temp"),U.setAttribute("name",parseInt(i)+3+"_stateform_id_temp");var F=document.createElement("label");F.setAttribute("class","mini_label"),F.setAttribute("id",i+"_mini_label_state"),F.style.cssText="display:block;",F.innerHTML=d[3];var R=document.createElement("input");R.setAttribute("type","text"),R.style.cssText="width:100%",R.setAttribute("id",i+"_postalform_id_temp"),R.setAttribute("name",parseInt(i)+4+"_postalform_id_temp");var W=document.createElement("label");W.setAttribute("class","mini_label"),W.setAttribute("id",i+"_mini_label_postal"),W.style.cssText="display:block;",W.innerHTML=d[4];var V=document.createElement("select");V.setAttribute("type","text"),V.style.cssText="width:100%",V.setAttribute("id",i+"_countryform_id_temp"),V.setAttribute("name",parseInt(i)+5+"_countryform_id_temp"),V.setAttribute("onChange","change_state_input('"+i+"','form_id_temp')");var $=document.createElement("label");$.setAttribute("class","mini_label"),$.setAttribute("id",i+"_mini_label_country"),$.style.cssText="display:block;",$.innerHTML=d[5],countries=form_maker.countries,jQuery.each(countries,function(e,t){var i=document.createElement("option");i.setAttribute("value",t),i.innerHTML=t,V.appendChild(i)});var G=document.getElementById("show_table");x.appendChild(q),x.appendChild(H),C.appendChild(N),C.appendChild(S),B.appendChild(D),B.appendChild(P),Q.appendChild(O),Q.appendChild(K),T.appendChild(U),T.appendChild(F),M.appendChild(R),M.appendChild(W),L.appendChild(V),L.appendChild($),I.appendChild(C),I.appendChild(B),I.appendChild(Q),I.appendChild(T),I.appendChild(M),I.appendChild(L),k.appendChild(y),k.appendChild(b),k.appendChild(v),k.appendChild(h),k.appendChild(I),A.appendChild(x),A.appendChild(k),w.appendChild(A),w.appendChild(z),w.appendChild(E),G.appendChild(w),jQuery("#main_div").append("<br><br>"+form_maker.type_address_description),"top"==a&&label_top(i),change_class(o,i),refresh_attr(i,"type_address"),"yes"==_[0]&&disable_fields(i,"street1"),"yes"==_[1]&&disable_fields(i,"street2"),"yes"==_[2]&&disable_fields(i,"city"),"yes"==_[3]&&disable_fields(i,"state"),"yes"==_[4]&&disable_fields(i,"postal"),"yes"==_[5]&&disable_fields(i,"country"),"yes"==_[6]&&disable_fields(i,"us_states"),jQuery(document).ready(function(t){t("label#"+i+"_mini_label_street1").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='street1' style='outline:none; border:none; background:none; width:130px;' value=\""+t(this).text()+'">';t(this).html(e),t("input.street1").focus(),t("input.street1").blur(function(){var e=t(this).val();t("#"+i+"_mini_label_street1").text(e),document.getElementById("el_street1_label").innerHTML=e})}}),t("label#"+i+"_mini_label_street2").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='street2' style='outline:none; border:none; background:none; width:130px;' value=\""+t(this).text()+'">';t(this).html(e),t("input.street2").focus(),t("input.street2").blur(function(){var e=t(this).val();t("#"+i+"_mini_label_street2").text(e),document.getElementById("el_street2_label").innerHTML=e})}}),t("label#"+i+"_mini_label_city").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='city' style='outline:none; border:none; background:none; width:130px;' value=\""+t(this).text()+'">';t(this).html(e),t("input.city").focus(),t("input.city").blur(function(){var e=t(this).val();t("#"+i+"_mini_label_city").text(e),document.getElementById("el_city_label").innerHTML=e})}}),t("label#"+i+"_mini_label_state").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='state' style='outline:none; border:none; background:none; width:130px;' value=\""+t(this).text()+'">';t(this).html(e),t("input.state").focus(),t("input.state").blur(function(){var e=t(this).val();t("#"+i+"_mini_label_state").text(e),document.getElementById("el_state_label").innerHTML=e})}}),t("label#"+i+"_mini_label_postal").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='postal' style='outline:none; border:none; background:none; width:130px;' value=\""+t(this).text()+'">';t(this).html(e),t("input.postal").focus(),t("input.postal").blur(function(){var e=t(this).val();t("#"+i+"_mini_label_postal").text(e),document.getElementById("el_postal_label").innerHTML=e})}}),t("label#"+i+"_mini_label_country").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='country' style='outline:none; border:none; background:none; width:130px;' value=\""+t(this).text()+'">';t(this).html(e),t("input.country").focus(),t("input.country").blur(function(){var e=t(this).val();t("#"+i+"_mini_label_country").text(e),document.getElementById("el_country_label").innerHTML=e})}})})}function create_markmap_address(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="addrval'+t+'">Address</label>'),jQuery('<input type="text" class="fm-width-100" id="addrval'+t+'" onChange="changeAddress('+e+", "+t+')" value="" />'))}function create_markmap_longitude(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="longval'+i+'">Longitude</label>'),jQuery('<input type="text" class="fm-width-100" id="longval'+i+'" onkeyup="update_position('+e+", "+i+')" value="'+t+'" />'))}function create_markmap_latitude(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="latval'+i+'">Latitude</label>'),jQuery('<input type="text" class="fm-width-100" id="latval'+i+'" onkeyup="update_position('+e+", "+i+')" value="'+t+'" />'))}function create_markmap_size(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_input_size">Size(px)</label>'),jQuery('<input type="text" class="fm-width-40" id="edit_for_input_size" onKeyPress="return check_isnum(event)" onKeyUp="change_w_style(\''+e+'_elementform_id_temp\', this.value)" value="'+t+'" />x<input type="text" class="fm-width-40" id="edit_for_input_size" onKeyPress="return check_isnum(event)" onKeyUp="change_h_style(\''+e+'_elementform_id_temp\', this.value)" value="'+i+'" /><p class="description">'+form_maker.leave_empty+"</p>"))}function create_markmap_info(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="info'+i+'">Marker Info</label>'),jQuery('<textarea class="fm-width-100" id="info'+i+'" rows="3" onKeyUp="change_info(this.value,'+e+", "+i+')">'+t+"</textarea>"))}function go_to_type_mark_map(e){w_attr_name=[],w_attr_value=[],type_mark_map(e,"Mark your place on map","","top","no","2.294254","48.858334","2.294254","48.858334","13","370","300","wdform_map","",w_attr_name,w_attr_value)}function type_mark_map(e,t,i,a,n,l,d,_,r,o,m,s,u,c,p,f){jQuery("#element_type").val("type_mark_map"),delete_last_child();var y=jQuery("#edit_table"),h=jQuery('<div id="edit_div"></div>');y.append(h);var b=jQuery('<div id="edit_main_table"></div>');h.append(b),b.append(create_field_type("type_mark_map")),b.append(create_label(e,t)),b.append(create_label_position(e,a)),b.append(create_hide_label(e,n)),b.append(jQuery('<div class="notice notice-info"><p>Drag the marker to change default marker position.</p></div>')),b.append(create_markmap_address(e,0)),b.append(create_markmap_longitude(e,_,0)),b.append(create_markmap_latitude(e,r,0)),b.append(create_markmap_info(e,c,0)),b.append(create_markmap_size(e,m,s)),b.append(create_keys(e,"To set up map key click here"));var v=jQuery('<div class="inside"></div>');b.append(create_advanced_options_container(v)),v.append(create_field_label_size(e,i)),v.append(create_class(e,u)),v.append(create_additional_attributes(e,p,"type_mark_map")),element="div";var w=document.createElement("br"),g=document.createElement("input");g.setAttribute("type","hidden"),g.setAttribute("value","type_mark_map"),g.setAttribute("name",e+"_typeform_id_temp"),g.setAttribute("id",e+"_typeform_id_temp");var E=document.createElement("div");E.setAttribute("id",e+"_elementform_id_temp"),E.setAttribute("long0",_),E.setAttribute("lat0",r),E.setAttribute("zoom",o),E.style.cssText="width:"+m+"px; height: "+s+"px",E.setAttribute("info0",c),E.setAttribute("center_x",l),E.setAttribute("center_y",d);var A=document.createElement("input");A.setAttribute("type","hidden"),A.setAttribute("value",n),A.setAttribute("name",e+"_hide_labelform_id_temp"),A.setAttribute("id",e+"_hide_labelform_id_temp");var j=document.createElement("span");j.setAttribute("id",e+"_element_labelform_id_temp"),j.innerHTML=t,j.setAttribute("class","wd_form_label"),j.style.verticalAlign="top";var x=document.createElement("div");x.setAttribute("id","main_div");var k=document.createElement("div");k.setAttribute("id",e+"_elemet_tableform_id_temp");var I="yes"==n?"none":"table-cell",C=document.createElement("div");C.setAttribute("align","left"),C.style.display=I,C.style.width=i+"px",C.style.verticalAlign="top",C.setAttribute("id",e+"_label_sectionform_id_temp");var B=document.createElement("div");B.setAttribute("align","left"),B.style.display="table-cell",B.setAttribute("id",e+"_element_sectionform_id_temp");var Q=document.getElementById("show_table");C.appendChild(j),B.appendChild(g),B.appendChild(E),B.appendChild(A),k.appendChild(C),k.appendChild(B),x.appendChild(k),x.appendChild(w),Q.appendChild(x),jQuery("#main_div").append(form_maker.type_mark_on_map_description),"top"==a&&label_top(e),change_class(u,e),refresh_attr(e,"type_text"),if_gmap_init(e),add_marker_on_map(e,0,_,r,c,!0)}function create_edit_country_list(e){jQuery('<label class="fm-field-label">Edit country list</label>');return create_option_container(null,jQuery("<a href=\"\" onclick=\"tb_show('', 'admin-ajax.php?action=FormMakerEditCountryinPopup&nonce="+fm_ajax.ajaxnonce+"&field_id="+e+'&width=530&height=370&TB_iframe=1\'); return false;" class="thickbox-preview fm-field-recaptcha-label">Edit country list</a>'))}function go_to_type_country(e){w_countries=form_maker.countries,w_attr_name=[],w_attr_value=[],type_country(e,"Country","","no",w_countries,"top","","no","wdform_select",w_attr_name,w_attr_value)}function type_country(e,t,i,a,n,l,d,_,r,o,m){jQuery("#element_type").val("type_country"),delete_last_child();var s=jQuery("#edit_table"),u=jQuery('<div id="edit_div"></div>');s.append(u);var c=jQuery('<div id="edit_main_table"></div>');u.append(c),c.append(create_field_type("type_country")),c.append(create_label(e,t)),c.append(create_label_position(e,l)),c.append(create_hide_label(e,a)),c.append(create_required(e,_)),c.append(create_field_size(e,d));var p=jQuery('<div class="inside"></div>');c.append(create_advanced_options_container(p)),p.append(create_edit_country_list(e)),p.append(create_field_label_size(e,i)),p.append(create_class(e,r)),p.append(create_additional_attributes(e,o,"type_country"));document.createElement("br");var f=document.createElement("input");f.setAttribute("type","hidden"),f.setAttribute("value","type_country"),f.setAttribute("name",e+"_typeform_id_temp"),f.setAttribute("id",e+"_typeform_id_temp");var y=document.createElement("input");y.setAttribute("type","hidden"),y.setAttribute("value",_),y.setAttribute("name",e+"_requiredform_id_temp"),y.setAttribute("id",e+"_requiredform_id_temp");var h=document.createElement("input");h.setAttribute("type","hidden"),h.setAttribute("value",a),h.setAttribute("name",e+"_hide_labelform_id_temp"),h.setAttribute("id",e+"_hide_labelform_id_temp");var b=document.createElement("div");b.setAttribute("id","main_div");var v=document.createElement("div");v.setAttribute("id",e+"_elemet_tableform_id_temp");var w="yes"==a?"none":"table-cell",g=document.createElement("div");g.setAttribute("align","left"),g.style.display=w,g.style.width=i+"px",g.setAttribute("id",e+"_label_sectionform_id_temp");var E=document.createElement("div");E.setAttribute("align","left"),E.style.display="table-cell",E.style.width=i+"px",E.setAttribute("id",e+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var A=document.createElement("br"),j=(document.createElement("br"),document.createElement("div"));j.setAttribute("id",e+"_table_little"),j.style.display="table";var x=document.createElement("div");x.setAttribute("id",e+"_element_tr1"),x.style.display="table-row";var k=document.createElement("div");k.setAttribute("id",e+"_element_tr2"),k.style.display="table-row";var I=document.createElement("div");I.setAttribute("valign","top"),I.setAttribute("id",e+"_td_little1"),I.style.display="table-cell";var C=document.createElement("div");C.setAttribute("valign","top"),C.setAttribute("id",e+"_td_little2"),C.style.display="table-cell";var B=document.createElement("span");B.setAttribute("id",e+"_element_labelform_id_temp"),B.innerHTML=t,B.setAttribute("class","label"),B.style.verticalAlign="top";var Q=document.createElement("span");Q.setAttribute("id",e+"_required_elementform_id_temp"),Q.innerHTML="",Q.setAttribute("class","required"),Q.style.verticalAlign="top","yes"==_&&(Q.innerHTML=" *");var T=document.createElement("select");T.setAttribute("id",e+"_elementform_id_temp"),T.setAttribute("name",e+"_elementform_id_temp"),T.style.cssText="width:"+d+"px",jQuery.each(n,function(e,t){var i=document.createElement("option");i.setAttribute("value",t),i.innerHTML=t,T.appendChild(i)});var M=document.getElementById("show_table");g.appendChild(B),g.appendChild(Q),E.appendChild(h),E.appendChild(f),E.appendChild(y),E.appendChild(T),v.appendChild(g),v.appendChild(E),b.appendChild(v),b.appendChild(A),M.appendChild(b),jQuery("#main_div").append(form_maker.type_country_list_description),"top"==l&&label_top(e),change_class(r,e),refresh_attr(e,"type_text")}function create_datefields_separator(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_fields_divider">Fields separator</label>'),jQuery('<input type="text" class="fm-width-100" id="edit_for_fields_divider" onKeyUp="set_divider('+e+', this.value)" value="'+t+'" />'))}function create_datefield_day_type(e,t){var i=jQuery('<label class="fm-field-label">Day field type</label>'),a=jQuery('<input type="radio" id="el_day_field_type_text" name="edit_for_day_field_type" onchange="field_to_text('+e+", 'day')\""+("SELECT"==t?"":' checked="checked"')+" />"),n=jQuery('<label for="el_day_field_type_text">Input</label>'),l=jQuery('<input type="radio" id="el_day_field_type_select" name="edit_for_day_field_type" onchange="field_to_select('+e+", 'day')\""+("SELECT"==t?' checked="checked"':"")+" />"),d=jQuery('<label for="el_day_field_type_select">Select</label>'),_=a;return create_option_container(i,_=(_=(_=_.add(n)).add(l)).add(d))}function create_datefields_day_size(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_day_size">Day field width(px)</label>'),jQuery('<input type="text" class="fm-width-100" id="edit_for_day_size" onKeyPress="return check_isnum(event)" onKeyUp="change_w_style(\''+e+'_dayform_id_temp\', this.value)" value="'+t+'" />'))}function create_datefield_month_type(e,t){var i=jQuery('<label class="fm-field-label">Month field type</label>'),a=jQuery('<input type="radio" id="el_month_field_type_text" name="edit_for_month_field_type" onchange="field_to_text('+e+", 'month')\""+("SELECT"==t?"":' checked="checked"')+" />"),n=jQuery('<label for="el_month_field_type_text">Input</label>'),l=jQuery('<input type="radio" id="el_month_field_type_select" name="edit_for_month_field_type" onchange="field_to_select('+e+", 'month')\""+("SELECT"==t?' checked="checked"':"")+" />"),d=jQuery('<label for="el_month_field_type_select">Select</label>'),_=a;return create_option_container(i,_=(_=(_=_.add(n)).add(l)).add(d))}function create_datefields_month_size(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_month_size">Month field width(px)</label>'),jQuery('<input type="text" class="fm-width-100" id="edit_for_month_size" onKeyPress="return check_isnum(event)" onKeyUp="change_w_style(\''+e+'_monthform_id_temp\', this.value)" value="'+t+'" />'))}function create_datefield_year_type(e,t){var i=jQuery('<label class="fm-field-label">Year field type</label>'),a=jQuery('<input type="radio" id="el_year_field_type_text" name="edit_for_year_field_type" onchange="field_to_text('+e+", 'year')\""+("SELECT"==t?"":' checked="checked"')+" />"),n=jQuery('<label for="el_year_field_type_text">Input</label>'),l=jQuery('<input type="radio" id="el_year_field_type_select" name="edit_for_year_field_type" onchange="field_to_select('+e+", 'year')\""+("SELECT"==t?' checked="checked"':"")+" />"),d=jQuery('<label for="el_year_field_type_select">Select</label>'),_=a;return create_option_container(i,_=(_=(_=_.add(n)).add(l)).add(d))}function create_datefields_year_size(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_year_size">Year field width(px)</label>'),jQuery('<input type="text" class="fm-width-100" id="edit_for_year_size" onKeyPress="return check_isnum(event)" onKeyUp="change_w_style(\''+e+'_yearform_id_temp\', this.value)" value="'+t+'" />'))}function create_datefields_year_interval(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_year_interval_from">Year interval</label>'),jQuery('<input type="text" class="fm-width-40" id="edit_for_year_interval_from" onKeyPress="return check_isnum(event)" onKeyUp="year_interval('+e+')" value="'+t+'" />-<input type="text" class="fm-width-40" id="edit_for_year_interval_to" onKeyPress="return check_isnum(event)" onKeyUp="year_interval('+e+')" value="'+i+'" />'))}function field_to_select(e,t){switch(t){case"day":w_width=""!=document.getElementById("edit_for_day_size").value?document.getElementById("edit_for_day_size").value:30,w_day=document.getElementById(e+"_dayform_id_temp").value,document.getElementById(e+"_td_date_input1").innerHTML="";var i=document.createElement("select");for(i.setAttribute("id",e+"_dayform_id_temp"),i.setAttribute("name",e+"_dayform_id_temp"),i.setAttribute("onChange","set_select(this)"),i.style.width=w_width+"px",(_=document.createElement("option")).setAttribute("value",""),_.innerHTML="",i.appendChild(_),k=1;k<=31;k++){k<10&&(k="0"+k),(_=document.createElement("option")).setAttribute("value",k),_.innerHTML=k,k==w_day&&_.setAttribute("selected","selected"),i.appendChild(_)}document.getElementById(e+"_td_date_input1").appendChild(i);break;case"month":w_width=""!=document.getElementById("edit_for_month_size").value?document.getElementById("edit_for_month_size").value:60,w_month=document.getElementById(e+"_monthform_id_temp").value,document.getElementById(e+"_td_date_input2").innerHTML="";var a=document.createElement("select");a.setAttribute("id",e+"_monthform_id_temp"),a.setAttribute("name",e+"_monthform_id_temp"),a.setAttribute("onChange","set_select(this)"),a.style.width=w_width+"px",(_=document.createElement("option")).setAttribute("value",""),_.innerHTML="",a.appendChild(_);var n=new Array("\x3c!--repstart--\x3eJanuary\x3c!--repend--\x3e","\x3c!--repstart--\x3eFebruary\x3c!--repend--\x3e","\x3c!--repstart--\x3eMarch\x3c!--repend--\x3e","\x3c!--repstart--\x3eApril\x3c!--repend--\x3e","\x3c!--repstart--\x3eMay\x3c!--repend--\x3e","\x3c!--repstart--\x3eJune\x3c!--repend--\x3e","\x3c!--repstart--\x3eJuly\x3c!--repend--\x3e","\x3c!--repstart--\x3eAugust\x3c!--repend--\x3e","\x3c!--repstart--\x3eSeptember\x3c!--repend--\x3e","\x3c!--repstart--\x3eOctober\x3c!--repend--\x3e","\x3c!--repstart--\x3eNovember\x3c!--repend--\x3e","\x3c!--repstart--\x3eDecember\x3c!--repend--\x3e");for(k=1;k<=12;k++){k<10&&(k="0"+k),(_=document.createElement("option")).setAttribute("value",k),_.innerHTML=n[k-1],k==w_month&&_.setAttribute("selected","selected"),a.appendChild(_)}document.getElementById(e+"_td_date_input2").appendChild(a);break;case"year":w_width=""!=document.getElementById("edit_for_year_size").value?document.getElementById("edit_for_year_size").value:60,w_year=document.getElementById(e+"_yearform_id_temp").value,document.getElementById(e+"_td_date_input3").innerHTML="";var l=document.createElement("select");l.setAttribute("id",e+"_yearform_id_temp"),l.setAttribute("name",e+"_yearform_id_temp"),l.setAttribute("onChange","set_select(this)"),l.style.width=w_width+"px",(_=document.createElement("option")).setAttribute("value",""),_.innerHTML="",l.appendChild(_);var d=new Date;for(from=parseInt(document.getElementById("edit_for_year_interval_from").value),to=""!=document.getElementById("edit_for_year_interval_to").value?parseInt(document.getElementById("edit_for_year_interval_to").value):d.getFullYear(),k=to;k>=from;k--){var _;(_=document.createElement("option")).setAttribute("value",k),_.innerHTML=k,k==w_year&&_.setAttribute("selected","selected"),l.appendChild(_)}l.value=w_year,l.setAttribute("from",from),l.setAttribute("to",to),document.getElementById(e+"_td_date_input3").appendChild(l)}refresh_attr(e,"type_date_fields")}function field_to_text(e,t){switch(t){case"day":w_width=""!=document.getElementById("edit_for_day_size").value?document.getElementById("edit_for_day_size").value:30,w_day=document.getElementById(e+"_dayform_id_temp").value,document.getElementById(e+"_td_date_input1").innerHTML="";var i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("value",w_day),i.setAttribute("id",e+"_dayform_id_temp"),i.setAttribute("name",e+"_dayform_id_temp"),i.setAttribute("onBlur","if (this.value=='0') this.value=''; else add_0('"+e+"_dayform_id_temp')"),i.style.width=w_width+"px",document.getElementById(e+"_td_date_input1").appendChild(i);break;case"month":w_width=""!=document.getElementById("edit_for_month_size").value?document.getElementById("edit_for_month_size").value:60,w_month=document.getElementById(e+"_monthform_id_temp").value,document.getElementById(e+"_td_date_input2").innerHTML="";var a=document.createElement("input");a.setAttribute("type","text"),a.setAttribute("value",w_month),a.setAttribute("id",e+"_monthform_id_temp"),a.setAttribute("name",e+"_monthform_id_temp"),a.style.width=w_width+"px",a.setAttribute("onBlur","if (this.value=='0') this.value=''; else add_0('"+e+"_monthform_id_temp')"),document.getElementById(e+"_td_date_input2").appendChild(a);break;case"year":w_width=""!=document.getElementById("edit_for_year_size").value?document.getElementById("edit_for_year_size").value:60,w_year=document.getElementById(e+"_yearform_id_temp").value,document.getElementById(e+"_td_date_input3").innerHTML="";var n=new Date;from=parseInt(document.getElementById("edit_for_year_interval_from").value),to=""!=document.getElementById("edit_for_year_interval_to").value?parseInt(document.getElementById("edit_for_year_interval_to").value):n.getFullYear(),(parseInt(w_year)<from||parseInt(w_year)>to)&&(w_year="");var l=document.createElement("input");l.setAttribute("type","text"),l.setAttribute("value",w_year),l.setAttribute("id",e+"_yearform_id_temp"),l.setAttribute("name",e+"_yearform_id_temp"),l.style.width=w_width+"px",l.setAttribute("from",from),l.setAttribute("to",to),document.getElementById(e+"_td_date_input3").appendChild(l)}refresh_attr(e,"type_date_fields")}function set_divider(e,t){document.getElementById(e+"_separator1").innerHTML=t,document.getElementById(e+"_separator2").innerHTML=t}function year_interval(e){var t=new Date;from=parseInt(document.getElementById("edit_for_year_interval_from").value),to=""!=document.getElementById("edit_for_year_interval_to").value?parseInt(document.getElementById("edit_for_year_interval_to").value):t.getFullYear(),to-from<0?(alert("Invalid interval of years."),document.getElementById("edit_for_year_interval_from").value=to):"SELECT"==document.getElementById(e+"_yearform_id_temp").tagName?field_to_select(e,"year"):field_to_text(e,"year")}function go_to_type_date_fields(e){w_attr_name=[],w_attr_value=[];var t=new Date;w_to=t.getFullYear(),type_date_fields(e,"Date of Birth","","top","no","","","","SELECT","SELECT","SELECT","day","month","year","60","100","80","no","wdform_date_fields","1901",w_to,"&nbsp;/&nbsp;",w_attr_name,w_attr_value)}function type_date_fields(i,e,t,a,n,l,d,_,r,o,m,s,u,c,p,f,y,h,b,v,w,g,E,A){current_date=new Date,jQuery("#element_type").val("type_date_fields"),delete_last_child();var j=jQuery("#edit_table"),x=jQuery('<div id="edit_div"></div>');j.append(x);var k=jQuery('<div id="edit_main_table"></div>');x.append(k),k.append(create_field_type("type_date_fields")),k.append(create_label(i,e)),k.append(create_label_position(i,a)),k.append(create_hide_label(i,n)),k.append(create_required(i,h));var I=jQuery('<div class="inside"></div>');k.append(create_advanced_options_container(I)),I.append(create_datefields_separator(i,g)),I.append(create_datefield_day_type(i,r)),I.append(create_datefields_day_size(i,p)),I.append(create_datefield_month_type(i,o)),I.append(create_datefields_month_size(i,f)),I.append(create_datefield_year_type(i,m)),I.append(create_datefields_year_size(i,y)),I.append(create_datefields_year_interval(i,v,w)),I.append(jQuery('<div class="notice notice-info"><p>Leave the second field empty and the current year will be used automatically. For a specific year (other than current) fill out both the start and finish points of the range.</p></div>')),I.append(create_field_label_size(i,t)),I.append(create_class(i,b)),I.append(create_additional_attributes(i,E,"type_date_fields"));var C=document.createElement("br"),B=document.createElement("input");B.setAttribute("type","hidden"),B.setAttribute("value","type_date_fields"),B.setAttribute("name",i+"_typeform_id_temp"),B.setAttribute("id",i+"_typeform_id_temp");var Q=document.createElement("input");Q.setAttribute("type","hidden"),Q.setAttribute("value",h),Q.setAttribute("name",i+"_requiredform_id_temp"),Q.setAttribute("id",i+"_requiredform_id_temp");var T=document.createElement("input");T.setAttribute("type","hidden"),T.setAttribute("value",n),T.setAttribute("name",i+"_hide_labelform_id_temp"),T.setAttribute("id",i+"_hide_labelform_id_temp");var M=document.createTextNode("The labels of the fields are editable. Please, click on the label to edit."),L=document.createElement("div");L.setAttribute("id","main_div");var z=document.createElement("div");z.setAttribute("style","margin-left:4px; color:red;"),z.appendChild(M);var q=document.createElement("div");q.setAttribute("id",i+"_elemet_tableform_id_temp");var H="yes"==n?"none":"table-cell",N=document.createElement("div");N.setAttribute("align","left"),N.style.cssText="display:"+H+"; vertical-align:top; width:"+t+"px",N.setAttribute("id",i+"_label_sectionform_id_temp");var S=document.createElement("div");S.setAttribute("align","left"),S.style.display="table-cell",S.setAttribute("id",i+"_element_sectionform_id_temp");var D=document.createElement("div");D.setAttribute("id",i+"_table_date"),D.style.display="table";var P=document.createElement("div");P.setAttribute("id",i+"_tr_date1"),P.style.display="table-row";var O=document.createElement("div");O.setAttribute("id",i+"_tr_date2"),O.style.display="table-row";var K=document.createElement("div");K.setAttribute("id",i+"_td_date_input1"),K.style.display="table-cell";var U=document.createElement("div");U.setAttribute("id",i+"_td_date_separator1"),U.style.display="table-cell";var F=document.createElement("div");F.setAttribute("id",i+"_td_date_input2"),F.style.display="table-cell";var R=document.createElement("div");R.setAttribute("id",i+"_td_date_separator2"),R.style.display="table-cell";var W=document.createElement("div");W.setAttribute("id",i+"_td_date_input3"),W.style.display="table-cell";var V=document.createElement("div");V.setAttribute("id",i+"_td_date_label1"),V.style.display="table-cell";var $=document.createElement("div");$.style.display="table-cell";var G=document.createElement("div");G.setAttribute("id",i+"_td_date_label2"),G.style.display="table-cell";var Y=document.createElement("div");Y.style.display="table-cell";var Z=document.createElement("div");Z.setAttribute("id",i+"_td_date_label3"),Z.style.display="table-cell";var X=document.createElement("span");X.setAttribute("id",i+"_element_labelform_id_temp"),X.innerHTML=e,X.setAttribute("class","wd_form_label"),X.style.verticalAlign="top";var J=document.createElement("span");J.setAttribute("id",i+"_required_elementform_id_temp"),J.innerHTML="",J.setAttribute("class","required"),J.style.verticalAlign="top","yes"==h&&(J.innerHTML=" *");var ee=document.createElement("input");ee.setAttribute("type","text"),ee.setAttribute("value",l),ee.setAttribute("id",i+"_dayform_id_temp"),ee.setAttribute("name",i+"_dayform_id_temp"),ee.setAttribute("onBlur","if (this.value=='0') this.value=''; else add_0('"+i+"_dayform_id_temp')"),ee.style.width=p+"px";var te=document.createElement("label");te.setAttribute("class","mini_label"),te.setAttribute("id",i+"_day_label"),te.innerHTML=s;var ie=document.createElement("span");ie.setAttribute("id",i+"_separator1"),ie.setAttribute("class","wdform_separator"),ie.innerHTML=g;var ae=document.createElement("input");ae.setAttribute("type","text"),ae.setAttribute("value",d),ae.setAttribute("id",i+"_monthform_id_temp"),ae.setAttribute("name",i+"_monthform_id_temp"),ae.style.width=f+"px",ae.setAttribute("onBlur","if (this.value=='0') this.value=''; else add_0('"+i+"_monthform_id_temp')");var ne=document.createElement("label");ne.setAttribute("class","mini_label"),ne.setAttribute("class","mini_label"),ne.setAttribute("id",i+"_month_label"),ne.innerHTML=u;var le=document.createElement("span");le.setAttribute("id",i+"_separator2"),le.setAttribute("class","wdform_separator"),le.innerHTML=g,""==w&&(w=current_date.getFullYear());var de=document.createElement("input");de.setAttribute("type","text"),de.setAttribute("from",v),de.setAttribute("to",w),de.setAttribute("value",_),de.setAttribute("id",i+"_yearform_id_temp"),de.setAttribute("name",i+"_yearform_id_temp"),de.style.width=y+"px";var _e=document.createElement("label");_e.setAttribute("class","mini_label"),_e.setAttribute("id",i+"_year_label"),_e.innerHTML=c;var re=document.getElementById("show_table");N.appendChild(X),N.appendChild(J),S.appendChild(T),K.appendChild(ee),U.appendChild(ie),F.appendChild(ae),R.appendChild(le),W.appendChild(de),P.appendChild(K),P.appendChild(U),P.appendChild(F),P.appendChild(R),P.appendChild(W),V.appendChild(te),G.appendChild(ne),Z.appendChild(_e),O.appendChild(V),O.appendChild($),O.appendChild(G),O.appendChild(Y),O.appendChild(Z),D.appendChild(P),D.appendChild(O),S.appendChild(B),S.appendChild(Q),S.appendChild(D),q.appendChild(N),q.appendChild(S),L.appendChild(q),L.appendChild(C),L.appendChild(z),re.appendChild(L),jQuery("#main_div").append("<br>"+form_maker.type_date_of_birth_description),"top"==a&&label_top(i),"SELECT"==r&&field_to_select(i,"day"),"SELECT"==o&&field_to_select(i,"month"),"SELECT"==m&&field_to_select(i,"year"),change_class(b,i),refresh_attr(i,"type_date_fields"),jQuery(document).ready(function(t){t("label#"+i+"_day_label").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='day' style='outline:none; border:none; background:none; width:100px;' value=\""+t(this).text()+'">';t(this).html(e),t("input.day").focus(),t("input.day").blur(function(){var e=t(this).val();t("#"+i+"_day_label").text(e)})}}),t("label#"+i+"_month_label").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='month' style='outline:none; border:none; background:none; width:100px;' value=\""+t(this).text()+'">';t(this).html(e),t("input.month").focus(),t("input.month").blur(function(){var e=t(this).val();t("#"+i+"_month_label").text(e)})}}),t("label#"+i+"_year_label").click(function(){if(0==t(this).children("input").length){var e="<input type='text' class='year' size='8' style='outline:none; border:none; background:none; width:100px;' value=\""+t(this).text()+'">';t(this).html(e),t("input.year").focus(),t("input.year").blur(function(){var e=t(this).val();t("#"+i+"_year_label").text(e)})}})})}function create_payment_amount_range(e,t,i){return create_option_container(jQuery('<label class="fm-field-label">Range</label>'),jQuery('<input type="text" class="fm-width-40" id="el_range_min1" onKeyPress="return check_isnum(event)" onChange="change_input_range_new(\'min\', '+e+')" value="'+t+'" placeholder="Min" />-<input type="text" class="fm-width-40" id="el_range_max1" onKeyPress="return check_isnum(event)" onChange="change_input_range_new(\'max\', '+e+')" value="'+i+'" placeholder="Max" />'))}function create_hide_payment_currency(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_currency">Hide payment currency</label>'),jQuery('<input type="checkbox" id="el_currency" onchange="hide_currency(this.checked, '+e+')"'+("yes"==t?' checked="checked"':"")+" />"))}function change_input_range_new(e,t){var i="";""!=document.getElementById("el_range_"+e+"1").value&&(i=document.getElementById("el_range_"+e+"1").value),document.getElementById(t+"_range_"+e+"form_id_temp").value=i}function hide_currency(e,t){document.getElementById(t+"_td_name_currency").style.display=e?"none":"table-cell"}function go_to_type_paypal_price_new(e){w_attr_name=[],w_attr_value=[],type_paypal_price_new(e,"Amount","","top","no","","","","no","",w_attr_name,w_attr_value,"","","no","no")}function type_paypal_price_new(e,t,i,a,n,l,d,_,r,o,m,s,u,c,p,f){jQuery("#element_type").val("type_paypal_price_new"),delete_last_child();var y=jQuery("#edit_table"),h=jQuery('<div id="edit_div"></div>');y.append(h);var b=jQuery('<div id="edit_main_table"></div>');h.append(b),b.append(create_field_type("type_paypal_price_new")),b.append(create_label(e,t)),b.append(create_label_position(e,a)),b.append(create_hide_label(e,n)),b.append(create_required(e,r)),b.append(create_readonly(e,p)),b.append(create_field_size(e,_));var v=jQuery('<div class="inside"></div>');b.append(create_advanced_options_container(v)),v.append(create_payment_amount_range(e,u,c)),v.append(create_hide_payment_currency(e,f)),v.append(create_field_label_size(e,i)),v.append(create_class(e,o)),v.append(create_additional_attributes(e,m,"type_paypal_price_new"));var w=document.createElement("input");w.setAttribute("type","hidden"),w.setAttribute("value","type_paypal_price_new"),w.setAttribute("name",e+"_typeform_id_temp"),w.setAttribute("id",e+"_typeform_id_temp");var g=document.createElement("input");g.setAttribute("type","hidden"),g.setAttribute("value",r),g.setAttribute("name",e+"_requiredform_id_temp"),g.setAttribute("id",e+"_requiredform_id_temp");var E=document.createElement("input");E.setAttribute("type","hidden"),E.setAttribute("value",n),E.setAttribute("name",e+"_hide_labelform_id_temp"),E.setAttribute("id",e+"_hide_labelform_id_temp");var A=document.createElement("input");A.setAttribute("type","hidden"),A.setAttribute("value",p),A.setAttribute("name",e+"_readonlyform_id_temp"),A.setAttribute("id",e+"_readonlyform_id_temp");var j=document.createElement("input");j.setAttribute("type","hidden"),j.setAttribute("value",u),j.setAttribute("name",e+"_range_minform_id_temp"),j.setAttribute("id",e+"_range_minform_id_temp");var x=document.createElement("input");x.setAttribute("type","hidden"),x.setAttribute("value",c),x.setAttribute("name",e+"_range_maxform_id_temp"),x.setAttribute("id",e+"_range_maxform_id_temp");var k=document.createElement("div");k.setAttribute("id","main_div");var I=document.createElement("div");I.setAttribute("id",e+"_elemet_tableform_id_temp");var C="yes"==n?"none":"table-cell",B=document.createElement("div");B.setAttribute("align","left"),B.style.display=C,B.style.width=i+"px",B.setAttribute("id",e+"_label_sectionform_id_temp");var Q=document.createElement("div");Q.setAttribute("align","left"),Q.style.display="table-cell",Q.setAttribute("id",e+"_element_sectionform_id_temp");var T=document.createElement("div");T.setAttribute("id",e+"_table_price"),T.style.display="table";var M=document.createElement("div");M.setAttribute("id",e+"_tr_price1"),M.style.display="table-row";var L=document.createElement("div");L.setAttribute("id",e+"_td_name_currency"),L.style.display="no"==f?"table-cell":"none";var z=document.createElement("div");z.setAttribute("id",e+"_td_name_dollars"),z.style.display="table-cell";var q=document.createElement("div");q.style.display="table-cell";var H=document.createElement("div");H.setAttribute("align","left"),H.style.display="table-cell";var N=document.createElement("div");N.setAttribute("id",e+"_td_name_label_divider"),N.style.display="table-cell";var S=document.createElement("div");S.setAttribute("align","left"),S.setAttribute("id",e+"_td_name_label_cents"),S.style.display="table-cell";var D=document.createElement("span");D.setAttribute("id",e+"_element_labelform_id_temp"),D.innerHTML=t,D.setAttribute("class","label"),D.style.verticalAlign="top";var P=document.createElement("span");P.setAttribute("id",e+"_required_elementform_id_temp"),P.innerHTML="",P.setAttribute("class","required"),P.style.verticalAlign="top","yes"==r&&(P.innerHTML=" *");var O=document.createElement("span");O.setAttribute("class","wdform_colon"),O.style.cssText="font-style:bold; vertical-align:middle",O.innerHTML="\x3c!--repstart--\x3e&nbsp;$&nbsp;\x3c!--repend--\x3e";var K=document.createElement("label");K.setAttribute("class","mini_label");var U=document.createElement("input");U.setAttribute("type","text"),U.style.cssText="width:"+_+"px",U.setAttribute("id",e+"_elementform_id_temp"),U.setAttribute("name",e+"_elementform_id_temp"),U.setAttribute("value",l),U.setAttribute("title",d),U.setAttribute("placeholder",d),"yes"==p&&U.setAttribute("readonly","readonly"),U.setAttribute("onKeyPress","return check_isnum(event)");var F=document.createElement("label");F.setAttribute("class","mini_label"),F.setAttribute("id",e+"_mini_label_dollars");var R=document.getElementById("show_table");B.appendChild(D),B.appendChild(P),Q.appendChild(E),L.appendChild(O),z.appendChild(U),M.appendChild(L),M.appendChild(z),q.appendChild(K),H.appendChild(F),T.appendChild(M),Q.appendChild(w),Q.appendChild(g),Q.appendChild(A),Q.appendChild(j),Q.appendChild(x),Q.appendChild(T),I.appendChild(B),I.appendChild(Q),k.appendChild(I),R.appendChild(k),jQuery("#main_div").append("<br>"+form_maker.type_price_description),"top"==a&&label_top(e),change_class(o,e),refresh_attr(e,"type_text")}function create_paypal_select_options(e,t,i,a,l){var d=jQuery('<label class="fm-field-label">Options</label>'),_=jQuery('<button id="el_choices_add" class="fm-add-option button-secondary" onClick="add_choise_price(\'select\', '+e+'); return false;" title="Add option"><span class="field-type-button fm-add-attribute dashicons dashicons-plus-alt"></span>Option</button>');if(form_maker.is_demo)var r=jQuery('<button class="fm-add-option button-secondary" onClick="alert(\'This feature is disabled in demo.\')" title="Add options from database"><span class="field-type-button fm-add-attribute dashicons dashicons-plus-alt"></span>From Database</button>');else r=jQuery("<button class=\"fm-add-option button-secondary\" onClick=\"tb_show('', 'admin-ajax.php?action=select_data_from_db&nonce="+fm_ajax.ajaxnonce+"&field_id="+e+'&field_type=paypal_select&width=530&height=370&TB_iframe=1\'); return false;" title="Add options from database"><span class="field-type-button fm-add-attribute dashicons dashicons-plus-alt"></span>From Database</button>');var o=jQuery('<div class="fm-width-100 error">IMPORTANT! Check the "Empty value" checkbox only if you want the option to be considered as empty.</div>'),m=jQuery('<div id="choices" class="fm-width-100 ui-sortable"></div>'),s=jQuery('<div class="fm-width-100"><div class="fm-header-label fm-width-40">Product name</div><div class="fm-header-label fm-width-20">Price</div><div class="fm-header-label fm-width-20">Empty value</div><div class="fm-header-label fm-width-10">Delete</div><div class="fm-header-label fm-width-10">Move</div></div>');for(m.append(s),n=t.length,j=0;j<n;j++){var u=jQuery('<div id="'+j+'" class="change_pos fm-width-100"><div class="fm-table-col fm-width-40"><input type="text" class="fm-field-choice" id="el_option'+j+'" value="'+t[j].replace(/"/g,"&quot;")+'" onKeyUp="change_label_price(\''+e+"_option"+j+"', this.value)\""+(i[j]?' disabled="disabled"':"")+' /></div><div class="fm-table-col fm-width-20"><input type="text" class="fm-field-choice" id="el_option_price'+j+'" value="'+a[j]+'" onKeyPress="return check_isnum_point(event)" onKeyUp="change_value_price(\''+e+"_option"+j+"', this.value)\""+(i[j]?' disabled="disabled"':"")+' /></div><div class="fm-table-col fm-width-20"><input type="hidden" id="el_option_params'+j+'" value="'+i[j]+'" /><input type="checkbox" title="Empty value" class="el_option_dis" id="el_option'+j+'_dis" onClick="dis_option_price('+e+","+j+', this.checked)"'+(l[j]?' checked="checked"':"")+' /></div><div class="fm-table-col fm-width-10"><span class="fm-remove-attribute dashicons dashicons-dismiss" id="el_option'+j+'_remove" onClick="remove_option_price('+j+","+e+')"></span></div><div class="fm-table-col fm-width-10"><span class="fm-move-attribute fm-ico-draggable el_choices_sortable"></span></div></div>');m.append(u)}var c=d;return create_option_container(null,c=(c=(c=(c=c.add(_)).add(r)).add(m)).add(o))}function create_payment_quantity(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="el_quantity">Quantity property</label>'),jQuery('<input type="checkbox" id="el_quantity" value="yes" onchange="add_quantity('+e+","+t+')"'+("yes"==i?' checked="checked"':"")+" />"))}function add_quantity(e,t){if(div_=document.getElementById(e+"_divform_id_temp"),""==form_maker_getElementsByAttribute(div_,"*","id",e+"_element_quantityform_id_temp")){select_=document.createElement("input"),select_.setAttribute("type","text"),select_.setAttribute("value",t),select_.setAttribute("id",e+"_element_quantityform_id_temp"),select_.setAttribute("name",e+"_element_quantityform_id_temp"),select_.setAttribute("onKeyPress","return check_isnum(event)"),select_.style.cssText="width:30px; margin:2px 0px";var i=document.createElement("label");i.innerHTML="\x3c!--repstart--\x3eQuantity\x3c!--repend--\x3e",i.style.cssText="margin-right:5px",i.setAttribute("class","mini_label"),i.setAttribute("id",e+"_element_quantity_label_form_id_temp");var a=document.createElement("span");a.style.cssText="margin-right:15px",a.setAttribute("id",e+"_element_quantity_spanform_id_temp"),a.appendChild(i),a.appendChild(select_),div_.firstChild?div_.insertBefore(a,div_.firstChild):div_.appendChild(a)}else div_.removeChild(document.getElementById(e+"_element_quantity_spanform_id_temp"))}function create_payment_property(e){var t=jQuery('<label class="fm-field-label">Product properties</label>'),i=jQuery("<a class=\"thickbox-preview\" onClick=\"tb_show('', 'admin-ajax.php?action=product_option&nonce="+fm_ajax.ajaxnonce+"&field_id="+e+'&width=530&height=370&TB_iframe=1\')"><span class="fm-add-attribute dashicons dashicons-plus-alt" title="Add"></span></a>'),a=jQuery('<ul id="option_ul" class="fm-width-100"></ul>'),n=t;return create_option_container(null,n=(n=n.add(i)).add(a))}function add_choise_price(e,t){var i=0;document.getElementById(t+"_hor")&&(i=1,flow_ver(t));var a=0;if(jQuery(".change_pos").each(function(){var e=parseInt(jQuery(this)[0].id);a=a<e?e:a}),a+=1,"radio"==e||"checkbox"==e){element="input";var n=document.getElementById(t+"_table_little"),l=document.createElement("div");l.setAttribute("id",t+"_element_tr"+a),l.style.display="table-row";var d=document.createElement("div");d.setAttribute("valign","top"),d.setAttribute("id",t+"_td_little"+a),d.setAttribute("idi",a),d.style.display="table-cell";var _=document.createElement(element);_.setAttribute("type",e),_.setAttribute("value",""),_.setAttribute("id",t+"_elementform_id_temp"+a),"right"==document.getElementById(t+"_option_left_right").value&&(_.style.cssText="float: left !important"),"checkbox"==e&&(_.setAttribute("onClick","set_checked('"+t+"','"+a+"','form_id_temp')"),_.setAttribute("name",t+"_elementform_id_temp"+a)),"radio"==e&&(_.setAttribute("onClick","set_default('"+t+"','"+a+"','form_id_temp')"),_.setAttribute("name",t+"_elementform_id_temp"));var r=document.createElement("label");r.setAttribute("id",t+"_label_element"+a),r.setAttribute("class","ch-rad-label"),r.setAttribute("for",t+"_elementform_id_temp"+a),"right"==document.getElementById(t+"_option_left_right").value&&(r.style.cssText="float: none !important");var o=document.createElement("input");o.setAttribute("type","hidden"),o.setAttribute("id",t+"_elementlabel_form_id_temp"+a),o.setAttribute("name",t+"_elementform_id_temp"+a+"_label"),o.setAttribute("value",""),d.appendChild(_),d.appendChild(r),d.appendChild(o),l.appendChild(d),n.appendChild(l);var m=jQuery("#choices"),s=jQuery('<div id="'+a+'" class="change_pos fm-width-100"><div class="fm-table-col fm-width-60"><input type="text" class="fm-field-choice" id="el_choices'+a+'" value="" onKeyUp="change_label(\''+t+"_label_element"+a+"', this.value); change_label_1('"+t+"_elementlabel_form_id_temp"+a+'\', this.value);" /></div><div class="fm-table-col fm-width-20"><input type="text" class="fm-field-choice" id="el_option_price'+a+'" value="" onKeyPress="return check_isnum_point(event)" onKeyUp="change_value_price(\''+t+"_elementform_id_temp"+a+'\', this.value)" /></div><input type="hidden" id="el_option_params'+a+'" value="" /><div class="fm-table-col fm-width-10"><span class="fm-remove-attribute dashicons dashicons-dismiss" id="el_option'+a+'_remove" onClick="remove_choise_price('+a+","+t+')"></span></div><div class="fm-table-col fm-width-10"><span class="fm-move-attribute fm-ico-draggable el_choices_sortable"></span></div></div>');m.append(s),refresh_attr(t,"type_checkbox")}if("select"==e){var u=document.getElementById(t+"_elementform_id_temp"),c=document.createElement("option");c.setAttribute("id",t+"_option"+a),u.appendChild(c);m=jQuery("#choices"),s=jQuery('<div id="'+a+'" class="change_pos fm-width-100"><div class="fm-table-col fm-width-40"><input type="text" class="fm-field-choice" id="el_option'+a+'" value="" onKeyUp="change_label_price(\''+t+"_option"+a+'\', this.value)" /></div><div class="fm-table-col fm-width-20"><input type="text" class="fm-field-choice" id="el_option_price'+a+'" value="" onKeyPress="return check_isnum_point(event)" onKeyUp="change_value_price(\''+t+"_option"+a+'\', this.value)" /></div><div class="fm-table-col fm-width-20"><input type="hidden" id="el_option_params'+a+'" value="" /><input type="checkbox" title="Empty value" class="el_option_dis" id="el_option'+a+'_dis" onClick="dis_option_price('+t+","+a+', this.checked)" /></div><div class="fm-table-col fm-width-10"><span class="fm-remove-attribute dashicons dashicons-dismiss" id="el_option'+a+'_remove" onClick="remove_option_price('+a+","+t+')"></span></div><div class="fm-table-col fm-width-10"><span class="fm-move-attribute fm-ico-draggable el_choices_sortable"></span></div></div>');m.append(s)}1==i&&flow_hor(t)}function flow_hor(e){for(tbody=document.getElementById(e+"_table_little"),td_array=new Array,n=tbody.childNodes.length,k=0;k<n;k++)td_array[k]=tbody.childNodes[k].childNodes[0];for(k=0;k<n;k++)tbody.removeChild(tbody.childNodes[0]);var t=document.createElement("div");for(t.style.display="table-row",t.setAttribute("id",e+"_hor"),tbody.appendChild(t),k=0;k<n;k++)t.appendChild(td_array[k])}function flow_ver(e){for(tbody=document.getElementById(e+"_table_little"),tr=document.getElementById(e+"_hor"),td_array=new Array,n=tr.childNodes.length,k=0;k<n;k++)td_array[k]=tr.childNodes[k];for(tbody.removeChild(tr),k=0;k<n;k++){var t=document.createElement("div");t.setAttribute("id",e+"_element_tr"+td_array[k].getAttribute("idi")),t.style.display="table-row",t.appendChild(td_array[k]),tbody.appendChild(t)}}function change_label_price(e,t){document.getElementById(e).innerHTML=t}function change_value_price(e,t){document.getElementById(e).value=t}function dis_option_price(e,t,i){document.getElementById(e+"_option"+t).value=i?"":document.getElementById("el_option_price"+t).value}function remove_option_price(e,t){var i=document.getElementById(t+"_elementform_id_temp"),a=document.getElementById(t+"_option"+e);i.removeChild(a);var n=document.getElementById("choices"),l=document.getElementById(e);n.removeChild(l)}function add_properties(e,t,a){for(n=t.length,i=0;i<n;i++){for(select_=document.createElement("select"),select_.setAttribute("id",e+"_propertyform_id_temp"+i),select_.setAttribute("name",e+"_propertyform_id_temp"+i),select_.style.cssText="width:auto; margin:2px 0px",k=0;k<a[i].length;k++){var l=document.createElement("option");l.setAttribute("id",e+"_"+i+"_option"+k),l.setAttribute("value",a[i][k]),l.innerHTML=a[i][k],select_.appendChild(l)}var d=document.createElement("label");d.innerHTML=t[i],d.style.cssText="margin-right:5px",d.setAttribute("class","mini_label"),d.setAttribute("id",e+"_property_label_form_id_temp"+i);var _=document.createElement("span");_.style.cssText="margin-right:15px",_.setAttribute("id",e+"_property_"+i),div_=document.getElementById(e+"_divform_id_temp"),_.appendChild(d),_.appendChild(select_),div_.appendChild(_);var r=document.createElement("li");r.setAttribute("id","property_li_"+i);var o=document.createElement("label");o.innerHTML=t[i],o.setAttribute("id","label_property_"+i),o.style.cssText="font-weight:bold; font-size: 13px";var m=document.createElement("a");m.setAttribute("onclick","tb_show('', 'admin-ajax.php?action=product_option&nonce="+fm_ajax.ajaxnonce+"&field_id="+e+"&property_id="+i+"&width=530&height=370&TB_iframe=1')"),m.setAttribute("class","thickbox-preview");var s=document.createElement("span");s.setAttribute("class","fm-edit-attribute fm-ico-edit"),m.appendChild(s);var u=document.createElement("span");u.setAttribute("class","fm-remove-attribute dashicons dashicons-dismiss"),u.setAttribute("onClick","remove_property("+e+","+i+")"),ul_=document.getElementById("option_ul"),r.appendChild(o),r.appendChild(m),r.appendChild(u),ul_.appendChild(r)}}function remove_property(e,t){property_=document.getElementById(e+"_property_"+t),property_.parentNode.removeChild(property_),property_li_=document.getElementById("property_li_"+t),property_li_.parentNode.removeChild(property_li_)}function go_to_type_paypal_select(e){w_choices=["Select product","product 1","product 2"],w_choices_price=["","100","200"],w_choices_checked=["1","0","0"],w_choices_params=["","",""],w_choices_disabled=[!0,!1,!1],w_attr_name=[],w_attr_value=[],w_property=[],w_property_values=[],type_paypal_select(e,"Select Product","","top","no","",w_choices,w_choices_price,w_choices_checked,"no","no","1","wdform_select",w_attr_name,w_attr_value,w_choices_disabled,w_property,w_property_values,w_choices_params)}function type_paypal_select(i,e,t,a,l,d,_,r,o,m,s,u,c,p,f,y,h,b,v){jQuery("#element_type").val("type_paypal_select"),delete_last_child();var w=jQuery("#edit_table"),g=jQuery('<div id="edit_div"></div>');w.append(g);var E=jQuery('<div id="edit_main_table"></div>');g.append(E),E.append(create_field_type("type_paypal_select")),E.append(create_label(i,e)),E.append(create_label_position(i,a)),E.append(create_hide_label(i,l)),E.append(create_required(i,m)),E.append(create_field_size(i,d)),E.append(create_paypal_select_options(i,_,v,r,y));var A=jQuery('<div class="inside"></div>');E.append(create_advanced_options_container(A)),A.append(create_payment_quantity(i,u,s)),A.append(create_payment_property(i)),A.append(create_field_label_size(i,t)),A.append(create_class(i,c)),A.append(create_additional_attributes(i,p,"type_paypal_select"));var x=document.createElement("input");x.setAttribute("type","hidden"),x.setAttribute("value","type_paypal_select"),x.setAttribute("name",i+"_typeform_id_temp"),x.setAttribute("id",i+"_typeform_id_temp");var k=document.createElement("input");k.setAttribute("type","hidden"),k.setAttribute("value",m),k.setAttribute("name",i+"_requiredform_id_temp"),k.setAttribute("id",i+"_requiredform_id_temp");var I=document.createElement("input");I.setAttribute("type","hidden"),I.setAttribute("value",l),I.setAttribute("name",i+"_hide_labelform_id_temp"),I.setAttribute("id",i+"_hide_labelform_id_temp");var C=document.createElement("div");C.setAttribute("id","main_div");var B=document.createElement("div");B.setAttribute("id",i+"_elemet_tableform_id_temp");var Q="yes"==l?"none":"table-cell",T=document.createElement("div");T.setAttribute("align","left"),T.style.display=Q,T.style.width=t+"px",T.setAttribute("id",i+"_label_sectionform_id_temp");var M=document.createElement("div");M.setAttribute("align","left"),M.style.display="table-cell",M.setAttribute("id",i+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var L=document.createElement("br"),z=(document.createElement("br"),document.createElement("div"));z.setAttribute("id",i+"_table_little"),z.style.display="table";var q=document.createElement("div");q.setAttribute("id",i+"_element_tr1"),q.style.display="table-row";var H=document.createElement("div");H.setAttribute("id",i+"_element_tr2"),H.style.display="table-row";var N=document.createElement("div");N.setAttribute("valign","top"),N.setAttribute("id",i+"_td_little1"),N.style.display="table-cell";var S=document.createElement("div");S.setAttribute("valign","top"),S.setAttribute("id",i+"_td_little2"),S.style.display="table-cell";var D=document.createElement("span");D.setAttribute("id",i+"_element_labelform_id_temp"),D.innerHTML=e,D.setAttribute("class","label"),D.style.verticalAlign="top";var P=document.createElement("span");P.setAttribute("id",i+"_required_elementform_id_temp"),P.innerHTML="",P.setAttribute("class","required"),P.style.verticalAlign="top","yes"==m&&(P.innerHTML=" *");var O=document.createElement("select");for(O.setAttribute("id",i+"_elementform_id_temp"),O.setAttribute("name",i+"_elementform_id_temp"),O.style.cssText="width:"+d+"px",O.setAttribute("onchange","set_select(this)"),n=_.length,j=0;j<n;j++){var K=document.createElement("option");K.setAttribute("id",i+"_option"+j),y[j]?K.value="":K.setAttribute("value",r[j]),v[j]&&(w_params=v[j].split("[where_order_by]"),K.setAttribute("where",w_params[0]),w_params=w_params[1].split("[db_info]"),K.setAttribute("order_by",w_params[0]),K.setAttribute("db_info",w_params[1])),K.setAttribute("onselect","set_select('"+i+"_option"+j+"')"),K.innerHTML=_[j].replace(/"/g,"&quot;"),1==o[j]&&K.setAttribute("selected","selected"),O.appendChild(K)}var U=document.createElement("div");U.setAttribute("id",i+"_divform_id_temp");var F=document.getElementById("show_table");T.appendChild(D),T.appendChild(P),M.appendChild(x),M.appendChild(k),M.appendChild(I),M.appendChild(O),M.appendChild(U),B.appendChild(T),B.appendChild(M),C.appendChild(B),C.appendChild(L),F.appendChild(C),jQuery("#main_div").append(form_maker.type_payment_select_description),"top"==a&&label_top(i),"yes"==s&&add_quantity(i,u),change_class(c,i),refresh_attr(i,"type_text"),add_properties(i,h,b),jQuery(function(){jQuery("#choices").sortable({items:".change_pos",handle:".el_choices_sortable",update:function(e,t){refresh_paypal_fields(i,"select")}})})}function refresh_paypal_fields(d,_){if("radio"==_||"checkbox"==_){var r=document.getElementById(d+"_table_little");r.innerHTML="",jQuery(".change_pos").each(function(){var e=jQuery(this)[0].id,t=document.createElement("div");t.setAttribute("id",d+"_element_tr"+e),t.style.display="table-row";var i=document.createElement("div");i.setAttribute("valign","top"),i.setAttribute("id",d+"_td_little"+e),i.setAttribute("idi",e),i.style.display="table-cell";var a=document.createElement("input");a.setAttribute("type",_),a.setAttribute("id",d+"_elementform_id_temp"+e),a.setAttribute("value",jQuery(this).find(jQuery("#el_option_price"+e))[0].value),"checkbox"==_&&(a.setAttribute("onClick","set_checked('"+d+"','"+e+"','form_id_temp')"),a.setAttribute("name",d+"_elementform_id_temp"+e)),"radio"==_&&(a.setAttribute("onClick","set_default('"+d+"','"+e+"','form_id_temp')"),a.setAttribute("name",d+"_elementform_id_temp"));var n=document.createElement("label");n.setAttribute("id",d+"_label_element"+e),n.setAttribute("class","ch-rad-label"),n.setAttribute("for",d+"_elementform_id_temp"+e),n.innerHTML=jQuery(this).find(jQuery("#el_choices"+e))[0].value,jQuery(this).find(jQuery(".el_option_params")).val()&&(w_params=jQuery(this).find(jQuery(".el_option_params")).val().split("[where_order_by]"),n.setAttribute("where",w_params[0]),w_params=w_params[1].split("[db_info]"),n.setAttribute("order_by",w_params[0]),n.setAttribute("db_info",w_params[1]));var l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("id",d+"_elementlabel_form_id_temp"+e),l.setAttribute("name",d+"_elementform_id_temp"+e+"_label"),l.setAttribute("value",jQuery(this).find(jQuery("#el_choices"+e))[0].value),i.appendChild(a),i.appendChild(n),i.appendChild(l),t.appendChild(i),r.appendChild(t)}),document.getElementById("edit_for_flow_horizontal").checked&&flow_hor(d)}if("select"==_){var i=document.getElementById(d+"_elementform_id_temp");i.innerHTML="",jQuery(".change_pos").each(function(){var e=jQuery(this)[0].id,t=document.createElement("option");t.setAttribute("id",d+"_option"+e),jQuery(this).find(jQuery("input[type='checkbox']")).prop("checked")?t.value="":t.setAttribute("value",jQuery(this).find(jQuery("#el_option_price"+e))[0].value),jQuery(this).find(jQuery(".el_option_params")).val()&&(w_params=jQuery(this).find(jQuery(".el_option_params")).val().split("[where_order_by]"),t.setAttribute("where",w_params[0]),w_params=w_params[1].split("[db_info]"),t.setAttribute("order_by",w_params[0]),t.setAttribute("db_info",w_params[1])),t.setAttribute("onselect","set_select('"+d+"_option"+e+"')"),t.innerHTML=jQuery(this).find(jQuery("#el_option"+e))[0].value,i.appendChild(t)})}}function create_payment_relative_position(e,t,i){var a=jQuery('<label class="fm-field-label">Relative Position</label>'),n=jQuery('<input type="radio" id="edit_for_flow_vertical" name="edit_for_flow" value="ver" onchange="flow_ver('+e+')"'+("hor"==t?"":' checked="checked"')+" />"),l=jQuery('<label for="edit_for_flow_vertical">Vertical</label>'),d=jQuery('<input type="radio" id="edit_for_flow_horizontal" name="edit_for_flow" value="hor" onchange="flow_hor('+e+',)"'+("hor"==t?' checked="checked"':"")+" />"),_=jQuery('<label for="edit_for_flow_horizontal">Horizontal</label>'),r=n;return create_option_container(a,r=(r=(r=r.add(l)).add(d)).add(_))}function create_paypal_radio_options(e,t,i,a,l){var d=jQuery('<label class="fm-field-label">Options</label>'),_=jQuery('<button id="el_choices_add" class="fm-add-option button-secondary" onClick="add_choise_price(\''+l+"', "+e+'); return false;" title="Add option"><span class="field-type-button fm-add-attribute dashicons dashicons-plus-alt"></span>Option</button>');if(form_maker.is_demo)var r=jQuery('<button class="fm-add-option button-secondary" onClick="alert(\'This feature is disabled in demo.\')" title="Add options from database"><span class="field-type-button fm-add-attribute dashicons dashicons-plus-alt"></span>From Database</button>');else r=jQuery("<button class=\"fm-add-option button-secondary\" onClick=\"tb_show('', 'admin-ajax.php?action=select_data_from_db&field_id="+e+"&nonce="+fm_ajax.ajaxnonce+"&field_type=paypal_"+l+'&width=530&height=370&TB_iframe=1\'); return false;" title="Add options from database"><span class="field-type-button fm-add-attribute dashicons dashicons-plus-alt"></span>From Database</button>');var o=jQuery('<div id="choices" class="fm-width-100 ui-sortable"></div>'),m=jQuery('<div class="fm-width-100"><div class="fm-header-label fm-width-60">Product name</div><div class="fm-header-label fm-width-20">Price</div><div class="fm-header-label fm-width-10">Delete</div><div class="fm-header-label fm-width-10">Move</div></div>');for(o.append(m),n=t.length,j=0;j<n;j++){var s=jQuery('<div id="'+j+'" class="change_pos fm-width-100"><div class="fm-table-col fm-width-60"><input type="text" class="fm-field-choice" id="el_choices'+j+'" value="'+t[j].replace(/"/g,"&quot;")+'" onKeyUp="change_label(\''+e+"_label_element"+j+"', this.value); change_label_1('"+e+"_elementlabel_form_id_temp"+j+"', this.value);\""+(i[j]?' disabled="disabled"':"")+' /></div><div class="fm-table-col fm-width-20"><input type="text" class="fm-field-choice" id="el_option_price'+j+'" value="'+a[j]+'" onKeyPress="return check_isnum_point(event)" onKeyUp="change_value_price(\''+e+"_elementform_id_temp"+j+"', this.value)\""+(i[j]?' disabled="disabled"':"")+' /></div><input type="hidden" id="el_option_params'+j+'" value="'+i[j]+'" /><div class="fm-table-col fm-width-10"><span class="fm-remove-attribute dashicons dashicons-dismiss" id="el_option'+j+'_remove" onClick="remove_choise_price('+j+","+e+')"></span></div><div class="fm-table-col fm-width-10"><span class="fm-move-attribute fm-ico-draggable el_choices_sortable"></span></div></div>');o.append(s)}var u=d;return create_option_container(null,u=(u=(u=u.add(_)).add(r)).add(o))}function change_label_1(e,t){document.getElementById(e).value=t}function remove_choise_price(e,t){var i=0;document.getElementById(t+"_hor")&&(i=1,flow_ver(t));var a=document.getElementById(t+"_table_little"),n=document.getElementById(t+"_element_tr"+e);a.removeChild(n);var l=document.getElementById("choices"),d=document.getElementById(e);l.removeChild(d),1==i&&flow_hor(t)}function go_to_type_paypal_radio(e){w_choices=["product 1","product 2"],w_choices_price=["100","200"],w_choices_checked=["0","0"],w_choices_params=["","",""],w_attr_name=[],w_attr_value=[],w_property=[],w_property_values=[],type_paypal_radio(e,"Payment Single Choice","","top","right","no","ver",w_choices,w_choices_price,w_choices_checked,"no","no","no","0","",w_attr_name,w_attr_value,w_property,w_property_values,"no","1",w_choices_params)}function type_paypal_radio(i,e,t,a,l,d,_,r,o,m,s,u,c,p,f,y,h,b,v,w,g,E){jQuery("#element_type").val("type_paypal_radio"),delete_last_child();var A=jQuery("#edit_table"),x=jQuery('<div id="edit_div"></div>');A.append(x);var k=jQuery('<div id="edit_main_table"></div>');x.append(k),k.append(create_field_type("type_paypal_radio")),k.append(create_label(i,e)),k.append(create_label_position(i,a)),k.append(create_hide_label(i,d)),k.append(create_required(i,s)),k.append(create_payment_relative_position(i,_,"radio")),k.append(create_option_label_position(i,l,"radio")),k.append(create_paypal_radio_options(i,r,E,o,"radio"));var I=jQuery('<div class="inside"></div>');k.append(create_advanced_options_container(I)),I.append(create_payment_quantity(i,g,w)),I.append(create_payment_property(i)),I.append(create_field_label_size(i,t)),I.append(create_class(i,f)),I.append(create_additional_attributes(i,y,"type_paypal_radio"));var C=document.createElement("br"),B=document.createElement("input");B.setAttribute("type","hidden"),B.setAttribute("value","type_paypal_radio"),B.setAttribute("name",i+"_typeform_id_temp"),B.setAttribute("id",i+"_typeform_id_temp");var Q=document.createElement("input");Q.setAttribute("type","hidden"),Q.setAttribute("value",s),Q.setAttribute("name",i+"_requiredform_id_temp"),Q.setAttribute("id",i+"_requiredform_id_temp");var T=document.createElement("input");T.setAttribute("type","hidden"),T.setAttribute("value",d),T.setAttribute("name",i+"_hide_labelform_id_temp"),T.setAttribute("id",i+"_hide_labelform_id_temp");var M=document.createElement("input");M.setAttribute("type","hidden"),M.setAttribute("value",u),M.setAttribute("name",i+"_randomizeform_id_temp"),M.setAttribute("id",i+"_randomizeform_id_temp");var L=document.createElement("input");L.setAttribute("type","hidden"),L.setAttribute("value",c),L.setAttribute("name",i+"_allow_otherform_id_temp"),L.setAttribute("id",i+"_allow_otherform_id_temp");var z=document.createElement("input");z.setAttribute("type","hidden"),z.setAttribute("value",l),z.setAttribute("id",i+"_option_left_right");var q=document.createElement("div");q.setAttribute("id","main_div");var H=document.createElement("div");H.setAttribute("id",i+"_elemet_tableform_id_temp");var N="yes"==d?"none":"table-cell",S=document.createElement("div");S.setAttribute("align","left"),S.style.display=N,S.style.width=t+"px",S.setAttribute("id",i+"_label_sectionform_id_temp");var D=document.createElement("div");D.setAttribute("align","left"),D.style.display="table-cell",D.setAttribute("id",i+"_element_sectionform_id_temp");var P=document.createElement("div");P.style.display="table";var O=document.createElement("div");O.setAttribute("id",i+"_table_little"),O.style.display="table-row-group",P.appendChild(O);var K=document.createElement("div");K.setAttribute("id",i+"_element_tr1"),K.style.display="table-row";var U=document.createElement("div");U.setAttribute("id",i+"_element_tr2"),U.style.display="table-row";var F=document.createElement("div");F.setAttribute("valign","top"),F.setAttribute("id",i+"_td_little1"),F.style.display="table-cell";var R=document.createElement("div");R.setAttribute("valign","top"),R.setAttribute("id",i+"_td_little2"),R.style.display="table-cell";var W=document.createElement("span");W.setAttribute("id",i+"_element_labelform_id_temp"),W.innerHTML=e,W.setAttribute("class","wd_form_label"),W.style.verticalAlign="top";var V=document.createElement("span");for(V.setAttribute("id",i+"_required_elementform_id_temp"),V.innerHTML="",V.setAttribute("class","required"),V.style.verticalAlign="top","yes"==s&&(V.innerHTML=" *"),n=r.length,j=0;j<n;j++){var $=document.createElement("div");$.setAttribute("id",i+"_element_tr"+j),$.style.display="table-row";var G=document.createElement("div");G.setAttribute("valign","top"),G.setAttribute("id",i+"_td_little"+j),G.setAttribute("idi",j),G.style.display="table-cell";var Y=document.createElement("input");Y.setAttribute("type","radio"),Y.setAttribute("id",i+"_elementform_id_temp"+j),Y.setAttribute("name",i+"_elementform_id_temp"),Y.setAttribute("value",o[j]),"right"==l&&(Y.style.cssText="float: left !important"),Y.setAttribute("onclick","set_default('"+i+"','"+j+"','form_id_temp')"),"1"==m[j]&&Y.setAttribute("checked","checked");var Z=document.createElement("label");Z.setAttribute("id",i+"_label_element"+j),Z.setAttribute("class","ch-rad-label"),Z.setAttribute("for",i+"_elementform_id_temp"+j),Z.innerHTML=r[j].replace(/"/g,"&quot;"),"right"==l&&(Z.style.cssText="float: none !important"),E[j]&&(w_params=E[j].split("[where_order_by]"),Z.setAttribute("where",w_params[0]),w_params=w_params[1].split("[db_info]"),Z.setAttribute("order_by",w_params[0]),Z.setAttribute("db_info",w_params[1]));var X=document.createElement("input");X.setAttribute("type","hidden"),X.setAttribute("id",i+"_elementlabel_form_id_temp"+j),X.setAttribute("name",i+"_elementform_id_temp"+j+"_label"),X.setAttribute("value",r[j].replace(/"/g,"&quot;")),G.appendChild(Y),G.appendChild(Z),G.appendChild(X),$.appendChild(G),O.appendChild($)}var J=document.createElement("div");J.setAttribute("id",i+"_divform_id_temp");var ee=document.getElementById("show_table");S.appendChild(W),S.appendChild(V),D.appendChild(B),D.appendChild(Q),D.appendChild(T),D.appendChild(M),D.appendChild(L),D.appendChild(z),D.appendChild(P),D.appendChild(J),H.appendChild(S),H.appendChild(D),q.appendChild(H),q.appendChild(C),ee.appendChild(q),jQuery("#main_div").append(form_maker.type_payment_radio_description),"top"==a&&label_top(i),"hor"==_&&flow_hor(i),"yes"==w&&add_quantity(i,g),change_class(f,i),refresh_attr(i,"type_checkbox"),add_properties(i,b,v),jQuery(function(){jQuery("#choices").sortable({items:".change_pos",handle:".el_choices_sortable",update:function(e,t){refresh_paypal_fields(i,"radio")}})})}function go_to_type_paypal_checkbox(e){w_choices=["product 1","product 2"],w_choices_price=["100","200"],w_choices_checked=["0","0"],w_choices_params=["","",""],w_attr_name=[],w_attr_value=[],w_property=[],w_property_values=[],type_paypal_checkbox(e,"Payment Multiple Choice","","top","right","no","ver",w_choices,w_choices_price,w_choices_checked,"no","no","no","0","",w_attr_name,w_attr_value,w_property,w_property_values,"no","1",w_choices_params)}function type_paypal_checkbox(i,e,t,a,l,d,_,r,o,m,s,u,c,p,f,y,h,b,v,w,g,E){jQuery("#element_type").val("type_paypal_checkbox"),delete_last_child();var A=jQuery("#edit_table"),x=jQuery('<div id="edit_div"></div>');A.append(x);var k=jQuery('<div id="edit_main_table"></div>');x.append(k),k.append(create_field_type("type_paypal_checkbox")),k.append(create_label(i,e)),k.append(create_label_position(i,a)),k.append(create_hide_label(i,d)),k.append(create_required(i,s)),k.append(create_payment_relative_position(i,_,"checkbox")),k.append(create_option_label_position(i,l,"checkbox")),k.append(create_paypal_radio_options(i,r,E,o,"checkbox"));var I=jQuery('<div class="inside"></div>');k.append(create_advanced_options_container(I)),I.append(create_payment_quantity(i,g,w)),I.append(create_payment_property(i)),I.append(create_field_label_size(i,t)),I.append(create_class(i,f)),I.append(create_additional_attributes(i,y,"type_paypal_checkbox")),element="input",type="checkbox";var C=document.createElement("input");C.setAttribute("type","hidden"),C.setAttribute("value","type_paypal_checkbox"),C.setAttribute("name",i+"_typeform_id_temp"),C.setAttribute("id",i+"_typeform_id_temp");var B=document.createElement("input");B.setAttribute("type","hidden"),B.setAttribute("value",s),B.setAttribute("name",i+"_requiredform_id_temp"),B.setAttribute("id",i+"_requiredform_id_temp");var Q=document.createElement("input");Q.setAttribute("type","hidden"),Q.setAttribute("value",d),Q.setAttribute("name",i+"_hide_labelform_id_temp"),Q.setAttribute("id",i+"_hide_labelform_id_temp");var T=document.createElement("input");T.setAttribute("type","hidden"),T.setAttribute("value",u),T.setAttribute("name",i+"_randomizeform_id_temp"),T.setAttribute("id",i+"_randomizeform_id_temp");var M=document.createElement("input");M.setAttribute("type","hidden"),M.setAttribute("value",c),M.setAttribute("name",i+"_allow_otherform_id_temp"),M.setAttribute("id",i+"_allow_otherform_id_temp");var L=document.createElement("input");L.setAttribute("type","hidden"),L.setAttribute("value",p),L.setAttribute("name",i+"_allow_other_numform_id_temp"),L.setAttribute("id",i+"_allow_other_numform_id_temp");var z=document.createElement("input");z.setAttribute("type","hidden"),z.setAttribute("value",l),z.setAttribute("id",i+"_option_left_right");var q=document.createElement("div");q.setAttribute("id","main_div");var H=document.createElement("div");H.setAttribute("id",i+"_elemet_tableform_id_temp");var N="yes"==d?"none":"table-cell",S=document.createElement("div");S.setAttribute("align","left"),S.style.display=N,S.style.width=t+"px",S.setAttribute("id",i+"_label_sectionform_id_temp");var D=document.createElement("div");D.setAttribute("align","left"),D.style.display="table-cell",D.setAttribute("id",i+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var P=document.createElement("br"),O=(document.createElement("br"),document.createElement("div"));O.style.display="table";var K=document.createElement("div");K.setAttribute("id",i+"_table_little"),K.style.display="table-row-group",O.appendChild(K);var U=document.createElement("span");U.setAttribute("id",i+"_element_labelform_id_temp"),U.innerHTML=e,U.setAttribute("class","label"),U.style.verticalAlign="top";var F=document.createElement("span");for(F.setAttribute("id",i+"_required_elementform_id_temp"),F.innerHTML="",F.setAttribute("class","required"),F.style.verticalAlign="top","yes"==s&&(F.innerHTML=" *"),n=r.length,j=0;j<n;j++){var R=document.createElement("div");R.setAttribute("id",i+"_element_tr"+j),R.style.display="table-row";var W=document.createElement("div");W.setAttribute("valign","top"),W.setAttribute("id",i+"_td_little"+j),W.setAttribute("idi",j),W.style.display="table-cell";var V=document.createElement(element);V.setAttribute("type",type),V.setAttribute("id",i+"_elementform_id_temp"+j),V.setAttribute("name",i+"_elementform_id_temp"+j),V.setAttribute("value",o[j]),"right"==l&&(V.style.cssText="float: left !important"),"yes"==c&&j==p?(V.setAttribute("other","1"),V.setAttribute("onclick","if(set_checked('"+i+"','"+j+"','form_id_temp')) show_other_input('"+i+"','form_id_temp');")):V.setAttribute("onclick","set_checked('"+i+"','"+j+"','form_id_temp')"),"1"==m[j]&&V.setAttribute("checked","checked");var $=document.createElement("label");$.setAttribute("id",i+"_label_element"+j),$.setAttribute("class","ch-rad-label"),$.setAttribute("for",i+"_elementform_id_temp"+j),$.innerHTML=r[j].replace(/"/g,"&quot;"),"right"==l&&($.style.cssText="float: none !important"),E[j]&&(w_params=E[j].split("[where_order_by]"),$.setAttribute("where",w_params[0]),w_params=w_params[1].split("[db_info]"),$.setAttribute("order_by",w_params[0]),$.setAttribute("db_info",w_params[1]));var G=document.createElement("input");G.setAttribute("type","hidden"),G.setAttribute("id",i+"_elementlabel_form_id_temp"+j),G.setAttribute("name",i+"_elementform_id_temp"+j+"_label"),G.setAttribute("value",r[j].replace(/"/g,"&quot;")),W.appendChild(V),W.appendChild($),W.appendChild(G),R.appendChild(W),K.appendChild(R)}var Y=document.createElement("div");Y.setAttribute("id",i+"_divform_id_temp");var Z=document.getElementById("show_table");S.appendChild(U),S.appendChild(F),D.appendChild(C),D.appendChild(B),D.appendChild(Q),D.appendChild(T),D.appendChild(M),D.appendChild(L),D.appendChild(z),D.appendChild(O),D.appendChild(Y),H.appendChild(S),H.appendChild(D),q.appendChild(H),q.appendChild(P),Z.appendChild(q),jQuery("#main_div").append(form_maker.type_payment_checkbox_description),"top"==a&&label_top(i),"hor"==_&&flow_hor(i),change_class(f,i),refresh_attr(i,"type_checkbox"),"yes"==w&&add_quantity(i,g),add_properties(i,b,v),jQuery(function(){jQuery("#choices").sortable({items:".change_pos",handle:".el_choices_sortable",update:function(e,t){refresh_paypal_fields(i,"checkbox")}})})}function go_to_type_paypal_shipping(e){w_choices=["type 1","type 2"],w_choices_price=["100","200"],w_choices_checked=["0","0"],w_choices_params=["","",""],w_attr_name=[],w_attr_value=[],w_property=[],w_property_values=[],type_paypal_shipping(e,"Shipping","","top","right","no","ver",w_choices,w_choices_price,w_choices_checked,"no","no","no","0","",w_attr_name,w_attr_value,w_property,w_property_values,w_choices_params)}function type_paypal_shipping(i,e,t,a,l,d,_,r,o,m,s,u,c,p,f,y,h,b,v,w){jQuery("#element_type").val("type_paypal_shipping"),delete_last_child();var g=jQuery("#edit_table"),E=jQuery('<div id="edit_div"></div>');g.append(E);var A=jQuery('<div id="edit_main_table"></div>');E.append(A),A.append(create_field_type("type_paypal_shipping")),A.append(create_label(i,e)),A.append(create_label_position(i,a)),A.append(create_hide_label(i,d)),A.append(create_required(i,s)),A.append(create_payment_relative_position(i,_,"radio")),A.append(create_option_label_position(i,l,"radio")),A.append(create_paypal_radio_options(i,r,w,o,"radio"));var x=jQuery('<div class="inside"></div>');A.append(create_advanced_options_container(x)),x.append(create_field_label_size(i,t)),x.append(create_class(i,f)),x.append(create_additional_attributes(i,y,"type_paypal_shipping")),element="input",type="radio";var k=document.createElement("input");k.setAttribute("type","hidden"),k.setAttribute("value","type_paypal_shipping"),k.setAttribute("name",i+"_typeform_id_temp"),k.setAttribute("id",i+"_typeform_id_temp");var I=document.createElement("input");I.setAttribute("type","hidden"),I.setAttribute("value",s),I.setAttribute("name",i+"_requiredform_id_temp"),I.setAttribute("id",i+"_requiredform_id_temp");var C=document.createElement("input");C.setAttribute("type","hidden"),C.setAttribute("value",d),C.setAttribute("name",i+"_hide_labelform_id_temp"),C.setAttribute("id",i+"_hide_labelform_id_temp");var B=document.createElement("input");B.setAttribute("type","hidden"),B.setAttribute("value",u),B.setAttribute("name",i+"_randomizeform_id_temp"),B.setAttribute("id",i+"_randomizeform_id_temp");var Q=document.createElement("input");Q.setAttribute("type","hidden"),Q.setAttribute("value",c),Q.setAttribute("name",i+"_allow_otherform_id_temp"),Q.setAttribute("id",i+"_allow_otherform_id_temp");var T=document.createElement("input");T.setAttribute("type","hidden"),T.setAttribute("value",l),T.setAttribute("id",i+"_option_left_right");var M=document.createElement("div");M.setAttribute("id","main_div");var L=document.createElement("div");L.setAttribute("id",i+"_elemet_tableform_id_temp");var z="yes"==d?"none":"table-cell",q=document.createElement("div");q.setAttribute("align","left"),q.style.display=z,q.style.width=t+"px",q.setAttribute("id",i+"_label_sectionform_id_temp");var H=document.createElement("div");H.setAttribute("align","left"),H.style.display="table-cell",H.setAttribute("id",i+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var N=document.createElement("br"),S=(document.createElement("br"),document.createElement("div"));S.style.display="table";var D=document.createElement("div");D.setAttribute("id",i+"_table_little"),D.style.display="table-row-group",S.appendChild(D);var P=document.createElement("div");P.setAttribute("id",i+"_element_tr1"),P.style.display="table-row";var O=document.createElement("div");O.setAttribute("id",i+"_element_tr2"),O.style.display="table-row";var K=document.createElement("div");K.setAttribute("valign","top"),K.setAttribute("id",i+"_td_little1"),K.style.display="table-cell";var U=document.createElement("div");U.setAttribute("valign","top"),U.setAttribute("id",i+"_td_little2"),U.style.display="table-cell";var F=document.createElement("span");F.setAttribute("id",i+"_element_labelform_id_temp"),F.innerHTML=e,F.setAttribute("class","label"),F.style.verticalAlign="top";var R=document.createElement("span");for(R.setAttribute("id",i+"_required_elementform_id_temp"),R.innerHTML="",R.setAttribute("class","required"),R.style.verticalAlign="top","yes"==s&&(R.innerHTML=" *"),n=r.length,j=0;j<n;j++){var W=document.createElement("div");W.setAttribute("id",i+"_element_tr"+j),W.style.display="table-row";var V=document.createElement("td");V.setAttribute("valign","top"),V.setAttribute("id",i+"_td_little"+j),V.setAttribute("idi",j),V.style.display="table-cell";var $=document.createElement(element);$.setAttribute("type",type),$.setAttribute("id",i+"_elementform_id_temp"+j),$.setAttribute("name",i+"_elementform_id_temp"),$.setAttribute("value",o[j]),"right"==l&&($.style.cssText="float: left !important"),$.setAttribute("onclick","set_default('"+i+"','"+j+"','form_id_temp')"),"1"==m[j]&&$.setAttribute("checked","checked");var G=document.createElement("label");G.setAttribute("id",i+"_label_element"+j),G.setAttribute("class","ch-rad-label"),G.setAttribute("for",i+"_elementform_id_temp"+j),G.innerHTML=r[j].replace(/"/g,"&quot;"),"right"==l&&(G.style.cssText="float: none !important"),w[j]&&(w_params=w[j].split("[where_order_by]"),G.setAttribute("where",w_params[0]),w_params=w_params[1].split("[db_info]"),G.setAttribute("order_by",w_params[0]),G.setAttribute("db_info",w_params[1]));var Y=document.createElement("input");Y.setAttribute("type","hidden"),Y.setAttribute("id",i+"_elementlabel_form_id_temp"+j),Y.setAttribute("name",i+"_elementform_id_temp"+j+"_label"),Y.setAttribute("value",r[j].replace(/"/g,"&quot;")),V.appendChild($),V.appendChild(G),V.appendChild(Y),W.appendChild(V),D.appendChild(W)}var Z=document.createElement("div");Z.setAttribute("id",i+"_divform_id_temp");var X=document.getElementById("show_table");q.appendChild(F),q.appendChild(R),H.appendChild(k),H.appendChild(I),H.appendChild(C),H.appendChild(B),H.appendChild(Q),H.appendChild(T),H.appendChild(S),H.appendChild(Z),L.appendChild(q),L.appendChild(H),M.appendChild(L),M.appendChild(N),X.appendChild(M),jQuery("#main_div").append(form_maker.type_shipping_description),"top"==a&&label_top(i),"hor"==_&&flow_hor(i),change_class(f,i),refresh_attr(i,"type_checkbox"),add_properties(i,b,v),jQuery(function(){jQuery("#choices").sortable({items:".change_pos",handle:".el_choices_sortable",update:function(e,t){refresh_paypal_fields(i,"radio")}})})}function go_to_type_paypal_total(e){type_paypal_total(e,"Total","","top","no","","")}function type_paypal_total(e,t,i,a,n,l,d){jQuery("#element_type").val("type_paypal_total"),delete_last_child();var _=jQuery("#edit_table"),r=jQuery('<div id="edit_div"></div>');_.append(r);var o=jQuery('<div id="edit_main_table"></div>');r.append(o),o.append(create_field_type("type_paypal_total")),o.append(create_label(e,t)),o.append(create_label_position(e,a)),o.append(create_hide_label(e,n));var m=jQuery('<div class="inside"></div>');o.append(create_advanced_options_container(m)),m.append(create_field_label_size(e,i)),m.append(create_class(e,l));var s=document.createElement("input");s.setAttribute("type","hidden"),s.setAttribute("value","type_paypal_total"),s.setAttribute("name",e+"_typeform_id_temp"),s.setAttribute("id",e+"_typeform_id_temp");var u=document.createElement("input");u.setAttribute("type","hidden"),u.setAttribute("value",n),u.setAttribute("name",e+"_hide_labelform_id_temp"),u.setAttribute("id",e+"_hide_labelform_id_temp");var c=document.createElement("div");c.setAttribute("id","main_div");var p=document.createElement("div");p.setAttribute("id",e+"_elemet_tableform_id_temp");var f="yes"==n?"none":"table-cell",y=document.createElement("div");y.setAttribute("align","left"),y.style.display=f,y.style.width=i+"px",y.setAttribute("id",e+"_label_sectionform_id_temp");var h=document.createElement("div");h.setAttribute("align","left"),h.style.display="table-cell",h.setAttribute("id",e+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var b=document.createElement("br"),v=(document.createElement("br"),document.createElement("span"));v.setAttribute("id",e+"_element_labelform_id_temp"),v.innerHTML=t,v.setAttribute("class","label");var w=document.createElement("div");w.setAttribute("id",e+"paypal_totalform_id_temp"),w.setAttribute("class","wdform_paypal_total paypal_totalform_id_temp"),w.style.cssText="width:"+d+"px;";var g=document.createElement("div");g.setAttribute("id",e+"div_totalform_id_temp"),g.setAttribute("class","div_totalform_id_temp"),g.style.cssText="margin-bottom:10px;",g.innerHTML="\x3c!--repstart--\x3e$300\x3c!--repend--\x3e";var E=document.createElement("div");E.setAttribute("id",e+"paypal_productsform_id_temp"),E.setAttribute("class","paypal_productsform_id_temp"),E.style.cssText="border-spacing: 2px;";var A=document.createElement("div");A.style.cssText="border-spacing: 2px;",A.innerHTML="\x3c!--repstart--\x3eproduct 1 $100\x3c!--repend--\x3e";var j=document.createElement("div");j.style.cssText="border-spacing: 2px;",j.innerHTML="\x3c!--repstart--\x3eproduct 2 $200\x3c!--repend--\x3e";var x=document.createElement("div");x.style.cssText="border-spacing: 2px; margin-top:7px;",x.setAttribute("id",e+"paypal_taxform_id_temp"),x.setAttribute("class","paypal_taxform_id_temp");var k=document.createElement("input");k.setAttribute("type","hidden"),k.setAttribute("value",""),k.setAttribute("name",e+"_paypal_totalform_id_temp"),k.setAttribute("class","input_paypal_totalform_id_temp"),w.appendChild(k),E.appendChild(A),E.appendChild(j),w.appendChild(g),w.appendChild(E),w.appendChild(x);var I=document.getElementById("show_table"),C=k=document.createElement("p");C.style.cssText="color: red;";var B=document.createTextNode("This is sample calculation. On front-end you will see the calculation based on your Payment field values.");C.appendChild(B),y.appendChild(v),h.appendChild(u),h.appendChild(s),h.appendChild(w),p.appendChild(y),p.appendChild(h),c.appendChild(p),c.appendChild(b),c.appendChild(C),I.appendChild(c),jQuery("#main_div").append(form_maker.type_total_description),"top"==a&&label_top(e),change_class(l,e)}function create_map_locations(e){var t=jQuery('<label class="fm-field-label">Location</label>'),i=jQuery('<span class="fm-add-attribute dashicons dashicons-plus-alt" title="Add" onClick="add_marker('+e+', -1)"></span>'),a=jQuery('<div class="notice notice-info"><p>Drag the marker to change default marker position.</p></div>'),n=jQuery('<div id="markers" class="fm-width-100"></div>'),l=t;return create_option_container(null,l=(l=(l=l.add(i)).add(a)).add(n))}function add_marker(e,t,i,a,n){var l=jQuery("#markers");if(-1==t){var d=l.children().last();t=0<d.length?parseInt(d.attr("idi"))+1:0,a=i=null,n=""}var _=jQuery('<div class="fm-width-100 fm-fields-set" id="marker_opt'+t+'" idi="'+t+'"></div>'),r=jQuery('<div class="fm-width-90"></div>');r.append(create_markmap_address(e,t)),r.append(create_markmap_longitude(e,i,t)),r.append(create_markmap_latitude(e,a,t)),r.append(create_markmap_info(e,n,t)),_.append(r);var o=jQuery('<div class="fm-width-10 fm-remove-button"><span class="fm-remove-attribute dashicons dashicons-dismiss" onClick="remove_map('+e+","+t+')"></span></div>');_.append(o),l.append(_);var m=document.getElementById(e+"_elementform_id_temp");m.setAttribute("long"+t,i),m.setAttribute("lat"+t,a),m.setAttribute("info"+t,n),add_marker_on_map(e,t,i,a,n,!0)}function remove_map(e,t){table=document.getElementById("marker_opt"+t),table.parentNode.removeChild(table),map=document.getElementById(e+"_elementform_id_temp"),map.removeAttribute("long"+t),map.removeAttribute("lat"+t),map.removeAttribute("info"+t),remove_marker(e,t)}function type_map(e,t,i,a,l,d,_,r,o,m,s,u){jQuery("#element_type").val("type_map"),delete_last_child();var c=jQuery("#edit_table"),p=jQuery('<div id="edit_div"></div>');c.append(p);var f=jQuery('<div id="edit_main_table"></div>');p.append(f),f.append(create_field_type("type_map")),f.append(create_map_locations(e)),f.append(create_markmap_size(e,_,r)),f.append(create_keys(e,"To set up map key click here"));var y=jQuery('<div class="inside"></div>');f.append(create_advanced_options_container(y)),y.append(create_class(e,o)),y.append(create_additional_attributes(e,s,"type_map"));var h=document.createElement("br"),b=document.createElement("input");b.setAttribute("type","hidden"),b.setAttribute("value","type_map"),b.setAttribute("name",e+"_typeform_id_temp"),b.setAttribute("id",e+"_typeform_id_temp");var v=document.createElement("div");v.setAttribute("id",e+"_elementform_id_temp"),v.style.cssText="width:"+_+"px; height: "+r+"px;",v.setAttribute("zoom",d),v.setAttribute("center_x",t),v.setAttribute("center_y",i);var w=document.createElement("span");w.setAttribute("id",e+"_element_labelform_id_temp"),w.innerHTML="map_"+e,w.style.cssText="display:none";var g=document.createElement("div");g.setAttribute("id","main_div");var E=document.createElement("div");E.setAttribute("id",e+"_elemet_tableform_id_temp");var A=document.createElement("div");A.setAttribute("align","left"),A.style.display="table-cell",A.setAttribute("id",e+"_label_sectionform_id_temp");var x=document.createElement("div");x.setAttribute("align","left"),x.style.display="block",x.setAttribute("id",e+"_element_sectionform_id_temp");var k=document.getElementById("show_table");for(A.appendChild(w),x.appendChild(b),x.appendChild(v),E.appendChild(A),E.appendChild(x),g.appendChild(E),g.appendChild(h),k.appendChild(g),jQuery("#main_div").append(form_maker.type_map_description),change_class(o,e),refresh_attr(e,"type_text"),if_gmap_init(e),n=a.length,j=0;j<n;j++)add_marker(e,j,a[j],l[j],m[j])}function create_time_format(e,t){var i=jQuery('<label class="fm-field-label">Time Format</label>'),a=jQuery('<input type="radio" id="el_label_time_type1" name="edit_for_time_type" value="format_24" onchange="format_24('+e+')"'+("24"==t?' checked="checked"':"")+" />"),n=jQuery('<label for="el_label_time_type1">24 hour</label>'),l=jQuery('<input type="radio" id="el_label_time_type2" name="edit_for_time_type" value="format_12" onchange="format_12('+e+", 'am', '', '', '')\""+("24"==t?"":' checked="checked"')+" />"),d=jQuery('<label for="el_label_time_type2">12 hour</label>'),_=a;return create_option_container(i,_=(_=(_=_.add(n)).add(l)).add(d))}function format_24(e){tr_time1=document.getElementById(e+"_tr_time1"),td1=document.getElementById(e+"_am_pm_select"),tr_time2=document.getElementById(e+"_tr_time2"),td2=document.getElementById(e+"_am_pm_label"),tr_time1.removeChild(td1),tr_time2.removeChild(td2),document.getElementById(e+"_hhform_id_temp").value="",document.getElementById(e+"_mmform_id_temp").value="",document.getElementById(e+"_ssform_id_temp")&&(document.getElementById(e+"_ssform_id_temp").value="")}function format_12(t,e,i,a,n){tr_time1=document.getElementById(t+"_tr_time1"),tr_time2=document.getElementById(t+"_tr_time2");var l=document.createElement("div");l.setAttribute("id",t+"_am_pm_select"),l.setAttribute("class","td_am_pm_select"),l.style.display="table-cell";var d=document.createElement("div");d.setAttribute("id",t+"_am_pm_label"),d.setAttribute("class","td_am_pm_select"),d.style.display="table-cell";var _=document.createElement("select");_.setAttribute("class","am_pm_select"),_.setAttribute("name",t+"_am_pmform_id_temp"),_.setAttribute("id",t+"_am_pmform_id_temp"),_.setAttribute("onchange","set_sel_am_pm(this)");var r=document.createElement("option");r.setAttribute("value","am"),r.innerHTML="AM";var o=document.createElement("option");o.setAttribute("value","pm"),o.innerHTML="PM","pm"==e?o.setAttribute("selected","selected"):r.setAttribute("selected","selected");var m=document.createElement("label");m.setAttribute("class","mini_label"),m.setAttribute("id",t+"_mini_label_am_pm"),m.innerHTML=w_mini_labels[3],_.appendChild(r),_.appendChild(o),l.appendChild(_),d.appendChild(m),tr_time1.appendChild(l),tr_time2.appendChild(d),document.getElementById(t+"_hhform_id_temp").value=i,document.getElementById(t+"_mmform_id_temp").value=a,document.getElementById(t+"_ssform_id_temp")&&(document.getElementById(t+"_ssform_id_temp").value=n),refresh_attr(t,"type_time"),jQuery(document).ready(function(){jQuery("label#"+t+"_mini_label_am_pm").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='am_pm' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.am_pm").focus(),jQuery("input.am_pm").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_am_pm").text(e)})}})})}function create_display_seconds(e,t,i){var a=jQuery('<label class="fm-field-label">Display Seconds</label>'),n=jQuery('<input type="radio" id="el_second_yes" name="edit_for_time_second" value="yes" onchange="second_yes('+e+",'"+t+"')\""+("1"==i?' checked="checked"':"")+" />"),l=jQuery('<label for="el_second_yes">Yes</label>'),d=jQuery('<input type="radio" id="el_second_no" name="edit_for_time_second" value="no" onchange="second_no('+e+')"'+("1"==i?"":' checked="checked"')+" />"),_=jQuery('<label for="el_second_no">No</label>'),r=n;return create_option_container(a,r=(r=(r=r.add(l)).add(d)).add(_))}function second_yes(t,e){time_box=document.getElementById(t+"_tr_time1"),text_box=document.getElementById(t+"_tr_time2");var i=document.createElement("div");i.setAttribute("align","center"),i.style.display="table-cell";var a=document.createElement("div");a.setAttribute("id",t+"_td_time_input3"),a.style.display="table-cell";var n=document.createElement("div");n.style.display="table-cell";var l=document.createElement("div");l.setAttribute("id",t+"_td_time_label3"),l.style.display="table-cell";var d=document.createElement("span");d.setAttribute("class","wdform_colon"),d.style.cssText="font-style:bold; vertical-align:middle",d.innerHTML="&nbsp;:&nbsp;",i.appendChild(d);var _=document.createElement("input");_.setAttribute("type","text"),_.setAttribute("value",e),_.setAttribute("class","time_box"),_.setAttribute("id",t+"_ssform_id_temp"),_.setAttribute("name",t+"_ssform_id_temp"),_.setAttribute("onBlur","add_0('"+t+"_ssform_id_temp')");var r=document.createElement("label");r.setAttribute("class","mini_label"),r.innerHTML="SS",r.setAttribute("id",t+"_mini_label_ss"),a.appendChild(_),l.appendChild(r),document.getElementById(t+"_am_pm_select")?(select_=document.getElementById(t+"_am_pm_select"),select_text=document.getElementById(t+"_am_pm_label"),time_box.insertBefore(a,select_),time_box.insertBefore(i,a),text_box.insertBefore(l,select_text),text_box.insertBefore(n,l)):(time_box.appendChild(i),time_box.appendChild(a),text_box.appendChild(n),text_box.appendChild(l)),jQuery(document).ready(function(){jQuery("label#"+t+"_mini_label_ss").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='ss' style='outline:none; border:none; background:none; width:40px;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.ss").focus(),jQuery("input.ss").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_ss").text(e)})}})}),refresh_attr(t,"type_time")}function second_no(e){time_box=document.getElementById(e+"_tr_time1"),text_box=document.getElementById(e+"_tr_time2"),second_box=document.getElementById(e+"_td_time_input3"),second_text=document.getElementById(e+"_td_time_label3"),document.getElementById(e+"_td_time_input2").parentNode.removeChild(document.getElementById(e+"_td_time_input2").nextSibling),time_box.removeChild(second_box),text_box.removeChild(second_text.previousSibling),text_box.removeChild(second_text)}function go_to_type_time(e){w_attr_name=[],w_attr_value=[],w_mini_labels=["HH","MM","SS","AM/PM"],type_time(e,"Time","","top","no","24","0","1","","","",w_mini_labels,"no","",w_attr_name,w_attr_value)}function type_time(t,e,i,a,n,l,d,_,r,o,m,s,u,c,p,f){jQuery("#element_type").val("type_time"),delete_last_child();var y=jQuery("#edit_table"),h=jQuery('<div id="edit_div"></div>');y.append(h);var b=jQuery('<div id="edit_main_table"></div>');h.append(b),b.append(create_field_type("type_time")),b.append(create_label(t,e)),b.append(create_label_position(t,a)),b.append(create_time_format(t,l)),b.append(create_display_seconds(t,m,_)),b.append(create_hide_label(t,n)),b.append(create_required(t,u));var v=jQuery('<div class="inside"></div>');b.append(create_advanced_options_container(v)),v.append(create_field_label_size(t,i)),v.append(create_class(t,c)),v.append(create_additional_attributes(t,p,"type_time"));var w=document.createElement("input");w.setAttribute("type","hidden"),w.setAttribute("value","type_time"),w.setAttribute("name",t+"_typeform_id_temp"),w.setAttribute("id",t+"_typeform_id_temp");var g=document.createElement("input");g.setAttribute("type","hidden"),g.setAttribute("value",u),g.setAttribute("name",t+"_requiredform_id_temp");var E=document.createElement("input");E.setAttribute("type","hidden"),E.setAttribute("value",n),E.setAttribute("name",t+"_hide_labelform_id_temp"),E.setAttribute("id",t+"_hide_labelform_id_temp"),g.setAttribute("id",t+"_requiredform_id_temp");var A=document.createElement("div");A.setAttribute("id","main_div");var j=document.createElement("div");j.setAttribute("class","fm-editable-label"),edit_labels=document.createTextNode("The labels of the fields are editable. Please, click on the label to edit."),j.appendChild(edit_labels);var x=document.createElement("div");x.setAttribute("id",t+"_elemet_tableform_id_temp");var k="yes"==n?"none":"table-cell",I=document.createElement("div");I.setAttribute("align","left"),I.style.display=k,I.style.width=i+"px",I.setAttribute("id",t+"_label_sectionform_id_temp");var C=document.createElement("div");C.setAttribute("align","left"),C.style.display="table-cell",C.setAttribute("id",t+"_element_sectionform_id_temp");var B=document.createElement("div");B.setAttribute("id",t+"_table_time"),B.style.display="table";var Q=document.createElement("div");Q.setAttribute("id",t+"_tr_time1"),Q.style.display="table-row";var T=document.createElement("div");T.setAttribute("id",t+"_tr_time2"),T.style.display="table-row";var M=document.createElement("div");M.setAttribute("id",t+"_td_time_input1"),M.style.cssText="width:32px",M.style.display="table-cell";var L=document.createElement("div");L.setAttribute("align","center"),L.style.display="table-cell";var z=document.createElement("div");z.setAttribute("id",t+"_td_time_input2"),z.style.cssText="width:32px",z.style.display="table-cell";var q=document.createElement("div");q.setAttribute("align","center"),q.style.display="table-cell";var H=document.createElement("div");H.setAttribute("id",t+"_td_time_input3"),H.style.cssText="width:32px",H.style.display="table-cell";var N=document.createElement("div");N.setAttribute("id",t+"_td_time_label1"),N.style.display="table-cell";var S=document.createElement("div");S.style.display="table-cell";var D=document.createElement("div");D.setAttribute("id",t+"_td_time_label2"),D.style.display="table-cell";var P=document.createElement("div");P.style.display="table-cell";var O=document.createElement("div");O.setAttribute("id",t+"_td_time_label3"),O.style.display="table-cell";document.createElement("br"),document.createElement("br");var K=document.createElement("br"),U=(document.createElement("br"),document.createElement("span"));U.setAttribute("id",t+"_element_labelform_id_temp"),U.innerHTML=e,U.setAttribute("class","label"),U.style.verticalAlign="top";var F=document.createElement("span");F.setAttribute("id",t+"_required_elementform_id_temp"),F.innerHTML="",F.setAttribute("class","required"),F.style.verticalAlign="top","yes"==u&&(F.innerHTML=" *");var R=document.createElement("input");R.setAttribute("type","text"),R.setAttribute("value",r),R.setAttribute("class","time_box"),R.setAttribute("id",t+"_hhform_id_temp"),R.setAttribute("name",t+"_hhform_id_temp"),R.setAttribute("onBlur","add_0('"+t+"_hhform_id_temp')");var W=document.createElement("label");W.setAttribute("class","mini_label"),W.setAttribute("id",t+"_mini_label_hh"),W.innerHTML=s[0];var V=document.createElement("span");V.setAttribute("class","wdform_colon"),V.style.cssText="font-style:bold; vertical-align:middle",V.innerHTML="&nbsp;:&nbsp;";var $=document.createElement("input");$.setAttribute("type","text"),$.setAttribute("value",o),$.setAttribute("class","time_box"),$.setAttribute("id",t+"_mmform_id_temp"),$.setAttribute("name",t+"_mmform_id_temp"),$.setAttribute("onBlur","add_0('"+t+"_mmform_id_temp')");var G=document.createElement("label");G.setAttribute("class","mini_label"),G.setAttribute("id",t+"_mini_label_mm"),G.innerHTML=s[1];var Y=document.createElement("span");Y.style.cssText="font-style:bold; vertical-align:middle",Y.innerHTML="&nbsp;:&nbsp;",Y.setAttribute("class","wdform_colon");var Z=document.createElement("input");Z.setAttribute("type","text"),Z.setAttribute("value",m),Z.setAttribute("class","time_box"),Z.setAttribute("id",t+"_ssform_id_temp"),Z.setAttribute("name",t+"_ssform_id_temp"),Z.setAttribute("onBlur","add_0('"+t+"_ssform_id_temp')");var X=document.createElement("label");X.setAttribute("class","mini_label"),X.setAttribute("id",t+"_mini_label_ss"),X.innerHTML=s[2];var J=document.getElementById("show_table");I.appendChild(U),I.appendChild(F),M.appendChild(R),L.appendChild(V),z.appendChild($),q.appendChild(Y),H.appendChild(Z),Q.appendChild(M),Q.appendChild(L),Q.appendChild(z),Q.appendChild(q),Q.appendChild(H),N.appendChild(W),D.appendChild(G),O.appendChild(X),T.appendChild(N),T.appendChild(S),T.appendChild(D),T.appendChild(P),T.appendChild(O),B.appendChild(Q),B.appendChild(T),C.appendChild(w),C.appendChild(g),C.appendChild(E),C.appendChild(B),x.appendChild(I),x.appendChild(C),A.appendChild(x),A.appendChild(K),A.appendChild(j),J.appendChild(A),jQuery("#main_div").append("<br>"+form_maker.type_time_description),"top"==a&&label_top(t),"12"==l&&format_12(t,d,r,o,m),"0"==_&&second_no(t),change_class(c,t),refresh_attr(t,"type_time"),jQuery(document).ready(function(){jQuery("label#"+t+"_mini_label_hh").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='hh' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.hh").focus(),jQuery("input.hh").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_hh").text(e)})}}),jQuery("label#"+t+"_mini_label_mm").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='mm' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.mm").focus(),jQuery("input.mm").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_mm").text(e)})}}),jQuery("label#"+t+"_mini_label_ss").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='ss' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.ss").focus(),jQuery("input.ss").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_ss").text(e)})}})})}function go_to_type_send_copy(e){if(0!=jQuery("#take").find(jQuery("div[type='type_send_copy']")).length)return alert("This field already has been created."),void delete_last_child();w_attr_name=[],type_send_copy(e,"Send a copy of this message to yourself","","top","no",!(w_attr_value=[]),"no",w_attr_name,w_attr_value)}function type_send_copy(e,t,i,a,n,l,d,_,r){jQuery("#element_type").val("type_send_copy"),delete_last_child();var o=jQuery("#edit_table"),m=jQuery('<div id="edit_div"></div>');o.append(m);var s=jQuery('<div id="edit_main_table"></div>');m.append(s),s.append(create_field_type("type_send_copy")),s.append(create_label(e,t)),s.append(create_hide_label(e,n)),s.append(create_required(e,d));var u=jQuery('<div class="inside"></div>');s.append(create_advanced_options_container(u)),u.append(create_field_label_size(e,i)),u.append(create_additional_attributes(e,_,"type_send_copy")),element="input",type="checkbox";var c=document.createElement("input");c.setAttribute("type","hidden"),c.setAttribute("value","type_send_copy"),c.setAttribute("name",e+"_typeform_id_temp"),c.setAttribute("id",e+"_typeform_id_temp");var p=document.createElement("input");p.setAttribute("type","hidden"),p.setAttribute("value",d),p.setAttribute("name",e+"_requiredform_id_temp"),p.setAttribute("id",e+"_requiredform_id_temp");var f=document.createElement("input");f.setAttribute("type","hidden"),f.setAttribute("value",n),f.setAttribute("name",e+"_hide_labelform_id_temp"),f.setAttribute("id",e+"_hide_labelform_id_temp");var y=document.createElement(element);y.setAttribute("type",type),l&&y.setAttribute("checked","checked"),y.setAttribute("id",e+"_elementform_id_temp"),y.setAttribute("name",e+"_elementform_id_temp"),y.setAttribute("onclick","set_checked('"+e+"','','form_id_temp')");var h=document.createElement("div");h.setAttribute("id","main_div");var b=document.createElement("div");b.setAttribute("class","fm-editable-label"),edit_labels=document.createTextNode("Use the field to allow the user to choose whether to receive a copy of the submitted form or not. Do not forget to fill in User Email section in Email Options in advance."),b.appendChild(edit_labels);var v=document.createElement("div");v.setAttribute("id",e+"_elemet_tableform_id_temp");var w="yes"==n?"none":"table-cell",g=document.createElement("div");g.setAttribute("align","left"),g.style.display=w,g.style.width=i+"px",g.setAttribute("id",e+"_label_sectionform_id_temp");var E=document.createElement("div");E.setAttribute("align","left"),E.style.display="table-cell",E.setAttribute("id",e+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var A=document.createElement("br"),j=(document.createElement("br"),document.createElement("span"));j.setAttribute("id",e+"_element_labelform_id_temp"),j.innerHTML=t,j.setAttribute("class","label"),j.style.verticalAlign="top";var x=document.createElement("span");x.setAttribute("id",e+"_required_elementform_id_temp"),x.innerHTML="",x.setAttribute("class","required"),x.style.verticalAlign="top","yes"==d&&(x.innerHTML=" *");var k=document.getElementById("show_table");g.appendChild(j),g.appendChild(x),E.appendChild(c),E.appendChild(p),E.appendChild(f),E.appendChild(y),v.appendChild(g),v.appendChild(E),h.appendChild(v),h.appendChild(A),h.appendChild(b),k.appendChild(h),jQuery("#main_div").append("<br>"+form_maker.type_send_copy_description),"top"==a&&label_top(e),refresh_attr(e,"type_text")}function create_default_date_range(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="default_date_start">Default range</label>'),jQuery('<input type="text" class="fm-width-40" id="default_date_start" onKeyUp="change_hidden_input_value_range(this.value, \'default_date\', \'start\', '+e+", '"+e+'_default_date_id_temp_start\')" value="'+t+'" />-<input type="text" class="fm-width-40" id="default_date_end" onKeyUp="change_hidden_input_value_range(this.value, \'default_date\', \'end\', '+e+", '"+e+'_default_date_id_temp_end\')" value="'+i+'" />'))}function change_hidden_input_value_range(element_value,date_fields,start_end,id_int,id,new_element_value){if(void 0===new_element_value)var new_element_value=element_value;document.getElementById(id).value=new_element_value;var element_value_new=element_value;if("default_date"==date_fields)if("start"==start_end)if("today"==element_value)jQuery("#"+id_int+"_elementform_id_temp0").datepicker("setDate",new Date),jQuery("#"+id_int+"_elementform_id_temp1").datepicker("option","minDate",new Date);else if(-1==element_value.indexOf("d")&&-1==element_value.indexOf("m")&&-1==element_value.indexOf("y")&&-1==element_value.indexOf("w"))if(""!==element_value)element_value=jQuery.datepicker.formatDate(jQuery("#"+id_int+"_buttonform_id_temp").attr("format"),new Date(element_value)),jQuery("#"+id_int+"_elementform_id_temp0").datepicker("setDate",element_value),jQuery("#"+id_int+"_elementform_id_temp1").datepicker("option","minDate",element_value);else{jQuery("#"+id_int+"_elementform_id_temp0").datepicker("setDate",element_value),date_fields="minDate";var element_value=jQuery("#min_date").val();change_hidden_input_value_range(element_value,date_fields,start_end,id_int,id,element_value_new)}else jQuery("#"+id_int+"_elementform_id_temp0").datepicker("setDate",element_value),jQuery("#"+id_int+"_elementform_id_temp1").datepicker("option","minDate",element_value);else"today"==element_value?(jQuery("#"+id_int+"_elementform_id_temp1").datepicker("setDate",new Date),jQuery("#"+id_int+"_elementform_id_temp0").datepicker("option","maxDate",new Date)):-1==element_value.indexOf("d")&&-1==element_value.indexOf("m")&&-1==element_value.indexOf("y")&&-1==element_value.indexOf("w")?""!==element_value?(element_value=jQuery.datepicker.formatDate(jQuery("#"+id_int+"_buttonform_id_temp").attr("format"),new Date(element_value)),jQuery("#"+id_int+"_elementform_id_temp1").datepicker("setDate",element_value),jQuery("#"+id_int+"_elementform_id_temp0").datepicker("option","maxDate",new Date(element_value))):(jQuery("#"+id_int+"_elementform_id_temp1").datepicker("setDate",element_value),date_fields="maxDate",element_value=jQuery("#max_date").val(),change_hidden_input_value_range(element_value,date_fields,start_end,id_int,id,element_value_new)):(jQuery("#"+id_int+"_elementform_id_temp1").datepicker("setDate",element_value),jQuery("#"+id_int+"_elementform_id_temp0").datepicker("option","maxDate",element_value));"minDate"!=date_fields&&"maxDate"!=date_fields||("today"==element_value?("minDate"==date_fields&&""==jQuery("#default_date_start").val()&&(jQuery("#"+id_int+"_elementform_id_temp0").datepicker("option",date_fields,new Date),jQuery("#"+id_int+"_elementform_id_temp1").datepicker("option",date_fields,new Date)),"minDate"==date_fields&&""!=jQuery("#default_date_start").val()&&(jQuery("#"+id_int+"_elementform_id_temp0").datepicker("option",date_fields,new Date),element_value=jQuery("#default_date_start").val(),date_fields="default_date",start_end="start",change_hidden_input_value_range(element_value,date_fields,start_end,id_int,id,element_value_new)),"maxDate"==date_fields&&""==jQuery("#default_date_end").val()&&(jQuery("#"+id_int+"_elementform_id_temp0").datepicker("option",date_fields,new Date),jQuery("#"+id_int+"_elementform_id_temp1").datepicker("option",date_fields,new Date)),"maxDate"==date_fields&&""!=jQuery("#default_date_end").val()&&(jQuery("#"+id_int+"_elementform_id_temp1").datepicker("option",date_fields,new Date),element_value=jQuery("#default_date_end").val(),date_fields="default_date",start_end="end",change_hidden_input_value_range(element_value,date_fields,start_end,id_int,id,element_value_new))):(-1==element_value.indexOf("d")&&-1==element_value.indexOf("m")&&-1==element_value.indexOf("w")&&-1==element_value.indexOf("y")&&""!==element_value&&(element_value=jQuery.datepicker.formatDate(jQuery("#"+id_int+"_buttonform_id_temp").attr("format"),new Date(element_value))),("minDate"==date_fields&&""==jQuery("#default_date_start").val()||"maxDate"==date_fields&&""==jQuery("#default_date_end").val())&&(jQuery("#"+id_int+"_elementform_id_temp0").datepicker("option",date_fields,element_value),jQuery("#"+id_int+"_elementform_id_temp1").datepicker("option",date_fields,element_value)),"minDate"==date_fields&&""!=jQuery("#default_date_start").val()&&(jQuery("#"+id_int+"_elementform_id_temp0").datepicker("option",date_fields,element_value),element_value=jQuery("#default_date_start").val(),date_fields="default_date",start_end="start",change_hidden_input_value_range(element_value,date_fields,start_end,id_int,id,element_value_new)),"maxDate"==date_fields&&""!=jQuery("#default_date_end").val()&&(jQuery("#"+id_int+"_elementform_id_temp1").datepicker("option",date_fields,element_value),element_value=jQuery("#default_date_end").val(),date_fields="default_date",start_end="end",change_hidden_input_value_range(element_value,date_fields,start_end,id_int,id,element_value_new)))),"invalide_date"==date_fields&&jQuery("input[id^="+id_int+"_elementform_id_temp]").datepicker("option","beforeShowDay",function(date){for(var invalid_dates=element_value,invalid_dates_finish=[],invalid_dates_start=invalid_dates.split(","),invalid_date_range=[],i=0;i<invalid_dates_start.length;i++)if(invalid_dates_start[i]=invalid_dates_start[i].trim(),invalid_dates_start[i].length<11)invalid_dates_finish.push(invalid_dates_start[i]);else if(4<invalid_dates_start[i].indexOf("-"))invalid_date_range.push(invalid_dates_start[i].split("-"));else{var invalid_date_array=invalid_dates_start[i].split("-"),start_invalid_day=invalid_date_array[0]+"-"+invalid_date_array[1]+"-"+invalid_date_array[2],end_invalid_day=invalid_date_array[3]+"-"+invalid_date_array[4]+"-"+invalid_date_array[5];invalid_date_range.push([start_invalid_day,end_invalid_day])}jQuery.each(invalid_date_range,function(e,t){for(var i=new Date(t[0]);i<=new Date(t[1]);i.setDate(i.getDate()+1))invalid_dates_finish.push(jQuery.datepicker.formatDate("mm/dd/yy",i))});var w_hide_sunday="yes"==jQuery("#"+id_int+"_show_week_days").attr("sunday")?"true":"day != 0",w_hide_monday="yes"==jQuery("#"+id_int+"_show_week_days").attr("monday")?"true":"day != 1",w_hide_tuesday="yes"==jQuery("#"+id_int+"_show_week_days").attr("tuesday")?"true":"day != 2",w_hide_wednesday="yes"==jQuery("#"+id_int+"_show_week_days").attr("wednesday")?"true":"day != 3",w_hide_thursday="yes"==jQuery("#"+id_int+"_show_week_days").attr("thursday")?"true":"day != 4",w_hide_friday="yes"==jQuery("#"+id_int+"_show_week_days").attr("friday")?"true":"day != 5",w_hide_saturday="yes"==jQuery("#"+id_int+"_show_week_days").attr("saturday")?"true":"day != 6",day=date.getDay(),string_days=jQuery.datepicker.formatDate("mm/dd/yy",date);return[-1==invalid_dates_finish.indexOf(string_days)&&eval(w_hide_sunday)&&eval(w_hide_monday)&&eval(w_hide_tuesday)&&eval(w_hide_wednesday)&&eval(w_hide_thursday)&&eval(w_hide_friday)&&eval(w_hide_saturday)]})}function go_to_type_date_range(e){w_attr_name=[],w_attr_value=[],w_show_days=["yes","yes","yes","yes","yes","yes","yes"],type_date_range(e,"Date range","","top","no","","","no","no","","mm/dd/yy","0","","","","","",w_show_days,"yes","...",w_attr_name,w_attr_value,"no")}function type_date_range(i,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_size,w_date,w_required,w_show_image,w_class,w_format,w_start_day,w_default_date_start,w_default_date_end,w_min_date,w_max_date,w_invalid_dates,w_show_days,w_hide_time,w_but_val,w_attr_name,w_attr_value,w_disable_past_days){jQuery("#element_type").val("type_date_range"),delete_last_child();var t=jQuery("#edit_table"),edit_div=jQuery('<div id="edit_div"></div>');t.append(edit_div);var edit_main_table=jQuery('<div id="edit_main_table"></div>');edit_div.append(edit_main_table),edit_main_table.append(create_field_type("type_date_range")),edit_main_table.append(create_label(i,w_field_label)),edit_main_table.append(create_label_position(i,w_field_label_pos)),edit_main_table.append(create_hide_label(i,w_hide_label)),edit_main_table.append(create_required(i,w_required)),edit_main_table.append(create_field_size(i,w_size,"'"+i+"_elementform_id_temp0'","'"+i+"_elementform_id_temp1'")),edit_main_table.append(create_date_format(i,w_format)),edit_main_table.append(create_week_start(i,w_start_day));var advanced_options_container=jQuery('<div class="inside"></div>');edit_main_table.append(create_advanced_options_container(advanced_options_container)),advanced_options_container.append(create_default_date_range(i,w_default_date_start,w_default_date_end)),advanced_options_container.append(create_minimum_date(i,w_min_date,!0)),advanced_options_container.append(create_maximum_date(i,w_max_date,!0)),advanced_options_container.append(create_excluded_dates(i,w_invalid_dates,!0)),advanced_options_container.append(create_selectable_week_days(i,w_show_days)),advanced_options_container.append(create_field_label_size(i,w_field_label_size)),advanced_options_container.append(create_class(i,w_class)),advanced_options_container.append(create_show_date_picker_button(i,w_show_image,"date_range")),advanced_options_container.append(create_additional_attributes(i,w_attr_name,"type_date_range"));var adding_type=document.createElement("input");adding_type.setAttribute("type","hidden"),adding_type.setAttribute("value","type_date_range"),adding_type.setAttribute("name",i+"_typeform_id_temp"),adding_type.setAttribute("id",i+"_typeform_id_temp");var adding_required=document.createElement("input");adding_required.setAttribute("type","hidden"),adding_required.setAttribute("value",w_required),adding_required.setAttribute("name",i+"_requiredform_id_temp"),adding_required.setAttribute("id",i+"_requiredform_id_temp");var adding_hide_label=document.createElement("input");adding_hide_label.setAttribute("type","hidden"),adding_hide_label.setAttribute("value",w_hide_label),adding_hide_label.setAttribute("name",i+"_hide_labelform_id_temp"),adding_hide_label.setAttribute("id",i+"_hide_labelform_id_temp");var adding_dis_past_days=document.createElement("input");adding_dis_past_days.setAttribute("type","hidden"),adding_dis_past_days.setAttribute("value",w_disable_past_days),adding_dis_past_days.setAttribute("id",i+"_dis_past_daysform_id_temp"),adding_dis_past_days.setAttribute("name",i+"_dis_past_daysform_id_temp");var adding_start_day=document.createElement("input");adding_start_day.setAttribute("type","hidden"),adding_start_day.setAttribute("value",w_start_day),adding_start_day.setAttribute("name",i+"_start_dayform_id_temp"),adding_start_day.setAttribute("id",i+"_start_dayform_id_temp");var adding_default_date_start=document.createElement("input");adding_default_date_start.setAttribute("type","hidden"),adding_default_date_start.setAttribute("name",i+"_default_date_id_temp_start"),adding_default_date_start.setAttribute("id",i+"_default_date_id_temp_start"),adding_default_date_start.setAttribute("value",w_default_date_start);var adding_default_date_end=document.createElement("input");adding_default_date_end.setAttribute("type","hidden"),adding_default_date_end.setAttribute("name",i+"_default_date_id_temp_end"),adding_default_date_end.setAttribute("id",i+"_default_date_id_temp_end"),adding_default_date_end.setAttribute("value",w_default_date_end);var adding_min_date=document.createElement("input");adding_min_date.setAttribute("type","hidden"),adding_min_date.setAttribute("name",i+"_min_date_id_temp"),adding_min_date.setAttribute("id",i+"_min_date_id_temp"),adding_min_date.setAttribute("value",w_min_date);var adding_max_date=document.createElement("input");adding_max_date.setAttribute("type","hidden"),adding_max_date.setAttribute("name",i+"_max_date_id_temp"),adding_max_date.setAttribute("id",i+"_max_date_id_temp"),adding_max_date.setAttribute("value",w_max_date);var adding_invalid_dates=document.createElement("input");adding_invalid_dates.setAttribute("type","hidden"),adding_invalid_dates.setAttribute("name",i+"_invalid_dates_id_temp"),adding_invalid_dates.setAttribute("id",i+"_invalid_dates_id_temp"),adding_invalid_dates.setAttribute("value",w_invalid_dates);var adding_show_days=document.createElement("input");adding_show_days.setAttribute("type","hidden"),adding_show_days.setAttribute("name",i+"_show_week_days"),adding_show_days.setAttribute("id",i+"_show_week_days"),adding_show_days.setAttribute("sunday",w_show_days[0]),adding_show_days.setAttribute("monday",w_show_days[1]),adding_show_days.setAttribute("tuesday",w_show_days[2]),adding_show_days.setAttribute("wednesday",w_show_days[3]),adding_show_days.setAttribute("thursday",w_show_days[4]),adding_show_days.setAttribute("friday",w_show_days[5]),adding_show_days.setAttribute("saturday",w_show_days[6]);var adding_show_image=document.createElement("input");adding_show_image.setAttribute("type","hidden"),adding_show_image.setAttribute("value",w_show_image),adding_show_image.setAttribute("name",i+"_show_imageform_id_temp"),adding_show_image.setAttribute("id",i+"_show_imageform_id_temp");var adding_hide_time=document.createElement("input");adding_hide_time.setAttribute("type","hidden"),adding_hide_time.setAttribute("value",w_hide_time),adding_hide_time.setAttribute("name",i+"_hide_timeform_id_temp"),adding_hide_time.setAttribute("id",i+"_hide_timeform_id_temp");var div=document.createElement("div");div.setAttribute("id","main_div");var div_field=document.createElement("div");div_field.setAttribute("id",i+"_elemet_tableform_id_temp");var display_label_div="yes"==w_hide_label?"none":"table-cell",div_label=document.createElement("div");div_label.setAttribute("align","left"),div_label.style.display=display_label_div,div_label.style.width=w_field_label_size+"px",div_label.setAttribute("id",i+"_label_sectionform_id_temp");var div_element=document.createElement("div");div_element.setAttribute("align","left"),div_element.style.display="table-cell",div_element.style.position="relative",div_element.setAttribute("id",i+"_element_sectionform_id_temp");var table_date=document.createElement("div");table_date.setAttribute("id",i+"_table_date"),table_date.style.display="table";var tr_date1=document.createElement("div");tr_date1.setAttribute("id",i+"_tr_date1"),tr_date1.style.display="table-row";var tr_date2=document.createElement("div");tr_date2.setAttribute("id",i+"_tr_date2"),tr_date2.style.display="table-row";var td_date_input1=document.createElement("div");td_date_input1.setAttribute("id",i+"_td_date_input1"),td_date_input1.style.display="table-cell";var td_date_input2=document.createElement("div");td_date_input2.setAttribute("id",i+"_td_date_input2"),td_date_input2.style.display="table-cell";var td_date_input3=document.createElement("div");td_date_input3.setAttribute("id",i+"_td_date_input3"),td_date_input3.style.display="table-cell";var td_date_label1=document.createElement("div");td_date_label1.setAttribute("id",i+"_td_date_label1"),td_date_label1.style.display="table-cell";var td_date_label2=document.createElement("div");td_date_label2.setAttribute("id",i+"_td_date_label2"),td_date_label2.style.display="table-cell";var td_date_label3=document.createElement("div");td_date_label3.setAttribute("id",i+"_td_date_label3"),td_date_label3.style.display="table-cell";var br3=document.createElement("br"),br4=document.createElement("br"),label=document.createElement("span");label.setAttribute("id",i+"_element_labelform_id_temp"),label.innerHTML=w_field_label,label.setAttribute("class","label"),label.style.verticalAlign="top";var required=document.createElement("span");required.setAttribute("id",i+"_required_elementform_id_temp"),required.innerHTML="",required.setAttribute("class","required"),required.style.verticalAlign="top","yes"==w_required&&(required.innerHTML=" *");var adding=document.createElement("input");adding.setAttribute("type","text"),adding.setAttribute("value",w_date),adding.setAttribute("id",i+"_elementform_id_temp0"),adding.setAttribute("name",i+"_elementform_id_temp0"),adding.style.cssText="width:"+w_size+"px;";var adding_desc_p=document.createElement("p"),adding_desc_b=document.createElement("b"),text_format_1=document.createTextNode("The format can be combinations of the following:"),text_format_2=document.createTextNode("d - day of month (no leading zero)"),text_format_3=document.createTextNode("dd - day of month (two digit)"),text_format_4=document.createTextNode("o - day of the year (no leading zeros)"),text_format_5=document.createTextNode("oo - day of the year (three digit)"),text_format_6=document.createTextNode("D - day name short"),text_format_7=document.createTextNode("DD - day name long"),text_format_8=document.createTextNode("m - month of year (no leading zero)"),text_format_9=document.createTextNode("mm - month of year (two digit)"),text_format_10=document.createTextNode("M - month name short"),text_format_11=document.createTextNode("MM - month name long"),text_format_12=document.createTextNode("y - year (two digit)"),text_format_13=document.createTextNode("yy - year (four digit)"),format_br_1=document.createElement("br"),format_br_2=document.createElement("br"),format_br_3=document.createElement("br"),format_br_4=document.createElement("br"),format_br_5=document.createElement("br"),format_br_6=document.createElement("br"),format_br_7=document.createElement("br"),format_br_8=document.createElement("br"),format_br_9=document.createElement("br"),format_br_10=document.createElement("br"),format_br_11=document.createElement("br"),format_br_12=document.createElement("br"),format_br_13=document.createElement("br"),adding_desc_p_2=document.createElement("p"),adding_desc_b_2=document.createElement("b"),text_default_1=document.createTextNode("Accepted values of Default, Minimum and Maximum:"),text_default_3=document.createTextNode("Date: A fixed date using the date format mm/dd/yy, e.g. 05/25/2016"),text_default_2=document.createTextNode("Empty: No default / minimum / maximum"),text_default_4=document.createTextNode("'today' : current date"),text_default_5=document.createTextNode("Relative date: A number of days/weeks/months/years from today, e.g. '-1d' will be yesterday, '+1y+3m+2w+3d' will be 1 year, 3 months, 2 weeks and 3 days from today."),default_br_1=document.createElement("br"),default_br_2=document.createElement("br"),default_br_3=document.createElement("br"),default_br_4=document.createElement("br"),default_br_6=document.createElement("br"),default_br_7=document.createElement("br"),adding_desc_p_3=document.createElement("p"),adding_desc_b_3=document.createElement("b"),text_default_6=document.createTextNode("Dates to exclude:"),text_default_7=document.createTextNode("Enter comma-separated list of dates and date ranges using the date format 'mm/dd/yy', e.g. 08/15/2016, 06/15/2016-06/20/2016"),adding_0=document.createElement("input");adding_0.setAttribute("type","text"),adding_0.setAttribute("value",w_date),adding_0.setAttribute("id",i+"_elementform_id_temp0"),adding_0.setAttribute("name",i+"_elementform_id_temp0"),adding_0.style.cssText="width:"+w_size+"px;",adding_0.setAttribute("onChange","change_value_range('"+i+"_elementform_id_temp1', 'minDate', this.value)");var adding_1=document.createElement("input");adding_1.setAttribute("type","text"),adding_1.setAttribute("value",w_date),adding_1.setAttribute("id",i+"_elementform_id_temp1"),adding_1.setAttribute("name",i+"_elementform_id_temp1"),adding_1.style.cssText="width:"+w_size+"px;",adding_1.setAttribute("onChange","change_value_range('"+i+"_elementform_id_temp0', 'maxDate', this.value)");var adding_from=document.createTextNode("-"),adding_image_start=document.createElement("span");adding_image_start.setAttribute("id",i+"_show_imagedateform_id_temp0"),adding_image_start.setAttribute("class","dashicons dashicons-calendar-alt wd-calendar-button "+("yes"==w_show_image?"wd-inline-block":"wd-hidden")),adding_image_start.setAttribute("onClick","show_datepicker('"+i+"_elementform_id_temp0')");var adding_image_end=document.createElement("span");adding_image_end.setAttribute("id",i+"_show_imagedateform_id_temp1"),adding_image_end.setAttribute("class","dashicons dashicons-calendar-alt wd-calendar-button "+("yes"==w_show_image?"wd-inline-block":"wd-hidden")),adding_image_end.setAttribute("onClick","show_datepicker('"+i+"_elementform_id_temp1')");var dis_past_days="yes"==w_disable_past_days,adding_button=document.createElement("input");adding_button.setAttribute("id",i+"_buttonform_id_temp"),adding_button.setAttribute("class","button"),adding_button.setAttribute("type","hidden"),adding_button.setAttribute("value",w_but_val),adding_button.setAttribute("format",w_format);var main_td=document.getElementById("show_table");if(adding_desc_b.appendChild(text_format_1),adding_desc_p.appendChild(adding_desc_b),adding_desc_p.appendChild(format_br_1),adding_desc_p.appendChild(text_format_2),adding_desc_p.appendChild(format_br_2),adding_desc_p.appendChild(text_format_3),adding_desc_p.appendChild(format_br_3),adding_desc_p.appendChild(text_format_4),adding_desc_p.appendChild(format_br_4),adding_desc_p.appendChild(text_format_5),adding_desc_p.appendChild(format_br_5),adding_desc_p.appendChild(text_format_6),adding_desc_p.appendChild(format_br_6),adding_desc_p.appendChild(text_format_7),adding_desc_p.appendChild(format_br_7),adding_desc_p.appendChild(text_format_8),adding_desc_p.appendChild(format_br_8),adding_desc_p.appendChild(text_format_9),adding_desc_p.appendChild(format_br_9),adding_desc_p.appendChild(text_format_10),adding_desc_p.appendChild(format_br_10),adding_desc_p.appendChild(text_format_11),adding_desc_p.appendChild(format_br_11),adding_desc_p.appendChild(text_format_12),adding_desc_p.appendChild(format_br_12),adding_desc_p.appendChild(text_format_13),adding_desc_p.appendChild(format_br_13),adding_desc_b_2.appendChild(text_default_1),adding_desc_p_2.appendChild(adding_desc_b_2),adding_desc_p_2.appendChild(default_br_1),adding_desc_p_2.appendChild(text_default_2),adding_desc_p_2.appendChild(default_br_2),adding_desc_p_2.appendChild(text_default_3),adding_desc_p_2.appendChild(default_br_3),adding_desc_p_2.appendChild(text_default_4),adding_desc_p_2.appendChild(default_br_4),adding_desc_p_2.appendChild(text_default_5),adding_desc_b_3.appendChild(text_default_6),adding_desc_p_3.appendChild(adding_desc_b_3),adding_desc_p_3.appendChild(default_br_6),adding_desc_p_3.appendChild(text_default_7),adding_desc_p_3.appendChild(default_br_7),div_label.appendChild(label),div_label.appendChild(required),div_element.appendChild(adding_type),div_element.appendChild(adding_required),div_element.appendChild(adding_hide_label),div_element.appendChild(adding_show_image),div_element.appendChild(adding_dis_past_days),div_element.appendChild(adding_0),div_element.appendChild(adding_image_start),div_element.appendChild(adding_from),div_element.appendChild(adding_1),div_element.appendChild(adding_image_end),div_element.appendChild(adding_start_day),div_element.appendChild(adding_default_date_start),div_element.appendChild(adding_default_date_end),div_element.appendChild(adding_min_date),div_element.appendChild(adding_max_date),div_element.appendChild(adding_invalid_dates),div_element.appendChild(adding_hide_time),div_element.appendChild(adding_show_days),div_element.appendChild(adding_button),div_field.appendChild(div_label),div_field.appendChild(div_element),div.appendChild(div_field),div.appendChild(br3),div.appendChild(adding_desc_p),div.appendChild(adding_desc_p_2),div.appendChild(adding_desc_p_3),main_td.appendChild(div),"top"==w_field_label_pos&&label_top(i),change_class(w_class,i),refresh_attr(i,"type_range"),w_default_date_end&&"today"!=w_default_date_end)var w_max_date_start=w_default_date_end;else w_max_date_start="today"==w_default_date_end?jQuery.datepicker.formatDate("mm/dd/yy",new Date):w_max_date;if(jQuery("#"+i+"_elementform_id_temp0").datepicker({dateFormat:"mm/dd/yy",minDate:w_min_date,maxDate:w_max_date_start,firstDay:w_start_day,changeMonth:!0,changeYear:!0,yearRange:"-100:+50",showOtherMonths:!0,selectOtherMonths:!0,beforeShowDay:function(date){for(var invalid_dates=w_invalid_dates,invalid_dates_finish=[],invalid_dates_start=invalid_dates.split(","),invalid_date_range=[],i=0;i<invalid_dates_start.length;i++)if(invalid_dates_start[i]=invalid_dates_start[i].trim(),invalid_dates_start[i].length<11)invalid_dates_finish.push(invalid_dates_start[i]);else if(4<invalid_dates_start[i].indexOf("-"))invalid_date_range.push(invalid_dates_start[i].split("-"));else{var invalid_date_array=invalid_dates_start[i].split("-"),start_invalid_day=invalid_date_array[0]+"-"+invalid_date_array[1]+"-"+invalid_date_array[2],end_invalid_day=invalid_date_array[3]+"-"+invalid_date_array[4]+"-"+invalid_date_array[5];invalid_date_range.push([start_invalid_day,end_invalid_day])}jQuery.each(invalid_date_range,function(e,t){for(var i=new Date(t[0]);i<=new Date(t[1]);i.setDate(i.getDate()+1))invalid_dates_finish.push(jQuery.datepicker.formatDate("mm/dd/yy",i))});var string_days=jQuery.datepicker.formatDate("mm/dd/yy",date),day=date.getDay(),w_hide_sunday="yes"==w_show_days[0]?"true":"day != 0",w_hide_monday="yes"==w_show_days[1]?"true":"day != 1",w_hide_tuesday="yes"==w_show_days[2]?"true":"day != 2",w_hide_wednesday="yes"==w_show_days[3]?"true":"day != 3",w_hide_thursday="yes"==w_show_days[4]?"true":"day != 4",w_hide_friday="yes"==w_show_days[5]?"true":"day != 5",w_hide_saturday="yes"==w_show_days[6]?"true":"day != 6";return[-1==invalid_dates_finish.indexOf(string_days)&&eval(w_hide_sunday)&&eval(w_hide_monday)&&eval(w_hide_tuesday)&&eval(w_hide_wednesday)&&eval(w_hide_thursday)&&eval(w_hide_friday)&&eval(w_hide_saturday)]}}),jQuery("#"+i+"_elementform_id_temp0").datepicker("option","dateFormat",w_format),"today"==w_default_date_start?jQuery("#"+i+"_elementform_id_temp0").datepicker("setDate",new Date):(-1==w_default_date_start.indexOf("d")&&-1==w_default_date_start.indexOf("m")&&-1==w_default_date_start.indexOf("y")&&-1==w_default_date_start.indexOf("w")&&""!==w_default_date_start&&(w_default_date_start=jQuery.datepicker.formatDate(w_format,new Date(w_default_date_start))),jQuery("#"+i+"_elementform_id_temp0").datepicker("setDate",w_default_date_start)),w_default_date_start&&"today"!=w_default_date_start)var w_min_date_end=w_default_date_start;else"today"==w_default_date_start?w_max_date_start=jQuery.datepicker.formatDate("mm/dd/yy",new Date):w_min_date_end=w_min_date;jQuery("#"+i+"_elementform_id_temp1").datepicker({dateFormat:"mm/dd/yy",minDate:w_min_date_end,maxDate:w_max_date,firstDay:w_start_day,changeMonth:!0,changeYear:!0,yearRange:"-100:+50",showOtherMonths:!0,selectOtherMonths:!0,beforeShowDay:function(date){for(var invalid_dates=w_invalid_dates,invalid_dates_finish=[],invalid_dates_start=invalid_dates.split(","),invalid_date_range=[],i=0;i<invalid_dates_start.length;i++)if(invalid_dates_start[i]=invalid_dates_start[i].trim(),invalid_dates_start[i].length<11)invalid_dates_finish.push(invalid_dates_start[i]);else if(4<invalid_dates_start[i].indexOf("-"))invalid_date_range.push(invalid_dates_start[i].split("-"));else{var invalid_date_array=invalid_dates_start[i].split("-"),start_invalid_day=invalid_date_array[0]+"-"+invalid_date_array[1]+"-"+invalid_date_array[2],end_invalid_day=invalid_date_array[3]+"-"+invalid_date_array[4]+"-"+invalid_date_array[5];invalid_date_range.push([start_invalid_day,end_invalid_day])}jQuery.each(invalid_date_range,function(e,t){for(var i=new Date(t[0]);i<=new Date(t[1]);i.setDate(i.getDate()+1))invalid_dates_finish.push(jQuery.datepicker.formatDate("mm/dd/yy",i))});var string_days=jQuery.datepicker.formatDate("mm/dd/yy",date),day=date.getDay(),w_hide_sunday="yes"==w_show_days[0]?"true":"day != 0",w_hide_monday="yes"==w_show_days[1]?"true":"day != 1",w_hide_tuesday="yes"==w_show_days[2]?"true":"day != 2",w_hide_wednesday="yes"==w_show_days[3]?"true":"day != 3",w_hide_thursday="yes"==w_show_days[4]?"true":"day != 4",w_hide_friday="yes"==w_show_days[5]?"true":"day != 5",w_hide_saturday="yes"==w_show_days[6]?"true":"day != 6";return[-1==invalid_dates_finish.indexOf(string_days)&&eval(w_hide_sunday)&&eval(w_hide_monday)&&eval(w_hide_tuesday)&&eval(w_hide_wednesday)&&eval(w_hide_thursday)&&eval(w_hide_friday)&&eval(w_hide_saturday)]}}),jQuery("#"+i+"_elementform_id_temp1").datepicker("option","dateFormat",w_format),"today"==w_default_date_end?jQuery("#"+i+"_elementform_id_temp1").datepicker("setDate",new Date):(-1==w_default_date_end.indexOf("d")&&-1==w_default_date_end.indexOf("m")&&-1==w_default_date_end.indexOf("y")&&-1==w_default_date_end.indexOf("w")&&""!==w_default_date_end&&(w_default_date_end=jQuery.datepicker.formatDate(w_format,new Date(w_default_date_end))),jQuery("#"+i+"_elementform_id_temp1").datepicker("setDate",w_default_date_end))}function create_star_amount(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_star_size">Number of Stars</label>'),jQuery('<input class="fm-width-100" type="text" id="edit_for_star_size" onKeyPress="return check_isnum(event)" onKeyUp="change_star_amount(this.value, '+e+", 'form_id_temp')\" value=\""+t+'" />'))}function change_star_amount(e,t,i){var a=document.getElementById(t+"_element_sectionform_id_temp"),n=document.getElementById(t+"_elementform_id_temp");a.removeChild(n);var l=document.createElement("div");l.setAttribute("id",t+"_elementform_id_temp");for(var d=0;d<e;d++){var _=document.createElement("img");_.setAttribute("id",t+"_star_"+d),_.setAttribute("src",plugin_url+"/images/star.png"),_.setAttribute("onmouseover","change_src("+d+","+t+",'form_id_temp')"),_.setAttribute("onmouseout","reset_src("+d+","+t+")"),_.setAttribute("onclick","select_star_rating("+d+","+t+",'form_id_temp')"),l.appendChild(_)}a.appendChild(l),document.getElementById(t+"_star_amountform_id_temp").value=e}function create_star_color(e,t){var i=jQuery('<label class="fm-field-label">Star Color</label>'),a=jQuery('<select class="fm-width-100" id="edit_for_label_color" name="edit_for_label_color" onChange="label_color(this.value, '+e+')"></select>'),n=[];for(var l in n.yellow="Yellow",n.green="Green",n.blue="Blue",n.red="Red",n)if(n.hasOwnProperty(l)){var d=jQuery('<option value="'+l+'"'+(t==l?' selected="selected"':"")+">"+n[l]+"</option>");a.append(d)}return create_option_container(i,a)}function label_color(e,t){document.getElementById(t+"_star_colorform_id_temp").value=e}function go_to_type_star_rating(e){w_attr_name=[],w_attr_value=[],type_star_rating(e,"Star Rating","","top","no","yellow","5","no","wdform_star_rating",w_attr_name,w_attr_value)}function type_star_rating(e,t,i,a,n,l,d,_,r,o,m){jQuery("#element_type").val("type_star_rating"),delete_last_child();var s=jQuery("#edit_table"),u=jQuery('<div id="edit_div"></div>');s.append(u);var c=jQuery('<div id="edit_main_table"></div>');u.append(c),c.append(create_field_type("type_star_rating")),c.append(create_label(e,t)),c.append(create_label_position(e,a)),c.append(create_hide_label(e,n)),c.append(create_required(e,_)),c.append(create_star_amount(e,d)),c.append(create_star_color(e,l));var p=jQuery('<div class="inside"></div>');c.append(create_advanced_options_container(p)),p.append(create_field_label_size(e,i)),p.append(create_class(e,r)),p.append(create_additional_attributes(e,o,"type_star_rating"));var f=document.createElement("input");f.setAttribute("type","hidden"),f.setAttribute("value","type_star_rating"),f.setAttribute("name",e+"_typeform_id_temp"),f.setAttribute("id",e+"_typeform_id_temp");var y=document.createElement("input");y.setAttribute("type","hidden"),y.setAttribute("value",_),y.setAttribute("name",e+"_requiredform_id_temp"),y.setAttribute("id",e+"_requiredform_id_temp");var h=document.createElement("input");h.setAttribute("type","hidden"),h.setAttribute("value",n),h.setAttribute("name",e+"_hide_labelform_id_temp"),h.setAttribute("id",e+"_hide_labelform_id_temp");var b=document.createElement("input");b.setAttribute("type","hidden"),b.setAttribute("value",d),b.setAttribute("id",e+"_star_amountform_id_temp"),b.setAttribute("name",e+"_star_amountform_id_temp");var v=document.createElement("input");v.setAttribute("type","hidden"),v.setAttribute("value",l),v.setAttribute("name",e+"_star_colorform_id_temp"),v.setAttribute("id",e+"_star_colorform_id_temp");var w=document.createElement("div");w.setAttribute("id","main_div");var g=document.createElement("div");g.setAttribute("id",e+"_elemet_tableform_id_temp");var E="yes"==n?"none":"table-cell",A=document.createElement("div");A.setAttribute("align","left"),A.style.cssText="display:"+E+"; vertical-align:top; width:"+i+"px;",A.setAttribute("id",e+"_label_sectionform_id_temp");var j=document.createElement("div");j.setAttribute("align","left"),j.style.display="table-cell",j.setAttribute("id",e+"_element_sectionform_id_temp");var x=document.createElement("div");x.setAttribute("id",e+"_elementform_id_temp"),x.setAttribute("class","wdform_stars");var k=document.createElement("br"),I=document.createElement("span");I.setAttribute("id",e+"_element_labelform_id_temp"),I.innerHTML=t,I.setAttribute("class","label");var C=document.createElement("span");C.setAttribute("id",e+"_required_elementform_id_temp"),C.innerHTML="",C.setAttribute("class","required"),"yes"==_&&(C.innerHTML=" *");var B=document.getElementById("show_table");A.appendChild(I),A.appendChild(C),j.appendChild(h),j.appendChild(f),j.appendChild(y),j.appendChild(b),j.appendChild(v);for(var Q=0;Q<d;Q++){var T=document.createElement("img");T.setAttribute("id",e+"_star_"+Q),T.setAttribute("src",plugin_url+"/images/star.png"),T.setAttribute("onmouseover","change_src("+Q+","+e+",'form_id_temp')"),T.setAttribute("onmouseout","reset_src("+Q+","+e+")"),T.setAttribute("onclick","select_star_rating("+Q+","+e+",'form_id_temp')"),x.appendChild(T)}j.appendChild(x),g.appendChild(A),g.appendChild(j),w.appendChild(g),w.appendChild(k),B.appendChild(w),jQuery("#main_div").append(form_maker.type_stars_description),"top"==a&&label_top(e),change_class(r,e),refresh_attr(e,"type_star_rating")}function create_scale_amount(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_scale_amount">Scale Range</label>'),jQuery('<input class="fm-width-100" type="text" id="edit_for_scale_amount" onKeyPress="return check_isnum(event)" onKeyUp="change_scale_amount(this.value, '+e+", 'form_id_temp')\" value=\""+t+'" />'))}function change_scale_amount(e,t,i){var a=document.getElementById(t+"_scale_tableform_id_temp"),n=document.getElementById(t+"_elementform_id_temp");n.removeChild(a);var l=document.createElement("div");l.setAttribute("id",t+"_scale_tableform_id_temp"),l.style.cssText="display:inline-table;";var d=document.createElement("div");d.setAttribute("id",t+"_scale_tr1form_id_temp"),d.style.cssText="display:table-row;";var _=document.createElement("div");_.setAttribute("id",t+"_scale_tr2form_id_temp"),_.style.cssText="display:table-row;",l.appendChild(d);for(var r=1;r<=e;r++)adding_num=document.createElement("span"),adding_num.innerHTML=r,adding_td=document.createElement("div"),adding_td.setAttribute("id",t+"_scale_td1_"+r+"form_id_temp"),adding_td.style.cssText="text-align:center; display:table-cell;",adding_td.appendChild(adding_num),d.appendChild(adding_td);for(var o=1;o<=e;o++){var m=document.createElement("input");m.setAttribute("id",t+"_scale_radioform_id_temp_"+o),m.setAttribute("name",t+"_scale_radioform_id_temp"),m.setAttribute("value",o),m.setAttribute("type","radio");var s=document.createElement("div");s.setAttribute("id",t+"_scale_td2_"+o+"form_id_temp"),s.style.cssText=" display:table-cell;",s.appendChild(m),_.appendChild(s)}l.appendChild(_),n.insertBefore(l,n.childNodes[1]),document.getElementById(t+"_scale_amountform_id_temp").value=e}function go_to_type_scale_rating(e){w_attr_name=[],w_attr_value=[],w_mini_labels=["Worst","Best"],type_scale_rating(e,"Scale Rating","","top","no",w_mini_labels,"5","no","wdform_scale_rating",w_attr_name,w_attr_value)}function type_scale_rating(t,e,i,a,n,l,d,_,r,o,m){jQuery("#element_type").val("type_scale_rating"),delete_last_child();var s=jQuery("#edit_table"),u=jQuery('<div id="edit_div"></div>');s.append(u);var c=jQuery('<div id="edit_main_table"></div>');u.append(c),c.append(create_field_type("type_scale_rating")),c.append(create_label(t,e)),c.append(create_label_position(t,a)),c.append(create_hide_label(t,n)),c.append(create_required(t,_)),c.append(create_scale_amount(t,d));var p=jQuery('<div class="inside"></div>');c.append(create_advanced_options_container(p)),p.append(create_field_label_size(t,i)),p.append(create_class(t,r)),p.append(create_additional_attributes(t,o,"type_scale_rating"));var f=document.createElement("input");f.setAttribute("type","hidden"),f.setAttribute("value","type_scale_rating"),f.setAttribute("name",t+"_typeform_id_temp"),f.setAttribute("id",t+"_typeform_id_temp");var y=document.createElement("input");y.setAttribute("type","hidden"),y.setAttribute("value",_),y.setAttribute("name",t+"_requiredform_id_temp"),y.setAttribute("id",t+"_requiredform_id_temp");var h=document.createElement("input");h.setAttribute("type","hidden"),h.setAttribute("value",n),h.setAttribute("name",t+"_hide_labelform_id_temp"),h.setAttribute("id",t+"_hide_labelform_id_temp");var b=document.createElement("input");b.setAttribute("type","hidden"),b.setAttribute("value",d),b.setAttribute("id",t+"_scale_amountform_id_temp"),b.setAttribute("name",t+"_scale_amountform_id_temp");var v=document.createElement("div");v.setAttribute("id","main_div"),edit_labels=document.createTextNode("The labels of the fields are editable. Please, click on the label to edit.");var w=document.createElement("div");w.setAttribute("class","fm-editable-label"),w.appendChild(edit_labels);var g=document.createElement("div");g.setAttribute("id",t+"_elemet_tableform_id_temp");var E="yes"==n?"none":"table-cell",A=document.createElement("div");A.setAttribute("align","left"),A.style.cssText="display:"+E+"; vertical-align:top; width:"+i+"px;",A.setAttribute("id",t+"_label_sectionform_id_temp");var j=document.createElement("div");j.setAttribute("align","left"),j.style.display="table-cell",j.setAttribute("id",t+"_element_sectionform_id_temp");var x=document.createElement("div");x.setAttribute("id",t+"_elementform_id_temp");var k=document.createElement("div");k.setAttribute("id",t+"_scale_tableform_id_temp"),k.style.cssText="display:inline-table;";var I=document.createElement("div");I.setAttribute("id",t+"_scale_tr1form_id_temp"),I.style.display="table-row";var C=document.createElement("div");C.setAttribute("id",t+"_scale_tr2form_id_temp"),C.style.display="table-row";var B=document.createElement("br"),Q=document.createElement("span");Q.setAttribute("id",t+"_element_labelform_id_temp"),Q.innerHTML=e,Q.setAttribute("class","label");var T=document.createElement("label");T.setAttribute("class","mini_label"),T.setAttribute("id",t+"_mini_label_worst"),T.innerHTML=l[0],T.style.cssText="position:relative; top:6px; font-size:11px; display:inline-table;";var M=document.createElement("label");M.setAttribute("class","mini_label"),M.setAttribute("id",t+"_mini_label_best"),M.innerHTML=l[1],M.style.cssText="position:relative; top:6px; font-size:11px; display:inline-table;";var L=document.createElement("span");L.setAttribute("id",t+"_required_elementform_id_temp"),L.innerHTML="",L.setAttribute("class","required"),"yes"==_&&(L.innerHTML=" *");var z=document.getElementById("show_table");A.appendChild(Q),A.appendChild(L),j.appendChild(h),j.appendChild(f),j.appendChild(y),j.appendChild(b),x.appendChild(T),k.appendChild(I);for(var q=1;q<=d;q++)adding_num=document.createElement("span"),adding_num.innerHTML=q,adding_td=document.createElement("td"),adding_td.setAttribute("id",t+"_scale_td1_"+q+"form_id_temp"),adding_td.style.cssText="text-align:center;",adding_td.style.display="table-cell",adding_td.appendChild(adding_num),I.appendChild(adding_td);for(var H=1;H<=d;H++){var N=document.createElement("input");N.setAttribute("id",t+"_scale_radioform_id_temp_"+H),N.setAttribute("name",t+"_scale_radioform_id_temp"),N.setAttribute("value",H),N.setAttribute("type","radio");var S=document.createElement("div");S.setAttribute("id",t+"_scale_td2_"+H+"form_id_temp"),S.style.display="table-cell",S.appendChild(N),C.appendChild(S),k.appendChild(C),x.appendChild(k)}k.appendChild(C),x.appendChild(k),x.appendChild(M),j.appendChild(x),g.appendChild(A),g.appendChild(j),v.appendChild(g),v.appendChild(B),v.appendChild(w),z.appendChild(v),jQuery("#main_div").append("<br>"+form_maker.type_rating_description),"top"==a&&label_top(t),change_class(r,t),refresh_attr(t,"type_scale_rating"),jQuery(document).ready(function(){jQuery("label#"+t+"_mini_label_worst").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='worst' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.worst").focus(),jQuery("input.worst").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_worst").text(e)})}}),jQuery("label#"+t+"_mini_label_best").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='best' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.best").focus(),jQuery("input.best").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_best").text(e)})}})})}function create_slider_minvalue(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_slider_min_value">Min Value</label>'),jQuery('<input class="fm-width-100" type="text" id="edit_for_slider_min_value" onKeyPress="return check_isnum_or_minus(event)" onKeyUp="change_slider_min_or_max_value(this.value, '+e+", 'form_id_temp', 'min')\" onChange=\"change_slider_min_value(this.value, "+e+", 'form_id_temp')\" value=\""+t+'" />'))}function change_slider_min_or_max_value(e,t,i,a){document.getElementById(t+"_element_"+a+"form_id_temp").innerHTML=e}function change_slider_min_value(a,id,form_id){document.getElementById(id+"_slider_min_valueform_id_temp").value=a,eval(a)>document.getElementById(id+"_element_valueform_id_temp").innerHTML?(document.getElementById(id+"_element_valueform_id_temp").innerHTML=a,document.getElementById(id+"_slider_valueform_id_temp").value=a,jQuery("#"+id+"_elementform_id_temp").slider({min:eval(a),slide:function(e,t){document.getElementById(id+"_element_valueform_id_temp").innerHTML=""+t.value,document.getElementById(id+"_slider_valueform_id_temp").value=""+t.value}})):jQuery("#"+id+"_elementform_id_temp").slider({min:eval(a),slide:function(e,t){document.getElementById(id+"_element_valueform_id_temp").innerHTML=""+t.value,document.getElementById(id+"_slider_valueform_id_temp").value=""+t.value}})}function create_slider_maxvalue(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_slider_max_value">Max Value</label>'),jQuery('<input class="fm-width-100" type="text" id="edit_for_slider_max_value" onKeyPress="return check_isnum_or_minus(event)" onKeyUp="change_slider_min_or_max_value(this.value, '+e+", 'form_id_temp', 'max')\" onChange=\"change_slider_max_value(this.value, "+e+", 'form_id_temp')\" value=\""+t+'" />'))}function change_slider_max_value(a,id,form_id){document.getElementById(id+"_slider_max_valueform_id_temp").value=a,eval(a)<parseInt(document.getElementById(id+"_slider_valueform_id_temp").value)?(document.getElementById(id+"_element_valueform_id_temp").innerHTML=a,document.getElementById(id+"_slider_valueform_id_temp").value=a,jQuery("#"+id+"_elementform_id_temp").slider({min:eval(document.getElementById(id+"_slider_min_valueform_id_temp").value),max:eval(a),value:eval(document.getElementById(id+"_slider_valueform_id_temp").value),slide:function(e,t){document.getElementById(id+"_element_valueform_id_temp").innerHTML=""+t.value,document.getElementById(id+"_slider_valueform_id_temp").value=""+t.value}})):jQuery("#"+id+"_elementform_id_temp").slider({min:eval(document.getElementById(id+"_slider_min_valueform_id_temp").value),max:eval(a),value:eval(document.getElementById(id+"_slider_valueform_id_temp").value),slide:function(e,t){document.getElementById(id+"_element_valueform_id_temp").innerHTML=""+t.value,document.getElementById(id+"_slider_valueform_id_temp").value=""+t.value}})}function create_slider_step(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_slider_step">Step</label>'),jQuery('<input class="fm-width-100" type="text" id="edit_for_slider_step" onKeyPress="return check_isnum(event)" onChange="change_slider_step(this.value, '+e+", 'form_id_temp')\" value=\""+t+'" />'))}function change_slider_step(a,id,form_id){jQuery("#"+id+"_elementform_id_temp").slider({step:eval(a)}),document.getElementById(id+"_slider_stepform_id_temp").value=a}function create_slider_width(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_slider_width">Width(px)</label>'),jQuery('<input class="fm-width-100" type="text" id="edit_for_slider_width" onKeyPress="return check_isnum(event)" onKeyUp="change_slider_width(this.value,'+e+",'form_id_temp')\" value=\""+t+'" /><p class="description">'+form_maker.leave_empty+"</p>"))}function change_slider_width(e,t,i){document.getElementById(t+"_elementform_id_temp").style.cssText="width:"+e+"px",document.getElementById(t+"_slider_table2form_id_temp").style.cssText="width:"+e+"px",document.getElementById(t+"_slider_widthform_id_temp").value=e}function go_to_type_slider(e){w_attr_name=[],w_attr_value=[],type_slider(e,"Slider","","top","no","","0","100","1","0","no","",w_attr_name,w_attr_value)}function type_slider(i,w_field_label,w_field_label_size,w_field_label_pos,w_hide_label,w_field_width,w_field_min_value,w_field_max_value,w_field_step,w_field_value,w_required,w_class,w_attr_name,w_attr_value){jQuery("#element_type").val("type_slider"),delete_last_child();var t=jQuery("#edit_table"),edit_div=jQuery('<div id="edit_div"></div>');t.append(edit_div);var edit_main_table=jQuery('<div id="edit_main_table"></div>');edit_div.append(edit_main_table),edit_main_table.append(create_field_type("type_slider")),edit_main_table.append(create_label(i,w_field_label)),edit_main_table.append(create_label_position(i,w_field_label_pos)),edit_main_table.append(create_hide_label(i,w_hide_label)),edit_main_table.append(create_required(i,w_required)),edit_main_table.append(create_slider_minvalue(i,w_field_min_value)),edit_main_table.append(create_slider_maxvalue(i,w_field_max_value)),edit_main_table.append(create_slider_step(i,w_field_step)),edit_main_table.append(create_slider_width(i,w_field_width));var advanced_options_container=jQuery('<div class="inside"></div>');edit_main_table.append(create_advanced_options_container(advanced_options_container)),advanced_options_container.append(create_field_label_size(i,w_field_label_size)),advanced_options_container.append(create_class(i,w_class)),advanced_options_container.append(create_additional_attributes(i,w_attr_name,"type_slider"));var adding_type=document.createElement("input");adding_type.setAttribute("type","hidden"),adding_type.setAttribute("value","type_slider"),adding_type.setAttribute("name",i+"_typeform_id_temp"),adding_type.setAttribute("id",i+"_typeform_id_temp");var adding_required=document.createElement("input");adding_required.setAttribute("type","hidden"),adding_required.setAttribute("value",w_required),adding_required.setAttribute("name",i+"_requiredform_id_temp"),adding_required.setAttribute("id",i+"_requiredform_id_temp");var adding_hide_label=document.createElement("input");adding_hide_label.setAttribute("type","hidden"),adding_hide_label.setAttribute("value",w_hide_label),adding_hide_label.setAttribute("name",i+"_hide_labelform_id_temp"),adding_hide_label.setAttribute("id",i+"_hide_labelform_id_temp");var adding_slider_min_value=document.createElement("input");adding_slider_min_value.setAttribute("type","hidden"),adding_slider_min_value.setAttribute("value",w_field_min_value),adding_slider_min_value.setAttribute("id",i+"_slider_min_valueform_id_temp"),adding_slider_min_value.setAttribute("name",i+"_slider_min_valueform_id_temp");var adding_slider_max_value=document.createElement("input");adding_slider_max_value.setAttribute("type","hidden"),adding_slider_max_value.setAttribute("value",w_field_max_value),adding_slider_max_value.setAttribute("id",i+"_slider_max_valueform_id_temp"),adding_slider_max_value.setAttribute("name",i+"_slider_max_valueform_id_temp");var adding_slider_step=document.createElement("input");adding_slider_step.setAttribute("type","hidden"),adding_slider_step.setAttribute("value",w_field_step),adding_slider_step.setAttribute("id",i+"_slider_stepform_id_temp"),adding_slider_step.setAttribute("name",i+"_slider_stepform_id_temp");var adding_slider_value=document.createElement("input");adding_slider_value.setAttribute("type","hidden"),adding_slider_value.setAttribute("value",w_field_value),adding_slider_value.setAttribute("id",i+"_slider_valueform_id_temp"),adding_slider_value.setAttribute("name",i+"_slider_valueform_id_temp");var adding_slider_width=document.createElement("input");adding_slider_width.setAttribute("type","hidden"),adding_slider_width.setAttribute("value",w_field_width),adding_slider_width.setAttribute("name",i+"_slider_widthform_id_temp"),adding_slider_width.setAttribute("id",i+"_slider_widthform_id_temp");var adding_slider_div=document.createElement("div");adding_slider_div.style.cssText="width:"+w_field_width+"px",adding_slider_div.setAttribute("name",i+"_elementform_id_temp"),adding_slider_div.setAttribute("id",i+"_elementform_id_temp");var div=document.createElement("div");div.setAttribute("id","main_div");var div_field=document.createElement("div");div_field.setAttribute("id",i+"_elemet_tableform_id_temp");var display_label_div="yes"==w_hide_label?"none":"table-cell",div_label=document.createElement("div");div_label.setAttribute("align","left"),div_label.style.cssText="display:"+display_label_div+"; vertical-align:top; width:"+w_field_label_size+"px;",div_label.setAttribute("id",i+"_label_sectionform_id_temp");var div_element=document.createElement("div");div_element.setAttribute("align","left"),div_element.style.display="table-cell",div_element.setAttribute("id",i+"_element_sectionform_id_temp");var slider_table=document.createElement("div");slider_table.setAttribute("id",i+"_slider_tableform_id_temp");var slider_tr1=document.createElement("div"),slider_tr2=document.createElement("div");slider_tr2.setAttribute("id",i+"_slider_table2form_id_temp"),slider_tr2.style.cssText="width:"+w_field_width+"px";var slider_td1=document.createElement("div");slider_td1.setAttribute("id",i+"_slider_td1form_id_temp");var slider_td2=document.createElement("div");slider_td2.setAttribute("align","left"),slider_td2.setAttribute("id",i+"_slider_td2form_id_temp"),slider_td2.style.cssText="display:inline-table; width:33.3%; text-align:left;";var slider_td3=document.createElement("div");slider_td3.setAttribute("align","right"),slider_td3.setAttribute("id",i+"_slider_td3form_id_temp"),slider_td3.style.cssText="display:inline-table; width:33.3%; text-align:center;";var slider_td4=document.createElement("div");slider_td4.setAttribute("align","right"),slider_td4.setAttribute("id",i+"_slider_td4form_id_temp"),slider_td4.style.cssText="display:inline-table; width:33.3%; text-align:right; ";var br1=document.createElement("br"),label=document.createElement("span");label.setAttribute("id",i+"_element_labelform_id_temp"),label.innerHTML=w_field_label,label.setAttribute("class","label");var required=document.createElement("span");required.setAttribute("id",i+"_required_elementform_id_temp"),required.innerHTML="",required.setAttribute("class","required"),"yes"==w_required&&(required.innerHTML=" *");var main_td=document.getElementById("show_table");div_label.appendChild(label),div_label.appendChild(required),div_element.appendChild(adding_hide_label),div_element.appendChild(adding_type),div_element.appendChild(adding_required),div_element.appendChild(adding_slider_width),div_element.appendChild(adding_slider_min_value),div_element.appendChild(adding_slider_max_value),div_element.appendChild(adding_slider_step),div_element.appendChild(adding_slider_value);var slider_min=document.createElement("span");slider_min.setAttribute("id",i+"_element_minform_id_temp"),slider_min.innerHTML=w_field_min_value,slider_min.setAttribute("class","label");var slider_max=document.createElement("span");slider_max.setAttribute("id",i+"_element_maxform_id_temp"),slider_max.innerHTML=w_field_max_value,slider_max.setAttribute("class","label");var slider_value=document.createElement("span");slider_value.setAttribute("id",i+"_element_valueform_id_temp"),slider_value.innerHTML=w_field_value,slider_value.setAttribute("class","label"),slider_td1.appendChild(adding_slider_div),slider_tr1.appendChild(slider_td1),slider_table.appendChild(slider_tr1),slider_td2.appendChild(slider_min),slider_tr2.appendChild(slider_td2),slider_table.appendChild(slider_tr2),slider_td3.appendChild(slider_value),slider_tr2.appendChild(slider_td3),slider_table.appendChild(slider_tr2),slider_td4.appendChild(slider_max),slider_tr2.appendChild(slider_td4),slider_table.appendChild(slider_tr2),div_element.appendChild(slider_table),div_field.appendChild(div_label),div_field.appendChild(div_element),div.appendChild(div_field),div.appendChild(br1),main_td.appendChild(div),jQuery("#main_div").append(form_maker.type_slider_description),"top"==w_field_label_pos&&label_top(i),change_class(w_class,i),refresh_attr(i,"type_slider"),jQuery("#"+i+"_elementform_id_temp")[0].slide=null,jQuery(function(){jQuery("#"+i+"_elementform_id_temp").slider({step:eval(w_field_step),range:"min",value:eval(w_field_value),min:eval(w_field_min_value),max:eval(w_field_max_value),slide:function(e,t){document.getElementById(i+"_element_valueform_id_temp").innerHTML=""+t.value,document.getElementById(i+"_slider_valueform_id_temp").value=""+t.value}})})}function create_range_step(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_spinner_step">Step</label>'),jQuery('<input class="fm-width-100" type="text" id="edit_for_spinner_step" onKeyPress="return check_isnum(event)" onChange="change_range_step(this.value, '+e+", 'form_id_temp')\" value=\""+t+'" />'))}function change_range_step(e,t,i){jQuery("#"+t+"_elementform_id_temp0").spinner({step:e}),jQuery("#"+t+"_elementform_id_temp1").spinner({step:e}),document.getElementById(t+"_range_stepform_id_temp").value=e}function create_range_width(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_spinner_width">Width(px)</label>'),jQuery('<input class="fm-width-100" type="text" id="edit_for_spinner_width" onKeyPress="return check_isnum(event)" onKeyUp="change_range_width(this.value, '+e+", 'form_id_temp')\" value=\""+t+'" />'))}function go_to_type_range(e){w_attr_name=[],w_attr_value=[],w_mini_labels=["From","To"],type_range(e,"Range","","top","no","70","1","","",w_mini_labels,"no","",w_attr_name,w_attr_value)}function type_range(t,e,i,a,n,l,d,_,r,o,m,s,u,c){jQuery("#element_type").val("type_range"),delete_last_child();var p=jQuery("#edit_table"),f=jQuery('<div id="edit_div"></div>');p.append(f);var y=jQuery('<div id="edit_main_table"></div>');f.append(y),y.append(create_field_type("type_range")),y.append(create_label(t,e)),y.append(create_label_position(t,a)),y.append(create_hide_label(t,n)),y.append(create_required(t,m)),y.append(create_range_step(t,d)),y.append(create_range_width(t,l));var h=jQuery('<div class="inside"></div>');y.append(create_advanced_options_container(h)),h.append(create_field_label_size(t,i)),h.append(create_class(t,s)),h.append(create_additional_attributes(t,u,"type_range"));var b=document.createElement("input");b.setAttribute("type","hidden"),b.setAttribute("value","type_range"),b.setAttribute("name",t+"_typeform_id_temp"),b.setAttribute("id",t+"_typeform_id_temp");var v=document.createElement("input");v.setAttribute("type","hidden"),v.setAttribute("value",m),v.setAttribute("name",t+"_requiredform_id_temp"),v.setAttribute("id",t+"_requiredform_id_temp");var w=document.createElement("input");w.setAttribute("type","hidden"),w.setAttribute("value",n),w.setAttribute("name",t+"_hide_labelform_id_temp"),w.setAttribute("id",t+"_hide_labelform_id_temp");var g=document.createElement("input");g.setAttribute("type","hidden"),g.setAttribute("value",l),g.setAttribute("name",t+"_range_widthform_id_temp"),g.setAttribute("id",t+"_range_widthform_id_temp");var E=document.createElement("input");E.setAttribute("type","hidden"),E.setAttribute("value",d),E.setAttribute("name",t+"_range_stepform_id_temp"),E.setAttribute("id",t+"_range_stepform_id_temp");var A=document.createElement("input");A.setAttribute("type",""),A.setAttribute("value",_),A.style.cssText="width:"+l+"px",A.setAttribute("name",t+"_elementform_id_temp0"),A.setAttribute("id",t+"_elementform_id_temp0"),A.setAttribute("onKeyPress","return check_isnum_or_minus(event)");var j=document.createElement("input");j.setAttribute("type",""),j.setAttribute("value",r),j.style.cssText="width:"+l+"px",j.setAttribute("name",t+"_elementform_id_temp1"),j.setAttribute("id",t+"_elementform_id_temp1"),j.setAttribute("onKeyPress","return check_isnum_or_minus(event)");var x=document.createElement("label");x.setAttribute("class","mini_label mini_label_from"),x.setAttribute("id",t+"_mini_label_from"),x.innerHTML=o[0];var k=document.createElement("label");k.setAttribute("class","mini_label mini_label_to"),k.setAttribute("id",t+"_mini_label_to"),k.innerHTML=o[1];var I=document.createElement("div");I.setAttribute("id","main_div"),edit_labels=document.createTextNode("The labels of the fields are editable. Please, click on the label to edit.");var C=document.createElement("div");C.setAttribute("class","fm-editable-label"),C.appendChild(edit_labels);var B=document.createElement("div");B.setAttribute("id",t+"_elemet_tableform_id_temp");var Q="yes"==n?"none":"table-cell",T=document.createElement("div");T.setAttribute("align","left"),T.style.display=Q,T.style.width=i+"px",T.setAttribute("id",t+"_label_sectionform_id_temp");var M=document.createElement("div");M.setAttribute("align","left"),M.style.display="table-cell",M.setAttribute("id",t+"_element_sectionform_id_temp");var L=document.createElement("div");L.setAttribute("id",t+"_elemet_table_littleform_id_temp"),L.style.display="table";var z=document.createElement("div");z.style.display="table-row";var q=document.createElement("div");q.style.display="table-row";var H=document.createElement("div");H.setAttribute("valign","middle"),H.setAttribute("align","left"),H.style.display="table-cell";var N=document.createElement("div");N.setAttribute("valign","middle"),N.setAttribute("align","left"),N.style.cssText="display:table-cell; padding-left:4px;";var S=document.createElement("div");S.setAttribute("valign","top"),S.setAttribute("align","left"),S.style.display="table-cell";var D=document.createElement("div");D.setAttribute("valign","top"),D.setAttribute("align","left"),D.style.display="table-cell";var P=document.createElement("br"),O=document.createElement("span");O.setAttribute("id",t+"_element_labelform_id_temp"),O.innerHTML=e,O.setAttribute("class","label");var K=document.createElement("span");K.setAttribute("id",t+"_required_elementform_id_temp"),K.innerHTML="",K.setAttribute("class","required"),"yes"==m&&(K.innerHTML=" *");var U=document.getElementById("show_table");T.appendChild(O),T.appendChild(K),M.appendChild(b),M.appendChild(v),M.appendChild(w),M.appendChild(g),M.appendChild(E),H.appendChild(A),N.appendChild(j),S.appendChild(x),D.appendChild(k),z.appendChild(H),z.appendChild(N),q.appendChild(S),q.appendChild(D),L.appendChild(z),L.appendChild(q),M.appendChild(L),B.appendChild(T),B.appendChild(M),I.appendChild(B),I.appendChild(P),I.appendChild(C),U.appendChild(I),jQuery("#main_div").append("<br>"+form_maker.type_range_description),"top"==a&&label_top(t),change_class(s,t),refresh_attr(t,"type_range"),jQuery("#"+t+"_elementform_id_temp0").spinner();jQuery("#"+t+"_elementform_id_temp0").spinner();jQuery("#"+t+"_elementform_id_temp0").spinner({step:d}),jQuery("#"+t+"_elementform_id_temp1").spinner();jQuery("#"+t+"_elementform_id_temp1").spinner();jQuery("#"+t+"_elementform_id_temp1").spinner({step:d}),jQuery(document).ready(function(){jQuery("label#"+t+"_mini_label_from").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='form' size='8' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.form").focus(),jQuery("input.form").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_from").text(e)})}}),jQuery("label#"+t+"_mini_label_to").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='to' size='8' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.to").focus(),jQuery("input.to").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_to").text(e)})}})})}function create_hidden_name(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_hidden_name">Name</label>'),jQuery('<input type="text" class="fm-width-100" id="el_hidden_name" onChange="change_field_name('+e+', this)" value="'+t+'" />'))}function change_field_name(e,t){if(value=t.value,value==parseInt(value))return alert("The name of the field cannot be a number."),t.value="",document.getElementById(e+"_elementform_id_temp").name="",document.getElementById(e+"_element_labelform_id_temp").innerHTML="",void(document.getElementById(e+"_hidden_nameform_id_temp").innerHTML="");value==e+"_elementform_id_temp"?(alert('"Field Name" should differ from "Field Id".'),t.value=""):(document.getElementById(e+"_elementform_id_temp").name=value,document.getElementById(e+"_element_labelform_id_temp").innerHTML=value,document.getElementById(e+"_hidden_nameform_id_temp").innerHTML=value)}function create_hidden_value(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_hidden_value">Value</label>'),jQuery('<input type="text" class="fm-width-100" id="el_hidden_value" onChange="change_field_value('+e+', this.value)" value="'+t+'" />'))}function change_field_value(e,t){document.getElementById(e+"_elementform_id_temp").value=t,document.getElementById(e+"_hidden_valueform_id_temp").innerHTML=t}function go_to_type_hidden(e){w_attr_name=[],w_attr_value=[],type_hidden(e,"","","",w_attr_name,w_attr_value)}function type_hidden(e,t,i,a,n){jQuery("#element_type").val("type_hidden"),delete_last_child();var l=jQuery("#edit_table"),d=jQuery('<div id="edit_div"></div>');l.append(d);var _=jQuery('<div id="edit_main_table"></div>');d.append(_),_.append(create_field_type("type_hidden")),_.append(create_hidden_name(e,t)),_.append(create_hidden_value(e,i));var r=jQuery('<div class="inside"></div>');_.append(create_advanced_options_container(r)),r.append(create_additional_attributes(e,a,"type_hidden")),element="input",type="hidden";var o=document.createElement("input");o.setAttribute("type","hidden"),o.setAttribute("value","type_hidden"),o.setAttribute("name",e+"_typeform_id_temp"),o.setAttribute("id",e+"_typeform_id_temp");var m=document.createElement(element);m.setAttribute("type",type),m.setAttribute("value",i),m.setAttribute("id",e+"_elementform_id_temp"),m.setAttribute("name",t);var s=document.createElement("div");s.setAttribute("id","main_div");var u=document.createElement("div");u.setAttribute("id",e+"_elemet_tableform_id_temp");var c=document.createElement("div");c.setAttribute("align","left"),c.style.display="table-cell",c.setAttribute("id",e+"_label_sectionform_id_temp");var p=document.createElement("div");p.setAttribute("align","left"),p.style.cssText="display:table-cell; padding-left: 7px;",p.setAttribute("id",e+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var f=document.createElement("br"),y=(document.createElement("br"),document.createElement("span"));y.setAttribute("id",e+"_element_labelform_id_temp"),y.style.cssText="display:none",y.innerHTML=t;var h=document.createElement("span");h.style.cssText="color:red; font-size:13px;",h.innerHTML="Hidden field";var b=document.createElement("div"),v=document.createElement("span");v.setAttribute("align","left"),v.innerHTML="Name: ";var w=document.createElement("span");w.setAttribute("align","left"),w.innerHTML=t,w.setAttribute("id",e+"_hidden_nameform_id_temp");var g=document.createElement("div"),E=document.createElement("span");E.setAttribute("align","left"),E.innerHTML="Value: ";var A=document.createElement("span");A.setAttribute("align","left"),A.innerHTML=i,A.setAttribute("id",e+"_hidden_valueform_id_temp"),b.appendChild(v),b.appendChild(w),g.appendChild(E),g.appendChild(A);var j=document.getElementById("show_table");c.appendChild(y),c.appendChild(h),p.appendChild(m),p.appendChild(o),p.appendChild(b),p.appendChild(g),u.appendChild(c),u.appendChild(p),s.appendChild(u),s.appendChild(f),j.appendChild(s),jQuery("#main_div").append(form_maker.type_hidden_description),refresh_attr(e,"type_text")}function create_captcha_digits(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="captcha_digit">Symbols (3 - 9)</label>'),jQuery('<input class="fm-width-100" type="text" id="captcha_digit" onKeyPress="return check_isnum_3_10(event)" onKeyUp="change_captcha_digit(this.value, '+e+')" value="'+t+'" />'))}function check_isnum_3_10(e){var t=e.which||e.keyCode;return!(31<t&&(t<51||57<t))&&!(9<document.getElementById("captcha_digit").value+(t-48))}function go_to_type_captcha(e){w_attr_name=[],w_attr_value=[],type_captcha(e,"Word Verification","","top","yes","6","",w_attr_name,w_attr_value)}function type_captcha(e,t,i,a,n,l,d,_,r){jQuery("#element_type").val("type_captcha"),delete_last_child();var o=jQuery("#edit_table"),m=jQuery('<div id="edit_div"></div>');o.append(m);var s=jQuery('<div id="edit_main_table"></div>');m.append(s),s.append(create_field_type("type_captcha")),s.append(create_label(e,t)),s.append(create_label_position(e,a)),s.append(create_hide_label(e,n)),s.append(create_captcha_digits(e,l));var u=jQuery('<div class="inside"></div>');s.append(create_advanced_options_container(u)),u.append(create_field_label_size(e,i)),u.append(create_class(e,d)),u.append(create_additional_attributes(e,_,"type_captcha")),element="img",type="captcha";var c=document.createElement("input");c.setAttribute("type","hidden"),c.setAttribute("value","type_captcha"),c.setAttribute("name",e+"_typeform_id_temp"),c.setAttribute("id",e+"_typeform_id_temp");var p=document.createElement(element);p.setAttribute("type",type),p.setAttribute("digit",l),p.setAttribute("src",url_for_ajax+"?action=formmakerwdcaptcha_fmc&nonce="+fm_ajax.ajaxnonce+"&digit="+l+"&i=form_id_temp"),p.setAttribute("id","_wd_captchaform_id_temp"),p.setAttribute("class","captcha_img"),p.setAttribute("onClick","captcha_refresh('_wd_captcha','form_id_temp')");var f=document.createElement("input");f.setAttribute("type","hidden"),f.setAttribute("value",n),f.setAttribute("name",e+"_hide_labelform_id_temp"),f.setAttribute("id",e+"_hide_labelform_id_temp");var y=document.createElement("div");y.setAttribute("class","captcha_refresh"),y.setAttribute("id","_element_refreshform_id_temp"),y.setAttribute("onClick","captcha_refresh('_wd_captcha','form_id_temp')");var h=document.createElement("input");h.setAttribute("type","text"),h.style.cssText="width:"+(10*l+15)+"px;",h.setAttribute("class","captcha_input"),h.setAttribute("id","_wd_captcha_inputform_id_temp"),h.setAttribute("name","captcha_input");var b=document.createElement("div");b.setAttribute("id","main_div");var v=document.createElement("div");v.setAttribute("id",e+"_elemet_tableform_id_temp");var w="yes"==n?"none":"table-cell",g=document.createElement("div");g.setAttribute("align","left"),g.style.display=w,g.style.width=i+"px",g.setAttribute("id",e+"_label_sectionform_id_temp");var E=document.createElement("div");E.setAttribute("align","left"),E.style.display="table-cell",E.setAttribute("id",e+"_element_sectionform_id_temp");var A=document.createElement("div");A.style.display="table";var j=document.createElement("div");j.style.display="table-row";var x=document.createElement("div");x.style.display="table-row";var k=document.createElement("div");k.setAttribute("valign","middle"),k.style.display="table-cell";var I=document.createElement("div");I.setAttribute("valign","middle"),I.style.display="table-cell";var C=document.createElement("div");C.style.display="table-cell",A.appendChild(j),A.appendChild(x),j.appendChild(k),j.appendChild(I),x.appendChild(C),k.appendChild(p),I.appendChild(y),C.appendChild(h);document.createElement("br"),document.createElement("br");var B=document.createElement("br"),Q=(document.createElement("br"),document.createElement("span"));Q.setAttribute("id",e+"_element_labelform_id_temp"),Q.innerHTML=t,Q.setAttribute("class","label"),Q.style.verticalAlign="top";var T=document.getElementById("show_table");g.appendChild(Q),E.appendChild(c),E.appendChild(f),E.appendChild(A),v.appendChild(g),v.appendChild(E),b.appendChild(v),b.appendChild(B),T.appendChild(b),jQuery("#main_div").append(form_maker.type_captcha_description),"top"==a&&label_top(e),change_class(d,e),refresh_attr(e,"type_captcha")}function create_arithmetic_operations(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_operations">Operations</label>'),jQuery('<input type="text" class="fm-width-100" id="el_operations" onKeyPress="return check_is_operation_valid(event)" onChange="change_arithmetic_captcha(this.value, \'operations\')" value="'+t+'" />'))}function check_is_operation_valid(e){var t=e.which||e.keyCode;return!(46==t||t<42||47<t)}function change_arithmetic_captcha(e,t){arithmetic_captcha=document.getElementById("_wd_arithmetic_captchaform_id_temp"),"oper_count"==t?(oper_count=e||1,operations=document.getElementById("el_operations")?document.getElementById("el_operations").value:"+, -, *, /"):oper_count=(operations="el_operations"==t?e||"+, -, *, /":document.getElementById("el_operations")?document.getElementById("el_operations").value:"+, -, *, /",document.getElementById("el_oper_count")?document.getElementById("el_oper_count").value:1),input_size=document.getElementById("el_captcha_input_size")?document.getElementById("el_captcha_input_size").value:60,arithmetic_captcha.setAttribute("operations_count",oper_count),arithmetic_captcha.setAttribute("operations",operations),arithmetic_captcha.setAttribute("input_size",input_size),arithmetic_captcha.setAttribute("src",url_for_ajax+"?action=formmakerwdmathcaptcha_fmc&operations_count="+oper_count+"&nonce="+fm_ajax.ajaxnonce+"&operations="+operations.replace("+","@")+"&i=form_id_temp")}function create_arithmetic_operations_count(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_oper_count">Operations count (1 - 5)</label>'),jQuery('<input type="text" class="fm-width-100" id="el_oper_count" onKeyPress="return check_isnum_less_then_5(event)" onChange="change_arithmetic_captcha(this.value, \'oper_count\')" value="'+t+'" />'))}function check_isnum_less_then_5(e){var t=e.which||e.keyCode;return!(31<t&&(t<49||57<t))&&!(5<document.getElementById("el_oper_count").value+(t-48))}function create_arithmetic_width(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_captcha_input_size">Input width(px)</label>'),jQuery('<input class="fm-width-100" type="text" id="el_captcha_input_size" onKeyPress="return check_isnum(event)" onKeyUp="change_w_style(\'_wd_arithmetic_captcha_inputform_id_temp\', this.value); change_arithmetic_captcha();" value="'+t+'" />'))}function go_to_type_arithmetic_captcha(e){w_attr_name=[],w_attr_value=[],type_arithmetic_captcha(e,"Word Verification","","top","yes","1","+, -, *, /","","60",w_attr_name,w_attr_value)}function type_arithmetic_captcha(e,t,i,a,n,l,d,_,r,o,m){jQuery("#element_type").val("type_arithmetic_captcha"),delete_last_child();var s=jQuery("#edit_table"),u=jQuery('<div id="edit_div"></div>');s.append(u);var c=jQuery('<div id="edit_main_table"></div>');u.append(c),c.append(create_field_type("type_arithmetic_captcha")),c.append(create_label(e,t)),c.append(create_label_position(e,a)),c.append(create_hide_label(e,n)),c.append(create_arithmetic_operations(e,d)),c.append(create_arithmetic_operations_count(e,l)),c.append(create_arithmetic_width(e,r));var p=jQuery('<div class="inside"></div>');c.append(create_advanced_options_container(p)),p.append(create_field_label_size(e,i)),p.append(create_class(e,_)),p.append(create_additional_attributes(e,o,"type_arithmetic_captcha"));var f=document.createElement("input");f.setAttribute("type","hidden"),f.setAttribute("value","type_arithmetic_captcha"),f.setAttribute("name",e+"_typeform_id_temp"),f.setAttribute("id",e+"_typeform_id_temp");var y=document.createElement("img");y.setAttribute("type","captcha"),y.setAttribute("operations_count",l),y.setAttribute("operations",d),y.setAttribute("input_size",r),y.setAttribute("src",url_for_ajax+"?action=formmakerwdmathcaptcha_fmc&operations_count="+l+"&nonce="+fm_ajax.ajaxnonce+"&operations="+d.replace("+","@")+"&i=form_id_temp"),y.setAttribute("id","_wd_arithmetic_captchaform_id_temp"),y.setAttribute("class","arithmetic_captcha_img"),y.setAttribute("onClick","captcha_refresh('_wd_arithmetic_captcha','form_id_temp')");var h=document.createElement("input");h.setAttribute("type","hidden"),h.setAttribute("value",n),h.setAttribute("name",e+"_hide_labelform_id_temp"),h.setAttribute("id",e+"_hide_labelform_id_temp");var b=document.createElement("div");b.setAttribute("class","captcha_refresh"),b.setAttribute("id","_element_refreshform_id_temp"),b.setAttribute("onClick","captcha_refresh('_wd_arithmetic_captcha','form_id_temp')");var v=document.createElement("input");v.setAttribute("type","text"),v.style.cssText="width:"+r+"px;",v.setAttribute("class","arithmetic_captcha_input"),v.setAttribute("id","_wd_arithmetic_captcha_inputform_id_temp"),v.setAttribute("name","arithmetic_captcha_input"),v.setAttribute("onKeyPress","return check_isnum(event)");var w=document.createElement("div");w.setAttribute("id","main_div");var g=document.createElement("div");g.setAttribute("id",e+"_elemet_tableform_id_temp");var E="yes"==n?"none":"table-cell",A=document.createElement("div");A.setAttribute("align","left"),A.style.display=E,A.style.width=i+"px",A.setAttribute("id",e+"_label_sectionform_id_temp");var j=document.createElement("div");j.setAttribute("align","left"),j.style.display="table-cell",j.setAttribute("id",e+"_element_sectionform_id_temp");var x=document.createElement("div");x.style.display="table";var k=document.createElement("div");k.style.display="table-row";var I=document.createElement("div");I.style.display="table-row";var C=document.createElement("div");C.style.display="table-cell";var B=document.createElement("div");B.style.cssText="display:table-cell; vertical-align:middle;";var Q=document.createElement("div");Q.style.display="table-cell",x.appendChild(k),x.appendChild(I),k.appendChild(C),k.appendChild(Q),k.appendChild(B),C.appendChild(y),B.appendChild(b),Q.appendChild(v);document.createElement("br"),document.createElement("br");var T=document.createElement("br"),M=(document.createElement("br"),document.createElement("span"));M.setAttribute("id",e+"_element_labelform_id_temp"),M.innerHTML=t,M.setAttribute("class","label"),M.style.verticalAlign="top";var L=document.getElementById("show_table");A.appendChild(M),j.appendChild(f),j.appendChild(h),j.appendChild(x),g.appendChild(A),g.appendChild(j),w.appendChild(g),w.appendChild(T),L.appendChild(w),jQuery("#main_div").append(form_maker.type_arithmetic_captcha_description),"top"==a&&label_top(e),change_class(_,e),refresh_attr(e,"type_arithmetic_captcha")}function create_field_size_phone(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_input_size">Width(px)</label>'),jQuery('<input class="fm-width-100" type="text" id="edit_for_input_size" onKeyPress="return check_isnum(event)" onKeyUp="change_w_style(\''+e+'_element_lastform_id_temp\', this.value)" value="'+t+'" /><p class="description">'+form_maker.leave_empty+"</p>"))}function create_placeholder_phone(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_first_value_area">Placeholder</label>'),jQuery('<input type="text" class="fm-width-20" id="el_first_value_area" onKeyUp="change_input_value(this.value,\''+e+'_element_firstform_id_temp\')" value="'+t[0].replace(/"/g,"&quot;")+'" />-<input type="text" class="fm-width-60" id="el_first_value_phone" onKeyUp="change_input_value(this.value,\''+e+'_element_lastform_id_temp\')" value="'+t[1].replace(/"/g,"&quot;")+'" />'))}function go_to_type_phone(e){w_attr_name=[],w_attr_value=[],w_first_val=["",""],w_title=["",""],w_mini_labels=["Area Code","Phone Number"],type_phone(e,"Phone-Area Code","","top","no","",w_first_val,w_title,w_mini_labels,"no","no","",w_attr_name,w_attr_value)}function type_phone(t,e,i,a,n,l,d,_,r,o,m,s,u,c){jQuery("#element_type").val("type_phone"),delete_last_child();var p=jQuery("#edit_table"),f=jQuery('<div id="edit_div"></div>');p.append(f);var y=jQuery('<div id="edit_main_table"></div>');f.append(y),y.append(create_field_type("type_phone")),y.append(create_label(t,e)),y.append(create_label_position(t,a)),y.append(create_hide_label(t,n)),y.append(create_required(t,o)),y.append(create_field_size_phone(t,l)),y.append(create_placeholder_phone(t,_));var h=jQuery('<div class="inside"></div>');y.append(create_advanced_options_container(h)),h.append(create_unique_values(t,m)),h.append(create_field_label_size(t,i)),h.append(create_class(t,s)),h.append(create_additional_attributes(t,u,"type_phone"));var b=document.createElement("br"),v=document.createElement("input");v.setAttribute("type","hidden"),v.setAttribute("value","type_phone"),v.setAttribute("name",t+"_typeform_id_temp"),v.setAttribute("id",t+"_typeform_id_temp");var w=document.createElement("input");w.setAttribute("type","hidden"),w.setAttribute("value",o),w.setAttribute("name",t+"_requiredform_id_temp"),w.setAttribute("id",t+"_requiredform_id_temp");var g=document.createElement("input");g.setAttribute("type","hidden"),g.setAttribute("value",n),g.setAttribute("name",t+"_hide_labelform_id_temp"),g.setAttribute("id",t+"_hide_labelform_id_temp");var E=document.createElement("input");E.setAttribute("type","hidden"),E.setAttribute("value",m),E.setAttribute("name",t+"_uniqueform_id_temp"),E.setAttribute("id",t+"_uniqueform_id_temp");var A=document.createElement("div");A.setAttribute("id","main_div");var j=document.createElement("div");j.setAttribute("class","fm-editable-label"),edit_labels=document.createTextNode("The labels of the fields are editable. Please, click on the label to edit."),j.appendChild(edit_labels);var x=document.createElement("div");x.setAttribute("id",t+"_elemet_tableform_id_temp");var k="yes"==n?"none":"table-cell",I=document.createElement("div");I.setAttribute("align","left"),I.style.display=k,I.style.width=i+"px",I.setAttribute("id",t+"_label_sectionform_id_temp");var C=document.createElement("div");C.setAttribute("align","left"),C.style.display="table-cell",C.setAttribute("id",t+"_element_sectionform_id_temp");var B=document.createElement("div");B.style.display="table",B.setAttribute("id",t+"_table_name");var Q=document.createElement("div");Q.style.display="table-row",Q.setAttribute("id",t+"_tr_name1");var T=document.createElement("div");T.style.display="table-row",T.setAttribute("id",t+"_tr_name2");var M=document.createElement("div");M.style.display="table-cell",M.setAttribute("id",t+"_td_name_input_first");var L=document.createElement("div");L.style.display="table-cell",L.setAttribute("id",t+"_td_name_input_last");var z=document.createElement("div");z.style.display="table-cell",z.setAttribute("id",t+"_td_name_label_first"),z.setAttribute("align","left");var q=document.createElement("div");q.style.display="table-cell",q.setAttribute("id",t+"_td_name_label_last"),q.setAttribute("align","left");var H=document.createElement("span");H.setAttribute("id",t+"_element_labelform_id_temp"),H.innerHTML=e,H.setAttribute("class","label"),H.style.verticalAlign="top";var N=document.createElement("span");N.setAttribute("id",t+"_required_elementform_id_temp"),N.innerHTML="",N.setAttribute("class","required"),"yes"==o&&(N.innerHTML=" *");var S=document.createElement("input");S.setAttribute("type","text"),S.style.cssText="width:50px",S.setAttribute("id",t+"_element_firstform_id_temp"),S.setAttribute("name",t+"_element_firstform_id_temp"),S.setAttribute("value",d[0]),S.setAttribute("title",_[0]),S.setAttribute("placeholder",_[0]),S.setAttribute("onKeyPress","return check_isnum(event)");var D=document.createElement("span");D.setAttribute("class","wdform_line"),D.style.cssText="margin: 0px 4px 0px 4px; padding: 0px;",D.innerHTML="-";var P=document.createElement("label");P.setAttribute("class","mini_label mini_label_area_code"),P.setAttribute("id",t+"_mini_label_area_code"),P.innerHTML=r[0];var O=document.createElement("input");O.setAttribute("type","text"),O.style.cssText="width:"+l+"px",O.setAttribute("id",t+"_element_lastform_id_temp"),O.setAttribute("name",t+"_element_lastform_id_temp"),O.setAttribute("value",d[1]),O.setAttribute("title",_[1]),O.setAttribute("placeholder",_[1]),O.setAttribute("onKeyPress","return check_isnum(event)");var K=document.createElement("label");K.setAttribute("class","mini_label mini_label_phone_number"),K.setAttribute("id",t+"_mini_label_phone_number"),K.innerHTML=r[1];var U=document.getElementById("show_table");I.appendChild(H),I.appendChild(N),M.appendChild(S),M.appendChild(D),L.appendChild(O),Q.appendChild(M),Q.appendChild(L),z.appendChild(P),q.appendChild(K),T.appendChild(z),T.appendChild(q),B.appendChild(Q),B.appendChild(T),C.appendChild(v),C.appendChild(w),C.appendChild(g),C.appendChild(E),C.appendChild(B),x.appendChild(I),x.appendChild(C),A.appendChild(x),A.appendChild(b),A.appendChild(j),U.appendChild(A),jQuery("#main_div").append("<br>"+form_maker.type_phone_area_code_description),"top"==a&&label_top(t),change_class(s,t),refresh_attr(t,"type_name"),jQuery(document).ready(function(){jQuery("label#"+t+"_mini_label_area_code").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='area_code' size='10' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.area_code").focus(),jQuery("input.area_code").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_area_code").text(e)})}}),jQuery("label#"+t+"_mini_label_phone_number").click(function(){if(0==jQuery(this).children("input").length){var e="<input type='text' class='phone_number' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+'">';jQuery(this).html(e),jQuery("input.phone_number").focus(),jQuery("input.phone_number").blur(function(){var e=jQuery(this).val();jQuery("#"+t+"_mini_label_phone_number").text(e)})}})})}function create_confirmation_password(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="el_verification_password">Password Confirmation</label>'),jQuery('<input type="checkbox" id="el_verification_password" onclick="verification_password('+e+')"'+("yes"==t?' checked="checked"':"")+" />"))}function verification_password(e){document.getElementById("el_verification_password").checked?(document.getElementById("confirm_validation_label").style.display="block",document.getElementById(e+"_verification_id_temp").value="yes",document.getElementById(e+"_1_label_sectionform_id_temp").style.display=document.getElementById(e+"_label_sectionform_id_temp").style.display,document.getElementById(e+"_1_element_sectionform_id_temp").style.display=document.getElementById(e+"_element_sectionform_id_temp").style.display):(document.getElementById("confirm_validation_label").style.display="none",document.getElementById(e+"_verification_id_temp").value="no",document.getElementById(e+"_1_label_sectionform_id_temp").style.display="none",document.getElementById(e+"_1_element_sectionform_id_temp").style.display="none")}function create_confirmation_password_label(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_label">Confirmation label</label>'),jQuery('<textarea id="edit_for_label" class="fm-width-100" onKeyUp="change_label(\''+e+"_element_labelform_id_temp', this.value, '"+e+'_1_element_labelform_id_temp\')" rows="4">'+i+"</textarea>"),"confirm_validation_label","yes"==t)}function go_to_type_password(e){w_placeholder_value="",w_attr_name=[],w_attr_value=[],type_password(e,"Password","","top","no","","no","no","wdform_input","no","Password confirmation",w_placeholder_value,w_attr_name,w_attr_value)}function type_password(e,t,i,a,n,l,d,_,r,o,m,s,u,c){jQuery("#element_type").val("type_password"),delete_last_child();var p=jQuery("#edit_table"),f=jQuery('<div id="edit_div"></div>');p.append(f);var y=jQuery('<div id="edit_main_table"></div>');f.append(y),y.append(create_field_type("type_password")),y.append(create_label(e,t)),y.append(create_label_position(e,a)),y.append(create_hide_label(e,n)),y.append(create_required(e,d)),y.append(create_field_size(e,l,"'"+e+"_elementform_id_temp'","'"+e+"_1_elementform_id_temp'"));var h=jQuery('<div class="inside"></div>');y.append(create_advanced_options_container(h)),h.append(create_confirmation_password(e,o)),h.append(create_confirmation_password_label(e,o,m)),h.append(create_field_label_size(e,i,"'"+e+"_label_sectionform_id_temp'","'"+e+"_1_label_sectionform_id_temp'")),h.append(create_class(e,r)),h.append(create_additional_attributes(e,u,"type_password")),element="input",type="password";var b=document.createElement("input");b.setAttribute("type","hidden"),b.setAttribute("value","type_password"),b.setAttribute("name",e+"_typeform_id_temp"),b.setAttribute("id",e+"_typeform_id_temp");var v=document.createElement("input");v.setAttribute("type","hidden"),v.setAttribute("value",d),v.setAttribute("name",e+"_requiredform_id_temp"),v.setAttribute("id",e+"_requiredform_id_temp");var w=document.createElement("input");w.setAttribute("type","hidden"),w.setAttribute("value",_),w.setAttribute("name",e+"_uniqueform_id_temp"),w.setAttribute("id",e+"_uniqueform_id_temp");var g=document.createElement(element);g.setAttribute("type",type),g.setAttribute("autocomplete","new-password"),g.setAttribute("id",e+"_elementform_id_temp"),g.setAttribute("name",e+"_elementform_id_temp"),g.setAttribute("placeholder",s),g.style.cssText="width:"+l+"px;";var E=document.createElement("input");E.setAttribute("type","hidden"),E.setAttribute("value",n),E.setAttribute("name",e+"_hide_labelform_id_temp"),E.setAttribute("id",e+"_hide_labelform_id_temp");var A=document.createElement("input");A.setAttribute("type","hidden"),A.setAttribute("value",o),A.setAttribute("name",e+"_verification_id_temp"),A.setAttribute("id",e+"_verification_id_temp");var j=document.createElement(element);j.setAttribute("type",type),j.setAttribute("autocomplete","new-password"),j.style.cssText="width:"+l+"px;",j.setAttribute("id",e+"_1_elementform_id_temp"),j.setAttribute("name",e+"_1_elementform_id_temp");var x="yes"==n||"no"==o?"none":"table-cell",k=document.createElement("div");k.setAttribute("align","left"),k.style.display=x,k.style.width=i+"px",k.setAttribute("id",e+"_1_label_sectionform_id_temp");var I="no"==o?"none":"table-cell",C=document.createElement("div");C.setAttribute("align","left"),C.style.display=I,C.setAttribute("id",e+"_1_element_sectionform_id_temp");var B=document.createElement("span");B.setAttribute("id",e+"_1_element_labelform_id_temp"),B.innerHTML=m,B.setAttribute("class","label"),B.style.verticalAlign="top";var Q=document.createElement("span");Q.setAttribute("id",e+"_1_required_elementform_id_temp"),Q.innerHTML="",Q.setAttribute("class","required"),Q.style.verticalAlign="top","yes"==d&&(Q.innerHTML=" *"),k.appendChild(B),k.appendChild(Q);var T=document.createElement("div");T.setAttribute("id","main_div");var M=document.createElement("div");M.setAttribute("id",e+"_elemet_tableform_id_temp");var L="yes"==n?"none":"table-cell",z=document.createElement("div");z.setAttribute("align","left"),z.style.display=L,z.style.width=i+"px",z.setAttribute("id",e+"_label_sectionform_id_temp");var q=document.createElement("div");q.setAttribute("align","left"),q.style.display="table-cell",q.setAttribute("id",e+"_element_sectionform_id_temp");var H=document.createElement("span");H.setAttribute("id",e+"_element_labelform_id_temp"),H.innerHTML=t,H.setAttribute("class","label"),H.style.verticalAlign="top";var N=document.createElement("span");N.setAttribute("id",e+"_required_elementform_id_temp"),N.innerHTML="",N.setAttribute("class","required"),N.style.verticalAlign="top","yes"==d&&(N.innerHTML=" *");var S=document.getElementById("show_table"),D=document.createElement("br");z.appendChild(H),z.appendChild(N),q.appendChild(b),q.appendChild(v),q.appendChild(E),q.appendChild(A),q.appendChild(w),q.appendChild(g),M.appendChild(z),M.appendChild(q),C.appendChild(j),M.appendChild(D),M.appendChild(k),M.appendChild(C),T.appendChild(M),S.appendChild(T),jQuery("#main_div").append(form_maker.type_password_description),"top"==a&&label_top(e),change_class(r,e),refresh_attr(e,"type_text")}function create_custom_button_add(e,t,i){var a=jQuery('<label class="fm-field-label">Add a new button</label>'),l=jQuery('<span class="fm-add-attribute dashicons dashicons-plus-alt" title="Add" onClick="add_button('+e+')"></span>'),d=jQuery('<div id="buttons" class="fm-width-100"></div>');for(n=t.length,j=0;j<n;j++){var _=jQuery('<div class="fm-width-100 fm-fields-set" id="button_opt'+j+'" idi="'+j+'"></div>'),r=jQuery('<div class="fm-width-90"></div>');r.append(create_custom_button_name(e,j,t[j])),r.append(create_custom_button_function(e,j,i[j])),_.append(r);var o=jQuery('<div class="fm-width-10 fm-remove-button"><span class="fm-remove-attribute dashicons dashicons-dismiss" onClick="remove_button('+j+", "+e+')"></span></div>');_.append(o),d.append(_)}var m=a;return create_option_container(null,m=(m=m.add(l)).add(d))}function create_custom_button_name(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="el_title'+t+'">Name</label>'),jQuery('<input type="text" class="fm-width-100" id="el_title'+t+'" onChange="change_label(\''+e+"_elementform_id_temp"+t+'\', this.value)" value="'+i+'" />'))}function create_custom_button_function(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="el_func'+t+'">OnClick</label>'),jQuery('<input type="text" class="fm-width-100" id="el_func'+t+'" onChange="change_func(\''+e+"_elementform_id_temp"+t+'\', this.value)" value="'+i+'" />'))}function add_button(e){var t=jQuery("#buttons"),i=t.children().last();0<i.length?j=parseInt(i.attr("idi"))+1:j=0;var a=jQuery('<div class="fm-width-100 fm-fields-set" id="button_opt'+j+'" idi="'+j+'"></div>'),n=jQuery('<div class="fm-width-90"></div>');n.append(create_custom_button_name(e,j,"Button")),n.append(create_custom_button_function(e,j,"")),a.append(n);var l=jQuery('<div class="fm-width-10 fm-remove-button"><span class="fm-remove-attribute dashicons dashicons-dismiss" onClick="remove_button('+j+", "+e+')"></span></div>');a.append(l),t.append(a),element="button",type="button",td2=document.getElementById(e+"_element_sectionform_id_temp");var d=document.createElement(element);d.setAttribute("type",type),d.setAttribute("id",e+"_elementform_id_temp"+j),d.setAttribute("name",e+"_elementform_id_temp"+j),d.setAttribute("value","Button"),d.innerHTML="Button",d.setAttribute("onclick",""),td2.appendChild(d),refresh_attr(e,"type_checkbox")}function remove_button(e,t){table=document.getElementById("button_opt"+e),button=document.getElementById(t+"_elementform_id_temp"+e),table.parentNode.removeChild(table),button.parentNode.removeChild(button)}function go_to_type_button(e){w_title=["Button"],w_func=[""],w_attr_name=[],w_attr_value=[],type_button(e,w_title,w_func,"wdform_button",w_attr_name,w_attr_value)}function type_button(e,t,i,a,l,d){jQuery("#element_type").val("type_button"),delete_last_child();var _=jQuery("#edit_table"),r=jQuery('<div id="edit_div"></div>');_.append(r);var o=jQuery('<div id="edit_main_table"></div>');r.append(o),o.append(create_field_type("type_button")),o.append(create_custom_button_add(e,t,i));var m=jQuery('<div class="inside"></div>');o.append(create_advanced_options_container(m)),m.append(create_class(e,a)),m.append(create_additional_attributes(e,l,"type_button")),element="button",type="button";var s=document.createElement("input");s.setAttribute("type","hidden"),s.setAttribute("value","type_button"),s.setAttribute("name",e+"_typeform_id_temp"),s.setAttribute("id",e+"_typeform_id_temp");var u=document.createElement("div");u.setAttribute("id","main_div");var c=document.createElement("div");c.setAttribute("id",e+"_elemet_tableform_id_temp");var p=document.createElement("div");p.setAttribute("align","left"),p.style.display="table-cell",p.setAttribute("id",e+"_label_sectionform_id_temp");var f=document.createElement("div");f.setAttribute("align","left"),f.style.display="table-cell",f.setAttribute("id",e+"_element_sectionform_id_temp");var y=document.createElement("br"),h=(document.createElement("br"),document.createElement("br"),document.createElement("br"),document.createElement("span"));for(h.setAttribute("id",e+"_element_labelform_id_temp"),h.innerHTML="button_"+e,h.style.cssText="display:none",n=t.length,j=0;j<n;j++){var b=document.createElement(element);b.setAttribute("type",type),b.setAttribute("id",e+"_elementform_id_temp"+j),b.setAttribute("class","button button-secondary button-large"),b.setAttribute("name",e+"_elementform_id_temp"+j),b.setAttribute("value",t[j]),b.innerHTML=t[j],b.setAttribute("onclick",i[j]),f.appendChild(b)}var v=document.getElementById("show_table");p.appendChild(h),f.appendChild(s),c.appendChild(p),c.appendChild(f),u.appendChild(c),u.appendChild(y),v.appendChild(u),jQuery("#main_div").append(form_maker.type_button_description),change_class(a,e),refresh_attr(e,"type_checkbox")}function create_grading_total(e,t){return create_option_container(jQuery('<label class="fm-field-label" for="element_total">Total</label>'),jQuery('<input class="fm-width-100" type="text" id="element_total" onKeyPress="return check_isnum_or_minus(event)" onKeyUp="change_total(this.value,'+e+')" value="'+t+'" />'))}function check_isnum_or_minus(e){var t=e.which||e.keyCode;return!(31<t&&(t<48||57<t)&&46!=t&&45!=t&&(t<35||40<t))}function change_total(e,t){""==e&&(e=0),document.getElementById(t+"_grading_totalform_id_temp").value=e,0==(document.getElementById(t+"_total_elementform_id_temp").innerHTML=e)?jQuery("#"+t+"_element_total_divform_id_temp").hide():jQuery("#"+t+"_element_total_divform_id_temp").show()}function create_grading_items(e,t){var i=jQuery('<label class="fm-field-label">Items</label>'),a=jQuery('<span class="fm-add-attribute dashicons dashicons-plus-alt" title="Add" id="el_items_add" onClick="add_grading_items('+e+')"></span>'),l=jQuery('<div id="items" class="fm-width-100"></div>');for(n=t.length,j=0;j<n;j++){var d=jQuery('<div class="fm-width-100 fm-fields-set" id="item_row_'+j+'" idi="'+j+'"></div>'),_=jQuery('<div class="fm-width-90"></div>');_.append(create_grading_item(e,j,t[j])),d.append(_);var r=jQuery('<div class="fm-width-10 fm-remove-button"><span class="fm-remove-attribute dashicons dashicons-dismiss" onClick="remove_grading_items('+j+", "+e+')"></span></div>');d.append(r),l.append(d)}var o=i;return create_option_container(null,o=(o=o.add(a)).add(l))}function create_grading_item(e,t,i){jQuery('<label class="fm-field-label" for="el_title'+t+'">Name</label>');return create_option_container(null,jQuery('<input type="text" class="fm-width-100" id="el_items'+t+'" onChange="change_label(\''+e+"_label_elementform_id_temp"+t+"', this.value); change_in_value('"+e+"_label_elementform_id_temp"+t+'\', this.value)" value="'+i+'" />'))}function add_grading_items(e){for(i=100;0<i&&!document.getElementById("el_items"+i);i--);m=i+1;var t=jQuery("#items"),a=jQuery('<div class="fm-width-100 fm-fields-set" id="item_row_'+m+'" idi="'+m+'"></div>'),n=jQuery('<div class="fm-width-90"></div>');n.append(create_grading_item(e,m,"")),a.append(n);var l=jQuery('<div class="fm-width-10 fm-remove-button"><span class="fm-remove-attribute dashicons dashicons-dismiss" onClick="remove_grading_items('+m+", "+e+')"></span></div>');a.append(l),t.append(a),refresh_grading_items(e)}function remove_grading_items(e,t){var i=document.getElementById("items"),a=document.getElementById("item_row_"+e);i.removeChild(a),refresh_grading_items(t)}function refresh_grading_items(e){for(i=100;0<i&&!document.getElementById("el_items"+i);i--);m=i;var t=document.getElementById(e+"_elementform_id_temp");for(t.innerHTML="",i=0;i<=m;i++)if(document.getElementById("el_items"+i)){var a=document.createElement("div");a.setAttribute("id",e+"_element_div"+i),a.setAttribute("class","grading");var n=document.createElement("input");n.setAttribute("id",e+"_elementform_id_temp_"+i),n.setAttribute("name",e+"_elementform_id_temp_"+i),n.setAttribute("onKeyPress","return check_isnum_or_minus(event)"),n.setAttribute("value",""),n.setAttribute("size","5"),n.setAttribute("type","text"),n.setAttribute("onKeyUp","sum_grading_values("+e+",'form_id_temp')"),n.setAttribute("onChange","sum_grading_values("+e+",'form_id_temp')");var l=document.createElement("label");l.setAttribute("id",e+"_label_elementform_id_temp"+i),l.setAttribute("class","ch-rad-label"),l.innerHTML=document.getElementById("el_items"+i).value,a.appendChild(n),a.appendChild(l),t.appendChild(a)}var d=document.createElement("div");d.setAttribute("id",e+"_element_total_divform_id_temp"),d.setAttribute("class","grading_div");var _=document.getElementById(e+"_grading_totalform_id_temp").value;d.style.display=""!=_&&"0"!=_?"block":"none";var r=document.createTextNode("Total:"),o=document.createTextNode("/"),s=document.createElement("span");s.setAttribute("id",e+"_total_elementform_id_temp"),s.setAttribute("name",e+"_total_elementform_id_temp"),s.innerHTML=_;var u=document.createElement("span");u.setAttribute("id",e+"_sum_elementform_id_temp"),u.setAttribute("name",e+"_sum_elementform_id_temp"),u.innerHTML=0;var c=document.createElement("span");c.setAttribute("id",e+"_text_elementform_id_temp"),c.setAttribute("name",e+"_text_elementform_id_temp"),c.innerHTML="",d.appendChild(r),d.appendChild(u),d.appendChild(o),d.appendChild(s),d.appendChild(c),t.appendChild(d)}function sum_grading_values(e,t){for(var i=0,a=0;a<100;a++)document.getElementById(e+"_element"+t+"_"+a)&&document.getElementById(e+"_element"+t+"_"+a).value&&(i+=parseInt(document.getElementById(e+"_element"+t+"_"+a).value)),document.getElementById(e+"_total_element"+t)&&(i>document.getElementById(e+"_total_element"+t).innerHTML?document.getElementById(e+"_text_element"+t).innerHTML=" Total should be less than "+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=i)}function go_to_type_grading(e){w_attr_name=[],w_attr_value=[],w_items=["item1","item2","item3"],type_grading(e,"Grading","","top","no",w_items,"100","no","wdform_grading",w_attr_name,w_attr_value)}function type_grading(e,t,i,a,n,l,d,_,r,o,m){jQuery("#element_type").val("type_grading"),delete_last_child();var s=jQuery("#edit_table"),u=jQuery('<div id="edit_div"></div>');s.append(u);var c=jQuery('<div id="edit_main_table"></div>');u.append(c),c.append(create_field_type("type_grading")),c.append(create_label(e,t)),c.append(create_label_position(e,a)),c.append(create_hide_label(e,n)),c.append(create_required(e,_)),c.append(create_grading_total(e,d)),c.append(create_grading_items(e,l));var p=jQuery('<div class="inside"></div>');c.append(create_advanced_options_container(p)),p.append(create_field_label_size(e,i)),p.append(create_class(e,r)),p.append(create_additional_attributes(e,o,"type_grading")),element="input",type="grading";var f=document.createElement("input");f.setAttribute("type","hidden"),f.setAttribute("value","type_grading"),f.setAttribute("name",e+"_typeform_id_temp"),f.setAttribute("id",e+"_typeform_id_temp");var y=document.createElement("input");y.setAttribute("type","hidden"),y.setAttribute("value",_),y.setAttribute("name",e+"_requiredform_id_temp"),y.setAttribute("id",e+"_requiredform_id_temp");var h=document.createElement("input");h.setAttribute("type","hidden"),h.setAttribute("value",n),h.setAttribute("name",e+"_hide_labelform_id_temp"),h.setAttribute("id",e+"_hide_labelform_id_temp");var b=document.createElement("input");b.setAttribute("type","hidden"),b.setAttribute("value",d),b.setAttribute("name",e+"_grading_totalform_id_temp"),b.setAttribute("id",e+"_grading_totalform_id_temp");var v=document.createElement("div");v.setAttribute("id","main_div");var w=document.createElement("div");w.setAttribute("id",e+"_elemet_tableform_id_temp");var g="yes"==n?"none":"table-cell",E=document.createElement("div");E.setAttribute("align","left"),E.style.display="table-cell",E.style.cssText="display:"+g+"; vertical-align:top; width:"+i+"px;",E.setAttribute("id",e+"_label_sectionform_id_temp");var A=document.createElement("div");A.setAttribute("align","left"),A.style.display="table-cell",A.setAttribute("id",e+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var j=document.createElement("br"),x=(document.createElement("br"),document.createElement("div"));x.setAttribute("id",e+"_elementform_id_temp");var k=document.createElement("span");k.setAttribute("id",e+"_element_labelform_id_temp"),k.innerHTML=t,k.setAttribute("class","label");var I=document.createElement("span");I.setAttribute("id",e+"_required_elementform_id_temp"),I.innerHTML="",I.setAttribute("class","required"),"yes"==_&&(I.innerHTML=" *");var C=document.getElementById("show_table");E.appendChild(k),E.appendChild(I),A.appendChild(h),A.appendChild(f),A.appendChild(y),A.appendChild(b),A.appendChild(x),w.appendChild(E),w.appendChild(A),v.appendChild(w),v.appendChild(j),C.appendChild(v),jQuery("#main_div").append(form_maker.type_grades_description),"top"==a&&label_top(e),change_class(r,e),refresh_attr(e,"type_grading"),refresh_grading_items(e)}function create_matrix_input_type(e,t){var i=jQuery('<label class="fm-field-label">Input Type</label>'),a=jQuery('<select class="fm-width-100" id="edit_for_select_input_type" name="edit_for_select_input_type" onChange="change_input_type('+e+",this.value); refresh_matrix("+e+')"></select>');return a.append(jQuery('<option id="edit_for_input_type_radio" value="radio"'+("radio"==t?' selected="selected"':"")+">Radio Button</option>")),a.append(jQuery('<option id="edit_for_input_type_checkbox" value="checkbox"'+("checkbox"==t?' selected="selected"':"")+">Check Box</option>")),a.append(jQuery('<option id="edit_for_input_type_text" value="text"'+("text"==t?' selected="selected"':"")+">Text Box</option>")),a.append(jQuery('<option id="edit_for_input_type_select" value="select"'+("select"==t?' selected="selected"':"")+">Drop Down</option>")),create_option_container(i,a)}function change_input_type(e,t){document.getElementById(e+"_input_typeform_id_temp").value=t}function refresh_matrix(e){for(i=100;0<i&&!document.getElementById("el_rows"+i);i--);for(m=i,i=100;0<i&&!document.getElementById("el_columns"+i);i--);n=i;var t=document.getElementById(e+"_table_little");t.innerHTML="";var a=document.createElement("div");for(a.setAttribute("id",e+"_element_tr0"),a.style.display="table-row",t.appendChild(a),(d=document.createElement("div")).setAttribute("id",e+"_element_td0_0"),d.style.display="table-cell",d.innerHTML="",a.appendChild(d),k=1;k<=n;k++)if(document.getElementById("el_columns"+k)){(o=document.createElement("div")).setAttribute("id",e+"_element_td0_"+k),o.setAttribute("class","matrix_"),o.style.display="table-cell";var l=document.createElement("label");l.setAttribute("id",e+"_label_elementform_id_temp0_"+k),l.setAttribute("name",e+"_label_elementform_id_temp0_"+k),l.setAttribute("class","ch-rad-label"),l.setAttribute("for",e+"_elementform_id_temp"+k),l.innerHTML=document.getElementById("el_columns"+k).value,o.appendChild(l),a.appendChild(o)}for(i=1;i<=m;i++)if(document.getElementById("el_rows"+i)){var d,_=document.createElement("div");_.setAttribute("id",e+"_element_tr"+i),_.style.display="table-row",(d=document.createElement("div")).setAttribute("id",e+"_element_td"+i+"_0"),d.setAttribute("class","matrix_"),d.style.display="table-cell";var r=document.createElement("label");for(r.setAttribute("id",e+"_label_elementform_id_temp"+i+"_0"),r.setAttribute("class","ch-rad-label"),r.setAttribute("for",e+"_elementform_id_temp"+i),r.innerHTML=document.getElementById("el_rows"+i).value,d.appendChild(r),_.appendChild(d),t.appendChild(_),"text"==document.getElementById("edit_for_select_input_type").value?document.getElementById("el_textbox").removeAttribute("style"):document.getElementById("el_textbox").style.display="none",k=1;k<=n;k++)if(document.getElementById("el_columns"+k)){var o;if((o=document.createElement("div")).setAttribute("id",e+"_element_td"+i+"_"+k),o.style.cssText="display:table-cell; text-align:center; padding:5px 0 0 5px;","select"==document.getElementById("edit_for_select_input_type").value){var s=document.createElement("select");s.setAttribute("id",e+"_select_yes_noform_id_temp"+i+"_"+k),s.setAttribute("name",e+"_select_yes_noform_id_temp"+i+"_"+k);var u=document.createElement("option");u.setAttribute("value",""),Nothing=document.createTextNode(" ");var c=document.createElement("option");c.setAttribute("value","yes"),Yes=document.createTextNode("Yes");var p=document.createElement("option");p.setAttribute("value","no"),No=document.createTextNode("No"),u.appendChild(Nothing),c.appendChild(Yes),p.appendChild(No),s.appendChild(u),s.appendChild(c),s.appendChild(p),o.appendChild(s)}else{var f=document.createElement("input");f.setAttribute("id",e+"_input_elementform_id_temp"+i+"_"+k),f.setAttribute("align","center"),f.setAttribute("size","14"),f.setAttribute("type",document.getElementById("edit_for_select_input_type").value),"radio"==document.getElementById("edit_for_select_input_type").value?(f.setAttribute("name",e+"_input_elementform_id_temp"+i),f.setAttribute("value",i+"_"+k)):"checkbox"==document.getElementById("edit_for_select_input_type").value?(f.setAttribute("name",e+"_input_elementform_id_temp"+i+"_"+k),f.setAttribute("value",1)):(document.getElementById(e+"_textbox_sizeform_id_temp").value=document.getElementById("edit_for_label_textbox_size").value,f.setAttribute("name",e+"_input_elementform_id_temp"+i+"_"+k),f.setAttribute("value",""),f.style.cssText="width:"+document.getElementById("edit_for_label_textbox_size").value+"px;"),o.appendChild(f)}_.appendChild(o)}}}function create_matrix_input_size(e,t,i){return create_option_container(jQuery('<label class="fm-field-label" for="edit_for_label_textbox_size">Text Box width(px)</label>'),jQuery('<input class="fm-width-100" type="text" id="edit_for_label_textbox_size" onKeyPress="return check_isnum(event)" onKeyUp="refresh_matrix('+e+')" value="'+t+'" />'),"el_textbox","text"==i)}function create_matrix_rows(e,t){var i=jQuery('<label class="fm-field-label">Rows</label>'),a=jQuery('<span class="fm-add-attribute dashicons dashicons-plus-alt" title="Add" id="el_rows_add" onClick="add_to_matrix(\'rows\', '+e+')"></span>'),l=jQuery('<div id="rows" class="fm-width-100"></div>');for(n=t.length,j=1;j<n;j++){var d=jQuery('<div class="fm-width-100 fm-fields-set" id="el_row'+j+'" idi="'+j+'"></div>'),_=jQuery('<div class="fm-width-90"></div>');_.append(create_matrix_row_item(e,j,t[j])),d.append(_);var r=jQuery('<div class="fm-width-10 fm-remove-button"><span class="fm-remove-attribute dashicons dashicons-dismiss" id="el_rows'+j+'_remove" onClick="remove_rowcols('+j+", "+e+", 'row')\"></span></div>");d.append(r),l.append(d)}var o=i;return create_option_container(null,o=(o=o.add(a)).add(l))}function create_matrix_row_item(e,t,i){jQuery('<label class="fm-field-label" for="el_title'+t+'">Name</label>');return create_option_container(null,jQuery('<input type="text" class="fm-width-100" id="el_rows'+t+'" onChange="change_label(\''+e+"_label_elementform_id_temp"+t+"_0', this.value); change_in_value('"+e+"_label_elementform_id_temp"+t+'_0\', this.value)" value="'+i+'" />'))}function create_matrix_columns(e,t){var i=jQuery('<label class="fm-field-label">Columns</label>'),a=jQuery('<span class="fm-add-attribute dashicons dashicons-plus-alt" title="Add" id="el_columns_add" onClick="add_to_matrix(\'columns\', '+e+')"></span>'),l=jQuery('<div id="columns" class="fm-width-100"></div>');for(n=t.length,j=1;j<n;j++){var d=jQuery('<div class="fm-width-100 fm-fields-set" id="el_column'+j+'" idi="'+j+'"></div>'),_=jQuery('<div class="fm-width-90"></div>');_.append(create_matrix_column_item(e,j,t[j])),d.append(_);var r=jQuery('<div class="fm-width-10 fm-remove-button"><span class="fm-remove-attribute dashicons dashicons-dismiss" id="el_rows'+j+'_remove" onClick="remove_rowcols('+j+", "+e+", 'column')\"></span></div>");d.append(r),l.append(d)}var o=i;return create_option_container(null,o=(o=o.add(a)).add(l))}function create_matrix_column_item(e,t,i){jQuery('<label class="fm-field-label" for="el_title'+t+'">Name</label>');return create_option_container(null,jQuery('<input type="text" class="fm-width-100" id="el_columns'+t+'" onChange="change_label(\''+e+"_label_elementform_id_temp0_"+t+"', this.value); change_in_value('"+e+"_label_elementform_id_temp0_"+t+'\', this.value)" value="'+i+'" />'))}function add_to_matrix(e,t){for(i=100;0<i&&!document.getElementById("el_rows"+i);i--);for(m="rows"==e?i+1:i,i=100;0<i&&!document.getElementById("el_columns"+i);i--);if(n="columns"==e?i+1:i,"rows"==e){var a=jQuery("#rows"),l=jQuery('<div class="fm-width-100 fm-fields-set" id="item_row_'+m+'" idi="'+m+'"></div>');(_=jQuery('<div class="fm-width-90"></div>')).append(create_matrix_row_item(t,m,"")),l.append(_);var d=jQuery('<div class="fm-width-10 fm-remove-button"><span class="fm-remove-attribute dashicons dashicons-dismiss" onClick="remove_rowcols('+m+", "+t+", 'row')\"></span></div>");l.append(d),a.append(l)}else{var _,r=jQuery("#columns");l=jQuery('<div class="fm-width-100 fm-fields-set" id="item_column_'+n+'" idi="'+n+'"></div>');(_=jQuery('<div class="fm-width-90"></div>')).append(create_matrix_column_item(t,n,"")),l.append(_);var o=jQuery('<div class="fm-width-10 fm-remove-button"><span class="fm-remove-attribute dashicons dashicons-dismiss" onClick="remove_rowcols('+n+", "+t+", 'column')\"></span></div>");l.append(o),r.append(l)}refresh_matrix(t)}function remove_rowcols(e,t,i){jQuery("#el_"+i+e).remove(),jQuery("#item_"+i+"_"+e).remove(),refresh_matrix(t)}function go_to_type_matrix(e){w_attr_name=[],w_attr_value=[],w_rows=["","row1","row2"],w_columns=["","column1","column2"],type_matrix(e,"Matrix","","top","no","radio",w_rows,w_columns,"no","wdform_matrix",w_attr_name,w_attr_value,"100")}function type_matrix(e,t,i,a,n,l,d,_,r,o,m,s,u){jQuery("#element_type").val("type_matrix"),delete_last_child();var c=jQuery("#edit_table"),p=jQuery('<div id="edit_div"></div>');c.append(p);var f=jQuery('<div id="edit_main_table"></div>');p.append(f),f.append(create_field_type("type_matrix")),f.append(create_label(e,t)),f.append(create_label_position(e,a)),f.append(create_hide_label(e,n)),f.append(create_required(e,r)),f.append(create_matrix_input_type(e,l)),f.append(create_matrix_input_size(e,u,l)),f.append(create_matrix_rows(e,d)),f.append(create_matrix_columns(e,_));var y=jQuery('<div class="inside"></div>');f.append(create_advanced_options_container(y)),y.append(create_field_label_size(e,i)),y.append(create_class(e,o)),y.append(create_additional_attributes(e,m,"type_matrix")),element="input",type="matrix";var h=document.createElement("input");h.setAttribute("type","hidden"),h.setAttribute("value","type_matrix"),h.setAttribute("name",e+"_typeform_id_temp"),h.setAttribute("id",e+"_typeform_id_temp");var b=document.createElement("input");b.setAttribute("type","hidden"),b.setAttribute("value",r),b.setAttribute("name",e+"_requiredform_id_temp"),b.setAttribute("id",e+"_requiredform_id_temp");var v=document.createElement("input");v.setAttribute("type","hidden"),v.setAttribute("value",n),v.setAttribute("name",e+"_hide_labelform_id_temp"),v.setAttribute("id",e+"_hide_labelform_id_temp");var w=document.createElement("input");w.setAttribute("type","hidden"),w.setAttribute("value",l),w.setAttribute("name",e+"_input_typeform_id_temp"),w.setAttribute("id",e+"_input_typeform_id_temp");var g=document.createElement("input");g.setAttribute("type","hidden"),g.setAttribute("value",u),g.setAttribute("name",e+"_textbox_sizeform_id_temp"),g.setAttribute("id",e+"_textbox_sizeform_id_temp");var E=document.createElement("div");E.setAttribute("id","main_div");var A=document.createElement("div");A.setAttribute("id",e+"_elemet_tableform_id_temp");var j="yes"==n?"none":"table-cell",x=document.createElement("div");x.setAttribute("align","left"),x.style.display=j,x.style.width=i+"px",x.setAttribute("id",e+"_label_sectionform_id_temp");var k=document.createElement("div");k.setAttribute("align","left"),k.style.display="table-cell",k.setAttribute("id",e+"_element_sectionform_id_temp");document.createElement("br"),document.createElement("br");var I=document.createElement("br"),C=(document.createElement("br"),document.createElement("div"));C.setAttribute("id",e+"_elementform_id_temp"),C.style.display="table";var B=document.createElement("div");B.setAttribute("id",e+"_table_little"),B.style.display="table-row-group",C.appendChild(B);var Q=document.createElement("span");Q.setAttribute("id",e+"_element_labelform_id_temp"),Q.innerHTML=t,Q.setAttribute("class","label");var T=document.createElement("span");T.setAttribute("id",e+"_required_elementform_id_temp"),T.innerHTML="",T.setAttribute("class","required"),"yes"==r&&(T.innerHTML=" *");var M=document.getElementById("show_table");x.appendChild(Q),x.appendChild(T),k.appendChild(h),k.appendChild(b),k.appendChild(v),k.appendChild(w),k.appendChild(g),k.appendChild(C),A.appendChild(x),A.appendChild(k),E.appendChild(A),E.appendChild(I),M.appendChild(E),jQuery("#main_div").append(form_maker.type_matrix_description),"top"==a&&label_top(e),change_class(o,e),refresh_attr(e,"type_matrix"),refresh_matrix(e)}function create_pagination_type(e){var t=jQuery('<label class="fm-field-label">Pagination Options</label>'),i=jQuery('<input type="radio" id="el_pagination_steps" name="el_pagination" onclick="pagination_type(\'steps\')"'+("steps"==e?' checked="checked"':"")+" />"),a=jQuery('<label for="el_pagination_steps">Steps</label>'),n=jQuery('<input type="radio" id="el_pagination_percentage" name="el_pagination" onclick="pagination_type(\'percentage\')"'+("percentage"==e?' checked="checked"':"")+" />"),l=jQuery('<label for="el_pagination_percentage">Percentage</label>'),d=jQuery('<input type="radio" id="el_pagination_none" name="el_pagination" onclick="pagination_type(\'none\')"'+("steps"!=e&&"percentage"!=e?' checked="checked"':"")+" />"),_=jQuery('<label for="el_pagination_none">No Context</label>'),r=i;return create_option_container(t,r=(r=(r=(r=(r=r.add(a)).add(n)).add(l)).add(d)).add(_))}function pagination_type(e){for(document.getElementById("pages_div").innerHTML="",w_pages=[],k=0,j=1;j<=form_view_max;j++)document.getElementById("form_id_tempform_view"+j)&&(k++,document.getElementById("form_id_tempform_view"+j).getAttribute("page_title")?w_pages[j]=document.getElementById("form_id_tempform_view"+j).getAttribute("page_title"):w_pages[j]="none");"steps"==e?make_page_steps(w_pages):"percentage"==e?make_page_percentage(w_pages):make_page_none()}function make_page_none(){document.getElementById("pages_div").innerHTML=""}function make_page_percentage(e){document.getElementById("pages_div").innerHTML="",show_title=document.getElementById("el_show_title_input").checked;var t=document.createElement("div");t.setAttribute("class","page_percentage_deactive");var i=document.createElement("div");i.setAttribute("id","div_percentage"),i.setAttribute("class","page_percentage_active");var a=document.createElement("b");for(i.appendChild(a),k=0,n="",j=1;j<=form_view_max;j++)if(e[j]&&(k++,"none"==e[j]&&(e[j]=""),j==form_view)){if(show_title){var n=document.createElement("span");1==k?n.style.paddingLeft="40px":n.style.paddingLeft="5px",n.innerHTML=e[j]}page_number=k}a.innerHTML=Math.round((page_number-1)/k*100)+"%",i.style.width=(page_number-1)/k*100+"%",t.appendChild(i),n&&t.appendChild(n),document.getElementById("pages_div").appendChild(t)}function make_page_steps(e){for(document.getElementById("pages_div").innerHTML="",show_title=document.getElementById("el_show_title_input").checked,k=0,j=1;j<=form_view_max;j++)e[j]&&(k++,"none"==e[j]&&(e[j]=""),page_number=document.createElement("span"),j==form_view?page_number.setAttribute("class","page_active"):page_number.setAttribute("class","page_deactive"),show_title?page_number.innerHTML=e[j]:page_number.innerHTML=k,document.getElementById("pages_div").appendChild(page_number))}function create_pagination_title(e){return create_option_container(jQuery('<label class="fm-field-label" for="el_show_title_input">Show Page Titles in Progress Bar</label>'),jQuery('<input type="checkbox" id="el_show_title_input" onClick="show_title_pagebreak()"'+(e?' checked="checked"':"")+" />"))}function show_title_pagebreak(){document.getElementById("pages_div").innerHTML="",document.getElementById("el_pagination_steps").checked?pagination_type("steps"):document.getElementById("el_pagination_percentage").checked&&pagination_type("percentage")}function create_pagination_numbers(e){return create_option_container(jQuery('<label class="fm-field-label" for="el_show_numbers_input">Show Page Numbers in Footer</label>'),jQuery('<input type="checkbox" id="el_show_numbers_input" onClick="show_numbers_pagebreak()"'+(e?' checked="checked"':"")+" />"))}function show_numbers_pagebreak(){if(document.getElementById("numbers_div").innerHTML="",document.getElementById("el_show_numbers_input").checked){for(k=0,j=1;j<=form_view_max;j++)document.getElementById("form_id_tempform_view"+j)&&(k++,j==form_view&&(page_number=k));var e=document.createElement("span");e.setAttribute("class","page_numbersform_id_temp"),e.innerHTML=page_number+"/"+k,document.getElementById("numbers_div").appendChild(e)}}function create_page_titles(){var e=jQuery('<label class="fm-field-label">Pages Titles</label>'),t=jQuery('<div id="items" class="fm-width-100"></div>');for(k=0,j=1;j<=form_view_max;j++){var i=jQuery("#form_id_tempform_view"+j);if(0<i.length){var a=jQuery('<div class="fm-width-100"></div>'),n=i.attr("page_title");null==typeof n&&(n="Untitled Page");var l=jQuery('<input type="text" class="fm-width-90" id="page_title_'+j+'" onKeyUp="set_page_title(this.value, '+j+')" value="'+n+'" />');a.append(jQuery("<label>"+j+". </label>")),a.append(l),t.append(a)}}return create_option_container(null,l=(l=e).add(t))}function set_page_title(e,t){e=e.replace(/(<([^>]+)>)/gi,""),document.getElementById("form_id_tempform_view"+t).setAttribute("page_title",e),show_title_pagebreak()}function el_page_navigation(){w_type=document.getElementById("pages").getAttribute("type"),w_show_numbers=!1,w_show_title=!1,"true"==document.getElementById("pages").getAttribute("show_numbers")&&(w_show_numbers=!0),"true"==document.getElementById("pages").getAttribute("show_title")&&(w_show_title=!0),w_attr_name=[],w_attr_value=[],type_page_navigation(w_type,w_show_title,w_show_numbers,w_attr_name,w_attr_value)}function type_page_navigation(e,t,i,a,n){need_enable&&enable2(),jQuery("#element_type").val("type_page_navigation"),delete_last_child();var l=jQuery("#edit_table"),d=jQuery('<div id="edit_div"></div>');l.append(d);var _=jQuery('<div id="edit_main_table"></div>');for(d.append(_),_.append(create_field_type("type_page_navigation")),_.append(create_pagination_type(e)),_.append(create_pagination_title(t)),_.append(create_pagination_numbers(i)),_.append(create_page_titles()),w_pages=[],k=0,j=1;j<=form_view_max;j++)document.getElementById("form_id_tempform_view"+j)&&(document.getElementById("form_id_tempform_view"+j).getAttribute("page_title")?w_pages[j]=document.getElementById("form_id_tempform_view"+j).getAttribute("page_title"):w_pages[j]="Untitled Page");var r=document.createElement("div");r.setAttribute("id","main_div");var o=document.createElement("table");o.setAttribute("id","_elemet_tableform_id_temp"),o.setAttribute("width","90%");var m=document.createElement("tr"),s=document.createElement("td");s.setAttribute("valign","top"),s.setAttribute("align","left"),s.setAttribute("id","_element_sectionform_id_temp"),s.setAttribute("width","100%");var u=document.createElement("br"),c=document.createElement("div");c.setAttribute("align","left"),c.setAttribute("id","pages_div"),c.style.width="100%",c.innerHTML="";var p=document.createElement("div");p.setAttribute("align","center"),p.setAttribute("id","numbers_div"),p.style.width="100%",p.style.paddingTop="100px",p.innerHTML="",s.appendChild(c),s.appendChild(p);var f=document.getElementById("show_table");m.appendChild(s),o.appendChild(m),r.appendChild(o),r.appendChild(u),f.appendChild(r),"steps"==e?make_page_steps(w_pages):"percentage"==e?make_page_percentage(w_pages):make_page_none(w_pages),i&&show_numbers_pagebreak()}function refresh_page_numbers(){var a=jQuery(".wdform-page-and-images"),n="true"==document.getElementById("pages").getAttribute("show_numbers");a.each(function(e){var t=jQuery(this).find(".form_id_tempform_view_img").attr("id").split("form_id_tempform_view_img");if(j=t[1],document.getElementById("page_numbersform_id_temp"+j)&&(document.getElementById("page_numbersform_id_temp"+j).innerHTML="",n)){var i=document.createElement("span");i.setAttribute("class","page_numbersform_id_temp"),i.innerHTML=e+1+"/"+a.length,document.getElementById("page_numbersform_id_temp"+j).appendChild(i)}})}function gen_form_fields(){switch(wdtype){case"type_editor":w_editor=document.getElementById("wdform_field"+id).innerHTML,form_fields+=w_field_label+"*:*w_field_label*:*",form_fields+=w_editor+"*:*w_editor*:*",form_fields+="*:*new_field*:*";break;case"type_send_copy":for(w_hide_label=document.getElementById(id+"_hide_labelform_id_temp").value,w_first_val=document.getElementById(id+"_elementform_id_temp").checked,atrs=return_attributes(id+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],form_fields+=w_field_label+"*:*w_field_label*:*",form_fields+=w_field_label_size+"*:*w_field_label_size*:*",form_fields+=w_field_label_pos+"*:*w_field_label_pos*:*",form_fields+=w_hide_label+"*:*w_hide_label*:*",form_fields+=w_first_val+"*:*w_first_val*:*",form_fields+=w_required+"*:*w_required*:*",j=0;j<w_attr_name.length;j++)form_fields+=w_attr_name[j]+"="+w_attr_value[j]+"*:*w_attr_name*:*";form_fields+="*:*new_field*:*";break;case"type_text":for(w_first_val=document.getElementById(id+"_elementform_id_temp").value,w_title=document.getElementById(id+"_elementform_id_temp").title,w_regExp_status=document.getElementById(id+"_regExpStatusform_id_temp").value,w_regExp_value=document.getElementById(id+"_regExp_valueform_id_temp").value,w_regExp_common=document.getElementById(id+"_regExp_commonform_id_temp").value,w_regExp_arg=document.getElementById(id+"_regArgumentform_id_temp").value,w_regExp_alert=document.getElementById(id+"_regExp_alertform_id_temp").value,w_readonly=document.getElementById(id+"_readonlyform_id_temp").value,w_hide_label=document.getElementById(id+"_hide_labelform_id_temp").value,atrs=return_attributes(id+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],form_fields+=w_field_label+"*:*w_field_label*:*",form_fields+=w_field_label_size+"*:*w_field_label_size*:*",form_fields+=w_field_label_pos+"*:*w_field_label_pos*:*",form_fields+=w_hide_label+"*:*w_hide_label*:*",form_fields+=w_size+"*:*w_size*:*",form_fields+=w_first_val+"*:*w_first_val*:*",form_fields+=w_title+"*:*w_title*:*",form_fields+=w_required+"*:*w_required*:*",form_fields+=w_regExp_status+"*:*w_regExp_status*:*",form_fields+=w_regExp_value+"*:*w_regExp_value*:*",form_fields+=w_regExp_common+"*:*w_regExp_common*:*",form_fields+=w_regExp_arg+"*:*w_regExp_arg*:*",form_fields+=w_regExp_alert+"*:*w_regExp_alert*:*",form_fields+=w_unique+"*:*w_unique*:*",form_fields+=w_readonly+"*:*w_readonly*:*",form_fields+=w_class+"*:*w_class*:*",j=0;j<w_attr_name.length;j++)form_fields+=w_attr_name[j]+"="+w_attr_value[j]+"*:*w_attr_name*:*";form_fields+="*:*new_field*:*";break;case"type_number":for(w_first_val=document.getElementById(id+"_elementform_id_temp").value,w_title=document.getElementById(id+"_elementform_id_temp").title,atrs=return_attributes(id+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],form_fields+=w_field_label+"*:*w_field_label*:*",form_fields+=w_field_label_size+"*:*w_field_label_size*:*",form_fields+=w_field_label_pos+"*:*w_field_label_pos*:*",form_fields+=w_size+"*:*w_size*:*",form_fields+=w_first_val+"*:*w_first_val*:*",form_fields+=w_title+"*:*w_title*:*",form_fields+=w_required+"*:*w_required*:*",form_fields+=w_unique+"*:*w_unique*:*",form_fields+=w_class+"*:*w_class*:*",j=0;j<w_attr_name.length;j++)form_fields+=w_attr_name[j]+"="+w_attr_value[j]+"*:*w_attr_name*:*";form_fields+="*:*new_field*:*";break;case"type_password":for(w_verification=document.getElementById(id+"_verification_id_temp").value,w_placeholder=document.getElementById(id+"_elementform_id_temp").placeholder,document.getElementById(id+"_1_element_labelform_id_temp").innerHTML?w_verification_label=document.getElementById(id+"_1_element_labelform_id_temp").innerHTML:w_verification_label=" ",w_hide_label=document.getElementById(id+"_hide_labelform_id_temp").value,atrs=return_attributes(id+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],form_fields+=w_field_label+"*:*w_field_label*:*",form_fields+=w_field_label_size+"*:*w_field_label_size*:*",form_fields+=w_field_label_pos+"*:*w_field_label_pos*:*",form_fields+=w_hide_label+"*:*w_hide_label*:*",form_fields+=w_size+"*:*w_size*:*",form_fields+=w_required+"*:*w_required*:*",form_fields+=w_unique+"*:*w_unique*:*",form_fields+=w_class+"*:*w_class*:*",form_fields+=w_verification+"*:*w_verification*:*",form_fields+=w_verification_label+"*:*w_verification_label*:*",form_fields+=w_placeholder+"*:*w_placeholder*:*",j=0;j<w_attr_name.length;j++)form_fields+=w_attr_name[j]+"="+w_attr_value[j]+"*:*w_attr_name*:*";form_fields+="*:*new_field*:*";break;case"type_textarea":for(w_hide_label=document.getElementById(id+"_hide_labelform_id_temp").value,w_first_val=document.getElementById(id+"_elementform_id_temp").value,w_title=document.getElementById(id+"_elementform_id_temp").title,s=document.getElementById(id+"_elementform_id_temp").style.height,w_size_h=s.substring(0,s.length-2),w=document.getElementById(id+"_elementform_id_temp").style.width,w_size_w=w.substring(0,w.length-2),atrs=return_attributes(id+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],form_fields+=w_field_label+"*:*w_field_label*:*",form_fields+=w_field_label_size+"*:*w_field_label_size*:*",form_fields+=w_field_label_pos+"*:*w_field_label_pos*:*",form_fields+=w_hide_label+"*:*w_hide_label*:*",form_fields+=w_size+"*:*w_size_w*:*",form_fields+=w_size_h+"*:*w_size_h*:*",form_fields+=w_first_val+"*:*w_first_val*:*",form_fields+=w_title+"*:*w_title*:*",form_fields+=w_required+"*:*w_required*:*",form_fields+=w_unique+"*:*w_unique*:*",form_fields+=w_class+"*:*w_class*:*",j=0;j<w_attr_name.length;j++)form_fields+=w_attr_name[j]+"="+w_attr_value[j]+"*:*w_attr_name*:*";form_fields+="*:*new_field*:*";break;case"type_wdeditor":for(w_title=document.getElementById(id+"_elementform_id_temp").title,s=document.getElementById(id+"_elementform_id_temp").style.height,w_size_h=s.substring(0,s.length-2),w=document.getElementById(id+"_elementform_id_temp").style.width,w_size_w=w.substring(0,w.length-2),atrs=return_attributes(id+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],form_fields+=w_field_label+"*:*w_field_label*:*",form_fields+=w_field_label_size+"*:*w_field_label_size*:*",form_fields+=w_field_label_pos+"*:*w_field_label_pos*:*",form_fields+=w_size+"*:*w_size_w*:*",form_fields+=w_size_h+"*:*w_size_h*:*",form_fields+=w_title+"*:*w_title*:*",form_fields+=w_required+"*:*w_required*:*",form_fields+=w_class+"*:*w_class*:*",j=0;j<w_attr_name.length;j++)form_fields+=w_attr_name[j]+"="+w_attr_value[j]+"*:*w_attr_name*:*";form_fields+="*:*new_field*:*";break;case"type_phone":for(w_hide_label=document.getElementById(id+"_hide_labelform_id_temp").value,w_first_val=[document.getElementById(id+"_element_firstform_id_temp").value,document.getElementById(id+"_element_lastform_id_temp").value],w_title=[document.getElementById(id+"_element_firstform_id_temp").title,document.getElementById(id+"_element_lastform_id_temp").title],s=document.getElementById(id+"_element_lastform_id_temp").style.width,w_size=s.substring(0,s.length-2),w_mini_labels=[document.getElementById(id+"_mini_label_area_code").innerHTML,document.getElementById(id+"_mini_label_phone_number").innerHTML],atrs=return_attributes(id+"_element_firstform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],form_fields+=w_field_label+"*:*w_field_label*:*",form_fields+=w_field_label_size+"*:*w_field_label_size*:*",form_fields+=w_field_label_pos+"*:*w_field_label_pos*:*",form_fields+=w_hide_label+"*:*w_hide_label*:*",form_fields+=w_size+"*:*w_size*:*",form_fields+=w_first_val.join("***")+"*:*w_first_val*:*",form_fields+=w_title.join("***")+"*:*w_title*:*",form_fields+=w_mini_labels.join("***")+"*:*w_mini_labels*:*",form_fields+=w_required+"*:*w_required*:*",form_fields+=w_unique+"*:*w_unique*:*",form_fields+=w_class+"*:*w_class*:*",j=0;j<w_attr_name.length;j++)form_fields+=w_attr_name[j]+"="+w_attr_value[j]+"*:*w_attr_name*:*";form_fields+="*:*new_field*:*";break;case"type_phone_new":for(w_hide_label=document.getElementById(id+"_hide_labelform_id_temp").value,w_first_val=document.getElementById(id+"_elementform_id_temp").value,w_top_country=document.getElementById(id+"_elementform_id_temp").getAttribute("top-country"),atrs=return_attributes(id+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],form_fields+=w_field_label+"*:*w_field_label*:*",form_fields+=w_field_label_size+"*:*w_field_label_size*:*",form_fields+=w_field_label_pos+"*:*w_field_label_pos*:*",form_fields+=w_hide_label+"*:*w_hide_label*:*",form_fields+=w_size+"*:*w_size*:*",form_fields+=w_first_val+"*:*w_first_val*:*",form_fields+=w_top_country+"*:*w_top_country*:*",form_fields+=w_required+"*:*w_required*:*",form_fields+=w_unique+"*:*w_unique*:*",form_fields+=w_class+"*:*w_class*:*",j=0;j<w_attr_name.length;j++)form_fields+=w_attr_name[j]+"="+w_attr_value[j]+"*:*w_attr_name*:*";form_fields+="*:*new_field*:*";break;case"type_name":if(document.getElementById(id+"_enable_fieldsform_id_temp")){w_name_format="normal",w_first_val=[document.getElementById(id+"_element_firstform_id_temp").value,document.getElementById(id+"_element_lastform_id_temp").value],w_title=[document.getElementById(id+"_element_firstform_id_temp").title,document.getElementById(id+"_element_lastform_id_temp").title];for(var e=["title","middle"],t=0;t<2;t++)w_first_val.push(document.getElementById(id+"_element_"+e[t]+"form_id_temp")?document.getElementById(id+"_element_"+e[t]+"form_id_temp").value:""),w_title.push(document.getElementById(id+"_element_"+e[t]+"form_id_temp")?document.getElementById(id+"_element_"+e[t]+"form_id_temp").title:"")}else document.getElementById(id+"_element_middleform_id_temp")?w_name_format="extended":w_name_format="normal","normal"==w_name_format?(w_first_val=[document.getElementById(id+"_element_firstform_id_temp").value,document.getElementById(id+"_element_lastform_id_temp").value],w_title=[document.getElementById(id+"_element_firstform_id_temp").title,document.getElementById(id+"_element_lastform_id_temp").title]):(w_first_val=[document.getElementById(id+"_element_firstform_id_temp").value,document.getElementById(id+"_element_lastform_id_temp").value,document.getElementById(id+"_element_titleform_id_temp").value,document.getElementById(id+"_element_middleform_id_temp").value],w_title=[document.getElementById(id+"_element_firstform_id_temp").title,document.getElementById(id+"_element_lastform_id_temp").title,document.getElementById(id+"_element_titleform_id_temp").title,document.getElementById(id+"_element_middleform_id_temp").title]);for(document.getElementById(id+"_mini_label_title")?w_mini_title=document.getElementById(id+"_mini_label_title").innerHTML:w_mini_title="Title",document.getElementById(id+"_mini_label_middle")?w_mini_middle=document.getElementById(id+"_mini_label_middle").innerHTML:w_mini_middle="Middle",w_hide_label=document.getElementById(id+"_hide_labelform_id_temp").value,w_mini_labels=[w_mini_title,document.getElementById(id+"_mini_label_first").innerHTML,document.getElementById(id+"_mini_label_last").innerHTML,w_mini_middle],w_name_title=document.getElementById(id+"_enable_fieldsform_id_temp")?document.getElementById(id+"_enable_fieldsform_id_temp").getAttribute("title"):"normal"==w_name_format?"no":"yes",w_name_middle=document.getElementById(id+"_enable_fieldsform_id_temp")?document.getElementById(id+"_enable_fieldsform_id_temp").getAttribute("middle"):"normal"==w_name_format?"no":"yes",w_name_fields=[w_name_title,w_name_middle],w_autofill=document.getElementById(id+"_autofillform_id_temp").value,s=document.getElementById(id+"_element_firstform_id_temp").style.width,w_size=s.substring(0,s.length-2),atrs=return_attributes(id+"_element_firstform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],form_fields+=w_field_label+"*:*w_field_label*:*",form_fields+=w_field_label_size+"*:*w_field_label_size*:*",form_fields+=w_field_label_pos+"*:*w_field_label_pos*:*",form_fields+=w_hide_label+"*:*w_hide_label*:*",form_fields+=w_first_val.join("***")+"*:*w_first_val*:*",form_fields+=w_title.join("***")+"*:*w_title*:*",form_fields+=w_mini_labels.join("***")+"*:*w_mini_labels*:*",form_fields+=w_size+"*:*w_size*:*",form_fields+=w_name_format+"*:*w_name_format*:*",form_fields+=w_required+"*:*w_required*:*",form_fields+=w_unique+"*:*w_unique*:*",form_fields+=w_class+"*:*w_class*:*",form_fields+=w_name_fields.join("***")+"*:*w_name_fields*:*",form_fields+=w_autofill+"*:*w_autofill*:*",j=0;j<w_attr_name.length;j++)form_fields+=w_attr_name[j]+"="+w_attr_value[j]+"*:*w_attr_name*:*";form_fields+="*:*new_field*:*";break;case"type_paypal_price":for(w_first_val=[document.getElementById(id+"_element_dollarsform_id_temp").value,document.getElementById(id+"_element_centsform_id_temp").value],w_title=[document.getElementById(id+"_element_dollarsform_id_temp").title,document.getElementById(id+"_element_centsform_id_temp").title],"none"==document.getElementById(id+"_td_name_cents").style.display?w_hide_cents="yes":w_hide_cents="no",s=document.getElementById(id+"_element_dollarsform_id_temp").style.width,w_size=s.substring(0,s.length-2),atrs=return_attributes(id+"_element_dollarsform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_range_min=document.getElementById(id+"_range_minform_id_temp").value,w_range_max=document.getElementById(id+"_range_maxform_id_temp").value,w_mini_labels=[document.getElementById(id+"_mini_label_dollars").innerHTML,document.getElementById(id+"_mini_label_cents").innerHTML],form_fields+=w_field_label+"*:*w_field_label*:*",form_fields+=w_field_label_size+"*:*w_field_label_size*:*",form_fields+=w_field_label_pos+"*:*w_field_label_pos*:*",form_fields+=w_first_val.join("***")+"*:*w_first_val*:*",form_fields+=w_title.join("***")+"*:*w_title*:*",form_fields+=w_mini_labels.join("***")+"*:*w_mini_labels*:*",form_fields+=w_size+"*:*w_size*:*",form_fields+=w_required+"*:*w_required*:*",form_fields+=w_hide_cents+"*:*w_hide_cents*:*",form_fields+=w_class+"*:*w_class*:*",form_fields+=w_range_min+"*:*w_range_min*:*",form_fields+=w_range_max+"*:*w_range_max*:*",j=0;j<w_attr_name.length;j++)form_fields+=w_attr_name[j]+"="+w_attr_value[j]+"*:*w_attr_name*:*";form_fields+="*:*new_field*:*";break;case"type_paypal_price_new":for(w_first_val=document.getElementById(id+"_elementform_id_temp").value,w_title=document.getElementById(id+"_elementform_id_temp").title,s=document.getElementById(id+"_elementform_id_temp").style.width,w_size=s.substring(0,s.length-2),atrs=return_attributes(id+"_elementform_id_temp"),w_attr_name=atrs[0],w_attr_value=atrs[1],w_range_min=document.getElementById(id+"_range_minform_id_temp").value,w_range_max=document.getElementById(id+"_range_maxform_id_temp").value,w_readonly=document.getElementById(id+"_readonlyform_id_temp").value,w_hide_label=document.getElementById(id+"_hide_labelform_id_temp").value,"none"==document.getElementById(id+"_td_name_currency").style.display?w_currency="yes":w_currency="no",form_fields+=w_field_label+"*:*w_field_label*:*",form_fields+=w_field_label_size+"*:*w_field_label_size*:*",form_fields+=w_field_label_pos+"*:*w_field_label_pos*:*",form_fields+=w_hide_label+"*:*w_hide_label*:*",form_fields+=w_first_val+"*:*w_first_val*:*",form_fields+=w_title+"*:*w_title*:*",form_fields+=w_size+"*:*w_size*:*",form_fields+=w_required+"*:*w_required*:*",form_fields+=w_class+"*:*w_class*:*",form_fields+=w_range_min+"*:*w_range_min*:*",form_fields+=w_range_max+"*:*w_range_max*:*",form_fields+=w_readonly+"*:*w_readonly*:*",form_fields+=w_currency+"*:*w_currency*:*",j=0;j<w_attr_name.length;j++)form_fields+=w_attr_name[j]+"="+w_attr_value[j]+"*:*w_attr_name*:*";form_fields+="*:*new_field*:*";break;case"type_address":s=document.getElementById(id+"_div_address").style.width,w_size=s.substring(0,s.length-2),document.getElementById(id+"_mini_label_street1")?w_street1=document.getElementById(id+"_mini_label_street1").innerHTML:w_street1=document.getElementById(id+"_street1form_id_temp").value,document.getElementById(id+"_mini_label_street2")?w_street2=document.getElementById(id+"_mini_label_street2").innerHTML:w_street2=document.getElementById(id+"_street2form_id_temp").value,document.getElementById(id+"_mini_label_city")?w_city=document.getElementById(id+"_mini_label_city").innerHTML:w_city=document.getElementById(id+"_cityform_id_temp").value,document.getElementById(id+"_mini_label_state")?w_state=document.getElementById(id+"_mini_label_state").innerHTML:w_state=document.getElementById(id+"_stateform_id_temp").value,document.getElementById(id+"_mini_label_postal")?w_postal=document.getElementById(id+"_mini_label_postal").innerHTML:w_postal=document.getElementById(id+"_postalform_id_temp").value,document.getElementById(id+"_mini_label_country")?w_country=document.getElementById(id+"_mini_label_country").innerHTML:w_country=document.getElementById(id+"_countryform_id_temp").value,w_mini_labels=[w_street1,w_street2,w_city,w_state,w_postal,w_country];var i=document.getElementById(id+"_disable_fieldsform_id_temp");for(w_street1_dis=i.getAttribute("street1"),w_street2_dis=i.getAttribute("street2"),w_city_dis=i.getAttribute("city"),w_state_dis=i.getAttribute("state"),w_us_states_dis=i.getAttribute("us_states"),w_postal_dis=i.getAttribute("postal"),w_country_dis=i.getAttribute("country"),w_disabled_fields=[w_street1_dis,w_street2_dis,w_city_dis,w_state_dis,w_postal_dis,w_country_dis,w_us_states_dis],w_hide_label=document.getElementById(id+"_hide_labelform_id_temp").value,atrs=return_attributes(id+"_street1form_id_temp"),w_attr_name=atrs[0],w_attr_v