//<![CDATA[

function getCrumb( strName ) {
      var strCookie = document.cookie;
      var re = new RegExp( strName + "=(.*?)(;|$)", "im" );
      var aMatches = strCookie.match( re );
     	return ( aMatches ? aMatches[1] : null );
}

function SetCookie( sName, sValue, datExpires ) {
		if ( datExpires == null ) {
				var datNow = new Date();
				var datExpires = new Date( datNow.getFullYear() + 1, 12, 31 );
      } 
      document.cookie = sName + "=" + sValue + "; expires=" + datExpires.toGMTString() + "; path=/;" ;
}

// pick random message, without replacement:
function intGetNextImageNumber( bReset ) {
	// bReset = ignore stored values, reset cookie...

	// track messages to do in cookie:
	var strToDo = getCrumb( strToDoCookie );
	var aToDo = null;
	if ( !strToDo || strToDo == "" || bReset ) {
		aToDo = new Array();
		for ( var i = 0; i < nLength; i++ )
			aToDo[ aToDo.length ] = i;
	} else
			aToDo = strToDo.split( strSep );
			
	// pick message number from to-do list for display
	var nToDo = Math.floor( Math.random() * aToDo.length );
	var nMsg = parseInt( aToDo[ nToDo ] );
	
	//remove message number from to-do list
	aToDo.splice(nToDo, 1);
	
	//save cookie
	strToDo = aToDo.join(strSep);
	SetCookie( strToDoCookie, strToDo );
	
	return nMsg;
}


var aMsg = new Array (
"Thanks! You are making the community a better place by making better parents",
"Thank you, I learned so much, got great information",
"What a great day! Thank you for affirming my ability in parenting.",
"Thank you so much for investing in our children - they are so deserving of the best we can give them.",
"Thank you so much. I love this conference! I look forward to attending every year. I am challenged every day by my three young children and I appreciate the support of Beech Acres.",
"This was my first conference and definitely not my last. Thank you to all the parents for recognizing the importance of empowering the parents of today.",
"Great Job and I will recommend this to many others for next year.",
"We need more of this. These events can help change society.",
"I have attended three conferences already. I Want to continue my education as a parent.",
"I have come for the past few years and really find I am inspired to be a better mom.",
"Attended for the first time last year and loved it. The conference provides a lot of helpful, practical advice and renews my spirit to keep trying to be the best parent I can be.",
"I came last year, loved it and had to come again. It'll be a priority for me from now on!",
"I love this conference. It is well worth my time.",
"This conference gives me very valuable information and a renewed spurt to parent more effectively.",
"I attended last year. Loved the topics this year. There were six I would have liked to attend. Great choices!",
"I first came three years ago when I was new stepfather. Been coming every year since!",
"My husband &amp; I have attended in the past &amp; benefited from new ideas &amp; perspectives. ",
"I attend every year!",
"I have attended in the past and always enjoyed and learned from the breakout sessions!",
"I've come every year &amp; love it!",
"This conference re-energizes me and I always walk away with some great information.",
"You can always learn something new here!",
"I attended two years ago and got such great information and wanted more. Thank you for having this available.",
"I attended a Beech Acres conference in March which truly changed my relationship with my daughter. I brought my husband with me this time."
);

var strSep = "|";
var strToDoCookie = "strToDoTestimonials";
var nLength = aMsg.length;

var nMsg = intGetNextImageNumber( false );
	
// in case array has changed and contains less items than may be returned by cookie:
if ( nMsg > nLength - 1 )
	nMsg = intGetNextImageNumber( true );

var strMsg = "";

strMsg += "&nbsp;"
strMsg += "<span class='divMsg'>&quot;" + aMsg[ nMsg ] + "&quot;</span>";
strMsg += "<span class='divSrc'>-2006 Conference Attendee</span>";
strMsg += "&nbsp;"

document.write( strMsg );


//]]>
