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;	
	
	// 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('footer').offsetHeight;
	menu_width			= document.getElementById('data_side_menu').offsetWidth;
			
	//calculations (set height and width of resized area)
	menu_height			= window_height - header_height - footer_height - 10;
	product_height		= window_height - header_height - footer_height - 10;
	product_width		= window_width - menu_width - 14;
	
	//set new height and width	
	document.getElementById('data_side_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;

