// JavaScript Document
<!-- Beginning of JavaScript -
		
// The width of your image (pixels)
var imgwidth=250

// The height of your image (pixels)
var imgheight=180

// The URL of the sliced image
var imgurl="images/bbbb.gif"

// Final horizontal position of the image: distance to the left margin of the window (pixels)
// IMPORTANT: 
// if you want to center the image in the middle of the browser-window then write -1.
// If you want to put the image on a absolute position 
// then write the number (for instance 223).
var x_finalpos=120

// Final vertical position of the image: distance to the top margin of the window
var y_finalpos=150

// Total number of slices
var imgslices=20

// Speed of horizontal gliding
var step=10
var pause=5

// Do not edit the variables below this line
var x_rightspans=0
var x_leftspans=0
var marginright
var marginleft
var height_slice=Math.floor(imgheight/imgslices)
var cliptop=0
var clipbottom=cliptop+height_slice
var clipleft=0
var clipright=imgwidth
var spannummer=0
var spannrbefore=0

function initiate() {
	if (x_finalpos==-1) {
		x_finalpos=Math.floor(document.body.clientWidth/2)-Math.floor(imgwidth/2)
	}
	if (document.all) {
		moveslices_IE()
	}
}

function moveslices_IE() {
if (x_rightspans==0 || x_leftspans==0) {
	if (x_rightspans==0) {
		for (i=0;i<=imgslices-1;i+=2) {
			var thisspan=eval("document.all.span"+i+".style")
			thisspan.posLeft-=step
		}
		if (thisspan.posLeft<=x_finalpos) {
			x_rightspans=1
			for (i=0;i<=imgslices-1;i+=2) {
				var thisspan=eval("document.all.span"+i+".style")
				thisspan.posLeft=x_finalpos
			}
		}
	}
	if (x_leftspans==0) {
		for (i=1;i<=imgslices-1;i+=2) {
			var thisspan=eval("document.all.span"+i+".style")
			thisspan.posLeft+=step
		}
		if (thisspan.posLeft>=x_finalpos) {
			x_leftspans=1
			for (i=1;i<=imgslices-1;i+=2) {
				var thisspan=eval("document.all.span"+i+".style")
				thisspan.posLeft=x_finalpos
			}
		}
	}
	var timer=setTimeout("moveslices_IE()",pause)
}
	else {
		clearTimeout(timer)
	}
}