function main(start) {
	//##### Center en min breedte Wrapper #####//
	if (navigator.appName.indexOf("Microsoft") != -1) {
		height=document.body.clientHeight;
		width=document.body.clientWidth;
	} else {
		height=window.innerHeight;
		width=window.innerWidth;
	}
	
	if (width < 1000) {
		document.getElementById('header').style.width = 1000+'px';
		document.getElementById('inhoud').style.width = 980+'px';
		document.getElementById('footer').style.width = 1000+'px';
	} else {
		document.getElementById('header').style.width = 100+'%';
		document.getElementById('inhoud').style.width = (width-20)+'px';
		document.getElementById('footer').style.width = 100+'%';
	}
	
	if (height < 500) {
		document.getElementById('inhoud').style.height = 354+'px';
		document.getElementById('handel').style.height = 354+'px';
		document.getElementById('footer').style.top = 500+'px';
	} else {
		document.getElementById('inhoud').style.height = (height-170)+'px';
		document.getElementById('handel').style.height = (height-170)+'px';
		document.getElementById('footer').style.top = (height-25)+'px';
	}

	if (start == 1) { 
		GetMap();
		start_drag();
	}
	
	resize_inhoud();
	resize();
}

function resize_inhoud() {
	// Resize de inhouds elementen
	var breede_inhoud = parseInt(document.getElementById("inhoud").style.width)-2;
	var hoogte_inhoud = parseInt(document.getElementById("inhoud").style.height)-2;
	var Vpos = parseInt(document.getElementById('handel').offsetLeft);
	
	document.getElementById("resultaat").style.width = Vpos-2+'px';
	document.getElementById("resultaat").style.height = hoogte_inhoud+'px';
	
	if (document.getElementById('lijst')) {
		document.getElementById("lijst").style.height = hoogte_inhoud-31+'px';
			document.getElementById("lijst").scrollWidth;
			document.getElementById("inlijst").style.width = document.getElementById("lijst").clientWidth;
	}
	
	document.getElementById("detail").style.width = breede_inhoud-(Vpos+10)+'px';
	document.getElementById("detail").style.height = hoogte_inhoud+'px';
	document.getElementById("inhoud_detail").style.height = hoogte_inhoud-80+'px';
	document.getElementById("inhoud_detail").style.width = breede_inhoud-(Vpos+10+40)+'px';
	informatie_box();
	informatie_map();
}

function resize_inlijst() {
	document.getElementById("lijst").scrollWidth;
	document.getElementById("inlijst").style.width = document.getElementById("lijst").clientWidth;
}

function tref() {
	/*##### Verander naam #####*/
	document.getElementById('zoek_wat_naam').style.background = 'url(/site/images/algm_product.gif)';
}

function naam() {
	/*##### Verander naam #####*/
	document.getElementById('zoek_wat_naam').style.background = 'url(/site/images/algm_bedrijfsnaam.gif)';
}

function velden(form) {
	// validation fails if the input is blank 
	if(form.trefwoord.value == '') {
		var oplossing = 'Vul alle lege velden in en klik opnieuw op zoeken!';
		form.trefwoord.focus();
		alert(oplossing);
		return false;
	} else if (form.plaats.value == '') {
		var oplossing = 'Vul alle lege velden in en klik opnieuw op zoeken!';
		form.trefwoord.focus();
		alert(oplossing);
		return false;
	}
}
