function CorrPos(id1, id2) {	this.id1 = id1;
	this.id2 = id2;
	this.hElem1 = null;
	this.hElem2 = null;
	this.constOffset = 0;

	this.Attach = function() {
		this.hElem1 = he(this.id1)
		this.hElem2 = he(this.id2)

		if(this.hElem2 && this.hElem2) {
			//this.hElem1.style.display = "block";
	  		var oPos1 = getElementPosition(this.hElem1);
	        var oPos2 = getElementPosition(this.hElem2);
            this.hElem1.o = this;
            var off = getElementComputedStyle(he("left"), "marginTop");
            this.constOffset = parseInt(off.substr(0, off.length-2));

	        if(oPos1.top + oPos1.height < oPos2.top + oPos2.height) {	        	var o = this.hElem1;
	        	this.hElem1.style.position = "absolute";
	        	this.Correct(null);
               	addEventHandler(window, "resize", function(e) { return o.o.Correct(e); } );	        }		}
	}

	this.Correct = function(e) {
	  	var oPos1 = getElementPosition(this.hElem1);
	    var oPos2 = getElementPosition(this.hElem2);
    	this.hElem1.style.top = parseInt((2*oPos2.top + this.constOffset + oPos2.height - oPos1.height)/2) + "px";
    	this.hElem1.style.left = parseInt((oPos2.left - oPos1.width)/2) + "px";	}}
