// JavaScript Document
var $leftSideWidth = 479;
var $windowInnerWidth = 0;
var $windowInnerHeight = 0;
var $rightSideDivId = 'right_side_div_id';
var $containerDivId = 'container_div_id';
var $middleContentId = 'middle_content_div_id';
var $ie = (navigator.appName.match(/^Micro/i)) ? true : false; 

function getInnerWindowHeight()
{
    /* from a script by Jan Peter Koch - quirksmode.org */
    if (window.innerHeight) {
        /* all except Explorer */
    	$windowInnerWidth = window.innerWidth;
    	$windowInnerHeight = window.innerHeight;
    } else if (document.documentElement && document.documentElement.clientHeight) {
        /* Explorer 6 Strict Mode */
    	$windowInnerWidth = document.documentElement.clientWidth;
    	$windowInnerHeight = document.documentElement.clientHeight;
    } else if (document.body) {
        /* other Explorers */
    	$windowInnerWidth = document.body.clientWidth;
    	$windowInnerHeight = document.body.clientHeight;
    }
}

getInnerWindowHeight();

function setWidth()
{
    
	$minWidth = ($windowInnerWidth < 1200) ? 20 : ($ie) ? 20 : 0;
	$($containerDivId).setStyle({'width' : $windowInnerWidth-$minWidth + 'px'});
	$($rightSideDivId).setStyle({'width' : ($windowInnerWidth-$minWidth-$leftSideWidth) + 'px'});
	$($middleContentId).setStyle({'width' : ($windowInnerWidth-($leftSideWidth+120+$minWidth)) + 'px'});	
}

checkSeachForm = function(form)
{
	if (form.searchWord.value == '' || form.searchWord.value == 'zoeken..') {
		alert('Er dient wel een zoekwoord te zijn opgegeven!');
		return false;
	}
	return true;
}

Event.observe(window,'load', function() {
	if ($windowInnerWidth < 1200) {
		$('middle_menu_div_id').style.left = '-210px';
		$('middle_content_div_id').style.marginLeft = '-110px';
		$('middle_content_div_id').style.width = $('middle_content_div_id').getWidth()+113 + 'px';
		$('right_inner_menu_div_id').style.width = $windowInnerWidth - $('right_inner_menu_div_id').offsetLeft + 'px';
	}	
});

