var TestimonialQuotes = new Array();
var TestimonialQuotesLength = 0;

//EDITABLE SECTION
////////////////////////////////////////////////////////

var DurationInSeconds = 12; //This sets how many seconds a testimonial is visible before fading out.
var FadeDelayInSeconds = 1; //How many seconds it takes text to fades in or out.
var Random = 1; //Show testimonials in random order. 1 = Yes, 0 = No.

//TESTIMONIALS
//If a testimonial contains an apostrophe, you must put a backslash (\) before it. For example, if the testimonials text
//is 'This is someone's testimonial' it should be 'This is someone\'s testimonial'

////////////////////////////////////////////////////
TestimonialQuotesLength = TestimonialQuotes.length;
TestimonialQuotes[TestimonialQuotesLength] = new Array();
TestimonialQuotes[TestimonialQuotesLength][0] =
'We are very grateful for your terrific help with our search. You led us to two excellent but different choices to consider. It really challenged us to carefully re-examine our search goals--a good thing. We achieved a strong consensus on our decision and as we begin to introduce our new director within and outside of the organization, we are getting strong signals that we made the right choice.';

TestimonialQuotes[TestimonialQuotesLength][1] =
'Jill Goldthwait<br />Search Chair - Board of Directors, Maine Sea Coast Mission';

TestimonialQuotes[TestimonialQuotesLength][2] = 40;


////////////////////////////////////////////////////
TestimonialQuotesLength = TestimonialQuotes.length;
TestimonialQuotes[TestimonialQuotesLength] = new Array();
TestimonialQuotes[TestimonialQuotesLength][0] =
'I worked extensively with Mary Wheeler of DRG in our recent search for an Executive Director at the Neighborhood Coalition for Shelter. Mary was superb at listening to our board and challenging us to think carefully about the type of leader we wanted in our organization. She also marshaled DRG resources to interview and select exceptional candidates for our review. In the end, we were extremely pleased with the candidate we selected and are grateful for Mary\s hard work and expertise.';

TestimonialQuotes[TestimonialQuotesLength][1] =
'David Oliver<br />Board President - Neighborhood Coalition for Shelter';

TestimonialQuotes[TestimonialQuotesLength][2] = 40;


////////////////////////////////////////////////////
TestimonialQuotesLength = TestimonialQuotes.length;
TestimonialQuotes[TestimonialQuotesLength] = new Array();
TestimonialQuotes[TestimonialQuotesLength][0] =
'DRG and its staff did an extraordinary job from our first meeting to our last in building a pool of excellent candidates, and then narrowing it down to a manageable number. The guidance we received along the way was solid and invaluable. There was never a moment when we felt DRG was not at our side as we moved the selection process. Totally professional and thorough is the best way to describe the firm and its people.';

TestimonialQuotes[TestimonialQuotesLength][1] =
'Brian J. Laline<br />Board Secretary - Snug Harbor Cultural Center and Botanical Garden';

TestimonialQuotes[TestimonialQuotesLength][2] = 40;



////////////////////////////////////////////////////
TestimonialQuotesLength = TestimonialQuotes.length;
TestimonialQuotes[TestimonialQuotesLength] = new Array();
TestimonialQuotes[TestimonialQuotesLength][0] =
'I was head of the 12 member search committee as we looked for a new CEO for our $30 MM agency. We interviewed several search firms, and David Edell and DRG were without comparison. He helped design our search process, got us a good number of qualified candidates to interview, and was always available to us throughout the process. We were not able to reach an agreement with the finalist and needed to begin again. He was as energetic and thorough during the second round of outreach and we ultimately engaged a terrific new CEO. I can recommend David and DRG\s knowledgeable staff without qualification. I was relieved and disappointed in the end of our search - we had found just what we were looking for, but that meant my working relationship with David was over for the moment. Now, one year later, I am can report that David has remained in contact with us during the CEO\s first year and that our new CEO has proved to be the leader we needed as our staff and Board try to provide a high level of service during these tough financial times.';

TestimonialQuotes[TestimonialQuotesLength][1] =
'Judy Feldman<br />Chair of Search Committee - Jewish Child and Family Services of Chicago';

TestimonialQuotes[TestimonialQuotesLength][2] = 0;



////////////////////////////////////////////////////
TestimonialQuotesLength = TestimonialQuotes.length;
TestimonialQuotes[TestimonialQuotesLength] = new Array();
TestimonialQuotes[TestimonialQuotesLength][0] =
'As a candidate for a position for which DRG conducted the search, I found DRG to be exceptional. I was kept well informed throughout the search process, enabling me to be well prepared for each step in what eventually resulted in my securing a superb professional position. Of particular note is that DRG has continued to provide good guidance and counsel to me.<br /><br />In my role as a chief executive, I have asked DRG to conduct searches for organizations which the foundation I lead funds. DRG has been great in uncovering - and attracting - talent. Their management of the search and interview processes is top notch.';

TestimonialQuotes[TestimonialQuotesLength][1] =
'Chip Edelsberg Ph.D<br />Executive Director, Jim Joseph Foundation';

TestimonialQuotes[TestimonialQuotesLength][2] = 10;


////////////////////////////////////////////////////

TestimonialQuotesLength = TestimonialQuotes.length;
TestimonialQuotes[TestimonialQuotesLength] = new Array();
TestimonialQuotes[TestimonialQuotesLength][0] =
'You did an extraordinary job understanding the nature of our organization so that you could attune the search to exactly what we were looking for (rather than just spinning the rolodex and delivering people you had waiting in the wings.)<br /><br />I honestly believe that in this way DRG is different from almost any other firm I\'ve worked with, on either side of the table.<br /><br />Just thought I would pass along my comments and thank you again for the good work you did for us.';

TestimonialQuotes[TestimonialQuotesLength][1] =
'Michael Johnston<br />Chief Executive Officer, United Way of Western Connecticut';

TestimonialQuotes[TestimonialQuotesLength][2] = 15;


////////////////////////////////////////////////////
TestimonialQuotesLength = TestimonialQuotes.length;
TestimonialQuotes[TestimonialQuotesLength] = new Array();
TestimonialQuotes[TestimonialQuotesLength][0] =
'Having worked at New York University in a fundraising capacity over the past 20 years, I have had the professional pleasure of working with several executive search firms. Most recently, as Senior Vice President for Development and Alumni Relations (covering 16 colleges and schools with the University), I have worked with DRG, Inc., specifically David Cheng - one of our very own alumnus - and I am amazed and satisfied with their ability to listen and understand the needs of their clients. They truly understand the breadth and depth of our educational and fundraising mission and, as a result, have surfaced many wonderful employee candidates for us. DRG, Inc. always thinks "outside the box" and delivers professional talent from many diverse sources. These DRG candidates have become viable, senior members of our department\'s team. I strongly endorse DRG, Inc. as our executive search vendor of choice.';

TestimonialQuotes[TestimonialQuotesLength][1] =
'Debra LaMorte<br />Senior Vice President for Development and Alumni Relations at NYU';

TestimonialQuotes[TestimonialQuotesLength][2] = 0;


////////////////////////////////////////////////////
TestimonialQuotesLength = TestimonialQuotes.length;
TestimonialQuotes[TestimonialQuotesLength] = new Array();
TestimonialQuotes[TestimonialQuotesLength][0] =
'Months into our search for an Executive Director we had a major setback. Our finalist candidate was suddenly no longer in a position to consider our opportunity. DRG quickly marshaled the necessary resources, to ensure that we could efficiently extend our outreach while maintaining our exceptionally high standards. We considered panicking. They did not. And in the end, David Edell and Daniel Ripps, our DRG team, managed to interest several promising candidates who had been unavailable during our first go-round. Following a thorough vetting process, we made an offer and successfully filled the position with a wonderful individual. I\'m not saying I would ever want to go through this again - but if I ever have to, I know whom I will call.';

TestimonialQuotes[TestimonialQuotesLength][1] =
'Bethany Hornthal<br />Past President and Search Committee Chair, Jewish Community Center of San Francisco';

TestimonialQuotes[TestimonialQuotesLength][2] = 15;


//DO NOT EDIT BELOW THIS LINE
///////////////////////////////////////////////////////

var Current_Testimonial = 0;
var Interval = 0;

function ShuffleArray(A)
{
	for(var j, x, i = A.length; i; j = parseInt(Math.random() * i), x = A[--i], A[i] = A[j], A[j] = x);
	return A;
};

if (Random)
{
   TestimonialQuotes = ShuffleArray(TestimonialQuotes);
}

var Testimonials = new Array();

var FaderText = '';

for (var i=0; i<TestimonialQuotes.length; i++)
{   
   FaderText = '<b>' + TestimonialQuotes[i][0] + '</b><br /><br /><i>' + TestimonialQuotes[i][1] + '</i>';
   Testimonials[i] = new Fader(i, FaderText, TestimonialQuotes[i][2]);
}

var Testimonial_Quote_Left = new Fader('quote_left', '&ldquo;', 0);
var Testimonial_Quote_Right = new Fader('quote_right', '&rdquo;', 0);

function Fader(ID, Testimonial_Text, TopOffset)
{
   this.ObjID = ID;
   this.ObjText = Testimonial_Text;
   this.increment = 0.1;
   this.el_id = 'testimonial_' + ID;
   this.currentOpacity = 0;
   this.delay = 100*FadeDelayInSeconds;
   this.TopOffset = TopOffset;

   this.fade_in = function(Type)
   {
      this.currentOpacity = 0;
      if (Type == 'testimonial')
      { 
         setTimeout("Testimonials["+this.ObjID+"].increase_opacity('testimonial')", this.delay);     
      }
      else if (Type == 'quote_left')
      {
         setTimeout("Testimonial_Quote_Left.increase_opacity('quote_left')", this.delay);
      }
      else if (Type == 'quote_right')
      {
         setTimeout("Testimonial_Quote_Right.increase_opacity('quote_right')", this.delay);
      }         
         
   }   

   this.fade_out = function(Type)
   {
      this.currentOpacity = 1;
      if (Type == 'testimonial')
      {
         setTimeout("Testimonials["+this.ObjID+"].reduce_opacity('testimonial')", 10);
      }
      else if (Type == 'quote_left')
      {
         setTimeout("Testimonial_Quote_Left.reduce_opacity('quote_left')", 10);
      }
      else if (Type == 'quote_right')
      {
         setTimeout("Testimonial_Quote_Right.reduce_opacity('quote_right')", 10);
      }   
   }

   this.reduce_opacity = function(Type)
   {
      var el = document.getElementById(this.el_id);

      if (el.filters)
      {
         el.filters.alpha.opacity = (100*this.currentOpacity);
      }
      else
      {
         el.style.opacity = this.currentOpacity;
      }

      if (this.currentOpacity > 0)
      {
	     this.currentOpacity -= this.increment;
	     
	     if (Type == 'testimonial')
	     {
	        setTimeout("Testimonials["+this.ObjID+"].reduce_opacity('testimonial')", this.delay);
	     }
	     else if (Type == 'quote_left')
	     { 
	        setTimeout("Testimonial_Quote_Left.reduce_opacity('quote_left')", this.delay);
	     }
	     else if (Type == 'quote_right')
	     {
   	        setTimeout("Testimonial_Quote_Right.reduce_opacity('quote_right')", this.delay); 
	     }   
      }
   }

   this.increase_opacity = function(Type)
   {
      var el = document.getElementById(this.el_id);

      if (el.filters)
      {
         el.filters.alpha.opacity = (100*this.currentOpacity);
      }
      else
      {
         el.style.opacity = this.currentOpacity;
      }

      if (this.currentOpacity < 1)
      {
	     this.currentOpacity += this.increment;
	     
	     if (Type == 'testimonial')
	     {
	        setTimeout("Testimonials["+this.ObjID+"].increase_opacity('testimonial')", this.delay);
	     }
	     else if (Type == 'quote_left')
	     {
	        setTimeout("Testimonial_Quote_Left.increase_opacity('quote_left')", this.delay);
	     }
	     else if (Type == 'quote_right')
	     {
   	        setTimeout("Testimonial_Quote_Right.increase_opacity('quote_right')", this.delay);
	     }    
      }
   }
   
   this.change_quotes = function()
   {
	  Testimonial_Quote_Left.fade_out('quote_left');
	  Testimonial_Quote_Right.fade_out('quote_right');
      this.reset_quotes();  
   }   
   
   this.reset_quotes = function()
   {  
      document.getElementById('testimonial_quote_left').style.top = this.TopOffset + 'px'; 
      document.getElementById('testimonial_quote_right').style.top = (170 - this.TopOffset) + 'px';
      Testimonial_Quote_Left.fade_in('quote_left');        
      Testimonial_Quote_Right.fade_in('quote_right');  
   }   
}

function start_testimonials()
{
   Testimonials[0].fade_in('testimonial');
   Interval = setInterval("next_testimonial_quote()", DurationInSeconds*1000);
}

function next_testimonial_quote()
{
    Testimonials[Current_Testimonial].fade_out('testimonial');	    

	Current_Testimonial++;

	if(Current_Testimonial == Testimonials.length)
	{
	   Current_Testimonial = 0;
	}

    Testimonials[Current_Testimonial].change_quotes();
    
	Testimonials[Current_Testimonial].fade_in('testimonial');	
}

function NextTestimonial()
{
   if (Interval)
   {
      clearInterval(Interval);
   }

   next_testimonial_quote();
   Interval = setInterval("next_testimonial_quote()", DurationInSeconds*1000);
}


