
function runCheckScrollBars(){setInterval("checkScrollBars()",500)}

var oldSize = 0;
var currentSize = 0;
function checkScrollBars()
{
	var rootElement = document.documentElement;
	var bodyElement = document.body;
	var cards = document.getElementById("right-cards");
	
    if(typeof(window.innerWidth) == 'number') 
    {
        //Non-IE
        currentSize = window.innerWidth;
    } 
    else if(document.documentElement && (document.documentElement.clientWidth)) 
    {
        //IE 6+ in 'standards compliant mode'
        currentSize = document.documentElement.clientWidth;
    } 
    else if(document.body && (document.body.clientWidth))
    {
        //IE 4 compatible
        currentSize = document.body.clientWidth;
    }

	if (currentSize != oldSize)
	{
		if (currentSize > 1021)
		{
			rootElement.className = "hide-scroller";
			//bodyElement.className = "hide-scroller";
			cards.style.display = "block";
			cards.style.right = "-220px";
			//document.documentElement.style.overflowX = "hidden";
		} 
		else 
		{
			rootElement.className = "show-scroller";
			//bodyElement.className = "show-scroller";
			cards.style.display = "none";
			cards.style.right = "0px";
			//document.documentElement.style.overflowX = "auto";
		}

		oldSize = currentSize;
	}
}