/* last rev. 07.07.2006 TdB; */

/* horizontale positionering en schaling  */
function setHomeContentHorizontal() {
	if (document.getElementById) {
		var windowWidth = getWindowWidth();
		if (windowWidth > 0) {
			var leftMargin = 162;
			var horizontalMargin = 12;
			/* remaining width */
			var totalWidth = windowWidth-leftMargin-horizontalMargin;
		
			/* opmaak bovenste hoofditems */
			var contentElement1 = document.getElementById('topStory');
			var contentElement2 = document.getElementById('agenda');
			var contentElement3 = document.getElementById('bottomMargin4');
			contentElement1.style.width = ((totalWidth-horizontalMargin)/2)+'px';
			contentElement2.style.width = ((totalWidth-horizontalMargin)/2)+'px';
			contentElement3.style.width = horizontalMargin+'px';
		
			/* opmaak onderste items */
			var contentElement4 = document.getElementById('homeItemBottom1');
			var contentElement5 = document.getElementById('homeItemBottom2');
			var contentElement6 = document.getElementById('homeItemBottom3');
			var contentElement7 = document.getElementById('homeItemBottom4');
			var contentElement8 = document.getElementById('bottomMargin1');
			var contentElement9 = document.getElementById('bottomMargin2');
			var contentElement10 = document.getElementById('bottomMargin3');
			contentElement4.style.width = ((totalWidth-(3*horizontalMargin))/4)+'px';
			contentElement5.style.width = ((totalWidth-(3*horizontalMargin))/4)+'px';
			contentElement6.style.width = ((totalWidth-(3*horizontalMargin))/4)+'px';
			contentElement7.style.width = ((totalWidth-(3*horizontalMargin))/4)+'px';
			contentElement8.style.width = horizontalMargin+'px';
			contentElement9.style.width = horizontalMargin+'px';
			contentElement10.style.width = horizontalMargin+'px';
			
		}
	}
}

/* verticale positionering en schaling  */
function setHomeContentVertical() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		var navigationHeight= document.getElementById('navigation').offsetHeight;
		if (windowHeight > 0) {
			var verticalMargin = 12;
			var contentElement1 = document.getElementById('homeItemsTop'); /* container bovenste hoofditems */
			var contentElement2 = document.getElementById('homeItemsBottom'); /* container onderste items */
			var contentHeight = contentElement1.offsetHeight + contentElement2.offsetHeight;
			
			/* opmaak onderste items */
			if (navigationHeight > windowHeight) {
				contentElement1.style.position = 'absolute';
				contentElement2.style.position = 'absolute';
				contentElement1.style.top = navigationHeight-(contentElement1.offsetHeight+contentElement2.offsetHeight)+'px';
				contentElement2.style.top = navigationHeight-(contentElement2.offsetHeight-verticalMargin)+'px';
			} else {
				contentElement1.style.position = 'absolute';
				contentElement2.style.position = 'absolute';
				contentElement1.style.top = (windowHeight-(contentElement1.offsetHeight+contentElement2.offsetHeight+verticalMargin+verticalMargin))+'px';
				contentElement2.style.top = windowHeight-(contentElement2.offsetHeight+verticalMargin)+'px';
			}
		}
	}
}

/* positioneren en scalen quote */
function setQuote() {
	if (document.getElementById) {
		//var windowHeight = getWindowHeight();
		var windowWidth = getWindowWidth();
		if (windowWidth > 0) {
			/* margins */
			var leftMargin = 162;
			var horizontalMargin = 12;
			/* remaining width */
			var totalWidth = windowWidth-leftMargin-horizontalMargin-12;
			/*positioneren en scalen quote*/
			var contentElement1 = document.getElementById('quoteContainer');
			contentElement1.style.position = 'absolute';
			contentElement1.style.width = ((totalWidth)/2)+'px';
			contentElement1.style.left = (leftMargin+horizontalMargin+(totalWidth/2))+'px';
		}
	}
}
		
