      var identifyTask, identifyParams, symbol;
      var layer2results, layer3results, layer4results;	 
	 
	  
	  function initFunctionality3(map) {
        
		dojo.disconnect(objectconnections[0]);
		dojo.disconnect(objectconnections[1]);
		dojo.disconnect(objectconnections[2]);
		dojo.disconnect(objectconnections[3]);
		
		objectconnections[1] = dojo.connect(map, "onClick", doIdentify3);
 
        identifyTask = new esri.tasks.IdentifyTask("http://74.93.16.209:443/Arcserver/rest/services/Southington/Admin_v/MapServer");
 
 
        identifyParams = new esri.tasks.IdentifyParameters();
        identifyParams.tolerance = 3;
        identifyParams.returnGeometry = true;
        identifyParams.layerIds = [1,3,2];
        identifyParams.layerOption = esri.tasks.IdentifyParameters.LAYER_OPTION_ALL;
 
        map.infoWindow.resize(415, 200);
        map.infoWindow.setContent(dijit.byId("tabs3").domNode);
        map.infoWindow.setTitle("Public Works Information");
 
        symbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,0,0]), 2), new dojo.Color([255,255,0,0.5]));
      }
 
      function doIdentify3(evt) {
        map.graphics.clear();
        identifyParams.geometry = evt.mapPoint;
        identifyParams.mapExtent = map.extent;
        identifyTask.execute(identifyParams, function(idResults) { addToMap3(idResults, evt); });
      }
 
      function addToMap3(idResults, evt) {
        layer2results = {displayFieldName:null,features:[]};
        layer3results = {displayFieldName:null,features:[]};
        layer4results = {displayFieldName:null,features:[]};
 
        for (var i=0, il=idResults.length; i<il; i++) {

          var idResult = idResults[i];

          if (idResult.layerId === 1) {

            if (!layer2results.displayFieldName) {layer2results.displayFieldName = idResult.displayFieldName};

            layer2results.features.push(idResult.feature);

          } else if (idResult.layerId === 3) {

            if (!layer3results.displayFieldName) {layer3results.displayFieldName = idResult.displayFieldName};

            layer3results.features.push(idResult.feature);

          } else if (idResult.layerId === 2) {

            if (!layer4results.displayFieldName) {layer4results.displayFieldName = idResult.displayFieldName};

            layer4results.features.push(idResult.feature);

        }

        dijit.byId("layer2Tab3").setContent(layerTabContent3(layer2results,"layer2results"));

        dijit.byId("layer3Tab3").setContent(layerTabContent3(layer3results,"layer3results"));

        dijit.byId("layer4Tab3").setContent(layerTabContent3(layer4results,"layer4results"));



        map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint));

      }
	  }

      function layerTabContent3(layerResults, layerName) {

        var content = "";
		

		switch (layerName) {

          case "layer2results":

            for (var i=0, il=layerResults.features.length; i<il; i++) {

			  content+="<b>Type: </b>"+layerResults.features[i].attributes['Type1']+"&nbsp;&nbsp;&nbsp;&nbsp;<b>Streetname : </b>"+layerResults.features[i].attributes['STREET']+"</br>";
              content+="<br /><br /><b>Condition: </b>"+layerResults.features[i].attributes['CONDITION']+"</br>";
			  content+="<br /><br /><b>GPS DATE  : </b>"+layerResults.features[i].attributes['GPS_DATE']+"</br>";
			  content+="<br /><br /><b>Graffiti : </b>"+layerResults.features[i].attributes['GRAFFITI']+"</br>";
            }
		
            content+="</tr>";
            break;
          case "layer3results":

            for (var i=0, il=layerResults.features.length; i<il; i++) {

			  content+="<b>Pole ID: </b>"+layerResults.features[i].attributes['POLE_ID']+"&nbsp;&nbsp;&nbsp;&nbsp;<b>Streetname : </b>"+layerResults.features[i].attributes['STREET']+"</br>";
              content+="<br /><br /><b>Type  : </b>"+layerResults.features[i].attributes['TYPE']+"</br>";
			  content+="<br /><br /><b>GPS DATE  : </b>"+layerResults.features[i].attributes['GPS_DATE']+"</br>";
			  content+="<br /><br /><b>COMMENT  : </b>"+layerResults.features[i].attributes['COMMENT']+"</br>";
            }
            content+="</tr>";
            break;
          case "layer4results":

            for (var i=0, il=layerResults.features.length; i<il; i++) {
			
				var HSCODE1 = "\"return hs.htmlExpand(this, { objectType: 'ajax'} )\""
			
			  content+="<b>ID: </b>"+layerResults.features[i].attributes['ID']+"&nbsp;&nbsp;&nbsp;&nbsp;<b>Streetname : </b>"+layerResults.features[i].attributes['STREETNAME']+"</br>";
              content+="<br/><br/><b>Owner : </b>"+layerResults.features[i].attributes['OWNER_CODE']+"&nbsp;&nbsp;&nbsp;&nbsp;<b>Year Built: </b>"+layerResults.features[i].attributes['YEARblt']+"</br>";
			  content+="<br/><b>Pipe Size : </b>"+layerResults.features[i].attributes['LINEDIAMETER_CODE']+"&nbsp;&nbsp;&nbsp;<b>Make: </b>"+layerResults.features[i].attributes['MATERIAL_CODE']+"&nbsp;&nbsp;&nbsp;<b>Length: </b>"+layerResults.features[i].attributes['LINELENGTH']+"</br>";
			  content+="<br/><b>Invert In : </b>"+layerResults.features[i].attributes['INVERT_IN']+"&nbsp;&nbsp;&nbsp;<b>Invert Out: </b>"+layerResults.features[i].attributes['INVERT_OUT']+"</br>";
			  content+="<br/><b>Slope : </b>"+layerResults.features[i].attributes['SLOPE']+"</br>";
			  content+="<br/><br/><a href=javascript:showSanitaryVideo('"+  layerResults.features[i].attributes['ID'] + "')>Sanitary Pipe Video</a>";
              content+="<br/><br/><a href='http://www.southingtongis.com/public_works/Sanitary_video.asp?ID=01_1Pipe' onclick=\"return hs.htmlExpand(this, { objectType: 'ajax', width: 600} )\"> Pipe Video test </a>"
			}
            content+="</tr></table>";
            break;
        }
        return content;
      }
 
      function showFeature_pw3(feature) {
        map.graphics.clear();
        feature.setSymbol(symbol);
        map.graphics.add(feature);
      }
	  
	 