﻿// JScript File



var speed=2

var iens6=document.all||document.getElementById
var ns4=document.layers


var crossobj;
var contentheight;
var ContentID
function movedown(pContentID)
{
ContentID=pContentID;
fnMovedown()
    
}
function moveup(pContentID)
{
ContentID=pContentID;
fnMoveup()
    
}
function fnMovedown()
{
 
    crossobj = document.getElementById(ContentID);
    contentheight = crossobj.offsetHeight;

    if (window.moveupvar) clearTimeout(moveupvar)

    if (iens6 && parseInt(crossobj.style.top)>=(contentheight*(-1)+100))
    {

    crossobj.style.top=parseInt(crossobj.style.top)-speed+"px"
    }
    else if (ns4&&crossobj.top>=(contentheight*(-1)+100))
    {

    crossobj.top-=speed+"px";
    }
    movedownvar=setTimeout("fnMovedown()",20)
}

function stopscroll(){
if (window.moveupvar) clearTimeout(moveupvar)
if (window.movedownvar) clearTimeout(movedownvar)
}

function fnMoveup(){
crossobj = document.getElementById(ContentID);

if (window.movedownvar) clearTimeout(movedownvar)
if (iens6&&parseInt(crossobj.style.top)<=0)
crossobj.style.top=parseInt(crossobj.style.top)+speed+"px"
else if (ns4&&crossobj.top<=0)
crossobj.top+=speed
moveupvar=setTimeout("fnMoveup()",20)
}




//for horizontal scroll
//specify speed of scroll (greater=faster)
var speedi=2

var iensi6=document.all||document.getElementById
var nsi4=document.layers



var crossobjh;
var contentheighth;
var ContenthID
var LeftSize;
function movehdown(pContenthID)
{

ContenthID=pContenthID;
moveleft()
    
}
function movehup(pContenthID)
{

ContenthID=pContenthID;
moveright()

}

function moveleft()
{
    crossobjh = document.getElementById(ContenthID);
    contentheighth = crossobjh.offsetWidth;
    
	if (window.moveupvari) clearTimeout(moveupvari)
	if(iensi6 && parseInt(crossobjh.style.left) >=contentheighth*(-1))
	{  
			crossobjh.style.left=parseInt(crossobjh.style.left)-speedi+"px";
			movedownvari=setTimeout("moveleft()",20)
	
	 }
	 else
	 {
	 
	 LeftSize= crossobjh.style.left;
	   crossobjh.style.left =600+"px";
	   moveleft();
	   //movedownvari=setTimeout("moveleft()",20)
	
	 }
}
 	

function moveright()
{

	 crossobjh = document.getElementById(ContenthID);
	 if(LeftSize!=undefined)
	 {
		crossobjh.style.left=LeftSize;
		LeftSize=undefined;
	}
	//alert(crossobjh.style.left)
	if (window.movedownvari) clearTimeout(movedownvari)
	
	if (iensi6&&parseInt(crossobjh.style.left)<=0)
	{
	
		crossobjh.style.left=parseInt(crossobjh.style.left)+speedi+"px"
		}
	else if (nsi4&&crossobjh.left<=0)
	
		crossobjh.left+=speedi
		
	moveupvari=setTimeout("moveright()",20)
}

function stopscrolli()
{

if (window.moveupvari) clearTimeout(moveupvari)
if (window.movedownvari) clearTimeout(movedownvari)
}



/*function to increase onmousedown Top speed*/
function SpeedDown(pContentID)
{
ContentID=pContentID;
SpeedDown()
    
}
function SpeedUp(pContentID)
{
ContentID=pContentID;
SpeedUp()
    
}

function SpeedUp()
{
var speed1=4
crossobj = document.getElementById(ContentID);
//if (window.movedownvar) clearTimeout(movedownvar)
if (iens6&&parseInt(crossobj.style.top)<=0)
crossobj.style.top=parseInt(crossobj.style.top)+speed1+"px"
else if (ns4&&crossobj.top<=0)
crossobj.top+=speed1
moveupvar=setTimeout("SpeedUp()",20)
}
/*function speed up ends here*/
                
 /*function to increase onmousedown Top speed*/
 function SpeedDown()
{
    var speed2=4
    crossobj = document.getElementById(ContentID);
    contentheight = crossobj.offsetHeight;

    //if (window.moveupvar) clearTimeout(moveupvar)

    if (iens6 && parseInt(crossobj.style.top)>=(contentheight*(-1)+100))
    {

    crossobj.style.top=parseInt(crossobj.style.top)-speed2+"px"
    }
    else if (ns4&&crossobj.top>=(contentheight*(-1)+100))
    {

    crossobj.top-=speed2+"px";
    }
    movedownvar=setTimeout("SpeedDown()",20)
}
/*function SpeedDown ends here*/
                
 
