//xajax.callback.global.onRequest = function() {xajax.$('loading').style.display = 'block';}
//xajax.callback.global.beforeResponseProcessing = function() {xajax.$('loading').style.display='none';}
xajax.callback.global.onRequest = function() {xajax.$('loading').style.visibility = 'visible';}
xajax.callback.global.beforeResponseProcessing = function() {xajax.$('loading').style.visibility='hidden';}
function openNavWindow(urlAddress, x, y, titulo) {
	var win = new Window({className: "alphacube", title: titulo, 
						  top:y, left:x, width:800, height:450, 
						  url: urlAddress, showEffectOptions: {duration:1.5}});
	win.show();
}
function getX(imagename){
 	theImg= document.getElementById(imagename);
	return getOffsetLeft(theImg);
}

function getY(imagename){
	theImg= document.getElementById(imagename);
	return getOffsetTop(theImg);
}

function getOffsetTop (el) {
  var ol = el.offsetTop;
  while ((el = el.offsetParent) != null)
    ol += el.offsetTop;
  return ol;
}

function getOffsetLeft (el) {
  var ol = el.offsetLeft;
  while ((el = el.offsetParent) != null)
    ol += el.offsetLeft;
  return ol;
}