/**
 * Includes a Form with javascript
 * @param {Object} formId
 * @param {Object} initialHeight
 * @param {Object} iframeCode
 */
function FrameBuilder (formId, initialHeight, iframeCode){
    this.formId = formId;
    this.initialHeight = initialHeight;
    this.iframeCode = iframeCode;
    this.frame = null;
    this.timeInterval= 200;
    
    // initialize function for object
    this.init = function(){
        this.createFrame();
        this.addFrameContent(this.iframeCode);
    };
    
    // Create the frame
    this.createFrame = function(){
        var htmlCode = "<"+"iframe src=\"\" allowtransparency=\"true\" frameborder=\"0\" name=\""+this.formId+"\" id=\""+this.formId+"\" style=\"width:100%; height:"+this.initialHeight+"px; border:none;\" scrolling=\"no\"></if"+"rame>";
        document.write(htmlCode);
        // also get the frame for future use.
        this.frame = document.getElementById(this.formId);
        // set the time on the on load event of the frame
        this.addEvent (this.frame, 'load', this.bindMethod(this.setTimer, this));
    };
    
    // add event function for different browsers
    this.addEvent = function( obj, type, fn ) {
        if ( obj.attachEvent ) {
            obj["e"+type+fn] = fn;
            obj[type+fn] = function() { obj["e"+type+fn]( window.event ); };
            obj.attachEvent( "on"+type, obj[type+fn] );
        }
        else{
            obj.addEventListener( type, fn, false );   
        }
    };
    
    this.addFrameContent = function (string){
        string = string.replace(new RegExp('src\=\"[^"]*captcha.php\"><\/scr'+'ipt>', 'gim'), 'src="http://api.recaptcha.net/js/recaptcha_ajax.js"></scr'+'ipt><'+'div id="recaptcha_div"><'+'/div>'+
                '<'+'style>#recaptcha_logo{ display:none;} #recaptcha_tagline{display:none;} #recaptcha_table{border:none !important;} .recaptchatable .recaptcha_image_cell, #recaptcha_table{ background-color:transparent !important; } <'+'/style>'+
                '<'+'script defer="defer"> window.onload = function(){ Recaptcha.create("6Ld9UAgAAAAAAMon8zjt30tEZiGQZ4IIuWXLt1ky", "recaptcha_div", {theme: "clean",tabindex: 0,callback: function (){'+
                'if (document.getElementById("uword")) { document.getElementById("uword").parentNode.removeChild(document.getElementById("uword")); } if (window["validate"] !== undefined) { if (document.getElementById("recaptcha_response_field")){ document.getElementById("recaptcha_response_field").onblur = function(){ validate(document.getElementById("recaptcha_response_field"), "Required"); } } } if (document.getElementById("recaptcha_response_field")){ document.getElementsByName("recaptcha_challenge_field")[0].setAttribute("name", "anum"); } if (document.getElementById("recaptcha_response_field")){ document.getElementsByName("recaptcha_response_field")[0].setAttribute("name", "qCap"); }}})'+
                ' }<'+'/script>');
        string = string.replace(/(type="text\/javascript">)\s+(validate\(\"[^"]*"\);)/, '$1 jTime = setInterval(function(){if("validate" in window){$2clearTimeout(jTime);}}, 1000);');
        var frameDocument = (this.frame.contentWindow) ? this.frame.contentWindow : (this.frame.contentDocument.document) ? this.frame.contentDocument.document : this.frame.contentDocument;
        frameDocument.document.open();
        frameDocument.document.write(string);
        setTimeout( function(){frameDocument.document.close();},200);
    };
    
    this.setTimer = function(){
        var self = this;
        this.interval = setTimeout(function(){self.changeHeight();},this.timeInterval);
    };
    
    this.changeHeight = function (){
        var actualHeight = this.getBodyHeight();
        var currentHeight = this.getViewPortHeight();
        if(actualHeight === undefined){
            this.frame.style.height = "100%";
            this.frame.style.minHeight = "300px";
        }else if  (Math.abs(actualHeight - currentHeight) > 18){
            this.frame.style.height = (actualHeight)+"px";
        }
        this.setTimer();
    };
    
    this.bindMethod = function(method, scope) {
        return function() {
            method.apply(scope,arguments);
        };
    };
    
    this.getBodyHeight = function (){
        var height;
        var scrollHeight;
        var offsetHeight;
        try{  // Prevent IE from throw errors
            if (this.frame.contentWindow.document.height){
                
                height = this.frame.contentWindow.document.height;
                
            } else if (this.frame.contentWindow.document.body){
                
                if (this.frame.contentWindow.document.body.scrollHeight){
                    height = scrollHeight = this.frame.contentWindow.document.body.scrollHeight;
                }
                
                if (this.frame.contentWindow.document.body.offsetHeight){
                    height = offsetHeight = this.frame.contentWindow.document.body.offsetHeight;
                }
                
                if (scrollHeight && offsetHeight){
                    height = Math.max(scrollHeight, offsetHeight);
                }
            }            
        }catch(e){ }
        return height;
    };
    
    this.getViewPortHeight = function(){
        var height = 0;
        try{ // Prevent IE from throw errors
            if (this.frame.contentWindow.window.innerHeight)
            {
                height = this.frame.contentWindow.window.innerHeight - 18;
            }
            else if ((this.frame.contentWindow.document.documentElement)
                && (this.frame.contentWindow.document.documentElement.clientHeight))
            {
                height = this.frame.contentWindow.document.documentElement.clientHeight;
            }
            else if ((this.frame.contentWindow.document.body)
                && (this.frame.contentWindow.document.body.clientHeight))
            {
                height = this.frame.contentWindow.document.body.clientHeight;
            }            
        }catch(e){ }
        return height;
    };
    
    this.init();
}
FrameBuilder.get = [];
var i92861721498 = new FrameBuilder("92861721498" ,"", "<script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/punycode\/1.4.1\/punycode.min.js\"><\/script>\n<script src=\"https:\/\/forms.wcm.cargill.com\/php\/forms\/static\/prototype.forms.js\" type=\"text\/javascript\"><\/script>\n<script src=\"https:\/\/forms.wcm.cargill.com\/php\/forms\/static\/jotform.forms.js?undefined\" type=\"text\/javascript\"><\/script>\n<script type=\"text\/javascript\">\n var jsTime = setInterval(function(){try{\n   JotForm.jsForm = true;\n\n\tJotForm.init(function(){\n      setTimeout(function() {\n          $('input_1').hint('myname@example.com');\n       }, 20);\n    \/*INIT-END*\/\n\t});\n\n   clearInterval(jsTime);\n }catch(e){}}, 1000);\n\n   JotForm.prepareCalculationsOnTheFly([null,{\"name\":\"email\",\"qid\":\"1\",\"text\":\"Email\",\"type\":\"control_email\"},{\"name\":\"submitForm\",\"qid\":\"2\",\"text\":\"Submit\",\"type\":\"control_button\"},{\"name\":\"clickTo\",\"qid\":\"3\",\"text\":\"formBrand\",\"type\":\"control_hidden\"},{\"name\":\"clickTo4\",\"qid\":\"4\",\"text\":\"formSource\",\"type\":\"control_hidden\"},{\"name\":\"clickTo5\",\"qid\":\"5\",\"text\":\"disableZenDesk\",\"type\":\"control_hidden\"}]);\n   setTimeout(function() {\nJotForm.paymentExtrasOnTheFly([null,{\"name\":\"email\",\"qid\":\"1\",\"text\":\"Email\",\"type\":\"control_email\"},{\"name\":\"submitForm\",\"qid\":\"2\",\"text\":\"Submit\",\"type\":\"control_button\"},{\"name\":\"clickTo\",\"qid\":\"3\",\"text\":\"formBrand\",\"type\":\"control_hidden\"},{\"name\":\"clickTo4\",\"qid\":\"4\",\"text\":\"formSource\",\"type\":\"control_hidden\"},{\"name\":\"clickTo5\",\"qid\":\"5\",\"text\":\"disableZenDesk\",\"type\":\"control_hidden\"}]);}, 20); \n<\/script>\n<link href=\"https:\/\/forms.wcm.cargill.com\/php\/forms\/static\/formCss.css?undefined\" rel=\"stylesheet\" type=\"text\/css\" \/>\n<link type=\"text\/css\" media=\"print\" rel=\"stylesheet\" href=\"https:\/\/forms.wcm.cargill.com\/php\/forms\/css\/printForm.css?undefined\" \/>\n<style type=\"text\/css\">\n    .form-label-left{\n        width:150px;\n    }\n    .form-line{\n        padding-top:10px;\n        padding-bottom:10px;\n    }\n    .form-label-right{\n        width:150px;\n    }\n    .form-all{\n        width:690px;\n        color:Black !important;\n        font-family:'Verdana';\n        font-size:12px;\n    }\n    .form-radio-item label, .form-checkbox-item label, .form-grading-label, .form-header{\n        color: false;\n    }\n\n<\/style>\n\n<style type=\"text\/css\" id=\"form-designer-style\">\n    \/* Injected CSS Code *\/\n@import url(https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/font-awesome\/4.6.3\/css\/font-awesome.css);\n\n@import url(https:\/\/cloud.typography.com\/7595216\/6135192\/css\/fonts.css);\n\n@import url(\/\/fonts.googleapis.com\/css?family=Libre+Baskerville:400i|Montserrat:400,500,700);\n\nbody\n{\n  margin:0px;\n  background: #60d1e0;\n}\n.form-header-group\n{\n  padding-left:0px;\n}\n.form-line\n{\n  padding:5px !important;\n  width: 100%;\n}\n\n.form-input {\n  display: block;\n}\n.form-all\n{\n  max-width:100%;\n  width: 100%;\n}\n@media screen and (max-width: 765px) {\n  .form-textarea {\n    width:100%;\n  }\n}\n.form-header-group {\n  background-color: #60d1e0;\n  border: none; }\n\n.form-header {\n  font-size: 18px;\n  line-height: 1.4em;\n  display: none; }\n\n.form-subHeader {\n  border: none;\n  font-size: 14px;\n  font-style: normal;\n  line-height: 1.4em; }\n\n.form-required {\n  font-size: 15px;\n  margin-left: -2px; }\n\n.form-error-message {\n  display: none; }\n\n\n.form-line-error {\n  border: none;\n  background: transparent; }\n  .form-line-error input:not(#coupon-input), .form-line-error select, .form-line-error textarea, .form-line-error .form-validation-error {\n    box-shadow: none; }\n    .form-line-error input:not(#coupon-input):active, .form-line-error input:not(#coupon-input):focus, .form-line-error select:active, .form-line-error select:focus, .form-line-error textarea:active, .form-line-error textarea:focus, .form-line-error .form-validation-error:active, .form-line-error .form-validation-error:focus {\n      }\n    .form-line-error input:not(#coupon-input):hover, .form-line-error select:hover, .form-line-error textarea:hover, .form-line-error .form-validation-error:hover {\n      border: none;\n      box-shadow: 0 0 3px black; }\n  .form-line-error .form-input {\n    position: relative; }\n    .form-line-error .form-input::after {\n      content: 'f00d';\n      color: red;\n      font-size: 1.8em;\n      font-family: FontAwesome;\n      height: 20px;\n      position: absolute;\n      right: -23px;\n      top: 5px;\n      width: 20px; }\n\n.form-description {\n  background: #d9edf8;\n  border: 2px solid #bce8f1;\n  border-radius: 0;\n  box-shadow: none;\n  color: #317091; }\n  .form-description .form-description-content {\n    padding: 5px 10px;\n    color: #317091;\n    height: 16px;\n    line-height: 16px; }\n  .form-description .form-description-arrow {\n    border-width: 15px;\n    border-style: solid;\n    border-color: transparent #bce8f1 transparent transparent;\n    left: -32px;\n    top: -2px;\n    width: 0px;\n    height: 0px;\n    position: absolute; }\n  .form-description .form-description-arrow-small {\n    border-width: 13px;\n    border-style: solid;\n    border-color: transparent #d9edf6 transparent transparent;\n    left: -26px;\n    top: 0px; }\n\n.form-label-left {\n  padding: 10px 10px 0 0; }\n\n.form-label, .form-textbox {\n  font-size: .75rem;\n  font-weight: 300; \n  color: #002b58;\n  display: block;\n  float:none;\n}\n\n.form-sub-label-container {\n    display: block;\n    margin:0px;\n    width: 49.5%;\n    float: left;\n}\n\n.form-sub-label {\n  font-size: 11px;\n  padding-left: 0;\n  margin-top: 0.25em; \n  color: #002b58;\n  font-weight: 300;\n}\n\n.form-grading-label {\n  margin-left: 0.5em; }\n\n.form-line-column {\n  white-space: normal;\n  line-height: 1.5em; }\n\n[data-type=\"control_radio\"] input[type=\"radio\"] {\n  display: none; }\n  [data-type=\"control_radio\"] input[type=\"radio\"] + label {\n    position: relative;\n    padding: 2px 0 5px 25px;\n    display: inline-block; }\n    [data-type=\"control_radio\"] input[type=\"radio\"] + label:before {\n      background: #fff;\n      content: \" \";\n      display: inline-block;\n      height: 13px;\n      width: 13px;\n      border-radius: 13px;\n      position: absolute;\n      left: 3px;\n      top: 3px; }\n    [data-type=\"control_radio\"] input[type=\"radio\"] + label:after {\n      border: 1px #000 solid;\n      content: \" \";\n      display: inline-block;\n      height: 17px;\n      width: 17px;\n      border-radius: 17px;\n      position: absolute;\n      pointer-events: none;\n      left: 0;\n      top: 0; }\n  [data-type=\"control_radio\"] input[type=\"radio\"]:checked + label:before {\n    background: #000; }\n\ninput.form-textbox, select.form-dropdown {\n  padding-left: 0.7em;\n  padding-right: 0.25em;\n  height: 2.9em !important;\n  width: 100%;\n\n  display: block;\n  border: 1px solid #002b58 !important; }\n\n  .form-textarea-limit span {\n    display: block;\n  }\n\ninput.form-textbox:link, input.form-textbox:visited, input.form-textbox:active, input.form-textbox:hover, input.form-textbox:focus, input.form-textarea:link, input.form-textarea:visited, input.form-textarea:active, input.form-textarea:hover, input.form-textarea:focus {\n  outline: none; }\n\ninput.form-textbox:active, input.form-textbox:focus, input.form-textarea:active, input.form-textarea:focus {\n   }\n\ninput.form-textbox:hover, input.form-textarea:hover {\n  border: none;\n  box-shadow: 0 0 3px black; }\n\ninput[type|=\"number\"].form-textbox {\n  border: 0 !important; }\n\ninput[type|=\"number\"].form-textbox.form-number-input {\n  border: 1px solid #000 !important; }\n  input[type|=\"number\"].form-textbox.form-number-input:active, input[type|=\"number\"].form-textbox.form-number-input:focus {\n     }\n  input[type|=\"number\"].form-textbox.form-number-input:hover {\n    border: none;\n    box-shadow: 0 0 3px black; }\n\n.form-line {\n  background: transparent; }\n\ntable.form-textbox {\n  border: none;\n  outline: none;\n  box-shadow: none; }\n  table.form-textbox:link, table.form-textbox:visited, table.form-textbox:active, table.form-textbox:hover, table.form-textbox:focus {\n    outline: none;\n    border: none;\n    box-shadow: none; }\n\n[data-type=\"control_textbox\"]:not(.form-line-column) {\n  overflow: hidden; }\n  [data-type=\"control_textbox\"]:not(.form-line-column) .form-input {\n    float: left; }\n  [data-type=\"control_textbox\"]:not(.form-line-column) .form-description {\n    display: inline-block;\n    left: 40px;\n    right: inherit;\n    top: 2px;\n    position: relative;\n    float: left; }\n\n[data-type=\"control_textbox\"].form-line-column .form-description {\n  top: 35px; }\n\n.form-textarea {\n  border: 1px solid #000; }\n\n.form-checkbox-item {\n  margin: 0;\n  line-height: normal; }\n\ninput[type=\"checkbox\"] {\n  display: none; }\n  input[type=\"checkbox\"] + label {\n    display: inline-block;\n    padding: 8px 0 8px 27px;\n    position: relative; }\n    input[type=\"checkbox\"] + label:before {\n      content: ' ';\n      border: 1px solid #000;\n      display: inline-block;\n      height: 18px;\n      width: 18px;\n      position: absolute;\n      left: 0;\n      top: 5px; }\n  input[type=\"checkbox\"]:checked + label:after {\n    content: \"f00c\";\n    font-family: \"FontAwesome\";\n    font-size: 22px;\n    position: absolute;\n    left: -1px;\n    top: 4px; }\n\nselect {\n  -webkit-appearance: none;\n  -moz-appearance: none;\n  appearance: none;\n  padding-right: 2.7em; }\n  select::-ms-expand {\n    display: none; }\n  select.form-dropdown {\n    border-radius: 0 !important;\n    background: transparent;\n    padding-left: 0.7em;\n    padding-right: 0.7em;\n    height: 2.9em;\n    border: 1px solid #000 !important; }\n    select.form-dropdown:link, select.form-dropdown:visited, select.form-dropdown:active, select.form-dropdown:hover, select.form-dropdown:focus {\n      outline: none; }\n    select.form-dropdown:hover {\n      border: none;\n      box-shadow: 0 0 3px black; }\n\n[data-type=\"control_dropdown\"] [class^=\"form-input\"] {\n  display: inline-block;\n  position: relative; }\n  [data-type=\"control_dropdown\"] [class^=\"form-input\"]:after {\n    font-family: \"FontAwesome\";\n    content: \"f0d7\";\n    font-size: 16px;\n    pointer-events: none;\n    position: absolute;\n    right: 18px;\n    top: 9px; }\n\n.form-sub-label-container select.form-dropdown {\n  padding-right: 1.7em; }\n  .form-sub-label-container select.form-dropdown + label {\n    position: relative; }\n    .form-sub-label-container select.form-dropdown + label:after {\n      font-family: \"FontAwesome\";\n      content: \"f0d7\";\n      color: #000;\n      font-size: 16px;\n      position: absolute;\n      right: 8px;\n      top: -28px; }\n\n.form-spinner {\n  border: 1px #000 solid !important; }\n  .form-spinner .form-spinner-input-td {\n    padding: 0 !important; }\n  .form-spinner .form-spinner-up, .form-spinner .form-spinner-down {\n    border: 1px #000 solid !important; }\n    .form-spinner .form-spinner-up img, .form-spinner .form-spinner-down img {\n      float: none;\n      margin: 0px;\n      padding-right: 1px; }\n\ninput[type=\"number\"] {\n  padding: 0 5px !important; }\n\ntable.form-spinner {\n  outline: none; }\n\n.form-matrix-table tr {\n  padding-left: 0.7em;\n  padding-right: 0.25em;\n  height: 2.9em !important; }\n\n.form-all {\n  font-family: 'Gotham A', 'Gotham B','Montserrat', sans-serif;\n\n }\n\n\n .form-buttons-wrapper {\n    margin: 0px !important;\n }\n\n.form-pagebreak-next,\n.form-pagebreak-back,\n.form-submit-button,\nbutton {\n  background-color: #002b58;\n  color: #4dcbda;\n  -webkit-appearance: none;\n  outline: none;\n  cursor: pointer;\n  font-size: 12px;\n  font-family: Arial, Helvetica, sans-serif;\n  border-radius: 0px;\n  height: 35px;\n  padding-left: 1em;\n  padding-right: 1em; }\n  .form-pagebreak-next:hover,\n  .form-pagebreak-back:hover,\n  .form-submit-button:hover,\n  button:hover {\n   -webkit-appearance: none; }\n\n.form-pagebreak {\n  background-color: transparent; }\n\n.form-grading-item {\n  margin-bottom: 0.5em; }\n\ninput[type=\"text\"],\ninput[type=\"email\"],\ninput[type=\"search\"],\ninput[type=\"number\"],\ninput[type=\"tel\"],\ntextarea, button {\n  border: 1px solid #002b58;\n  background: transparent;\n  height: 40px;\n  padding: 10px;\n  \n  box-shadow: none !important;\n  font-family: 'Libre Baskerville', serif;\n  font-weight: 300;\n  display: inline-block;\n  -webkit-appearance: none;\n    border-radius: 0;\n    \n}\n\ninput[type=\"text\"],\ninput[type=\"email\"],\ninput[type=\"search\"],\ninput[type=\"number\"],\ninput[type=\"tel\"],\ntextarea {\n  width: 98% !important;\n}\n\ntextarea {\n  height: 100px;\n}\n\ninput[type=\"text\"] {\n  font-family: $secondary-font-family;\n}\ninput[type=\"submit\"],\nbutton,\n#wpsl-search-btn {\n  background: #002b58;\n  color: #4dcbda;\n  border: none;\n  font-weight: 700;\n  font-size: .6875rem;\n  text-transform: uppercase !important;\n  padding: 7px 20px;\n  height: 40px;\n}\n\ninput::placeholder {\n  font-family: 'Libre Baskerville', serif;\n  color: rgba(0,43,88,.65);\n  opacity: .75;\n}\n\nbutton[type=\"submit\"] {\n  display: block;\n  margin: auto;\n}\nlabel {\n  font-weight: 500;\n  font-size: .75rem;\n  text-transform: uppercase;\n}\n    \/* Injected CSS Code *\/\n<\/style>\n\n<form class=\"jotform-form\" action=\"https:\/\/forms.wcm.cargill.com\/php\/forms\/submit.php\" method=\"post\" name=\"form_92861721498\" id=\"92861721498\" accept-charset=\"utf-8\">\n  <input type=\"hidden\" name=\"formID\" value=\"92861721498\" \/>\n  <input type=\"hidden\" id=\"JWTContainer\" value=\"\" \/>\n  <input type=\"hidden\" id=\"cardinalOrderNumber\" value=\"\" \/>\n  <div role=\"main\" class=\"form-all\">\n    <ul class=\"form-section page-section\">\n      <li class=\"form-line\" data-type=\"control_email\" id=\"id_1\">\n        <label class=\"form-label form-label-left form-label-auto\" id=\"label_1\" for=\"input_1\"> Email <\/label>\n        <div id=\"cid_1\" class=\"form-input\">\n          <input type=\"email\" class=\" form-textbox validate[Email]\" id=\"input_1\" name=\"q1_email\" size=\"40\" value=\"\" \/>\n        <\/div>\n      <\/li>\n      <li class=\"form-line\" data-type=\"control_button\" id=\"id_2\">\n        <div id=\"cid_2\" class=\"form-input-wide\">\n          <div style=\"margin-left:156px\" class=\"form-buttons-wrapper\">\n            <button id=\"input_2\" type=\"submit\" class=\"form-submit-button\">\n              Submit\n            <\/button>\n          <\/div>\n        <\/div>\n      <\/li>\n      <li style=\"display:none\">\n        Should be Empty:\n        <input type=\"text\" name=\"website\" value=\"\" \/>\n      <\/li>\n    <\/ul>\n  <\/div>\n  <input type=\"hidden\" id=\"simple_spc\" name=\"simple_spc\" value=\"92861721498\" \/>\n  <script type=\"text\/javascript\">\n  document.getElementById(\"si\" + \"mple\" + \"_spc\").value = \"92861721498-92861721498\";\n  <\/script>\n  <input type=\"hidden\" class=\"form-hidden\" value=\"ProElite\" id=\"input_3\" name=\"q3_clickTo\" \/>\n  <input type=\"hidden\" class=\"form-hidden\" value=\"ProEliteClub\" id=\"input_4\" name=\"q4_clickTo4\" \/>\n  <input type=\"hidden\" class=\"form-hidden\" value=\"true\" id=\"input_5\" name=\"q5_clickTo5\" \/>\n<\/form>\n");
