(function() {
	// Private functions and variables
	var hart_div;

	//{{{ DOM work
	function hv_all(list, fn) { //{{{
		var idx;
		var all = true;

		for (idx in list) {
			if (!fn(list[idx])) {
				all = false;
			}
		}

		return all;
	} //}}}

	function hv_check_dom_item(name) { //{{{
		if (!document[name]) {
			// If we don't have the DOM methods, we can't use them to show the error.
			document.open();
			document.write("<strong>Error:</strong> Your browser doesn't support "+name+".<br />");
			document.close();
			return false;
		} else {
			return true;
		}
	} //}}}

	function hv_check_dom() { //{{{
		var items = [
			'getElementById',
			'createElement',
			'insertBefore',
			'appendChild',
			'getElementsByTagName'
		];

		return hv_all(items, hv_check_dom_item);
	} //}}}

	function hv_find_by_class(root, tag_name, class_name) { //{{{
		var i, end;
		var tags = root.getElementsByTagName(tag_name);
		var re = new RegExp('\\b'+class_name+'\\b');

		// Safari bugs out here when using for-in syntax.
		end = tags.length
		for (i = 0; i < end; ++i) {
			if (tags[i].className && tags[i].className.match(re)) {
				return tags[i];
			}
		}
	} //}}}

	//}}} end DOM
	//{{{ CSS wrangling
	var head;

	function css_find_head() { //{{{
		var heads = document.getElementsByTagName('head');
		if (heads.length >= 1) {
			return heads[0];
		}

		// No HEAD section? Build me a new one!
		var head_elt = document.createElement('head');

		// make sure it has a child to insert before
		var head_text = document.createTextNode('');
		head_elt.appendChild(head_text);

		// add head to the document
		document.insertBefore(head_elt, document.firstChild);

		return head_elt;
	} //}}}

	function css_new_link(sheet) { //{{{
		var elt = document.createElement('link');
		elt.setAttribute('rel',  'stylesheet');
		elt.setAttribute('type', 'text/css');
		elt.setAttribute('href', sheet);

		return elt;
	} //}}}

	function css_add(sheet, is_override) { //{{{
		var link = css_new_link(sheet);

		if (!head) {
			head = css_find_head();
		}

		if (is_override) {
			head.appendChild(link); // add last to take precedence over designer
		} else {
			head.insertBefore(link, head.firstChild); // add first
		}
	} //}}}

	//}}} end CSS
	//{{{ Selection handling - see docs/load-template.txt!!
	var clear_iv = null;
	var clear_sel;
	var deny_r; // Range which we deny selecting from.

	function hv_should_clear(s_e, e_s) { //{{{
		// if they are equal, or either one is zero, then the selection is allowed (should not clear)
		return !(s_e === e_s || s_e === 0 || e_s === 0);
	} //}}}

	function hv_should_clear_range(sel_r) { //{{{
		var s_e = deny_r.compareBoundaryPoints(Range.END_TO_START, sel_r);
		var e_s = deny_r.compareBoundaryPoints(Range.START_TO_END, sel_r);
		return hv_should_clear(s_e, e_s);
	} //}}}


	function hv_clearsel_std() { //{{{
		var s = window.getSelection();

		if (s.rangeCount === 0 || !s.toString()) { // nothing selected
			return;
		}

		var i;
		var count = s.rangeCount;

		for (i = 0; i < count; ++i) {
			if (hv_should_clear_range(s.getRangeAt(i))) {
				s.removeAllRanges();
				return;
			}
		}
	} //}}}

	function hv_clearsel_std_safari() { //{{{
		var s = window.getSelection();

		if (s.rangeCount === 0 || !s.toString()) { // nothing selected
			return;
		}

		var sel_r = document.createRange();
		sel_r.setStart(s.anchorNode, s.anchorOffset);
		sel_r.setEnd(s.focusNode, s.focusOffset);

		if (hv_should_clear_range(sel_r)) {
			s.removeAllRanges();
		}
	} //}}}

	function hv_clearsel_ie() { //{{{
		var s = document.selection;

		// IE docs are inconsistent with capitalization
		if (s.type !== "Text" && s.type !== "text") {
			return;
		}

		var sel_r = s.createRange();

		if (hv_should_clear(deny_r.compareEndPoints("StartToEnd", sel_r),
				                deny_r.compareEndPoints("EndToStart", sel_r)))
		{
			s.empty();
		}
	} //}}}

	function hv_clearsel_null() { //{{{
		clearInterval(clear_iv);
		clear_iv = null;
	} //}}}


	function hv_sel_setup_std() { //{{{
		var gs = {};
		var s;
		var create = document.createRange;

		if (!create) { return hv_clearsel_null; } // improbable

		s = window.getSelection();
		gs.rm_all = s.removeAllRanges;
		gs.get_at = s.getRangeAt;

		deny_r = document.createRange();
		deny_r.selectNode(hart_div);

		if (gs.get_at)      { return hv_clearsel_std; }
		else if (gs.rm_all) { return hv_clearsel_std_safari; }
		else                { return hv_clearsel_null; } // improbable
	} //}}}

	function hv_sel_setup_ie() { //{{{

		deny_r = document.body.createTextRange();
		deny_r.moveToElementText(hart_div);

		return hv_clearsel_ie;
	} //}}}

	function hv_sel_find() { //{{{
		// select a clear_sel function based on what will work in the browser;
		// this means we're not doing a browser-detect every 33 ms
		var get_sel = window.getSelection;
		var ie_sel  = (document.selection && document.selection.empty);

		if (get_sel)     { return hv_sel_setup_std(); }
		else if (ie_sel) { return hv_sel_setup_ie(); }
		else             { return hv_clearsel_null; }
	} //}}}


	function hv_sel_setup() { //{{{
		if (clear_iv !== null) {
			clearInterval(clear_iv);
		}

		clear_sel = hv_sel_find();
		clear_iv  = setInterval(clear_sel, 33);
	} //}}}

	//}}} end selection

	//{{{ Bootup; all template substitutions MUST be isolated to this section to ease maintenance.
	var booted = {};
	function hv_boot_set_div(div_id) { //{{{
		// Protect against double-boot
		if (booted.set_div === true) { return; }
		booted.set_div = true;

		if (!document.getElementById) { return false; } // improbable

		if (!div_id) { div_id = 'hart_viewer'; }
		hart_div = document.getElementById(div_id);
		return true;
	} //}}}

	function hv_boot_embed() { //{{{
		// Protect against double-boot
		if (booted.embed === true) { return; }
		booted.embed = true;

		// Boot sequence: check browser support, then do work.
		if (!hv_check_dom()) { return; }
		if (booted.set_div !== true) { hv_boot_set_div(); }

		css_add('http://hartonweb.com/System/css/default.css',  false);
		css_add('http://hartonweb.com/System/override.php?id=6', true);

		hart_div.innerHTML = '<h2 class=\"ha_product\">Nature\'s Immune Stimulator</h2>\n<div class=\"ha_print_mark\">This information is provided by OnlyTheBestHerbs.com</div>\n<div class=\"ha_content\"><div class=\"ha_image\"><img src=\"http://hartonweb.com/System/loadpic.php?sn=1839-3\"> \n      &nbsp;</div>\n<div class=\"ha_body\"><p>Nature\'s Immune Stimulator contains a powerful \n        blend of natural substances known for their immune-stimulating and disease-fighting \n        abilities. Working synergistically, the ingredients in Nature\'s \n        Immune Stimulator help strengthen the body\'s immune system, while \n        providing specific antibacterial, antiviral, antioxidant and antitumor \n        activity.    </p>\n<p><span class=\"bodyingredient\">Arabinogalactan</span>, a polysaccharide found in \n          echinacea and in concentrated amounts in the Western larch tree, is \n          believed to be the constituent primarily responsible for echinacea\'s \n          effective immune-stimulating properties. A study published in the <span class=\"bodyjournalname\">Journal \n          of the National Cancer Institute </span>showed that arabinogalactan activated \n          macrophages to cytotoxicity (toxicity to specific cells) against tumor \n          cells and microorganisms, as well as stimulated macrophages to produce \n          tumor necrosis factor (a protein that destroys cancerous tumor cells), \n          interleukin-1 (an immune system hormone that stimulates T-cell function), \n          and interferon-beta 2. Arabinogalactan has also been shown to increase \n          the presence of anaerobes and lactobacillus in the gastrointestinal \n          tract&mdash;anaerobes help increase the acidity of the gut contents, \n          in turn, reducing overgrowth of pathogenic bacteria.<span class=\"bodyref\">1-3</span> \n    <p><span class=\"bodyingredient\">Beta glucan </span>has been recognized by researchers \n          since the 1940s for providing immune benefits&mdash;beta glucan stimulates \n          the immune system to enhance immunity and protect the body against infection. \n          Beta glucan is a naturally occurring polysaccharide compound (a complex \n          carbohydrate) found in algae, baker\'s yeast, barley, mushrooms \n          and oats. According to research, beta glucan potentiates the immune \n          system, specifically activating macrophages to fight bacteria, viruses \n          and other foreign invaders. Beta glucan also facilitates the transmission \n          of cellular information among the macrophages, T-cells, B-cells, antibodies \n          and interferons and interleukins, thus enhancing overall immune response. \n          A promising study published in the <span class=\"bodyjournalname\">Journal of Immunology </span>showed \n          that beta glucan slowed tumor growth in mice&mdash;by the end of the \n          4-week study, the tumors in mice treated with beta glucan were up to \n          79% smaller than those in untreated mice.<span class=\"bodyref\">4-6</span> \n    <p><span class=\"bodyingredient\">Colostrum </span>is provided by the mammary glands \n          of mammals (including humans) during the first 24 to 48 hours following \n          birth. Colostrum contains essential immune factors that are vital to \n          a newborn\'s underdeveloped immune system, as well as certain growth \n          factors to ensure proper development of all body cells. Important substances \n          in colostrum also promote the development of bifidobacteria colonies, \n          which create an environment within the body that is inhospitable for \n          harmful bacteria. Studies show that colostrum recharges the immune system \n          and destroys bacteria, viruses and fungi, as well as speeds the healing \n          of all body tissues. In fact, over 4,000 clinical studies have been \n          conducted around the world researching colostrum\'s beneficial \n          effects on numerous diseases, including AIDS/HIV, allergies, autoimmune \n          disorders, cancer, colds and flus, diabetes, gastrointestinal complaints, \n          and bacterial, viral and parasitic infections, to name a few. In addition, \n          conventional medical specialists utilize many isolated colostrum components&mdash;interferon, \n          gamma globulin, growth hormone, IgF-1, and protease inhibitors&mdash;in \n          the treatment of autoimmune disorders, cancer, and chronic viral infections \n          such as HIV.<span class=\"bodyref\">7-12</span> \n    <p><span class=\"bodyingredient\">Cordyceps </span>is a rare and highly-prized edible \n          fungus (mushroom) that is known for its ability to stimulate immune \n          function. Cordyceps polysaccharides are primarily responsible for the \n          mushroom\'s immunostimulant effects and have been found to enhance \n          macrophage and lymphocyte activity, as well as provide protection against \n          damage from chemotherapy and radiation. Cordyceps also contains substances \n          that demonstrate anti-tumor activity and the ability to stimulate antibody-forming \n          cells (immunoglobulins G and M)&mdash;successful animal studies indicate \n          the possible use of cordyceps as an anti-tumor agent in the treatment \n          of lymphoma and other cancers. In vitro studies show that cordyceps \n          polysaccharides can significantly inhibit the proliferation of human \n          leukemic cells by 78-83%. In addition, in vitro and in vivo studies \n          found that cordyceps stimulates the activity of NK (Natural Killer) \n          cells, indicating its potential for use as an immunopotentiating agent \n          in the treatment of cancer (including adult leukemia) and immunodeficient \n          patients. Furthermore, a clinical study of 36 individuals diagnosed \n          with advanced breast and lung cancer showed that a pharmaceutical preparation \n          providing similar active principles as found in <span class=\"bodyscientificname\">Cordyceps \n          sinensis </span>restored cellular immunological function and improved \n          the patients\' quality of life.<span class=\"bodyref\">13-22</span> \n    <p><span class=\"bodyingredient\">Maitake </span>and <span class=\"bodyingredient\">reishi mushrooms \n          </span>have been used in traditional Asian medicine to stimulate the \n          immune system and treat cancer and other chronic wasting diseases. These \n          mushrooms contain numerous phytochemicals, including beta glucans. Beta \n          glucan extracts of reishi, maitake and other medicinal mushrooms have \n          been shown repeatedly to slow, reverse or even prevent the growth of \n          tumors in both animal and human clinical trials. Mushroom extracts prevent \n          tumor growth by increasing immune cell activity, rather than by killing \n          cancer cells directly.<span class=\"bodyref\">23</span> \n    <p><span class=\"bodyscientificname\">Maitake mushroom </span>has been shown to increase \n          the activity of macrophages, natural killer cells and T-cells, as well \n          as enhance production of interleukin-1, which activates T-cells. Animal \n          studies show that maitake mushroom inhibits the growth of tumors, as \n          well as stimulates the immune system in cancerous mice. Human research \n          conducted in China showed that maitake mushroom extract provided an \n          \"anticancer&rdquo; effect in patients with liver, lung and stomach \n          cancers and leukemia. A Japanese study demonstrated the antitumor activity \n          of beta glucans from various mushrooms, with maitake being among the \n          most effective. In particular, maitake mushroom has been shown to be \n          effective in preventing breast cancer in mice, with evidence suggesting \n          that it is also effective against tumors in humans. In addition, a recent \n          laboratory study confirmed that a beta glucan extract of maitake mushroom \n          showed promising results against human prostate cancer cells. Furthermore, \n          researchers have also identified hepatoprotective (liver-protecting), \n          hypoglycemic (blood sugar-lowering), and hypotensive (blood pressure-lowering) \n          effects from maitake mushroom.<span class=\"bodyref\">23-29</span> \n    <p><span class=\"bodyscientificname\">Reishi mushroom </span>has been used in China \n          and Japan for 4,000 years to treat arthritis, hypertension (high blood \n          pressure), liver problems and other ailments. Recent studies have found \n          that reishi mushroom demonstrates antiallergic, anti-inflammatory, antibacterial \n          and antioxidant effects. Reishi mushroom also possesses powerful anti-tumor, \n          immune-enhancing, antiviral and cholesterol-reducing properties. Reishi \n          mushroom has been shown to augment the activity of T-lymphocytes and \n          increase levels of interleukin, as well as significantly inhibit the \n          growth of leukemia cells. Incidentally, reishi mushroom is officially \n          listed as an adjunct herb for cancer by the Japanese government.<span class=\"bodyref\">25,26,30</span></div>\n<div class=\"ha_print_mark\">This information is provided by OnlyTheBestHerbs.com</div>\n<div class=\"ha_references\"><div class=\"reftitle\">References:</div> \n        <p class=\"ref\"><span class=\"refnum\">1</span>Gregory, \n          C. \"Study could put echinacea back on cold-and-flu-season shopping \n          list.&rdquo; <span class=\"refsource\">Natural Foods Merchandiser</span>; October, 1999.</p><p class=\"ref\">\n          <span class=\"refnum\">2</span>Luettig, B., et. al. \"Macrophage \n          activation by the polysaccharide arabinogalactan isolated from plant \n          cell cultures of <span class=\"refsource\">Echinacea purpurea</span>.&rdquo; \n          <span class=\"refsource\">Journal of the National Cancer Institute</span>; 1989, 81(9): 669-675.</p><p class=\"ref\">\n          <span class=\"refnum\">3</span>\"Larch: The New Echinacea?&rdquo; \n          <span class=\"refsource\">Nutrition Science News</span>; September, 1999.</p><p class=\"ref\">\n          <span class=\"refnum\">4</span>Orey, C. \"Immunity Nutrition.&rdquo; \n          <span class=\"refsource\">Energy Times</span>; 2000, 10(9): 25-29.</p><p class=\"ref\">\n          <span class=\"refnum\">5</span>Aviv, S. \"Beta glucan for immunity.&rdquo; \n          <span class=\"refsource\">Natural Health</span>; 2000, 30(9): 38.</p><p class=\"ref\">\n          <span class=\"refnum\">6</span>Mindell PhD, E. <span class=\"refsource\">Earl Mindell\'s \n          Supplement Bible</span>. NY, NY: Fireside, 1998.</p><p class=\"ref\">\n          <span class=\"refnum\">7</span>Rona MD, Z. \"Bovine colostrum \n          emerges as immune system modulator.&rdquo; <span class=\"refsource\">American Journal of Natural \n          Medicine</span>; 1998, 5(2): 19-23.</p><p class=\"ref\">\n          <span class=\"refnum\">8</span>&mdash;. \"Bovine colostrum, \n          immunity and the aging process.&rdquo; <span class=\"refsource\">Nature\'s Impact</span>; \n          August/September 1998.</p><p class=\"ref\">\n          <span class=\"refnum\">9</span>Ley, B. <span class=\"refsource\">Colostrum: Nature\'s \n          Gift to the Immune System</span>. Aliso Viejo, CA: BL Publications, 1997.</p><p class=\"ref\">\n          <span class=\"refnum\">10</span>Jensen PhD, B. <span class=\"refsource\">Colostrum: Life\'s \n          First Food</span>. Escondido, CA: Bernard Jensen, 1993.</p><p class=\"ref\">\n          <span class=\"refnum\">11</span>Burke PhD, E. \"Colostrum As \n          An Athletic Enhancer And Help For AIDS.&rdquo; <span class=\"refsource\">Nutrition Science \n          News</span>; May 1996: 1-5.</p><p class=\"ref\">\n          <span class=\"refnum\">12</span>Tokuyama, H. and Tokuyama, Y. \"Bovine \n          colostric transforming growth factor-beta-like peptide that induce growth \n          inhibition and changes in morphology of human osteogenic sarcoma cells \n          (MG-63). <span class=\"refsource\">Cell Biol Int Rep</span>; 1989, 13(3): 251-258.</p><p class=\"ref\">\n          <span class=\"refnum\">13</span>Hobbs, LAc, C. Medicinal Mushrooms, \n          3rd Ed. Loveland, CO: Botanica Press, Inc., 1996.</p><p class=\"ref\">\n          <span class=\"refnum\">14</span>Stamets, P. Mycomedicinals. Olympia, \n          WA: MycoMedia, 1998.</p><p class=\"ref\">\n          <span class=\"refnum\">15</span>Yamaguchi, N., et. al. \"Augmentation \n          of various immune reactivities of tumor-bearing hosts with an extract \n          of <span class=\"refsource\">Cordyceps sinensis</span>.&rdquo; <span class=\"refsource\">Biotherapy</span>; \n          1990, 2(3): 199-205.</p><p class=\"ref\">\n          <span class=\"refnum\">16</span>Yoshida, J., et. al. \"Antitumor \n          activity of an extract of <span class=\"refsource\">Cordyceps sinensis (Berk.) Sacc.</span>against \n          murine tumor cell lines.&rdquo; <span class=\"refsource\">Japanese Journal of Experimental \n          Medicine</span>; 1989, 59(4): 157-161.</p><p class=\"ref\">\n          <span class=\"refnum\">17</span>Kuo, Y.C., et. al. \"Growth \n          inhibitors against tumor cells in <span class=\"refsource\">Cordyceps sinensis</span>other \n          than cordycepin and polysaccharides.&rdquo; <span class=\"refsource\">Cancer \n          Investigation</span>; 1994, 12(6): 611-615. </p><p class=\"ref\">\n          <span class=\"refnum\">18</span>&mdash;. \"<span class=\"refsource\">Cordyceps \n          sinensis</span>as an immunomodulatory agent.&rdquo; <span class=\"refsource\">American Journal \n          of Chinese Medicine</span>; 1996, 24(2): 111-125.</p><p class=\"ref\">\n          <span class=\"refnum\">19</span>Chen, Y.J., et. al. \"Effect \n          of <span class=\"refsource\">Cordyceps sinensis</span>on the proliferation \n          and differentiation of human leukemic U937 cells.&rdquo; <span class=\"refsource\">Life \n          Sciences</span>; 1997, 60(25): 2349-2359.</p><p class=\"ref\">\n          <span class=\"refnum\">20</span>Xu, R.H., et. al. \"Effects \n          of <span class=\"refsource\">Cordyceps sinensis</span>on natural killer activity \n          and colony formation of B16 melanoma.&rdquo; <span class=\"refsource\">Chinese Medical Journal</span>; \n          1992, 105(2): 97-101.</p><p class=\"ref\">\n          <span class=\"refnum\">21</span>Liu, C., et. al. \"Effects of \n          <span class=\"refsource\">Cordyceps sinensis</span>(CS) on in vitro natural \n          killer cells.&rdquo; <span class=\"refsource\">Chung Kuo Chung Hsi I Chieh Ho Tsa Chih</span>; \n          1992, 12(5): 267-269.</p><p class=\"ref\">\n          <span class=\"refnum\">22</span>Zhou, D.H. and Lin, L.Z. \"Effect \n          of Jinshuibao capsule on the immunological function of 36 patients with \n          advanced cancer.&rdquo; <span class=\"refsource\">Chung Kuo Chung Hsi I Chieh Ho Tsa Chih</span>; \n          1995, 15(8): 476-478.</p><p class=\"ref\">\n          <span class=\"refnum\">23</span>Broadhurst PhD, C. &amp; Duke PhD, \n          J. \"Inside Plants.&rdquo; <span class=\"refsource\">Herbs For Health</span>; 1999, 3(6): \n          24.</p><p class=\"ref\">\n          <span class=\"refnum\">24</span>Lieberman PhD, L. &amp; Babal CN, \n          K. <span class=\"refsource\">Maitake: King of Mushrooms</span>. New Canaan, CT: Keats, 1997.</p><p class=\"ref\">\n          <span class=\"refnum\">25</span>Hobbs, LAc, C. <span class=\"refsource\">Medicinal \n          Mushrooms</span>. Loveland, CO: Interweave Press Inc., 1995.</p><p class=\"ref\">\n          <span class=\"refnum\">26</span>&mdash;. \"Medicinal mushrooms.&rdquo; \n          <span class=\"refsource\">Herbs For Health</span>; 1997, 1(4): 53-53.</p><p class=\"ref\">\n          <span class=\"refnum\">27</span>Nanba, H., et. al. \"The chemical \n          structure of an antitumor polysaccharide in fruit bodies of Grifola \n          frondosa (Maitake).&rdquo; <span class=\"refsource\">Chemical and Pharmacological Bulletin</span>; \n          1987, 35.</p><p class=\"ref\">\n          <span class=\"refnum\">28</span>Fremerman, S. \"13 Ways to Prevent \n          Breast Cancer.&rdquo; <span class=\"refsource\">Natural Health</span>; January-February, \n          1999.</p><p class=\"ref\">\n          <span class=\"refnum\">29</span>\"Maitake Extract Shows Promise \n          Against Prostate Cancer.&rdquo; <span class=\"refsource\">Alternative &amp; Complementary Therapies</span>; \n          August, 2000. \n      <span class=\"refnum\">30</span>Schofield, L. \"Mycoceuticals: The \n      New Mushroom Revolution.&rdquo; <span class=\"refsource\">Vitamin Retailer</span>; \n      February, 2000.\n</p></div>\n</div><div class=\"ha_copyright\">Copyright 1997-2012 &nbsp;&nbsp;Herb Allure, Inc.</div>\n';
	} //}}}

	function hv_boot_selection() { //{{{
		// Protect against double-boot
		if (booted.selection === true) { return; }
		booted.selection = true;

		if (booted.set_div !== true) { hv_boot_set_div(); }

		// Give browser time to render before trying to find the text inside hart_div.
		setTimeout(hv_sel_setup, 33);
	} //}}}

	function hv_boot_watermark() { //{{{
		// Protect against double-boot
		if (booted.watermark === true) { return; }
		booted.watermark = true;

		var text = '';
		var i, count=50, wm=['<p>'];

		for (i = 0; i < count; ++i) {
			wm.push(text);
		}
		wm.push('</p>');

		var ha_content_div = hv_find_by_class(hart_div, 'div', 'ha_content');

		var wm_div = document.createElement('div');
		wm_div.className = 'ha_h2o';

		wm_div.innerHTML = wm.join("\n</p><p>");

		ha_content_div.appendChild(wm_div);
	} //}}}

	function hv_boot_display() { //{{{
		if (booted.display === true) { return; }
		booted.display = true;

		hart_div.style.display = '';
	} //}}}

	// Run setup code appropriate to the template.
	hv_boot_embed();
hv_boot_watermark();
hv_boot_selection();
	//}}}
})();


