window.onload=centerDiv;
//window.onresize=centerDiv;
function centerDiv(){
	  var d = document.getElementById('container');
	  var w = document.getElementById('wait');
	  //var b = document.getElementById('banners');
	  var wrap = document.getElementById('wrapper');
	  	w.style.display='none';
	 	var mp = document.getElementById('nav');
	 	var mpWidth = mp.offsetWidth;
		var mpHeight = mp.offsetHeight;
		var offWidth = d.offsetWidth;
	 	var offHeight = d.offsetHeight;
		//var bodyHeight = document.body.clientHeight;
		//var bodyWidth = document.body.clientWidth;
		//if((bodyHeight < offHeight + 80) || (bodyWidth < offWidth)){
	 	//d.style.margin = '0px' + '0px ' + '0px ' + '-' + (offWidth / 2 ) + 'px';
		//d.style.top = (offHeight / 2) + 48 + 'px';
		//d.style.left = (offWidth / 2) + 48 + 'px';
		//mp.style.margin = '0px' + '0px ' + '0px ' + '-' + (offWidth / 2 ) + 'px';
		//mp.style.top = (offHeight / 2) + 48 + 'px';
		// }
		// else
		// {
		d.style.margin = '-' + ((offHeight / 2) + 41) + 'px ' + '0px ' + '0px ' + '-' + (offWidth / 2 ) + 'px';
		//d.style.top = '50%';
		//d.style.left = '50%';
		mp.style.margin = '-' + (offHeight / 2) + 'px ' + '0px ' + '0px ' + '0px';
		//mp.style.top = '50%';
		//mp.style.margin = '-' + (offHeight / 2) + 'px ' + '0px ' + '0px ' + '0px';
		// }
		//mp.style.margin = '-' + ((offHeight / 2)) + 'px ' + '0px ' + '0px ' + '0px';
		d.style.visibility='visible';
		mp.style.visibility='visible';
		//b.style.overflow='auto';
		}