﻿function setFooter(){
   
}
function checkSize(){
$(".footer").css("padding","0px")
        try{
        if($.browser.opera){
			var rheight = document.documentElement["clientHeight"];
		}
		else {
			var rheight = $(window).height();
		}
        var rwidth = getWindowWidth()
        
        if((document.getElementById("homeFlash")) && rheight < 580){
         document.getElementById("homeFlash").style.height = "580px";
            //alert(rheight)
        }
        else {
           document.getElementById("homeFlash").style.height = parseInt(rheight - 78) + "px";
        }
        
        if((document.getElementById("wrapper")) && rwidth < 990){
            document.getElementById("wrapper").style.width = 990+"px";
            document.getElementById("footer").style.width = 990+"px";
        }
        else {
            document.getElementById("wrapper").style.width = parseInt(rwidth) + "px";
            document.getElementById("footer").style.width = parseInt(rwidth) + "px";
        }
        init();
		
        }
        catch(e){
            //alert(e)
        }	
}
$().ready(function(){
	checkSize();
    $(window).bind('load',function(){
        checkSize();
    })

    $(window).bind('resize',function(){
        var rheight = getWindowHeight();
        var rwidth = getWindowWidth()
        if((document.getElementById("homeFlash")) && rheight < 580){
         document.getElementById("homeFlash").style.height = "580px";
            //alert(rheight)
        }
        else {
           document.getElementById("homeFlash").style.height = parseInt(rheight - 78) + "px";
        }
        if((document.getElementById("wrapper")) && rwidth < 990){
            document.getElementById("wrapper").style.width = 990+"px";
            document.getElementById("footer").style.width = 990+"px";
        }
        else {
            document.getElementById("wrapper").style.width = parseInt(rwidth) + "px";
            document.getElementById("footer").style.width = parseInt(rwidth) + "px";
        }

        setFooter();
        
        //alert(rheight)
    })
    
    
    
})
