// JavaScript Document
//
var myPageX;
var myPageY;
//
function setcoords(){
	if (document.all){
		myPageX = document.body.scrollLeft;
		myPageY = document.body.scrollTop;
		}else{
		myPageX = window.pageXOffset;
		myPageY = window.pageYOffset;
	}
 }
//
function createDiv(rutaCargador){
	var actualDIV = document.createElement("Div");
	var actualIframe = document.createElement("Iframe");
	actualIframe.align="center";
	actualIframe.name = "cargandoIframe";
	actualIframe.id = "cargandoIframe";
	actualIframe.frameborder = "0";
	actualIframe.className = "cargandoIframe";
	actualIframe.style.left = (window.document.body["clientWidth"]/2)-80
	actualIframe.style.top = (window.document.body["clientHeight"]/2)
	//
	actualDIV.align="center";
	actualDIV.name = "cargandolayer";
	actualDIV.id = "cargandolayer";
	actualDIV.className = "cargando";
	actualDIV.style.left = (window.document.body["clientWidth"]/2)-80
	actualDIV.style.top = (window.document.body["clientHeight"]/2)
	document.body.appendChild(actualIframe);
	var itemDiv = document.body.appendChild(actualDIV);
	
	itemDiv.innerHTML = '<img runat="server" src="' + rutaCargador + '" width="28" height="29"/>Cargando Datos...'
}
//
function doOnScroll()
{
	setcoords();
	__dnn_bodyscroll();
	document.getElementById('cargandolayer').style.top = myPageY +(window.document.body["clientHeight"]/2);
	document.getElementById('cargandoIframe').style.top =myPageY +(window.document.body["clientHeight"]/2);
	document.getElementById('cargandolayer').style.left = myPageX + (window.document.body["clientWidth"]/2)-80;
	document.getElementById('cargandoIframe').style.left = myPageX + (window.document.body["clientWidth"]/2)-80;
}
//
function hidecargando(){
	document.getElementById('cargandolayer').style.display='none';
	document.getElementById('cargandoIframe').style.display='none';
}
//
function showcargando(){
	document.getElementById('cargandolayer').style.display='block';
	document.getElementById('cargandoIframe').style.display='block';
}