// JavaScript Document
function left(obj,comp){

	x = parseInt(obj.style.left);
	leng = comp * (-128); 
	if ( leng < x-372) {
		obj.style.left = x-10+'px';
	}
}

function right(obj, comp){
		x = parseInt(obj.style.left);
		if (x+10 < 10){
			obj.style.left = x+10+'px';
		}
}

function down(obj,mask){
	y = parseInt(obj.style.top);
	altura_obj = parseInt(obj.clientHeight);
	altura_mask = parseInt(mask.clientHeight);
	if(y >= (altura_mask - altura_obj))
	{
		obj.style.top = y-5+'px';
	}
}
function up(obj,mask){
	y = parseInt(obj.style.top);
	if(y+5 <= 0)
	{
		obj.style.top = y+5+'px';
	}
}