function posButtons()
{     
    var myHeight = getWindowHeight();
    var myScroll = getScrollPos();
    var myContent = getHeightOfContentDiv();
    var myBrowser = getBrowserType();
    
    //Position of side menu when dragging
    if (myBrowser == "ie" || myBrowser == "ie7")
    {
        offSet = 625;
    }
    else
    {
        offSet = 600;
    }
    
    PosY = myHeight + myScroll - offSet;

    //Position of side menu when at max height
    if (myBrowser == "ie" || myBrowser == "ie7")
    {
        if (PosY <= 30) 
        {
            PosY = 30;
        }
    }
    else
    {
        if (PosY <= 30) 
        {
            PosY = 30;
        }
    }
    

    document.getElementById('relative').style.marginTop = PosY + "px";
    
    //Position footer
    
    if (myBrowser == "ie" || myBrowser == "ie7")
    {                
        dif = 20;
    }
    else 
    {
        dif = 31;
    }

    if (PosY <= dif) //Position of footer when at max height
    {
        if (myBrowser == "ie7")
        {
            PosY = 283 - myContent;
        }
        else  if (myBrowser == "ie")
        {           
            PosY = 237 - myContent;
        }
        else
        {
            PosY = 273 - myContent;
        }
    }
    else 
    {
        
        //Change this section to adjust footer position when dragging
        if (myBrowser == "ie7")
        {
            offSet = 442; 
        }
        else if (myBrowser == "ie")
        {
            offSet = 423;
        }
        else
        {
            offSet = 422;
        }
        
        PosY = myHeight + myScroll - myContent - offSet;  
    }
       
    if (PosY <= 30)
        PosY = 30;
       
    if (document.getElementById('pageFooter') != null) {
        document.getElementById('pageFooter').style.marginTop = PosY + "px";
    }
}   

function getScrollPos()
{
    var Scroll;

    Scroll = document.body.scrollTop;
    
    if (Scroll == 0)
    {
        if (window.pageYOffset)
            Scroll = window.pageYOffset;
        else
            Scroll = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;
    }
    
    return Scroll;
}

function getWindowHeight()
{
    var Height;

    if( typeof( window.innerWidth ) == 'number' ) {
        //Non-IE
        Height 		= window.innerHeight;
    }
    else if( document.documentElement &&
        ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
        //IE 6+ in 'standards compliant mode'
        Height 		= document.documentElement.clientHeight;
    }
    else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        //IE 4 compatible
        Height 		= document.body.clientHeight;
    }else{
        Height 		= 608;
    }
    
    return Height;
}

function getHeightOfContentDiv()
{         
    if (document.getElementById('contentForm') != null) {
        content = document.getElementById('contentForm').offsetHeight
        
        return(content);
    }    
}

function getBrowserType()
{
    if (navigator.appName == "Microsoft Internet Explorer")
    {
        version=0
        if (navigator.appVersion.indexOf("MSIE")!=-1){
            temp=navigator.appVersion.split("MSIE")
            version=parseFloat(temp[1])
        }
    
        if (version >= 7)
        {
            browser = "ie7";
        }
        else
        {
            browser = "ie";
        }
    }
    else
    {
        browser= "ff";
    }
    
    return browser;
}