/********************************************************************/
/***AJAX walkthough**************************************************/
/*
	http://www.w3schools.com/php/php_ajax_suggest.asp

	html:jsChange() -> photo.js:jsChange()
	photo.js:jsChange(){
		GetXmlHttpObject() does the voodoo nessecary to set up the http request into 'xmlHttp' variable
		and makes sure it's allowed

		sets up 'url' variable with 'writer.php' and variables sent through GET[] 

		onreadystatechange runs the following function (in this case stateChanged) once the xmlHttp page
		has finished loading

		open is what xmlHttp is going to do, i.e. run open the writer.php page with the predetermined variables

		send turns the ignition
	}
*/
/********************************************************************/






var xmlHttp

var pageList = new Array();
pageList[1] = "lymphatic_drainage";
pageList[2] = "acupressure";
pageList[3] = "somato_emotional_release";
pageList[4] = "reiki";
pageList[5] = "myofascial_release";
pageList[6] = "craniosacral_therapy";
pageList[7] = "reflexology";
pageList[8] = "chakra_and_auric_balancing";
pageList[9] = "shamanic_healing";
pageList[10] = "deep_tissue_massage";
pageList[11] = "structural_healing";
pageList[12] = "candling";
pageList[13] = "during_massage";
pageList[14] = "after_massage";
pageList[15] = "infant_massage";
pageList[16] = "pregnancy_massage";
var pnum0;
var pnum1 = 0;

function changeMessage(pagenum)
{
pnum0 = pnum1
pnum1 = pagenum;
xmlHttp = GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Browser does not support HTTP Request")
  return
  }
//alert("i exist! don't ignore me!");

var url="../includes/" +pageList[pagenum]+".php";
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
} 

function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 {
 	if(pnum0 != 0)
	 	document.getElementById("m"+pnum0).style.color = "#7D8937"; //off color
 	document.getElementById("m"+pnum1).style.color = "#666046"; // on color
 document.getElementById("content_right_brownbox").innerHTML=xmlHttp.responseText 
 } 
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 // Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}







//---------------------TESTIMONIALS

var test =new Array();

test [1] = "Unlike other massages I have had, Joanne believes the body, mind and spirit are interconnected...I was feel the affects of her work for not hours but days afterward.";
test [2] = "Joanne has experience treating diverse conditions, including post-surgical cases, with a great deal of success. She is well versed in a variety of techniques and understands how to apply them to relieve the various conditions of her clients. -Rehana Hamid, D.C.";
test [3] = "Her touch and keen intuition dissapated me tendonitits...Joanne is an incredible therapist who can immediately get to the root of a problem. -Lisa Zinn, Knitter";
test [4] = "Joanne will unlock your intuition and self-awareness to start your own personal spiritual growth. -Christian Kcomt, Psychologist";
test [5] = "Joanne is an extraoridinarily gifted massage therapist who intuitively knows what body parts are in need of her expert touch. She has an instant rapport with clients...I'm a regular client! -Lynn Zeitlin, Lawyer";
test [6] = "Patients feel re-energized after ahving a treatment with Joannne because she is also a Reiki Master with knowledge and expertise of many other energy healing techniques. I wholeheartedly, recommend Joanne to anyone who is looking for an excellent massage therapist. -Kirk R. Brandow, MD";
test [7] = "Following Manual Lymphatic Drainage (MLD) I not only felt a great deal better, but also healed quicker.  MLD is crucial to speedy recovery. I find Joanne to be extremely knowledgable in her field of work. -Linda McKinley, RN, BSN, MPH, CNOR, CIC";
test [8] = "Joanne was right on with her assessment of what I needed. She cleared out a lot of accumulated stuck energy and I left feeling more relaxed and peaceful. I would highly recommend her. -Stephanie Zuckerman";

var currentTest= 1;
function changeTest ()

{
if (currentTest +1> (test.length-1))

currentTest= 1;

else

currentTest ++;

document.getElementById ('testimonial').innerHTML = test[currentTest];

}

