function vp() {
	var mydelay = delay;

	//dump("rsvping");
	if(loop && curIndex == textArray.length) { curIndex = 0;}
	if(!loop && curIndex == textArray.length) { 
		//dump("turning off \n");
		rsvpIgnition =false; }
	var myword = textArray[curIndex];
	rsvp = document.getElementById("rsvp");
	rsvp.innerHTML = "<div class='rsvp'>" + myword + "</div>";
	if((curIndex - 1) > 0) {
		document.getElementById("rsvp-1").innerHTML = textArray[curIndex -1];
	}
	if((curIndex - 2) > 0) {
		document.getElementById("rsvp-2").innerHTML = textArray[curIndex -2];
	}
	if((curIndex + 1) < textArray.length) {
		document.getElementById("rsvp1").innerHTML = textArray[curIndex +1];
	}
	if((curIndex + 2) < textArray.length) {
		document.getElementById("rsvp2").innerHTML = textArray[curIndex +2];
	}
	curIndex++;
	//dump(" at " + curIndex + "\n");
	mydelay = rsvpTimeForWord(myword);
	if(rsvpIgnition) {
	rsvpIgnition = window.setTimeout("vp()", mydelay);
	}
}

function rsvpTimeForWord(word) {
	if(wordlength) {
	var timePerLetter = delay / 6;
	//dump("dur is " + (word.length * timePerLetter) + "\n")
	var prefive = word.length - 5;

	var fixation =  word.length * timePerLetter;
	if(word.indexOf(".") > -1) fixation += (fixation/2) ;  // PERIOD DELAY
	return fixation;
	} else {
		return delay;
	}
	
}
