
 
function setPositions () {
	
	var dheight = $(document).height();
	var wheight = $(window).height();
	
	var cheight = $('#container').height() + 203;
	
	if (cheight > wheight) {
		if ($('#menu').height() > $('#content').height()) {
			$('#bottom').css('top', (dheight+40)+'px');
		}
		else {
			$('#bottom').css('top', (dheight-40)+'px');
		}
	}
	else if (cheight + 170 > wheight) {
		$('#bottom').css('top', (cheight+30)+'px');
	}
	
	
	
	if (dheight > wheight) {
		$('#bgright').css('top', (dheight-400)+'px');
	}
	
	if (dheight > 1290) {
		$('#background').css('height', '1290px');
	}
	else if (dheight == wheight) {
		$('#background').css('height', (dheight+(cheight-541))+'px');
		
	}
	else if (dheight > wheight) {
		if ($('#menu').height() > $('#content').height()) {
			$('#background').css('height', (dheight+200)+'px');
		}
		else {
			$('#background').css('height', (dheight+70)+'px');
		}
	}
	else {
		$('#background').css('height', (dheight)+'px');
	}
	
	
	var dwidth = $(document).width();
	
	if (dwidth > 930) {
		var marginleft = (dwidth - 930) / 2;
		
		$('#top .inner').css('margin-left', marginleft+'px');
	}
	
	
	
}

 
 






