var XMLHTTP_SUCCEED_CODE = 200;
var XMLHTTP_READY = 4;
function openDiv(divName) {
	if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) {
		calculateLeft = ((document.body.clientWidth/2) - 270);
		calculateTop = (((document.body.clientHeight/2) - 317));
	} else {
		calculateLeft = ((window.innerWidth/2) - 270);
		calculateTop = ((window.innerHeight/2) - 317);
	}
	var oDiv = document.getElementById(divName);
	oDiv.style.visibility = 'visible';
	oDiv.style.width = '635px';
	oDiv.style.height = '540px';
	oDiv.style.position = 'absolute';
	oDiv.style.top = calculateTop+"px";
	oDiv.style.left = calculateLeft+"px";
		
}
function closeDiv(divId) {
	var oDiv = document.getElementById(divId);
	oDiv.style.visibility = 'hidden';
	oDiv.style.width = '0px';
	oDiv.style.height = '0px';	
}
function setImgSrc (image, source) {
	var image = document.getElementById(image);
	var path = siteBase+"modules/basic/IMG/menu/";
	image.src = path+source;
}
function setSideHeight () {
	var mainHeight = document.getElementById('content_main').offsetHeight;
	var theDiv = document.getElementById('content_sidebar');
	theDiv.style.height = mainHeight+"px";
}
function initialize() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"),
            { size: new GSize(700,600) } );
        map.removeMapType(G_HYBRID_MAP);
        map.setCenter(new GLatLng(53.1730, 5.4496), 15);
        map.addControl(new GLargeMapControl());
        map.openInfoWindow(map.getCenter(),
                            document.createTextNode
                           ("Boers Tuinhout Harlingen BV"));
    
        var mapControl = new GMapTypeControl();
        map.addControl(mapControl);
        
      }
}
function insertContent(divId){
	document.getElementById(divId).innerHTML = "&nbsp;&nbsp;<a href='#' onClick=\"closeDiv('"+divId+"'); GUnload()\">Venster sluiten</a><br/><div id='map_canvas' style='width: 500px; height: 300px'></div>";
}