var MAP_CORE_EVENT_TYPES=['activePluginChanged','callPlugin','callPlotterAddPoint','callPlotterAddMultiline','callPlotterAddPolygon','callPlotterAddPointToMultiline','callPlotterImport','callPlotterDeletePointFromMultiline','callPlotterDeleteSelection','callPlotterDisabled','callPlotterSelect','callPluginFinished','checkResize','closeInfoWindow','closeModalDialog','createContentPanel','createMapControl','createModalDialog','createPlacemark','createLineString','createPolygon','elementDropped','featureAdded','featureUpdated','featureDeleted','featureSelected','featureDeselected','getExtent','getMapSize','loaded','loginRequired','mapClick','mapLayerAdded','mapLayerRemoved','moveView','moveViewExtent','openContentPanel','openModalDialog','openInfoWindow','openMapControl','openNotificationWindow','placemarkClicked','placemarkMouseOver','placemarkMouseOut','placemarkDropped','pluginClientInitialized','requestedPointReceived','removeContentPanel','removeMapControl','removeModalDialog','removePlacemark','removeResult','removeResultType','setResultActive','setLineStyle','showErrorReport','updateLoginState','updateFeatureId','updateMapLayerVisibility','updatePlacemark','updateResultCount','updateResultVisibility','updateView','unload'];var IS_DEVEL=(location.host.indexOf('.devel.')!=-1);var IS_STAGING=(location.host.indexOf('.staging.')!=-1);var IS_LIVE=(!IS_DEVEL&&!IS_STAGING);var _GeoMaxClientCore_id=0;function GeoMaxClientCore(objectName,xajax)
{maxEventSource.apply(this,[MAP_CORE_EVENT_TYPES]);this.objectName=typeof(objectName)=='string'?objectName:'GeoMaxClientCore_'+(++_GeoMaxClientCore_id);this.xajax=xajax;this.ajaxDebug=false;this.ajaxDebugIndent=0;this.ajaxDebugOldIndent=0;this.debugTime=0;this.debugWindow=null;this.debugWindowId='GeoMaxClientCoreDebug'+(new Date().getTime());this.processingResponse=false;this.delayedAlerts=new Array();this.requestingPoint=null;this.extent=null;this.mapSize=null;this.pluginClients=new Object();this.pluginResultCount=new Object();this.pluginResultVisibility=new Object();this.contentPanels=new Object();this.privatePlugins=new Object();this.activePanel=null;this.previousPanel=null;this.loginState=new Object();this.loginState.isLoggedIn=false;this.loginState.userName=0;this.loginState.addressId=0;this.loginState.companyLogin=false;this.iconStyles=new Object();this.lineStyles=new Object();this.mapLayers=new Array();this.startExtent=null;this.extentMargin={lon:0,lat:0};this.reloadCount=null;this.lastPlacemarkId=0;this.pageLoaded=false;this.timeoutSupported=false;this.customInfoWindow=false;this.rootUrl=this._getRootUrl();var myself=this;this._handleServerResponse=function(r,o){return myself._processServerResponse(r,o);};setTimeout(function(){myself.timeoutSupported=true;},0);if(!this._initializeXajax()){return;}
window[this.objectName]=this;}
GeoMaxClientCore.prototype=new maxEventSource();GeoMaxClientCore.prototype._initializeXajax=function()
{var myself=this;if(this.xajax.debug){this.xajax.debug.writeMessage=function(message,prefix,cls){if(cls=='errorText'){if(window.console){console.error("ajax processing error! "+message);}
var standardMessage="Door een fout in deze pagina kan de door u gewenste handeling niet worden uitgevoerd.\n"
+"Neem a.u.b. contact op om de fout te rapporteren."
+"\n\n\n--------------------------------------------------------------------\n";+"classificatie: client processing error";alert(standardMessage+"\n"+message);}};}
return true;}
GeoMaxClientCore.prototype.loaded=function()
{this.pageLoaded=true;this.fireEvent("loaded",{});}
GeoMaxClientCore.prototype.isLoaded=function()
{return this.pageLoaded;}
GeoMaxClientCore.prototype.unload=function()
{this.fireEvent("unload",{});}
GeoMaxClientCore.prototype.debug=function(message)
{if(!this.ajaxDebug){return;}
var newWindow=false;if(this.debugWindow==null||this.debugWindow.closed){this.debugWindow=window.open('about:blank',this.debugWindowId,'width=800,height=600,scrollbars=1,resizable,status');this.debugWindow.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">'
+'<html><head><title>GeoMaxClientCore debug messages</title>'
+'<style type="text/css">'
+' .debugEntry { margin: 3px; padding: 3px; border-top: 1px solid gray; }'
+' .debugDate  { font-weight: bold; margin: 2px; }'
+' .debugText  { margin: 2px; }'
+' blockquote  { font-size: 95%; margin: 0.5em 0 0.5em 2em; padding: 0; }'
+'</style>'
+'</head><body>'
+'<h2>GeoMaxClientCore debug messages</h2>'
+'<div id="debugTag"></div>'
+'</body></html>');newWindow=true;}
if(this.debugWindow==null){alert(message+"\n\n(het debug venster kon niet geopend worden)");return;}
message=message.replace(/<cmd>/g,"\n<cmd>");message=message.replace(/&/g,"&amp;");message=message.replace(/</g,"&lt;");message=message.replace(/>/g,"&gt;");message=message.replace(/\n/g,"<br>");message=message.replace(/^([A-Za-z0-9_.\-]+:) /,'<b><font color=#0057ae>$1</font></b> ');message=message.replace(/^([A-Za-z0-9_.\-]+(?:\(\))?) - /,'<b><font color=#0057ae>$1</font></b> - ');message=message.replace(/^(\[server debug\]) /,'<b><font color=#34850c>$1</font></b> ');message=message.replace(/^(\-{4,} [^-]{2,} \-{4,})$/gm,'<b>$1</b>');var now=new Date();var hours=now.getHours();var mins=now.getMinutes();var secs=now.getSeconds();if(mins<10)mins="0"+mins;if(secs<10)secs="0"+secs;var time=hours+":"+mins+":"+secs;var indentChanged=(this.ajaxDebugIndent!=this.ajaxDebugOldIntent);var indentCss='padding-left: '+(this.ajaxDebugIndent*2)+'em;';var outdentCss='';if(this.ajaxDebugIndent>this.ajaxDebugOldIndent){indentCss+='padding-top: 0.5em;';}
else if(this.ajaxDebugIndent<this.ajaxDebugOldIndent){outdentCss+='margin-top: 0.5em;';}
this.ajaxDebugOldIndent=this.ajaxDebugIndent;debugTag=this.debugWindow.document.getElementById('debugTag');if(this.debugTime!=0&&!newWindow&&(now.getTime()-this.debugTime)>1000){debugTag.innerHTML+='<div class="debugEntry"><br /><br /><br /></div>'+"\n";}
this.debugTime=now.getTime();debugTag.innerHTML+='<div class="debugEntry" style='+outdentCss+'>'
+'<div style="'+indentCss+'">'
+'<span class="debugDate">'+time+'</span>: '
+'<tt><span class="debugText">'+message+'</span></tt>'
+'</div></div>'+"\n";}
GeoMaxClientCore.prototype.isDebugEnabled=function()
{return this.ajaxDebug;}
GeoMaxClientCore.prototype.setDebugEnabled=function(enabled)
{this.ajaxDebug=enabled?true:false;}
GeoMaxClientCore.prototype.setDebugIndent=function(step)
{this.ajaxDebugIndent+=step;}
GeoMaxClientCore.prototype.getObjectName=function()
{return this.objectName;}
GeoMaxClientCore.prototype.getRootUrl=function()
{return this.rootUrl;}
GeoMaxClientCore.prototype._getRootUrl=function()
{var rootUrl=location.protocol+'//'+location.host;var lastSlash=location.pathname.lastIndexOf('/');if(lastSlash!=-1&&lastSlash<(location.pathname.length-1)){rootUrl+=location.pathname.substring(0,lastSlash+1);}
else{rootUrl+=location.pathname;}
return rootUrl;}
GeoMaxClientCore.prototype.getRestUrl=function(request,args)
{var url=this.getRootUrl()+"?page=dashboard_rest&request="+escape(request);if(args!=null){for(var i=0;i<args.length;i++){url+="&args[]="+escape(args[i]);}}
url+="&clientObject="+escape(this.objectName);return url;}
GeoMaxClientCore.prototype.isLoggedIn=function()
{return this.loginState.isLoggedIn;}
GeoMaxClientCore.prototype.isCompanyLoggedIn=function()
{return this.loginState.isLoggedIn&&this.loginState.companyLogin;}
GeoMaxClientCore.prototype.getLoginState=function()
{return this.loginState;}
GeoMaxClientCore.prototype.loginRequired=function(pluginName,reason)
{if(!this.isLoggedIn()){this.fireEvent("loginRequired",{pluginName:pluginName,reason:reason});}}
GeoMaxClientCore.prototype.isProcessingResponse=function()
{return this.processingResponse;}
GeoMaxClientCore.prototype.getResultCount=function(pluginName)
{return this.pluginResultCount[pluginName];}
GeoMaxClientCore.prototype.getResultVisibility=function(pluginName)
{return this.pluginResultVisibility[pluginName];}
GeoMaxClientCore.prototype.isTimeoutSupported=function()
{return this.timeoutSupported;}
GeoMaxClientCore.prototype.getStartPoint=function()
{return{latitude:(this.startExtent.north+this.startExtent.south)/2,longitude:(this.startExtent.west+this.startExtent.east)/2,range:20000};}
GeoMaxClientCore.prototype.setStartPoint=function(latitude,longitude,range)
{this.startExtent={north:latitude+0.3,south:latitude-0.3,west:longitude-0.3,east:longitude+0.3};}
GeoMaxClientCore.prototype.getStartExtent=function()
{return this.startExtent;}
GeoMaxClientCore.prototype.setStartExtent=function(north,west,south,east)
{this.startExtent={north:north,west:west,south:south,east:east};}
GeoMaxClientCore.prototype.getReloadCount=function()
{return this.reloadCount;}
GeoMaxClientCore.prototype.setReloadCount=function(reloadCount)
{this.reloadCount=reloadCount;}
GeoMaxClientCore.prototype.getExtent=function()
{if(!this.hasEventListeners("getExtent")){return null;}
else{this.extent=null;this.fireEvent("getExtent",{});return this.extent;}}
GeoMaxClientCore.prototype.setExtentMargin=function(lon,lat)
{this.extentMargin={lon:lon,lat:lat};}
GeoMaxClientCore.prototype.getExtentMargin=function()
{return this.extentMargin;}
GeoMaxClientCore.prototype.setExtent=function(north,west,south,east)
{this.extent={north:north,west:west,south:south,east:east};}
GeoMaxClientCore.prototype.getMapSize=function()
{if(!this.hasEventListeners("getMapSize")){return null;}
else{this.mapSize=null;this.fireEvent("getMapSize",{});return this.mapSize;}}
GeoMaxClientCore.prototype.setMapSize=function(width,height)
{this.mapSize={width:width,height:height};}
GeoMaxClientCore.prototype.setCustomInfoWindow=function(customInfoWindow)
{this.customInfoWindow=customInfoWindow;}
GeoMaxClientCore.prototype.getCustomInfoWindow=function()
{return this.customInfoWindow;}
GeoMaxClientCore.prototype.addIconStyle=function(pluginName,iconType,iconUrl,activeIconUrl,iconAnchorPxX,iconAnchorPxY,iconWidth,iconHeight,shadowUrl,shadowWidth,shadowHeight)
{if(this.iconStyles[pluginName]==null){this.iconStyles[pluginName]=new Object();}
this.iconStyles[pluginName][iconType]={iconUrl:iconUrl,activeIconUrl:activeIconUrl,iconAnchorPxX:iconAnchorPxX,iconAnchorPxY:iconAnchorPxY,iconWidth:iconWidth,iconHeight:iconHeight,shadowUrl:shadowUrl,shadowWidth:shadowWidth,shadowHeight:shadowHeight};}
GeoMaxClientCore.prototype.getIconStyle=function(pluginName,iconType)
{if(this.iconStyles[pluginName]!=null){return this.iconStyles[pluginName][iconType];}
return null;}
GeoMaxClientCore.prototype.getDefaultIconStyle=function(pluginName)
{if(this.iconStyles[pluginName]!=null){return this.iconStyles[pluginName]['default'];}
return null;}
GeoMaxClientCore.prototype.getIconStyleList=function(pluginName)
{return this.iconStyles[pluginName];}
GeoMaxClientCore.prototype.hasIconStyle=function(pluginName,iconType)
{return this.iconStyles[pluginName]!=null&&this.iconStyles[pluginName][iconType]!=null;}
GeoMaxClientCore.prototype.addLineStyle=function(pluginName,lineType,lineColor,lineOpacity,width,fillColor,fillOpacity,drawColor)
{if(this.lineStyles[pluginName]==null){this.lineStyles[pluginName]=new Object();}
this.lineStyles[pluginName][lineType]={lineColor:lineColor,lineOpacity:lineOpacity,width:width,fillColor:fillColor,fillOpacity:fillOpacity,drawColor:drawColor};}
GeoMaxClientCore.prototype.getLineStyle=function(pluginName,lineType)
{if(this.lineStyles[pluginName]!=null){return this.lineStyles[pluginName][lineType];}
return null;}
GeoMaxClientCore.prototype.getDefaultLineStyle=function(pluginName)
{if(this.lineStyles[pluginName]!=null){return this.lineStyles[pluginName]['default'];}
return null;}
GeoMaxClientCore.prototype.getLineStyleList=function(pluginName)
{return this.lineStyles[pluginName];}
GeoMaxClientCore.prototype.setLineStyle=function(pluginName,iconType,lineType,index)
{this.debug("GeoMaxClientCore.setLineStyle: request to set linestyle #"+index+". plugin="+pluginName+". iconType="+iconType+". lineType="+lineType);this.fireEvent('setLineStyle',{pluginName:pluginName,iconType:iconType,lineType:lineType,index:index});}
GeoMaxClientCore.prototype.addContentPanel=function(pluginName,panelType)
{if(this.contentPanels[pluginName]==null){this.contentPanels[pluginName]=new Object();this.contentPanels[pluginName].__panelCount=0;}
this.contentPanels[pluginName][panelType]=true;this.contentPanels[pluginName].__panelCount++;}
GeoMaxClientCore.prototype.hasContentPanel=function(pluginName,panelType)
{return(this.contentPanels[pluginName]!=null)&&(this.contentPanels[pluginName][panelType]!=null);}
GeoMaxClientCore.prototype.getActiveContentPanel=function()
{return this.activePanel;}
GeoMaxClientCore.prototype.getPreviousContentPanel=function()
{return this.previousPanel;}
GeoMaxClientCore.prototype.setActiveContentPanel=function(pluginName,panelType)
{if(this.activePanel!=null){this.previousPanel=this.activePanel;}
this.activePanel={pluginName:pluginName,panelType:panelType};var previousPlugin=(this.previousPanel!=null?this.previousPanel.pluginName:null);if(previousPlugin==null||previousPlugin!=this.activePanel.pluginName){this.fireEvent("activePluginChanged",{pluginName:pluginName,previousPluginName:previousPlugin});}}
GeoMaxClientCore.prototype.addMapLayer=function(pluginName,layerId,layerType,url_type,url,visible,bounds,minVisibleExtent,maxVisibleExtent)
{var mapLayer={pluginName:pluginName,layerId:layerId,layerType:layerType,url_type:url_type,url:url,visible:visible,bounds:bounds,minVisibleExtent:minVisibleExtent,maxVisibleExtent:maxVisibleExtent};if(!this.getMapLayer(pluginName,layerId)){this.mapLayers.push(mapLayer);this.mapLayers.sort(function(a,b){var width_a=Math.abs(a.bounds.north-a.bounds.west);var width_b=Math.abs(b.bounds.north-b.bounds.west);if(width_a<width_b)return+1;if(width_a>width_b)return-1;return 0;});this.fireEvent("mapLayerAdded",{pluginName:pluginName,layerId:layerId,layerType:layerType,isVisible:visible});}}
GeoMaxClientCore.prototype.removeMapLayer=function(pluginName,layerId)
{var layerType=null;var removeIndex=null;for(var i=0;i<this.mapLayers.length;i++){var mapLayer=this.mapLayers[i];if(mapLayer.pluginName==pluginName&&mapLayer.layerId==layerId){layerType=mapLayer.layerType;removeIndex=i;break;}}
this.fireEvent("mapLayerRemoved",{pluginName:pluginName,layerId:layerId,layerType:layerType,isVisible:mapLayer.visible});if(removeIndex!=null){this.mapLayers.splice(removeIndex,1);}}
GeoMaxClientCore.prototype.getMapLayers=function()
{return this.mapLayers;}
GeoMaxClientCore.prototype.getMapLayer=function(pluginName,layerId)
{for(var i=0;i<this.mapLayers.length;i++){var mapLayer=this.mapLayers[i];if(mapLayer.pluginName==pluginName&&mapLayer.layerId==layerId){return mapLayer;}}
return null;}
GeoMaxClientCore.prototype.getMapLayerByExtent=function(tileExtent,completeExtent,layerType,visible)
{for(var i=0;i<this.mapLayers.length;i++){var mapLayer=this.mapLayers[i];if(mapLayer.layerType==layerType&&(!visible||mapLayer.visible)&&this.hasMapLayerTileForExtent(mapLayer,tileExtent,completeExtent)){return mapLayer;}}
return null;}
GeoMaxClientCore.prototype.hasMapLayerTileForExtent=function(mapLayer,tileExtent,completeExtent)
{var fitTest=(mapLayer.layerType=='overlay')?this._isIntersectExtent:this._isContainedExtent;if(!fitTest.call(this,tileExtent,mapLayer.bounds)){return false;}
if(mapLayer.minVisibleExtent!=null&&!fitTest.call(this,mapLayer.minVisibleExtent,completeExtent)||mapLayer.maxVisibleExtent!=null&&!fitTest.call(this,completeExtent,mapLayer.maxVisibleExtent)){return false;}
return true;}
GeoMaxClientCore.prototype.getMapLayerTileUrl=function(mapLayer,tileExtent,width,height)
{switch(mapLayer.url_type){case'mapproxy':case'':return this.rootUrl+"modulecomponents/mapproxy/"
+"?maplayer="+mapLayer.pluginName+":"+mapLayer.layerId
+"&WIDTH="+width
+"&HEIGHT="+height
+"&BBOX="+tileExtent.west+","+tileExtent.south+","+tileExtent.east+","+tileExtent.north
+"&CRS=epsg:4326";case'kich':var url=mapLayer.url;url=url.replace('[north]',tileExtent.north+0.00095);url=url.replace('[west]',tileExtent.west+0.00048);url=url.replace('[south]',tileExtent.south+0.00095);url=url.replace('[east]',tileExtent.east+0.00048);url=url.replace('[width]',width);url=url.replace('[height]',height);return url;case'wms':default:var url=mapLayer.url;url=url.replace('[north]',tileExtent.north);url=url.replace('[west]',tileExtent.west);url=url.replace('[south]',tileExtent.south);url=url.replace('[east]',tileExtent.east);url=url.replace('[width]',width);url=url.replace('[height]',height);return url;}}
GeoMaxClientCore.prototype._isContainedExtent=function(innerExtent,outerExtent)
{return innerExtent.south>outerExtent.south&&innerExtent.north<outerExtent.north&&innerExtent.west>outerExtent.west&&innerExtent.east<outerExtent.east;}
GeoMaxClientCore.prototype._isIntersectExtent=function(innerExtent,outerExtent)
{height=Math.abs(innerExtent.south-innerExtent.north);width=Math.abs(innerExtent.west-innerExtent.east);return innerExtent.south>(outerExtent.south-height)&&innerExtent.north<(outerExtent.north+height)&&innerExtent.west>(outerExtent.west-width)&&innerExtent.east<(outerExtent.east+width);}
GeoMaxClientCore.prototype.setPrivatePlugin=function(pluginName,state)
{if(state){this.privatePlugins[pluginName]=state;}
else{delete this.privatePlugins[pluginName];}}
GeoMaxClientCore.prototype.isPrivatePlugin=function(pluginName)
{return(this.privatePlugins[pluginName]!=null);}
GeoMaxClientCore.prototype.generateFeatureId=function()
{return--this.lastPlacemarkId;}
GeoMaxClientCore.prototype.getDefaultPopupFeatures=function(maxWidth,maxHeight,fullBrowser)
{if(typeof(maxWidth)=='undefined'||maxWidth==null){maxWidth=900;}
if(typeof(maxHeight)=='undefined'||maxHeight==null){maxHeight=900;}
var width=Math.min(maxWidth,screen.availWidth-100);var height=Math.min(maxHeight,parseInt(screen.availHeight*0.7));var x=parseInt((screen.availWidth/2)-(width/2));var y=parseInt((screen.availHeight/2)-(height/2));var features="resizable,scrollbars,status,width="+width+",height="+height+",left="+x+",screenX="+x+",top="+y+",screenY="+y;if(fullBrowser){features+=",toolbar,location,menubar";}
return features;}
GeoMaxClientCore.prototype.openPopup=function(url,maxWidth,maxHeight,fullBrowser)
{var features=this.getDefaultPopupFeatures(maxWidth,maxHeight,fullBrowser);var popupWindow=window.open(url,"",features);if(popupWindow==null){alert("De opgevraagde informatie kan niet getoond worden in een nieuw venster, dit wordt mogelijk veroorzaakt door een popup blocker");return false;}
return true;}
GeoMaxClientCore.prototype.registerDraggablePlacemark=function(elementId,pluginName,iconType,customIconUrl,customActiveIconUrl)
{if(!this.registerDraggableElement(elementId)){return;}
if(typeof(customIconUrl)=='undefined')customIconUrl="";if(typeof(customActiveIconUrl)=='undefined')customActiveIconUrl="";var element=document.getElementById(elementId);element._dragMeta={dragType:'placemark',pluginName:pluginName,iconType:iconType,customIconUrl:customIconUrl,customActiveIconUrl:customActiveIconUrl};}
GeoMaxClientCore.prototype.registerDraggableElement=function(elementId)
{if(!this.isDragDropLoaded()){alert("interne fout in GeoMaxClientCore.registerDraggableElement: support code for drag and drop is not loaded!");return false;}
var element=document.getElementById(elementId);if(element==null){alert("interne fout in GeoMaxClientCore.registerDraggableElement aanroep: element '"+elementId+"' bestaat niet!");return false;}
if(typeof(MapDraggable)=='function'){new MapDraggable(elementId);}
else{new Draggable(elementId,{revert:true,ghosting:true});}
return true;}
GeoMaxClientCore.prototype.registerDropTarget=function(elementId,cssClass,dropCallback)
{if(!this.isDragDropLoaded()){alert("interne fout in GeoMaxClientCore.registerDropTarget: support code for drag and drop is not loaded!");return false;}
var element=document.getElementById(elementId);if(element==null){alert("interne fout in GeoMaxClientCore.registerDropTarget aanroep: element '"+elementId+"' bestaat niet!");return false;}
if(typeof(MapDroppables)=='object'){MapDroppables.add(elementId,{accept:cssClass,onDrop:function(src,dest,ev){var ghostSrc=src.getDraggableElement();var realSrc=src.getElement();if(ghostSrc!=realSrc&&realSrc._dragMeta!=null){ghostSrc._dragMeta=realSrc._dragMeta;}
dropCallback(ghostSrc,dest,ev);}});}
else{Droppables.add(elementId,{accept:cssClass,onDrop:dropCallback});}
return true;}
GeoMaxClientCore.prototype.isDragDropLoaded=function()
{return(typeof(MapDroppables)=='object'&&typeof(MapDraggable)=='function')||(typeof(Droppables)=='object'&&typeof(Draggable)=='function');}
GeoMaxClientCore.prototype.getDraggableMetaProperties=function(elementId)
{var element=typeof(elementId)=='object'?elementId:document.getElementById(elementId);if(element==null||typeof(element._dragMeta)!='object'){return null;}
return element._dragMeta;}
GeoMaxClientCore.prototype.elementDropped=function(dropPluginName,latitude,longitude,dragElementId)
{var dragMeta=this.getDraggableMetaProperties(dragElementId);var dragType=(dragMeta==null?null:dragMeta.dragType);switch(dragType){case'placemark':this.debug("GeoMaxClientCore.elementDropped: element dropped at "+dropPluginName+" dragType="+dragType+" plugin="+dragMeta.pluginName+" iconType="+dragMeta.iconType);this.fireEvent("placemarkDropped",{pluginName:dragMeta.pluginName,iconType:dragMeta.iconType,latitude:latitude,longitude:longitude,customIconUrl:dragMeta.customIconUrl,customActiveIconUrl:dragMeta.customActiveIconUrl,dropPluginName:dropPluginName,dragElementId:dragElementId});break;default:this.debug("GeoMaxClientCore.elementDropped: element dropped at "+dropPluginName+" dragType=unknown");this.fireEvent("elementDropped",{pluginName:null,latitude:latitude,longitude:longitude,dropPluginName:dropPluginName,elementId:dragElementId});}}
GeoMaxClientCore.prototype.mapClicked=function(latitude,longitude,pixelX,pixelY)
{if(this.requestingPoint!=null&&this.requestingPoint.pluginName!=null){var eventData=this.requestingPoint;this.requestingPoint=null;eventData.latitude=latitude;eventData.longitude=longitude;eventData.pixelX=pixelX;eventData.pixelY=pixelY;this.fireEvent("requestedPointReceived",eventData);}
else{this.debug("GeoMaxClientCore.mapClicked: received map click event. latitude="+latitude+" longitude="+longitude+" pixelX="+pixelX+" pixelY="+pixelY);this.fireEvent("mapClick",{latitude:latitude,longitude:longitude,pixelX:pixelX,pixelY:pixelY});}}
GeoMaxClientCore.prototype.requestPoint=function(pluginName,iconType)
{this.requestingPoint={pluginName:pluginName,iconType:iconType};}
GeoMaxClientCore.prototype.hasPointRequest=function()
{return this.requestingPoint!=null&&this.requestingPoint.pluginName!=null;}
GeoMaxClientCore.prototype.cancelPointRequest=function()
{this.requestingPoint=null;}
GeoMaxClientCore.prototype.featureAdded=function(featureType,pluginName,featureId,ordinates,properties,reason)
{this.fireEvent("featureAdded",{featureType:featureType,pluginName:pluginName,featureId:featureId,ordinates:ordinates,properties:properties,reason:reason});}
GeoMaxClientCore.prototype.featureUpdated=function(featureType,pluginName,featureId,ordinates,properties,reason)
{this.fireEvent("featureUpdated",{featureType:featureType,pluginName:pluginName,featureId:featureId,ordinates:ordinates,properties:properties,reason:reason});}
GeoMaxClientCore.prototype.featureDeleted=function(featureType,pluginName,featureId,ordinates,properties,reason)
{this.fireEvent("featureDeleted",{featureType:featureType,pluginName:pluginName,featureId:featureId,ordinates:ordinates,properties:properties,reason:reason});}
GeoMaxClientCore.prototype.featureSelected=function(featureType,pluginName,featureId,ordinates,properties,reason)
{this.fireEvent("featureSelected",{featureType:featureType,pluginName:pluginName,featureId:featureId,ordinates:ordinates,properties:properties,reason:reason});}
GeoMaxClientCore.prototype.featureDeselected=function(featureType,pluginName,featureId,ordinates,properties,reason)
{this.fireEvent("featureDeselected",{featureType:featureType,pluginName:pluginName,featureId:featureId,ordinates:ordinates,properties:properties,reason:reason});}
GeoMaxClientCore.prototype.callPlotterSetModeAddPoint=function(pluginName,iconType)
{this.fireEvent('callPlotterAddPoint',{pluginName:pluginName,iconType:iconType});}
GeoMaxClientCore.prototype.callPlotterSetModeAddMultiline=function(pluginName,lineType)
{this.fireEvent('callPlotterAddMultiline',{pluginName:pluginName,lineType:lineType});}
GeoMaxClientCore.prototype.callPlotterSetModeAddPolygon=function(pluginName,lineType)
{this.fireEvent('callPlotterAddPolygon',{pluginName:pluginName,lineType:lineType});}
GeoMaxClientCore.prototype.callPlotterSetModeSelect=function()
{this.fireEvent('callPlotterSelect',{});}
GeoMaxClientCore.prototype.callPlotterSetModeAddPointToMultiline=function()
{this.fireEvent('callPlotterAddPointToMultiline',{});}
GeoMaxClientCore.prototype.callPlotterSetModeDeletePointFromMultiline=function()
{this.fireEvent('callPlotterDeletePointFromMultiline',{});}
GeoMaxClientCore.prototype.callPlotterDeleteSelection=function()
{this.fireEvent('callPlotterDeleteSelection',{});}
GeoMaxClientCore.prototype.callPlotterSetModeDisabled=function()
{this.fireEvent('callPlotterDisabled',{});}
GeoMaxClientCore.prototype.callPlotterImport=function(pluginName,features)
{this.fireEvent('callPlotterImport',{pluginName:pluginName,features:features});}
GeoMaxClientCore.prototype.placemarkClicked=function(pluginName,index,latitude,longitude)
{this.fireEvent('placemarkClicked',{pluginName:pluginName,index:index,latitude:latitude,longitude:longitude});}
GeoMaxClientCore.prototype.placemarkMouseOver=function(pluginName,marker,index,latitude,longitude)
{this.fireEvent('placemarkMouseOver',{pluginName:pluginName,marker:marker,index:index,latitude:latitude,longitude:longitude});}
GeoMaxClientCore.prototype.placemarkMouseOut=function(pluginName,marker,index,latitude,longitude)
{this.fireEvent('placemarkMouseOut',{pluginName:pluginName,marker:marker,index:index,latitude:latitude,longitude:longitude});}
GeoMaxClientCore.prototype.fireEvent=function(eventType,eventData)
{this.ajaxDebugIndent+=1;var listenerCount=this.getEventListenerCount(eventType);if(listenerCount==0){this.debug("GeoMaxClientCore.fireEvent: no listeners for event '"+eventType+"', event not fired");this.ajaxDebugIndent-=1;return false;}
if(this.isDebugEnabled()){var args='';for(i in eventData){args+="\n- "+i+"="+eventData[i];}
this.debug("GeoMaxClientCore.fireEvent: fireing event '"+eventType+"' to "+listenerCount+" listeners with arguments:"+args);}
this.ajaxDebugIndent+=1;var returnValue=maxEventSource.prototype.fireEvent.call(this,eventType,eventData);this.ajaxDebugIndent-=2;return returnValue;}
GeoMaxClientCore.prototype.callPlugin=function()
{var pluginAction=arguments[0];this.debug("------------------ BEGIN CALL ------------------");this.debug("GeoMaxClientCore.callPlugin: calling plugin server method '"+pluginAction+"' with "+(arguments.length-1)+" args.\n");this.fireEvent('callPlugin',{pluginAction:pluginAction});var args=this._getXajaxCallArguments(arguments,1);this.xajax.call("callPlugin",args);}
GeoMaxClientCore.prototype.callPluginSynchronous=function()
{ajaxMode=this.getAjaxMode();this.setAjaxMode('synchronous');this.callPlugin.apply(this,arguments);this.setAjaxMode(ajaxMode);}
GeoMaxClientCore.prototype.callPluginUpload=function()
{if(xajax.upload==null||xajax.upload.callUpload==null){alert("interne fout in GeoMaxClientCore.callPluginUpload: support code for simple file upload is not loaded!");return;}
var pluginAction=arguments[0];var form=arguments[1];var hasUploadField=false;for(var i=0;i<form.elements.length;i++){if(form.elements[i].type=='file'&&form.elements[i].value!=""){hasUploadField=true;}}
this.debug("------------------ BEGIN CALL ------------------");this.debug("GeoMaxClientCore.callPluginUpload: calling plugin server method '"+pluginAction+"' with "+(arguments.length-2)+" args.\n");this.fireEvent('callPlugin',{pluginAction:pluginAction});var args=this._getXajaxCallArguments(arguments,2);if(hasUploadField){this.xajax.upload.callUpload("callPlugin",form,args);}
else{this.xajax.call("callPlugin",args);}}
GeoMaxClientCore.prototype._getXajaxCallArguments=function(args,startIndex)
{var methodArgs=[this.objectName,args[0]];for(var i=startIndex;i<args.length;i++){var argValue=this._fixXajaxArgument(i,args[i]);methodArgs.push(argValue);}
return{mode:this.getAjaxMode(),parameters:methodArgs,responseProcessor:this._handleServerResponse,_pluginAction:args[0]};}
GeoMaxClientCore.prototype.getAjaxMode=function()
{return typeof(this.ajaxMode)!="undefined"?this.ajaxMode:'asynchronous';}
GeoMaxClientCore.prototype.setAjaxMode=function(mode)
{this.ajaxMode=mode;}
GeoMaxClientCore.prototype._fixXajaxArgument=function(i,argValue)
{if(argValue===true){return 1;}
else if(argValue===false){return 0;}
else if(typeof(argValue)=='object'){if(!argValue instanceof Object||window.Element&&!argValue instanceof Element){alert("interne fout in aanroep naar GeoMaxClientCore.callPlugin: de waarde van argument "+(i+1)+" bevat een DOM "+argValue.tagName+" element!");return'[DOM '+argValue.tagName+' element]';}
for(var j in argValue){if(typeof(argValue[j])=='function'){continue;}
argValue[j]=this._fixXajaxArgument(i,argValue[j]);}}
return argValue;}
GeoMaxClientCore.prototype._processServerResponse=function(callData)
{this.debug("------------------ GOT RESPONSE ------------------");this.delayedAlerts=new Array();this.processingResponse=true;var returnValue;var type=callData.request.getResponseHeader('content-type');if(type!=null&&type.indexOf(';')!=-1){type=type.substring(0,type.indexOf(';'));type=type.replace(/^\s+/,'').replace(/\s+$/,'');}
if(type==null||type!='text/xml'||callData.request.responseXML==null||callData.request.responseXML.documentElement==null||callData.request.responseXML.documentElement.tagName=='parsererror'){returnValue=this._processServerError(callData);}
else{returnValue=xajax.responseProcessor.xml(callData);}
for(var i=0;i<this.delayedAlerts.length;i++){alert(this.delayedAlerts[i]);}
this.delayedAlerts=new Array();this.debug("------------------ END CALL ------------------");this.processingResponse=false;return returnValue;}
GeoMaxClientCore.prototype._processServerError=function(callData)
{this.debug("GeoMaxClientCore._processServerError: received invalid response");var methodData=[null,null];if(callData._pluginAction!=null){methodData=callData._pluginAction.split(":");}
this.callPluginFinished(methodData[0],methodData[1],true);document.body.style.cursor='default';if(xajax.config.statusMessages==true){window.status='Done';}
if(callData.request.responseXML==null&&callData.request.status==""){return;}
var lastPluginAction=methodData.join(":");var responseXML=callData.request.responseXML;var responseText=callData.request.responseText;var standardMessage="Door een fout in deze pagina kan de door u gewenste handeling niet worden uitgevoerd.\n"
+"Neem a.u.b. contact op om de fout te rapporteren."
+"\n\n\n--------------------------------------------------------------------\n"
+"laatste actie: "+lastPluginAction;var isPhpError=responseText.match(/^<br(?: \/)?>\r?\n<b>(?:fatal error|notice|parse error)/i);var isPhpDie=responseText.match(/ at <strong>[^<]+<\/strong> line <strong>[0-9]+<\/strong>/);if(isPhpError||isPhpDie){standardMessage+="\nclassificatie: server application error";if(!IS_DEVEL){alert(standardMessage);}
else{responseText=responseText.replace(/^<br \/>\r?\n/,'').replace(/<\/?(?:br|p|b|strong)(?: \/)?>/g,'').replace(/^(?:fatal error|notice|parse error):\s+/i,'');if(window.console!=null){var logMessage=responseText.replace(/ in \//,"\nin file   : /").replace(/ on line /,"\non line   : ");console.info("PHP error : "+logMessage);}
alert(standardMessage+"\nserver response: "+responseText);}
return;}
if(responseXML!=null){var errorString;var errorLine;var errorXml;standardMessage+="\nclassificatie: client parsing error";if(responseXML.documentElement==null&&responseXML.parseError!=null){var parseError=responseXML.parseError;errorString=parseError.reason;errorLine=parseError.line;errorXml=parseError.srcText;if(errorString==""&&errorLine==0&&errorXml==""){standardMessage+=" (empty document)";errorXml='(empty document)';}}
else if(responseXML.documentElement.tagName=='parsererror'){var parseError=responseXML.documentElement;errorLine="";errorXml="";if(parseError.childNodes.length==2){errorString=parseError.childNodes[0].nodeValue;errorXml=parseError.childNodes[1].childNodes[0].nodeValue;errorString=errorString.replace(/http(s?):\/\/[^\ \r\n]+sub=ajax[^ \r\n]*/,"(ajax call url)");errorXml=errorXml.replace(/[\r\n]*-+\^$/,"");}
else{errorString=parseError.textContent.replace(/[\r\n]*-+^$/,"");errorXml="(unknown)";}
if(IS_DEVEL&&window.console!=null){var consoleError="";for(var i=0;i<parseError.childNodes.length;i++){consoleError+=parseError.childNodes[i].textContent+"\n";}
console.info(consoleError);}}
if(errorString!=null){if(!IS_DEVEL){alert(standardMessage);}
else{errorString=errorString.replace(/[\.\r\n]+$/,"");alert(standardMessage+"\nxml parse error: "+errorString
+(errorLine==""?"":", response line "+errorLine)
+"\nxml source line: "+errorXml);}}
else{alert(standardMessage);}
return;}
if(responseText==""){responseText="(unknown/empty)";}
alert(standardMessage+"\nserver response: "+responseText);}
GeoMaxClientCore.prototype.createContentPanel=function(pluginName,panelType,html)
{this.debug("GeoMaxClientCore.createContentPanel: request to create content panel. plugin="+pluginName+" panel="+panelType);this.fireEvent('createContentPanel',{pluginName:pluginName,panelType:panelType,html:html});}
GeoMaxClientCore.prototype.createMapControl=function(pluginName,panelType,html,left,top,offsetLeft,offsetTop)
{this.debug("GeoMaxClientCore.createMapControl: request to create map control. plugin="+pluginName+" panel="+panelType);this.fireEvent('createMapControl',{pluginName:pluginName,panelType:panelType,html:html,left:left,top:top,offsetLeft:offsetLeft,offsetTop:offsetTop});}
GeoMaxClientCore.prototype.createModalDialog=function(pluginName,panelType,html,width,height)
{this.debug("GeoMaxClientCore.createModalDialog: request to create a modal dialog. plugin="+pluginName+" panel="+panelType);this.fireEvent('createModalDialog',{pluginName:pluginName,panelType:panelType,html:html,width:width,height:height});}
GeoMaxClientCore.prototype.createPlacemark=function(pluginName,iconType,index,title,description,latitude,longitude,customIconUrl,customActiveIconUrl,draggable)
{this.debug("GeoMaxClientCore.createPlacemark: request to create placemark #"+index+". plugin="+pluginName+". iconType="+iconType+" title="+title);this.fireEvent('createPlacemark',{pluginName:pluginName,iconType:iconType,index:index,title:title,description:description,latitude:latitude,longitude:longitude,customIconUrl:customIconUrl,customActiveIconUrl:customActiveIconUrl,draggable:draggable});}
GeoMaxClientCore.prototype.createLineString=function(pluginName,iconType,lineType,index,title,description,ordinates)
{this.debug("GeoMaxClientCore.createLineString: request to create linestring #"+index+". plugin="+pluginName+". iconType="+iconType+". lineType="+lineType+" title="+title);this.fireEvent('createLineString',{pluginName:pluginName,iconType:iconType,lineType:lineType,index:index,title:title,description:description,ordinates:ordinates});}
GeoMaxClientCore.prototype.createPolygon=function(pluginName,iconType,lineType,index,title,description,ordinates)
{this.debug("GeoMaxClientCore.createPolygon: request to create polygon #"+index+". plugin="+pluginName+". iconType="+iconType+". lineType="+lineType+" title="+title);this.fireEvent('createPolygon',{pluginName:pluginName,iconType:iconType,lineType:lineType,index:index,title:title,description:description,ordinates:ordinates});}
GeoMaxClientCore.prototype.callPluginFinished=function(pluginName,methodName,hasError)
{var pluginAction=pluginName+":"+methodName;this.debug("GeoMaxClientCore.callPluginFinished: callPlugin('"+pluginAction+"') completed.");this.fireEvent('callPluginFinished',{pluginAction:pluginAction,pluginName:pluginName,methodName:methodName,hasError:hasError});}
GeoMaxClientCore.prototype.updateLoginState=function(pluginName,isLoggedIn,userName,addressId,companyLogin)
{this.loginState.isLoggedIn=isLoggedIn?true:false;this.loginState.userName=userName;this.loginState.addressId=addressId;this.loginState.companyLogin=companyLogin?true:false;this.debug("GeoMaxClientCore.updateLoginState: loggedin="+isLoggedIn+" username="+userName+" addressid="+addressId+" companyLogin="+companyLogin);this.fireEvent('updateLoginState',{pluginName:pluginName,isLoggedIn:isLoggedIn,userName:userName,addressId:addressId,companyLogin:companyLogin});if(!isLoggedIn){this.removePrivatePluginData();}}
GeoMaxClientCore.prototype.removePrivatePluginData=function()
{for(var pluginName in this.privatePlugins){if(typeof(this.privatePlugins[pluginName])=='function'){continue;}
this.debug("GeoMaxClientCore.removePrivatePluginData: automatically removing results of private plugin '"+pluginName+"'");if(this.contentPanels[pluginName]!=null){for(var panelType in this.contentPanels[pluginName]){if(panelType=='__panelCount'){continue;}
this.removeContentPanel(pluginName,panelType);}}
this.removeResult(pluginName);}}
GeoMaxClientCore.prototype.updatePlacemark=function(pluginName,iconType,index,title,description,latitude,longitude,customIconUrl,customActiveIconUrl,draggable)
{this.debug("GeoMaxClientCore.updatePlacemark: request to update placemark #"+index+". plugin="+pluginName+". iconType="+iconType+" title="+title+" description="+description);this.fireEvent('updatePlacemark',{pluginName:pluginName,iconType:iconType,index:index,title:title,description:description,latitude:latitude,longitude:longitude,customIconUrl:customIconUrl,customActiveIconUrl:customActiveIconUrl,draggable:draggable});}
GeoMaxClientCore.prototype.updateFeatureId=function(pluginName,oldId,newId)
{this.debug("GeoMaxClientCore.updateFeatureId: request to change feature id #"+oldId+" to #"+newId+". plugin="+pluginName);this.fireEvent('updateFeatureId',{pluginName:pluginName,oldId:oldId,newId:newId});}
GeoMaxClientCore.prototype.updateMapLayerVisibility=function(pluginName,layerId,isVisible)
{var mapLayer=this.getMapLayer(pluginName,layerId);if(mapLayer==null){this.debug("GeoMaxClientCore.updateMapLayerVisibility: WARNING: plugin '"+pluginName+"' has no layer named '"+layerId+"', yet wants to update visibility!");}
var isChanged=(mapLayer.visible!=isVisible);mapLayer.visible=isVisible;this.debug("GeoMaxClientCore.updateMapLayerVisibility: plugin="+pluginName+" layer="+layerId+" visible="+isVisible);this.fireEvent('updateMapLayerVisibility',{pluginName:pluginName,layerId:layerId,isVisible:isVisible,isChanged:isChanged});}
GeoMaxClientCore.prototype.updateResultCount=function(pluginName,resultCount)
{this.pluginResultCount[pluginName]=resultCount;if(this.pluginResultVisibility[pluginName]==null){this.pluginResultVisibility[pluginName]=true;}
this.debug("GeoMaxClientCore.updateResultCount: plugin="+pluginName+" results="+resultCount);this.fireEvent('updateResultCount',{pluginName:pluginName,resultCount:resultCount});}
GeoMaxClientCore.prototype.updateResultVisibility=function(pluginName,isVisible)
{if(this.pluginResultCount[pluginName]==null){this.debug("GeoMaxClientCore.updateResultVisibility: WARNING: plugin '"+pluginName+"' has no results, yet wants to update visibility!");}
var isChanged=(this.pluginResultVisibility[pluginName]==isVisible);this.pluginResultVisibility[pluginName]=isVisible;this.debug("GeoMaxClientCore.updateResultVisibility: plugin="+pluginName+" visible="+isVisible);this.fireEvent('updateResultVisibility',{pluginName:pluginName,isVisible:isVisible,isChanged:isChanged});}
GeoMaxClientCore.prototype.setResultActive=function(pluginName,index)
{this.debug("GeoMaxClientCore.setResultActive: plugin="+pluginName+" index="+index);this.fireEvent('setResultActive',{pluginName:pluginName,index:index});}
GeoMaxClientCore.prototype.updateView=function(pluginName)
{this.debug("GeoMaxClientCore.updateView: request to update the view. plugin="+pluginName);this.fireEvent('updateView',{pluginName:pluginName});}
GeoMaxClientCore.prototype.moveView=function(pluginName,latitude,longitude)
{this.debug("GeoMaxClientCore.moveView: request to move the view. plugin="+pluginName+" latitude="+latitude+" longitude="+longitude);this.fireEvent('moveView',{pluginName:pluginName,latitude:latitude,longitude:longitude});}
GeoMaxClientCore.prototype.moveViewExtent=function(pluginName,north,west,south,east,minRange,maxRange,zoomOutRange)
{this.debug("GeoMaxClientCore.moveViewExtent: request to move the view to a new extent. plugin="+pluginName);this.fireEvent('moveViewExtent',{pluginName:pluginName,north:north,west:west,south:south,east:east,minRange:minRange,maxRange:maxRange,zoomOutRange:zoomOutRange});}
GeoMaxClientCore.prototype.openContentPanel=function(pluginName,panelType)
{if(this.activePanel!=null){this.previousPanel=this.activePanel;}
this.activePanel=null;this.debug("GeoMaxClientCore.openContentPanel: request to open content panel. plugin="+pluginName+" panel="+panelType);this.fireEvent('openContentPanel',{pluginName:pluginName,panelType:panelType});}
GeoMaxClientCore.prototype.openPreviousContentPanel=function()
{if(this.previousPanel!=null){this.openContentPanel(this.previousPanel.pluginName,this.previousPanel.panelType);this.previousPanel=null;}}
GeoMaxClientCore.prototype.openMapControl=function(pluginName,panelType)
{this.debug("GeoMaxClientCore.openMapControl: request to open content panel. plugin="+pluginName+" panel="+panelType);this.fireEvent('openMapControl',{pluginName:pluginName,panelType:panelType});}
GeoMaxClientCore.prototype.openModalDialog=function(pluginName,panelType)
{this.debug("GeoMaxClientCore.openMapControl: request to open modal dialog. plugin="+pluginName+" panel="+panelType);this.fireEvent('openModalDialog',{pluginName:pluginName,panelType:panelType});}
GeoMaxClientCore.prototype.openInfoWindow=function(pluginName,html,latitude,longitude)
{this.fireEvent('openInfoWindow',{pluginName:pluginName,html:html,latitude:latitude,longitude:longitude});}
GeoMaxClientCore.prototype.closeInfoWindow=function(pluginName)
{this.fireEvent('closeInfoWindow',{pluginName:pluginName});}
GeoMaxClientCore.prototype.closeModalDialog=function(pluginName,panelType)
{this.fireEvent('closeModalDialog',{pluginName:pluginName,panelType:panelType});}
GeoMaxClientCore.prototype.openNotificationWindow=function(pluginName,title,html)
{this.fireEvent('openNotificationWindow',{pluginName:pluginName,title:title,html:html});}
GeoMaxClientCore.prototype.showErrorReport=function(pluginName,message,report)
{this.debug("GeoMaxClientCore.showErrorReport: request to show error report. plugin="+pluginName+" message="+message);this.fireEvent("showErrorReport",{pluginName:pluginName,message:message,report:report});}
GeoMaxClientCore.prototype.removeContentPanel=function(pluginName,panelType)
{this.debug("GeoMaxClientCore.removeContentPanel: request to remove content panel. plugin="+pluginName+" panel="+panelType);this.fireEvent('removeContentPanel',{pluginName:pluginName,panelType:panelType});if(this.contentPanels[pluginName]!=null){delete this.contentPanels[pluginName][panelType];this.contentPanels[pluginName].__panelCount--;if(this.contentPanels[pluginName].__panelCount==0){delete this.contentPanels[pluginName];}}}
GeoMaxClientCore.prototype.removeMapControl=function(pluginName,panelType)
{this.debug("GeoMaxClientCore.removeMapControl: request to remove map overlay. plugin="+pluginName+" panel="+panelType);this.fireEvent('removeMapControl',{pluginName:pluginName,panelType:panelType});}
GeoMaxClientCore.prototype.removeModalDialog=function(pluginName,panelType)
{this.debug("GeoMaxClientCore.removeModalDialog: request to remove modal dialog. plugin="+pluginName+" panel="+panelType);this.fireEvent('removeModalDialog',{pluginName:pluginName,panelType:panelType});}
GeoMaxClientCore.prototype.initializePluginClient=function(pluginName)
{this.debug("GeoMaxClientCore.initializePluginClient: request to initialize client-side script. plugin="+pluginName);var className=pluginName+"Plugin";if(typeof(window[className])!='function'){alert("interne fout: JavaScript class '"+className+"' kan niet geladen worden!\n\n"
+"Informatie voor de webmaster:\n"
+"- method: GeoMaxClientCore.initializePluginClient\n"
+"- details: class niet gedefineerd, mogelijk door syntax fouten");return false;}
var prototype=eval(className+".prototype");if(prototype!=null&&typeof(prototype.pluginName)=='undefined'){prototype.pluginName=pluginName;}
else{this.debug("GeoMaxClientCore.initializePluginClient: pluginName prototype value was already set for '"+pluginName+"' plugin.");}
clientObject=eval(" new "+className+"(this)");if(clientObject==null){alert("interne fout: JavaScript class '"+className+"' kan niet geladen worden!\n\n"
+"Informatie voor de webmaster:\n"
+"- method: GeoMaxClientCore.initializePluginClient\n"
+"- details: constructor kon niet uitgevoerd worden");return false;}
this.addPluginClient(pluginName,clientObject);this.fireEvent('pluginClientInitialized',{pluginName:pluginName});}
GeoMaxClientCore.prototype.removePlacemark=function(pluginName,index)
{this.debug("GeoMaxClientCore.removePlacemark: request to remove placemark #"+index+". plugin="+pluginName+".");this.fireEvent('removePlacemark',{pluginName:pluginName,index:index});}
GeoMaxClientCore.prototype.removeResult=function(pluginName,receivingNew)
{delete this.pluginResultCount[pluginName];delete this.pluginResultVisibility[pluginName];if(typeof(receivingNew)=='undefined'){receivingNew=false;}
this.debug("GeoMaxClientCore.removeResult: request to remove results. plugin="+pluginName+" receivingNew="+receivingNew);this.fireEvent('removeResult',{pluginName:pluginName,receivingNew:receivingNew});}
GeoMaxClientCore.prototype.removeResultType=function(pluginName,iconType,receivingNew)
{if(typeof(receivingNew)=='undefined'){receivingNew=false;}
this.debug("GeoMaxClientCore.removeResultType: request to remove results. plugin="+pluginName+" iconType="+iconType+" receivingNew="+receivingNew);this.fireEvent('removeResultType',{pluginName:pluginName,iconType:iconType,receivingNew:receivingNew});}
GeoMaxClientCore.prototype.alertLater=function(message)
{if(this.isProcessingResponse()){this.delayedAlerts[this.delayedAlerts.length]=message;}
else{if(!this.isTimeoutSupported()){alert(message);}
else{setTimeout(function(){alert(message)},0);}}}
GeoMaxClientCore.prototype.checkResize=function()
{this.fireEvent('checkResize',{});}
GeoMaxClientCore.prototype.addPluginClient=function(pluginName,clientObject)
{if(this.pluginClients[pluginName]!=null){alert("interne fout in aanroep naar GeoMaxClientCore.addPluginClient: plugin '"+pluginName+"' is al geregistreerd!");return false;}
if(this[pluginName+"Plugin"]!=null){alert("interne fout in aanroep naar GeoMaxClientCore.addpluginClient: ongeldige plugin naam: "+pluginName);return false;}
this.debug("GeoMaxClientCore.addPluginClient: registering client for plugin '"+pluginName+"'");this.pluginClients[pluginName]=clientObject;this[pluginName+"Plugin"]=clientObject;return true;}
GeoMaxClientCore.prototype.getPluginClient=function(pluginName)
{if(this.pluginClients[pluginName]!=null){return this.pluginClients[pluginName];}
else{alert("Interne fout in aanroep naar getPluginClient: plugin '"+pluginName+"' heeft geen client object geladen");return null;}}
GeoMaxClientCore.prototype.hasPluginClient=function(pluginName)
{return this.pluginClients[pluginName]!=null;}
GeoMaxClientCore.prototype.callPluginClient=function()
{var args=arguments;var methodData=args[0].split(":");var pluginName=methodData[0];var methodName=methodData[1];var clientObject=this.pluginClients[pluginName];if(clientObject==null){alert("Interne fout in aanroep naar callPluginClient: de plugin '"+pluginName+"' heeft geen client object geladen");return;}
var methodPointer=eval('clientObject.'+methodName);if(typeof(methodPointer)!='function'){alert("Interne fout in aanroep naar callPluginClient: de plugin '"+pluginName+"' heeft geen '"+methodName+"(..)' methode.");return;}
var jsCall='clientObject.'+methodName+'(';for(var i=1;i<args.length;i++){if(i>1){jsCall+=', ';}
jsCall+='args['+i+']';}
jsCall+=')';this.debug("GeoMaxClientCore.callPluginClient: calling plugin client method '"+pluginName+":"+methodName+"' with "+(args.length-1)+" args.");this.ajaxDebugIndent+=1;var returnValue;try{returnValue=eval(jsCall);}
catch(error){this.ajaxDebugIndent-=1;throw error;}
this.ajaxDebugIndent-=1;return returnValue;}