Array.prototype.inArray = function (value) {
	var i;
	for (i=0; i < this.length; i++) {
		if (this[i] === value) {
			return true;
		}
	}
	return false;
};

function textLimit(e, object, limit)
{
	var keynum;
	var keychar;
	var numcheck;
	var keyAdmitidas = [8,38,46,33,34,35,36,37,38,39,40];
		
	if(window.event) // IE
	  {
	  keynum = e.keyCode;
	  }
	else if(e.which) // Netscape/Firefox/Opera
	  {
	  keynum = e.which;
	  }
	if(object.value.length >= limit && !keyAdmitidas.inArray(keynum)){
		return false;
	} else {
		return true;
	}
}

var IE = document.all?true:false
var posicX = 0
var posicY = 0

if (!IE) document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = posicRatonXY;

function posicRatonXY(e) {
	if (IE) { posicX = event.clientX + document.body.scrollLeft;
	posicY = event.clientY + document.body.scrollTop}
	else { posicX = e.pageX; posicY = e.pageY };
	if (posicX < 0) {posicX = 0};
	if (posicY < 0) {posicY = 0};
	return true 
}
