var rotateid = '';

function rotatethumb(obj)
{
 var urlth = obj.src.substring(0, obj.src.length - 5);
 var thnum = obj.src.substring(obj.src.length - 5, obj.src.length - 4);
 var thnumok = parseInt(thnum) + 1;
 if (thnumok > 4) thnumok = 1;
 obj.src = urlth + thnumok + ".jpg";
}

function rotatethumbstart(obj, time)
{
 if (typeof time == "undefined") { time = 800; }
 rotatethumb(obj);
 rotateid = setInterval(function() { rotatethumb(obj); }, time);
}

function rotatethumbstop()
{
 clearInterval(rotateid);
}

//

window.onload = function()
{
 var anchors = document.getElementsByTagName('img');
 
 for(var i = 0; i < anchors.length; i++)
 {
  var anchor = anchors[i];
  if (anchor.className == "insiders")
  {
   anchor.onclick = function() { window.open("/goto1.php", 'PORNO', 'scrollbars=yes,toolbar=yes,location=yes,status=yes,menubar=yes,resizable=yes,dependent=no'); }
  }
 }
}
