
function showHideControl() 
{
	var height
	var marker = document.getElementById('buynowscrollmarker');

	if (marker == null) return;  // Justin - correct JS error on RLD page

	var markerpos;	
	height=document.documentElement.clientHeight;
	markerpos=AnchorPosition_getPageOffsetTop(marker); 
	if (height < markerpos)  
	{
		document.getElementById("dvTeaserArea").style.display="block";	
		e=document.getElementById("dvTeaserArea");	
		//The problem is that IE only keeps track of "certain" clientHeights...depending on if the element "has layout". 
		//Make sure the 'ProductDetail21_ProductImage' elmenents have a 'display: inline-block' style.
		// This will force the elements to "have layout", which in turn will force IE to record the elements height. 
		document.getElementById("ProductDetail21_ProductImage").style.display="inline-block";		
		if (document.getElementById("ProductDetail21_h2Location") ==null)
		{			
			e.style.height=document.getElementById("ProductDetail21_ProductImage").clientHeight+18 + "px";
		}
		else
		{
			e.style.height=document.getElementById("ProductDetail21_ProductImage").clientHeight + "px";
		}
	}
	else
	{
		document.getElementById("dvTeaserArea").style.display="none";		
	}	
//	if(document.documentElement)
//	{
//		height = document.documentElement.clientHeight;
//		markerpos = marker.offsetTop; //mozila
//	}
//	else
	//{
//		height = document.body.clientHeight;
	//	markerpos = marker.style.posTop;
	//}
	
} 
function AnchorPosition_getPageOffsetTop (el) 
{
	var ot=el.offsetTop;
	while((el=el.offsetParent) != null) { ot += el.offsetTop; }
	return ot;
}
	