

function getWindowSize(){
    var viewPort={
        width:null,
        height:null
    }
     
     
    // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
     
    if (typeof window.innerWidth != 'undefined')
    {
        viewPort.width = window.innerWidth,
        viewPort.height = window.innerHeight
    }
     
    // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)

    else if (typeof document.documentElement != 'undefined'
         && typeof document.documentElement.clientWidth !=
         'undefined' && document.documentElement.clientWidth != 0)
    {
        viewPort.width = document.documentElement.clientWidth,
        viewPort.height = document.documentElement.clientHeight
    }
     
     // older versions of IE
     
     else
     {
        viewPort.width = document.getElementsByTagName('body')[0].clientWidth,
        viewPort.height = document.getElementsByTagName('body')[0].clientHeight
     }
     return viewPort;
}

function getHeightContainerElement(){
    var element = document.getElementById("website-container");
    return element.offsetHeight;
}

function moveFooter(){
	var heightContainer = getHeightContainerElement();
	var sizeWindow = getWindowSize();
	var heightWindow = sizeWindow.height;
	var offSet = heightWindow - heightContainer;
	if (heightContainer+76<heightWindow){
		var footerElement = document.getElementById("footer");
		footerElement.style.marginTop=offSet+"px";
	}
}

window.onload=moveFooter;



