var pic_width=800;
var pic_height=200;

/* define image urls */

if (document.images)
 {
     pic1= new Image(pic_width,pic_height);
     pic1.src="http://www.golfinfocyprus.com/pafos/st_george_hotel/images/hotel_cyprus_cocktail_bar_800.jpg";  
     pic2= new Image(pic_width,pic_height); 
     pic2.src="http://www.golfinfocyprus.com/pafos/st_george_hotel/images/hotel_cyprus_golf_course_tsada_800.jpg"; 
     pic3= new Image(pic_width,pic_height);
     pic3.src="http://www.golfinfocyprus.com/pafos/st_george_hotel/images/hotel_cyprus_golf_secret_valley_800.jpg";  
     pic4= new Image(pic_width,pic_height);
     pic4.src="http://www.golfinfocyprus.com/pafos/st_george_hotel/images/hotel_cyprus_hotell_resort_800.jpg";  
	 pic5= new Image(pic_width,pic_height);
     pic5.src="http://www.golfinfocyprus.com/pafos/st_george_hotel/images/hotel_cyprus_putting_green_secret_valley_800.jpg";
	 pic6= new Image(pic_width,pic_height);
     pic6.src="http://www.golfinfocyprus.com/pafos/st_george_hotel/images/hotel_cyprus_sunset_pool_800.jpg";
	 pic7= new Image(pic_width,pic_height);
     pic7.src="http://www.golfinfocyprus.com/pafos/st_george_hotel/images/hotel_cyprus_wedding_800.jpg";
	 pic8= new Image(pic_width,pic_height);
     pic8.src="http://www.golfinfocyprus.com/pafos/st_george_hotel/images/hotel_cyprus_wedding_table_800.jpg";
	      
 }    

/* define text for image captions  */

var destext= new Array(8)
    destext[0]="St. George Hotel, Cyprus";
    destext[1]="St. George Hotel, Cyprus";
    destext[2]="St. George Hotel, Cyprus";
	destext[3]="St. George Hotel, Cyprus";
    destext[4]="St. George Hotel, Cyprus";
	destext[5]="St. George Hotel, Cyprus";
	destext[6]="St. George Hotel, Cyprus";
	destext[7]="St. George Hotel, Cyprus";

 
var pics= new Array(8) 
   pics[0]=pic1.src;
   pics[1]=pic2.src;
   pics[2]=pic3.src;
   pics[3]=pic4.src;
   pics[4]=pic5.src;
   pics[5]=pic6.src;
   pics[6]=pic7.src;
   pics[7]=pic8.src;


var numpics=8;
var thenum=0;
imgName="img1";

function change_it()
 {
   if (document.images)
    {
      document.write("<IMG SRC='"+pics[thenum]+"' border='0' width='"+pic_width+"' height='"+pic_height+"' name='img1'>\n");
      
      setTimeout('change_it2()',5000);  
   }
}

function change_it2()
 {
         var x=0;
         thenum+=1;

           if (thenum>numpics-1)
             thenum=0;

           document[imgName].src=pics[thenum];
           
           x+=1;
           setTimeout('change_it2()',4000);
          
 }
