﻿
var MyEmail = "moc.cihtaporutanaiag@ailuj";

heb = 0;
var Clinica = "קליניקה";
if (document.title.indexOf(Clinica) != -1)  
	heb = 1;

var PagesInLanguages = [
	[ "index.html", "hebrew.html" ],
	[ "about.html", "hebabout.html" ],
	[ "patients.html", "hebpatients.html" ],
	[ "patients_fees.html", "hebpatients_fees.html" ],
	[ "services.html", "hebservices.html" ],
	[ "services_lab.html", "hebservices_lab.html" ],
	[ "services_dispensary.html", "hebservices_dispensary.html" ],
	[ "services_treatments.html", "hebservices_treatments.html" ],
	[ "services_treatments_botmed.html", "hebservices_treatments_botmed.html" ],
	[ "services_treatments_tcm.html", "hebservices_treatments_tcm.html" ],
	[ "contact.html", "hebcontact.html" ],
	[ "naturopathic.html", "hebnaturopathic.html" ],
	[ "naturopathic_what_is_it.html", "hebnaturopathic_what_is_it.html" ],
	[ "naturopathic_principles.html", "hebnaturopathic_principles.html" ],
	[ "naturopathic_training.html", "hebnaturopathic_training.html" ],
	[ "naturopathic_regulation.html", "hebnaturopathic_regulation.html" ],
	[ "naturopathic_conditions.html", "hebnaturopathic_conditions.html" ],
	[ "resources.html", "hebresources.html" ],
	[ "resources_forms.html", "hebresources_forms.html" ],
	[ "resources_recipes.html", "hebresources_recipes.html" ],	
	[ "services_treatments_cosmetic.html", "hebservices_treatments_cosmetic.html" ],
	[ "resources_links.html", "hebresources_links.html" ],
	[ "services_treatments_homeo.html", "hebservices_treatments_homeo.html" ],
	[ "services_treatments_nutrition.html", "hebservices_treatments_nutrition.html" ],
	[ "services_treatments_physmed.html", "hebservices_treatments_physmed.html" ],
	[ "services_treatments_counseling.html", "hebservices_treatments_counseling.html" ],
	[ "services_packages.html", "hebservices_packages.html" ],
	[ "services_packages_pregnancy.html", "hebservices_packages_pregnancy.html" ],
	[ "services_packages_stop_smoking.html", "hebservices_packages_stop_smoking.html" ],
	[ "search.html", "hebsearch.html" ]
];

if (document.images)
{
  picLeft = new Image(8,23); 
  picLeft.src="images/left.jpg";
  picLeft2 = new Image(8,23); 
  picLeft2.src="images/left2.jpg";
  picRight = new Image(8,23); 
  picRight.src="images/right.jpg";
  picRight2 = new Image(8,23); 
  picRight2.src="images/right2.jpg";
  picUn = new Image(8,23); 
  picUn.src="images/un.gif";
}

var MenuLinks = new Array(
	new Array(heb ? "דף בית" : "home",					heb ? "hebrew" : "index"),
	new Array(heb ? "שירותי מרפאה" : "services",		heb ? "hebservices" : "services"),
	new Array(heb ? "נטורופתיה" : "naturopathic",		heb ? "hebnaturopathic" : "naturopathic"),
	new Array(heb ? "אודות" : "about",		            heb ? "hebabout" : "about"),
	new Array(heb ? "לקוחות חדשים" : "new patients",	heb ? "hebpatients" : "patients"),
	new Array(heb ? "משאבים" : "resources",				heb ? "hebresources" : "resources"),
	new Array(heb ? "צור קשר" : "contact",				heb ? "hebcontact" : "contact")
);

var NaturopathicPageSubMenu = new Array(
	new Array("naturopathic overview", "naturopathic.html"),
	new Array("what is it?", "naturopathic_what_is_it.html"),
	new Array("naturopathic principles", "naturopathic_principles.html"),
	new Array("training", "naturopathic_training.html"),
	new Array("regulation", "naturopathic_regulation.html"),
	new Array("conditions treated", "naturopathic_conditions.html")
);

var HebNaturopathicPageSubMenu = new Array(
	new Array("סקירת הנטורופתיה", "hebnaturopathic.html"),
	new Array("מה זו רפואה נטורופתית?", "hebnaturopathic_what_is_it.html"),
	new Array("עקרונות הנטורופתיה", "hebnaturopathic_principles.html"),
	new Array("הכשרה", "hebnaturopathic_training.html"),
	new Array("הסמכה", "hebnaturopathic_regulation.html"),
	new Array("במה מטפלים", "hebnaturopathic_conditions.html")
);

var ServicesPageSubMenu = new Array(
	new Array("services overview", "services.html"),
	new Array("treatments", "services_treatments.html"),
	new Array(" botanical medicine", "services_treatments_botmed.html"),
	new Array(" acupuncture & TCM", "services_treatments_tcm.html"),
	new Array(" homeopathic medicine", "services_treatments_homeo.html"),
	new Array(" clinical nutrition", "services_treatments_nutrition.html"),
	new Array(" physical medicine", "services_treatments_physmed.html"),
	new Array(" lifestyle counseling", "services_treatments_counseling.html"),
	new Array(" facial rejuvenation", "services_treatments_cosmetic.html"),
	new Array("packages & programs", "services_packages.html"),
	new Array(" pregnancy wellness", "services_packages_pregnancy.html"),
	new Array(" stop smoking", "services_packages_stop_smoking.html"),
	new Array(" seasonal detox", "services_packages_detox.html"),
	new Array("lab testing", "services_lab.html"),
	new Array("dispensary", "services_dispensary.html")
);

var HebServicesPageSubMenu = new Array(
	new Array("סקירת השרותים", "hebservices.html"),
	new Array("טיפולים", "hebservices_treatments.html"),
	new Array(" צמחי מרפא", "hebservices_treatments_botmed.html"),
	new Array(" דיקור ורפואה סינית", "hebservices_treatments_tcm.html"),
	new Array(" רפואה הומאופתית", "hebservices_treatments_homeo.html"),
	new Array(" תזונה קלינית", "hebservices_treatments_nutrition.html"),
	new Array(" רפואה פיסית", "hebservices_treatments_physmed.html"),
	new Array(" יעוץ לאורח חיים", "hebservices_treatments_counseling.html"),
	new Array(" דיקור קוסמטי למתיחת פנים", "hebservices_treatments_cosmetic.html"),
	new Array("חבילות ותכניות", "hebservices_packages.html"),
	new Array(" בריאות הריון", "hebservices_packages_pregnancy.html"),
	new Array(" הפסקת עישון", "hebservices_packages_stop_smoking.html"),
	new Array(" דה-טוקס עונתיות", "services_packages_detox.html"),
	new Array("בדיקות מעבדה", "hebservices_lab.html"),
	new Array("תרופות במרפאה", "hebservices_dispensary.html")
);

var ResourcesPageSubMenu = new Array(
	new Array("resources overview", "resources.html"),
	new Array("forms", "resources_forms.html"),
	new Array("handouts / articles", "resources_handouts.html"),
	new Array("testimonials", "resources_testimonials.html"),
	new Array("recipes", "resources_recipes.html"),
	new Array("links", "resources_links.html"),
	new Array("reading", "resources_reading.html"),
	new Array("newsletter archives", "resources_newsletter_archives.html"),
	new Array("news", "resources_news.html")
);

var HebResourcesPageSubMenu = new Array(
	new Array("סקירת משאבים", "hebresources.html"),
	new Array("טפסים", "hebresources_forms.html"),
	new Array("מסמכים", "resources_handouts.html"),
	new Array("מכתבי המלצה", "resources_testimonials.html"),
	new Array("מתכונים", "hebresources_recipes.html"),
	new Array("קישורים", "hebresources_links.html"),
	new Array("קריאה", "resources_reading.html"),
	new Array("חדשות", "resources_news.html")
);

var PatientsPageSubMenu = new Array(
	new Array("new patients overview", "patients.html"),
	new Array("forms", "resources_forms.html##patients"),
	new Array("fee schedule", "patients_fees.html"),
	new Array("contact", "contact.html##patients")
);

var HebPatientsPageSubMenu = new Array(
	new Array("סקירה ללקוחות חדשים", "hebpatients.html"),
	new Array("טפסים", "hebresources_forms.html##hebpatients"),
	new Array("מחירים", "hebpatients_fees.html"),
	new Array("צור קשר", "hebcontact.html##hebpatients")
);

var ContactPageSubMenu = new Array(
	new Array("address", "#address"),
	new Array("directions", "#directions"),
	new Array("map", "#map")
);

var HebContactPageSubMenu = new Array(
	new Array("כתובת", "#address"),
	new Array("הוראות הגעה", "#directions"),
	new Array("מפה", "#map")
);

var PageSubMenus = new Array();
PageSubMenus["naturopathic"] = NaturopathicPageSubMenu;
PageSubMenus["hebnaturopathic"] = HebNaturopathicPageSubMenu;
PageSubMenus["services"] = ServicesPageSubMenu;
PageSubMenus["hebservices"] = HebServicesPageSubMenu;
PageSubMenus["resources"] = ResourcesPageSubMenu;
PageSubMenus["hebresources"] = HebResourcesPageSubMenu;
PageSubMenus["patients"] = PatientsPageSubMenu;
PageSubMenus["hebpatients"] = HebPatientsPageSubMenu;
PageSubMenus["contact"] = ContactPageSubMenu;
PageSubMenus["hebcontact"] = HebContactPageSubMenu;

var PageSubMenuImage = "";
var PageSubMenuCaption = "";
var PageSubMenuBottomCaption = "";
var IsHomePage = false;

function ClickMainMenu(link)
{
	location = link + ".html";
}

function MouseOverMainMenu(obj, i)
{
	obj.className = 'main-menu-hover-area';
	document.images["left" + i].src = heb ? 'images/right2.jpg' : 'images/left2.jpg';
	document.images["right" + i].src = heb ? 'images/left2.jpg' : 'images/right2.jpg';
}

function MouseOutMainMenu(obj, i, sel)
{
	if (sel)
	{
		obj.className = 'main-menu-selected-area';
		document.images["left" + i].src = heb ? 'images/right.jpg' : 'images/left.jpg';
		document.images["right" + i].src = heb ? 'images/left.jpg' : 'images/right.jpg';
	}
	else
	{
		obj.className = 'main-menu-area';
		document.images["left" + i].src = 'images/un.gif';
		document.images["right" + i].src = 'images/un.gif';
	}
}

function DrawMainMenu()
{
	var current_page = location.href;
	var pos = current_page.lastIndexOf("/");
	current_page = current_page.substr(pos+1);
	pos = current_page.lastIndexOf(".");
	pos2 = current_page.lastIndexOf("##");
	if (pos2 != -1 && pos2 > pos)
		current_page = current_page.substr(pos2+2);
	else
		current_page = current_page.substr(0, pos);

	var width = 100.0 / (MenuLinks.length);
	var sel = -1;

	document.write('<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>');
	for (var i = 0; i < MenuLinks.length; i++)
	{
		document.write('<td width="10">&nbsp;</td>');
		document.write('<td width="10"><img id="left' + i + '" src="images/un.gif"></td>');
		var page_link = MenuLinks[i][1];
		var page_name = MenuLinks[i][0];
		var className = "main-menu-area";
		if ((current_page == "" && i == 0) || 
			(current_page.substr(0, page_link.length) == page_link))
		{
			sel = i;
			className = "main-menu-selected-area";
		}
		document.write(
			'<td valign="middle" width="' + width + '%" class="' + className + '" ' +
				'onclick="ClickMainMenu(\'' + page_link + '\')" ' +
				'onmouseover="MouseOverMainMenu(this,' + i + ')" ' + 
				'onmouseout="MouseOutMainMenu(this,' + i + ',' + (sel == i) + ')">' + 
	  			page_name +
	  		'</td>');
  	
		document.write('<td width="10"><img id="right' + i + '" src="images/un.gif"></td>');
		
	}
	document.write('<td width="10">&nbsp;</td>');
	document.write('</tr></table>');
	if (sel != -1)
	{
		document.images["left" + sel].src = heb ? 'images/right.jpg' : 'images/left.jpg';
		document.images["right" + sel].src = heb ? 'images/left.jpg' : 'images/right.jpg';
	}
	document.write(
		'<map name="banner">' +
		'<area shape="rect" coords="666,14,735,36" href="javascript:ChangeLanguage()">' +
		'</map>');

}

function DrawSubMenu()
{
	var current_page = location.href;
	var pos = current_page.lastIndexOf("/");
	current_page = current_page.substr(pos+1);
	pos = current_page.lastIndexOf("##");
	if (pos != -1)
		current_page = current_page.substr(pos+2)
	else
	{
		pos = current_page.indexOf("_");
		if (pos == -1)
			pos = current_page.lastIndexOf(".");
		current_page = current_page.substr(0, pos);
	}

	var PageSubMenu = PageSubMenus[current_page];

	if (PageSubMenuImage || PageSubMenuCaption || PageSubMenu || PageSubMenuBottomCaption)
	{
	    var countMenuItems = 0;
	    document.write('<div>');
    	
	    if (PageSubMenuImage)
		    document.write('<img src="' + PageSubMenuImage + '" border="0"><br>');

	    if (PageSubMenuCaption)
		    document.write('<div class="caption">' + PageSubMenuCaption + '</div>');

	    if (PageSubMenu)
	    {
		    var current_page = location.href;
		    var pos = current_page.lastIndexOf("/");
		    current_page = current_page.substr(pos+1);
		    var current_page_no_suffix = current_page;
		    pos = current_page.lastIndexOf(".");
		    if (pos != -1)
			    current_page_no_suffix = current_page.substr(0, pos);
    	
		    var sel = 0;
		    for (var i = 0; i < PageSubMenu.length; i++)
		    {
			    var page_link = PageSubMenu[i][1];
			    if (current_page == page_link) {
				    sel = i;
				    break;
			    }
			    else if (i > 0)
			    {
				    var page_link_no_suffix = page_link;
				    pos = page_link.lastIndexOf(".");
				    if (pos != -1)
				    {
					    page_link_no_suffix = page_link.substr(0, pos);
					    if (current_page_no_suffix.substr(0, page_link_no_suffix.length) == page_link_no_suffix)
						    sel = i;
				    }
			    }
		    }
    				
		    for (var i = 0; i < PageSubMenu.length; i++)
		    {
			    var page_link = PageSubMenu[i][1];
			    var page_name = PageSubMenu[i][0];
			    var class_name = "menu";
			    var area_class_name = "menu-area";
			    if (i == sel)
				    area_class_name = "menu-area-selected";
			    if (page_name.substr(0,1) == " ")
			    {
				    if (i == sel)
					    class_name = "menu-sub-selected";
				    else
					    class_name = "menu-sub";
				    page_name = page_name.substr(1);
			    }
			    else if (i == sel)
				    class_name = "menu-selected";
    			
			    document.write('<div class="' + area_class_name + '">');
		  	    document.write('<a class="' + class_name + '" href="' + page_link + '">' + page_name + '</a>');
		  	    document.write('</div>');
		  	    countMenuItems++;
		    }
	    }
	    if (PageSubMenuBottomCaption)
		    document.write('<div class="bottom-caption">' + PageSubMenuBottomCaption + '</div>');

	    document.write('</div>');
	    
	    if (!PageSubMenuImage && countMenuItems < 10)
	    {
	        var h = 20*(10-countMenuItems);
    	    document.write('<div style="height:' + h + 'px"></div>');
	    }    
	}
}

function DrawWelcome()
{
    if (heb)
    {
        document.write('<img src="images/shalom.gif"><br>\
            <div class="welcome"><i>\
            &nbsp;&nbsp;&nbsp;אני <a href="about.html"><b><i>ד\"ר ג\'וליה גונן</i></b></a>, הרופאה הנטורופטית שלך בישראל. בואו אלי לכל צרכי הבריאות שלכם.<p>\
            &nbsp;&nbsp;&nbsp;אני מצפה לראותכם ולעבור איתכם במסע לבריאותכם!<p> \
            כל טוב,\
            </i><br><img src="images/hebjuliasig.gif"></div>');
    }
    else
    {
        document.write('<img src="images/welcome.gif"><br>\
            <div class="welcome"><i>\
            &nbsp;&nbsp;&nbsp;I\'m <a href="about.html"><b><i>Dr. Julia Gonen</i></b></a>, your Naturopathic Doctor in Israel. Come see me for all your health needs.<p>\
            &nbsp;&nbsp;&nbsp;I look forward to our meeting and to working with you on your journey to wellness!<p> \
            In health,\
            </i><br><img src="images/sig.png"></div>');
    }
    
}

function DrawContact()
{
return;
	document.write(
		'<div class="address-menu">' +
		'<div class="address">');
		
	if (heb)
	{
		document.write(
			'ד"ר ג\'וליה גונן, .N.D<br>' +
			'רופאה נטורופתית<br>' +
			'רחוב התאנה 7<br>' +
			'בני עטרות, 60991<br>');
	}
	else
	{
		document.write(
			'Dr. Julia Gonen, N.D.<br>' +
			'Doctor of Naturopathic Medicine<br>' +
			'7 Hate\'ena Street<br>' +
			'Bnei Atarot 60991, Israel<br>');
	}
	document.write(
		//'<div style="padding-top:10px">050.933.6004</div>' +
		'</div>');
		
	if (heb)
	{
//		document.write('<a href="hebpatients.html"><b>לקביעת תור »</b></a>');
		document.write('<div class="book" onmouseover="this.className=\'book-hover\'" onmouseout="this.className=\'book\'" onclick="location=\'hebpatients.html\'">\
		                <a class="book-link" href="hebpatients.html">לקביעת תור</a>\
		                </div>');
    }
	else
	{
//		document.write('<a href="patients.html"><b>book an appointment »</b></a>');
		document.write('<div class="book" onmouseover="this.className=\'book-hover\'" onmouseout="this.className=\'book\'" onclick="location=\'patients.html\'">\
		                <a class="book-link" href="patients.html">book an appointment</a>\
		                </div>');
    }
		
	document.write('</div>');
	
}

function DrawTestimonialsButton()
{
    if (heb)
    {
        document.write('<div class="address-menu">');
        document.write('<div class="testimonials-button" onmouseover="this.className=\'testimonials-button-over\'" onmouseout="this.className=\'testimonials-button\'" onclick="location=\'resources_testimonials.html\'">מכתבי המלצה</div>');
        document.write('</div>');
    }
    else
    {
        document.write('<div class="address-menu">');
        document.write('<div class="testimonials-button" onmouseover="this.className=\'testimonials-button-over\'" onmouseout="this.className=\'testimonials-button\'" onclick="location=\'resources_testimonials.html\'">testimonials</div>');
        document.write('</div>');
    }
}

function FocusNewsletterEmail()
{
    var box = document.forms.ccoptin.ea;
    if (box.className == "newsletter-box-disabled")
    {
        box.className = "newsletter-box";
        box.value = "";
    }
}

function BlurNewsletterEmail()
{
    var box = document.forms.ccoptin.ea;
    if (box.value == "")
    {
        box.className = "newsletter-box-disabled";
        box.value = heb ? 'כתובת אימייל' : "enter email";
    }
}

function DrawNewsletter(inverse)
{
    if (!inverse)
    	document.write('<div class="newsletter-menu">');
    	
	if (heb)
	{
	    if (inverse)
            document.write(
            '<form class="newsletter-inverse-heb" name="ccoptin" action="http://visitor.constantcontact.com/d.jsp" target="_blank" method="post">\
            <table cellpadding="0" cellspacing="0"><tr><td nowrap><div class="newsletter-text-inverse">הרשמו לניוזלטר<br>שלי</div></td><td>\
            <span class="newsletter-image-inverse-heb">\
            <img src="http://img.constantcontact.com/ui/images1/visitor/email2_trans.gif" alt="Email Newsletter" border="0"></span></td></tr></table>\
            <table cellpadding=0 cellspacing=0><tr><td>\
            <input type="text" name="ea" size="11" class="newsletter-box-disabled" value="כתובת אימייל" onfocus="FocusNewsletterEmail()" onblur="BlurNewsletterEmail()">\
            </td><td style="padding-right:4px"><img src="images/go.png" onclick="forms.ccoptin.submit()" style="cursor:pointer"></td></tr></table>\
            <input type="hidden" name="m" value="1102424209563">\
            <input type="hidden" name="p" value="oi">\
            </form>');
        else
            document.write(
            '<form class="newsletter" name="ccoptin" action="http://visitor.constantcontact.com/d.jsp" target="_blank" method="post">\
            <table cellpadding="0" cellspacing="0"><tr><td nowrap><div class="newsletter-text">הרשמו לניוזלטר שלי</div></td><td>\
            <span class="newsletter-image">\
            <img src="http://img.constantcontact.com/ui/images1/visitor/email2_trans.gif" alt="Email Newsletter" border="0"></span></td></tr></table>\
            <table cellpadding=0 cellspacing=0><tr><td>\
            <input type="text" name="ea" size="14" class="newsletter-box-disabled" value="כתובת אימייל" onfocus="FocusNewsletterEmail()" onblur="BlurNewsletterEmail()">\
            </td><td style="padding-right:4px"><img src="images/go.png" onclick="forms.ccoptin.submit()" style="cursor:pointer"></td></tr></table>\
            <input type="hidden" name="m" value="1102424209563">\
            <input type="hidden" name="p" value="oi">\
            </form>');
/*
        document.write(
        '<form name="ccoptin" action="http://visitor.constantcontact.com/d.jsp" target="_blank" method="post" style="margin-bottom:3;">\
        <table cellpadding="0" cellspacing="0"><tr><td nowrap><div class="newsletter-text">הרשמו לניוזלטר שלי</div></td><td>\
        <span class="newsletter-image" style="margin-top:0">\
        <img src="http://img.constantcontact.com/ui/images1/visitor/email2_trans.gif" alt="Email Newsletter icon, E-mail Newsletter icon, Email List icon, E-mail List icon" border="0"></span></td></tr></table>\
        <input type="text" name="ea" size="14" class="newsletter-box-disabled" value="כתובת אימייל" onfocus="FocusNewsletterEmail()" onblur="BlurNewsletterEmail()">\
        <input type="submit" name="go" value="GO" class="submit" style="font-weight:bold;color:white;background-color:#51B2C9;padding-left:1px;padding-right:1px;cursor:pointer">\
        <input type="hidden" name="m" value="1102424209563">\
        <input type="hidden" name="p" value="oi">\
        </form>');
*/
        // END: Constant Contact Stylish Email Newsletter Form 
        // BEGIN: SafeSubscribe 
//        document.write(
//        '<div align="center" class="newsletter-safe">\
//        <a href="http://www.constantcontact.com/safesubscribe.jsp" target="_blank">\
//        <img src="http://img.constantcontact.com/ui/images1/safe_subscribe_logo.gif" border="0" width="168" height="14" alt=""/>\
//        </a>\
//        </div>');
        // END: SafeSubscribe

        <!-- BEGIN: Email Marketing you can trust -->
//        document.write(
//        '<div align="center" class="newsletter-trust">\
//        For <a href="http://www.constantcontact.com/index.jsp" class="newsletter-trust" target="_blank">Email Marketing</a> you can trust\
//        </div>');
	}
	else
	{
	    if (inverse)
            document.write(
            '<form class="newsletter-inverse" name="ccoptin" action="http://visitor.constantcontact.com/d.jsp" target="_blank" method="post">\
            <span class="newsletter-image-inverse">\
            <img src="http://img.constantcontact.com/ui/images1/visitor/email2_trans.gif" alt="Email Newsletter" border="0"></span>\
            <div class="newsletter-text-inverse">newsletter<br>sign up</div>\
            <table cellpadding=0 cellspacing=0><tr><td>\
            <input type="text" name="ea" size="11" class="newsletter-box-disabled" value="enter email" onfocus="FocusNewsletterEmail()" onblur="BlurNewsletterEmail()">\
            </td><td style="padding-left:4px"><img src="images/go.png" onclick="forms.ccoptin.submit()" style="cursor:pointer"></td></tr></table>\
            <input type="hidden" name="m" value="1102424209563">\
            <input type="hidden" name="p" value="oi">\
            </form>');
        else
            document.write(
            '<form class="newsletter" name="ccoptin" action="http://visitor.constantcontact.com/d.jsp" target="_blank" method="post">\
            <span class="newsletter-image">\
            <img src="http://img.constantcontact.com/ui/images1/visitor/email2_trans.gif" alt="Email Newsletter" border="0"></span>\
            <div class="newsletter-text">sign up for my newsletter</div>\
            <table cellpadding=0 cellspacing=0><tr><td>\
            <input type="text" name="ea" size="14" class="newsletter-box-disabled" value="enter email" onfocus="FocusNewsletterEmail()" onblur="BlurNewsletterEmail()">\
            </td><td style="padding-left:4px"><img src="images/go.png" onclick="forms.ccoptin.submit()" style="cursor:pointer"></td></tr></table>\
            <input type="hidden" name="m" value="1102424209563">\
            <input type="hidden" name="p" value="oi">\
            </form>');

//        <input type="submit" name="go" value="GO" class="submit" style="font-weight:bold;color:white;background-color:#51B2C9;padding-left:1px;padding-right:1px;cursor:pointer">\

        // END: Constant Contact Stylish Email Newsletter Form 
        // BEGIN: SafeSubscribe 
//        document.write(
//        '<div align="center" class="newsletter-safe">\
//        <a href="http://www.constantcontact.com/safesubscribe.jsp" target="_blank">\
//        <img src="http://img.constantcontact.com/ui/images1/safe_subscribe_logo.gif" border="0" width="168" height="14" alt=""/>\
//        </a>\
//        </div>');
        // END: SafeSubscribe

        <!-- BEGIN: Email Marketing you can trust -->
//        document.write(
//        '<div align="center" class="newsletter-trust">\
//        For <a href="http://www.constantcontact.com/index.jsp" class="newsletter-trust" target="_blank">Email Marketing</a> you can trust\
//        </div>');
    }	
    if (!inverse)
    	document.write('</div>');
}

function BeginPage(name, link, noSubMenu)
{
	document.write(
	'<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">' +
		'<tr><td height="5"></td></tr>' +
		'<tr>' +
			'<td>' +
				'<table width="750" border="0" cellspacing="0" cellpadding="0">' +
					'<tr><td><img src="images/gaiabanner' + (heb ? 'heb' : '') + '.gif" width="100%" height="114" usemap="#banner" border="0"></td></tr>' +
					'<tr><td class="top-menu">');
					DrawMainMenu();
		document.write('</td></tr>' +
					'<tr>' +
						'<td class="main">' +
		  					'<table border="0" cellspacing="0" cellpadding="0">' +
		  						'<tr>');
		  						
                if (!noSubMenu)
                {
                    document.write('<td width="170" valign="top">');
					DrawSubMenu();
					if (IsHomePage)
					{
					    document.write('<div class="sidebar">');
					    DrawWelcome();
                        DrawTestimonialsButton();
					    DrawContact();
					    document.write('</div>');
					}
					else
					{
					    DrawContact();
					    DrawNewsletter();
                        DrawTestimonialsButton();
					}
                    document.write('</td>');
                }
				document.write(
									'<td width="20">&nbsp;</td>' +
									'<td valign="top" width="520">' +
										'<table border="0" width="100%" cellspacing="0" cellpadding="0">' +
										'<tr>' +
											'<td valign="top">');
										if (name)
										{
										    document.write('<table border="0" width="100%" cellspacing="0" cellpadding="0"><tr><td valign="top">');
											if (link)
												document.write('<a href="' + link + '">');
  											document.write('<img border="0" src="images/' + name + '">');
											if (link)
												document.write('</a>');
												
										    document.write('</td><td valign="top" width="165">');
										    DrawSearch();
										    document.write('</td></tr></table>');
										}
}

function EndPage()
{
	document.write(
										'</table>' +
										'</tr>' +
									'</td>' +
								'</tr>' +
							'</table>' +
						'</td>' +
			        '</tr>' +
					'<tr><td>' +
						'<table border="0" width="100%" cellpadding="0" cellspacing="0"><tr>' +
							'<td class="bottom-corner"></td>' +
							'<td rowspan="2" class="bottom" width="100%">');
}

function EndPage2()
{
	document.write(
					'<div class="copyright">copyright &copy; 2008 Gaia Naturopathic Clinic &nbsp;&nbsp;&nbsp;All Rights Reserved</div></td>' + 
							'<td class="bottom-corner"></td></tr>' +
							'<tr><td valign="top"><img src="images/bottom-' + (heb ? 'right' : 'left') + '.gif"></td>' +
							'<td valign="top"><img src="images/bottom-' + (heb ? 'left' : 'right') + '.gif"></td></tr></table>' +
					'</td></tr>' +
				'</table>' +
			'</td>' +
		'</tr>' +
		'<tr><td height="5">&nbsp;</td></tr>' +
	'</table>');

}

function ChangeLanguage()
{
	var page = location.href;
	var pos = page.lastIndexOf("/");
	page = page.substr(pos+1);
	var pos2 = page.lastIndexOf("##");
	if (pos2 != -1)
		page = page.substr(0,pos2);

	var page_params = "";
	var pos3 = page.lastIndexOf("?");
	if (pos3 != -1)
	{
		page = page.substr(0,pos3);
		page_params = page.substr(pos3);
	}

	var new_page = "";
	if (heb)
	{
		new_page = "index.html";
		for (var i = 0; i < PagesInLanguages.length; i++)
		{
			if (PagesInLanguages[i][1] == page)
			{
				new_page = PagesInLanguages[i][0];
				break;
			}
		}
	}
	else
	{
		new_page = "hebrew.html";
		for (var i = 0; i < PagesInLanguages.length; i++)
		{
			if (PagesInLanguages[i][0] == page)
			{
				new_page = PagesInLanguages[i][1];
				break;
			}
		}
	}

	if (page_params)
		new_page += page_params;
	location.href = new_page;
}

function WriteEmail(message)
{
	var n = MyEmail.length;
	var r = "";
	for (var i = n-1; i >= 0; i--)
		r += MyEmail.charAt(i);
		
	if (!message)
		message = r;
	document.write('<a href="mailto:' + r + '">' + message + '</a>');
}

function DrawSearch()
{
    document.write(
        '<form action="' + (heb?'hebsearch.html':'search.html') + '" id="cse_search_box">\
          <div class="search-box">\
            <input type="hidden" name="cx" value="004793190710344848162:rk7sxuhpxuis" />\
            <input type="hidden" name="cof" value="FORID:9" />\
            <input type="hidden" name="ie" value="UTF-8" />\
            <input type="hidden" name="hl" value="'+(heb?'he':'en')+'" />\
            <table cellpadding="0" cellspacing="0">\
                <tr>\
                    <td><input type="text" name="q" size="14" /></td>\
                    <td style="padding-' + (heb ? 'right' : 'left') + ':3px">\
                        <img alt="' + (heb ? 'חיפוש' : 'Search') + '" src="images/searchleaf.png" onclick="forms.cse_search_box.submit()" style="cursor:pointer" />\
                    </td>\
                </tr>\
             </table>\
          </div>\
        </form>');
        
        
    var f = document.getElementById('cse_search_box'); 
    if (!f) { f = document.getElementById('searchbox_demo'); } 
    if (f && f.q) { 
        var q = f.q; var n = navigator; var l = location; 
        if (n.platform == 'Win32') { 
            q.style.cssText = 'border: 1px solid #7e9db9; padding: 2px;'; 
        } 
        var b = function() { 
            if (q.value == '') { 
                q.style.background = '#FFFFFF url(http:\x2F\x2Fwww.google.com\x2Fcoop\x2Fintl\x2F' + (heb?'he':'en') + '\x2Fimages\x2Fgoogle_custom_search_watermark.gif) left no-repeat'; 
            } 
        }; 
        var f = function() { 
            q.style.background = '#ffffff'; 
        }; 
        q.onfocus = f; q.onblur = b; 
        if (!/[&?]q=[^&]/.test(l.search)) { 
            b(); 
        } 
    }
}
