var n = (document.layers) ? 1:0;

	var ie = (document.all) ? 1:0;

	var loop, timer1, timer2;

	var clip_top,clip_bot;

	var len_h;

	function makeObj(obj,nest){

		//var nest=(!nest) ? '':'document.'+nest+'.'   

		this.css=(n) ? eval('document.'+nest+'.document.'+obj):eval(obj+'.style');

		len_h=(n) ? this.css.clip.bottom : parseInt(eval(obj+'.style.height'));

		clip_top=0;

		clip_bot=(n) ? eval('document.'+nest+'.clip.bottom') : parseInt(eval(nest+'.style.height'))-1;

		this.up=goUp;

		this.down=goDown;
	
		this.obj = obj + "Object";

		eval(this.obj + "=this");

		return this;

	}

	function goDown(speed){
	

		clearTimeout(timer1);clearTimeout(timer2);

		if( (clip_bot - parseInt(this.css.top)) < len_h )

		{

			this.css.top=parseInt(this.css.top)-3;

		} 

		else {

			return;

		}

		if(loop) timer1=setTimeout(this.obj+".down("+speed+")",speed);

	}


	function goUp(speed){

		clearTimeout(timer2);clearTimeout(timer1);

		if( parseInt(this.css.top) < clip_top )

		{

			this.css.top=parseInt(this.css.top)+3;

		} 

		else {

			return;

		}

		if(loop) timer2=setTimeout(this.obj+".up("+speed+")",speed);

	}

	function mask(){

		maskObj=makeObj('texto','branco');

	}

onload=mask;
