var aGlobalRollovers = [
	"nav_home",
	"nav_service",
	"nav_customers",
	"nav_news",
	"nav_aboutus",
	"nav_contactus",
	"nav_news_home",
	"nav_aboutus_home",
	"nav_contactus_home",
];

var sImgPath = "../images/";

for(var i=0; i<aGlobalRollovers.length; i++) {
	eval("var " + aGlobalRollovers[i] + "=new Image()");
	eval(aGlobalRollovers[i] + ".src='" + sImgPath + aGlobalRollovers[i] + ".gif'");
	eval("var " + aGlobalRollovers[i] + "_on=new Image()");
	eval(aGlobalRollovers[i] + "_on.src='" + sImgPath + aGlobalRollovers[i] + "_on" + ".gif'");
}

function swapImage(name, state) {
	document.images[name].src = eval( name + state + ".src" );
}

function makeMailto(id, email) {
	var el = id;
	el.href = "mailto:" + email + "@caringfamily.com";
}

// homepage only - quote rotator
var aQuotes = new Array();
	aQuotes[0] = ["CaringFamily's solution represents a revolutionary advance in the quality of life for today's elders and the caregivers that support them.", "<strong>Cathy Bodine, Ph.D</strong><br />Director, Assistive Technology<br />Department of Physical Medicine and Rehabilitation<br />University of Colorado Health Sciences Center"];
//	aQuotes[1] = ["CaringFamily's designs will make life easier for everyone, not just elders and their caretakers, but anyone who wishes to make communication with friends and colleagues effortless and pleasurable.", "<strong>Don Norman, Ph.D</strong><br/>Co-founder, Nielsen Norman Group<br />Professor of Computer Science, Northwestern University"];
	aQuotes[1] = ["In my many years in senior care, I've seen a lot of elder therapies come and go.  CaringFamily's offering is the first that brings elders, their families, and professional caregivers together in a truly new approach. It couldn't come at a better time for an aging American population.", "<strong>Pat Nipp</strong><br />Former Chairman, Beverly Enterprises"];
	aQuotes[2] = ["CaringFamily's elegant, ultimately simple solution to a growing social problem&mdash;the isolation of the elderly in America, with resulting health and longevity impacts&mdash;strikes me as precisely the right service at the right time.", "<strong>Bill Coleman</strong><br />President, University of Colorado Coleman Institute for Cognitive Disabilities Foundation<br/>Founder, BEA Systems"];
	aQuotes[3] = ["(CaringFamily's) system... gives my dad the ability to stay connected to those he loves. He can reach out and connect with his family with the touch of a button, and feel that he is still part of the family even though he is not at home anymore.", "<strong>Lisa Jimenez</strong><br />Lakewood, CO."];	

var index = 0;

function rotateQuotes() {
	if(index > aQuotes.length-1) index = 0;
	var qt = document.getElementById('qText');
	var qa = document.getElementById('qAttribution');
	qt.innerHTML = aQuotes[index][0];
	qa.innerHTML = aQuotes[index][1];
	index++;
	var qTimer = setTimeout("rotateQuotes()", 10000);
}

window.onload = rotateQuotes;