codice:
this.getLarghezzaEsterna = function() {
	if(typeof(this.outerWidth)!="undefined") {
		return this.outerWidth;
	}
	else if(typeof(this.document.body.offsetWidth)!="undefined") {
		var bodyW1 = this.document.body.offsetWidth;
		var bodyH1 = this.document.body.offsetHeight;
		this.resizeTo(bodyW1,bodyH1);
		var offsetW= bodyW1-this.document.body.offsetWidth;
		var offsetH= bodyH1-this.document.body.offsetHeight;
		this.resizeTo(offsetW+bodyW1, offsetH+bodyH1);
		return offsetW+bodyW1;
	}
}

this.getAltezzaEsterna = function() {
	if(typeof(this.outerHeight)!="undefined") {
		return this.outerHeight;
	}
	else if(typeof(this.document.body.offsetHeight)!="undefined") {
		var bodyW1 = this.document.body.offsetWidth;
		var bodyH1 = this.document.body.offsetHeight;
		this.resizeTo(bodyW1,bodyH1);
		var offsetW= bodyW1-this.document.body.offsetWidth;
		var offsetH= bodyH1-this.document.body.offsetHeight;
		this.resizeTo(offsetW+bodyW1, offsetH+bodyH1);
		return offsetH+bodyH1;
	}
}
la richiami con
top.getAltezzaEsterna(); oppure
self.get....
window.get...
parent.get...
etc