function setPage() 
{
	
	// setPage calculates absolute values for page element widths and heights
	// different calculations are needed for different elements bases on which page is active
	
	var window_height		= 0;
	var window_width		= 0;
	var menu_height			= 0;
	var product_height		= 0;
	var product_width		= 0;
	var page_margin_width   = 0;
	
	// get the current width and height of the browser window
	if ( navigator.appName.indexOf("Microsoft") != -1 ) {
		window_height = document.documentElement.clientHeight;
		window_width  = document.documentElement.clientWidth;
	} else {
		window_height = window.innerHeight;
		window_width  = window.innerWidth;
	}
	
	//get height and width of resized area
	header_height	   	= document.getElementById('header').offsetHeight;
	footer_height      	= document.getElementById('data_footer').offsetHeight;
	menu_width			= document.getElementById('data_menu').offsetWidth;
	container_width        = document.getElementById('data_container').offsetWidth;
	
	//calculations (set height and width of resized area)
	page_margin_width   = window_width - container_width;
	menu_height			= window_height - header_height - footer_height - page_margin_width;
	product_height		= window_height - header_height - footer_height - page_margin_width;
	product_width        = window_width - menu_width - page_margin_width - 6;
	product_width = (product_width < 704) ? 704 : product_width;
	
	//set new height and width
	document.getElementById('data_menu').style.height    = menu_height + 'px';
	document.getElementById('product').style.height  		  = product_height + 'px';
	document.getElementById('product').style.width  		  = product_width + 'px';
	
	// for the my products iframe
	//if (document.getElementById('customMaps')) { document.getElementById('customMaps').style.height = menu_items_height + 'px'; } 	 

}
	
function dataInit() 
{
	setPage();
	//getProduct();
}

function resizeFix() 
{
		setPage();
}

window.onload = dataInit;
window.onresize = resizeFix;