function test(){ 
alert("In here");
} 
var interval = 8000;
var random_display = 0;
var imageDir = "http://www.patientkeeper.com/images/";

var imageNum = 0;




var hospitalNum = 10; //10
hospitalImage = new Array();
storyContent = new Array();
quoteInfo = new Array ();


/*First*/
storyContent[0] = '"PatientKeeper is the first software that physicians actually get excited about because it saves them time and enhances patient care.  The enthusiasm of VCUHS physicians to use PatientKeeper helps ensure that the entire organization realizes the financial and clinical benefits of the system."<br /> <strong><a href="http://www.patientkeeper.com/success_stories/" class="navLink">More</a></strong>';
quoteInfo[0] = "<i>Alistair Erskine,<br />Chief Medical Information Officer<br />VCU Health System.</i>";
hospitalImage[0] = new imageItem(imageDir + "successStories_vcu.gif");
/*Second*/
storyContent[1] = '"PatientKeeper\'s investment in a seamless integration with MEDITECH coupled with their broad array of product offerings made them a logical choice to be our mobility and physician access partner."<br /> <strong><a href="http://www.patientkeeper.com/success_stories/" class="navLink">More</a></strong>';
quoteInfo[1] = "<i>George Conklin,<br />Senior Vice President and Chief Information Officer<br />CHRISTUS Health</i>";
hospitalImage[1] = new imageItem(imageDir + "successStories_christus_health1.gif");
/*Next*/
storyContent[2] = '"PatientKeeper has been very well adopted, leading to increased physician satisfaction and enhanced patient care and service, giving our physicians an advantage has given the entire organization an important competitive advantage as well."<br /> <strong><a href="http://www.patientkeeper.com/success_stories/" class="navLink">More</a></strong>';
quoteInfo[2] = "<i>A. Jim Tinker,<br />President & CEO<br />Mercy Medical Center</i>";
hospitalImage[2] = new imageItem(imageDir + "successStories_mercy.gif");

/*Next*/
storyContent[3] = '"We wanted our physicians to have a best-in-class physician portal, mobile applications, and a downtime solution. After an extensive evaluation of numerous pure play vendors, we discovered that PatientKeeper had the breadth and depth to address all our needs without compromise."<br /> <strong><a href="http://www.patientkeeper.com/success_stories/" class="navLink">More</a></strong>';
quoteInfo[3] = "<i>Chuck McWorter,<br />Director of Information Technology<br />Guadalupe Regional Medical Center</i>";
hospitalImage[3] = new imageItem(imageDir + "successStories_guadalupe.gif");

storyContent[4] = '"PatientKeeper saves me over an hour a day in administrative tasks, time that I now spend with my patients providing better care. This is the best patient care tool since the stethoscope. We are getting tremendous positive feedback from our physicians."<br /> <strong><a href="http://www.patientkeeper.com/success_stories/" class="navLink">More</a></strong>';
quoteInfo[4] = "<i>Gregory A. Ator, MD, FACS<br />Chief Medical Information Officer<br />Kansas University Hospital</i>";
hospitalImage[4] = new imageItem(imageDir + "successStories_ku_med_center.gif");

storyContent[5] = '"PatientKeeper saves me over an hour a day in administrative tasks, time that I now spend with my patients providing better care. This is the best patient care tool since the stethoscope. We are getting tremendous positive feedback from our physicians."<br /> <strong><a href="http://www.patientkeeper.com/success_stories/" class="navLink">More</a></strong>';
quoteInfo[5] = "<i>Lisa Davis,<br />Chief Executive Officer<br />Reno Orthopedic Clinic</i>";
hospitalImage[5] = new imageItem(imageDir + "successStories_reno.gif");

storyContent[6] = '"We implemented PatientKeeper as part of a quality initiative to help billing be more efficient and effective. PatientKeeper was intuitive, easily adaptable to our diverse settings, and quickly adopted by our doctors."<br /> <strong><a href="http://www.patientkeeper.com/success_stories/" class="navLink">More</a></strong>';
quoteInfo[6] = "<i>Robert J. Schreiber, M.D.<br />Physician-in-Chief<br />Hebrew SeniorLife</i>";
hospitalImage[6] = new imageItem(imageDir + "successStories_hebrew.gif");

storyContent[7] = '"Convenience and ease of use for our physicians are important issues for us. The user interface on the PatientKeeper system is extremely intuitive and clearly designed to suit the doctor\'s daily workflow."<br /> <strong><a href="http://www.patientkeeper.com/success_stories/" class="navLink">More</a></strong>';
quoteInfo[7] = "<i>Paul Klotman, M.D.,<br />Chairman, Department of Medicine<br />Mount Sinai School of Medicine, NY</i>";
hospitalImage[7] = new imageItem(imageDir + "successStories_mount_SInai.gif");

storyContent[8] = '"Covenant Healthcare started with a small group of users and was able to rapidly scale our deployment because of the demand from our doctors. We were amazed at how excited our physicians were to get the product. We achieved a 60 percent adoption rate in only two months. PatientKeeper scaled beautifully."<br /> <strong><a href="http://www.patientkeeper.com/success_stories/" class="navLink">More</a></strong>';
quoteInfo[8] = "<i>Keith Grantham,<br />Director of Information Technology<br />Covenant HealthCare</i>";
hospitalImage[8] = new imageItem(imageDir + "successStories_covenant.gif");

storyContent[9] = '"Memorial continuously strives to enhance the quality of care, maintain physician affinity and manage revenue. After a careful evaluation of vendors, we determined that PatientKeeper meets the needs of our diverse and expansive environment."<br /> <strong><a href="http://www.patientkeeper.com/success_stories/" class="navLink">More</a></strong>';
quoteInfo[9] = "<i>Robert Reese,<br />Chief Information Officer<br />Memorial Healthcare System</i>";
hospitalImage[9] = new imageItem(imageDir + "successStories_mhs.gif");

storyContent[10] = '"PatientKeeper\'s platform approach has allowed us to easily expand with additional applications as we need them. Recently, our nursing staff wanted the same easy access to patient information granted to our physicians. We decided to add PatientKeeper Physician Portal&#8482;, expanding access to patient information to both our physicians and nurses."<br /> <strong><a href="http://www.patientkeeper.com/success_stories/" class="navLink">More</a></strong>';
quoteInfo[10] = "<i>Carla Maslakowski,<br />Chief Information Officer<br />Northeast Medical Center Hospital</i>";
hospitalImage[10] = new imageItem(imageDir + "successStories_northeast.gif");



var totalHospital = hospitalImage.length;

function imageItem(image_location) {
	this.image_item = new Image();
	this.image_item.src = image_location;
}
function get_ImageItemLocation(imageObj) {
	return(imageObj.image_item.src)
}


function randNum(x, y) {
	var range = y - x + 1;
	return Math.floor(Math.random() * range) + x;
}



function getNextHospital() {

	if (random_display) {
		hospitalNum = randNum(0, totalHosptial-1);
	}
	else {
		hospitalNum = (hospitalNum+1) % totalHospital;
	}
	var new_image = get_ImageItemLocation(hospitalImage[hospitalNum]);
	return(new_image);
}

function switchStory(place) {

	place = "hospitalImg";
	var new_hospital = getNextHospital();
	document.getElementById('storyText').innerHTML = storyContent[hospitalNum];
	document.getElementById('quoteInfo').innerHTML = quoteInfo[hospitalNum];
	
	document[place].src = new_hospital;	
	//document.getElementById('storyURL').href = hospitalURL[hospitalNum];
	
	var recur_call = "switchStory('"+place+"')";
	timerID = setTimeout(recur_call, interval);
}




