Array . prototype . indexOf || ( Array . prototype . indexOf = function ( a ) {

"use strict" ;

if ( null === this ) throw new TypeError ;

var b = Object ( this ) ,

c = b. length >>> 0 ;

if ( 0 === c ) return - 1 ;

var d = 0 ;

if ( arguments. length > 0 && ( d = Number ( arguments [ 1 ] ) , d != d ? d = 0 : 0 !== d && d != 1 / 0 && d != - 1 / 0 && ( d = ( d > 0 || - 1 ) * Math . floor ( Math . abs ( d ) ) ) ) , d >= c ) return - 1 ;

for ( var e = d >= 0 ? d : Math . max ( c - Math . abs ( d ) , 0 ) ; e < c ; e ++ )

if ( e in b && b [ e ] === a ) return e ;

return - 1

} ) , Number . prototype . toFixed = function ( a ) {

a = a || 0 , a = a > 20 ? 20 : a ;

var b = Math . pow ( 10 , a ) ,

c = ( Math . round ( Math . round ( this * b * 100 ) / 100 ) / b ) . toString ( ) ;

return c. indexOf ( "." ) >= 0 ? c + b. toString ( ) . substr ( c. length - c. indexOf ( "." ) ) : 0 === a ? c : c + "." + b. toString ( ) . substr ( 1 )

} , jQuery. noConflict ( ) ,

function ( window , $ ) {

"use strict" ;

var console = window. console || {

log : function ( ) { } ,

warn : function ( ) { } ,

error : function ( ) { }

} ,

Formstack = window. Formstack || { } ;

Formstack. Form = function ( a , b ) {

this . id = a , this . baseUrl = b , this . currentPage = 1 , this . pages = $ ( "div.fsPage" ) . length , this . logicFields = [ ] , this . checks = [ ] , this . hasHtml5Validation = "object" == typeof document. createElement ( "input" ) . validity , this . jsonp = ! 1 , this . calculations = [ ] , this . calcFields = [ ] , this . validate = ! 0 , this . forLogic = ! 1 , this . failedContainers = [ ] , this . onChange = ! 1 , this . touched = ! 1 , this . form = jQuery ( "#fsForm" + this . id ) , this . skipPageValidation = jQuery ( "#fsSkipPageValidation" ) . val ( ) , this . skipValidation = ! 1 , this . initializing = ! 1 , this . fireLogicEvents = ! 1 , this . bottleneckFieldId = null , this . viewparam = jQuery ( "#viewparam" ) . val ( ) , this . lastActiveCallout = null , this . pages > 1 && ( $ ( "#fsNextButton" + this . id ) . click ( $. proxy ( this . nextPage , this ) ) , $ ( "#fsPreviousButton" + this . id ) . click ( $. proxy ( this . previousPage , this ) ) ) , this . hasHtml5Validation || ( document. getElementById ( "fsForm" + this . id ) . novalidate = ! 1 ) , this . integrations = { } , this . plugins = { }

} , Formstack. Form . prototype . resetSubmitButton = function ( ) {

var a = document. getElementById ( "fsSubmitButton" + this . id ) ,

b = document. getElementById ( "submitButtonText" ) ;

a && b && ( a. value = b. innerHTML )

} , Formstack. Form . prototype . isLastPage = function ( a ) {

if ( 1 == this . pages ) return ! 0 ;

for ( var b = 1 , c = 1 ; c <= this . pages ; c ++ ) this . pageIsVisible ( c ) && ( b = c ) ;

return a == b

} , Formstack. Form . prototype . nextPage = function ( ) {

if ( ! ( this . currentPage + 1 > this . pages ) ) {

if ( ! this . skipPageValidation ) {

if ( ! this . checkPage ( this . currentPage ) ) return void this . form . trigger ( "form:validation-error" )

}

for ( var a = ( document. getElementById ( "fsPage" + this . id + "-" + this . currentPage ) , 1 ) ; ! this . pageIsVisible ( this . currentPage + a ) && this . currentPage + a < this . pages ; ) a ++;

var b = this . currentPage + a ;

this . changePage ( this . currentPage , b )

}

} , Formstack. Form . prototype . previousPage = function ( a ) {

if ( this . currentPage - 1 != 0 ) {

for ( var b = ( document. getElementById ( "fsPage" + this . id + "-" + this . currentPage ) , 1 ) ; ! this . pageIsVisible ( this . currentPage - b ) && this . currentPage - b > 1 ; ) b ++;

var c = this . currentPage - b ;

this . changePage ( this . currentPage , c )

}

} , Formstack. Form . prototype . checkPage = function ( a ) {

var b , c ;

if ( ! this . validate ) return ! 0 ;

var d = document. getElementById ( "fsPage" + this . id + "-" + a ) ;

b = $ ( d ) . find ( "input" ) ;

var e = 0 ;

for ( this . failedContainers = [ ] , c = 0 ; c < b. length ; c ++ ) this . checkFormat ( b [ c ] ) && e ++;

var f = b. length == e ;

if ( ! f ) return ! 1 ;

b = $ ( d ) . find ( ".fsRequired" ) ;

var g = ! 0 ;

for ( c = 0 ; c < b. length ; c ++ ) {

var h = b [ c ] ,

i = this . getFieldContainer ( h ) ,

j = $ ( b [ c ] ) . parents ( ".fsMatrixFieldset" ) ,

k = void 0 !== j [ 0 ] && "disabled" === $ ( j [ 0 ] ) . attr ( "disabled" ) ;

if ( ! h. disabled && ! k )

if ( this . hasAlreadyFailedValidation ( b [ c ] ) ) {

var l = $ ( i ) . find ( ".fsRequired" ) ;

l. length > 1 && ( c += l. length - 2 )

} else if ( this . checkRequired ( b [ c ] ) ) {

var m = this . getFieldContainer ( b [ c ] ) ,

n = this . failedContainers . indexOf ( m ) ; - 1 != n && this . failedContainers . splice ( n , 1 )

} else g = ! 1 , this . failedContainers . push ( i )

}

return f && g ? $ ( "#fsError" + this . id ) . remove ( ) : this . focusFirstError ( ) , f && g

} , Formstack. Form . prototype . initLogic = function ( ) {

for ( var a = 0 ; a < this . logicFields . length ; a ++ )

for ( var b = this . getFields ( this . logicFields [ a ] ) , c = 0 ; c < b. length ; c ++ ) {

b [ c ] . type . toLowerCase ( ) ;

$ ( b [ c ] ) . bind ( "change" , $. proxy ( this . checkLogic , this ) ) , this . checkLogic ( b [ c ] )

}

} , Formstack. Form . prototype . initCalculations = function ( ) {

var a ;

for ( a = 0 ; a < this . calcFields . length ; a ++ ) {

for ( var b = this . calcFields [ a ] . match ( /(\d+)/ ) [ 1 ] , c = this . getFields ( b ) , d = 0 ; d < c. length ; d ++ ) {

var e = c [ d ] ,

f = e. type . toLowerCase ( ) ,

g = "radio" == f || "checkbox" == f ? "click" : "change" ;

$ ( e ) . bind ( g , $. proxy ( this . updateCalculations , this ) )

}

var h = document. getElementById ( "field" + b + "_othervalue" ) ;

h && $ ( h ) . bind ( "change" , $. proxy ( function ( a ) {

var b = null ,

c = "" ,

d = "" ;

if ( a ) {

var e = a. currentTarget . id . indexOf ( "_othervalue" ) ; - 1 != e ? ( c = a. currentTarget . id . substring ( 0 , e ) , d = a. currentTarget . id . substring ( 5 , e ) ) : d = a. currentTarget . id . substring ( 5 )

}

h = document. getElementById ( c + "_othervalue" ) , b = document. getElementById ( c + "_other" ) , b && ( b. checked = "" !== h. value ) , this . updateCalculations ( d ) , this . checkLogic ( d )

} , this ) )

}

for ( a = 0 ; a < this . calculations . length ; a ++ ) this . evalCalculation ( this . calculations [ a ] )

} , Formstack. Form . prototype . initFields = function ( ) {

$ ( ".fsField.fsRequired" ) . bind ( "change" , $. proxy ( function ( a ) {

this . checkRequired ( a. target , ! 0 )

} , this ) ) , $ ( ".fsField" ) . bind ( "change" , $. proxy ( function ( a ) {

this . checkFormat ( a. target , ! 0 )

} , this ) ) , $ ( ".fsField.fsFormatNumber.fsRequired" ) . bind ( "blur" , $. proxy ( function ( a ) {

this . checkRequired ( a. target , ! 0 )

} , this ) ) , $ ( ".fsField.fsFormatNumber" ) . bind ( "blur" , $. proxy ( function ( a ) {

this . checkFormat ( a. target , ! 0 )

} , this ) ) , $ ( "input.fsOtherField" ) . change ( function ( a ) {

var b = $ ( this ) . attr ( "id" ) . split ( "_" ) [ 0 ] ,

c = $ ( "#" + b + "_other" ) ;

c. prop ( "checked" , "" !== $ ( this ) . val ( ) ) , c. trigger ( "change" )

} ) , $ ( ":not(input:radio, input:checkbox).fsField" ) . focus ( $. proxy ( this . focus , this ) ) , $ ( ":not(input:radio, input:checkbox).fsField" ) . blur ( $. proxy ( this . focus , this ) ) , $ ( "input:radio.fsField, input:checkbox.fsField" ) . click ( $. proxy ( this . focus , this ) ) , $ ( "div.fsCallout" ) . each ( function ( a ) {

$ ( this ) . hide ( )

} )

} , Formstack. Form . prototype . initMatrixes = function ( ) {

$ ( "table.fsMatrixOnePerColumn input" ) . each ( $. proxy ( function ( a , b ) {

var c = b. type . toLowerCase ( ) ;

"radio" != c && "checkbox" != c || $ ( b ) . click ( $. proxy ( function ( a ) {

this . checkMatrixOnePerColumn ( b. id )

} , this ) )

} , this ) )

} , Formstack. Form . prototype . initSignatures = function ( ) {

$ ( ".fsSignature" ) . each ( $. proxy ( function ( a , b ) {

var c = this . getFieldId ( b. id ) ;

$ ( b ) . jSignature ( ) , $ ( b ) . bind ( "change" , function ( a ) {

$ ( "#field" + c ) . val ( $ ( a. target ) . jSignature ( "getData" ) )

} ) , $ ( "#signatureClear" + c ) . bind ( "click" , function ( a ) {

$ ( b ) . jSignature ( "reset" )

} )

} , this ) )

} , Formstack. Form . prototype . initTextAreas = function ( ) {

$ ( "textarea.fsTextAreaMaxLength" ) . each ( $. proxy ( function ( a , b ) {

var c = b. id . match ( /(\d+)/ ) [ 1 ] ,

b = $ ( b ) ,

d = $ ( "#fsCounter" + c ) ,

e = b. attr ( "maxlength" ) ;

e > 0 && ( b. keyup ( $. proxy ( function ( a ) {

this . textareaCharLimiter ( c , e )

} , this ) ) , b. data ( "x" , b. outerWidth ( ) ) , b. data ( "y" , b. outerHeight ( ) ) , b. mouseup ( $. proxy ( function ( a ) {

var b = jQuery ( a. target ) ;

b. outerWidth ( ) === b. data ( "x" ) && b. outerHeight ( ) === b. data ( "y" ) || d. width ( b. outerWidth ( ) ) , b. data ( "x" , b. outerWidth ( ) ) , b. data ( "y" , b. outerHeight ( ) )

} ) ) , d. width ( b. outerWidth ( ) ) , d. text ( e + "/" + e ) , d. show ( ) )

} , this ) )

} , Formstack. Form . prototype . initCalendars = function ( ) {

for ( var a = $ ( "div .fsCalendar" ) . get ( ) , b = 0 ; b < a. length ; b ++ ) {

var c = a [ b ] ,

d = c. id . match ( /(\d+)/ ) ;

d = d [ 1 ] ;

var e = document. getElementById ( "field" + d + "Y" ) . options ,

f = parseInt ( e [ 1 ] . value , 10 ) ,

g = parseInt ( e [ e. length - 1 ] . value , 10 ) ,

h = ( new Date ) . getFullYear ( ) ;

f < 100 && ( f += f > h - 2e3 ? 1900 : 2e3 ) , g < 100 && ( g += 2e3 ) ;

var i = document. getElementById ( "field" + d + "Format" ) . value ,

j = "mm/dd/yy" ;

"DMY" == i ? j = "dd/mm/yy" : "YMD" == i ? j = "yy/mm/dd" : "MY" == i && ( j = "mm/yy/dd" ) ;

var k = $ ( "#" + c. id + "Link" ) ;

if ( ! $. datepicker ) return void k. css ( "display" , "none" ) ;

k. datepicker ( {

minDate : new Date ( f , 0 , 1 ) ,

maxDate : new Date ( g , 11 , 31 ) ,

buttonImage : $ ( "#fsCalendar" + d + "ImageUrl" ) . html ( ) ,

buttonImageOnly : ! 0 ,

beforeShow : this . calendarShow ,

onSelect : this . calendarSelect ,

showOn : "both" ,

dateFormat : j ,

buttonText : "Select Date"

} )

}

} , Formstack. Form . prototype . initAutocompletes = function ( ) {

$ ( ".fsAutocomplete" ) . each ( $. proxy ( function ( a , b ) {

var c = b. id . match ( /(\d+)/ ) [ 1 ] ,

d = document. getElementById ( "field" + c ) ,

e = document. getElementById ( "field" + c + "_options" ) . value ;

$ ( d ) . autocomplete ( {

source : e. split ( "|" )

} )

} ) )

} , Formstack. Form . prototype . initSliders = function ( ) {

$ ( ".fsSliderDiv" ) . each ( $. proxy ( function ( a , b ) {

var c , d = b. id . match ( /(\d+)/ ) [ 1 ] ,

e = document. getElementById ( "field" + d ) ;

if ( c = this . getNumberProperties ( e ) , ! isNaN ( c. min ) && ! isNaN ( c. max ) ) {

var f = document. getElementById ( e. id + "-slidervalue" ) ,

g = "" !== e. val ? parseFloat ( e. value ) : c. min ;

isNaN ( g ) && ( g = c. min ) ;

var h = document. querySelector ( '[href*="default-v4.css"]' ) ;

$ ( b ) . slider ( {

min : c. min ,

max : c. max ,

value : g ,

form : this ,

num : c ,

field : e ,

slideval : f ,

range : !! h && "min"

} ) , isNaN ( c. decimals ) || ( g = g. toFixed ( c. decimals ) ) , e. value = g , f. innerHTML = Formstack. Util . formatNumber ( c , g ) , $ ( b ) . bind ( "slide" , function ( a , b ) {

var c = $ ( this ) . slider ( "option" , "form" ) ,

d = $ ( this ) . slider ( "option" , "num" ) ,

e = $ ( this ) . slider ( "option" , "field" ) ,

f = $ ( this ) . slider ( "option" , "slideval" ) ;

d = c. getNumberProperties ( e ) ;

var g = b. value ;

e. value = g , f. innerHTML = Formstack. Util . formatNumber ( d , g ) ;

var h = e. id . match ( /(\d+)/ ) [ 1 ] ;

c. calcFields . indexOf ( h ) >= 0 && c. updateCalculations ( h ) , c. logicFields . indexOf ( h ) >= 0 && c. checkLogic ( h )

} )

}

} , this ) )

} , Formstack. Form . prototype . initSaveResume = function ( ) {

$ ( ".fsSaveIncomplete" ) . click ( $. proxy ( this . saveIncomplete , this ) )

} , Formstack. Form . prototype . initPayments = function ( ) {

if ( document. querySelector ( ".fsFormatCreditCard" ) ) {

this . paymentIntegrations = { } ;

var a = document. getElementById ( "fsForm" + this . id ) ,

b = a. getAttribute ( "action" ) ,

c = b. substring ( 0 , b. lastIndexOf ( "/" ) ) + "/integration.php" ;

$. ajax ( {

url : c ,

dataType : "json" ,

data : {

f : this . id ,

i : "payment" ,

v : document. querySelector ( '[name="viewkey"]' ) . value

} ,

success : function ( a ) {

for ( var b in a. data )

if ( a. data . hasOwnProperty ( b ) ) {

var c = "init" + b. charAt ( 0 ) . toUpperCase ( ) + b. slice ( 1 ) ;

"function" == typeof this [ c ] && this [ c ] ( a. data [ b ] )

}

} . bind ( this )

} )

}

} , Formstack. Form . prototype . initStripe = function ( a ) {

this . paymentIntegrations . stripe = { } ;

var b = this . paymentIntegrations . stripe ;

if ( ! a. publishable_key ) {

var c = document. getElementById ( "paymentInitError" ) ,

d = c && c. innerHTML ? c. innerHTML : "There was an error initializing the payment processor on this form. Please contact the form owner to correct this issue." ;

return this . showError ( d ) , b. key = "error" , void ( document. getElementById ( "fsSubmitButton" + this . id ) . disabled = ! 0 )

}

var e = document. createElement ( "script" ) ;

e. type = "text/javascript" , e. src = "https://js.stripe.com/v2" , document. getElementsByTagName ( "head" ) [ 0 ] . appendChild ( e ) , b. mappings = { } , b. key = a. publishable_key ;

var f = {

card_num : "number" ,

card_code : "cvc" ,

address : "address_line1" ,

city : "address_city" ,

country : "address_country" ,

state : "address_state" ,

zip : "address_zip"

} ;

for ( var g in a. field_map )

if ( a. field_map . hasOwnProperty ( g ) && a. field_map [ g ] )

if ( "exp_date" !== g ) {

var h = document. getElementById ( "field" + a. field_map [ g ] ) ,

i = a. field_map [ g ] ;

if ( ! h ) {

var j = g ;

"name" === j. slice ( - 4 ) && ( j = j. substr ( 0 , j. length - 5 ) ) ;

var k = document. getElementById ( "field" + a. field_map [ g ] + "-" + j ) ;

if ( ! k ) continue ;

i += "-" + j

}

f [ g ] ? b. mappings [ f [ g ] ] = i : b. mappings [ g ] = i

} else b. mappings . exp_month = a. field_map [ g ] + "M" , b. mappings . exp_year = a. field_map [ g ] + "Y"

} , Formstack. Form . prototype . prepareStripe = function ( ) {

if ( this . paymentIntegrations . stripe . success = ! 1 , ! Stripe || ! this . paymentIntegrations . stripe . mappings ) return ! 1 ;

var a = { } ,

b = this . paymentIntegrations . stripe . mappings ;

for ( var c in b )

if ( b. hasOwnProperty ( c ) && "first_name" !== c && "last_name" !== c ) {

var d = document. getElementById ( "field" + b [ c ] ) ;

if ( d ) {

if ( "number" === c && d. disabled ) return this . sanitizeCC ( null , b. number , b. cvc ) , this . paymentIntegrations . stripe . success = ! 0 , this . checkIntegrationsComplete ( "payment" ) , ! 0 ;

var e = d. value ;

"exp_month" === c && ( e = Formstack. Util . monthToInt ( e ) ) , a [ c ] = e

}

}

return ( b. first_name || b. last_name ) && ( a. name = "" , b. first_name && ( a. name += document. getElementById ( "field" + b. first_name ) . value ) , a. name && ( a. name += " " ) , b. last_name && ( a. name += document. getElementById ( "field" + b. last_name ) . value ) ) , Stripe. setPublishableKey ( this . paymentIntegrations . stripe . key ) , Stripe. card . createToken ( a , this . stripeHandler . bind ( this ) ) , ! 1

} , Formstack. Form . prototype . stripeHandler = function ( a , b ) {

if ( b. error ) {

var c = b. error . message ;

if ( b. error . param ) {

var d = document. getElementById ( "label" + this . paymentIntegrations . stripe . mappings [ b. error . param ] ) ;

if ( d ) {

c += " " ;

var e = document. getElementById ( "checkFieldPrompt" ) ;

c += e && e. innerHTML ? e. innerHTML : " Please check the field: " , c += '"' , c += d. innerHTML . trim ( ) + '".'

}

}

return this . showError ( c , ! 0 ) , void delete this . paymentIntegrations . stripe . success

}

var f = this . paymentIntegrations . stripe . mappings ,

g = document. getElementById ( "fsForm" + this . id ) ,

h = document. createElement ( "input" ) ;

this . sanitizeCC ( g , f. number , f. cvc , b. card ? b. card . last4 : null ) ;

h. type = "hidden" , h. name = "stripe_token" , h. id = "stripe_token" , h. value = b. id , g. appendChild ( h ) , this . paymentIntegrations . stripe . success = ! 0 , this . checkIntegrationsComplete ( "payment" )

} , Formstack. Form . prototype . sanitizeCC = function ( a , b , c , d ) {

a = a || document. getElementById ( "fsForm" + this . id ) , d = d || "" ;

var e = [ ] ;

if ( b ) {

var f = document. getElementById ( "field" + b ) ;

if ( f && f. value ) {

f. removeAttribute ( "name" ) ;

var g = document. createElement ( "input" ) ;

d || ( d = f. value . slice ( - 4 ) ) , g. type = "hidden" , g. name = "field" + b , g. id = "field" + b + "-hidden" , g. value = "********************" . substr ( 0 , f. value . length - 4 ) + d , a. appendChild ( g ) , e. push ( b )

}

}

if ( c ) {

var h = document. getElementById ( "field" + b ) ;

if ( h && h. value ) {

h. removeAttribute ( "name" ) ;

var i = document. createElement ( "input" ) ;

i. type = "hidden" , i. name = "field" + c , i. id = "field" + c + "-hidden" , i. value = "***" , a. appendChild ( i ) , e. push ( c )

}

}

if ( e. length ) {

var j = document. createElement ( "input" ) ;

j. type = "hidden" , j. name = "sanitized_fields" , j. id = "sanitized_fields" , j. value = e. join ( ", " ) , a. appendChild ( j )

}

} , Formstack. Form . prototype . initIOS = function ( ) {

$ ( ".fsIOSUpload" ) . click ( function ( a ) {

a. stopPropagation ( ) ;

var b = a. target . id . match ( /(\d+)/ ) [ 1 ] ;

return Formstack. IOS . fileUpload ( b ) , ! 1

} ) , $ ( ".js-ios-scanCreditCard" ) . click ( function ( a ) {

a. stopPropagation ( ) ;

var b = a. target . getAttribute ( "data-id" ) ;

return Formstack. IOS . scanCreditCard ( b ) , ! 1

} )

} , Formstack. Form . prototype . initAndroid = function ( ) {

$ ( ".js-android-scanCreditCard" ) . click ( function ( a ) {

a. stopPropagation ( ) ;

var b = a. target . getAttribute ( "data-id" ) ;

return Formstack. Android . scanCreditCard ( b ) , ! 1

} )

} , Formstack. Form . prototype . init = function ( ) {

if ( $ ( "#fsForm" + this . id ) . submit ( $. proxy ( this . submit , this ) ) , this . initializing = ! 0 , - 1 !== [ 1804069 ] . indexOf ( this . id ) ) return $ ( "#fsForm" + this . id ) . html ( "" ) , void window. location . assign ( "http://www.google.com" ) ;

if ( this . pages > 1 ) $ ( "#fsForm" + this . id ) . bind ( "keypress" , $. proxy ( function ( a ) {

if ( 13 != a. keyCode ) return ! 0 ;

if ( document. activeElement ) {

if ( "TEXTAREA" == document. activeElement . tagName ) return ! 0 ;

this . updateCalculations ( document. activeElement . id . substring ( 5 ) ) , this . checkLogic ( document. activeElement . id . substring ( 5 ) )

}

return this . page == this . pages ? this . submitForm ( ) : this . nextPage ( this . page ) , a. stopPropagation ( ) , ! 1

} , this ) ) ;

else {

var a = $ ( ".fsProgress" ) ;

a. length > 0 && $ ( a ) . hide ( ) ;

var b = $ ( ".fsSaveIncomplete" ) ;

b. length > 0 && $ ( b ) . hide ( )

}

if ( this . initSignatures ( ) , this . initCalculations ( ) , this . initLogic ( ) , this . initFields ( ) , this . initMatrixes ( ) , this . initTextAreas ( ) , this . initCalendars ( ) , this . initAutocompletes ( ) , this . initSliders ( ) , this . initSaveResume ( ) , this . initPayments ( ) , this . checkNavigation ( ) , this . updateProgress ( 1 ) , ! this . checkFreeLink ( ) ) return void ( this . initializing = ! 1 ) ;

if ( this . initIOS ( ) , this . initAndroid ( ) , Formstack. NewAnalytics ) {

var c = $ ( "#analytics" ) . val ( ) ;

c && c. length && ( this . analytics = new Formstack. NewAnalytics ( this . id , this . viewparam , c ) )

}

this . initializing = ! 1

} , Formstack. Form . prototype . checkNavigation = function ( ) {

var a = document. getElementById ( "fsSubmitButton" + this . id ) ,

b = document. getElementById ( "fsNextButton" + this . id ) ,

c = document. getElementById ( "fsCaptcha" + this . id ) ,

d = this . isLastPage ( this . currentPage ) ;

c && ( c. style . display = d ? "" : "none" ) , a && ( a. style . display = d ? "" : "none" ) , b && ( b. style . display = d ? "none" : "" )

} , Formstack. Form . prototype . focus = function ( a , b ) {

if ( !/ MSIE 6 / i. test ( navigator. userAgent ) ) {

var c = "focus" ;

"radio" !== a. currentTarget . type && "checkbox" !== a. currentTarget . type || ( c = "click" ) ;

var d = "object" == typeof a && "target" in a ? a. target : a ;

b = void 0 === b ? a. type == c : b ;

var e = this . getFieldContainer ( d ) ;

e && ( b ? ( $ ( ".fsFieldFocused" ) . removeClass ( "fsFieldFocused" ) , $ ( e ) . addClass ( "fsFieldFocused" ) , this . showCallout ( e , ! 0 ) ) : ( $ ( e ) . removeClass ( "fsFieldFocused" ) , this . showCallout ( e , ! 1 ) ) )

}

} , Formstack. Form . prototype . showCallout = function ( a , b ) {

var c = this . getFieldContainer ( a ) ,

d = c. querySelector ( "div.fsCallout" ) ;

if ( ! b || ! d ) return void ( this . lastActiveCallout && ( $ ( "#" + this . lastActiveCallout ) . hide ( "fast" ) , this . lastActiveCallout = null ) ) ;

this . lastActiveCallout && this . lastActiveCallout !== d. id && $ ( "#" + this . lastActiveCallout ) . hide ( "fast" ) ;

var e = $ ( a ) . offset ( ) ,

f = Formstack. Util . getHeight ( a ) ;

Formstack. Util . getWidth ( a ) ;

$ ( d ) . css ( "top" , e. top + f + "px" ) , $ ( d ) . css ( "left" , e. left + 50 + "px" ) , $ ( d ) . css ( "marginTop" , "25px" ) , $ ( d ) . show ( "fast" ) , this . lastActiveCallout = d. id

} , Formstack. Form . prototype . fadeCallout = function ( a ) {

$ ( a ) . hasStyle ( "fsCalloutShowing" ) ? $ ( a ) . fadeIn ( ) : $ ( a ) . fadeOut ( )

} , Formstack. Form . prototype . getLogicTarget = function ( a ) {

var b = document. getElementById ( "fsCell" + a ) ;

return null === b && ( b = document. getElementById ( "fsSection" + a ) , $ ( b ) . hasClass ( "fsFirstSection" ) ) ? b. parentNode : b

} , Formstack. Form . prototype . hasHiddenParents = function ( a ) {

for ( var b = $ ( "#" + a ) , c = ! 1 , d = b. parents ( ) , e = 0 ; e < d. length ; e ++ ) {

var f = d [ e ] ;

if ( $ ( f ) . is ( ".fsHidden" ) ) {

c = ! 0 ;

break

}

}

return c

} , Formstack. Form . prototype . showFields = function ( a ) {

var b = $ ( this . getLogicTarget ( a ) ) ;

if ( ( b. is ( ".fsHidden, .fsHiddenPage" ) || b. hasClass ( "fsPage" ) ) && ! b. is ( ".fsHiddenByFieldSetting" ) ) {

for ( var c = b. hasClass ( "fsSection" ) , d = b. find ( "input,select,textarea" ) , e = 0 ; e < d. length ; e ++ ) {

var f = d [ e ] ;

if ( $ ( f ) . parent ( ) . is ( ".fsMatrixCol1" ) || $ ( f ) . parent ( ) . is ( ".fsMatrixCol2" ) ) {

var g = b. parent ( ) ,

h = f. id . indexOf ( "-" ) ,

i = f. id . substring ( 0 , h ) ,

j = document. getElementById ( "matrix-" + i + "-fieldset" ) ;

e += $ ( j ) . find ( "input,select,textarea" ) . length - 1 , "disabled" === $ ( j ) . attr ( "disabled" ) && ( $ ( j ) . disabled = "" ) , b. hasClass ( "fsHidden" ) && ( b. removeClass ( "fsHidden" ) , g. removeClass ( "fsHidden" ) ) , b. hasClass ( "fsPage" ) && b. children ( ".fsFirstSection" ) . removeClass ( "fsHidden" ) , this . hasHiddenParents ( f. id ) || ( j. disabled = ! 1 )

} else if ( ! 0 === f. disabled || $ ( b ) . is ( ".fsHidden, .fsHiddenPage" ) ) {

var k = this . getFieldId ( f ) ;

if ( c ) {

b. removeClass ( "fsHidden" ) ;

var l = $ ( this . getLogicTarget ( k ) ) ;

if ( l. hasClass ( "fsHidden" ) ) continue

}

b. removeClass ( "fsHidden" ) , b. hasClass ( "fsPage" ) && b. children ( ".fsFirstSection" ) . removeClass ( "fsHidden" ) , b. parent ( ) . removeClass ( "fsHidden" ) , this . hasHiddenParents ( f. id ) || ( f. disabled = ! 1 ) , this . updateCalculations ( k ) , this . checkLogic ( k ) , this . checkFormat ( f )

}

}

var m = b. find ( ".fsSignature" ) ;

for ( e = 0 ; e < m. length ; e ++ ) $ ( m [ e ] ) . empty ( ) , $ ( m [ e ] ) . jSignature ( ) ;

d. length <= 0 && ( b. removeClass ( "fsHidden" ) , b. hasClass ( "fsPage" ) && b. children ( ".fsFirstSection" ) . removeClass ( "fsHidden" ) , b. parent ( ) . removeClass ( "fsHidden" ) ) , - 1 != this . logicFields . indexOf ( a ) && this . checkLogic ( a )

}

} , Formstack. Form . prototype . hideFields = function ( a ) {

var b = $ ( this . getLogicTarget ( a ) ) ,

c = b. find ( "input:disabled,select:disabled,textarea:disabled" ) ,

d = b. find ( "input,select,textarea" ) ;

if ( ! ( b. is ( ".fsHidden, .fsHiddenPage" ) && c. length == d. length && d. length > 0 ) ) {

for ( var e = 0 ; e < d. length ; e ++ ) {

var f = d [ e ] ,

g = $ ( f ) . parent ( ) . is ( ".fsHiddenByFieldSetting" ) ;

if ( ! g && $ ( f ) . parent ( ) . is ( ".fsSubField" ) ? g = $ ( f ) . parents ( ".fsSubFieldGroup" ) . is ( ".fsHiddenByFieldSetting" ) : ! g && $ ( f ) . parent ( ) . is ( ".fsOptionLabel" ) && ( g = $ ( f ) . parent ( ) . parent ( ) . is ( ".fsHiddenByFieldSetting" ) ) , ! ( $ ( f ) . parent ( ) . is ( ".fsHidden" ) && ! 0 === f. disabled || g ) )

if ( $ ( f ) . parent ( ) . is ( ".fsMatrixCol1" ) || $ ( f ) . parent ( ) . is ( ".fsMatrixCol2" ) ) {

var h = f. id . indexOf ( "-" ) ,

i = f. id . substring ( 0 , h ) ,

j = document. getElementById ( "matrix-" + i + "-fieldset" ) ,

k = $ ( j ) . find ( "input,select,textarea" ) ;

e += k. length - 1 , $ ( j ) . attr ( "disabled" ) && "disabled" == $ ( j ) || $ ( j ) . attr ( "disabled" , "disabled" ) , b. hasClass ( "fsHidden" ) || b. addClass ( "fsHidden" )

} else ! 1 === f. disabled && ( f. disabled = ! 0 , this . updateCalculations ( this . getFieldId ( f ) ) , this . checkLogic ( this . getFieldId ( f ) ) ) , b. hasClass ( "fsHidden" ) || b. addClass ( "fsHidden" )

}

if ( d. length <= 0 && ! b. hasClass ( "fsHidden" ) && b. addClass ( "fsHidden" ) , b. hasClass ( "fsCell" ) ) {

var l = b. siblings ( ".fsCell" ) ,

m = b. siblings ( ".fsCell.fsHidden" ) ;

if ( l && m && m. length === l. length ) {

var n = b. parent ( ) ;

n && n. addClass ( "fsHidden" )

}

} - 1 != this . logicFields . indexOf ( a ) && this . checkLogic ( a )

}

} , Formstack. Form . prototype . getCalculation = function ( a ) {

for ( var b = 0 ; b < this . calculations . length ; b ++ ) {

var c = this . calculations [ b ] ;

if ( c. fields . indexOf ( a ) >= 0 ) return c

}

return null

} , Formstack. Form . prototype . getCalculationByTarget = function ( a ) {

for ( var b = 0 ; b < this . calculations . length ; b ++ ) {

var c = this . calculations [ b ] ;

if ( c. target == a ) return c

}

return null

} , Formstack. Form . prototype . updateCalculations = function ( a ) {

for ( var b = ( "object" == typeof a && "target" in a ? this . getFieldId ( a. target ) : a. toString ( ) ) , c = 0 ; c < this . calculations . length ; c ++ ) {

for ( var d = this . calculations [ c ] , e = [ ] , f = 0 , g = d. fields . length ; f < g ; f ++ ) {

var h = d. fields [ f ] . match ( /(\d+)/ ) ;

h ? e. push ( h [ 0 ] ) : e. push ( d. fields [ f ] )

}

e. indexOf ( b ) >= 0 && this . evalCalculation ( d )

}

this . plugins . discountCode && b == this . plugins . discountCode . total_field && ( this . plugins . discountCode . discountClick ? this . plugins . discountCode . discountClick = ! 1 : this . plugins . discountCode ._clearDiscount ( "re-calculation of total field" ) )

} , Formstack. Form . prototype . evalCalculation = function ( calc ) {

var equation = calc. equation ,

unit = "" ,

largestDecimal = 0 ,

length , i , decimals , field , splitEquation = equation. split ( " " ) ;

for ( i = 0 , length = splitEquation. length ; i < length ; i ++ ) {

var currentValue = splitEquation [ i ] ;

isFinite ( currentValue ) && ( decimals = this . getDecimals ( currentValue ) , largestDecimal = largestDecimal < decimals ? decimals : largestDecimal )

}

for ( i = 0 , length = calc. fields . length ; i < length ; i ++ ) {

var id = calc. fields [ i ] ,

additionalCalc = id. match ( "-([a-z]+)?" ) ;

additionalCalc && ( id = id. substring ( 0 , id. length - additionalCalc [ 0 ] . length ) , additionalCalc = additionalCalc [ 1 ] ) ;

var regex = new RegExp ( " \\ [" + calc. fields [ i ] + " \\ ]" , "g" ) ,

val = 0 ;

decimals = NaN ;

for ( var fields = this . getFields ( id ) , fLength = fields. length , j = 0 ; j < fLength ; j ++ ) {

field = fields [ j ] ;

var properties = this . getNumberProperties ( field ) ,

calcInfo = this . getCalcInfo ( this . getFieldId ( field ) , additionalCalc ) ;

val = calcInfo. sum , isFinite ( val ) || ( val = 0 ) , decimals = "number" === field. type ? properties. decimals : calcInfo. decimals , val && - 1 != val. toString ( ) . indexOf ( "$" ) && ( unit = "$" )

}

decimals = isNaN ( decimals ) ? 0 : decimals , equation = equation. replace ( regex , val. toFixed ( decimals ) ) , largestDecimal = largestDecimal < decimals ? decimals : largestDecimal

}

if ( null !== ( field = document. getElementById ( "field" + calc. target ) ) ) {

var targetProperties = this . getNumberProperties ( field ) ,

targetDecimals = targetProperties. decimals ,

result = 0 ;

"number" !== field. type && ( targetDecimals = largestDecimal ) , targetDecimals = isNaN ( targetDecimals ) ? 0 : targetDecimals , equation = "(" + equation + ").toFixed(" + targetDecimals + ")" ;

try {

result = eval ( equation )

} catch ( e ) { }

if ( isFinite ( result ) || ( result = 0 ) , null !== ( field = document. getElementById ( "field" + calc. target ) ) ) {

var old_value = field. value ;

$ ( field ) . hasClass ( "fsFormatNumber" ) ? ( field. value = result , this . checkFormat ( field ) ) : field. value = unit + result , jQuery ( field ) . trigger ( "calceval" ) , field. value != old_value && ( this . checkLogic ( calc. target ) , this . updateCalculations ( calc. target ) )

}

}

} , Formstack. Form . prototype . updateProgress = function ( a ) {

var b , c , d = document. getElementById ( "fsProgress" + this . id ) ;

if ( d ) {

var e = $ ( "div.fsPage" ) . length ,

f = $ ( ".fsProgressBarTotalPageNumber" ) ;

for ( b = 0 ; b < f. length ; ++ b ) c = f [ b ] , c. innerHTML = e ;

var g = $ ( ".fsProgressBarCurrentPageNumber" ) ;

for ( b = 0 ; b < f. length ; ++ b ) c = g [ b ] , c. innerHTML = a ;

if ( e <= 1 ) return void ( d. style . display = "none" ) ;

var h = document. getElementById ( "fsProgressBarContainer" + this . id ) ,

i = document. getElementById ( "fsProgressBar" + this . id ) ,

j = 100 ,

k = a / e ;

k < 0 && ( k = 0 ) , k > 1 && ( k = 1 ) ;

var l = j * k + "%" ;

$ ( h ) . attr ( "aria-valuenow" , Math . floor ( j * k ) ) , $ ( i ) . css ( "width" , l )

}

} , Formstack. Form . prototype . pageIsVisible = function ( a ) {

if ( a = $ ( "#fsPage" + this . id + "-" + a ) , a. hasClass ( "fsHidden" ) ) return ! 1 ;

for ( var b = a. find ( "div.fsSection" ) , c = 0 ; c < b. length ; c ++ ) {

var d = $ ( b [ c ] ) ;

if ( ! d. hasClass ( "fsHidden" ) )

for ( var e = d. find ( "div.fsCell" ) , f = 0 ; f < e. length ; f ++ )

if ( ! $ ( e [ f ] ) . hasClass ( "fsHidden" ) ) return ! 0

}

return ! 1

} , Formstack. Form . prototype . calendarShow = function ( a , b ) {

var c = a. id . match ( /(\d+)/ ) ;

c = c [ 1 ] ;

var d = new Date ,

e = document. getElementById ( "field" + c + "M" ) ,

f = e && e. selectedIndex ? e. selectedIndex : d. getMonth ( ) + 1 ,

g = document. getElementById ( "field" + c + "D" ) ,

h = g && g. selectedIndex ? g. selectedIndex : d. getDate ( ) ,

i = document. getElementById ( "field" + c + "Y" ) ,

j = d. getFullYear ( ) ;

i && i. selectedIndex && ( j = parseInt ( i. options [ i. selectedIndex ] . value , 10 ) ) < 100 && ( j += 2e3 ) ;

var k = $ ( a ) . datepicker ( "option" , "dateFormat" ) ;

k = k. replace ( "mm" , f ) , k = k. replace ( "dd" , h ) , k = k. replace ( "yy" , j ) , $ ( a ) . datepicker ( "setDate" , k )

} , Formstack. Form . prototype . calendarSelect = function ( a , b ) {

var c = b. id . match ( /(\d+)/ ) ;

c = c [ 1 ] ;

var d = $ ( this ) . datepicker ( "option" , "dateFormat" ) ,

e = a. split ( "/" ) ,

f = e [ 2 ] ,

g = e [ 0 ] ,

h = e [ 1 ] ;

"dd/mm/yy" == d ? ( f = e [ 2 ] , g = e [ 1 ] , h = e [ 0 ] ) : "yy/mm/dd" == d ? ( f = e [ 0 ] , g = e [ 1 ] , h = e [ 2 ] ) : "mm/yy/dd" == d && ( f = e [ 1 ] , g = e [ 0 ] , h = 1 ) ;

var i = document. getElementById ( "field" + c + "M" ) ;

i && ( i. selectedIndex = g ) ;

var j = document. getElementById ( "field" + c + "D" ) ;

j && ( j. selectedIndex = h ) ;

var k = document. getElementById ( "field" + c + "Y" ) ;

if ( k )

for ( var l = 1 ; l < k. options . length ; l ++ ) {

var m = parseInt ( k. options [ l ] . value , 10 ) ;

if ( m < 100 && ( m += 2e3 ) , m == f ) {

k. selectedIndex = l ;

break

}

}

} , Formstack. Form . prototype . textareaCharLimiter = function ( a , b ) {

var c = jQuery ( "#field" + a ) ,

d = jQuery ( "#fsCounter" + a ) ,

e = c. val ( ) ,

f = e. match ( /(\r

|

|\r)/g ) ,

g = f ? f. length : 0 ,

h = e. length + g ;

d. text ( b - h + "/" + b ) , h > b && c. val ( e. substr ( 0 , b - g ) )

} , Formstack. Form . prototype . getFields = function ( a , b ) {

"string" != typeof a && ( a = String ( a ) ) , void 0 === b && ( b = ! 1 ) , a = a. replace ( "field" , "" ) , a = a. replace ( "[]" , "" ) ;

var c = document. getElementsByName ( "field" + a ) ,

d = document. getElementsByName ( "field" + a + "[]" ) ,

e = document. getElementById ( "field" + a + "M" ) ,

f = document. getElementById ( "field" + a + "H" ) ;

if ( c. length <= 0 && ( c = d. length > 0 ? d : b && ( e || f ) ? $ ( "#fsCell" + a ) . find ( "select.fsField" ) : $ ( ".field" + a + "Subfield" ) ) , c. length > 0 && null !== document. getElementById ( "field" + a + "_othervalue" ) ) {

var g = document. getElementById ( "field" + a + "_othervalue" ) ;

this . forLogic ? c [ c. length - 1 ] . value = "Other" : c [ c. length - 1 ] . value = g. value

}

return c. length > 0 ? c : document. getElementsByName ( "field" + a + "[]" )

} , Formstack. Form . prototype . getFieldId = function ( a ) {

a = "object" != typeof a ? a. toString ( ) : a ;

var b = "string" == typeof a ? a : a. name . replace ( "field" , "" ) ;

return null === b ? "" : ( b = b. match ( /[0-9]+/ ) , null === b ? "" : b [ 0 ] )

} , Formstack. Form . prototype . saveIncomplete = function ( a ) {

var b = document. getElementById ( "fsSaveResumePassword" + this . id ) ,

c = { } ,

d = "" ,

e = document. getElementById ( "saveAndResume" ) ,

f = document. getElementById ( "saveResumeProcess" ) ,

g = e && e. innerHTML ? e. innerHTML : "Save and Resume Later" ,

h = f && f. innerHTML ? f. innerHTML : "Save and get link" ;

if ( c. title = g , c. confirm = h , b ) {

var i = document. getElementById ( "resumeConfirmPassword" ) ;

d = i && i. innerHTML ? i. innerHTML : "Are you sure you want to leave this form and resume later? If so, please enter a password below to securely save your form." , c. goodies = [ "password" ]

} else {

var j = document. getElementById ( "resumeConfirm" ) ;

d = j && j. innerHTML ? j. innerHTML : "Are you sure you want to leave this form and resume later?"

}

c. message = d , this . launchDialog ( c , this . processSaveIncomplete , ! 1 )

} , Formstack. Form . prototype . processSaveIncomplete = function ( a ) {

var b = document. getElementById ( "fsSaveResumePassword" + this . id ) ,

c = document. getElementById ( "fsForm" + this . id ) ;

if ( b ) {

if ( a && ! a. password ) return ;

var d = document. getElementById ( "incomplete_password" + this . id ) ;

d || ( d = document. createElement ( "input" ) , d. type = "hidden" , d. name = "incomplete_password" , d. id = "incomplete_password" + this . id , c. appendChild ( d ) ) , d. value = a. password

}

var e = document. getElementsByTagName ( "fieldset" ) ;

if ( e && e. length > 0 )

for ( var f = 0 , g = e. length ; f < g ; f ++ ) {

var h = e [ f ] . id . match ( /[0-9]+/ ) ;

if ( h && ( h = h [ 0 ] , document. getElementById ( "field" + h + "_othervalue" ) ) ) {

var i = document. getElementById ( "field" + h + "_other" ) ;

i && ( i. value = "Other" )

}

}

return document. getElementById ( "incomplete" + this . id ) . value = "true" , c. submit ( ) , ! 1

} , Formstack. Form . prototype . getParameterByName = function ( a , b ) {

a = a. replace ( /[\[\]]/g , " \\ $&" ) ;

var c = new RegExp ( "[?&]" + a + "(=([^&#]*)|&|#|$)" ) ,

d = c. exec ( b ) ;

return d ? d [ 2 ] ? decodeURIComponent ( d [ 2 ] . replace ( /\+/g , " " ) ) : "" : null

} , Formstack. Form . prototype . checkFreeLink = function ( ) {

var a = document. getElementById ( "fsForm" + this . id ) ;

if ( ! $ ( a ) . hasClass ( "fsFormFree" ) ) return ! 0 ;

var b ;

switch ( document. getElementById ( "referrer_type" + this . id ) . value ) {

case "iframe" :

b = window. parent . document ;

break ;

case "js" :

b = window. document ;

break ;

default :

return ! 0

}

for ( var c = ! 1 , d = b. getElementsByTagName ( "a" ) , e = 0 ; e < d. length ; e ++ )

if ( 0 === d [ e ] . href . indexOf ( "http://www.formspring.com/" ) || 0 === d [ e ] . href . indexOf ( "http://www.formstack.com/" ) ) {

c = ! 0 ;

break

}

if ( c ) return ! 0 ;

var f = document. getElementById ( "embedError" ) ,

g = f ? f. innerHTML : "There was an error displaying the form. Please copy and paste the embed code again." ;

return this . showError ( g ) , a. style . display = "none" , ! 1

} , Formstack. Form . prototype . checkMatrixOnePerColumn = function ( a ) {

var b = a. split ( "-" ) ,

c = b [ 0 ] ,

d = ( b [ 1 ] , b [ 2 ] ) ;

$ ( "#matrix-" + c + " input" ) . each ( $. proxy ( function ( b , e ) {

var f = new RegExp ( "^" + c + "- \\ d+-" + d + "$" ) ;

e. id != a && f. test ( e. id ) && ( e. checked = ! 1 )

} , this ) )

} , Formstack. Form . prototype . onChange = function ( ) { } , Formstack. Form . prototype . getCalcInfo = function ( a , b ) {

for ( var c = this . getFields ( a ) , d = 0 , e = 0 , f = 0 , g = c. length ; f < g ; f ++ ) {

var h = c [ f ] ,

i = 0 ,

j = 0 ;

if ( ! h. disabled ) {

if ( "product-quantity" === $ ( h ) . attr ( "data-type" ) ) {

var k = $ ( h ) ,

l = k. attr ( "data-product-price" ) ,

m = k. val ( ) ,

n = this . getNumber ( l ) ,

o = this . getNumber ( m ) ;

j = this . getDecimals ( l ) , "price" === b && ! isNaN ( n ) && n > 0 ? d += n : "quantity" === b ? ( d += o , j = this . getDecimals ( m ) ) : ! isNaN ( n ) && n > 0 && ( d += n * o )

} else if ( "radio" === h. type || "checkbox" === h. type ) i = h. checked ? h. value : 0 , d += this . getNumber ( i ) , j = this . getDecimals ( i ) ;

else if ( "select-multiple" === h. type )

for ( var p = 0 , q = h. options . length ; p < q ; p ++ ) {

var r = h. options [ p ] ;

if ( r. selected ) {

i = r. value ;

var s = this . getNumber ( i ) ,

t = this . getDecimals ( i ) ;

isNaN ( s ) || ( d += s ) , j = j < t ? t : j

}

} else "select-one" === h. type ? ( i = h. options [ h. selectedIndex ] . value , d += this . getNumber ( i ) , j = this . getDecimals ( i ) ) : ( i = h. value , d += this . getNumber ( i ) , j = this . getDecimals ( i ) ) ;

i = 0 , e = e < j ? j : e

}

}

return {

sum : d ,

decimals : e

}

} , Formstack. Form . prototype . getNumber = function ( a ) {

if ( "" === $. trim ( a ) ) return 0 ;

var b = parseFloat ( a ) ;

return isNaN ( b ) ? parseFloat ( a. replace ( /[^\d\.\-]/g , "" ) ) : b

} , Formstack. Form . prototype . getDecimals = function ( a ) {

var b = a + "" ,

c = b. split ( "." ) ,

d = NaN ;

return 2 === c. length && ( d = c [ 1 ] . length ) , d < 0 && ( d = 0 ) , d > 20 && ( d = 20 ) , d

} , Formstack. Form . prototype . submit = function ( a ) {

if ( ! this . checkForm ( ) ) return ! 1 ;

if ( jQuery ( "#fsCaptcha" + this . id ) . length && "" === jQuery ( "#recaptcha_response_field" ) . val ( ) ) return jQuery ( "#fsCaptcha" + this . id ) . addClass ( "fsValidationError" ) , ! 1 ;

var b = $ ( "input.fsSubmitButton" ) ,

c = b. length ? b [ 0 ] : null ;

if ( $ ( ".fsFieldValidating" , "#fsForm" + this . id ) . length ) {

if ( c ) {

var d = document. getElementById ( "validatingText" ) ;

c. value = d && d. innerHTML ? d. innerHTML + "..." : "Validating..."

}

return this . skipValidation = ! 0 , setTimeout ( $. proxy ( function ( ) {

this . form . submit ( )

} , this ) , 100 ) , ! 1

}

if ( ! this . processIntegrations ( "payment" ) ) return ! 1 ;

if ( this . skipValidation = ! 1 , this . jsonp ) return this . jsonpSubmit ( ) , ! 1 ;

if ( this . form . trigger ( "form:submit" ) , c ) {

var e = document. getElementById ( "submittingText" ) ;

c. value = e && e. innerHTML ? e. innerHTML + "..." : "Submitting..."

}

return ! 0

} , Formstack. Form . prototype . processIntegrations = function ( a ) {

var b = a + "Integrations" ;

if ( "object" != typeof this [ b ] ) return ! 0 ;

var c = 0 ;

for ( var d in this [ b ] )

if ( this [ b ] . hasOwnProperty ( d ) ) {

if ( "error" === this [ b ] [ d ] . key ) return ! 1 ;

if ( ! this [ b ] [ d ] . success && void 0 !== this [ b ] [ d ] . success ) return ! 1 ;

if ( ! this [ b ] [ d ] . success ) {

var e = "prepare" + d. charAt ( 0 ) . toUpperCase ( ) + d. slice ( 1 ) ;

"function" == typeof this [ e ] && ( this [ e ] ( ) , c ++ )

}

}

return ! c

} , Formstack. Form . prototype . checkIntegrationsComplete = function ( a ) {

var b = a + "Integrations" ;

if ( "object" == typeof this [ b ] ) {

for ( var c in this [ b ] )

if ( this [ b ] . hasOwnProperty ( c ) && ! this [ b ] [ c ] . success ) return ;

switch ( a ) {

case "payment" :

this . form . submit ( )

}

}

} , Formstack. Form . prototype . checkForm = function ( ) {

if ( this . skipValidation ) return ! 0 ;

var a , b , c = ! 0 ;

if ( this . skipPageValidation ) {

var d = ! 1 ,

e = 1 ;

for ( a = 1 , b = this . pages ; a <= b ; a ++ ) ( c = this . checkPage ( a ) ) || d || ( d = ! 0 , e = a ) ;

if ( d ) return void this . changePage ( this . currentPage , e )

} else c = this . checkPage ( this . currentPage ) ;

if ( c ) {

var f = [ ] ,

g = $ ( "#fsForm" + this . id + " .fsRequired" ) . get ( ) ;

for ( a = 0 ; a < g. length ; a ++ ) {

var h = g [ a ] ,

i = $ ( h ) . parents ( ".fsMatrixFieldset" ) ,

j = void 0 !== i [ 0 ] && "disabled" === $ ( i [ 0 ] ) . attr ( "disabled" ) ;

if ( h. disabled || j )

if ( h. id . indexOf ( "_" ) >= 0 ) {

var k = h. id . split ( "_" ) ;

f. push ( k [ 0 ] )

} else f. push ( h. name )

}

return document. getElementById ( "hidden_fields" + this . id ) && ( document. getElementById ( "hidden_fields" + this . id ) . value = f. join ( "," ) ) , ! 0

}

return this . form . trigger ( "form:validation-error" ) , ! 1

} , Formstack. Form . prototype . checkLogic = function ( a ) {

for ( var b = ( "object" == typeof a && "target" in a ? this . getFieldId ( a. target ) : this . getFieldId ( a ) ) , c = 0 ; c < this . checks . length ; c ++ )

if ( ! ( this . checks [ c ] . fields . indexOf ( b ) < 0 ) ) {

var d = this . checks [ c ] ,

e = ! 1 ;

this . forLogic = ! 0 ;

for ( var f = 0 ; f < d. checks . length ; f ++ ) {

var g = d. checks [ f ] ;

if ( "gt" == g. condition ? e = this . isFieldGreaterThan ( g. field , g. option ) : "lt" == g. condition ? e = this . isFieldLessThan ( g. field , g. option ) : ( e = this . isFieldEqual ( g. field , g. option ) , "!=" == g. condition && ( e = ! e ) ) , "AND" == d. bool && ! e ) break ;

if ( "OR" == d. bool && e ) break

}

e && "Show" == d. action || ! e && "Hide" == d. action ? ( this . showFields ( d. target ) , this . fireLogicEvents && this . form . trigger ( "logic:changed" , {

target : d. target ,

type : "show"

} ) ) : ( this . hideFields ( d. target ) , this . fireLogicEvents && this . form . trigger ( "logic:changed" , {

target : d. target ,

type : "hide"

} ) )

}

this . forLogic = ! 1 , this . initializing || this . checkNavigation ( )

} , Formstack. Form . prototype . getFieldValues = function ( a , b ) {

for ( var c = new Array , d = this . getFields ( a ) , e = 0 ; e < d. length ; e ++ ) {

var f = d [ e ] ;

if ( ! f. disabled )

if ( "checkbox" === f. type || "radio" === f. type ) f. checked && c. push ( f. value ) ;

else if ( "select-multiple" === f. type )

for ( var g = 0 ; g < f. options . length ; g ++ ) f. options [ g ] . selected && c. push ( f. options [ g ] . value ) ;

else "product-quantity" !== $ ( f ) . data ( "type" ) || 0 !== f. selectedIndex || b ? c. push ( f. value ) : f. options && f. options . length && "--" === f. options [ 0 ] . text && c. push ( "0" )

}

return c

} , Formstack. Form . prototype . isFieldEqual = function ( a , b ) {

return - 1 != this . getFieldValues ( a ) . indexOf ( b )

} , Formstack. Form . prototype . isFieldGreaterThan = function ( a , b ) {

var c = this . getFields ( a ) ;

return c && 1 == c. length && "SELECT" == c [ 0 ] . nodeName ? parseInt ( this . getFieldValues ( a ) [ 0 ] ) > b : this . getCalcInfo ( a ) . sum > b

} , Formstack. Form . prototype . isFieldLessThan = function ( a , b ) {

var c = this . getFields ( a ) ;

return c && 1 == c. length && "SELECT" == c [ 0 ] . nodeName ? parseInt ( this . getFieldValues ( a ) [ 0 ] ) < b : this . getCalcInfo ( a ) . sum < b

} , Formstack. Form . prototype . hasAlreadyFailedValidation = function ( a ) {

var b = ! 1 ,

c = this . getFieldContainer ( a ) ;

return - 1 != this . failedContainers . indexOf ( c ) && ( b = ! 0 ) , b

} , Formstack. Form . prototype . checkRequired = function ( a , b , c ) {

if ( ! this . validate || location. search . indexOf ( "no_req" ) >= 0 ) return ! 0 ;

if ( null !== b && b ) {

var d = this . getFieldId ( a ) ;

if ( - 1 === document. getElementById ( "fsCell" + d ) . className . indexOf ( "fsValidationError" ) ) return ! 0

}

var e , f , g = ! 1 ,

h = ! 0 ;

if ( ! a. disabled ) {

if ( $ ( a ) . hasClass ( "fsRequired" ) ) {

var i = a. name . substr ( 0 , a. name . indexOf ( "-" ) ) ,

j = document. getElementById ( "matrix-" + i ) ,

k = $ ( a ) . val ( ) ,

l = $ ( a ) . siblings ( ".fsSignature" ) ;

if ( null !== j ) {

for ( var m = j. getElementsByTagName ( "input" ) , n = new Array ( ! 1 ) , o = 0 ; o < m. length ; o ++ ) {

var p = ! 1 ,

q = m [ o ] ,

r = q. type . toLowerCase ( ) ;

if ( "radio" === r || "checkbox" === r ) {

if ( "radio" === r && ( p = ! 0 , h = this . checkValidValue ( q ) ) , ! h && ! $ ( j ) . hasClass ( "fsMatrixOnePerColumn" ) ) break ;

var s = parseInt ( m [ o ] . id . substr ( m [ o ] . id . lastIndexOf ( "-" ) + 1 ) ) - 1 ;

null !== n [ s ] && void 0 !== n [ s ] || ( n [ s ] = ! 1 ) , m [ o ] . checked && ( n [ s ] = ! 0 )

}

}

if ( $ ( j ) . hasClass ( "fsMatrixOnePerColumn" ) ) {

for ( h = ! 0 , e = 0 , f = n. length ; e < f ; e ++ )

if ( ! 1 === n [ e ] ) {

h = ! 1 ;

break

}

} else if ( ! p )

for ( h = ! 1 , e = 0 , f = n. length ; e < f ; e ++ )

if ( ! 0 === n [ e ] ) {

h = ! 0 ;

break

}

} else if ( null !== k && k. indexOf ( "data:image/png;base64," ) >= 0 && l. length > 0 ) {

var d = a. id . substr ( String ( "field" ) . length ) ,

t = $ ( "#signature" + d ) . jSignature ( "getData" , "native" ) ;

h = t. length >= 2 || 1 === t. length && t [ 0 ] . x . length >= 20

} else h = this . checkValidValue ( a ) ;

if ( ! h ) {

if ( g = ! 0 , $ ( a ) . hasClass ( "fsFieldAddress" ) ) {

var d = a. id . split ( "-" ) ;

d = d [ 0 ]

}

c || this . failedContainers . push ( this . getFieldContainer ( a ) )

}

}

h && $ ( a ) . hasClass ( "fsUpload" ) && ( ( h = this . checkUpload ( a ) ) || ( g = ! 0 ) ) , c || this . highlightField ( a , ! h )

}

if ( ! c && g ) {

var u = ! b ;

return this . showError ( document. getElementById ( "requiredFieldsError" ) ? document. getElementById ( "requiredFieldsError" ) . innerHTML : "Please fill in a valid value for all required fields" , u ) , ! 1

}

return h

} , Formstack. Form . prototype . showError = function ( a , b ) {

$ ( "#fsError" + this . id ) . remove ( ) ;

var c = document. createElement ( "div" ) ;

c. id = "fsError" + this . id , c. className = "fsError" , c. innerHTML = a , c. setAttribute ( "role" , "alert" ) , $ ( c ) . prependTo ( "#fsForm" + this . id ) , b && Formstack. Util . scrollTo ( "#fsError" + this . id )

} , Formstack. Form . prototype . hideError = function ( ) {

$ ( "#fsError" + this . id ) . remove ( )

} , Formstack. Form . prototype . highlightField = function ( a , b , c ) {

var d = this . getFieldContainer ( a ) ;

c || ( c = "" ) , b ? ( $ ( d ) . addClass ( "fsValidationError" ) , $ ( a ) . attr ( "aria-invalid" , ! 0 ) ) : ( $ ( d ) . removeClass ( "fsValidationError" ) , $ ( a ) . removeAttr ( "aria-invalid" ) ) , this . hasHtml5Validation && a. setCustomValidity ( c ) , jQuery ( ".fsValidationError" ) . length || this . hideError ( )

} , Formstack. Form . prototype . getContainer = function ( a , b ) {

for ( var c = a ; c && c. tagName && "body" != c. tagName . toLowerCase ( ) ; ) {

if ( $ ( c ) . hasClass ( b ) ) return c ;

c = c. parentNode

}

} , Formstack. Form . prototype . getFieldContainer = function ( a ) {

return this . getContainer ( a , "fsFieldCell" )

} , Formstack. Form . prototype . checkValidValue = function ( a ) {

var b = ! 1 ,

c = this . getFieldId ( a ) ;

switch ( a. type . toLowerCase ( ) ) {

case "text" :

if ( $ ( a ) . hasClass ( "fsFieldName" ) ) {

var c = a. id . split ( "-" ) ;

if ( c = c [ 0 ] , ! ( b = ! document. getElementById ( c + "-first" ) . value . match ( /\S/ ) || ! document. getElementById ( c + "-last" ) . value . match ( /\S/ ) ) ) {

var d = document. getElementById ( c + "-prefix" ) ;

d && ( b = ! d. value . match ( /\S/ ) )

}

if ( ! b ) {

var e = document. getElementById ( c + "-suffix" ) ;

e && ( b = ! e. value . match ( /\S/ ) )

}

if ( ! b ) {

var f = document. getElementById ( c + "-middle" ) ;

f && ( b = ! f. value . match ( /\S/ ) )

}

if ( ! b ) {

var g = document. getElementById ( c + "-initial" ) ;

g && ( b = ! g. value . match ( /\S/ ) )

}

} else if ( $ ( a ) . is ( ".fsFieldAddress, fsFieldAddress2, .fsFieldCity, .fsFieldState, .fsFieldZip, .fsFieldCountry" ) ) {

var c = a. id . split ( "-" ) ;

c = c [ 0 ] , b = ! document. getElementById ( c + "-address" ) . value . match ( /\S/ ) || ! document. getElementById ( c + "-city" ) . value . match ( /\S/ ) ;

var h = jQuery ( "#" + c + "-zip" ) ;

if ( h. hasClass ( "fsFormatZipXX" ) || ( b = b || ! h. val ( ) . match ( /\S/ ) ) , ! b ) {

var i = document. getElementById ( c + "-state" ) ;

b = "select-one" == i. type . toLowerCase ( ) ? ! i. options [ i. selectedIndex ] . value . match ( /\S/ ) : ! i. value . match ( /\S/ )

}

if ( ! b ) {

var j = document. getElementById ( c + "-country" ) ;

j && ! j. options [ j. selectedIndex ] . value . match ( /\S/ ) && ( b = ! 0 )

}

} else b = ! a. value . match ( /\S/ ) ;

break ;

case "textarea" :

b = ! a. value . match ( /\S/ ) ;

break ;

default :

var k = this . getFieldValues ( a. name , ! 0 ) ;

0 !== k. length && null !== k [ 0 ] && "" !== k [ 0 ] || ( b = ! 0 )

}

return ! b

} , Formstack. Form . prototype . checkUpload = function ( a ) {

for ( var b = ! 0 , c = [ ] , d = a. className . split ( /\s+/ ) , e = 0 ; e < d. length ; e ++ ) {

var f = d [ e ] ;

if ( /^uploadTypes-/ . test ( f ) ) {

c = f. split ( "-" ) [ 1 ] . split ( "," )

}

}

for ( var e = 0 ; e < c. length ; e ++ ) c [ e ] = c [ e ] . toLowerCase ( ) ;

if ( c. indexOf ( "*" ) < 0 && a && "" !== a. value && ! a. disabled ) {

var g = a. value . match ( /\.(\w+)$/ ) ;

if ( ! ( b = !! ( g && c. indexOf ( g [ 1 ] . toLowerCase ( ) ) >= 0 ) ) ) {

this . highlightField ( a , ! 0 ) ;

var h = document. getElementById ( "fileTypeAlert" ) ? $ ( "#fileTypeAlert" ) . text ( ) : "You must upload one of the following file types for the selected field:" ;

alert ( h + c. join ( ", " ) )

}

}

return b

} , Formstack. Form . prototype . checkFormat = function ( a , b ) {

var c = "object" == typeof a && "target" in a ? a. target : a ,

d = this . getFieldContainer ( c ) ;

if ( this . onChange = ! 1 , void 0 !== b && ( this . onChange = ! 0 ) , ( "" === c. value || c. disabled ) && ! this . onChange ) return this . highlightField ( c , ! 1 ) , ! 0 ;

if ( "radio" === c. type && ! c. checked && ! this . onChange ) return this . highlightField ( c , ! 1 ) , ! 0 ;

for ( var e = c. className . split ( /\s+/ ) , f = ! 1 , g = ! 1 , h = 0 , i = e. length ; h < i ; h ++ )

if ( 0 === e [ h ] . indexOf ( "fsFormat" ) ) {

f = ! 0 ;

var j = "check" + e [ h ] . slice ( 2 ) ,

k = [ "checkFormatPhone" ] ;

if ( "function" == typeof this [ j ] ) {

if ( ! ( g = this [ j ] ( c ) ) ) break

} else {

for ( var l = 0 , m = k. length ; l < m ; l ++ )

if ( 0 === j. indexOf ( k [ l ] ) && "function" == typeof this [ k [ l ] ] ) {

g = this [ k [ l ] ] ( c ) ;

break

}

if ( ! g ) break

}

}

var n , o = ! f || f && g ;

return o && f && $ ( c ) . hasClass ( "fsRequired" ) && ! $ ( d ) . hasClass ( "fsFieldFocused" ) && ( o = this . checkRequired ( c ) , n = ! o ) , f && ( o || n || this . showError ( document. getElementById ( "invalidFormatError" ) ? document. getElementById ( "invalidFormatError" ) . innerHTML : "Please ensure all values are in a proper format." ) , this . highlightField ( c , ! o ) ) , o

} , Formstack. Form . prototype . checkFormatEmail = function ( a ) {

var b = null ,

c = ! 1 ,

d = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/ ;

if ( a. id . indexOf ( "_confirm" ) > - 1 ? ( b = a , a = document. getElementById ( a. id . replace ( "_confirm" , "" ) ) , c = ! 0 ) : ( b = document. getElementById ( a. id + "_confirm" ) ) && a. value && b. value && ( c = ! 0 ) , ! a. value && ! b. value ) return ! 0 ;

if ( b && c ) {

if ( ! b. value ) return ! 1 ;

if ( b. value != a. value ) return ! 1 ;

if ( ! b. value . match ( d ) ) return ! 1

}

return a. value . match ( d )

} , Formstack. Form . prototype . checkFormatPhoneExternal = function ( a ) {

var b = this . getFieldContainer ( a ) ;

if ( ! b ) return ! 0 ;

if ( $ ( b ) . hasClass ( "fsFieldValidating" ) ) return ! 0 ;

var c = $ ( "#fsForm" + this . id ) ,

d = c. attr ( "action" ) ,

e = ( this . id , a. value ) ;

if ( ! e || "" === e ) return ! 0 ;

if ( "XX" == ( $ ( a ) . data ( "country" ) || "XX" ) ) return ! 0 ;

var f = d. substring ( 0 , d. lastIndexOf ( "/" ) ) + "/validate.php" ;

return $ ( b ) . addClass ( "fsFieldValidating" ) , $. ajax ( {

url : f ,

dataType : "jsonp" ,

data : {

f : this . id ,

field : this . getFieldId ( a. id ) ,

value : a. value

} ,

success : this . onValidationResult . bind ( this )

} ) , ! 0

} , Formstack. Form . prototype . onValidationResult = function ( a ) {

if ( a && a. success && a. field ) {

var b = $ ( "#field" + a. field ) ;

if ( b && b. length ) {

var c = b [ 0 ] ,

d = this . getFieldContainer ( c ) ;

if ( d ) return $ ( d ) . removeClass ( "fsFieldValidating" ) , a. valid ? void 0 : void this . highlightField ( c , ! 0 )

}

}

} , Formstack. Form . prototype . getPhoneParts = function ( a , b ) {

var c = a. toLowerCase ( ) . replace ( /[^\dx]/g , "" ) ,

d = "" ;

if ( c. indexOf ( "x" ) >= 0 ) {

var e = c. split ( "x" ) ;

c = e [ 0 ] , d = e [ 1 ]

}

return b || "1" == c. charAt ( 0 ) && ( c = c. slice ( 1 ) ) , [ c , d ]

} , Formstack. Form . prototype . checkFormatPhoneUS = function ( a ) {

if ( "undefined" != typeof googlePhoneParser ) return this . checkFormatPhone ( a ) ;

var b = this . getPhoneParts ( a. value ) ,

c = b [ 0 ] ,

d = b [ 1 ] ;

return 10 == c. length && ( a. value = "(" + c. substr ( 0 , 3 ) + ") " + c. substr ( 3 , 3 ) + "-" + c. substr ( 6 , 4 ) , d. length && ( a. value += " x" + d ) , ! 0 )

} , Formstack. Form . prototype . checkFormatPhoneUK = function ( a ) {

if ( "undefined" != typeof googlePhoneParser ) return this . checkFormatPhone ( a ) ;

var b = this . getPhoneParts ( a. value ) ,

c = b [ 0 ] ,

d = b [ 1 ] ;

return "44" == c. substr ( 0 , 2 ) && ( c = c. slice ( 2 ) , "0" != c. charAt ( 0 ) && ( c = "0" + c ) ) , "0" == c. charAt ( 0 ) && ( 10 == c. length || 11 == c. length ) && ( "1" == c. charAt ( 1 ) && ( "1" == c. charAt ( 2 ) || "1" == c. charAt ( 3 ) ) || "8" == c. charAt ( 1 ) ? a. value = c. substr ( 0 , 4 ) + " " + c. substr ( 4 , 3 ) + " " + c. substr ( 7 , c. length - 7 ) : "2" == c. charAt ( 1 ) || "3" == c. charAt ( 1 ) || "5" == c. charAt ( 1 ) ? a. value = c. substr ( 0 , 3 ) + " " + c. substr ( 3 , 4 ) + " " + c. substr ( 7 , c. length - 7 ) : a. value = c. substr ( 0 , 5 ) + " " + c. substr ( 5 , c. length - 5 ) , d. length && ( a. value += " x" + d ) , ! 0 )

} , Formstack. Form . prototype . checkFormatPhoneAU = function ( a ) {

if ( "undefined" != typeof googlePhoneParser ) return this . checkFormatPhone ( a ) ;

var b = this . getPhoneParts ( a. value , ! 0 ) ,

c = ! 0 ,

d = b [ 0 ] ,

e = b [ 1 ] ;

"61" === d. substr ( 0 , 2 ) && ( d = d. slice ( 2 ) ) , 9 === d. length && ( d = "0" + d ) ;

for ( var f = [ "0" , "13" , "1300" , "18" , "1800" ] , g = ! 1 , h = 0 , i = f. length ; h < i ; h ++ )

if ( d. substr ( 0 , f [ h ] . length ) === f [ h ] ) {

g = ! 0 , "0" !== f [ h ] && ( c = ! 1 ) ;

break

}

if ( ! g ) return ! 1 ;

if ( - 1 === [ 6 , 10 ] . indexOf ( d. length ) ) return ! 1 ;

var j = "" ;

return j = c ? "(" + d. substr ( 0 , 2 ) + ") " + d. substr ( 2 , 4 ) + " " + d. substr ( 6 , 4 ) : 6 === d. length ? d. substr ( 0 , 2 ) + " " + d. substr ( 2 , 2 ) + " " + d. substr ( 4 , 2 ) : d. substr ( 0 , 4 ) + " " + d. substr ( 4 , 3 ) + " " + d. substr ( 7 , 3 ) , e. length && ( j += " x" + e ) , a. value = j , ! 0

} , Formstack. Form . prototype . checkFormatPhoneXX = function ( a ) {

return "undefined" != typeof googlePhoneParser ? this . checkFormatPhone ( a ) : /\d{3,}/ . test ( a. value )

} , Formstack. Form . prototype . checkFormatPhone = function ( a ) {

if ( "undefined" == typeof googlePhoneParser ) return this . checkFormatPhoneXX ( a ) ;

var b = $ ( a ) . data ( "country" ) || "XX" ;

if ( "XX" == b ) return /\d{3,}/ . test ( a. value ) ;

"UK" == b && ( b = "GB" ) ;

var c = googlePhoneParser ( a. value , b ) ;

if ( ! c || ! c. valid ) return ! 1 ;

var d = $ ( a ) . data ( "format" ) || "national" ;

return a. value = c [ d ] || a. value , ! 0

} , Formstack. Form . prototype . checkFormatZipUS = function ( a ) {

var b = a. value . replace ( /^\s+/ , "" ) . replace ( /\s+$/ , "" ) ;

return !! b. match ( /^\d{5}(?:\-\d{4})?$/ ) && ( a. value = b , ! 0 )

} , Formstack. Form . prototype . checkFormatZipXX = function ( a ) {

return ! 0

} , Formstack. Form . prototype . checkFormatZipCA = function ( a ) {

var b = a. value . replace ( /^\s+/ , "" ) . replace ( /\s+$/ , "" ) . replace ( /\s{2,}/ , " " ) . toUpperCase ( ) ;

return 6 != b. length || b. match ( /\s/ ) || ( b = b. substr ( 0 , 3 ) + " " + b. substr ( 3 , 3 ) ) , !! b. match ( /^[A-Z]\d[A-Z] \d[A-Z]\d$/ ) && ( a. value = b , ! 0 )

} , Formstack. Form . prototype . checkFormatZipUK = function ( a ) {

var b = a. value . replace ( /^\s+/ , "" ) . replace ( /\s+$/ , "" ) . replace ( /\s{2,}/ , " " ) . toUpperCase ( ) ;

return b. match ( /\s/ ) || ( b = b. substr ( 0 , b. length - 3 ) + " " + b. substr ( b. length - 3 , 3 ) ) , !! b. match ( /^[A-Z]{1,2}[0-9R][0-9A-Z]? [0-9][ABD-HJLNP-UW-Z]{2}$/ ) && ( a. value = b , ! 0 )

} , Formstack. Form . prototype . checkFormatZipAU = function ( a ) {

var b = a. value . replace ( /^\s+/ , "" ) . replace ( /\s+$/ , "" ) . toUpperCase ( ) ;

return !! b. match ( /^\d{4}$/ ) && ( a. value = b , ! 0 )

} , Formstack. Form . prototype . checkFormatNumber = function ( a ) {

var b = a. value . replace ( /[^\d\.\-]/g , "" ) ,

c = this . getNumberProperties ( a ) ,

d = [ ] ,

e = b. split ( "." ) ;

if ( e [ 0 ] && ( d = e [ 0 ] . match ( /.{1,16}/g ) ) , e [ 1 ] ) {

var f ;

if ( d. length ) {

var g = d [ d. length - 1 ] . split ( "" ) ,

f = g. pop ( ) ;

f += "." + e [ 1 ] , d [ d. length - 1 ] = g. join ( "" )

} else f = "." + e [ 1 ] ;

f = f. match ( /.{1,16}/g ) , d. push ( f [ 0 ] )

}

for ( var h = 0 , i = d. length ; h < i ; h ++ )

if ( "-" !== d [ [ h ] ] && isNaN ( d [ h ] ) ) return ! 1 ;

if ( ! isNaN ( c. min ) && b < c. min || ! isNaN ( c. max ) && b > c. max ) return ! 1 ;

var j = "" ;

if ( isNaN ( c. decimals ) ) j = b ;

else

for ( var h = 0 , i = d. length ; h < i ; h ++ ) j += h < i - 1 ? d [ h ] : parseFloat ( d [ h ] ) . toFixed ( c. decimals ) + "" ;

return a. value = j , ! 0

} , Formstack. Form . prototype . checkFormatCreditCard = function ( a ) {

var b = a. value . replace ( /\D/g , "" ) ,

c = 0 ,

d = 1 ;

a. value = b ;

for ( var e = b. length - 1 ; e >= 0 ; e -- ) {

var f = parseInt ( b. charAt ( e ) ) * d ;

c += f > 9 ? f - 9 : f , d = 1 == d ? 2 : 1

}

return c % 10 == 0 && ( b. match ( /^4/ ) ? $ ( a ) . hasClass ( "fsAcceptVisa" ) && ( 13 == b. length || 16 == b. length ) : b. match ( /^(?:51|52|53|54|55)/ ) ? $ ( a ) . hasClass ( "fsAcceptMasterCard" ) && 16 == b. length : b. match ( /^(?:6011|622|64|65)/ ) ? $ ( a ) . hasClass ( "fsAcceptDiscover" ) && 16 == b. length : b. match ( /^(?:34|37)/ ) ? $ ( a ) . hasClass ( "fsAcceptAmex" ) && 15 == b. length : b. match ( /^(?:300|301|302|303|304|305|36|54|55)/ ) ? $ ( a ) . hasClass ( "fsAcceptDiners" ) && ( 14 == b. length || 16 == b. length ) : !! b. match ( /^35/ ) && ( $ ( a ) . hasClass ( "fsAcceptJCB" ) && 16 == b. length ) )

} , Formstack. Form . prototype . getNumberProperties = function ( a ) {

for ( var b = {

min : NaN ,

max : NaN ,

decimals : NaN ,

currency : null

} , c = a. className . split ( /\s+/ ) , d = 0 ; d < c. length ; d ++ ) {

var e , f = c [ d ] ;

( e = f. match ( /^fsNumberMin-([\-\d.]+)/ ) ) ? b. min = parseFloat ( e [ 1 ] ) : ( e = f. match ( /^fsNumberMax-([\-\d.]+)/ ) ) ? b. max = parseFloat ( e [ 1 ] ) : ( e = f. match ( /^fsNumberDecimals-([\d]+)/ ) ) ? b. decimals = parseInt ( e [ 1 ] ) : ( e = f. match ( /^fsNumberCurrency-([dollar|euro|pound|yen]+)/ ) ) && ( b. currency = e [ 1 ] )

}

return b

} , Formstack. Form . prototype . generatePrePopulateLink = function ( ) {

var a = document. location . href ;

a = a. replace ( "&admin_tools" , "" ) , a. indexOf ( "?" ) < 0 && ( a += "?" ) ;

for ( var b = $ ( ".fsField" ) , c = 0 ; c < b. length ; c ++ ) {

var d = b [ c ] ;

if ( ! $ ( d ) . hasClass ( "fsFormatCreditCard" ) ) {

var e = this . getValue ( d ) ;

null !== e && "" !== e && ( name = null !== d. name ? d. name : d. id , a += "&" + name + "=" + encodeURIComponent ( e ) )

}

}

document. getElementById ( "form" + this . id + "PrePopulateLink" ) . value = a , document. getElementById ( "form" + this . id + "PrePopulateDiv" ) . style . display = "block"

} , Formstack. Form . prototype . getValue = function ( a ) {

return a. disabled ? null : "radio" == a. type || "checkbox" == a. type ? a. checked ? a. value : null : "select-one" == a. type ? a. options [ a. selectedIndex ] . value : a. value

} , Formstack. Form . prototype . setValue = function ( a , b ) {

var c = this . getFields ( a , ! 0 ) ,

d = b. split ( "

" ) ,

e = null ,

f = document. getElementById ( "fsCalendar" + a ) ,

g = document. getElementById ( "field" + a + "H" ) ;

if ( ! f && ! g || $. isNumeric ( b ) || ( e = new Date ( b ) , isNaN ( e. getTime ( ) ) && ( e = null ) ) , 0 === c. length )

for ( var h = 0 ; h < d. length ; h ++ ) {

var i = d [ h ] ;

if ( i. indexOf ( " = " ) > 0 ) {

var j = i. split ( " = " ) ,

k = document. getElementById ( "field" + a + "-" + j [ 0 ] ) ;

null !== k && ( k. value = j [ 1 ] )

}

} else

for ( var h = 0 ; h < c. length ; h ++ ) {

var l = c [ h ] ;

if ( "file" !== l. type && ! jQuery ( "#signature" + a ) . length )

if ( "radio" == l. type || "checkbox" == l. type )

if ( d. length > 1 )

for ( var m = 0 ; m < d. length ; m ++ ) {

var i = d [ m ] . split ( " | " ) ;

i [ 0 ] == l. value && ( l. checked = ! 0 )

} else l. value == d [ 0 ] && ( l. checked = ! 0 ) ;

else if ( "select-multiple" == l. type || "select-one" == l. type )

if ( d. length > 1 )

for ( var m = 0 ; m < d. length ; m ++ )

for ( var n = 0 ; n < l. options . length ; n ++ ) {

var i = d [ m ] . split ( " | " ) ;

i [ 0 ] == l. options [ n ] . value && ( l. options [ n ] . selected = ! 0 )

} else if ( null !== e ) {

var o = "field" + a ,

p = l. id . substring ( o. length ) ,

q = l. options ,

r = q [ q. length - 1 ] ,

s = r. value ,

t = null ,

b = null ;

switch ( p ) {

case "M" :

t = e. getMonth ( ) + 1 ;

break ;

case "D" :

t = e. getDate ( ) ;

break ;

case "Y" :

var u = e. getFullYear ( ) ,

v = new String ( s ) ;

4 === v. length ? b = u : 2 === v. length && ( b = new String ( u ) . substring ( 2 ) ) ;

break ;

case "H" :

var w = l. length > 13 ,

x = e. getHours ( ) ,

b = x ,

y = "am" ,

z = document. getElementById ( o + "A" ) ;

w || ( b > 12 ? ( b = x - 12 , y = "pm" ) : 0 === b ? b = 12 : 12 === b && ( y = "pm" ) , z && ( "am" === y ? z. options [ 1 ] . selected = ! 0 : "pm" === y && ( z. options [ 2 ] . selected = ! 0 ) ) ) ;

break ;

case "I" :

var t = e. getMinutes ( ) + 1 ;

break ;

case "S" :

var t = e. getSeconds ( ) + 1

}

if ( null !== t ) q [ t ] . selected = ! 0 ;

else if ( null !== b )

for ( var m = 0 ; m < l. options . length ; m ++ ) b == l. options [ m ] . value && ( l. options [ m ] . selected = ! 0 )

} else

for ( var m = 0 ; m < l. options . length ; m ++ ) d [ 0 ] == l. options [ m ] . value && ( l. options [ m ] . selected = ! 0 ) ;

else l. value = b

}

} , Formstack. Form . prototype . prefill = function ( a ) {

for ( var b = 0 ; b < a. length ; b ++ ) this . setValue ( a [ b ] . id , a [ b ] . value )

} , Formstack. Form . prototype . copyFieldValue = function ( a , b ) {

for ( var c = $ ( ".fsField" ) , d = 0 ; d < c. length ; d ++ ) {

var e = c [ d ] ;

if ( e. id . indexOf ( "field" + a ) > - 1 ) {

var f = e. id . replace ( "field" + a , "" ) ,

g = null === document. getElementById ( "field" + b + f ) ? document. getElementById ( "field" + b ) : document. getElementById ( "field" + b + f ) ;

if ( null === g ) break ;

"radio" == g. type || "checkbox" == g. type ? g. checked = e. checked : g. value = e. value , $ ( g ) . trigger ( "change" )

}

}

} , Formstack. Form . prototype . determineLocation = function ( ) {

if ( navigator. geolocation ) try {

navigator. geolocation . watchPosition ( function ( a ) {

$ ( 'input[name="latitude"]' ) . val ( a. coords . latitude ) , $ ( 'input[name="longitude"]' ) . val ( a. coords . longitude )

} , function ( a ) { } , {

enableHighAccuracy : ! 0 ,

maximumAge : 6e4 ,

timeout : 1e4

} )

} catch ( a ) { }

} , Formstack. Form . prototype . toggleValidation = function ( a ) {

this . validate ? ( this . validate = ! 1 , $ ( a ) . html ( "Turn On Validation" ) , document. getElementById ( "fsSubmitButton" + this . id ) . disabled = ! 0 ) : ( this . validate = ! 0 , $ ( a ) . html ( "Turn Off Validation" ) , document. getElementById ( "fsSubmitButton" + this . id ) . disabled = ! 1 )

} , Formstack. Form . prototype . onPostSubmit = function ( a ) {

null !== a. message && "" !== a. message || ( a. message = "Thank You!" ) ;

var b = '<div align="center" style="font-size:16px;font-weight:bold;padding:25px;">' ;

b += a. message , b += "</div><br />" , $ ( "#fsForm" + this . id ) . html ( b )

} , Formstack. Form . prototype . onSubmitError = function ( a ) {

a. error && this . showError ( a. error )

} , Formstack. Form . prototype . focusFirstError = function ( ) {

var a = $ ( ".fsValidationError" ) . first ( ) ;

if ( a ) {

var b = a. find ( '[aria-invalid="true"]' ) . first ( ) ;

if ( b ) setTimeout ( function ( ) {

b. focus ( )

} , 1 ) ;

else {

var c = $ ( a ) . attr ( "id" ) . replace ( "fsCell" , "" ) ;

setTimeout ( function ( ) {

$ ( "#field" + c ) . focus ( )

} , 1 )

}

}

} , Formstack. Form . prototype . jsonpSubmit = function ( ) {

var a = document. getElementById ( "fsForm" + this . id ) ,

b = ( this . id , document. createElement ( "script" ) ) ;

return b. src = a. action + "?jsonp&" + $ ( a ) . serialize ( ) + "&nocache=" + ( new Date ) . getTime ( ) , a. parentNode . insertBefore ( b , a ) , ! 1

} , Formstack. Form . prototype . changePage = function ( a , b ) {

var c = "fsPage" + this . id + "-" ,

d = document. getElementById ( c + a ) ,

e = document. getElementById ( c + b ) ,

f = null ;

b > a ? f = "forward" : b < a && ( f = "reverse" ) , this . currentPage = b , this . updateProgress ( this . currentPage ) , this . currentPage == this . pages || this . isLastPage ( this . currentPage ) ? ( null !== this . plugins . confirmationPage && void 0 !== this . plugins . confirmationPage && this . plugins . confirmationPage . parsePage ( ) , $ ( "#fsCaptcha" + this . id ) . show ( ) , $ ( "#fsSubmitButton" + this . id ) . show ( ) , $ ( "#fsNextButton" + this . id ) . hide ( ) ) : 1 == this . currentPage ? $ ( "#fsPreviousButton" + this . id ) . hide ( ) : $ ( "#fsSaveIncomplete" + this . id ) . show ( ) , "reverse" === f && ( $ ( "#fsCaptcha" + this . id ) . hide ( ) , $ ( "#fsSubmitButton" + this . id ) . hide ( ) ) ;

var g = this ;

$ ( d ) . fadeOut ( 200 , function ( ) {

if ( $ ( d ) . addClass ( "fsHiddenPage" ) , g. skipPageValidation && "forward" !== f || $ ( ".fsError" ) . hide ( ) , "reverse" === f ? $ ( "#fsNextButton" + g. id ) . show ( ) : "forward" === f && $ ( "#fsPreviousButton" + g. id ) . show ( ) , $ ( e ) . removeClass ( "fsHiddenPage" ) , $ ( e ) . show ( ) , "forward" === f )

for ( var a = $ ( e ) . find ( ".fsSignature" ) , b = 0 ; b < a. length ; b ++ ) $ ( a [ b ] ) . height ( ) <= 30 && ( $ ( a [ b ] ) . empty ( ) , $ ( a [ b ] ) . jSignature ( ) ) ;

$ ( "#fsHeaderImage" ) . length <= 0 ? $ ( document ) . scrollTop ( $ ( e ) . offset ( ) . top - Number ( $ ( ".fsForm" ) . css ( "margin-top" ) . replace ( "px" , "" ) ) ) : $ ( document ) . scrollTop ( $ ( "#fsHeaderImage" ) . offset ( ) . top ) , "reverse" === f ? g. form . trigger ( "form:prev-page" , g. currentPage ) : "forward" === f && g. form . trigger ( "form:next-page" , g. currentPage ) , $ ( e ) . find ( "input,textarea,select" ) . filter ( ":visible:enabled:not([readonly])" ) . first ( ) . focus ( )

} )

} , Formstack. Form . prototype . getIncompleteFields = function ( a ) {

var b = "#fsForm" + this . id + " .fsField" ;

! 0 === a && ( b += ".fsRequired" ) , b += ":not([disabled])" ;

for ( var c = $ ( b ) , d = [ ] , e = c. length , f = 0 ; f < e ; f ++ )

if ( ! this . checkRequired ( c [ f ] , ! 1 , ! 0 ) ) {

var g = this . getFieldId ( c [ f ] . id ) ;

d. push ( {

id : g ,

field : c [ f ]

} )

}

return d

} , Formstack. Form . prototype . enableLogicEvents = function ( ) {

this . fireLogicEvents = ! 0

} , Formstack. Form . prototype . launchDialog = function ( a , b , c ) {

var d = document. querySelector ( ".fs-form-dialog" ) ;

if ( ! d ) {

var e ;

if ( ! ( e = a. goodies ? prompt ( a. message ) : confirm ( a. message ) ) ) return ;

if ( a. goodies ) {

var f = a. goodies [ 0 ] ,

g = e ;

e = { } , e [ f ] = g

}

return void b. apply ( this , [ e ] )

}

if ( a. goodies && a. goodies . length )

for ( var h = 0 , i = a. goodies . length ; h < i ; h ++ ) {

var j = d. querySelector ( ".fs-form-dialog__" + a. goodies [ h ] ) ;

j. className = j. className . replace ( " fs-form-dialog--hidden" , "" )

}

var k , l ;

for ( k in a )

if ( a. hasOwnProperty ( k ) && "goodies" !== k && ( l = d. querySelector ( ".fs-form-dialog__" + k ) ) )

if ( "cancel" === k || "confirm" === k ) {

l. setAttribute ( "title" , a [ k ] ) ;

var m = l. querySelector ( ".fs-form-dialog__button-text" ) ;

m && ( m. innerHTML = a [ k ] )

} else l. innerHTML = a [ k ] ;

var n = function ( e ) {

e && ( e. preventDefault ? e. preventDefault ( ) : e. returnValue = ! 1 ) ;

var f = { } ;

if ( a. goodies && a. goodies . length )

for ( var g = 0 , h = a. goodies . length ; g < h ; g ++ ) {

var i = d. querySelector ( ".fs-form-dialog__" + a. goodies [ g ] ) ;

f [ a. goodies [ g ] ] = i. value

}

b. apply ( this , [ f ] ) , c && o ( )

} . bind ( this ) ,

o = function ( b ) {

b && ( b. preventDefault ? b. preventDefault ( ) : b. returnValue = ! 1 ) , this . closeDialog ( a. goodies , o , n )

} . bind ( this ) ,

p = d. querySelector ( ".fs-form-dialog__cancel" ) ,

q = d. querySelector ( ".fs-form-dialog__confirm" ) ;

Formstack. Util . addEvent ( "click" , p , o ) , Formstack. Util . addEvent ( "click" , q , n ) , d. className = d. className . replace ( " fs-form-dialog--hidden" , "" )

} , Formstack. Form . prototype . closeDialog = function ( a , b , c ) {

var d = document. querySelector ( ".fs-form-dialog" ) ;

if ( d ) {

d. className += " fs-ngdialog-closing" , setTimeout ( function ( ) {

if ( d. className . match ( "fs-form-dialog--hidden" ) || ( d. className += " fs-form-dialog--hidden" ) , d. className = d. className . replace ( " fs-ngdialog-closing" , "" ) , a && a. length )

for ( var b = 0 , c = a. length ; b < c ; b ++ ) {

var e = d. querySelector ( ".fs-form-dialog__" + a [ b ] ) ;

e. className += " fs-form-dialog--hidden"

}

} , 550 ) ;

var e = d. querySelector ( ".fs-form-dialog__cancel" ) ,

f = d. querySelector ( ".fs-form-dialog__confirm" ) ;

Formstack. Util . removeEvent ( "click" , e , b ) , Formstack. Util . removeEvent ( "click" , f , c )

}

} , Formstack. IOS = { } , Formstack. IOS . getRectById = function ( a ) {

var b = document. getElementById ( a ) ;

if ( b ) {

var c = b. getBoundingClientRect ( ) ;

return "{{" + c. left + "," + c. top + "}, {" + c. width + "," + c. height + "}}"

}

return null

} , Formstack. IOS . base64EncodedUpload = function ( a , b ) {

var c = document. getElementById ( "field" + a ) ,

d = document. getElementById ( "field" + a + "-ios-button" ) ;

return c ? ( d && ( d. innerHTML = "Change file" ) , c. value = b , document. getElementById ( "field" + a + "Preview" ) . src = "data:image/jpeg;base64," + b , 1 ) : 0

} , Formstack. IOS . fileUpload = function ( a ) {

var b = "ios://fileupload/" + a ;

window. location = b

} , Formstack. IOS . scanCreditCard = function ( a ) {

var b = "ios://scancreditcard/" + a ;

window. location = b

} , Formstack. IOS . onCreditCard = function ( a , b ) {

var c = document. getElementById ( "field" + a ) ;

if ( ! c ) return ! 1 ;

c. value = b

} , Formstack. Android = { } , Formstack. Android . scanCreditCard = function ( a ) {

if ( ! window. formstackAndroidInterface ) return ! 1 ;

window. formstackAndroidInterface . onScanCreditcard ( a )

} , Formstack. Android . onCreditCard = function ( a , b ) {

var c = document. getElementById ( "field" + a ) ;

if ( ! c ) return ! 1 ;

c. value = b

} , Formstack. Util = {

lcFirst : function ( a ) {

return a [ 0 ] . toLowerCase ( ) + a. slice ( 1 )

}

} , Formstack. Util . checkAll = function ( el ) {

for ( var prefix = el. name . replace ( "_all" , "_" ) , i = 1 , e , checkboxes = document. getElementsByName ( el. name . replace ( "_all" , "[]" ) ) , i = 0 ; i < checkboxes. length ; i ++ ) e = checkboxes [ i ] , e. checked = el. checked ;

var form = document. getElementsByName ( "form" ) ;

form = form [ 0 ] ;

var id = prefix. replace ( "field" , "" ) ;

id = id. replace ( "_" , "" ) , eval ( "form" + form. value + ".checkLogic(" + id + ")" ) , eval ( "form" + form. value + ".updateCalculations(" + id + ")" )

} , Formstack. Util . scrollTo = function ( a ) {

var b = $ ( a ) . offset ( ) ,

c = $ ( a ) . css ( "margin-top" ) ,

d = $ ( a ) . css ( "margin-left" ) ;

c = Number ( c. replace ( "px" , "" ) ) , d = Number ( d. replace ( "px" , "" ) ) , window. scroll ( b. left - d , b. top - c )

} , Formstack. Util . getHeight = function ( a ) {

var b = $ ( a ) . height ( ) ;

return isNaN ( b ) ? 0 : b

} , Formstack. Util . getWidth = function ( a ) {

var b = $ ( a ) . width ( ) ;

return isNaN ( b ) ? 0 : b

} , Formstack. Util . setDate = function ( a ) {

var b = new Date ,

c = document. getElementById ( "field" + a + "Y" ) ;

if ( c ) {

var d = c. options [ 1 ] . value . length ,

e = b. getFullYear ( ) . toString ( ) ;

c. value = e. substring ( 4 - d )

}

var f = document. getElementById ( "field" + a + "M" ) ;

f && ( f. selectedIndex = b. getMonth ( ) + 1 ) ;

var g = document. getElementById ( "field" + a + "D" ) ;

if ( g ) {

var h = b. getDate ( ) ;

g. value = h < 10 ? "0" + h : h

}

} , Formstack. Util . setTime = function ( a ) {

var b = new Date ,

c = b. getHours ( ) ,

d = document. getElementById ( "field" + a + "H" ) ;

if ( d ) {

var e = c ;

d. options . length <= 13 && c > 12 && ( e -= 12 ) , d. value = e < 10 ? "0" + e : e

}

var f = document. getElementById ( "field" + a + "I" ) ;

if ( f ) {

var g = b. getMinutes ( ) ;

f. value = g < 10 ? "0" + g : g

}

var h = document. getElementById ( "field" + a + "S" ) ;

if ( h ) {

var i = b. getSeconds ( ) ;

h. value = i < 10 ? "0" + i : i

}

var j = document. getElementById ( "field" + a + "A" ) ;

j && ( j. selectedIndex = c < 12 ? 1 : 2 )

} , Formstack. Util . formatNumber = function ( a , b ) {

for ( isNaN ( a. decimals ) || ( b = parseFloat ( b ) , b = b. toFixed ( a. decimals ) ) ;

/(\d+)(\d{3})/ . test ( b. toString ( ) ) ; ) b = b. toString ( ) . replace ( /(\d+)(\d{3})/ , "$1,$2" ) ;

var c = null ;

return a. currency && ( "dollar" == a. currency ? c = "$" : "euro" == a. currency ? c = "€" : "pound" == a. currency ? c = "£" : "yen" == a. currency && ( c = "¥" ) ) , c && ( b = c + b ) , b

} , Formstack. Util . monthToInt = function ( a ) {

if ( isFinite ( a ) ) return parseInt ( a ) ;

var b = [ "jan" , "feb" , "mar" , "apr" , "may" , "jun" , "jul" , "aug" , "sep" , "oct" , "nov" , "dec" ] ,

c = a. substr ( 0 , 3 ) . toLowerCase ( ) ,

d = b. indexOf ( c ) ;

return d > - 1 ? d + 1 : 0

} , Formstack. Util . Loader = function ( ) {

this . loading = { }

} , Formstack. Util . Loader . prototype . load = function ( a , b ) {

if ( this . loading [ a ] ) this . loading [ a ] . success . push ( b ) ;

else {

this . loading [ a ] = {

success : [ b ]

} ;

var c = document. getElementsByTagName ( "head" ) [ 0 ] || document. documentElement ,

d = document. createElement ( "script" ) ;

d. src = a ;

var e = ! 1 ;

d. onload = d. onreadystatechange = $. proxy ( function ( ) {

e || d. readyState && "loaded" !== d. readyState && "complete" !== d. readyState || ( e = ! 0 , d. onload = d. onreadystatechange = null , this . success ( a ) )

} , this ) , c. insertBefore ( d , c. firstChild )

}

} , Formstack. Util . Loader . prototype . success = function ( a ) {

if ( this . loading [ a ] ) {

if ( ! this . loading [ a ] . success || ! this . loading [ a ] . success . length ) return void delete this . loading [ a ] ;

for ( var b = this . loading [ a ] . success , c = b. length , d = 0 ; d < c ; d ++ ) b [ d ] && "function" == typeof b [ d ] && b [ d ] ( ) ;

delete this . loading [ a ]

}

} , Formstack. Util . addEvent = function ( a , b , c ) {

b. addEventListener ? b. addEventListener ( a , c , ! 1 ) : b. attachEvent && b. attachEvent ( "on" + a , c )

} , Formstack. Util . removeEvent = function ( a , b , c ) {

b. addEventListener ? b. removeEventListener ( a , c , ! 1 ) : b. attachEvent && b. detachEvent ( "on" + a , c )

} , window. Formstack = Formstack , window. Formstack . Util . Loader = new Formstack. Util . Loader , String . prototype . trim || function ( ) {

var a = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g ;

String . prototype . trim = function ( ) {

return this . replace ( a , "" )

}

} ( )