function popup_window(url, id, width, height) {
    var popup = null;
    popup = window.open(url, id, 'toolbar=no,scrollbars=no,location=no,statusbar=no,menubar=no,resizable=no,width=' + width + ',height=' + height + '');
    popup.focus();
}

function writeQuote() {
	var str = '';
	str += '<div class="quote">&quot;' + this.quote + '&quot;';
	str += '<div class="quoteperson">' + this.name + '<br/>';
	str += this.title + '<br/>';
	str += this.agency + '<br/>';
	str += this.location + '</div></div>';
	return str;
}
					
function MakeQuote(quote, name, title, agency, location) {
	this.quote = quote;   
	this.name = name;
	this.title = title;
	this.agency = agency;
	this.location = location;
	this.write = writeQuote; 
}

var buddyQuotes = [];
var bestBuddyQuotes = [];
var professionalQuotes = [];
var mainQuotes = [];

//
// Buddy Quotes
//
buddyQuotes[0] = new MakeQuote(
	"Everyone involved in a patient's care can immediately see the financial and clinical impact on their assessment answers.",
	"Pat West",
	"Administrator",
	"Pioneer Home Healthcare",
	"Bishop, CA").write();

buddyQuotes[1] = new MakeQuote(
	"Buddy saves me money. I do not have to pay an experienced clinician to review every assessment.",
	"Diane Torrado",
	"Owner",
	"RX Home Health Services",
	"Bar Harbor Island, FL").write();

buddyQuotes[2] = new MakeQuote(
	"With Buddy we find problems before they happen.",
	"Karen Bennett",
	"Owner, Director of Nursing",
	"Home Care Advantage",
	"Jacksonville, FL").write();

//
// Best Buddy Quotes
//

bestBuddyQuotes[0] = new MakeQuote(
	"This gives me a <strong>real-time gauge</strong>. We switch gears and respond during episodes.",
	"Ben Waller",
	"Owner",
	"Expedient Home Health Care",
	"Rockwall, TX").write();

bestBuddyQuotes[1] = new MakeQuote(
	"Changing from Buddy to Best Buddy means I can easily zone in on one clinician's work. It has made me more efficient.",
	"Ademola Osofisan",
	"Owner",
	"Serenity Home Health, Inc.",
	"Ann Arbor, MI").write();
	
bestBuddyQuotes[2] = new MakeQuote(
	"It stops us from living in denial. Reality may be different from our perceptions. Now we know exactly what is going on.",
	"Ben Waller",
	"Owner",
	"Expedient Home Health Care",
	"Rockwall, TX").write();	


//
// Professional Quotes
//
professionalQuotes[0] = new MakeQuote(
	"Home healthcare is a competitive industry, where data is power. Professional enables me to analyze our OASIS data in real time.",
	"Todd Rose",
	"Chief Financial Officer",
	"Visiting Nurse and Healthcare Services of Connecticut",
	"Vernon, CT").write();

professionalQuotes[1] = new MakeQuote(
	"We are able to monitor our utilization, make sure it is on track with our treatment plan, and study its impact upon our outcomes.",
	"Sue Sullivan",
	"Director of Performance Improvement and IT",
	"Community Nurse and Hospice Care",
	"Fairhaven, MA").write();

professionalQuotes[2] = new MakeQuote(
	"I think HHG Professional is a &quot;must&quot; for an agency of any size. It helps you to assure the accuracy of your OASIS data and manage your outcomes.",
	"Paula Schultz",
	"Regional Clinical Director",	
	"VNA Care Network, Inc.",
	"Worcester, MA").write();
	
professionalQuotes[3] = new MakeQuote(
	"The progam paid for itself in a month.",
	"JoAnn Borchardt",
	"Director",
	"Aspirus VNA Home Health",
	"Wausau, WI").write();	

///
/// main page quotes
/// 
mainQuotes[0] = new MakeQuote(
			"Professional has enabled us to recoup from $10,000 to $12,000 a month.",
			"JoAnn Borchardt",
			"Director",
			"Aspirus VNA Home Health",
			"Wausau, WI").write();
			
mainQuotes[1] = new MakeQuote("We began using Home Health Gold and right away our benchmarking scores improved and so did our financial reimbursement.",
			"Mary Brendel - Lyleen Pricor",
			"Administrative Director, Director of Business Services",
			"Sharp Home Care",
			"San Diego, CA ").write();

mainQuotes[2] = new MakeQuote("Professional enables me to analyze our OASIS data in real-time.",
			"Todd Rose",
			"CEO",
			"Visiting Nurse and Health Services of Connecticut",
			"Vernon, CT.").write();
			
mainQuotes[3] = new MakeQuote("Professional does exactly what it is advertised to do.",
			"Sue Sullivan",
			"Director of Performance Improvement and IT",
			"Community Nurse and Hospice Care",
			"Fairhaven, MA").write();
			
mainQuotes[4] = new MakeQuote("Home Health Gold gives me a real-time gauge. We switch gear and respond during episodes.",
			"Ben Waller",
			"Owner",
			"Expedient Home Health Care",
			"Rockwall, TX").write();
						
mainQuotes[5] = new MakeQuote("In six weeks we raised our case-mix weight for SOC from 1.20 to 1.33, and our Recerts from .89 to 1.03. We paid for this program in less than 6 weeks.",
			"Richard Viscardi",
			"CFO",
			"Strattord VNA",
			"Stratford, CT").write();			
			

var nIndex = 0;
var QuoteDelay = 6000;   
function rotateQuotes(product) {
	Effect.QuoteFade("quoteLocation", {delay: 4, duration: 2});

    if (product === "Buddy") {
		if (nIndex >= buddyQuotes.length) {
			nIndex = 0;		
		}
	    document.getElementById('quoteLocation').innerHTML = buddyQuotes[nIndex];
	    nIndex++ ;
	    setTimeout('rotateQuotes("Buddy"); Effect.QuoteAppear("quoteLocation", {duration: 0})', QuoteDelay);
	}
	
	if (product === "BestBuddy") {
		if (nIndex >= bestBuddyQuotes.length) {
			nIndex = 0;
		}
		document.getElementById('quoteLocation').innerHTML = bestBuddyQuotes[nIndex];
		nIndex++ ;
		setTimeout('rotateQuotes("BestBuddy");Effect.QuoteAppear("quoteLocation", {duration: 0});', QuoteDelay);
	}
	
	if (product === "Professional") {
		if (nIndex >= professionalQuotes.length) {
			nIndex = 0;
		}
		document.getElementById('quoteLocation').innerHTML = professionalQuotes[nIndex];
		nIndex++ ;
		setTimeout('rotateQuotes("Professional");Effect.QuoteAppear("quoteLocation" ,{duration: 0});', QuoteDelay);
	}
	
	if (product === "Main") {
		if (nIndex >= mainQuotes.length) {
			nIndex = 0;
		}
		document.getElementById('quoteLocation').innerHTML = mainQuotes[nIndex];
		nIndex++ ;
		setTimeout('rotateQuotes("Main");Effect.QuoteAppear("quoteLocation", {duration: 0});', QuoteDelay);
	}
}
