var dimages=new Array();

dimages[0]=new Image();
dimages[0].src="images/thumb_success_at_english_testbook_6.jpg";
dimages[0].link="index.php?pn=6th-grade-test-book-6-sinif-ingilizce-soru-bankasi";
dimages[1]=new Image();
dimages[1].src="images/thumb_success_at_english_testbook_7_cover.jpg";
dimages[1].link="index.php?pn=7th-grade-test-book-7-sinif-ingilizce-soru-bankasi";
dimages[2]=new Image();
dimages[2].src="images/thumb_success_at_english_testbook_8_cover.jpg";
dimages[2].link="index.php?pn=8th-grade-test-book-8-sinif-ingilizce-soru-bankasi";

dimages[3]=new Image();
dimages[3].src="images/thumb_success_at_english_suppbook_4.jpg";
dimages[3].link="index.php?pn=4th-grade-supplementary-book-4-sinif-ingilizce-yardimci-kitap-turkce-konu-anlatimli";
dimages[4]=new Image();
dimages[4].src="images/thumb_success_at_english_suppbook_5.jpg";
dimages[4].link="index.php?pn=5th-grade-supplementary-book-5-sinif-ingilizce-yardimci-kitap-turkce-konu-anlatimli";
dimages[5]=new Image();
dimages[5].src="images/thumb_success_at_english_suppbook_tr_6.jpg";
dimages[5].link="index.php?pn=6th-grade-supplementary-book-6-sinif-ingilizce-yardimci-kitap-turkce-konu-anlatimli";
dimages[6]=new Image();
dimages[6].src="images/thumb_success_at_english_book_tr_instruction_7_cover.jpg";
dimages[6].link="index.php?pn=7th-grade-supplementary-book-7-sinif-ingilizce-yardimci-kitap-turkce-konu-anlatimli";
dimages[7]=new Image();
dimages[7].src="images/thumb_success_at_english_book_tr_instruction_8_cover.jpg";
dimages[7].link="index.php?pn=8th-grade-supplementary-book-8-sinif-ingilizce-yardimci-kitap-turkce-konu-anlatimli";

dimages[8]=new Image();
dimages[8].src="images/thumb_success_at_english_vocabularybook_4_cover.jpg";
dimages[8].link="index.php?pn=4th-grade-vocabulary-book-4-sinif-ingilizce-kelime-kitap";
dimages[9]=new Image();
dimages[9].src="images/thumb_success_at_english_vocabularybook_5_cover.jpg";
dimages[9].link="index.php?pn=5th-grade-vocabulary-book-5-sinif-ingilizce-kelime-kitap";
dimages[10]=new Image();
dimages[10].src="images/thumb_success_at_english_vocabularybook_6_cover.jpg";
dimages[10].link="index.php?pn=6th-grade-vocabulary-book-6-sinif-ingilizce-kelime-kitap";
dimages[11]=new Image();
dimages[11].src="images/thumb_success_at_english_vocabularybook_7_cover.jpg";
dimages[11].link="index.php?pn=7th-grade-vocabulary-book-7-sinif-ingilizce-kelime-kitap";
dimages[12]=new Image();
dimages[12].src="images/thumb_success_at_english_vocabularybook_8_cover.jpg";
dimages[12].link="index.php?pn=8th-grade-vocabulary-book-8-sinif-ingilizce-kelime-kitap";

dimages[13]=new Image();
dimages[13].src="images/thumb_success_at_english_yaprak_testler_4.jpg";
dimages[13].link="index.php?pn=4th-grade-4-sinif-ingilizce-yaprak-testler";
dimages[14]=new Image();
dimages[14].src="images/thumb_success_at_english_yaprak_testler_5.jpg";
dimages[14].link="index.php?pn=5th-grade-5-sinif-ingilizce-yaprak-testler";
dimages[15]=new Image();
dimages[15].src="images/thumb_success_at_english_yaprak_testler_6.jpg";
dimages[15].link="index.php?pn=6th-grade-6-sinif-ingilizce-yaprak-testler";
dimages[16]=new Image();
dimages[16].src="images/thumb_success_at_english_yaprak_test_7_cover.jpg";
dimages[16].link="index.php?pn=7th-grade-7-sinif-ingilizce-yaprak-testler";
dimages[17]=new Image();
dimages[17].src="images/thumb_success_at_english_yaprak_test_8_cover.jpg";
dimages[17].link="index.php?pn=8th-grade-8-sinif-ingilizce-yaprak-testler";
dimages[18]=new Image();
dimages[18].src="images/thumb_success_at_english_notebook_45.jpg";
dimages[18].link="index.php?pn=4th-5th-grade-picture-vocabulary-notebook-4-5-sinif-ingilizce-resimli-kelime-defteri";
dimages[19]=new Image();
dimages[19].src="images/thumb_success_at_english_notebook_678.jpg";
dimages[19].link="index.php?pn=6th-7th-8th-grade-picture-vocabulary-notebook-6-7-8-sinif-ingilizce-resimli-kelime-defteri";


var curImage=0;



function swapPicture()
{
  numImages = dimages.length;
  if (document.images)
  {
    var nextImage=curImage+1;
    if (nextImage>=numImages)
      nextImage=0;
    if (dimages[nextImage] && dimages[nextImage].complete)
    {
      var target=0;
      var targetl=0;
      if (document.images.productcover)
        target=document.images.productcover;
      if (document.all && document.getElementById("productcover"))
        target=document.getElementById("productcover");
  
      if (document.links.productlink)
        targetl=document.links.productlink;
      if (document.all && document.getElementById("productlink"))
        targetl=document.getElementById("productlink");
  
      // make sure target is valid.  It might not be valid
      //   if the page has not finished loading
      if (targetl)
      {
        targetl.href=dimages[nextImage].link;
      }

      if (target)
      {
        target.src=dimages[nextImage].src;
        curImage=nextImage;
      }

      setTimeout("swapPicture()", 3000);

    }
    else
    {
      setTimeout("swapPicture()", 500);
    }
  }
}

setTimeout("swapPicture()", 3000);


