var timer;
var speed = 2;

var lastImagesContainerID="";

//----------------------------->  HORIZONTAL(IMAGES) <------------------------>
function move_index(valu) 
{
    //alert(valu);
    //divImages
    //tdScroller
    obj = document.getElementById("divImages");
    obj.scrollLeft = obj.scrollLeft + (speed*valu);	  
}

function xx(valu)
{
    timer = setTimeout('xx('+valu+')',1);
    move_index(valu);
}

function stopper()
{
    clearTimeout(timer);
}

function clearAllImageItems(count,catID)
{
    
    //alert(count);
    for (i=0;i<=count;i++)
    {
        //alert(i);
        document.getElementById("tdItem"+catID+i).className="tdItem";
        document.getElementById("imgItem"+catID+i).className="imgItem";
    }
}

//----------------------------->  VERTICAL(CATEGORIES) <------------------------>
function move_indexV(valu) 
{
    //alert(valu);
    //divImages
    //tdScroller
    obj = document.getElementById("divCategories");
    obj.scrollTop = obj.scrollTop + (speed*valu);	  
}

function xxV(valu)
{
    timer = setTimeout('xxV('+valu+')',1);
    move_indexV(valu);
}

function stopperV()
{
    clearTimeout(timer);
}

function clearAll(count,controlIdToStore)
{
    if (lastImagesContainerID!="")
    {
        document.getElementById(lastImagesContainerID).innerHTML=document.getElementById("divImagesContainter").innerHTML;
    }
    
    lastImagesContainerID=controlIdToStore;
    //alert(count);
    for (i=0;i<=count;i++)
    {
        document.getElementById("imgCat"+i).className="imgItemCategory";
        document.getElementById("tdCategory"+i).className="tdCategory";
    }

}



