

function ResizeMoz()
{
	try
	{
    document.getElementById('ShopMainLayOutTable').style.height='100%';
    AddScrollMoz();
    }
    catch(e)
    {}
}


function AddScrollMoz()
{

	try
		{
		
			// Get the Div layer object used for scroll
			var ScrollDiv = document.getElementById('ContentContainer_DIV');
			
			// Get the TD object containing the Scroll div layer
			var ContentTD = document.getElementById('Main_TD');
		
			//Add scroll to Y axis of the div layer
			ScrollDiv.style.overflowY='scroll';
			
			//Get the height of the TD containing the content div layer
			var height = ContentTD.clientHeight;
			if(height==0)
			{
			   height = ContentTD.offsetParent.clientHeight  
			}
			
			//Set the Div layer object height to match TD content container
			ScrollDiv.style.height = height
					
		}
	catch(e)
		{
		}
}

function AddScrollIE()
{

	try
	{	
		// Get the Div layer object used for scroll
		var ScrollDiv = document.getElementById('ContentContainer_DIV');
		
		//Add scroll to Y axis of the div layer
		ScrollDiv.style.overflowY='scroll';
		
		//Set the div layer height to 100%
		ScrollDiv.style.height='100%';
	}
	catch(e)
	{
	}

}

function WriteStyleTag()
{
	try
	{
		document.write('<style type="text/css">\n')
		document.write('.ContentContainer_DIV{height:0px;}\n')
		document.write('</style>\n')
	}
	catch(e)
	{
	}
}

// Attach the Addscroll functions to events
if(window.addEventListener){ // Mozilla, Netscape, Firefox
	window.addEventListener('resize', ResizeMoz, false);
	window.addEventListener('load', AddScrollMoz, false);
	
    // Write css styles to set height of scroll div layer to 0
	//WriteStyleTag();
		
} else { // IE
	window.attachEvent('onload', AddScrollIE);
}


