var TESTIMONIALS_TESTIMONIAL       = 0;

var TESTIMONIALS_TESTIMONIAL_NAME  = 1;

var TESTIMONIALS_TESTIMONIAL_TITLE = 2;



var currentTestimonial = 0;

var fadeInColors       = new Array("#EEEEEE", "#DDDDDD", "#CCCCCC", "#BBBBBB", "#AAAAAA", "#999999", "#888888", 

                                   "#777777", "#666666", "#555555", "#444444", "#333333", "#222222", "#111111", "#000000");

var fadeDelay          = 150;          // This is the delay between darkening, in milliseconds, and the larger the number the slower the dae-in



var testimonialContent = new Array(new Array("So far everything is going well.  I think I'll be able to get a lot done around here and the company's future looks real bright.  " + 

                                                "Thanks for all the help in landing me this job; it's exactly what I was looking for in the next step in my career.<br />" + 

                                                "I received the flowers yesterday - thanks.  It definitely brightens up my little cubicle.", 

                                             "Larry Vaugh", "VP Finance"), 

                                   new Array("My experience with Delyse Nash & Associates has been extraordinary.  I was recently placed in a position through DNA and was very " + 

                                                "impressed with the ease of the process of finding a job.  Within 6 days, I had an offer.  " + 

                                                "The recruiters are very sensitive to the time it takes to get a job seeker placed and work very aggressively to place them as soon as possible.  " + 

                                                "They were very knowledgeable with the company background and details of the position.  This prepared me for the interview so that I had the best " + 

                                                "possible chance to get the offer.",

                                             "Dharmesh Patel", "Human Resource Generalist"),

                                   new Array("My experience with DNA was an excellent one; starting with the professionalism shown at the beginning of the process to working " + 

                                                "with me on various opportunities and concluding with me securing a wonderful position at a top tier company.   I would highly recommend " + 

                                                "DNA to both employers and employees.", 

                                             "Steve Solcher", "Controller"),

                                   new Array("DNA has done an excellent job providing strong candidates who have not only   excelled in their work, but also have remained " + 

                                                "with our firm for an extended period.  We are very pleased with the longevity of these individuals.", 

                                             "Kurt Betcher", "  Administrative Partner & CFO, Norwest Venture Partners"),

                                   new Array("DNA has done an excellent job providing strong candidates who have not only   excelled in their work, but also have remained " + 

                                                "with our firm for an extended period.  We are very pleased with the longevity of these individuals.", 

                                             "Kurt Betcher", "  Administrative Partner & CFO, Norwest Venture Partners"),

                                   new Array("I have worked with Delyse when I was searching for a new opportunity for myself and also when I was filling open positions within my organization. She is extremely professional and one of the best recruiters in the Bay Area. She has a great network and can bring qualified candidates to an open position to make the recruitment process fast and efficient. I highly recommend her and her firm.", 

                                             "Drew Nixon", "VP of Finance"),

                                   new Array("Your company is quite different from most executive recruiters, and your added focus on the candidates stands out.  It provides a human dimension to what others treat as 'just business'.  I found it refreshing!", 

                                             "Jay Michlin", "VP"),											 

                                   new Array("[Delyse Nash & Associates] was fabulous when I was unemployed, and I am grateful to your firm for the part-time consulting that I did.",  

                                             "Miriam Russell", "HR Director"));

var testimonialDelay     = 10000;      // This is the delay between the finish of one testimonial and the start of another

var testimonialImageName = "Testimonial";

var testimonialLayerName = "TestimonialLocation";

var wantTestimonials     = true;



function fadeIn(layerName, colorIndex, wantRotating)

{

   var layer = document.getElementById(layerName);



                                       // Do we have a layer to fade in??

   if (layer)

   {

                                       // Yes, set the color to the next color

      layer.style.color = fadeInColors[colorIndex++];



                                       // Are we at the end of the colors??

      if (colorIndex < fadeInColors.length)

      {

                                       // No, wait a bit and do the next color

         window.setTimeout("fadeIn('" + layerName + "', " + colorIndex + ", " + (wantRotating ? "true" : "false") + ")", fadeDelay);

      }

      else                             // Yes, do we want to show the next testimonial??

      {

         if (wantRotating)

         {

                                       // Yes, show it

            window.setTimeout("rotateAllTestimonials()", testimonialDelay);



         }                             // if (wantRotating)



      }                                // if (colorIndex < fadeInColors.length)



   }                                   // if (layer)



}                                      // function fadeIn(layerName, colorIndex, wantRotating)



function fadeOut(layerName, colorIndex, wantRotating)

{

   var layer = document.getElementById(layerName);



                                       // Do we have a layer to fade in??

   if (layer)

   {

                                       // Yes, set the color to the next color

      layer.style.color = fadeInColors[colorIndex--];



                                       // Are we at the end of the colors??

      if (colorIndex >= 0)

      {

                                       // No, wait a bit and do the next color

         window.setTimeout("fadeOut('" + layerName + "', " + colorIndex + ", " + (wantRotating ? "true" : "false") + ")", fadeDelay);

      }

      else                             // Yes, do we want to show the next testimonial??

      {

         if (wantRotating)

         {

                                       // Yes, show it

            window.setTimeout("rotateAllTestimonials()", testimonialDelay);



         }                             // if (wantRotating)



      }                                // if (colorIndex >= 0)



   }                                   // if (layer)



}                                      // fadeOut(layerName, colorIndex, wantRotating)



function getTestimonialHTMLSource(testimonialNo)

{

   var testimonial = testimonialContent[testimonialNo];



   return("<div class='Testimonial'>" + testimonial[TESTIMONIALS_TESTIMONIAL] + 

             "<div class='TestimonialName'>" + testimonial[TESTIMONIALS_TESTIMONIAL_NAME] + "," + 

                                               testimonial[TESTIMONIALS_TESTIMONIAL_TITLE] + 

             "</div></div>");

}                                      // function getTestimonialHTMLSource(testimonialNo)



function rotateAllTestimonials(testimonialNo)

{

   showTestimonial(testimonialNo, true);



}                                      // function rotateAllTestimonials(testimonialNo)



function showAllTestimonials()

{

   var noOfTestimonials = testimonialContent.length;



   document.write("<ul class='Testimonials'>");



   for (var testimonialNo = 0; testimonialNo < noOfTestimonials; testimonialNo++)

   {

      document.write(getTestimonialHTMLSource(testimonialNo));



   }                                   // for (var testimonialNo = 0; testimonialNo < noOfTestimonials; testimonialNo++)

   document.write("</ul>");

}                                      // function showTestimonial



function showTestimonial(testimonialNo, wantRotating)

{

   var testimonialLayer;

                                       // Are we doing a specific testimonial??

   if (! testimonialNo)

   {

                                       // No, use the next one in the list

      testimonialNo = currentTestimonial++;



                                       // Are we doing the last testimonial??

      if (currentTestimonial >= testimonialContent.length)

      {

                                       // Yes, cycle back to the beginning

         currentTestimonial = 0;

//return;

      }                                // if (currentTestimonial >= testimonialContent.length)



   }                                   // if (! testimonialNo)



                                       // Are we doing a valid testimonial??

   if ((testimonialNo < testimonialContent.length) && document.getElementById)

   {

                                       // Yes, display it

      testimonialLayer = document.getElementById(testimonialLayerName);



                                       // Do we have a layer to put the testimonial in??

      if (testimonialLayer)

      {

                                       // Yes, display it

         testimonialLayer.innerHTML = getTestimonialHTMLSource(testimonialNo);



         fadeIn(testimonialLayerName, 0, wantRotating);



      }                                // if (testimonialLayer)



   }                                   // if ((testimonialNo < testimonialContent.length) && document.getElementById)



}                                      // function showTestimonial

/*

function showTestimonial(testimonialNo)

{

                                       // Are we doing a specific testimonial??

   if (! testimonialNo)

   {

                                       // No, use the next one in the list

      testimonialNo = currentTestimonial++;



                                       // Are we doing the last testimonial??

      if (currentTestimonial >= testimonials.length)

      {

                                       // Yes, cycle back to the beginning

         currentTestimonial = 0;



      }                                // if (currentTestimonial >= testimonials.length)



   }                                   // if (! testimonialNo)



                                       // Are we doing a valid testimonial??

   if (testimonialNo < testimonials.length)

   {

                                       // Yes, display it

      document.images[testimonialImageName].src = testimonials[testimonialNo];



   }                                   // if (testimonialNo < testimonials.length)



}                                      // function showTestimonial



*/