
                var photos=new Array()
                var preloadedimages=new Array()
                var picnum=1;
                var time=2500; /*a képek cserélgetése közötti idő millisecundumban 3000=3sec*/
                var changeTime=50;
                var j=0;
				var op=0;
				var op2=1;

                photos[0]="fooldal1.jpg";
                photos[1]="fooldal2.jpg";
                photos[2]="fooldal3.jpg"; /*a cserélgetni kívánt képek link-ei bármekkorára bővíthető*/
                photos[3]="fooldal4.jpg";
				var name=navigator.appName;

                for (j=0;j<photos.length;j++)
                {
                    preloadedimages[j]=new Image();
                    preloadedimages[j].src=photos[j];
                }





				function crossA()
                {
			      var crossTimeId=null;
                  document.getElementById("kepid").style.opacity=op2;
                  document.getElementById("kep1id").style.opacity=op;
                  op2=op2-0.1;
                  op=op+0.1;
                  if (op>=1) 
				  {
					window.clearTimeout(crossTimeId);
					op=1;
					op2=0;
					document.getElementById("kepid").style.opacity=op2;
                    document.getElementById("kep1id").style.opacity=op;
					if (picnum<photos.length-1)
                       picnum++;
                    else
                       picnum=0;
					document.images.picture.src=photos[picnum];
				    return false;
				  }
                  crossTimeId=window.setTimeout("crossA()",changeTime);
				  //op==1 op2==0	
                }
                function crossB()
                {
				  var crossTimeId=null;
                  document.getElementById("kepid").style.opacity=op2;
                  document.getElementById("kep1id").style.opacity=op;
                  op=op-0.1;
                  op2=op2+0.1;
                  if (op<=0)
				  {
					
					window.clearTimeout(crossTimeId);
					op=0;
					op2=1;
					document.getElementById("kepid").style.opacity=op2;
                    document.getElementById("kep1id").style.opacity=op;
					if (picnum<photos.length-1)
                       picnum++;
                    else
                       picnum=0;
					document.images.picture2.src=photos[picnum];
		            return false;
				  }
                  crossTimeId=window.setTimeout("crossB()",changeTime);
				  //op==0 op2==1

                }
				
                function crossA_IE()
                {
			      var crossTimeId=null;
                  document.getElementById("kepid").style.filter='alpha(opacity='+op2*100+')';
                  document.getElementById("kep1id").style.filter='alpha(opacity='+op*100+')';
                  op2=op2-0.1;
                  op=op+0.1;
                  if (op>=1) 
				  {
					window.clearTimeout(crossTimeId);
					op=1;
					op2=0;
					document.getElementById("kepid").style.filter='alpha(opacity='+op2*100+')';
                    document.getElementById("kep1id").style.filter='alpha(opacity='+op*100+')';
					if (picnum<photos.length-1)
                       picnum++;
                    else
                       picnum=0;
					document.images.picture.src=photos[picnum];
				    return false;
				  }
                  crossTimeId=window.setTimeout("crossA_IE()",changeTime);
				  //op==1 op2==0	
                }
                function crossB_IE()
                {
				  var crossTimeId=null;
                  document.getElementById("kepid").style.filter='alpha(opacity='+op2*100+')';
                  document.getElementById("kep1id").style.filter='alpha(opacity='+op*100+')';
                  op=op-0.1;
                  op2=op2+0.1;
                  if (op<=0)
				  {
					
					window.clearTimeout(crossTimeId);
					op=0;
					op2=1;
					document.getElementById("kepid").style.filter='alpha(opacity='+op2*100+')';
                    document.getElementById("kep1id").style.filter='alpha(opacity='+op*100+')';
					if (picnum<photos.length-1)
                       picnum++;
                    else
                       picnum=0;
					document.images.picture2.src=photos[picnum];
		            return false;
				  }
                  crossTimeId=window.setTimeout("crossB_IE()",changeTime);
				  //op==0 op2==1

                }

                function change()
                {
				var ChangeTimeId=null;
				if (op==0)
				{
				   window.clearTimeout(ChangeTimeId);
				   if (name.indexOf("Microsoft")!=-1)
				   {
				   crossA_IE()
				   }
				   else
				   {
				   crossA()
				   }
				}
				
				if(op==1)
				{
				window.clearTimeout(ChangeTimeId);
				if (name.indexOf("Microsoft")!=-1)
				{
				   crossB_IE()
				}
				   else
				   {
				   crossB()
				   }
				}
				ChangeTimeId=window.setTimeout("change()",time);
				}