//Global Variables

CURRENTBOX=	0
WELCOME=	0
SCROLLINC=	20
zindx=	1

clipT=0
clipB=93


function resetAll(){


for(f=0;f<numberOfGridObjects;f++){

	document.all(BOXES[f].id).style.top=BOXES[f].initY
	document.all(BOXES[f].objID).style.display="none"
	document.all(BOXES[f].id).style.left=BOXES[f].initX
	BOXES[f].offX=0		
	BOXES[f].X=BOXES[f].initX
	BOXES[f].Y=BOXES[f].initY

	BOXES[f].offY=0
	
	BOXES[f].VLINEL=0

	BOXES[f].HLINET=0

	BOXES[f].objShow=0

	BOXES[f].moving=0
	}


}


//** This function is called when you want the current object to be on the
//** top of the page

//** end of SetZIndex

function objectShow(a){
	
	a.setz()
	
	var obj=document.all(a.objID).style

	obj.top=40

	obj.left=0

	if (a.objShow==0){
	
		document.all(a.objID).style.display="inline"

		a.objShow=1}
	else{
		obj.display="none"
		a.objShow=0
	}
}


function moveWelcome(){
	
if(welcomeBox.moving==1){

	currObject=document.all(welcomeBox.id).style
	moveby=event.y-welcomeBox.offY

	if(moveby<welcomeBox.initY)
		moveby=welcomeBox.initY
	
	welcomeBox.Y=(moveby)
	}
paintObj(welcomeBox)

}





function scrollviewup(a){


clipB+=SCROLLINC


if((document.all(a).style.pixelTop)-SCROLLINC<=3){

clipT+=SCROLLINC
document.all(a).style.clip="rect("+clipT+",180,"+clipB+",0)"
document.all(a).style.top=(document.all(a).style.pixelTop)-SCROLLINC

}
else{
//clipB-=SCROLLINC
document.all(a).style.clip="rect("+clipT+",180,"+clipB+",0)"
document.all(a).style.top=(document.all(a).style.pixelTop)-SCROLLINC

}



}

function scrollviewdown(a){

	if((document.all(a).style.pixelTop)<3) //dont move if at the top
		{clipB-=SCROLLINC

		if((document.all(a).style.pixelTop)+SCROLLINC>95){


			document.all(a).style.clip="rect("+clipT+",180,"+clipB+",0)"
			document.all(a).style.top=(document.all(a).style.pixelTop)+SCROLLINC
		}
		else
		{
			clipT-=SCROLLINC
			document.all(a).style.clip="rect("+clipT+",180,"+clipB+",0)"
			document.all(a).style.top=(document.all(a).style.pixelTop)+SCROLLINC
		}
	}


}


