var flname = "";
        $("document").ready(function() {

            $("#Submit1").click(function() {
                var qstring = $("#catwebformform46095").formSerialize();
flname = $("#Text1").val() + " " + $("#Text2").val();
                $.ajax({
                    type: "POST",
                    url: "/FormProcessv2.aspx?WebFormID=15607&OID=1257950&OTYPE=1&EID=0&CID=0&json=1",
                    data: qstring,
                    dataType: "json",
beforeSend:function () { return checkWholeForm46095($("#catwebformform46095").get(0));},              
                    success: function(msg) { ajaxSuc(msg); },
                    error: function(req, status, errotThrown) { alert(req); alert(status); alert(errotThrown); return false; }
                });
return false;
            });
        });
        
        function ajaxSuc(msg){
  var q = "<p class='h1'>Thanks for signing up to volunteer!</p><p class='h2'>Please print out this page and bring it with you when you come to volunteer</p><div id='volunteer-info'><img src='http://projectcure.org/images/cure-logo-volunteer.gif' style='float:left; padding:0 15px 150px 0;'/><p class='h1'>" + flname + "</p><p class='h2'>Delivering Health and Hope to the World</p><p><strong>www.projectcure.org</strong></p><p><strong>Your Case number is:</strong></p><br/><br/><br/><br/><br/><span class='caseid'>*" + msg.FormProcessV2Response.objectId + "*</span></div><p class='h3'>In order to schedule your volunteer time you will need to contact the C.U.R.E. Community Volunteer Coordinator nearest you. All volunteering must be pre-arranged.</p><blockquote><p><strong>DENVER, COLORADO</strong><br />303-792-0729<br /><a href='mailto: denvervolunteers@projectcure.org'>denvervolunteers@projectcure.org</a></p><p><strong>HOUSTON, TEXAS</strong><br />832-251-2489<br /><a href='mailto: houstonvolunteers@projectcure.org'>houstonvolunteers@projectcure.org</a></p><p><strong>PHOENIX, ARIZONA</strong><br />480-237-0970<br /><a href='mailto: phoenixvolunteers@projectcure.org'>phoenixvolunteers@projectcure.org</a></p><p><strong>NASHVILLE, TENNESSEE</strong><br />615-837-7575<br /><a href='mailto: nashvillevolunteers@projectcure.org'>nashvillevolunteers@projectcure.org</a></p></blockquote>";
 $("#volFormInner").remove();
 $("#volunteer-application").remove();
$("#volFormOuter").html(q);
Cufon.replace(".caseid");
return false;
//alert(msg.FormProcessV2Response.objectId); return false;
}


function hideEmail() {    
    var cont = true;
    cont = $("#Text7").val() != "" && $("#Text1").val() != "" && $("#Text2").val() != "";
    if (cont == true) {
        $("input#chkEmailBack").attr("checked", false);
        $("#subs input").each(uncheckSubs);
        $("div#email").fadeOut("slow", fa);
        doEmail();
    }
    else {
        alert("Please fill out your first name, your last name, and your phone number before you check this box");
        $("input#chkNoEmail").attr("checked", false);
    }
}
function fa() {
    $("div#emailBack").fadeIn("slow");
}
function doEmail() {
    var f = $("#Text1").val();
    var l = $("#Text2").val();
    var p = $("#Text7").val();
    $("#Text10").val(p + f + l + "@projectcurevolunteers.org");    
}
function showEmail() {
    $("input#chkNoEmail").attr("checked", false);
    $("div#email").fadeIn("slow");
    $("div#emailBack").css("display", "none");
    $("#subs input").each(checkSubs);
    $("#Text10").val("");
}
function uncheckSubs(args) {
    this.checked = false;
}
function checkSubs(args) {
    this.checked = true;
}
 


