/* homepage.js */

function rotatememberquote(thediv, quotednum) {
  var memberquote = document.getElementById(thediv);

  var quotenum = 0;
  
  var numquotes = 3;
  
  if (quotednum == undefined) {
    quotenum = Math.floor(Math.random()*numquotes);
  } else if (quotednum < numquotes - 1) {
    quotenum = quotednum + 1;
  }
  
  var login, quotestyle, quote, attribstyle, name, title = "";
  
  switch (quotenum) {
    case 0:
      login = "lagan";
      quotestyle = "padding-top:20px";
      quote = "Every corporate recruiter will want to receive VisualCVs.";
      name = "Heather German,";
      title = "SVP Human Resources, Lagan";
      break;
    case 1:
      login = "microsoftcorporation";
      quote = "VisualCV allows me to build a presence, hear directly from interested candidates, and get a well-rounded view of their fit from their VisualCV.";
      name = "Michael Marlatt";
      title = "Recruiting consultant for Microsoft Corporation";
      break;
    case 2:
      login = "heidrick";
      quotestyle = "padding-top:20px";
      quote = "VisualCV is fresh and relevant to a new generation of leaders.";
      name = "Kevin Kelly,";
      title = "CEO, Heidrick &amp; Struggles";
      break;
  }

  var quotehtml = "";

  quotehtml += '<div class="examplethumb">';
  quotehtml += '<a href="/premier/' + login + '">';
  quotehtml += '<img src="/www/images/sbr_200811/' + login + '.png" width="130" height="140" border="0" />';
  quotehtml += '</a></div>'
  quotehtml += '<div class="quote" onclick="rotateonclick();">';
  quotehtml += '<p style="' + quotestyle + '">&ldquo;' + quote + '&rdquo;</p>';
  quotehtml += '<div class="attrib"><p style="' + attribstyle + '">&ndash; ' + name + '<br />';
  quotehtml += '<span style="color:#ffffff">&ndash;</span>' + title + '</p></div></div>';
  
  memberquote.innerHTML = quotehtml;
  
  return quotenum;
}


