function _get_offset(obj) {
	// Does not get the offset if the object is in an unfinished element (table for instance)
	var offset;
	if (typeof obj.x != 'undefined') {
		offset = {x: obj.x, y: obj.y};
	}
	else {
		var offset = {x: obj.offsetLeft, y: obj.offsetTop};
		while (obj.offsetParent != null) {
			obj = obj.offsetParent;
			offset['x'] += obj.offsetLeft;
			offset['y'] += obj.offsetTop;
		}
	}
	return offset;
}

function print_filler(tuning) {
	var detect = navigator.userAgent.toLowerCase();
	var win = (detect.indexOf("win") !=-1);
	if (typeof tuning == 'undefined') {
		tuning = 0;
	}
	else{
	if((!win) && (!document.layers)){
	tuning = tuning + 14;
		}
	}
	var offset = _get_offset(document.images[document.images.length - 1]);
	fill = - tuning;
	fill -= offset['y'];
	if (typeof window.innerHeight != 'undefined') {
		fill += window.innerHeight;
	}
	else if (typeof document.body != 'undefined') {
		fill += document.body.clientHeight;
	}

	if (fill > 0) {
		document.write('<img src="pix/x.gif" width="1" height="' + fill + '" border="0">');
	}
	else {
		document.write('<img src="pix/x.gif" width="1" height="1" border="0">');
	}
}

