
<!---

/*----------------------------------------------------------------------------
	scrollOffice.js
	scroll function
 	July 20, 2001
	DareStep
----------------------------------------------------------------------------*/

stop = false;
//INITALIZATION FUNC

function initp(){
	ns4p = (document.layers)? true:false;
	nn6p = (document.getElementById && !document.all);
	ie4p = (document.all)? true:false;
	ie5p = (document.all && document.getElementById);
	
	if (ns4p){
	  art = document.clipLayer.document.article;
	}
	if (nn6p){
	  art = document.getElementById('article').style
	}
	if (ie5p){
	  art = document.getElementById('article');
	}
	if (ie4p){
	  art = article.style;
	}

	art.xpos = parseInt(art.left);
	art.ypos = parseInt(art.top);
}

//----------------------------------//

//FUNCIONS DE MOVIMENT

function up(max, step, framerate){	
	//--alert("up")
	initp()
	if ((art.ypos<max)&&(stop==false)){
		art.ypos += step;
		art.top = art.ypos;
	}
	if ((art.ypos<max)&&(stop==false)) setTimeout("up(" + max + ", " + step + ", " + framerate + ")",framerate);
}

function down(max, step, framerate){
	initp()
	if(document.all) 
		var H = document.all.article.scrollHeight;
	if((document.layers)||(document.getElementById && !document.all)) 
		var H = 608;
		//--alert(H)
		
		var limit = -(parseInt(H)-max);
		//--alert(limit)
		art.ypos = parseInt(art.top)
		//--alert(art.ypos)
		
	if ((art.ypos>limit)&&(stop==false)){
		art.ypos -= step;
		art.top = art.ypos;
	}
	if ((art.ypos>limit)&&(stop==false)) 
		setTimeout("down(" + max + ", " + step + ", " + framerate + ")",framerate);
}
//-->
