﻿<!--
/* define image width and height */

var pic_width=210;
var pic_height=150;

/* define image urls */

if (document.images)
 {
     pic1= new Image(pic_width,pic_height);
     pic1.src="images/indexroll/csalad_4_roll.jpg";  
     pic2= new Image(pic_width,pic_height); 
     pic2.src="images/indexroll/csalad_2_roll.jpg"; 
     pic3= new Image(pic_width,pic_height);
     pic3.src="images/indexroll/egyeb_5_roll.jpg";  
     pic4= new Image(pic_width,pic_height);
     pic4.src="images/indexroll/spec_1_roll.jpg";  
     pic5= new Image(pic_width,pic_height);
     pic5.src="images/indexroll/egyeb_3_roll.jpg"; 
 }    

/* define text for image captions  */

var destext= new Array(5)
    destext[0]="5 lakásos társasház";
    destext[1]="Családi lakóház";
    destext[2]="Ifjúsági ház";
    destext[3]="Afrika madárröpde";
    destext[4]="Gabonaszárító és előtároló";
 
var pics= new Array(5) 
   pics[0]=pic1.src;
   pics[1]=pic2.src;
   pics[2]=pic3.src;
   pics[3]=pic4.src;
   pics[4]=pic5.src; 

var numpics=5;
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'>");
	   	   document.write("<form name='form2' id='form2'><input type=\"text\" style=\"background-color:#000; color:#fff;\" name='text1' id='text1' value='"+destext[thenum]+"'></form>");
      setTimeout('change_it2()',5000);  
	   
   }
}

function change_it2()
{
  var x=0;
  thenum+=1;

  if (thenum>numpics-1)
    thenum=0;

  document[imgName].src=pics[thenum];
  document.form2.text1.value=destext[thenum];
  x+=1;
  setTimeout('change_it2()',5000);
}
//-->


