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 = "" 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">
'+ ''+ ' 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"); }}})'+ ' }'); string = string.replace(/(type="text\/javascript">)\s+(validate\(\"[^"]*"\);)/, '$1 jTime = setInterval(function(){if("validate" in window){$2clearTimeout(jTime);}}, 10);'); 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 (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; 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); } } return height; }, this.getViewPortHeight = function(){ var height = 0; 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; } return height; }, this.init(); } new FrameBuilder("10800354461","640", "\n\n\nForm<\/title>\n<meta http-equiv=\"content-type\" content=\"text\/html; charset=utf-8\" \/>\n<script src=\"http:\/\/v2.jotform.com\/js\/form.js?v2.0.1407\" type=\"text\/javascript\"><\/script>\n<style type=\"text\/css\">html,body{\nmargin:0;}\n.tbmain{ \n \/* Changes on the form *\/\n background: white !important; \n}\n.left{\n \/* Changes on the form *\/\n color: black !important; \n font-family: Verdana !important;\n font-size: 12px !important;\n}\n.head{\n color:#333333;\n font-size:20px;;\n text-decoration:underline;\n font-family:\"Verdana\";\n}\ntd.left {\n font-family:\"Verdana\";\n font-size:12px;\n color:black;\n}\n.pagebreak{\n font-family:\"Verdana\";\n font-size:12px;\n color:black;\n}\n.tbmain{\n height:100%;\n background:white;\n}\nspan.required{\n font-size: 13px !important;\n color: red !important;\n}\n\ndiv.backButton{\n background: transparent url(\"http:\/\/v2.jotform.com\/\/images\/btn_back.gif\") no-repeat scroll 0 0;\n height:16px;\n width:53px;\n float:left;\n margin-bottom:15px;\n padding-right:5px;\n}\ndiv.backButton:hover{\n background: transparent url(\"http:\/\/v2.jotform.com\/\/images\/btn_back_over.gif\") no-repeat scroll 0 0;\n}\ndiv.backButton:active{\n background: transparent url(\"http:\/\/v2.jotform.com\/\/images\/btn_back_down.gif\") no-repeat scroll 0 0;\n}\ndiv.nextButton{\n background: transparent url(\"http:\/\/v2.jotform.com\/\/images\/btn_next.gif\") no-repeat scroll 0 0;\n height:16px;\n width:53px;\n float: left;\n margin-bottom:15px;\n padding-right:5px;\n}\ndiv.nextButton:hover{\n background: transparent url(\"http:\/\/v2.jotform.com\/\/images\/btn_next_over.gif\") no-repeat scroll 0 0;\n}\ndiv.nextButton:active{\n background: transparent url(\"http:\/\/v2.jotform.com\/\/images\/btn_next_down.gif\") no-repeat scroll 0 0;\n}\n.pageinfo{\n padding-right:5px;\n margin-bottom:15px;\n float:left;\n}\n\n<\/style> \n<table width=\"100%\" cellpadding=\"2\" cellspacing=\"0\" class=\"tbmain\">\n<tr><td class=\"topleft\" width=\"10\" height=\"10\"> <\/td>\n<td class=\"topmid\"> <\/td>\n<td class=\"topright\" width=\"10\" height=\"10\"> <\/td>\n <\/tr>\n<tr>\n<td class=\"midleft\" width=\"10\">   <\/td>\n<td class=\"midmid\" valign=\"top\">\n<form accept-charset=\"utf-8\" action=\"http:\/\/v2.jotform.com\/submit.php\" target=\"_top\" method=\"post\" name=\"q_form_10800354461\">\n<input type=\"hidden\" name=\"formID\" value=\"10800354461\" \/>\n<div id=\"main\"> \n<div class=\"pagebreak\"> \n<table width=\"520\" cellpadding=\"5\" cellspacing=\"0\">\n <tr >\n<td colspan=\"2\"><\/td><\/tr>\n<\/table>\n<\/div>\n <table width=\"520\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n <tr onclick=\"closeDiv('q14');\" >\n <td width=\"20\" height=\"20\" style=\"background-image:url('http:\/\/v2.jotform.com\/images\/splitter_left.gif')\"><\/td>\n <td style=\"background-image:url('http:\/\/v2.jotform.com\/images\/splitter_mid.gif')\">\n <div class=\"pagebreak\">\n <label>Click here to make a secure donation using your credit card or PayPal <\/label>\n <\/div>\n <\/td>\n <td id=\"td_q14\" width=\"20\" style=\"background-image:url('http:\/\/v2.jotform.com\/images\/splitter_right_hide.gif')\"><\/td>\n <\/tr>\n <tr>\n <td height=\"2\"><\/td>\n <td><\/td>\n <td><\/td>\n <\/tr>\n<\/table>\n<div id=\"div_q14\" style=\"display:none\">\n <table width=\"520\" cellpadding=\"5\" cellspacing=\"0\">\n <tr><td colspan=\"2\"><\/td>\n <\/tr>\n <tr >\n <td width=\"150\" class=\"left\" >\n <label >Name <span class=\"required\">*<\/span><\/label>\n <\/td>\n <td class=\"right\" >\n <input type=\"text\" size=\"20\" name=\"q0_Name\" class=\"text\" value=\"\" id=\"q0\" onblur=\"validate(this,'Required')\" maxlength=\"100\" maxsize=\"100\" \/>\n <\/td>\n <\/tr>\n <tr >\n <td width=\"150\" class=\"left\" >\n <label >Email <span class=\"required\">*<\/span><\/label>\n <\/td>\n <td class=\"right\" >\n <input type=\"text\" size=\"20\" name=\"q3_Email\" class=\"text\" value=\"\" id=\"q3\" onblur=\"validate(this,'Email')\" maxlength=\"100\" maxsize=\"100\" \/>\n <\/td>\n <\/tr>\n <tr >\n <td width=\"150\" class=\"left\" valign=\"top\" >\n <label>Donation Amount<\/label>\n <\/td>\n <td class=\"right\">\n <input type=\"text\" class=\"text\" size=\"5\" name=\"donation_amount\" value=\"\" \/> <label class=\"left\">USD<\/label>\n <input type=\"hidden\" name=\"q15_DonationAmount\" value=\"10800750531\">\n <\/td>\n <\/tr>\n <tr >\n <td width=\"150\" class=\"left\" valign=\"top\" >\n <label>Comment: Please let us know which fund your donation should be directed to.<\/label>\n <\/td>\n <td class=\"right\" >\n <textarea cols=\"40\" rows=\"3\" name=\"q6_CommentPleaseletuskn\" class=\"text\" id=\"q6\" ><\/textarea>\n <\/td>\n <\/tr>\n <tr >\n <td width=\"150\" class=\"left\" valign=\"top\" >\n <label>please type what you see <span class=\"required\">*<\/span><\/label>\n <\/td>\n <td valign=\"top\">\n <script type=\"text\/javascript\" src=\"http:\/\/v2.jotform.com\/captcha.php\"><\/script> <\/td>\n <\/tr>\n <tr >\n <td width=\"150\" class=\"left\" > \n \n <\/td>\n <td class=\"right\">\n <input type=\"submit\" class=\"btn\" value=\"Submit - Take me to PayPal site\" \/>\n <\/td>\n <\/tr>\n<\/table>\n<\/div>\n<\/div>\n<\/form>\n<\/td>\n<td class=\"midright\" width=\"10\">   <\/td>\n<\/tr>\n<tr>\n <td class=\"bottomleft\" width=\"10\" height=\"10\"> <\/td>\n <td class=\"bottommid\"> <\/td>\n <td class=\"bottomright\" width=\"10\" height=\"10\"> <\/td>\n<\/tr>\n<\/table>\n<script type=\"text\/javascript\">\nvalidate(\"q_form_10800354461\");\n<\/script>\n\n<\/body>\n<\/html>\n");