    var map = null;
    var geocoder = null;
    var luchtfoto = null;
    
function init(callPage)
{
	switch(callPage)
	{
		case "default":
		break;
		case "advZoek":
		break;
		case "zoek":
		break;
		case "schoolpagina":
		fitPictures()
		try{
		map = new GMap2(document.getElementById('map'));
		luchtfoto = new GMap2(document.getElementById('luchtfoto'));
		
        map.addControl(new TextualZoomControl());
		luchtfoto.addControl(new TextualZoomControl());
        geocoder = new GClientGeocoder();


        
        showAddress(txtStr + " "  + txtStad + " belgium")
      }catch(error)
      {
      	alert(error.description)
      	alert("U heeft een browser die de kaartjes niet ondersteund. \n Het wordt aangeraden een browser te gebruiken die de W3C standaarden respecteerd zoals Mozilla FireFox");
       }
        docBody=document.getElementById("iFrame").contentWindow.document.body.innerHTML.toString();
		strSay=Mid(docBody,0,10);
		var lenToTake;
		if (strSay=="&lt;%%&gt;")
		{
		lenToTake=String(docBody).length;
		newBody=Mid(docBody,10,lenToTake);
		document.getElementById("iFrame").contentWindow.document.body.innerHTML=newBody;
		}
		document.getElementById("iFrame").contentWindow.document.body.bgColor="#BFC350";
		break;
	}
}
function startZoektocht()
{
	zoekForm=document.getElementById("frame_fast_search").contentWindow.document.forms[0];
	zoekForm.action="http://www.schoolzoeker.be/zoek.asp?type=basic";
	zoekForm.target="_top";
	zoekForm.submit();
}

function setElHeight(elID,newH){
	document.getElementById(elID).style.height=newH;
}
function Mid(str, start, len)
{
// Make sure start and len are within proper bounds
    if (start < 0 || len < 0) return "";
    var iEnd, iLen = String(str).length;
    if (start + len > iLen)
          iEnd = iLen;
    else
          iEnd = start + len;
    return String(str).substring(start,iEnd);
}