/*
 * This file contains functions to auto rotate PTViewer pans 
 */
var timeout = 5000;

setTimeout('checkIdle();',timeout);

function checkIdle() {
  if (document.ptviewer.getAutoPan() == false) {
    x1 = document.ptviewer.get_x();
    setTimeout('nextX(x1);',1000);
    }
  else setTimeout('checkIdle();',timeout);
 }

function nextX(x1) {
  x2 = document.ptviewer.get_x();
  if (x1 == x2) {
    //document.ptviewer.gotoView(0,0,70);
    document.ptviewer.startAutoPan(0.5,0.0,1.0);
    }
  setTimeout('checkIdle();',timeout);
  }
 
