//Menu Rollovers


function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

/******************************
  Window popup
*******************************/
var photoWin;
function popupWin(URL, winName, features) {
  photoWin=window.open(URL,winName,features)
  if (window.focus) {photoWin.focus()}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; 
  for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; 
  
  if(d.images){ 
    if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; 
    for(i=0; i<a.length; i++)
    
    if (a[i].indexOf("#")!=0){ 
      d.MM_p[j]=new Image; 
      d.MM_p[j++].src=a[i];}
  }
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  
  if(!d) d=document; 

  if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  
  if(!(x=d[n])&&d.all) x=d.all[n]; 
  for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); 
  return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; 
  document.MM_sr=new Array; 
  for(i=0;i<(a.length-2);i+=3)
  
  if ((x=MM_findObj(a[i]))!=null){
    document.MM_sr[j++]=x; 
    if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

/**********************************
  home page image fading: image paths and alt text
**********************************/

var hm_rotate = new Array('images/testimonial1.gif', 'images/testimonial2.gif', 'images/testimonal3.gif');

var hm_rotate_alt = new Array();
hm_rotate_alt[0] = 'The Nature Conservancy and Triplex have worked in partnership on TNC\'s New Member Acquisition Program for many years.  During that time, the Conservancy\'s membership has doubled in size, and Triplex has been an integral part of this program\'s success.  Their flexibility, attention to detail, and expertise have and continue to be very important in our relationship.  It\’s a pleasure to work with an organization that has integrity and commitment to the work of nonprofit organizations.';
hm_rotate_alt[1] = 'I\'ve worked with Triplex for a decade or more and always received great service -- on time and accurate data that I can count on. When I was new to the business, they took me by the hand and walked me through my first merge. Now we\'re partners in my projects. We plan and discuss data hygiene parameters, complicated merges, data profiling and special services like their new match back process that links web giving to my direct mail efforts.';
hm_rotate_alt[2] = 'Having been in the direct mail business for over 25 years, I have seen a lot of data processing companies come and go. I have experienced the best and the worst, and I am delighted to have found Triplex. The caliber, knowledge, and helpfulness of your staff (I am happy to say), make your company a true \'top of the line\' data processing house.';

var rotate_pos = 0;
var rotate_interval = 0;

function rotateImage() {
  swapfade(document.getElementById('hm_rotate'), hm_rotate[rotate_pos], '1', hm_rotate_alt[rotate_pos]);
  if (rotate_pos == hm_rotate.length - 1) {
    rotate_pos = 0;
  } else {
    rotate_pos++;
  }
}

function gotoImage(id) {
  rotate_pos = id;
  rotateImage();
  rotate_interval = setInterval('rotateImage()', 10000);
}

function initRotate() {
  rotateImage();
  rotate_interval = setInterval('rotateImage()', 10000);
}