// JavaScript Document
function changeImage(who) {
	document.dh_large.src = "images/dreamhomes/"+who+".jpg";	
}

function dhScrollRight() {
	wth = parseInt(document.getElementById("dhImgScroll").style.width);
	scrollRightOn = setInterval(scrollRight, 75);
}
function dhScrollLeft() {
	wth = parseInt(document.getElementById("dhImgScroll").style.width);
	scrollLeftOn = setInterval(scrollLeft, 75);
}
function scrollRight() {
	cur = parseInt(document.getElementById("dhImgScroll").style.left);
	cur = cur-15;
	wth = parseInt(document.getElementById("dhImgScroll").style.width);
	if (Math.abs(cur) > (wth-435)) {
		dhScollOff();
	}
	document.getElementById("dhImgScroll").style.left = cur+"px";
}

function scrollLeft() {
	cur = parseInt(document.getElementById("dhImgScroll").style.left);
	cur = cur+15;
	if (cur > 0) {
		dhScollOff();
	}
	document.getElementById("dhImgScroll").style.left = cur+"px";
}


function dhScrollOff() {
	
	clearInterval(scrollRightOn);
	clearInterval(scrollLeftOn);
}
MCIquoteArray = new Array("I would highly recommend this company<Br /> to anyone who was in the market for a home.","The quality of the<Br /> workmanship is excellent.","The entire ERCO Homes team has<Br /> been a pleasure to work with","The folks at ERCO did a stellar job in<Br /> addressing issues as they arose.");

MCIsayArray = new Array("C.Morrison 2006","D andC Boland 2005","T. Martin 2005","T Reid 2005");

counter = 0;
MCItestInt = "";
NFtestInt = "";
function goTest() {
	MCItestInt = setInterval(showTestMCI,10000);
}

function showTestMCI() {
	counter++;
	if (counter == MCIquoteArray.length) {
		counter = 0;
	}
	document.getElementById("MCITest").innerHTML = MCIquoteArray[counter]+"<br><span class=testFrom>"+MCIsayArray[counter]+"</span>";
}
								
								