function ScrollIt(){ 
	window.scrollTo(document.formulario.PageX.value, document.formulario.PageY.value );
} 

function setcoords(){
	var myPageX; 
	var myPageY; 
	if (document.all){
		myPageX = document.body.scrollLeft; 
		myPageY = document.body.scrollTop;
	}
	else{
		myPageX = window.pageXOffset + document.body.scrollLeft;
		myPageY = window.pageYOffset + document.body.scrollTop; 
	};
	document.formulario.PageX.value = myPageX;
	document.formulario.PageY.value = myPageY; 
}

/*No permitimos el ingreso de comillas
que puedan afectar las consultas SQL 
a la base
96,34, y 60 son comillas,
60 es el símbolo < */
function document_onkeypress() {
	if (event.keyCode!=96 &&
		event.keyCode!=34 &&
		event.keyCode!=60 &&
		event.keyCode!=39){
		return true;
	}
	else{
		return false;
	}
}

/*
Valida que no se peguen en un txt strings 
conteniendo caracteres prohibidos (comillas 
y el símbolo "menor")
*/
function ValidarPaste(objTxt) {
	var strTexto;
	strTexto = new String(objTxt.value);
	if ((strTexto.match("'")) 
	||(strTexto.match("`")) 
	||(strTexto.match('"')) 
	||(strTexto.match("<"))){ 
		objTxt.value = "";
		return false;
	}
	else{
		return true;
	};
}

/*
	valida que no se ingresen más caracteres que los permitidos en un TextArea
*/
function CropTextInTEXTAREA(objTxt, intMax ){
	objTxt.value = objTxt.value.substring(0,intMax);
	return ValidarPaste(this);
}
			
