var ran_unrounded=Math.random()*6;
var ran_number=Math.round(ran_unrounded); 

var html_text, control_text;
var points= new Array(5) 
var action;
var time_id;

action = "play";

function set_column()
{
	points[0] = "<b>Why Tolnitch Surgical</b><p><table width=120><tr><td><p class=points>Performed one of the first lumpectomies in North Carolina, "+
	"when mastectomies were the usual treatment offered.</td></tr></table>"
	points[1] = "<b>Why Tolnitch Surgical</b><p><table width=120><tr><td><p class=points>Significantly reduced time from diagnosis to treatment with the use of office based minimally "+
	"invasive biopsy techniques.</td></tr></table>"
	points[2] = "<b>Why Tolnitch Surgical</b><p><table width=120><tr><td><p class=points>Brought radiology services to their office, offering mammography and ultrasound for evaluation "+
 	"and stereotactice and ultrasound mammatome biopsies for diagnosis.</td></tr></table>"
	points[3] = "<b>Why Tolnitch Surgical</b><p><table width=120><tr><td><p class=points>Has an innovative multidisciplinary approach to breast care, including weekly conferences "+
  "involving radiologists, pathologists, oncologists, and surgeons.</td></tr></table>"
	points[4] = "<b>Why Tolnitch Surgical</b><p><table width=120><tr><td><p class=points>Transitioned much of the care from the hospital to the office.</td></tr></table>"
	points[5] = "<b>Why Tolnitch Surgical</b><p><table width=120><tr><td><p class=points>Uses the most advanced procedures available, including sentinel node "+
	"biopsy, breast conservation procedures, minimally invasive biopsy procedures and MRI of the breast.</td></tr></table>"
	points[6] = "<b>Why Tolnitch Surgical</b><p><table width=120><tr><td><p class=points>Is on the forefront of treatment using accelerated partial breast "+
	"radiation to reduce the time required for post lumpectomy breast radiation from 7 weeks to 5 days.</td></tr></table>"
	
	html_text = "<div id=\"control\"></div>"
	
	next_column(1);
	
}

function next_column(x)
{
	
	if(x == 1) { action = "play"; }
	
	if(action == "play")
	{
		if(x == -1)
		{
			action = "pause";
			window.clearTimeout(time_id);
			
			control_text = "<p class=points><a href=\"javascript:next_column(1);\"><img src=\"play.jpg\" border=0</a>"
			document.getElementById('control').innerHTML=control_text;
		}
		else
		{
		ran_number = ran_number + x;
	
		if(ran_number > 6) { ran_number = 0 }
		else if(ran_number < 0) { ran_number = 6 }

		document.getElementById('whyus').innerHTML=points[ran_number]+html_text;
		
		control_text = "<p class=points><a href=\"javascript:next_column(-1);\"><img src=\"pause.jpg\" border=0</a>"
		document.getElementById('control').innerHTML=control_text;
	
		time_id = window.setTimeout("next_column(1)",7000);
		}
	}
	else
	{
		
	}
}

function show_story(state)
{
	var story
	
	if(state == "true")
	{
		story = "<p>During my yearly exam, my doctor found a lump in my breast.  She recommended that I make an "+
			"appointment to see one of the physicians at Tolnitch Surgical Associates.  "+
			"Fortunately, I was able to get an appointment very quickly.  Later that week, I had an office "+
			"consultation with a surgeon and a diagnostic mammogram and ultrasound in the office through their "+
			"partnership with Wake Radiology. We scheduled a breast biopsy for the next day.   The biopsy procedure was "+
			"done right in the office and I left in about an hour.   I spent the night worrying that I might have cancer."+
			"<p>Emotionally, I was a mess.   The following day, I got a call from the "+
			"office, saying that the lump was benign.  I was so relieved.  The way this happened was so different from "+
			"the experience of my best friend.  It took her five weeks of doctors appointments and tests before she "+
			"had a definitive answer.  She was sent from a radiologist to a general surgeon,  who scheduled another "+
			"appointment for her with the radiologist for additional mammograms.  Then she was scheduled for a follow-up "+
			"appointment with the surgeon, and they finally scheduled a procedure at the hospital a week later.  "+
			"For over a month, my friend was a total wreck.  I am so glad I chose Tolnitch Surgical Associates.  "+
			"<a href=\"JavaScript:show_story('false')\"><img src=\"arrow_up.jpg\" border=0><font size=-1>( hide )</font></a></p>"
	}
	else
	{
		story = "<p>During my yearly exam, my doctor found a lump in my breast.  She recommended that I make an appointment "+
		"to see one of the physicians at Tolnitch Surgical Associates."+
		"<a href=\"JavaScript:show_story('true')\"><img src=\"arrow_dwn.jpg\" border=0><font size=-1>( more )</font></a>"
	}
	document.getElementById('story').innerHTML=story;
}