<!--
var speed = 40;
var initspeed = 5000;
var loop, timerID, direction;
var interspeed = 1000;
var divpos = 0;
var divmax = 188;
var skip_len = 188 * 4;

var barspeed = 1;
var barno, barloop, bartimerID, bardir;

loop = false;
direction = "Left";

//window.onResize = ResizeEle();
//window.onLoad = MaxScr();

function ScrollLeft(obj, objC, amount)
{
	x = parseInt(obj.style.left);
	xWidth = parseInt(obj.style.width);
/*
	if(x<(-xWidth))
		{x = 760;}
	else
		{x = x - amount;}
*/
	bEOL = false;
/*		alert(x);
		alert(-xWidth + skip_len);*/
	if(x<=(-xWidth + skip_len))
	{
		direction="Right";
		bEOL = true
	}
	else
	{x = x - amount;}
		
	obj.style.left = x;

	return bEOL;
}

function ScrollRight(obj, objC, amount, bSkip)
{
	x = parseInt(obj.style.left);
/*
	if(x>760)
		{xWidth=parseInt(obj.style.width);x=-xWidth}
	else
		{x=x+amount;}
*/
	bEOL = false;
	if(x>=0)
	{
		direction="Left";
		bEOL = true
	}
	else
	{x=x+amount;}

	obj.style.left = x;
	return bEOL;
}

function DoScroll()
{
	if(direction=="Left")
	{
//		ScrollLeft(document.getElementById("idShowcaseContent"),document.getElementById("idShowcaseContainer"),1);
		ScrollLeft(document.getElementById("idListingContent"),document.getElementById("idListingContainer"),1);
	}
	else
	{
//		ScrollRight(document.getElementById("idShowcaseContent"),document.getElementById("idShowcaseContainer"),1);
		ScrollRight(document.getElementById("idListingContent"),document.getElementById("idListingContainer"),1);
	}
	if(loop) 
	{
		timerID = setTimeout("DoScroll()", speed);	
/*
		divpos++;
		if(divpos>=divmax)
		{
			divpos = 0;
			timerID = setTimeout("DoScroll()", interspeed);
		}
		else
		{
			timerID = setTimeout("DoScroll()", speed);
		}
*/
	}
}

function Skip(nDir)
{
	if(nDir==-1)
	{
//		ScrollLeft(document.getElementById("idShowcaseContent"),document.getElementById("idShowcaseContainer"),skip_len);
		bEOL = ScrollLeft(document.getElementById("idListingContent"),document.getElementById("idListingContainer"),skip_len);
		if(bEOL==true)
		{
			obj = document.getElementById("idNextPage");
			sLocation = String(obj);
			if(obj!=null)
			{
				window.document.location = sLocation;
			}
		}
	}
	else
	{
//		ScrollRight(document.getElementById("idShowcaseContent"),document.getElementById("idShowcaseContainer"),skip_len);
		bEOL = ScrollRight(document.getElementById("idListingContent"),document.getElementById("idListingContainer"),skip_len);
		if(bEOL)
		{
			obj = document.getElementById("idPrevPage");
			sLocation = String(obj);
			if(obj!=null)
			{
			 	window.location = sLocation;
			}
		}
	}
	return;
}

function BeginScroll(direc)
{
	if(!loop)
	{
		direction = direc;
		timerID = setTimeout("DoScroll()", speed);
		loop = true;
	}
	else
	{
		direction = direc;
		if(timerID) clearTimeout(timerID);
		timerID = setTimeout("DoScroll()", speed);
		loop = true;
	}
}

function ToggleScroll()
{
	if(loop)
	{
		if(timerID) clearTimeout(timerID);
		loop = false;
		if(direction=="Left")
			direction = "Right";
		else
			direction = "Left";
	}
	else
	{
		timerID = setTimeout("DoScroll()", speed);
		loop = true;
	}
}

function InitScroll(direc)
{
	if(!loop)
	{
		direction = direc;
		timerID = setTimeout("DoScroll()", initspeed);
		loop = true;
	}
	else
	{
		direction = direc;
		EndScroll();
		timerID = setTimeout("DoScroll()", initspeed);
		loop = true;
	}
}

function ScrollBarLeft(obj, objC, amount)
{
	x = parseInt(obj.style.left);
	xWidth = parseInt(obj.style.width);
	xcWidth = parseInt(objC.style.width);
	
	if(x>(xcWidth-xWidth)) {x = x - amount;}
			
	obj.style.left = x;
}

function ScrollBarRight(obj, objC, amount)
{
	x = parseInt(obj.style.left);

	if(x<=0) {x=x+amount;}
	
	obj.style.left = x;
}

function DoBarScroll()
{
	if(bardir==-1)
	{
		switch(barno)
		{
			case 1:	
				ScrollBarLeft(document.getElementById("idLb1Content"),document.getElementById("idLb1Container"),1);				
				break;
			case 2:	
				ScrollBarLeft(document.getElementById("idLb2Content"),document.getElementById("idLb2Container"),1);
				break
			case 3:	
				ScrollBarLeft(document.getElementById("idLb3Content"),document.getElementById("idLb3Container"),1);
				break;
			default:
				break;
		}
	}
	else
	{
		switch(barno)
		{
			case 1:	
				ScrollBarRight(document.getElementById("idLb1Content"),document.getElementById("idLb1Container"),1);				
				break;
			case 2:	
				ScrollBarRight(document.getElementById("idLb2Content"),document.getElementById("idLb3Container"),1);
				break
			case 3:	
				ScrollBarRight(document.getElementById("idLb3Content"),document.getElementById("idLb3Container"),1);
				break;
			default:
				break;		
		}
	}

	if(barloop) {bartimerID = setTimeout("DoBarScroll()", barspeed);}
}

function PerformScroll(nBarNo, direc)
{
	bardir = direc;
	barno = nBarNo;
	bartimerID = setTimeout("DoBarScroll()", barspeed);
	bartimerID = setTimeout("DoBarScroll()", barspeed);
	bartimerID = setTimeout("DoBarScroll()", barspeed);
	bartimerID = setTimeout("DoBarScroll()", barspeed);
	barloop = true;
}

function CeaseScroll(nBarNo)
{
	barno = nBarNo;
	if(bartimerID) clearTimeout(bartimerID);	
	barloop = false;	
}

function ResizeEle()
{
	idListBar2Ctrl.innerText = "";
	idListBar3Ctrl.innerText = "";
	idListingContainerCtrl.innerText = "";
}


-->