google map marker cluster
i am facing problem in google map marker clustering. i am using api v3. but due to some reasons, which i am not able to find out, i cannot apply marker clustering. i ll be thankful for any help and suggestion.
the function applying markers is as follows along with the cluster code:


    function setupOfficeMarkers() {
    	mgr.clearMarkers();
    	mgr.refresh();
    	allmarkers.length = 0;
    	document.getElementById('zomlevel').value = map.getZoom();
    	document.getElementById('boundsmap').value = map.getCenter();
     	// mapbound = map.getBounds();
     	mapbound=new google.maps.LatLngBounds();
      	
    	for (var i in officeLayer) {
    		if (officeLayer.hasOwnProperty(i)) {
    	  		var layer = officeLayer[i];
    	  		var markers = [];
    	  
    	  		for (var j in layer["places"]) {
    				if (layer["places"].hasOwnProperty(j)) {
    					if(map.getZoom()>=layer["zoom"][0] && map.getZoom()<=layer["zoom"][1]){	
    					//displaying home icon on places starts here
    					var place = layer["places"][j];
    						if(place["icon"]){
    				  			if(place["icon"][0]){
    					  			if(place["icon"][0] == 'own'){
    					  			}else{
    						  			var icon = getIcon(place["icon"]);
    					  				}
    				  			}else{
    					  		var icon = getIcon(place["icon"]);
    				  				}
    			  			}else{
    							var icon = getIcon(place["icon"]);
    			  				}
    			//displaying home icon on places ends here
    			var title = place["name"];
    			//alert(title);
    			  
    			var posn = new google.maps.LatLng(place["posn"][0], place["posn"][1]);
    			mapbound.extend(posn);
    			  			  		  
    			if(map.getBounds().contains(posn)){
    				if(place["icon"][0] == 'own'){
    					var imageUrl = place["icon"][1];
    				  	var markerImage = new google.maps.MarkerImage(imageUrl, new google.maps.Size(66, 65));
    					var marker = new google.maps.Marker({
               				position: posn,
               				draggable: false,
               				icon: markerImage
              			});
    		  				markers.push(50); 
    						//alert(markers.length);
    				 }else{
    				 	var marker = createMarker(posn, title, getIcon(place["icon"]));
    				 }
    					
    				  mgr.addMarker(marker, layer["zoom"][0], layer["zoom"][1]);
    				  attachSecretMessageAjax(marker, place["name"],map);  
       				  //attachSecretMessage(marker, '<h2>'+place["name"]+'</h2>',map);
    			  }
    			  //allmarkers.push(marker);
    			}
    		}
    	  }
    	  //mgr.addMarkers(markers, layer["zoom"][0], layer["zoom"][1]);
    	  
    	}alert(markers.length+"OUTSIDE");
    	var markerCluster = new MarkerClusterer(map, markers);
      }
     //alert(markers.length+"OUTSIDE");
      
      mgr.refresh();
      updateStatus(mgr.getMarkerCount(map.getZoom()));
    }
google map marker cluster
===

i am facing problem in google map marker clustering. i am using api v3. but due to some reasons, which i am not able to find out, i cannot apply marker clustering. i ll be thankful for any help and suggestion.
the function applying markers is as follows along with the cluster code:


    function setupOfficeMarkers() {
    	mgr.clearMarkers();
    	mgr.refresh();
    	allmarkers.length = 0;
    	document.getElementById('zomlevel').value = map.getZoom();
    	document.getElementById('boundsmap').value = map.getCenter();
     	// mapbound = map.getBounds();
     	mapbound=new google.maps.LatLngBounds();
      	
    	for (var i in officeLayer) {
    		if (officeLayer.hasOwnProperty(i)) {
    	  		var layer = officeLayer[i];
    	  		var markers = [];
    	  
    	  		for (var j in layer["places"]) {
    				if (layer["places"].hasOwnProperty(j)) {
    					if(map.getZoom()>=layer["zoom"][0] && map.getZoom()<=layer["zoom"][1]){	
    					//displaying home icon on places starts here
    					var place = layer["places"][j];
    						if(place["icon"]){
    				  			if(place["icon"][0]){
    					  			if(place["icon"][0] == 'own'){
    					  			}else{
    						  			var icon = getIcon(place["icon"]);
    					  				}
    				  			}else{
    					  		var icon = getIcon(place["icon"]);
    				  				}
    			  			}else{
    							var icon = getIcon(place["icon"]);
    			  				}
    			//displaying home icon on places ends here
    			var title = place["name"];
    			//alert(title);
    			  
    			var posn = new google.maps.LatLng(place["posn"][0], place["posn"][1]);
    			mapbound.extend(posn);
    			  			  		  
    			if(map.getBounds().contains(posn)){
    				if(place["icon"][0] == 'own'){
    					var imageUrl = place["icon"][1];
    				  	var markerImage = new google.maps.MarkerImage(imageUrl, new google.maps.Size(66, 65));
    					var marker = new google.maps.Marker({
               				position: posn,
               				draggable: false,
               				icon: markerImage
              			});
    		  				markers.push(50); 
    						//alert(markers.length);
    				 }else{
    				 	var marker = createMarker(posn, title, getIcon(place["icon"]));
    				 }
    					
    				  mgr.addMarker(marker, layer["zoom"][0], layer["zoom"][1]);
    				  attachSecretMessageAjax(marker, place["name"],map);  
       				  //attachSecretMessage(marker, '<h2>'+place["name"]+'</h2>',map);
    			  }
    			  //allmarkers.push(marker);
    			}
    		}
    	  }
    	  //mgr.addMarkers(markers, layer["zoom"][0], layer["zoom"][1]);
    	  
    	}alert(markers.length+"OUTSIDE");
    	var markerCluster = new MarkerClusterer(map, markers);
      }
     //alert(markers.length+"OUTSIDE");
      
      mgr.refresh();
      updateStatus(mgr.getMarkerCount(map.getZoom()));
    }