// JavaScript Document

function getL(url) {
	window.location=url; 
}

function getStyle(id) {
    return document.getElementById(id).style;
}
function getHeight(id) {
    return document.getElementById(id).offsetHeight;
}
function getTop(id) {
    return document.getElementById(id).offsetTop;
}

function position(id1, id2, gap) {

    var heightID1 = getHeight(id1);
   
    var topID1 = getTop(id1);
    var styleID2 = getStyle(id2);
   
    styleID2.top = heightID1 + topID1 + gap + 'px';
    styleID2.display = 'block';
   
}

onload=function () {
	
	var t;
	var h;
	var container;
	
    position('middle', 'bottom', 2);
	 position('bottom', 'footer', 2);
	 position('footer', 'signature', 5);
	 
	 container = getStyle('container');
	 t = getTop('signature');
	 h = getHeight('signature');
	 container.height = t + h + 5 + 'px';
	
}