/* Radiantbeing.com : js.js */



/* next group flow date */

var GFdate = 'Wednesday, August 5, 7:00pm Pacific';



function gfdate() {

	var query = (location.href.indexOf("?")+1);

	if (query) {

		var thisDate = location.href.substring(query);



		/* this is just to fix the date in Firefox */

			var temp = new Array();

			temp = thisDate.split('%20');

			var howMany = temp.length;

			var splitDate = '';

			for (var i = 0; i <= (howMany-1); i++) {

				splitDate += temp[i];

				splitDate += ' ';

			}

			GFdate = splitDate;

		/* end Firefox fix */

	}

	document.write(GFdate);

}





function writeDate() {

	var query = (location.href.indexOf("?")+1);

	if (query) {

		var thisDate = location.href.substring(query);



		/* this is just to fix the date in Firefox */

			var temp = new Array();

			temp = thisDate.split('%20');

			var howMany = temp.length;

			var splitDate = '';

			for (var i = 0; i <= (howMany-1); i++) {

				splitDate += temp[i];

				splitDate += ' ';

			}

			GFdate = splitDate;

		/* end Firefox fix */

	}

	document.write('<INPUT TYPE="hidden" NAME="item_name" VALUE="Full Moon Flow, ' + GFdate + '">');

}





/* upcoming events */

function writeEvents() { /* site-wide */

	var htmlCode = '';

	

/* BEGIN: Constant Contact Basic Opt-in Email List Form */

	htmlCode += '<table border="0" cellspacing="0" cellpadding="3" bgcolor="#FFCC49">';

	htmlCode += '<tr><td align="center" style="font-weight:bold; color:#FFFFFF;">Join The Mailing List</td></tr>';

	htmlCode += '<tr><td align="center">';

	htmlCode += '<form name="ccoptin" action="http://visitor.constantcontact.com/d.jsp" target="_blank" method="post" style="margin-bottom:2px;">';

	htmlCode += '<input type="hidden" name="m" value="1101916488331">';

	htmlCode += '<input type="hidden" name="p" value="oi">';

	htmlCode += '<font style="font-weight: normal; font-family:Arial; font-size:12px; color:#000000;">To Receive the Radiant Being Newsletter and occasional private notifications, please enter your email here:</font>';

	htmlCode += '<input type="text" name="ea" size="15" value="">';

	htmlCode += '<input type="submit" name="go" value="Go" class="submit" style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif; font-size:10pt;">';

	htmlCode += '</form></td></tr>';

	htmlCode += '</table>';

/* END: Constant Contact Basic Opt-in Email List Form */



/* BEGIN: SafeSubscribe */

	htmlCode += '<a href="http://www.constantcontact.com/safesubscribe.jsp" target="_blank"><img src="/img/safesubscribe.gif" border="0" width="113" height="28" alt=""/></a>';

/* END: SafeSubscribe */

	htmlCode += '<br><br>';



//	htmlCode += '<b>Calendar</b><br>';

//	htmlCode += '<a href="http://ical.mac.com/nancybevers/radiantbeing%20classes">view</a> | ';

//	htmlCode += '<a href="webcal://ical.mac.com/nancybevers/radiantbeing%20classes.ics">subscribe</a><br><br>';



	/* format:

	htmlCode += '<A HREF="/folder/linkURL"><B>Event Name</B></A><BR>';

	htmlCode += 'Day DD Month, Time<BR>';

	htmlCode += 'Location<BR>';

	htmlCode += '<SPAN CLASS="upcomingSmall">(Note if needed)</SPAN><BR>';

	htmlCode += '<BR>';

	*/





	htmlCode += '<span style="color:#8E005A; font-size:11px; font-weight:bold;">NOW ENROLLING:</span> <A HREF="/classes/magnetizing.html"><B>Manifestation Groups</B></A><br>';

//	htmlCode += 'Day DD Month, Time<br>';

	htmlCode += '<br>';





	htmlCode += '<A HREF="/appointments/groupflow.html"><B>Full Moon Flow</B></A><BR>';

//	htmlCode += '<span class="upcomingSmall">Santa Monica</span><br>';

	htmlCode += '<SPAN CLASS="upcomingSmall"><A HREF="/appointments/ld.html">Long distance</A> only</SPAN><BR>';

	htmlCode += '<UL CLASS="upcoming">';



	

	htmlCode += '<LI CLASS="upcoming"><A HREF="/appointments/groupflow.html?Thursday, September 3, 7:00pm Pacific">Thursday, September&nbsp;3</A>';

	htmlCode += '<LI CLASS="upcoming"><A HREF="/appointments/groupflow.html?Sunday, October 4, 7:00pm Pacific">Sunday, October&nbsp;4</A>';

	htmlCode += '<LI CLASS="upcoming"><A HREF="/appointments/groupflow.html?Monday, November 2, 7:00pm Pacific">Monday, November&nbsp;2</A>';

	htmlCode += '<LI CLASS="upcoming"><A HREF="/appointments/groupflow.html?Tuesday, December 1, 7:00pm Pacific">Tuesday, December&nbsp;1</A>';

	



	htmlCode += '</UL><SPAN CLASS="upcomingSmall">All Group Flows at 7:00pm Pacific Time unless otherwise noted</SPAN><BR><BR>';

	htmlCode += 'Read about the group flows in <a href="http://www.radiantbeing.com/blog/category/flow-notes/">Flow Notes</a><BR><BR><br>';





	htmlCode += '<a href="/classes/awakeninglb.html"><B>Awakening Your Light Body</B></a><BR>';

	htmlCode += '<span class="upcomingSmall">Next Cycle: Los Angeles, Dates TBA</span><br><br>';







	/* past events (optional) */



/*	htmlCode += '<BR>';

	htmlCode += '<IMG SRC="/img/past.gif" ALT="past events:" WIDTH="130" HEIGHT="20"><BR><BR>';

	

	htmlCode += '<a href="/classes/fluidbody.html"><B>Fluid Body: Filling In The Gaps</B></a><br><br>';

	htmlCode += '<a href="/classes/partnershiplb.html"><B>Partnership with Light Beings</B></a><br><br>';

	htmlCode += '<A HREF="/classes/soullove.html"><B>Soul Love, Soul&nbsp;Connection</B></A><br><br>';

	htmlCode += '<A HREF="/classes/abundance.html"><B>Abundance and Prosperity Project</B></A><br><br>';

*/





	htmlCode += '</SPAN>';

	document.write (htmlCode);

}





/* site-wide functions: mailto, window popup, old paypal script, events toggle */



function talk(who,what,how) {

	var x=who;

	var y='radiantbeing'+'.com';

	if (what) { var z='?subject='+what; } else { var z=''; }

	var a=x+'@'+y+z;

	if (!(how)) { var how = a }

	document.write ('<A HREF="mailto:'+a+'" TITLE="'+x+'@'+y+'">'+how+'</A>');

}



function pop(page) {

	popupWin = window.open (page, 'RBpopup', 'status=0,resizable=1,scrollbars=1,width=300,height=300');

}



function paypal() {

	document.write ('<INPUT TYPE="hidden" NAME="business" VALUE="paypal'+'@'+'radiantbeing.com">');

}



function toggle(id){ /* toggles a DIV's visibility */

	var imageName = 'toggle_' + id;

	if (document.all){

		if(document.all[id].style.display == 'none'){

			document.all[id].style.display = '';

		} else {

			document.all[id].style.display = 'none';

		}

	} else if (document.getElementById){

		if(document.getElementById(id).style.display == 'none'){

			document.getElementById(id).style.display = 'block';

		} else {

			document.getElementById(id).style.display = 'none';

		}

	}

}





/* section-building functions */



function writeHeader(section, pageTitle) { /* side-wide */

	var htmlCode = '';



	/* can add section logic to switch photos by section */

	htmlCode +='<DIV ID="photo"><A HREF="/index.html"><IMG SRC="/photos/sunrise.jpg" ALT="" WIDTH="700" HEIGHT="235" BORDER="0"></A></DIV>';

	htmlCode +='<DIV ID="globalnav">';

		htmlCode +='<SCRIPT LANGUAGE="JavaScript">writeNavBar(\'' + section + '\');</SCRIPT>';

	htmlCode +='</DIV>';

	htmlCode +='<DIV ID="pagetitle"><TABLE><TR><TD><H3>' + pageTitle + '</H3></TD></TR></TABLE></DIV>';



	document.write (htmlCode);

}





function writeNavBar(section) { /* site-wide */

	var htmlCode = '';



	/* conditional code for showing section state */

	if (section == 'modalities') {

		htmlCode += '<A HREF="/modalities/index.html"><IMG SRC="/img/modalities_on.gif" ALT="[modalities]" WIDTH="115" HEIGHT="20" BORDER="0"></A>';

	} else {

		htmlCode += '<A HREF="/modalities/index.html" onMouseOver="turnOn(\'nav_modalities\');" onMouseOut="turnOff(\'nav_modalities\')"><IMG SRC="/img/modalities.gif" ALT="[modalities]" WIDTH="115" HEIGHT="20" BORDER="0" NAME="nav_modalities"></A>';

	}



	if (section == 'classes') {

		htmlCode += '<A HREF="/classes/index.html"><IMG SRC="/img/classes_on.gif" ALT="[classes]" WIDTH="88" HEIGHT="20" BORDER="0"></A>';

	} else {

		htmlCode += '<A HREF="/classes/index.html" onMouseOver="turnOn(\'nav_classes\');" onMouseOut="turnOff(\'nav_classes\')"><IMG SRC="/img/classes.gif" ALT="[classes]" WIDTH="88" HEIGHT="20" BORDER="0" NAME="nav_classes"></A>';

	}



	if (section == 'appointments') {

		htmlCode += '<A HREF="/appointments/index.html"><IMG SRC="/img/appointments_on.gif" ALT="[appointments]" WIDTH="128" HEIGHT="20" BORDER="0"></A>';

	} else {

		htmlCode += '<A HREF="/appointments/index.html" onMouseOver="turnOn(\'nav_appointments\');" onMouseOut="turnOff(\'nav_appointments\')"><IMG SRC="/img/appointments.gif" ALT="[appointments]" WIDTH="128" HEIGHT="20" BORDER="0" NAME="nav_appointments"></A>';

	}



	if (section == 'blog') {

		htmlCode += '<A HREF="/blog/"><IMG SRC="/img/articles_on.gif" ALT="[articles]" WIDTH="88" HEIGHT="20" BORDER="0"></A>';

	} else {

		htmlCode += '<A HREF="/blog/" onMouseOver="turnOn(\'nav_articles\');" onMouseOut="turnOff(\'nav_articles\')"><IMG SRC="/img/articles.gif" ALT="[articles]" WIDTH="80" HEIGHT="20" BORDER="0" NAME="nav_articles"></A>';

	}



	htmlCode += '<IMG SRC="/img/s.gif" ALT="" WIDTH="75" HEIGHT="1">'; /* spacer */

	

	if (section == 'about') {

		htmlCode += '<IMG SRC="/img/about_on.gif" ALT="[about nancy bevers]" WIDTH="210" HEIGHT="20" BORDER="0">';

	} else {

		htmlCode += '<A HREF="/about.html" onMouseOver="turnOn(\'nav_about\');" onMouseOut="turnOff(\'nav_about\')"><IMG SRC="/img/about.gif" ALT="[about nancy bevers]" WIDTH="210" HEIGHT="20" BORDER="0" NAME="nav_about"></A>';

	}



	document.write (htmlCode);

}





function writeSubNavBar(section) { /* section-specific */

	/* must escape single quotes with a backslash: i.e. \' */

	var htmlCode = '';

	

	if (section == 'modalities') {

		htmlCode += '<A HREF="lightbody.html">Light Body</A>;&nbsp; ';

		htmlCode += '<A HREF="fac.html">Flow Alignment and Connection</A>;&nbsp; ';

		htmlCode += '<A HREF="pace.html">PACE</A>;&nbsp; ';

		htmlCode += '<A HREF="channeling.html">Channeling</A>';

	} else if (section == 'classes') {

		htmlCode += '<A HREF="awakeninglb.html">Awakening Your Light Body</A>;&nbsp; ';

		htmlCode += '<A HREF="facpractitioners.html">FAC Practictioner\'s Foundation</A>;&nbsp; ';

		htmlCode += '<A HREF="activecreating.html">Active Creating</A>;&nbsp; ';

		htmlCode += '<A HREF="channeling.html">Channeling Workshop</A>';

	} else if (section == 'appointments') {

		htmlCode += '<A HREF="groupflow.html">Group Flow</A>;&nbsp; ';

		htmlCode += '<A HREF="index.html">Private Appointments</A>;&nbsp; ';

		htmlCode += '<A HREF="ld.html">About Long Distance</A>';

	} else if (section == 'blog') {

		htmlCode += '&nbsp;'; /* later: ? */

	} else if (section == 'about') {

		htmlCode += '&nbsp;'; /* later: space, bio, etc */

	} else { /* if no section */

		htmlCode += '&nbsp;'; 

	}

	document.write (htmlCode);

}





function writeFooter() { /* site-wide */

	var htmlCode = '';



	htmlCode += '<TABLE WIDTH="660"><TR><TD CLASS="footer">';

	htmlCode += '<A HREF="/meditations/index.html" CLASS="footer"><b>Meditations</b></A> | ';

	htmlCode += '<A HREF="/links.html" CLASS="footer"><b>Reading List</b></A> | ';

	htmlCode += '<A HREF="/list.html" CLASS="footer"><b>Mailing List</b></A> | ';

	htmlCode += '<A HREF="/contact.html" CLASS="footer"><b>Contact Nancy</b></A> | ';

	htmlCode += '<A HREF="/terms.html" CLASS="footer"><b>Terms</b></A> | ';

	htmlCode += '<A HREF="/privacy.html" CLASS="footer"><b>Privacy</b></A> ';

/*	htmlCode += '<SCRIPT LANGUAGE="JavaScript">talk(\'contact\',\'\',\'Contact Nancy\')</SCRIPT> '; */

	htmlCode += '</TD><TD ALIGN="right" CLASS="footer">';

	htmlCode += 'Copyright 2002-2009&nbsp;Nancy Bevers';

	htmlCode += '</TD></TR></TABLE>\n';



	document.write (htmlCode);

}





function writeCancelPolicy(type) { /* site-wide */

	var htmlCode = '';

	htmlCode += '<BR><P CLASS="cancel"><B>Cancellation policy:</B><BR>\n';

	if (type == 'groupflow') {

		htmlCode += 'I do not offer refunds for group flows. As soon as you register you become a part of the group energy body for that flow, and it is in the best interest of all involved for that to remain stable. If you\'ve signed up and your plans change, no problem. You can download the flow anywhere and anytime. If you have questions about this, feel free to contact me.\n';

	} else if (type == 'class') {

		htmlCode += '';

	} else {

		htmlCode += '24 hours\' notice is required to cancel a private appointment and receive a refund or credit. If you do not cancel more than 24 hours in advance, or if you miss your appointment, you will be responsible for the full amount.'

	}

	htmlCode += '</P>\n';

	document.write (htmlCode);

}





/* global navigation rollovers */



if (document.images) {

    nav_modalitiesroll = new Image();

    nav_modalitiesroll.src = "/img/modalities_on.gif";

    nav_modalitiesoff = new Image();

    nav_modalitiesoff.src = "/img/modalities.gif";



    nav_classesroll = new Image();

    nav_classesroll.src = "/img/classes_on.gif";

    nav_classesoff = new Image();

    nav_classesoff.src = "/img/classes.gif";



    nav_appointmentsroll = new Image();

    nav_appointmentsroll.src = "/img/appointments_on.gif";

    nav_appointmentsoff = new Image();

    nav_appointmentsoff.src = "/img/appointments.gif";



    nav_blogroll = new Image();

    nav_blogroll.src = "/img/articles_on.gif";

    nav_blogoff = new Image();

    nav_blogoff.src = "/img/articles.gif";



    nav_aboutroll = new Image();

    nav_aboutroll.src = "/img/about_on.gif";

    nav_aboutoff = new Image();

    nav_aboutoff.src = "/img/about.gif";

}



function turnOn(imageName) {

    if (document.images) {

        document[imageName].src = eval(imageName + "roll.src");

    }

}



function turnOff(imageName) {

    if (document.images) {

        document[imageName].src = eval(imageName + "off.src");

    }

}

