function resizeSuffix()
{
	if(document.getElementById("miniCart"))
	{
	  var height;
		height = 630;
		
		if (document.documentElement && document.documentElement.scrollTop)
			TopValue = document.documentElement.scrollTop;
		else if (document.body)
			TopValue = document.body.scrollTop
	    
		if (document.compatMode && document.compatMode != "BackCompat")
  		theHeight = document.documentElement.clientHeight;
	  else       
  		theHeight = document.body.clientHeight;            
                  
    if(theHeight + TopValue < height)
			TopValue = 0;
		else 
		if(theHeight > height)
			TopValue = TopValue;
		else
		if(theHeight + TopValue > height)
			TopValue = theHeight + TopValue - height;

		BasketTop = TopValue;
  	var element = document.getElementById("miniCart").offsetLeft;
	  document.getElementById("miniCart").style.top  = BasketTop + 'px';   
	}
}

function scrollSuffix()
{
	if(document.getElementById("miniCart"))
	{
	  var height;
		height = 630;
		if (document.documentElement && document.documentElement.scrollTop)
			TopValue = document.documentElement.scrollTop;
		else if (document.body)
			TopValue = document.body.scrollTop
	    
		if (document.compatMode && document.compatMode != "BackCompat")
  		theHeight = document.documentElement.clientHeight;
  	else       
	  	theHeight = document.body.clientHeight;            
                  
    if(theHeight + TopValue < height)
			TopValue = 0;
		else 
		if(theHeight > height)
			TopValue = TopValue;
		else
		if(theHeight + TopValue > height)
			TopValue = theHeight + TopValue - height;

		BasketTop = TopValue;
  	var element = document.getElementById("miniCart").offsetLeft;
	  document.getElementById("miniCart").style.top  = BasketTop + 'px';   
	}
}


if (window.addEventListener)
{
	window.addEventListener("resize", resizeSuffix, false)
	window.addEventListener("scroll", scrollSuffix, false)
}
else
{
	window.attachEvent('onresize', resizeSuffix);
	window.attachEvent('onscroll', scrollSuffix);
}
