﻿/*
	Rotates quotes;
	Must have element with id="quotes"

*/

// quote
var TIME_INTERVAL = 8000;


var interval;
var quotes = new Array(
	new quoteObj(
		"PocketBilling fills a distinct and necessary niche.  No Palm Pilot-toting physicians should be without it.\"",
		"Mark T. Parker, MD.,  Medical Software Reviews."
		),
	
	new quoteObj(
		"I will show [PocketBilling 4.0] to my office manager to illustrate that what he thinks is the future is "+
		  "really the present. Again, my gratitude for your energy and kindness.\"", 
		"Steve Schwid, MD, Omaha, NE"
		),
		
	new quoteObj(
		"By rolling this software out to our entire medical group, we believe that we will markedly "+
    	  "decrease the number of lost charges for services performed in the hospital and in nursing homes. We "+
    	  "also benefit by shortening the time between when the service is performed and when the bill is sent to the payer.\"",
    	"Tom Callahan, Senior Manager for Physician Services at Susquehanna Medical System."
    	),
    	
    new quoteObj(
    	"Five years ago our gastroenterology practice replaced our manual card billing system with the Pocket Billing "+
    	  "software on Palm PDAs. While initially reluctant to make the switch, our physicians quickly became converts. "+
    	  "The Pocket Billing solution has made everyone more efficient; we no longer print anything out, instead we just "+
    	  "email our patient visit lists directly to our billing service. Pocket Billing has drastically decreased lost "+
    	  "charges, eliminated handwriting errors and improved payment receipt.\"",
    	"Dr. Kenneth Diamond, M.D., Gastroenterology Consultants of North Broward, PA"
    	),
    	
    	 
        new quoteObj("The transcription product is competitively priced, superior in processing time and possibly offers better privacy"+ 
        "than transcription services offered by local hospitals. Fred Clark was very helpful when asked about implementing transcription service using"+
        "my present equipment. I had the feeling that good support would be available to users of your products. PocketMed is a means of continuing"+
"small office practice despite the pressures of corporate competitors.\"",
"Steve Schwid, MD, Omaha, NE" )





	);
var currentQuote;
var quoteDiv;

function quoteObj(quote, author) {
	this.quote = quote;
	this.author = author;
}

function rotateQuote() {
	if (!currentQuote) currentQuote = 0;
	if (!quoteDiv) quoteDiv = document.getElementById('quotes');
	
	if (quoteDiv) {
		var q = quotes[currentQuote];
		quoteDiv.innerHTML = "<i>&ldquo;" + q.quote + "</i><br>&nbsp; <b>- " + q.author + "</b>";
		currentQuote = (currentQuote + 1) % quotes.length;
	} else if (interval) {
		clearInterval(interval);
	}
	
}

function rotateQuoteInit() {
	rotateQuote();
	interval = setInterval('rotateQuote()', TIME_INTERVAL);
}
