// JavaScript Document

	but_points_x=new Array(105, 90, 75, 50, 40, 30,25, -5);
	but_points_y=new Array(70,  70, 50,  3,  8,  3, 8, 30);
	but_px=new Array(but_points_x.length);
	but_py=new Array(but_points_x.length);
   	var but_x,but_y,but_i,timeout;
	var butt_layer;
	var butt_movie;

 function butterfly()
 {
	if (Math.abs(but_x-but_px[but_i])<1 && Math.abs(but_y-but_py[but_i])<1){
		but_i=but_i+1;
		if (but_i>=but_px.length){
			but_i=1;
			but_x=but_px[0];	but_y=but_py[0];
		}
	}
	x=but_x; y=but_y; ex=but_px[but_i]; ey=but_py[but_i];
	uni=Math.sqrt(((ex-x)*(ex-x))+((ey-y)*(ey-y)));
	but_x=x+(ex-x)/uni;
	but_y=y+(ey-y)/uni;
    butt_layer.style.left=but_x + "px";
	butt_layer.style.top=but_y + "px";	
	clearTimeout(timeout);	
	timeout=setTimeout("butterfly()",10)   
 }
 
 function butterfly_init()
 {
 	but_i=1;
	for (i=0;i<but_px.length;i++){
		but_px[i]=but_points_x[i]*myWidth*0.8/100+0.1*myWidth;		//CHANGE HERE
		but_py[i]=but_points_y[i]*myHeight/100+0.1*myHeight;	//CHANGE HERE
		}
	butt_movie.width=0.05*myWidth;
	butt_movie.height=1.21*0.05*myWidth;
	
	but_x=but_px[0];	but_y=but_py[0];
	butt_layer.style.left=but_x + "px";
	butt_layer.style.top=but_y + "px";
    butt_layer.style.visibility="visible";	
	timeout=setTimeout("butterfly()",10);
 }
 