function LoanApp(a){if(a.value=="Loan"){window.location.replace("https://cl139.justhost.com/~prontoc2/LoanApplication.php")}}$(document).ready(function(){$("#frDebug").toggle(function(){$(".debug").css("display","inline-block");$(this).text("Debug On")},function(){$(".d").css("display","none");$(this).text("Debug Off")});$(".featuretteMask").css("padding-top","100px").html("<p style='color:red;background:yellow;'>Use the 'forward one slide' button (below) to fill-out all three slides of your request.</p>");var n="USD",z="None",u;var P=false,o=false,G=false,r=false;var d,Q,y,k,x,w,E;var b="$";$(".ErrorMessage").each(function(S){$(this).css("color","rgb(255, 255, 255)")});$("h3").unbind();$("#pause, #speedSlider, #sl").css("display","none");$("#resume").css("display","block");var L=null;$("#amountSlider").slider({animate:true,step:1000000,range:"min",min:1000000,orientation:"horizontal",max:500000000,value:1000000,start:function(S,T){$("#current_value").empty();L=setInterval(A,1)},slide:function(S,T){setTimeout(A,1)},stop:function(S,T){clearInterval(L);L=null}});var v=null;$("#lengthSlider").slider({animate:true,step:1,range:"min",min:1,value:12,orientation:"horizontal",max:15,start:function(S,T){$("#LengthBox").empty();v=setInterval(j,10)},slide:function(S,T){setTimeout(j,10)},stop:function(S,T){clearInterval(v);v=null}});$("#Amount").change(function(){var S=document.getElementById("Amount").value;p(S)});$("#LengthBox").change(function(){var S=document.getElementById("LengthBox").value;R(S)});$("button").focus(function(){$(this).stop().effect("highlight","slow")});$("#CurrencyType").toggle(function(){$(this).css("backgroundPosition","0px -60px");n="EURO";b="\u20ac";A()},function(){$(this).css("backgroundPosition","0 0");n="USD";b="$";A()});var a=$("#amountSlider").css("width");a="600px";$("#amountSlider").css("width",a);var c=/\d+/;var t=c.exec(a);var J=t/2;var g="$1,000,000";var C="$250,000,000";var H="$500,000,000";var I=50;var m=new Array(I);var e=t/(I-1);for(i=0;i<=I;i++){m[i]=i*e}$(".amountSliderScale").css("list-style-type","none").css("margin","28px 0 0 0").css("padding",0).css("width",a);$(".amountSliderScale li").css("display","inline");var s=$(".ui-slider").css("borderRightColor");for(i=1;i<I-1;i++){$(".amountSliderScale").find(".sStart").prepend('<span class="ui-slider-tic ui-widget-content" style="left:'+m[i]+"px;background:"+s+';"></span>\n')}var F=$("#lengthSlider").css("width");F="500px";$("#lengthSlider").css("width",F);var q=c.exec(F);I=15;var l=new Array(I);e=q/Math.round(I-1);for(i=0;i<=I;i++){l[i]=i*e}$(".lengthSliderScale").css("list-style-type","none").css("margin","28px 0 0 0").css("padding",0).css("width",F);$(".lengthSliderScale li").css("display","inline");for(i=1;i<I-1;i++){$(".lengthSliderScale").find(".lStart").prepend('<span class="ui-slider-tic ui-widget-content" style="left:'+l[i]+"px;background:"+s+';width:.01px;"></span>\n')}function K(W,U,Z,T,ae,ad,Y,X){document.getElementById("Bubble").value+="formatNumber start\r\n";var ac=Math.round(W*Math.pow(10,U));if(ac>=0){Y=X=""}var ab=(""+Math.abs(ac)).split("");var aa=ab.length-U;if(aa<0){aa--}for(var V=aa;V<0;V++){ab.unshift("0")}if(aa<0){aa=1}ab.splice(aa,0,T);if(ab[0]==T){ab.unshift("0")}while(aa>3){aa-=3;ab.splice(aa,0,Z)}var S=ae+Y+ab.join("")+X+ad;return S}function j(){document.getElementById("Bubble").value+="UpdateLengthBox start\r\n";var T=$("#lengthSlider .ui-slider-handle").offset();var S=$("#lengthSlider").slider("option","value");document.getElementById("LengthBox").value=S}function A(){document.getElementById("Bubble").value+="UpdateTextBox start\r\n";var S=$("#amountSlider").slider("option","value");S=K(S,0," ","",b,"","-","");document.getElementById("Amount").value=S}function p(T){document.getElementById("Bubble").value+="amountTypedIn start\r\n";var S=/[^0-9]/g;T=T.replace(S,"");$("#slider").slider("value",T);T<1000000?T=1000000:T=T;T>500000000?T=500000000:T=T;document.getElementById("Amount").value=K(T,0," ","",b,"","-","");$("#amountSlider").slider("option","value",T);A()}function R(T){document.getElementById("Bubble").value+="lengthTypedIn start\r\n";var S=/[^0-9]/g;T=T.replace(S,"");(T<1)?T=1:T=T;(T>15)?T=15:T=T;$("#lengthSlider").slider("option","value",T);j()}$("select, input").live("keydown",function(T){var S=T.keyCode||T.which;if(S==9){if($(this).attr("tabindex")==5){T.preventDefault();f(1);$("#Category").focus()}if($(this).attr("tabindex")==18){T.preventDefault();f(2);$("#Comments").focus()}}return(S==13)?false:true});$(".sw-button").click(function(S){$(".sw-button").each(function(T){$(this).removeClass("checked")});$(this).addClass("checked")});$("#FullName").blur(function(){document.getElementById("fName").value='$("#FullName").blur()';document.getElementById("Bubble").value+='$("#FullName").blur()\r\n';d=$("#FullName").val();if(d.length===0){$("#FullNameError").css("color","#f00").css("backgroundColor","yellow")}else{$("#FullNameError").css("color","rgb(255, 255, 255)").css("backgroundColor","transparent")}return false});$("#Phone").blur(function(){document.getElementById("fName").value='$("#Phone").blur()';document.getElementById("Bubble").value+='$("#Phone").blur()\r\n';Q=$("#Phone").val();if(Q.length===0){$("#PhoneError").css("color","#f00").css("backgroundColor","yellow")}else{$("#PhoneError").css("color","rgb(255, 255, 255)").css("backgroundColor","transparent")}return false});$("#Country").blur(function(){document.getElementById("fName").value='$("#Country").blur()';document.getElementById("Bubble").value+='$("#Country").blur()\r\n';y=$("#Country option:selected").val();if(y.length===0){$("#CountryError").css("color","#f00").css("backgroundColor","yellow")}else{$("#CountryError").css("color","rgb(255, 255, 255)").css("backgroundColor","transparent")}return false});$("#Email").blur(function(){document.getElementById("fName").value='$("#Email").blur()';document.getElementById("Bubble").value+='$("#Email").blur()\r\n';k=$("#Email").val();if(k.length===0){$("#EmailFormatError").css("margin-top","0").css("color","#fff").css("backgroundColor","transparent");$("#EmailError").css("margin-top","0").css("color","#f00").css("backgroundColor","yellow")}else{$("#EmailError").css("margin-top","0").css("color","#fff").css("backgroundColor","transparent");if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(k)){$("#EmailFormatError").css("margin-top","-24px").css("color","#fff").css("backgroundColor","transparent")}else{$("#EmailFormatError").css("margin-top","-24px").css("color","#f00").css("backgroundColor","yellow")}}return false});$("#Category").blur(function(){document.getElementById("fName").value='$("#Category").blur()';document.getElementById("Bubble").value+='$("#Category").blur()\r\n';G=true;x=$("#Category option:selected").val();if(x.length==0){$("#CategoryError").css("color","#f00").css("backgroundColor","yellow");$("#FormH3Label1").removeClass("panelValid")}else{$("#CategoryError").css("color","#fff").css("backgroundColor","transparent")}return false});$("#Comments").dblclick(function(){$("#Content2New").css("background",defaultColor).css("display","block").corner();$("#Content2New p").css("display","inline");$("#C2Comments").css("display","inline-block").val($(this).val())});$("#C2Comments, #Content2New").dblclick(function(){$("#Content2New").css("display","none");$("#C2Comments").css("display","none");$("#Content2New p").css("display","none");$("#Comments").val($("#C2Comments").val()).blur()});$("#Comments").blur(function(){document.getElementById("fName").value='$("#Comments").blur()';document.getElementById("Bubble").value+='$("#Comments").blur()\r\n';w=$("#Comments").val();if(w==""){$("#CommentsError").css("color","#f00").css("backgroundColor","yellow")}else{$("#CommentsError").css("color","rgb(255, 255, 255)").css("backgroundColor","transparent")}return false});function D(){var S=1;if(document.cookie){index=document.cookie.indexOf("CODE");if(index!=-1){countbegin=(document.cookie.indexOf("=",index)+1);countend=document.cookie.indexOf(";",index);if(countend==-1){countend=document.cookie.length}S=document.cookie.substring(countbegin,countend)}}return(S)}$("#Captcha").blur(function(){document.getElementById("fName").value='$("#Captcha").blur()';document.getElementById("Bubble").value+='$("#Captcha").blur()\r\n';var T=D();var S=$("#Captcha").val();document.getElementById("Bubble").value+="keyed in |"+S+"|\r\n cookie  |"+T+"|\r\n";if(S.length==0){$("#CaptchaCopyError").css("margin-top","0").css("color","#fff").css("backgroundColor","transparent");$("#CaptchaError").css("margin-top","0").css("color","#f00").css("backgroundColor","yellow")}else{$("#CaptchaError").css("margin-top","0").css("color","#fff").css("backgroundColor","transparent");if(T!=S){$("#CaptchaCopyError").css("margin-top","-24px").css("color","#f00").css("backgroundColor","yellow")}else{$("#CaptchaCopyError").css("margin-top","-24px").css("color","#fff").css("backgroundColor","transparent")}}return false});function f(S){activateH1(S);panelIndex=S;$(".panel").eq(S).css("width",fullPanelWidth).css("display","width").stop().animate({left:S*h3Width},{speed:"slow"},easingMethod);document.getElementById("Bubble").value+="Opened Content"+S+"\r\n"}function B(S){$("h3").each(function(){$(this).css("backgroundColor",defaultColor)});if(S>0){$(".panel").eq(S).css("width",fullPanelWidth).css("display","width").filter(":not(:animated)").stop().animate({left:(500+S*h3Width)},{speed:"slow"},easingMethod);document.getElementById("Bubble").value+="Closed Content"+S+"\r\n"}}function h(){var S;document.getElementById("fName").value='$("#Content0").blur()';document.getElementById("Bubble").value+='$("#Content0").blur()\r\n';$("#FormH3Label0").addClass("panelValid");document.getElementById("Bubble").value+="added class panelValid to FormH3Label0 before check\r\n";$(".panel0Fields").each(function(T){S=$(this).attr("id");$("#"+S).trigger("blur")});$(".panel0Errors").each(function(T){if(($(this).css("color")!="rgb(255, 255, 255)")&&($(this).css("color")!="rgb(255,255,255)")&&($(this).css("color")!="#fff")){$("#FormH3Label0").removeClass("panelValid");document.getElementById("Bubble").value+="removed class panelValid from FormH3Label0\r\n";$("FormH3Label0").click()}})}function O(){var S;document.getElementById("fName").value='$("#Content1").blur()';document.getElementById("Bubble").value+='$("#Content1").blur()\r\n';$("#FormH3Label1").addClass("panelValid");document.getElementById("Bubble").value+="added class panelValid to FormH3Label1 before check\r\n";$(".panel1Fields").each(function(T){S=$(this).attr("id");$("#"+S).eq(T).trigger("blur")});$(".panel1Errors").each(function(T){if(($(this).css("color")!="rgb(255, 255, 255)")&&($(this).css("color")!="rgb(255,255,255)")&&($(this).css("color")!="#fff")){$("#FormH3Label1").removeClass("panelValid");document.getElementById("Bubble").value+="removed class panelValid from FormH3Label1\r\n";$("FormH3Label1").click()}})}var N=true,M=true;$("#FormH3Label0").click(function(){document.getElementById("fName").value='$("#FormH3Label0").click()';document.getElementById("Bubble").value+='$("#FormH3Label0").click()\r\n';document.getElementById("Bubble").value+="activated panel 0 - Content0\r\n";if(N==true){tfime0=false}else{$("#Content0").blur()}B(1);B(2);panelIndex=0;f(0)});$("#FormH3Label1").click(function(){document.getElementById("fName").value='$("#FormH3Label1").click()';document.getElementById("Bubble").value+='$("#FormH3Label1").click()\r\n';document.getElementById("Bubble").value+="Trying to move to panel 1.1\r\n";document.getElementById("Bubble").value+="activated panel 1 - Content1\r\n";if(M===true){tfime1=false}else{$("#Content1").blur()}B(0);B(2);panelIndex=1;f(1)});$("#FormH3Label2").click(function(){document.getElementById("fName").value='$("#FormH3Label2").click()';document.getElementById("Bubble").value+='$("#FormH3Label2").click()\r\n';document.getElementById("Bubble").value+="trying to move to panel 2.1\r\n";f(1);$("#Content1").trigger("blur");$("#Content0").trigger("blur");panelIndex=2;f(2)});$("button").css("backgroundColor",activeColor);$("button").hover(function(){$(this).css("backgroundColor",defaultColor)},function(){$(this).css("backgroundColor",activeColor)});$("#SendRequestButton").click(function(U){document.getElementById("fName").value='$("#SendRequestButton").click()';document.getElementById("Bubble").value+='$("#SendRequestButton").click()\r\n';U.preventDefault();$("#FormH3Label1").addClass("panelValid");$(".panel1Fields").each(function(V){O()});$(".panel1Errors").each(function(V){if(($(this).css("color")!="rgb(255, 255, 255)")&&($(this).css("color")!="rgb(255,255,255)")&&($(this).css("color")!="#fff")){$("#FormH3Label1").removeClass("panelValid")}});$("#FormH3Label0").addClass("panelValid");$(".panel0Fields").each(function(V){h()});$(".panel0Errors").each(function(V){if(($(this).css("color")!="rgb(255, 255, 255)")&&($(this).css("color")!="rgb(255,255,255)")&&($(this).css("color")!="#fff")){$("#FormH3Label0").removeClass("panelValid")}});if(($("#FormH3Label0").hasClass("panelValid")===false)||($("#FormH3Label1").hasClass("panelValid")===false)){var T=$('<div class="dialogBox"></div>').html("<p>Please use the forward/backward slide buttons to check all 3 slides and fill-in fields as requested.</p>").dialog({autoOpen:true,title:"Your funding request is incomplete",zIndex:355,buttons:{Okay:function(){$(this).dialog("close")}},beforeclose:function(){$(this).parent().hide("slide",{direction:"right"},1000);return(false)}})}$(".panel2Fields").each(function(V){$(this).blur()});$("#FormH3Label2").addClass("panelValid");$(".panel2Errors").each(function(V){if(($(this).css("color")!="rgb(255, 255, 255)")&&($(this).css("color")!="rgb(255,255,255)")&&($(this).css("color")!="#fff")){$("#FormH3Label2").removeClass("panelValid")}});document.getElementById("fName").value="panel2Valid "+r;if(($("#FormH3Label0").hasClass("panelValid")===true)&&($("#FormH3Label1").hasClass("panelValid")===true)&&($("#FormH3Label2").hasClass("panelValid")===true)){$("#SendRequestBox").remove();$(".sw-button").each(function(V){vv=$(this).attr("id");stat=$(this).hasClass("checked");if(stat==true){z=vv}});d=$("input[name=FullName]").val();ph=$("input[name=Phone]").val();var S=/(\d{3})(\d{3})(\d{4})/;if(ph.length==10){Q=ph.replace(S,"$1.$2.$3")}else{Q=ph}Skype=$("input[name=Skype]").val();y=$("#Country option:selected").val();x=$("#Category option:selected").val();k=$("input[name=Email]").val();Amount=$("#Amount").val();LengthBox=$("input[name=LengthBox]").val();w=$("textarea[name=Comments]").val();security_code=$("input[name=Captcha]").val();MyData="Category="+x+"&Amount="+Amount+"&Currency="+n+"&Months="+LengthBox+"&Swift="+z+"&FullName="+encodeURIComponent(d)+"&Phone="+encodeURIComponent(Q)+"&Skype="+Skype+"&Country="+y+"&Email="+k+"&security_code="+security_code+"&Comments="+encodeURIComponent(w);document.getElementById("Bubble").value+="data string is "+MyData;$.get("FundingRequestAction.php",MyData,function(V){$("#Return").html(V);if(V=="1"){window.location="FundingRequestSent.php"}else{alert("Ajax return code "+V)}})}$("FormH3Label0").click();$("FormH3Label1").click()});$("#CancelRequestButton").click(function(S){});$(".fg-button:not(.ui-state-disabled)").hover(function(){$(this).addClass("ui-state-hover")},function(){$(this).removeClass("ui-state-hover")}).mousedown(function(){$(this).parents(".fg-buttonset-single:first").find(".fg-button.ui-state-active").removeClass("ui-state-active");if($(this).is(".ui-state-active.fg-button-toggleable, .fg-buttonset-multi .ui-state-active")){$(this).removeClass("ui-state-active")}else{$(this).addClass("ui-state-active")}}).mouseup(function(){if(!$(this).is(".fg-button-toggleable, .fg-buttonset-single .fg-button,  .fg-buttonset-multi .fg-button")){$(this).removeClass("ui-state-active")}})});