var DHTML = (document.getElementById || document.all || document.layers);
var posx;
var posy;

function pMouse(e) {
	if (!e) var e = window.event;
	if (e.pageX || e.pageY){
		posx = e.pageX;
		posy = e.pageY;
	}else if (e.clientX || e.clientY){
		posx = e.clientX + document.body.scrollLeft;
		posy = e.clientY + document.body.scrollTop;
	}
}

function getStile(el,loStile){
	var x = document.getElementById(el);
	if (window.getComputedStyle)
		var y = window.getComputedStyle(x,null).getPropertyValue(loStile);
	else if (x.currentStyle)
		var y = eval('x.currentStyle.' + loStile);
	return y;
}

function getOggetto(el){
	if (document.getElementById)  {
		this.obj = document.getElementById(el);
		this.style = document.getElementById(el).style;
	}else if (document.all){
		this.obj = document.all[el];
		this.style = document.all[el].style;
	}else if (document.layers){
   	this.obj = document.layers[el];
   	this.style = document.layers[el];
	}
}

function setPos(og,ax,ay){
	if (!DHTML) return;
	if (ax != 'no')	og.style.left = ax+'px';
	if (ay != 'no')		og.style.top = ay+'px';
}

function HideShow(og,flag){if (!DHTML) return;og.style.visibility = (flag) ? 'visible' : 'hidden';}
function HideShowDisplay(og,flag){if (!DHTML) return;og.style.display = (flag) ? 'block' : 'none';}