var curpos = 0, offs = 64, direction = 0, idto = -1, attempt = 4; to = 650, run = 1;
function launcher() {
var divs = document.getElementsByTagName('span'), launched = false;
for (i=0; i<divs.length; i++)
if (divs[i].id == 'slideimg') {
	if (idto != -1) clearTimeout(idto);
	launched = true; idto = setTimeout('shift()', 500); break;
}
if (launched == false)
	if (attempt != 0) { attempt--; idto = setTimeout('launcher()', 2000); } else clearTimeout(idto);
}
function shift(){
	var obj1 = document.getElementById('slideimg');
	to = 650;
	if (direction == 0) {
		obj1.style.backgroundPosition = -(curpos++*offs)+'px 0px';
		if (curpos == 8) direction = 1; else if(curpos == 1) to = 2000;
	} else {
		obj1.style.backgroundPosition = -(curpos--*offs)+'px 0px';
		if (curpos == 0) direction = 0; else if(curpos == 7) to = 2000;
	}
	idto = setTimeout('shift()', to);
}
function freeze() {if (run) {run=0;clearTimeout(idto);} else {run=1;idto = setTimeout('shift()', to);}}
launcher();

