
sspeed = 20;

function clip() {
	// width of the banner container
	var contWidth = 785;
	// height of the banner container
	var contHeight = 90;

	var id1 = document.getElementById('slideA');
	var id2 = document.getElementById('slideB');

	//id1.style.left = parseInt(id1.style.left)-1 + 'px';
	id1.style.left = parseInt(id1.style.left)-1 + 'px';

	document.getElementById('homeslide').style.width = contWidth + "px";
	document.getElementById('homeslide').style.clip = 'rect(auto,'+ contWidth +'px,' + contHeight +'px,auto)';
	id2.style.display = '';

	if(parseFloat(id1.style.left) == -(contWidth))
	{
		id1.style.left = '785px';
	}
	setTimeout(clip, sspeed);
}


function sover()
{
	var id1 = document.getElementById('slideA');
	id1.style.left = parseInt(id1.style.left) + 1 + 'px';
	setTimeout(sover, sspeed);
}

function sout()
{
	var id1 = document.getElementById('slideA');
	id1.style.left = parseInt(id1.style.left) - 1 + 'px';
	setTimeout(sout, sspeed);
}



function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function')
	{
		window.onload = func;
	}
	else
	{
		window.onload = function()
		{
			if (oldonload)
			{
				oldonload();
			}
			func();
		}
	}
	}
	
	addLoadEvent(function()
	{
		clip();
	}
);
