<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="en" />

<meta property="og:image" content="https://w2.chabad.org/media/images/1179/hIsi11793255.png" itemprop="image" width="150" height="150" />
<meta property="og:image:width" content="150" />
<meta property="og:image:height" content="150" />
<meta name="keywords" content="Advisor,Information" />
<meta name="title" content="Advisor Information - Chabad Madison" />
<meta property="og:type" content="website" />
<meta name="scope-aids" content="1918556-1918564-349199-4550261-3023439-3023467-3023470" />
<meta name="article-keywords" content="19478-19479-19958-20962-8495-8972-18927-19353-19480-20429-2170-2898" />
<meta name="scope-aid" content="1918556" />
<meta name="scope-aid" content="1918564" />
<meta name="scope-aid" content="349199" />
<meta name="scope-aid" content="4550261" />
<meta name="scope-aid" content="3023439" />
<meta name="scope-aid" content="3023467" />
<meta name="scope-aid" content="3023470" />
<meta name="article-keyword" content="19478" />
<meta name="article-keyword" content="19479" />
<meta name="article-keyword" content="19958" />
<meta name="article-keyword" content="20962" />
<meta name="article-keyword" content="8495" />
<meta name="article-keyword" content="8972" />
<meta name="article-keyword" content="18927" />
<meta name="article-keyword" content="19353" />
<meta name="article-keyword" content="19480" />
<meta name="article-keyword" content="20429" />
<meta name="article-keyword" content="2170" />
<meta name="article-keyword" content="2898" />
<meta property="og:url" content="https://www.chabadmadison.com/templates/articlecco_cdo/aid/3023470/jewish/Advisor-Information.htm" />
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:site" content="@chabad" />
<meta property="og:title" content="Advisor Information - Chabad Madison" /><link rel="canonical" href="https://www.chabadmadison.com/templates/articlecco_cdo/aid/3023470/jewish/Advisor-Information.htm" />
<link rel="icon" type="image/png" href="https://www.chabadmadison.com/media/images/1179/hIsi11793255.png" />
<link rel="Stylesheet" href="/css/fonts/font-awesome/font-awesome-5.css?v=98662BF4" id="kfont-awesome" type="text/css"/>
<link rel="Stylesheet" href="/css/DefaultGrid.css?v=44B79007" id="kgrid" type="text/css"/>
<link rel="Stylesheet" href="/css/Elements.css?v=E669C926" id="k6" type="text/css"/>
<link rel="Stylesheet" href="/css/vendor/ds/tokens/sites.css?v=D1B7903A" id="ksites-ds-css" type="text/css"/>
<link rel="Stylesheet" href="/css/new/main.css?v=2B7F734E" id="k7" type="text/css"/>
<link rel="Stylesheet" href="/css/old/global.css?v=F7C22456" id="k2898" type="text/css"/>
<link rel="Stylesheet" href="/css/cco/minisites/themes/plannedgiving/styles.css?v=1F9C44F5" id="k19353" type="text/css"/>
<link rel="Stylesheet" href="https://w2.chabad.org/css/cco/minisites/global.css" id="k20962" type="text/css"/>
<link rel="Stylesheet" href="/css/bootstrap/grid.css?v=B92FCAD8" id="kbootstrap4-grid" type="text/css"/>
<link rel="Stylesheet" href="/css/Library/reader-comments.css?v=5F31D0D8" id="kCommentsStylesheet" type="text/css"/>
<link rel="Stylesheet" href="/css/inline/BookInfo.css?v=14B88022" id="kBookInfoCss" type="text/css"/>

<script>$q=[];$j=function(f){$q.push(f);}</script>
	
 
	
	<style type="text/css">
		body{margin:0;}
	</style>
	
	



<script>
	window.dataLayer = window.dataLayer || [];
	dataLayer.push({"event":"datalayer-initialized","page":{"numberOfComments":0,"publicationDate":"2015-09-03","primaryArticleId":3023470,"title":"","author":"","authorId":0,"contentLevel1":"My Site","contentLevel2":"About","contentLevel3":"Donate","contentLevel4":"Planned Giving","contentLevel5":"Resources","contentLevel6":"Advisor Information","siteName":"Chabad Madison"},"time":{"upcomingHoliday":"The Three Weeks","daysToUpcomingHoliday":19,"hebrewDate":"5786-03-28"}});
		dataLayer.push({ 'articleHierarchy': '-1918556-1918564-349199-4550261-3023439-3023467-3023470-', 'keywords': '-k2898-k2170-k20429-k19480-k19353-k18927-k8972-k8495-k20962-k19958-k19479-k19478-', 'k': '-1918556-1918564-349199-4550261-3023439-3023467-3023470--k2898-k2170-k20429-k19480-k19353-k18927-k8972-k8495-k20962-k19958-k19479-k19478-' });
	
</script>
<script>

(function(c,h,a,b,a,d){c[a]=c[a]||[];c[a].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=h.getElementsByTagName(b)[0],
j=h.createElement(b);j.async=true;
j.src='https://w6.chabad.org/mitzvah-tank.js';f.parentNode.insertBefore(j,f);
})(window,document,0,'script','dataLayer');</script>

	<!-- Start of StatCounter Code -->
	<script type="text/javascript">
	var sc_project = 8150798;var sc_partition = 91;var sc_invisible = 1;var sc_remove_link=1;var sc_security = "02b0a49d";var sc_https = 1;
	</script>
	<script type="text/javascript" src="https://secure.statcounter.com/counter/counter_xhtml.js" defer async></script>
	<noscript><img src="//c92.statcounter.com/counter.php?sc_project=8150798&amp;java=0&amp;security=02b0a49d&amp;invisible=1" border="0" /> </noscript>
	<!-- End of StatCounter Code -->


<link href="https://fonts.googleapis.com/css?family=Oswald|Overpass|Poppins|Roboto|Roboto+Condensed|Source+Sans+Pro" rel="stylesheet">
<meta name="google-site-verification" content="IU0bIvt29Stfzx_e3qeJ7LrCRSmQ4fCkhWMM6u0ylrY" />
<meta name="google-site-verification" content="d40ipFpFLuXK6sn8_LRzjji0EGvqFj09MHFGbyhNY3U" />
<style type="text/css">
.main {
    padding-top: 0px !important;
}
[class^="widget-"] a:hover {
     text-decoration: none; 
}
.widget-4 .wrapper {
-webkit-box-shadow: none;
box-shadow: none;
}

.widget-4, .sneak_peek {
-webkit-box-shadow: none;
box-shadow: none;
}

</style>

<style  type="text/css">
button.add-fields, button.remove-fields {
  position: relative;
  padding: 10px;
  font-weight: 700;
 color: #105689;
  border: 2px #105689 solid;
  border-radius: 4px;
  text-transform: uppercase;
  outline: 0;
  margin-right:10px;
  overflow:hidden;
  background: none;
  z-index: 1;
  cursor: pointer;
  transition:         0.08s ease-in;
  -o-transition:      0.08s ease-in;
  -ms-transition:     0.08s ease-in;
  -moz-transition:    0.08s ease-in;
  -webkit-transition: 0.08s ease-in;
}

.add-fields:hover, .remove-fields:hover {
  color: whitesmoke;
}

.add-fields:before, .remove-fields:before {
  content: "";
  position: absolute;
  background: #105689;
  bottom: 0;
  left: 0;
  right: 0;
  top: 100%;
  z-index: -1;
  -webkit-transition: top 0.09s ease-in;
}

.add-fields:hover:before, .remove-fields:hover:before {
  top: 0;
}

button[disabled="disabled"].add-fields, button[disabled="disabled"].remove-fields {
    border: 2px solid #888;
    color: #888;
}

button[disabled="disabled"].add-fields:before, button[disabled="disabled"].remove-fields:before {
    top:100%
}
</style>


<link rel="icon" type="image/png" href="https://chabadmadison.com/media/images/1179/wTKv11793664.png" />



<script language="javascript" type="text/javascript" src="//w4.chabad.org/scripts/js/os/jquery-latest.min.js?v=20170328.5"></script><script type="text/javascript">
jQuery(document).ready(function ($) {
    function toggleFields(fieldsList, sourceElm, val, condition) {
        var elm = $(sourceElm);
        elm.change(function () {
            let elmValue = $(this).val();
            var found = condition == '>=' ? elmValue >= val : elmValue == val;

            if ($(this).is(':radio')) {
                found = $(this).is(':checked');
            }

            fieldsList.forEach(function (i, x, a) {
                found ? $(i).show() : $(i).hide();

                if (!found) {
                    $(i).find('select', 'input').not(':radio', ':checkbox').each(function () {
                        $(this).val('');
                    });
                }
            });
        });
        elm.change();
    }

    var toggleIndex = 0;

    function addToggleButtons(parentElm, totalElm, requiredMin, optionalMax, addText, removeText) {
        toggleIndex++;

        function getSelectedValue(e) {
            var totalValue = parseInt($(e).val());
            if (!totalValue) {
                totalValue = 1;
            }
            return totalValue;
        }

        $(parentElm).prepend('<button type="button" class="remove-fields" id="remove-fields-' + toggleIndex + '" style="display:none;">' + removeText + '</button>');

        $('#remove-fields-' + toggleIndex).click(function () {
            var value = getSelectedValue(totalElm);
            if (value > requiredMin) {
                value--;
            }
            $(totalElm).val(value);
            $(totalElm).change();
            value == requiredMin ? $(this).hide() : $(this).show();
            value == optionalMax ? $('#add-fields-' + toggleIndex).attr('disabled', 'disabled') : $('#add-fields-' + toggleIndex).removeAttr('disabled');
            if (initTotal && typeof initTotal == 'function') {
                initTotal();
            }
        });

        $(parentElm).prepend('<button type="button" class="add-fields" id="add-fields-' + toggleIndex + '">' + addText + '</button>');

        $('#add-fields-' + toggleIndex).click(function () {
            var value = getSelectedValue(totalElm);
            if (value < optionalMax) {
                value++;
            }
            $(totalElm).val(value);
            $(totalElm).change();
            value == requiredMin ? $('#remove-fields-' + toggleIndex).hide() : $('#remove-fields-' + toggleIndex).show();
            value == optionalMax ? $(this).attr('disabled', 'disabled') : $(this).removeAttr('disabled');
            if (initTotal && typeof initTotal == 'function') {
                initTotal();
            }
        });
    }

    if (Co.ArticleId == 3756131) {
        var selectElmId = '#input_53';

        toggleFields(["#cid_39", "#id_40", "#id_41", "#id_42", "#id_43", "#id_44", "#id_46"], selectElmId, "2", ">=");

toggleFields(["#cid_58", "#id_59", "#id_60", "#id_61", "#id_62", "#id_63", "#id_64"], selectElmId, "3", ">=");

        addToggleButtons("#cid_25", selectElmId, 1, 3, "Add additional child", "Remove additional child");
    }

if (Co.ArticleId == 3830454) {
        var selectElmId = '#input_49';

toggleFields(["#cid_42", "#id_11", "#id_12", "#id_44", "#id_65", "#id_45", "#id_46", "#id_47", "#id_48", "#id_16", "#id_53", "#id_54"], selectElmId, "2", ">=");
toggleFields(["#cid_61", "#id_62", "#id_63", "#id_64", "#id_79", "#id_66", "#id_67", "#id_68", "#id_69", "#id_55", "#id_56", "#id_57"], selectElmId, "3", ">=");
toggleFields(["#cid_70", "#id_71", "#id_72", "#id_73", "#id_78", "#id_74", "#id_75", "#id_76", "#id_77", "#id_58", "#id_59", "#id_60"], selectElmId, "4", ">=");

        addToggleButtons("#cid_17", selectElmId, 1, 4, "Add additional child", "Remove additional child");
    }
});
</script><script src="https://webmk.co/sites/chabad-madison/main-script.js" /></script><script>
(function() {
    // 1. CONFIGURATION
    var targetPageID = "7152430"; 
    var urlIdentifier = "ArticleCcoResponse_cdo"; 

    // *** VERIFY THIS IS YOUR DEPLOYED WEB APP URL ***
    var googleWebAppUrl = "https://script.google.com/macros/s/AKfycbwyY9A_f34OQm2jH8kmbC59MKyLyo1ABgsdiW3qamX9e9R0p3ORtlcuWtoJTIuiF-jF4g/exec"; 

    // 2. CHECK URL
    if (window.location.href.indexOf(targetPageID) > -1 && window.location.href.indexOf(urlIdentifier) > -1) {
        
        console.log("Campaign Scraper: Page detected. Waiting for table...");

        // Wait for the table to appear (Dynamic Loading)
        var attempts = 0;
        var maxAttempts = 20; // 10 seconds timeout

        var checkInterval = setInterval(function() {
            var table = document.querySelector('.response_table');
            
            if (table) {
                clearInterval(checkInterval);
                console.log("Campaign Scraper: Table found!");
                scrapeAndSend();
            } else {
                attempts++;
                if (attempts >= maxAttempts) {
                    clearInterval(checkInterval);
                    console.log("Campaign Scraper: Timed out waiting for table.");
                }
            }
        }, 500); 

        function scrapeAndSend() {
            var extractedData = {
                firstName: "",
                lastName: "",
                amount: "", 
                submissionId: "" 
            };

            // 3. SCRAPE TABLE
            var tableRows = document.querySelectorAll('.response_table tr');
            
            if (tableRows.length > 0) {
                tableRows.forEach(function(row) {
                    var labelCell = row.querySelector('.field_name');
                    var valueCell = row.querySelector('.field_value');

                    if (labelCell && valueCell) {
                        var label = labelCell.innerText.trim().toLowerCase();
                        var value = valueCell.innerText.trim();

                        // A. FIRST NAME
                        if (label.indexOf('full name - first name') > -1) {
                            extractedData.firstName = value;
                        }
                        // B. LAST NAME
                        else if (label.indexOf('full name - last name') > -1) {
                            extractedData.lastName = value;
                        }
                        // C. AMOUNT (From "Total Amount")
                        else if (label.indexOf('total amount') > -1) {
                            extractedData.amount = value;
                        }
                        // D. SUBMISSION ID (For Duplicate Prevention Only)
                        else if (label.indexOf('submission id') > -1) {
                            extractedData.submissionId = value;
                        }
                    }
                });

                // --- DUPLICATE CHECK ---
                if (extractedData.submissionId) {
                    var sentIds = JSON.parse(localStorage.getItem('ec_sent_submissions') || "[]");
                    if (sentIds.indexOf(extractedData.submissionId) > -1) {
                        console.log("Campaign Scraper: Duplicate submission detected. Skipping.");
                        return; 
                    }
                }

                console.log("Sending Data to Sheet:", extractedData);

                // 4. SEND TO GOOGLE
                fetch(googleWebAppUrl, {
                    method: 'POST',
                    mode: 'no-cors',
                    headers: { 'Content-Type': 'application/json' },
                    body: JSON.stringify(extractedData)
                }).then(function() {
                    console.log("Data sent successfully.");
                    
                    if (extractedData.submissionId) {
                        var sentIds = JSON.parse(localStorage.getItem('ec_sent_submissions') || "[]");
                        sentIds.push(extractedData.submissionId);
                        localStorage.setItem('ec_sent_submissions', JSON.stringify(sentIds));
                    }

                }).catch(function(err) {
                    console.error("Error sending data:", err);
                });
            }
        }
    }
})();
</script><title>
	Advisor Information - Chabad Madison
</title></head>
<body class="lang_en dir_ltr cco_body cco_templateless_page section_branch">
	
	
		<div width="100%" class="cco_templateless_template" style="z-index:100 !important;display:block !important;left:0px !important;top:0px !important;height:30px!important;width:100% !important;line-height:30px !important; position:relative !important; margin-bottom:0 !important; padding:0;text-indent: 25px;" align="Left"><a href="//www.ChabadMadison.com" style="display:block!important;font-size:14px !important;">&laquo; Back to&nbsp;Chabad Madison</a></div>
	
	<div class="cco_templatelates_content">
		
	<div class="co_content_container clearfix local_content" id="co_content_container">
		<div class="clearfix">
			<!-- BEGIN HEADER --><style type="text/css">
	.cco_templateless_template,
	.cco_templateless_template a {
		background: #6C0647;
	}
.sidebar-ads co\:item {
    padding: 3%;
    text-align: center;
    background: #690645;
    display: block;
    margin-bottom: 3%
}

.section_root .sidebar-ads co\:item {
    float: left;
    width: 315px;
    padding: 12px 0;
    text-align: center;
    background: #690645;
    display: block;
    margin-left: 15px
}

body.mobile.section_root .sidebar-ads co\:item {
    float: none;
    display: block;
    width: 100%;
    margin: 5px 0
}

.section_root .sidebar-ads co\:item:first-child {
    margin: 0
}

.sidebar-ads co\:item a {
    text-decoration: none;
    position: absolute;
    width: 283px;
    height: 167px
}

.sidebar-ads co\:item img {
    width: 90%
}

.sidebar-ads co\:item .caption {
    font: 12px/18px Merriweather, times, serif;
    color: #a7a6a2;
    margin-top: 15px
}
co\:item {display:unset!important}
</style>
<div id="chabad_body_page">
<div id="chabad_main_content" class="container">


<div id="chabad_head" class="header">



<div class="chabad_header header-logo" data-href="/3023439">
<a href="/3023439" class="header-title" title="Planned Giving">
<span>
Planned Giving to Chabad of Madison</span></a>
<div class="header-subtitle">
<a href="/3023439" class="header-subtitle" style="text-decoration: none;">
Make Your Legacy a Jewish Future</a></div>
</div>


<div id="navigation" class="chabad_navigator_bar">
<div class="chabad_menu_content">
<ul id="menu" class="navi">
<li class="item parent arrow">
<a href="/article.asp?aid=3023440" class="parent arrow">Why Giving Matters</a>
<div class="sub_menu">
<ul>
<li class="item first">
<a href="/article.asp?aid=3023441">Changing Jewish Destiny</a>
</li>
<li class="item">
<a href="/article.asp?aid=3023442">Chabad In The News</a>
</li>
<li class="item">
<a href="/article.asp?aid=3023443">The Rebbe's Mandate</a>
</li>
<li class="item">
<a href="/article.asp?aid=3023444">Giving In Jewish Tradition</a>
</li>
<li class="item last">
<a href="/article.asp?aid=3023446">Donor Stories</a>
</li>
</ul>
</div>
|
</li>
<li class="item parent arrow">
<a href="/article.asp?aid=3023454" class="parent arrow">Ways To Give</a>
<div class="sub_menu">
<ul>
<li class="item first">
<a href="/article.asp?aid=3023455">Bequest</a>
</li>
<li class="item">
<a href="/article.asp?aid=3023456">Charitable Gift Annuity</a>
</li>
<li class="item">
<a href="/article.asp?aid=3023457">Real Estate</a>
</li>
<li class="item">
<a href="/article.asp?aid=3023458">Life Insurance</a>
</li>
<li class="item">
<a href="/article.asp?aid=3023459">Charitable Trusts</a>
</li>
<li class="item">
<a href="/article.asp?aid=3023460">Retirement Plans</a>
</li>
<li class="item last">
<a href="/article.asp?aid=3023461">Planned Giving Videos</a>
</li>
</ul>
</div>
|
</li>
<li class="item parent arrow">
<a href="/article.asp?aid=3023463" class="parent arrow">Gratitude</a>
<div class="sub_menu">
<ul>
<li class="item first">
<a href="/article.asp?aid=3023464">Jewish Legacy Society</a>
</li>
<li class="item last">
<a href="/article.asp?aid=3023465">My Story</a>
</li>
</ul>
</div>
|
</li>
<li class="item parent arrow selected">
<a href="/article.asp?aid=3023467" class="parent arrow selected">Resources</a>
<div class="sub_menu">
<ul>
<li class="item first">
<a href="/article.asp?aid=3023468">Bequest Form</a>
</li>
<li class="item">
<a href="/article.asp?aid=3023469">Frequently Asked Questions</a>
</li>
<li class="item selected">
<a href="/article.asp?aid=3023470">Advisor Information</a>
</li>
<li class="item">
<a href="/article.asp?aid=3023471">Planned Giving Council</a>
</li>
<li class="item last">
<a href="/article.asp?aid=3023472">Glossary of Terms</a>
</li>
</ul>
</div>
|
</li>
<li class="item parent arrow">
<a href="/article.asp?aid=3023473" class="parent arrow">Contact</a>
<div class="sub_menu">
<ul>
<li class="item first">
<a href="/article.asp?aid=3023474">Contact Us</a>
</li>
<li class="item last">
<a href="/article.asp?aid=3023475">Share Your Story</a>
</li>
</ul>
</div>
</li>

</ul>
</div>
</div>



</div>
<div class="break_floats" ></div>
<div id="chabad_body_content">
<div detached="true" type="static" id="ContentArea" name="content_area" class="chabad_left_column"><div id="content_page" class="content_page"><!-- END HEADER -->
			
			
			<div class="clearfix bh mobile-only align_right">ב"ה</div>
			
				<div class="master-content-wrapper " >
					

<header class="article-header cf ">
	
	
			<h1 class="article-header__title js-article-title js-page-title">Advisor Information</h1>
		
			<div>
				
			</div>
		
</header>
				</div>
			
			<div class="body_wrapper clearfix co_body">
				<div class="" id="co_body_container">
					
					<div id="ContentBody">
						
						
							<div class="content-area-parent no_margin">
								
	<div id="cco_body">
		<div class="content  no_margin no_overflow" id="co_content_container">
			
			
	

	<article class="content js-content" itemscope itemtype="http://schema.org/Article">
	



<meta itemprop="mainEntityOfPage headline name" content="" />

<meta itemprop="image" content="" />


<meta itemprop="uploadDate" content="2015-09-03T17:58:41" />
<span itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
	<meta itemprop="name" content="Chabad Madison" />
	<meta itemprop="brand" content="Chabad Madison" />
	<span itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
		<meta itemprop="url" content="https://w2.chabad.org/media/images/1179/hIsi11793255.png" />
		<meta itemprop="height" content="150" />
		<meta itemprop="width" content="150" />
	</span>
</span>
<meta itemprop="datePublished" content="2015-09-03T17:58:41" />
			<div itemprop="articleBody">
				<co:body xmlns:co="www1.chabadonline.com/alpha1" xmlns:ext="urn:xslt-extensions">
  <div class="co_body article-body cf">
<p>
<img src="https://w2.chabad.org/images/Shluchim/minisites/themes/plannedgiving/campus-time-square_530-272.png" width="485" alt="Chabad Hartford Campus Dedication"></p>
<h4 id="Advisors">Advisor Information</h4>
<div>
<p>We are always happy to provide detailed information, including any bequest language, for attorneys or other advisors regarding legacy gifts to Chabad House of Madison.</p>
<p>We welcome the opportunity to assist you, as you work with your clients to address their charitable goals. We also encourage our prospective donors to consult with their advisors and family when they are considering a planned gift to Chabad.</p>
<p>Please <a href="/tools/feedback.asp">contact us</a>—we're here to help.</p>
<p>
<strong>For Your Reference</strong></p>
<p>Chabad’s federal tax ID number is 39-1732644 <br>
Chabad’s full legal name is Chabad Lubavitch Inc.</p>
<p>
<strong>Important for Estate Lawyers &amp; Financial Professionals</strong></p>
<p>Chabad is blessed to have many centers operating throughout the world. While supervised by headquarters, each center is financially independent. Please make sure that your clients' legacy gift is properly worded to benefit the Chabad House of Madison.</p>
</div>
</div>
</co:body>
			</div>
			

			<div class="break_floats"></div>
			
	<div class="break_floats"></div>
	

<div class="content-footer">
	<!-- END CACHE -->
	
	
	
		<div class="section-articles below-article clearfix" id="MoreInSection" data-list-name="more in this section">
			<h2 class="below-article__title">More in this section</h2>
			<div class="bs-container">
				<div class="bs-row">
					
		<div class="section-articles__column col-md-6 ">
			<ul class="small-links small-links--orange">
				
		<li class="small-links__item ">
			
			<a class="link_item" href="/templates/articlecco_cdo/aid/3023471/jewish/Planned-Giving-Council.htm" data-aid="3023471">Planned Giving Council</a>
		</li>
		
	
		<li class="small-links__item ">
			
			<a class="link_item" href="/templates/articlecco_cdo/aid/3023472/jewish/Glossary-of-Terms.htm" data-aid="3023472">Glossary of Terms</a>
		</li>
		
	
			</ul>
		</div>
	
		<div class="section-articles__column col-md-6 ">
			<ul class="small-links small-links--orange">
				
		<li class="small-links__item ">
			
			<a class="link_item" href="/templates/articlecco_cdo/aid/3023468/jewish/Bequest-Form.htm" data-aid="3023468">Bequest Form</a>
		</li>
		
	
		<li class="small-links__item ">
			
			<a class="link_item" href="/templates/articlecco_cdo/aid/3023469/jewish/Frequently-Asked-Questions.htm" data-aid="3023469">Frequently Asked Questions</a>
		</li>
		
	
			</ul>
		</div>
	
				</div>
			</div> 
		</div>
	
		

	
	
</div>
	</article>

		</div>
	</div>
</div>
						
						<div class="break_floats"></div>
						
					</div>
				</div>
				
				
				
			</div>
			
			<!-- BEGIN FOOTER --></div></div><div class="co_section">
<div class="co_section_head">
<div>In this Section</div>
</div>
<div class="co_section_body">
<div class="co_section_gradient">
<div class="co_section_text">
<div class="item first">
<span>●</span>
<a href="/article.asp?aid=3023468">Bequest Form</a>
</div>
<div class="item">
<span>●</span>
<a href="/article.asp?aid=3023469">Frequently Asked Questions</a>
</div>
<div class="item">
<span>●</span>
<a href="/article.asp?aid=3023470">Advisor Information</a>
</div>
<div class="item">
<span>●</span>
<a href="/article.asp?aid=3023471">Planned Giving Council</a>
</div>
<div class="item last">
<span>●</span>
<a href="/article.asp?aid=3023472">Glossary of Terms</a>
</div>
</div>
</div>
</div>
<div class="co_section_footer" ></div>
</div>
<div class="chabad_right_column">
<div class="caption" id="contact-address">

<p>Rabbi Yona Matusof<br/>                 Chabad House of Madison<br/>                 1711 Monroe St.<br/>                 Madison, WI, 53726<br/>                 608-231-3450<br/>
<a href="mailto:rabbi@chabadofmadison.com">                 rabbi@chabadofmadison.com</a></p>
</div>
<ul class="sidebar-ads">


<li>

<a href="/3023441" ></a>

<img src="https://w2.chabad.org/images/Shluchim/minisites/themes/plannedgiving/sidebar-thumbs-jewish-destiny.png" alt="Changing Jewish Destiny" border="0" />
<div class="caption">
Changing Jewish Destiny</div>

</li>



<li>

<a href="/3023465" ></a>

<img src="https://w2.chabad.org/images/Shluchim/minisites/themes/plannedgiving/sidebar-thumbs-testimony.png" border="0" />
<div class="caption">
My Story</div>
</li>



<li>

<a href="/3023461" ></a>

<img src="https://w2.chabad.org/images/Shluchim/minisites/themes/plannedgiving/sidebar-thumbs-planned-giving.png" border="0" />
<div class="caption">
Planned Giving Videos</div>

</li>


</ul>

</div></div>
</div>
<div id="border_bottom" ></div>
</div>
<!-- END FOOTER -->
		</div>
		
		<aside class="page-tools-sidebar js-page-tools-sidebar hide_for_print">
<div class="page-tools js-page-tools-menu">
<div class="page-tools__section page-tools__section--share">
<a class="page-tools__tool js-share-popup page-tools__tool--facebook" data-share-url="https://www.facebook.com/dialog/share?app_id=188669250943&amp;display=popup&amp;href=https%3a%2f%2fwww.chabadmadison.com%2ftemplates%2farticlecco_cdo%2faid%2f3023470%2fjewish%2fAdvisor-Information.htm%23utm_medium%3dpage_tools%26utm_content%3ddesktop%26utm_source%3dFB">
				<i class="fa fa-facebook"></i>
			</a>
<a class="page-tools__tool js-share-popup page-tools__tool--twitter" data-share-url="https://twitter.com/intent/tweet?text=Advisor+Information+-+Chabad+Madison&amp;url=https%3a%2f%2fwww.chabadmadison.com%2ftemplates%2farticlecco_cdo%2faid%2f3023470%2fjewish%2fAdvisor-Information.htm%23utm_medium%3dpage_tools%26utm_content%3ddesktop%26utm_source%3dtwitter&amp;via=Chabad">
				<i class="fa fa-twitter"></i>
			</a>
<a class="page-tools__tool js-share-popup page-tools__tool--whatsapp d-lg-none js-share-whatsapp" data-share-url="whatsapp://send?text=Advisor+Information+-+Chabad+Madison https%3a%2f%2fwww.chabadmadison.com%2ftemplates%2farticlecco_cdo%2faid%2f3023470%2fjewish%2fAdvisor-Information.htm%23utm_medium%3dpage_tools%26utm_content%3ddesktop%26utm_source%3dwhatsapp">
				<i class="fa fa-whatsapp">
					<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50" fill="#128c7e" width="1em" height="1em"><path d="M25 2C12.318 2 2 12.318 2 25c0 3.96 1.023 7.854 2.963 11.29L2.037 46.73c-.096.343-.003.711.245.966.191.197.451.304.718.304.08 0 .161-.01.24-.029l10.896-2.699C17.463 47.058 21.21 48 25 48c12.682 0 23-10.318 23-23S37.682 2 25 2zm11.57 31.116c-.492 1.362-2.852 2.605-3.986 2.772-1.018.149-2.306.213-3.72-.231-.857-.27-1.957-.628-3.366-1.229-5.923-2.526-9.791-8.415-10.087-8.804-.295-.389-2.411-3.161-2.411-6.03s1.525-4.28 2.067-4.864c.542-.584 1.181-.73 1.575-.73s.787.005 1.132.021c.363.018.85-.137 1.329 1.001.492 1.168 1.673 4.037 1.819 4.33.148.292.246.633.05 1.022s-.294.632-.59.973-.62.76-.886 1.022c-.296.291-.603.606-.259 1.19s1.529 2.493 3.285 4.039c2.255 1.986 4.158 2.602 4.748 2.894.59.292.935.243 1.279-.146.344-.39 1.476-1.703 1.869-2.286s.787-.487 1.329-.292c.542.194 3.445 1.604 4.035 1.896.59.292.984.438 1.132.681.148.242.148 1.41-.344 2.771z"/></svg>
				</i>
			</a>
<a class="page-tools__tool js-share-popup page-tools__tool--pinterest d-none d-lg-block" data-share-url="http://pinterest.com/pin/create/button/?url=https%3a%2f%2fwww.chabadmadison.com%2ftemplates%2farticlecco_cdo%2faid%2f3023470%2fjewish%2fAdvisor-Information.htm%23utm_medium%3dpage_tools%26utm_content%3ddesktop%26utm_source%3dpinterest&amp;description=Advisor+Information+-+Chabad+Madison">
				<i class="fa fa-pinterest"></i>
			</a>
<a class="page-tools__tool" onclick="showEmailLayer(this);">
<i class="fa fa-envelope"></i>
</a>
</div>
<div class="page-tools__section page-tools__section--other js-page-tool-other">
<div class="page-tools__tool popover-parent d-lg-block">
<div class="popover popover--right align_left nowrap">
<div class="popover__content">
<label class="bold bottom_margin block">
Print Options:
</label>
<form class="vcenter" name="print-form" onsubmit="coPrint(event, 3023467);return false;">
<div>
<label><input type="checkbox" name="print-green"><span title="Save paper and ink">Print without images <i class="fa fa-leaf text-green"></i></span></label>
</div>
<br/>
<div class="center">
<button class="co-button page-tools__print-button">Print</button>
</div>
</form>
</div>
</div>
<i class="fa fa-print"></i>
</div>
</div>
</div>
<div class="js-fab-wrapper fab-wrapper">
<div class="fab">
<i class="fab-icon"></i>
</div>
</div>
</aside>
<!-- END CACHE -->
	</div>

	</div>

	<div id="BodyContainer">
		<div class="g960 footer">
			<div class="poweredby large_bottom_margin">
				



	<div class="footer3">
		<span class="footer-title" >Chabad Madison</span>
		<div class="footer-address">
			<span class="footer-street">1711 Monroe St </span>
			<span class="footer-city-state">Madison, WI 53711</span>
		</div>
			<span>608-231-3450</span>
	</div>
	<img src="https://w2.chabad.org/images/global/spacer.gif" width="1" height="6" border="0" /><br />



Powered by <a href="https://www.chabad.org/" target="_new" class="">Chabad.org</a> &copy; 1993-2026 <a href="/4026210" target="_blank" class="privacy-link">Privacy Policy</a>




			</div>
		</div>
	</div>
	
	

	
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/os/jquery-1.8.3.min.js?v=14C45307"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/os/jquery/jquery.tools.expose.min.js?v=AB0A58F7"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/os/jquery.tools.1.2.7.min.js?v=FBC14E36"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/co/dist/CoLib.js?v=F809B22F"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/WebComponents/bundles/magen-cdo-global.js?v=16F176A4"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/templates/plannedgiving/custom.js?v=8742C543"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/custom/multimedia/infolayer.js?v=ED1B8531"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/custom/commentsloader.js?v=AD6AAB79"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/custom/minisites.js?v=F38E4DA5"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/custom/subscribeprompt.js?v=86D84DC2"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/modules/pagetools.js?v=930B07AB"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/custom/deprecated.js?v=D506A83E"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/OverrideJSDocumentWrite.js?v=9A0227AA"></script><script>$j = $j.fn ? $j : jQuery;$j(()=>{$q.forEach(f=>{try{f.call(window);}catch(ex){console.error(ex);}});})</script>
	

<script  language="javascript" type="text/javascript"> Co.Settings      = {CacheClassName:'js-cache-default',MosadName:'Chabad Madison'}; Co.ArticleId     = '3023470';Co.SectionId     = 349199;Co.PartnerSiteId = 0;Co.SiteId        = 214;Co.IsMobilePage  = false;Co.IsResponsive  = false;Co.DbDomain      = 'ChabadMadison.com';Co.LanguageCode  = '';Co.LoginStatus   = 'None';</script>
	
	
<script>
document.addEventListener('DOMContentLoaded', function() {

    // =========================================================================
    // PART 1: HELPER FUNCTIONS & CONFIG
    // =========================================================================

    const googleSheetCsvUrl = 'https://docs.google.com/spreadsheets/d/e/2PACX-1vRhqJdBdBaaXEuIqeSwRyVapiMHHjZfI8deYHLBaISbliR8mihmy2uaRTsMX6KlRbZEkQA5RNDw6fr3/pub?output=csv';

    // Helper: Find a div containing specific text (handling the period issue)
    function findPlaceholderElement(placeholderText) {
        const potentialContainers = document.querySelectorAll('div.form-html'); 
        for (let container of potentialContainers) {
            // Check textContent to find the placeholder
            if ((container.textContent || '').includes(placeholderText)) {
                return container; 
            }
        }
        return null;
    }

    // Helper: Parse CSV Text into JSON
    function parseCsvResponse(csvText) {
        if (!csvText || typeof csvText !== 'string') return []; 
        try { 
            const lines = csvText.trim().split('\n'); 
            if (lines.length < 2) return []; 
            const headers = lines.shift().trim().split(',').map(h => h.trim().replace(/"/g, '')); 
            return lines.map(line => { 
                const values = line.trim().split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); 
                const rowData = {}; 
                headers.forEach((header, index) => { 
                    let value = values[index] ? values[index].trim().replace(/^"|"$/g, '') : ''; 
                    if (['Amount', 'Goal', 'Value / GID'].includes(header) && value) { 
                        value = parseFloat(value.replace(/[^0-9.-]+/g, "")) || 0; 
                    } 
                    rowData[header] = value; 
                }); 
                return rowData; 
            }); 
        } catch (e) { 
            console.error("Failed to parse CSV.", e); 
            return []; 
        }
    }

    // Helper: Get specific sheet URL
    function getSheetCsvUrl(gid) {
        const sheetIdMatch = googleSheetCsvUrl.match(/\/d\/e\/(.*?)\//);
        if (!sheetIdMatch) return null;
        return 'https://docs.google.com/spreadsheets/d/e/' + sheetIdMatch[1] + '/pub?gid=' + gid + '&output=csv';
    }

    // =========================================================================
    // PART 2: STYLING & INTERACTIVITY (Radio Tabs)
    // =========================================================================

    function injectFormStyles() {
        // 1. Add Google Font
        const link = document.createElement('link');
        link.href = 'https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;700;900&display=swap';
        link.rel = 'stylesheet';
        document.head.appendChild(link);
        
        // 2. Add Custom CSS
        const style = document.createElement('style');
        style.innerHTML = `
            /* --- Base and Font --- */
            .campaign-form-styling-active .userform-form, 
            .campaign-form-styling-active .userform-form span {
                font-family: 'Raleway', sans-serif !important;
                box-sizing: border-box;
                color: white !Important;
            }
            /* --- Blue Background Section (Grid) --- */
            .campaign-form-styling-active ul.form-section {
                background-color: #2F3C4D !important;
                padding: 30px !important;
                border-radius: 8px;
                margin-top: 20px;
                display: block !important;
                gap: 20px;
                list-style: none !important;
            }
            /* --- Exclude Top Elements from Blue BG --- */
            .campaign-form-styling-active ul.form-section > li#id_1, 
            .campaign-form-styling-active ul.form-section > li#id_3, 
            .campaign-form-styling-active ul.form-section > li#id_12,
            .campaign-form-styling-active ul.form-section > li#id_13,
            .campaign-form-styling-active ul.form-section > li#id_4 {
                background-color: transparent !important;
                padding: 0 !important;
                grid-column: 1 / -1 !important;
                margin: 0 !important;
                border: none !important;
                box-shadow: none !important;
            }
            /* Hide GID field */
            .co_body .content .form-all p{ color: white !important;}
            /* Reset text color for items in blue section */
            .campaign-form-styling-active ul.form-section > li { color: white; }
            /* Reset for top elements */
            .campaign-form-styling-active ul.form-section > li.form-line#id_3 .form-html p,
            .campaign-form-styling-active ul.form-section > li#id_13 * { color: #333 !important; }
            
            /* --- Make sections span full width --- */
            .campaign-form-styling-active ul.form-section > li#id_14,
            .campaign-form-styling-active ul.form-section > li#id_7,
            .campaign-form-styling-active ul.form-section > li#id_8,
            .campaign-form-styling-active ul.form-section > li#id_2,
            .campaign-form-styling-active ul.form-section > li#id_10,
            .campaign-form-styling-active ul.form-section > li#id_11 { grid-column: 1 / -1 !important; }

            /* --- RADIO TABS STYLING --- */
            .campaign-form-styling-active li.custom-radio-tab-list {
                grid-column: 1 / -1 !important; background: transparent !important; border: none !important; padding: 0 !important; margin: 0 !important;
            }
            .campaign-form-styling-active .custom-radio-grid-container {
                display: grid !important; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px;
            }
            .campaign-form-styling-active .custom-radio-tab {
                background-color: white !important; border-radius: 8px !important; padding: 20px !important; color: #333 !important; cursor: pointer;
                transition: all 0.2s ease-in-out; border: 3px solid transparent; display: block !important;
            }
            .campaign-form-styling-active .custom-radio-tab.custom-radio-tab-selected {
                border-color: #B99362 !important; box-shadow: 0 4px 12px rgba(185, 147, 98, 0.4);
            }
            .campaign-form-styling-active .custom-radio-tab input[type="radio"] { display: none !important; }
            .campaign-form-styling-active .custom-radio-tab label {
                font-size: 1rem !important; font-weight: 500 !important; color: #555 !important; line-height: 1.3 !important; display: block; cursor: pointer; width: 100%;
            }
            .campaign-form-styling-active .custom-radio-tab label::before {
                content: attr(data-amount); display: block; font-size: 2rem; font-weight: 900; line-height: 1.1; margin-bottom: 5px;
            }
            .campaign-form-styling-active .custom-radio-tab.spinner-odd label::before { color: #A47E4D !important; }
            .campaign-form-styling-active .custom-radio-tab.spinner-even label::before { color: #2F3C4D !important; }
            .campaign-form-styling-active .custom-radio-tab-other { align-self: start; }
            .campaign-form-styling-active .custom-radio-tab-other label { margin-bottom: 10px; }
            .campaign-form-styling-active .custom-other-input-wrapper { display: block; margin: 0; padding: 0; }
            .campaign-form-styling-active .custom-radio-tab-other input[type="number"] {
                width: 100% !important; border: 1px solid #ccc !important; border-radius: 4px !important; padding: 12px 8px !important;
                font-size: 1.2rem !important; font-weight: 700 !important; color: #2F3C4D !important; margin: 0 !important;
            }
            .campaign-form-styling-active .custom-radio-tab-other input[type="number"]:disabled { background: #f4f4f4 !important; cursor: not-allowed; }
            .campaign-form-styling-active .custom-radio-grid-container .clearfix, .campaign-form-styling-active .custom-radio-tab br { display: none !important; }

            /* --- Other Form Fixes --- */
            .co_body h3, .co_body h2, .co_body h1 { color: #B99362 !important; }
            .co_body .content .form-all .form-submit-button { background: #B99362 !important; }
            .co_body .content .form-all .form-label-left label, .form-sub-label { color: white !important; }
        `;
        document.head.appendChild(style);
        document.body.classList.add('campaign-form-styling-active');
    }

    function setupAllRadioTabs() {
        try {
            const allFormLines = document.querySelectorAll('li.form-line[id*="id_"]');
            allFormLines.forEach((liContainer) => {
                const radioItems = liContainer.querySelectorAll('.form-radio-item');
                const hasOther = liContainer.querySelector('.form-radio-other');
                const firstLabel = liContainer.querySelector('.form-radio-item label');
                const isPaymentRadio = hasOther || (firstLabel && firstLabel.innerText.includes('$'));
                
                if (radioItems.length === 0 || !isPaymentRadio) return;

                // Process Payment List
                liContainer.classList.add('custom-radio-tab-list');
                const gridContainer = liContainer.querySelector('.form-single-column');
                if (gridContainer) gridContainer.classList.add('custom-radio-grid-container');

                const globalOtherInput = liContainer.querySelector('input[type="number"]');
                const globalOtherRadio = liContainer.querySelector('input.form-radio-other');

                radioItems.forEach((radioItem, index) => {
                    radioItem.classList.add('custom-radio-tab');
                    radioItem.classList.add((index % 2 === 0) ? 'spinner-odd' : 'spinner-even');
                    
                    const radio = radioItem.querySelector('input[type="radio"]');
                    let labelEl = radioItem.querySelector('label');
                    const otherInput = radioItem.querySelector('input[type="number"]');

                    if (otherInput) {
                        radioItem.classList.add('custom-radio-tab-other');
                        if (!labelEl) {
                            labelEl = document.createElement('label');
                            labelEl.setAttribute('for', radio.id);
                            radioItem.insertBefore(labelEl, radioItem.querySelector('span'));
                        }
                        labelEl.setAttribute('data-amount', 'Other');
                        labelEl.innerText = 'Enter your own amount';
                        const inputSpan = otherInput.parentElement;
                        if (inputSpan && inputSpan.tagName === 'SPAN') inputSpan.classList.add('custom-other-input-wrapper');
                    } else if (labelEl) {
                        const labelText = labelEl.innerText.trim();
                        const dataAmountAttr = labelEl.getAttribute('data-amount');
                        let amount = "", description = "";

                        if (dataAmountAttr) {
                            amount = dataAmountAttr;
                            description = labelText;
                        } else {
                            const firstSpaceIndex = labelText.indexOf(' ');
                            if (firstSpaceIndex > -1) {
                                amount = labelText.substring(0, firstSpaceIndex);
                                description = labelText.substring(firstSpaceIndex + 1);
                                labelEl.innerText = description;
                                labelEl.setAttribute('data-amount', amount);
                            }
                        }
                    }

                    radioItem.addEventListener('click', (e) => {
                        if (e.target.type === 'number') return;
                        gridContainer.querySelectorAll('.custom-radio-tab').forEach(t => t.classList.remove('custom-radio-tab-selected'));
                        radioItem.classList.add('custom-radio-tab-selected');
                        
                        if (radio === globalOtherRadio) {
                            if(globalOtherInput) { globalOtherInput.disabled = false; globalOtherInput.focus(); }
                        } else {
                            if(globalOtherInput) { globalOtherInput.disabled = true; }
                        }
                    });
                });

                if (globalOtherInput) {
                    globalOtherInput.addEventListener('focus', () => {
                        if (globalOtherRadio && !globalOtherRadio.checked) globalOtherRadio.click();
                        gridContainer.querySelectorAll('.custom-radio-tab').forEach(t => t.classList.remove('custom-radio-tab-selected'));
                        const otherTab = globalOtherInput.closest('.custom-radio-tab');
                        if (otherTab) otherTab.classList.add('custom-radio-tab-selected');
                    });
                }
            });
        } catch (e) {
            console.error("Error setting up radio tabs: ", e);
        }
    }

    // =========================================================================
    // PART 3: DATA FETCHING & POPULATION (Progress Bar / Donors)
    // =========================================================================

    async function processData(currentGid) {
        try {
            // Fetch ONLY the master sheet (Removed Minisite Fetch)
            const masterResponse = await fetch(googleSheetCsvUrl);
            if (!masterResponse.ok) throw new Error('Failed to fetch Master sheet');
            
            const masterText = await masterResponse.text();
            const masterData = parseCsvResponse(masterText);
            
            // Find Campaign Data
            const allCampaigns = masterData.filter(row => row.Type === 'campaign');
            const currentCampaignInfo = allCampaigns.find(c => String(c['Value / GID']) === String(currentGid));

            if (!currentCampaignInfo) { console.error('No campaign with GID ' + currentGid + ' found.'); return; }
            
            const goal = currentCampaignInfo.Goal || 0; 
            
            // Get Specific Donor Sheet
            const donorSheetUrl = getSheetCsvUrl(currentGid);
            if (!donorSheetUrl) return;

            const donorResponse = await fetch(donorSheetUrl);
            const donorText = await donorResponse.text();
            const donors = parseCsvResponse(donorText);

            // Calculate Raised
            const raised = donors.reduce((sum, d) => sum + (d.Amount || 0), 0);

            // Render Elements
            // NOTE: We call these sequentially. We use text replacement (innerHTML) 
            // instead of element replacement to ensure that if both placeholders 
            // are in the same container, one doesn't delete the other.
            populateProgressBar(raised, goal); 
            populateDonorsList(donors); 

        } catch (e) {
            console.error("Error processing campaign data:", e);
        }
    }

    function populateProgressBar(raised, goal) {
        const placeholderElement = findPlaceholderElement('%%CAMPAIGN_PROGRESS_BAR%%');
        if (!placeholderElement) return;

        const percentage = goal > 0 ? Math.round((raised / goal) * 100) : 0;
        
        // Build the HTML String
        const progressBarHtml = 
            '<div id="campaign-form-progress-bar-container" style="padding: 20px 0;">' +
                '<div style="display: flex; justify-content: space-between; font-size: 1.1rem; font-weight: 500; margin-bottom: 8px; color: #333;">' +
                    '<span>Money Raised: <span style="font-weight: 700;">$' + raised.toLocaleString() + '</span></span>' +
                    '<span>Goal: $' + goal.toLocaleString() + '</span>' +
                '</div>' +
                '<div style="background-color: #e0e0e0; border-radius: 20px; height: 35px; overflow: hidden; position: relative;">' +
                    '<div style="background-color: #a47e4d; color: white; text-align: center; font-weight: 700; font-size: 1.2rem; line-height: 35px; height: 100%; width: ' + percentage + '%; transition: width 0.8s ease-in-out; border-radius: 20px;">' +
                        percentage + '%' +
                    '</div>' +
                '</div>' +
            '</div>';
        
        // Style Parent LI to Span Width
        const parentLi = placeholderElement.closest('li');
        if (parentLi) parentLi.style.gridColumn = '1 / -1';

        // Use Text Replacement so we don't accidentally remove the Donor placeholder
        // Regex handles optional trailing period
        placeholderElement.innerHTML = placeholderElement.innerHTML.replace(/%%CAMPAIGN_PROGRESS_BAR%%\.?/, progressBarHtml);
    }

    function populateDonorsList(donors) {
        // Re-find element in case the DOM was updated by populateProgressBar
        const placeholderElement = findPlaceholderElement('%%CAMPAIGN_DONORS_LIST%%');
        if (!placeholderElement) return;

        let donorsHtmlContent = '<h2>Campaign Donors</h2>';
        const showCount = 5; 
        let sortedDonors = []; 

        if (!donors || donors.length === 0) {
            donorsHtmlContent += '<p style="text-align:center;">Be the first to donate to this campaign!</p>';
        } else {
            sortedDonors = [...donors].sort((a,b) => (b.Amount || 0) - (a.Amount || 0));
            sortedDonors.forEach((donor, index) => {
                if (donor.Donor_Name && typeof donor.Amount === 'number') { 
                    const isHidden = index >= showCount;
                    donorsHtmlContent += '<div class="campaign-donor-item" style="background: #F2F2F2; border-radius: 10px; display: ' + (isHidden ? 'none' : 'flex') + '; justify-content: space-between; align-items: center; padding: 15px; border-bottom: 1px solid #eee;"><span style="font-size: 1.2rem; font-weight: 500; color: black !Important;">' + donor.Donor_Name + '</span><span style="font-size: 1.2rem; font-weight: 700; color: #a47e4d !Important;">$' + (donor.Amount).toLocaleString() + '</span></div>';
                }
            });

            if (sortedDonors.length > showCount) {
                donorsHtmlContent += '<button id="show-all-donors-btn" style="background: #a47e4d; color: white; border: none; padding: 10px 15px; border-radius: 5px; font-weight: 700; cursor: pointer; margin-top: 10px; text-transform: uppercase; font-size: 0.9rem; width: 100%;">Show All Donors \u2193</button>';
            }
        }
        
        // Build the HTML String
        const donorListHtml = 
            '<div id="campaign-form-donors-list-container" style="margin-top: 40px; display: flex; flex-direction: column; gap: 5px;">' +
                donorsHtmlContent +
            '</div>';

        // Style Parent LI to Span Width
        const parentLi = placeholderElement.closest('li');
        if (parentLi) parentLi.style.gridColumn = '1 / -1';

        // Use Text Replacement
        placeholderElement.innerHTML = placeholderElement.innerHTML.replace(/%%CAMPAIGN_DONORS_LIST%%\.?/, donorListHtml);

        // Attach Event Listeners AFTER injection
        if (sortedDonors.length > showCount) {
            const showMoreBtn = document.getElementById('show-all-donors-btn');
            if (showMoreBtn) {
                showMoreBtn.addEventListener('click', function() {
                    const hiddenDonors = document.querySelectorAll('.campaign-donor-item[style*="display: none"]');
                    hiddenDonors.forEach(donorEl => { donorEl.style.display = 'flex'; });
                    showMoreBtn.style.display = 'none';
                });
            }
        }
    }

    // =========================================================================
    // PART 4: MAIN EXECUTION (The Gatekeeper)
    // =========================================================================

    function initCampaignPage() {
        console.log("Checking for campaign placeholders...");

        // 1. Find GID
        const gidPlaceholder = findPlaceholderElement('%%GID=[');
        let currentGid = null;
        if (gidPlaceholder) {
            const gidMatch = (gidPlaceholder.textContent || '').match(/%%GID=\[(\d+)\]%%/);
            if (gidMatch && gidMatch[1]) {
                currentGid = gidMatch[1];
                gidPlaceholder.style.display = 'none'; // Hide it but keep logic
            }
        }

        // 2. Find Progress Bar & Donors List
        // Note: Using 'includes' in helper handles the trailing period '.' automatically
        const hasProgressBar = findPlaceholderElement('%%CAMPAIGN_PROGRESS_BAR%%');
        const hasDonorsList = findPlaceholderElement('%%CAMPAIGN_DONORS_LIST%%');

        // 3. Strict Check: ALL THREE must be present
        if (currentGid && hasProgressBar && hasDonorsList) {
            console.log("All requirements met. Initializing Campaign Page (Styling + Data).");
            
            // A. Run Styling
            setupAllRadioTabs();
            injectFormStyles();

            // B. Run Data Fetching
            processData(currentGid);

        } else {
            console.log("Script skipped. Requirements not met (Missing GID, Progress Bar, or Donors List).");
            // We do nothing. The page loads as a standard form.
        }
    }

    // Run the check
    initCampaignPage();

});
</script>
</body>
</html>