function PrintFeedBox(FeedUrl, Topic, Track){
	var s;
	var t = '';
	if(Track != null){
		var t =  "_gaq.push(['_setAccount', 'UA-532044-1']);"
		t += "_gaq.push(['_trackEvent', 'Subscription', 'Subscribe', '" + Track + "']);";
	}
	s = '<div class="header">'; 
	s += '<h2><span class="opening">Send Me Updates About:</span> <span class="topic">' + Topic + '</span></h2>';
	s += '<div href="#" class="tooltip updates"><span class="target"></span><span class="content">As new content on your chosen topic gets posted, you\'ll receive an automated email via <a href="http://www.feedmyinbox.com/">FeedMyInbox</a>. You can unsubscribe at any time.</span></div>';
	s += '	</div><form action="http://www.feedmyinbox.com/feeds/verify/" method="post" id="fmi" target="fmi" onsubmit="window.open(\'http://www.feedmyinbox.com/\', \'fmi\', \'scrollbars=yes,width=520,height=490\');subFeed(document.getElementById(\'fmi\').elements[1].value, \'1481\',46521);' + t + 'return true;">';
	s += '<div class="checkbox"><input type="checkbox" id="actionCheck" name="actionCheck" checked="checked" value="1"  /> <label>Also send me NRDC updates and action alerts<div href="#" class="tooltip label"><span class="target">(?)</span><span class="content">The NRDC sends a weekly newsletter and periodic action alerts on breaking issues. By checking this box, you\'re agreeing to receive these important emails. You can unsubscribe at any time.</span></div></label></div>';
	s += '<div class="input"><label class="hide">Email Address:</label><input type="text" onfocus="javascript:if(this.value==\'Email Address Here\')this.value=\'\';" value="Email Address Here" name="email" /></div>';
	s += '<input type="hidden" value="' + FeedUrl + '" name="feed"/>';
	s += '<input type="image" src="/_images/col-right/tagalerts/bg-go.jpg" value="Go">';
	s += '</form>';
	s += '<p class="feedback"><a href="mailto:nrdcwebalert@nrdc.org?subject=Email%20alerts%20feedback">Feedback on this feature?</a></p>';

	document.write(s);
	 
}
function subFeed(email, interestId, groupId, conviosource){
 var jqs = jQuery.noConflict();
 var aa = jqs("#actionCheck").attr("checked");

 if(!aa) return;
 if(!conviosource) var conviosource = 'nrdc_subscribenofmi'
 jqs.post('/scripts/convio_api.asp',{
   source: conviosource,
   add_interest_ids: interestId,
   add_group_ids: groupId,
   primary_email: email
 });
 }
 
function toggleFmiInfo(){
 var jqi = jQuery.noConflict();
 jqi("#fmiInfo").toggle("slow");    
}
 
