

//for div
defaultStep=2
step=defaultStep
var scrollvalue = 1
var scrollmax = 0;
function scrollDivDown(id){
//alert(id)
clearTimeout(timerDown)
document.getElementById(id).scrollTop += step
scrollmax = document.getElementById(id).scrollTop;
scrollvalue = 1;
timerDown=setTimeout("scrollDivDown('"+id+"')",1)
}

function scrollDivUp(id){
//alert(id)    
clearTimeout(timerUp)
scrollmax = document.getElementById(id).scrollTop;
document.getElementById(id).scrollTop -= step
scrollvalue = 2;
timerUp = setTimeout("scrollDivUp('" + id + "')", 1)
}

function LinkHover(id) 
{
    //alert(document.getElementById(id).style.height);    
    if (scrollvalue == 1) 
    {        
        scrollDivDown(id);
    }            
    else if (scrollvalue == 2)
    { scrollDivUp(id); }
}

function Linkhover(Link) {
    //alert(Link);
    document.location.href = Link;     
}

timerDown="" 
timerUp="" 

function stopMe(){
clearTimeout(timerDown) 
clearTimeout(timerUp)
}


//left & right
defaultStep=1 
mystep=defaultStep

//function ScrollDiveLeft(id){
////alert(id)
//clearTimeout(timerleft) 
//document.getElementById(id).scrollLeft+=mystep 
////alert(document.getElementById(id).scrollLeft)
//timerleft=setTimeout("ScrollDiveLeft('"+id+"')",10)
//} 

//function ScrollDiveRight(id){

//clearTimeout(timerright)
//document.getElementById(id).scrollLeft-=mystep 
//timerright=setTimeout("ScrollDiveRight('"+id+"')",10)

//} 

function ScrollDiveLeft(id){
    //alert(id)
    //$('#id').scrollable({circular}).autoscroll({true});
    clearTimeout(timerDown)
    // code for going back to 1st image
//    if (document.getElementById(id).offsetWidth == document.getElementById(id).scrollLeft) {
//        document.getElementById(id).scrollLeft = 0;
    //}
    document.getElementById(id).scrollLeft += step
    //alert(document.getElementById(id).offsetWidth)
timerDown = setTimeout("ScrollDiveLeft('" + id + "')", 1)
} 

function ScrollDiveRight(id){
//alert(id);
    clearTimeout(timerUp)
document.getElementById(id).scrollLeft-=step 
timerUp=setTimeout("ScrollDiveRight('"+id+"')",1)
} 

timerleft="" 
timerright="" 

function stopMee(){
clearTimeout(timerleft) 
clearTimeout(timerright)
}

document.onmousemove=function(){stopMe()}
document.onmousemove=function(){stopMee()}


function learn(obj)
{
	if(document.getElementById(obj).offsetHeight >= 115)
	{
	alert("grater than 115");
	}
	else
	{
	alert("Less then 115");
	}

} 

