<?php /* Smarty version Smarty-3.1.8, created on 2019-10-16 15:34:23
         compiled from "/home/stg70/public_html/agmc-v2/application/core/views/manage/standard/FormJavascript.tpl" */ ?>
<?php /*%%SmartyHeaderCode:15740904975da7003f41ecd4-10732991%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '7b6ba160c56c2ad0b029326c0aad476947428097' => 
    array (
      0 => '/home/stg70/public_html/agmc-v2/application/core/views/manage/standard/FormJavascript.tpl',
      1 => 1571049180,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '15740904975da7003f41ecd4-10732991',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'language' => 0,
    'formID' => 0,
    '__FORM_SETTINGS' => 0,
    '__FORMOBJECT' => 0,
    'langauge' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.8',
  'unifunc' => 'content_5da7003f4ebab7_11945238',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5da7003f4ebab7_11945238')) {function content_5da7003f4ebab7_11945238($_smarty_tpl) {?><script>


var __FORMCOMPONENT		=	{};
var NEW_ITEM			=	"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblNewItem'];?>
";
var lblLinkWithDatabase	=	"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblLinkWithDatabase'];?>
";
var lblPredefinedOptions=	"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblPredefinedOptions'];?>
";
var msgDeleteItem		=	"<?php echo $_smarty_tpl->tpl_vars['language']->value['msgDeleteItem'];?>
";
var lblWarningMessage	=	"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblWarningMessage'];?>
";
var errDisableCriteria	=	"<?php echo $_smarty_tpl->tpl_vars['language']->value['errDisableCriteria'];?>
";
var errDisableCriteriaMessage	=	"<?php echo $_smarty_tpl->tpl_vars['language']->value['errDisableCriteriaMessage'];?>
";
var formID				= 	"<?php echo $_smarty_tpl->tpl_vars['formID']->value;?>
";
var editor				=	'';
var __FORM_SETTINGS,__FORMOBJECT;

/*Langauge lables*/
var lblImportPredefinedChoices = "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblImportPredefinedChoices'];?>
";



<?php if ($_smarty_tpl->tpl_vars['formID']->value>0){?>
	var __FORM_SETTINGS = 	<?php echo $_smarty_tpl->tpl_vars['__FORM_SETTINGS']->value;?>
;
	var __FORMOBJECT	=	<?php echo html_entity_decode($_smarty_tpl->tpl_vars['__FORMOBJECT']->value);?>
;
	if(__FORM_SETTINGS['afterFormSubmission']=="ShowText"){
		__FORM_SETTINGS['afterFormSubmissionActionarea']=__FORM_SETTINGS['afterFormSubmissionAction'];
	}
	else{
		__FORM_SETTINGS['afterFormSubmissionActiontext']=__FORM_SETTINGS['afterFormSubmissionAction'];
	}
<?php }?>		
var fieldOptions = {
    "textSizes": [{
            value: "small",
            text: "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblSmall'];?>
"
        }, {
            value: "medium",
            text: "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblMedium'];?>
"
        }, {
            value: "large",
            text: "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblLarge'];?>
"
        }
    ],
	"layouts": [{
            value: "col1",
            text: "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblColumn1'];?>
"
        }, {
            value: "col2",
            text: "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblRow'];?>
"
        }
    ],
    "elemetTypes": [{
            value: "address",
            text: "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblAddressControler'];?>
"
        }, {
            value: "businesstype",
            text: "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblBusinessTypeControler'];?>
"
        }, {
            value: "checkbox",
            text: "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblCheckboxControler'];?>
"
        }, {
            value: "country",
            text: "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblCountrySelectControler'];?>
"
        }, {
            value: "countryState",
            text: "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblCountryStateControler'];?>
"
        }, {
            value: "date",
            text: "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblDateControler'];?>
"
        }, {
            value: "email",
            text: "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblEmailControler'];?>
"
        }, {
            value: "file",
            text: "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFileUploaderControler'];?>
"
        }, {
            value: "html",
            text: "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblHtmlControler'];?>
"
        }, {
            value: "image",
            text: "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblImageUploaderControler'];?>
"
        }, {
            value: "name",
            text: "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblNameControler'];?>
"
        }, {
            value: "radio",
            text: "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblRadiobuttonControler'];?>
"
        }, {
            value: "select",
            text: "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblSelectBoxControler'];?>
"
        }, {
            value: 'select_multiple',
            text: "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblMultiselectControler'];?>
"
        }, {
            value: "text",
            text: "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblTextboxControler'];?>
"
        }, {
            value: "textarea",
            text: "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblTextareaControler'];?>
"
        }, {
            value: "website",
            text: "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblWebsiteControler'];?>
"
        }
    ],
	allowedExtensions:[
		{ 'type':'doc' },
		{ 'type':'jpg' },
		{ 'type':'gif' },
		{ 'type':'zip' },
		{ 'type':'rar' },
		{ 'type':'txt' },
		{ 'type':'png' },
		{ 'type':'xls' },
		{ 'type':'pdf' }
	],
	validate:[{
		rule:"required",
		text:"Required",
		applicable:[
			"address",
			"businesstype",
			"checkbox",
			"country",
			"state",
			'province',
			"countryState",
			'agreement',
			"date",
			"email",
			"file",
			"image",
			"name",
			"radio",
			"select",
			"select_multiple",
			"text",
			"textarea",
			"city",
			"zip",
			"website"
                        
		]
	},{
		rule:"email",
		text:"Email",
		applicable:[
			"text",
			"textarea",
			"email"
		]
	},{
		rule:"isPercentage",
		text:"Percentage",
		applicable:[
			"text"
		]
	},{
		rule:"isWholeNumber",
		text:"Whole Number",
		applicable:[
			"text"
		]
	},{
		rule:"isInteger",
		text:"Integer",
		applicable:[
			"text"
		]
	},{
		rule:"isPrice",
		text:"Price",
		applicable:[
			"text"
		]
	},{
		rule:"isNumber",
		text:"Number",
		applicable:[
			"text"
		]
	},{
		rule:"isFloat",
		text:"Float",
		applicable:[
			"text"
		]
	},{
		rule:"isLoginName",
		text:"Login Name",
		applicable:[
			"text"
		]
	},{
		rule:"isMultipleEmail",
		text:"Multiple Email",
		applicable:[
			"text",
			"textarea",
			"email"
		]
	},
	{
		rule:"isUrl",
		text:"Website",
		applicable:[
			"text",
			"textarea",
			"website"
		]
	}
      ]
};

__FORMCOMPONENT['html']={
            "type": "html",
			"name":"html",
            "group": "standard",
			"category":"html",
			"multiple":false,
            "defaults": {
                "label": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblParagraphText'];?>
",
                "instruction": "",
				"text":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris fermentum odio sed ipsum fringilla ut tempor magna accumsan. Aliquam erat volutpat. Vestibulum euismod ipsum non risus dignissim hendrerit. Nam metus arcu, blandit in cursus nec, placerat vitae arcu. Maecenas ornare porta mi, et tincidunt nulla luctus"
            }
        };
__FORMCOMPONENT['text']={
            "type": "text",
			"name":"text",
            "caption": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblSingleLineText'];?>
",
            "group": "standard",
			"category":"input",
			"multiple":false,
            "defaults": {
                "instruction": "",
                "tabindex": "",
				"validate":[],
				"error":"<?php echo $_smarty_tpl->tpl_vars['language']->value['errSingleLineText'];?>
",
				"enableSearch":false,
                "limitation": 0,
                "limitMin": 0,
                "limitMax": 50,
                "limitType": 'Words',
				"showInList":true,
                "size": 'small',
                "value": ''
            }
        };
__FORMCOMPONENT['date']={
            "type": "date",
			"name":"date",
            "caption": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lbldate'];?>
",
            "group": "standard",
			"category":"input",
			"multiple":false,
            "defaults": {
                "instruction": "",
				"tabindex": "",
				"validate":[],
				"error":"<?php echo $_smarty_tpl->tpl_vars['language']->value['errDateTime'];?>
",
				"enableSearch":false,
                "enableRageSelection": 0,
                "size": "small",
                "timeFormat": 0,
				"showInList":true,
                "dateFormat": 0,
                "yearRangeMin": "1930",
                "yearRangeMax": (new Date).getFullYear()
            }
        };	
__FORMCOMPONENT['email']={
            "type": "email",
			"name":"email",
            "caption": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblEmail'];?>
",
            "group": "standard",
			"category":"input",
			"multiple":false,
            "defaults": {
                "instruction": "",
				"tabindex": "",
				"validate":['email'],
				"error":"<?php echo $_smarty_tpl->tpl_vars['language']->value['errEmailAddress'];?>
",
				"enableSearch":false,
				"showInList":true,
                "noDuplicates": 0,
                "size":"small",
                "value": ""
            }
        };	
__FORMCOMPONENT['website']={
            "type": "website",
			"name":'website',
            "caption": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblWebsite'];?>
",
            "group": "standard",
			"category":"input",
			"multiple":false,
            "defaults": {
                "instruction": "",
				"tabindex": "",
				"validate":[],
				"error":"<?php echo $_smarty_tpl->tpl_vars['language']->value['errWebsiteAddress'];?>
",
				"enableSearch":false,
				"showInList":true,
                "noDuplicates": 0,
                "size": "small",
                "value": "http://"
            }
        };
__FORMCOMPONENT['province']={
            "type": "province",
			"name":"province",
            "caption": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblStateProvince'];?>
",
            "group": "standard",
			"category":"input",
			"multiple":false,
            "defaults": {
                "instruction": "",
				"tabindex": "",
				"validate":[],
				"error":"<?php echo $_smarty_tpl->tpl_vars['language']->value['errEnterProvince'];?>
",
				"enableSearch":false,
				"showInList":true,
                "noDuplicates": 0,
                "size": "small",
                "value": ""
            }
        };		
__FORMCOMPONENT['textarea']={
            "type": "textarea",
			"name":"textarea",
            "caption": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblMultiLineText'];?>
",
            "group": "standard",
			"category":"input",
			"multiple":false,
            "defaults": {
                "instruction": "",
				"tabindex": "",
				"validate":[],
				"error":"<?php echo $_smarty_tpl->tpl_vars['language']->value['errSingleLineTextArea'];?>
",
				"enableSearch":false,
				"showInList":true,
				"rows":4,
				"cols":100,
                "limitation": 0,
                "limitMin": 0,
                "limitMax":50,
                "limitType": "Words",
                "size": "small",
                "value": ""
            }
        };
__FORMCOMPONENT['checkbox']={
            "type": "checkbox",
			"name":"checkbox",
            "caption": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblCheckboxes'];?>
",
            "group": "standard",
			"category":"input",
			"multiple":true,
            "defaults": {
                "instruction": "",
				"tabindex": "",
				"validate":[],
				"error":"<?php echo $_smarty_tpl->tpl_vars['language']->value['errChoices'];?>
",
				"enableSearch":false,
				"showInList":true,
                "randomize": 0,
                "allowOther": 0,
                "layout": "col1",
                "items": [{
                        "text": "Checkbox 1",
                        "selected": true,
						"optionOrder":0
                    }, {
                        "text": "Checkbox 2",
                        "selected": false,
						"optionOrder":1
                    }, {
                        "text": "Checkbox 3",
                        "selected": false,
						"optionOrder":2
                    }
                ],
                "value": "Checkbox 1"
            }
        };

__FORMCOMPONENT['radio']={
            "type": "radio",
			"name":'radio',
            "caption": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblMultipleChoice'];?>
",
            "group": "standard",
			"category":"select",
			"multiple":true,
            "defaults": {
                "instruction": "",
				"tabindex": "",
				"validate":[],
				"error":"<?php echo $_smarty_tpl->tpl_vars['language']->value['errChoices'];?>
",
				"enableSearch":false,
				"showInList":true,
                "randomize": 0,
                "layout": "col1",
                "items": [{
                        "text": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblChoice1'];?>
",
                        "selected": true,
						"optionOrder":0
                    }, {
                        "text":"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblChoice2'];?>
",
                        "selected": false,
						"optionOrder":1
                    }, {
                        "text": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblChoice3'];?>
",
                        "selected": false,
						"optionOrder":2
                    }
                ],
                "value": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblChoice1'];?>
"
            }
        };
__FORMCOMPONENT['select']={
		"type": "select", 
		"name": "select", 
		"caption": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblSelectBoxControler'];?>
", 
		"group": "standard", 
		"category": "select", 
		"multiple": false, 
		"defaults": {
			"instruction": "", 
			"tabindex": "",
			"validate": [ ], 
			"error": "<?php echo $_smarty_tpl->tpl_vars['language']->value['errChoices'];?>
", 
			"enableSearch": false, 
			"showInList": true, 
			"size": "small", 
			"items": [
				{
					"text": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblSelect1'];?>
", 
					"selected": true, 
					"optionOrder": 0
				}, 
				{
					"text": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblSelect2'];?>
", 
					"selected": false, 
					"optionOrder": 1
				}, 
				{
					"text": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblSelect3'];?>
", 
					"selected": false, 
					"optionOrder": 2
				}, 
				{
					"text": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblSelect4'];?>
", 
					"selected": false, 
					"optionOrder": 3
				}, 
				{
					"text": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblSelect5'];?>
", 
					"selected": false, 
					"optionOrder": 4
				}
			], 
			"value": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblSelect1'];?>
"
		}
	};
__FORMCOMPONENT['country']={
		"type": "country", 
		"name": "country", 
		"caption": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblCountry'];?>
", 
		"group": "standard", 
		"category": "select", 
		"multiple": false, 
		"defaults": {
			"instruction": "", 
			"tabindex": "",
			"validate": [ ], 
			"error": "<?php echo $_smarty_tpl->tpl_vars['language']->value['errSelectCountry'];?>
", 
			"enableSearch": false, 
			"showInList": true, 
			"size": "small", 
			"items": [
				{
					"text": "Select", 
					"selected": true
				}
			], 
			"value": "Afghanistan"
		}
	};
__FORMCOMPONENT['state']={
		"type": "state", 
		"name": "state", 
		"caption": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblState'];?>
", 
		"group": "standard", 
		"category": "select", 
		"multiple": false, 
		"defaults": {
			"instruction": "", 
			"tabindex": "",
			"validate": [ ], 
			"error": "<?php echo $_smarty_tpl->tpl_vars['language']->value['errSelectTheState'];?>
", 
			"showInList": true, 
			"size": "small", 
			"items": [
				{
					"text": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblSelectState'];?>
", 
					"selected": true
				}
			], 
			"value": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblSelectState'];?>
"
		}
	};
__FORMCOMPONENT['businesstype']={
		"type": "businesstype", 
		"name": "businesstype", 
		"caption": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblMenuBusinessTypes'];?>
", 
		"group": "standard", 
		"category": "select", 
		"multiple": false, 
		"defaults": {
			"instruction": "", 
			"tabindex": "",
			"validate": [ ], 
			"error": "<?php echo $_smarty_tpl->tpl_vars['language']->value['errSelectBusiness'];?>
", 
			"enableSearch": false, 
			"showInList": true, 
			"size": "small", 
			"items": [
				{
					"text": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblSelectBusinessTypes'];?>
", 
					"selected": true
				}
			], 
			"value": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblSelectBusinessTypes'];?>
"
		}
	};
__FORMCOMPONENT['select_multiple']={
		"type": "select_multiple", 
		"name": "select_multiple", 
		"caption": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblList'];?>
", 
		"group": "standard", 
		"category": "select", 
		"multiple": false, 
		"defaults": {
			"instruction": "", 
			"tabindex": "",
			"validate": [ ], 
			"error": "<?php echo $_smarty_tpl->tpl_vars['langauge']->value['errChoices'];?>
", 
			"enableSearch": false, 
			"showInList": true, 
			"size": "small", 
			"items": [
				{
					"text": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblValue1'];?>
", 
					"selected": false, 
					"optionOrder": 0
				}, 
				{
					"text": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblValue2'];?>
", 
					"selected": false, 
					"optionOrder": 1
				}, 
				{
					"text": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblValue3'];?>
", 
					"selected": false, 
					"optionOrder": 2
				}
			], 
			"value": ""
		}
	};
__FORMCOMPONENT['name']={
		"items": [
			{
				"type": "text", 
				"name": "name", 
				"caption": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFirstName'];?>
", 
				"group": "standard", 
				"category": "input", 
				"multiple": false, 
				"defaults": __FORMCOMPONENT['text'].defaults
			}, 
			{
				"type": "text", 
				"name": "name", 
				"caption": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblLastName'];?>
", 
				"group": "standard", 
				"category": "input", 
				"multiple": false, 
				"defaults": __FORMCOMPONENT['text'].defaults
			}
		]
	};	
__FORMCOMPONENT['file']={
		"type": "file", 
		"name": "file", 
		"caption": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFileUploaderControler'];?>
", 
		"group": "standard", 
		"category": "file", 
		"multiple": false, 
		"defaults": {
			"enableSearch": false, 
			"tabindex": "",
			"instruction": "", 
			"validate": [ ], 
			"error": "<?php echo $_smarty_tpl->tpl_vars['language']->value['errPleaseUploadAFileType'];?>
", 
			"allowedExtensions": [
				"doc"
			], 
			"maxSize": 0, 
			"maxSizeUnit": "KB"
		}
	};	
__FORMCOMPONENT['address']={
		"address": [
			{
				"type": "text", 
				"name": "name", 
				"caption": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblAddress1'];?>
", 
				"group": "standard", 
				"category": "input", 
				"multiple": false, 
				"defaults": __FORMCOMPONENT['text'].defaults
			}, 
			{
				"type": "text", 
				"name": "name", 
				"caption": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblAddress2'];?>
", 
				"group": "standard", 
				"category": "input", 
				"multiple": false, 
				"defaults": __FORMCOMPONENT['text'].defaults
			}, 
			{
				"type": "text", 
				"name": "city", 
				"caption": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblCity'];?>
", 
				"group": "standard", 
				"category": "input", 
				"multiple": false, 
				"defaults": __FORMCOMPONENT['text'].defaults
			}, 
			__FORMCOMPONENT['country'], 
			__FORMCOMPONENT['state'], 
			__FORMCOMPONENT['province'], 
			{
				"type": "text", 
				"name": "zip", 
				"caption": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblZipcode'];?>
", 
				"group": "standard", 
				"category": "input", 
				"multiple": false, 
				"defaults": __FORMCOMPONENT['text'].defaults
			}
		]
	};	
__FORMCOMPONENT['countryState']={
		"items":[
			__FORMCOMPONENT['country'],
			__FORMCOMPONENT['state'],
			__FORMCOMPONENT['province']
		]
        };	
__FORMCOMPONENT['image']={
		"type": "image", 
		"name": "image", 
		"caption": "<?php echo $_smarty_tpl->tpl_vars['language']->value['lblImage'];?>
", 
		"group": "standard", 
		"category": "file", 
		"multiple": false, 
		"defaults": {
			"instruction": "", 
			"tabindex": "",
			"validate": [ ], 
			"error": "Please select any image", 
			"enableSearch": false
		}
	};	
		
var controllerObject = {
    "html": {
        "type": "html",
        "template": "htmlControllerTemplate",
        "data": __FORMCOMPONENT['html']
    },
    "text": {
        "type": "text",
        "template": "textboxControllerTemplate",
        "data": $.extend(true, {}, __FORMCOMPONENT['text'])
    },
	"province": {
        "type": "text",
        "template": "textboxControllerTemplate",
		"data": __FORMCOMPONENT['province']
    },
    "textarea": {
        "type": "textarea",
        "template": "textareaControllerTemplate",
        "data": __FORMCOMPONENT['textarea']
    },
    "checkbox": {
        "type": "checkbox",
        "template": "checkboxControllerTemplate",
        "data": __FORMCOMPONENT['checkbox']
    },
	"agreement": {
        "type": "checkbox",
        "template": "agreementControllerTemplate",
        "data": __FORMCOMPONENT['agreement']
    },
    "radio": {
        "type": "radio",
        "template": "radioControllerTemplate",
        "data": __FORMCOMPONENT['radio']
    },
    "select": {
        "type": "select",
        "template": "selectControllerTemplate",
        "data": __FORMCOMPONENT['select']
    },
	"businesstype": {
        "type": "select",
        "template": "selectControllerTemplate",
        "data": __FORMCOMPONENT['businesstype']
    },
    "select_multiple": {
        "type": "select_multiple",
        "template": "listControllerTemplate",
        "data": __FORMCOMPONENT['select_multiple']
    },
    "date": {
        "type": "text",
        "template": "textboxControllerTemplate",
        "data": __FORMCOMPONENT['date']
    },
    "email": {
        "type": "email",
        "template": "textboxControllerTemplate",
        "data": __FORMCOMPONENT['email']
    },
    "website": {
        "type": "website",
        "template": "textboxControllerTemplate",
        "data": __FORMCOMPONENT['website']
    },
    "name": {
        "type": "name",
        "template": "textboxControllerTemplate",
        "data": __FORMCOMPONENT['name']
    },
    "file": {
        "type": "file",
        "template": "uploadControllerTemplate",
        "data": __FORMCOMPONENT['file']
    },
    "country": {
        "type": "select",
        "template": "countryControllerTemplate",
        "data": __FORMCOMPONENT['country']
    },
	"state": {
        "type": "select",
        "template": "selectControllerTemplate",
        "data": __FORMCOMPONENT['state']
    },
    "address": {
        "type": "select",
        "template": "addressControllerTemplate",
        "data": __FORMCOMPONENT['address']
    },
    "countryState": {
        "type": "select",
        "template": "countryStateControllerTemplate",
        "data": __FORMCOMPONENT['countryState']
    },
    "image": {
        "type": "file",
        "template": "imageControllerTemplate",
        "data": __FORMCOMPONENT['image']
    }
};

 var pre_options={
	"pre_gender":new Array(
		"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormMale'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormFemale'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormPreferNottoAnswer'];?>
"
	),
	"pre_age":new Array(
		"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormUnder18'];?>
","18-24","25-34","35-44",
		"45-54","55-64","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblForm65orAbove'];?>
",
		"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormPreferNottoAnswer'];?>
"
	),
	"pre_employment":new Array(
		"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormEmployedFullTime'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormEmployedPartTime'];?>
",
		"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormSelfemployed'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormNotemployedbut'];?>
",
		"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormNotEmployed'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormHomemaker'];?>
",
		"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormRetired'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormStudent'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormPreferNottoAnswer'];?>
"
	),
	"pre_education":new Array(
		"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormSomeHighSchool'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormHighSchoolGraduateEquivalent'];?>
",
		"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormTradeVocationalDegree'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormSomeCollege'];?>
",
		"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormAssociateDegree'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormBachelorsDegree'];?>
",
		"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormGraduateProfessionalDegree'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormPreferNottoAnswer'];?>
"
	),
	"pre_marital":new Array(
		"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormSingleNeverMarried'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormMarried'];?>
",
		"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormLivingwithPartner'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormSeparated'];?>
",
		"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormDivorced'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormWidowed'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormPreferNottoAnswer'];?>
"
	),
	"pre_race":new Array(
		"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormWhiteCaucasian'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormSpanishHispanicLatino'];?>
",
		"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormBlackAfricanAmerican'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormAsian'];?>
",
		"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormPacificIslander'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormNativeAmerican'];?>
",
		"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormOther'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormPreferNottoAnswer'];?>
"
	),
	"pre_months":new Array(
		"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormJanuary'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormFebruary'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormMarch'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormApril'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormMay'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormJune'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormJuly'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormAugust'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormSeptember'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormOctober'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormNovember'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormDecember'];?>
"
	),
	"pre_days":new Array(
		"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormMonday'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormTuesday'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormWednesday'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormThursday'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormFriday'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormSaturday'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormSunday'];?>
"
	),
	"pre_continents":new Array(
		"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormAfrica'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormAntarctica'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormAsia'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormAustralia'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormEurope'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormNorthAmerica'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormSouthAmerica'];?>
"
	),
	"pre_howoften":new Array(
		"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormEveryday'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormOnceweek'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblForm2timesMonth'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormOnceMonth'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormLessthanOnceMonth'];?>
"
	),
	"pre_howlong":new Array(
		"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormLessThanMonth'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblForm16months'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblForm13years'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormOver3Years'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormNeverused'];?>
"
	),
	"pre_satisfied":new Array(
		"<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormVerySatisfied'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormSatisfied'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormNeutral'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormUnsatisfied'];?>
","<?php echo $_smarty_tpl->tpl_vars['language']->value['lblFormVeryUnsatisfied'];?>
"
	)
	
};
<?php if ($_smarty_tpl->tpl_vars['formID']->value>0){?>
	var html="";
	for(key in __FORMOBJECT){
		var element		=	__FORMOBJECT[key];
		var elementType	=	element['data']['type'];
		if(typeof element['data']['defaults']!='undefined'){ 
			var validateRule=	element['data']['defaults']['validate'];
			if(typeof validateRule=='undefined'){
				element['data']['defaults']['validate']=[];
			}
		}
		var templateID	=	controllerObject[elementType].template;
		var data		=	element['data'];
		var extradata	=	new Object();
		extradata.uniqueID=element['uniqueID'];
		extradata.elementType=element['elementType'];
		html+='<li class="sub clearfix ui-draggable formElement " data-controller="'+elementType+'" style="display: block;" uniqueid="'+element['uniqueID']+'" rel="fieldSettings">'+$( "#"+templateID).render( data,extradata )+'</li>';
		
	}
	$("#dynamicForm").html(html);
	addLiClass();
<?php }?>

function addLiClass(){
	if(__FORM_SETTINGS['fieldAlignment']=="frm-style01" || __FORM_SETTINGS['fieldAlignment']=="frm-style03"){
				$(".element-three").remove();
				$("#dynamicForm li").removeClass('odd')
				$("#dynamicForm li").removeClass('even')
				$("#dynamicForm li").each(function(index){
					if(index%2){
						$(this).addClass('even');
						$(this).after('<li class="element-three ui-disabled clearfix"></li>');
					}
					else{
						$(this).addClass('odd');
					}
				});
			}
			else{
				$(".element-three").remove();
				$("#dynamicForm li").each(function(){
					$(this).after('<li class="element-three ui-disabled clearfix"></li>');
				});
			}
}	

</script><?php }} ?>