anchor.diff:  BSC_PROG003D0009Q_fieldsId['measureDataOrganizationOid'] 	= 'BSC_PROG003D0009Q_measureDataOrganizationOid';
   BSC_PROG003D0009Q_fieldsId['measureDataEmployeeOid'] 		= 'BSC_PROG003D0009Q_measureDataEmployeeOid';
   
  +
  +function BSC_PROG003D0009Q_setDataForValue() {
  +	dijit.byId('BSC_PROG003D0009Q_measureDataOrganizationOid').set("value", _gscore_please_select_id);
  +	dijit.byId('BSC_PROG003D0009Q_measureDataEmployeeOid').set("value", _gscore_please_select_id);	
  +	dijit.byId('BSC_PROG003D0009Q_measureDataOrganizationOid').set('readOnly', true);
  +	dijit.byId('BSC_PROG003D0009Q_measureDataEmployeeOid').set('readOnly', true);
  +	var dataFor = dijit.byId("BSC_PROG003D0009Q_dataFor").get("value");
  +	if ('employee' == dataFor) {
  +		dijit.byId('BSC_PROG003D0009Q_measureDataEmployeeOid').set('readOnly', false);
  +	}
  +	if ('organization' == dataFor) {
  +		dijit.byId('BSC_PROG003D0009Q_measureDataOrganizationOid').set('readOnly', false);
  +	}	
  +}
  +
  +function BSC_PROG003D0009Q_setMeasureDataOrgaValue() {
  +	var dataFor = dijit.byId("BSC_PROG003D0009Q_dataFor").get("value");
  +	if ('all' == dataFor || 'employee' == dataFor) {
  +		dijit.byId('BSC_PROG003D0009Q_measureDataOrganizationOid').set("value", _gscore_please_select_id);
  +	}
  +}
  +
  +function BSC_PROG003D0009Q_setMeasureDataEmplValue() {
  +	var dataFor = dijit.byId("BSC_PROG003D0009Q_dataFor").get("value");
  +	if ('all' == dataFor || 'organization' == dataFor) {
  +		dijit.byId('BSC_PROG003D0009Q_measureDataOrganizationOid').set("value", _gscore_please_select_id);
  +	}	
  +}
  +
  +function BSC_PROG003D0009Q_setFrequencyValue() {
  +	var frequency = dijit.byId("BSC_PROG003D0009Q_frequency").get("value");
  +	dijit.byId("BSC_PROG003D0009Q_startYearDate").set("readOnly", true);
  +	dijit.byId("BSC_PROG003D0009Q_endYearDate").set("readOnly", true);
  +	dijit.byId("BSC_PROG003D0009Q_startDate").set("readOnly", true);
  +	dijit.byId("BSC_PROG003D0009Q_endDate").set("readOnly", true);
  +	if ( frequency == _gscore_please_select_id ) {
  +		return;
  +	}
  +	if ('1' == frequency || '2' == frequency || '3' == frequency) { // day, week, month
  +		dijit.byId("BSC_PROG003D0009Q_startDate").set("readOnly", false);
  +		dijit.byId("BSC_PROG003D0009Q_endDate").set("readOnly", false);		
  +	} else { // quarter, half-year, year
  +		dijit.byId("BSC_PROG003D0009Q_startYearDate").set("readOnly", false);
  +		dijit.byId("BSC_PROG003D0009Q_endYearDate").set("readOnly", false);				
  +	}
  +}
  +
  +
   function BSC_PROG003D0009Q_query() {
   	BSC_PROG003D0009Q_clearContent();
   	setFieldsBackgroundDefault(BSC_PROG003D0009Q_fieldsId);
   	setFieldsNoticeMessageLabelDefault(BSC_PROG003D0009Q_fieldsId);
   	xhrSendParameter(
  -			'${basePath}/bsc.kpiReportContentQueryAction.action', 
  +			'${basePath}/bsc.dashboardNewContentAction.action', 
   			{ 
   				'fields.visionOid' 					: 	dijit.byId("BSC_PROG003D0009Q_visionOid").get("value"),
   				'fields.startYearDate'				:	dijit.byId("BSC_PROG003D0009Q_startYearDate").get('displayedValue'),
  
positive.code:                 }
              }
          };
  
  	for (var p in data.perspectiveItems) {
  		for (var o in data.perspectiveItems[p].objectives) {
  			var objectiveItem = data.perspectiveItems[p].objectives[o];
  			for (var k in objectiveItem.kpis) {
  				
  				var kpi = objectiveItem.kpis[k];
  				var divChartId = "BSC_PROG003D0009Q_kpi_container_" + kpi.id;
  				
  				var maxVal = kpi.target;
  				if (kpi.score > maxVal) {
  					maxVal = kpi.score;
  				}
  				maxVal = parseInt(maxVal+'', 10);
  				
  				BSC_PROG003D0009Q_setSpeedGaugeChart(gaugeOptions, divChartId, kpi.name, maxVal, kpi.score);				
  				
  			}
  		}
  	}
  	
  	
  }
  
  
  function BSC_PROG003D0009Q_setSpeedGaugeChart(gaugeOptions, chartId, textTitle, maxVal, score) {
      // The speed gauge
      $( '#'+chartId ).highcharts(Highcharts.merge(gaugeOptions, {
          yAxis: {
              min: 0,
              max: maxVal,
              title: {
                  text: textTitle
              }
          },
  
          credits: {
              enabled: false
          },
  
          series: [{
              name: textTitle,
              data: [ parseFloat( BSC_PROG003D0009Q_parseScore(score) ) ],
              dataLabels: {
                  format: '<div style="text-align:center"><span style="font-size:25px;color:' +
                      ((Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black') + '">{y}</span><br/>' +
                         '<span style="font-size:12px;color:silver">Score</span></div>'
              },
              tooltip: {
                  valueSuffix: ' Score'
              }
          }]
  
      }));		
  }
  
  
  function BSC_PROG003D0009Q_showChartForKpiDateRange(data) {
  	
  	if ( null == data.categories || data.categories.length < 2 ) {
  		return;
  	}
  	
  	dojo.byId("BSC_PROG003D0009Q_kpi_daterange_alert_title").innerHTML = '<span class="isa_info"><b>Trend</b></span>';
  	
      $('#BSC_PROG003D0009Q_kpi_daterange_container').highcharts({
          title: {
              text: 'Trend',
              x: -20 //center
          },
          subtitle: {
              text: 'KPI Score',
              x: -20
          },
          xAxis: {
              categories: data.categories
          },
          yAxis: {
              title: {
  
negative.code: 											showLabel:false,
  											onClick:function(){  
  												BSC_PROG003D0009Q_query();
  											}"><s:property value="getText('BSC_PROG003D0009Q_btnQuery')"/></button>		
  									            
  									<button id="BSC_PROG003D0009Q_btnXls" data-dojo-type="dijit.form.Button"
  										data-dojo-props="
  											iconClass:'btnExcelIcon',
  											showLabel:false,
  											onClick:function(){
  												BSC_PROG003D0009Q_generateExport();																			  
  											}"><s:property value="getText('BSC_PROG003D0009Q_btnXls')"/></button>	
  
  									<gs:inputfieldNoticeMsgLabel id="BSC_PROG003D0009Q_visionOid"></gs:inputfieldNoticeMsgLabel>		
  									<gs:inputfieldNoticeMsgLabel id="BSC_PROG003D0009Q_frequency"></gs:inputfieldNoticeMsgLabel>
  									<gs:inputfieldNoticeMsgLabel id="BSC_PROG003D0009Q_startYearDate"></gs:inputfieldNoticeMsgLabel>
  									<gs:inputfieldNoticeMsgLabel id="BSC_PROG003D0009Q_startDate"></gs:inputfieldNoticeMsgLabel>
  									<gs:inputfieldNoticeMsgLabel id="BSC_PROG003D0009Q_measureDataOrganizationOid"></gs:inputfieldNoticeMsgLabel>
  									<gs:inputfieldNoticeMsgLabel id="BSC_PROG003D0009Q_measureDataEmployeeOid"></gs:inputfieldNoticeMsgLabel>
  											
  								</td>											
  							</tr>	
  
  							<tr valign="top">
  								<td width="100%" align="left" height="25px">	
  								
  									<s:property value="getText('BSC_PROG003D0009Q_visionOid')"/>
  									<gs:select name="BSC_PROG003D0009Q_visionOid" dataSource="visionMap" id="BSC_PROG003D0009Q_visionOid"></gs:select>
  									<div data-dojo-type="dijit/Tooltip" data-dojo-props="connectId:'BSC_PROG003D0009Q_visionOid'">
  					    				Select vision.
  									</div>  									
  						    		&nbsp;		    			
  					    																	
  									<s:property value="getText('BSC_PROG003D0009Q_frequency')"/>
  									<gs:select name="BSC_PROG003D0009Q_frequency" dataSource="frequencyMap" id="BSC_PROG003D0009Q_frequency" value="6" onChange="BSC_PROG003D0009Q_setFrequencyValue();" width="140"></gs:select>
  									<div data-dojo-type="dijit/Tooltip" data-dojo-props="connectId:'BSC_PROG003D0009Q_frequency'">
  					    				Select frequency.
  									</div> 									
  								</td>											
  							</tr>	
  												
  							<tr valign="top">
  								<td width="100%" align="left" height="25px">
  								
  							    	<s:property value="getText('BSC_PROG003D0009Q_startYearDate')"/>
  							    	<input id="BSC_PROG003D0009Q_startYearDate" name="BSC_PROG003D0009Q_startYearDate" data-dojo-type="dojox.form.YearTextBox" 
  							    		maxlength="4"  type="text" data-dojo-props='style:"width: 80px;" ' />
  									<div data-dojo-type="dijit/Tooltip" data-dojo-props="connectId:'BSC_PROG003D0009Q_startYearDate'">
  					    				Select start year.
  									</div>							    		
  							    	&nbsp;	
  							    	<s:property value="getText('BSC_PROG003D0009Q_endYearDate')"/>
  							    	<input id="BSC_PROG003D0009Q_endYearDate" name="BSC_PROG003D0009Q_endYearDate" data-dojo-type="dojox.form.YearTextBox" 
  							    		maxlength="4"  type="text" data-dojo-props='style:"width: 80px;" ' />
  									<div data-dojo-type="dijit/Tooltip" data-dojo-props="connectId:'BSC_PROG003D0009Q_endYearDate'">
  					    				Select end year.
  									</div>							    									    	
  							    	&nbsp;&nbsp;		
  									<s:property value="getText('BSC_PROG003D0009Q_startDate')"/>
  									<input id="BSC_PROG003D0009Q_startDate" type="text" name="BSC_PROG003D0009Q_startDate" data-dojo-type="dijit.form.DateTextBox"
  										maxlength="10" 
  										constraints="{datePattern:'yyyy/MM/dd', selector:'date' }" style="width:120px;" readonly />
  									<div data-dojo-type="dijit/Tooltip" data-dojo-props="connectId:'BSC_PROG003D0009Q_startDate'">
  					    				Select start date.
  									</div>											
  									&nbsp;						
  									<s:property value="getText('BSC_PROG003D0009Q_endDate')"/>
  									<input id="BSC_PROG003D0009Q_endDate" type="text" name="BSC_PROG003D0009Q_endDate" data-dojo-type="dijit.form.DateTextBox"
  										maxlength="10" 
  										constraints="{datePattern:'yyyy/MM/dd', selector:'date' }" style="width:120px;" readonly />																	    									    	
  									<div data-dojo-type="dijit/Tooltip" data-dojo-props="connectId:'BSC_PROG003D0009Q_endDate'">
  					    				Select end date.
  									</div>							    			
  							    </td>	
  							</tr>
  							<tr valign="top">
  								<td width="100%" align="left" height="25px">							
  									<s:property value="getText('BSC_PROG003D0009Q_dataFor')"/>
  									<gs:select name="BSC_PROG003D0009Q_dataFor" dataSource="{ \"all\":\"All\", \"organization\":\"${action.getText('BSC_PROG003D0009Q_measureDataOrganizationOid')}\", \"employee\":\"${action.getText('BSC_PROG003D0009Q_measureDataEmployeeOid')}\" }" id="BSC_PROG003D0009Q_dataFor" onChange="BSC_PROG003D0009Q_setDataForValue();" width="140"></gs:select>
  									<div data-dojo-type="dijit/Tooltip" data-dojo-props="connectId:'BSC_PROG003D0009Q_dataFor'">
  					    				Select measure data type.
  									</div>										
  									&nbsp;&nbsp;
  									<s:property value="getText('BSC_PROG003D0009Q_measureDataOrganizationOid')"/>
  									<gs:filteringSelect name="BSC_PROG003D0009Q_measureDataOrganizationOid" dataSource="measureDataOrganizationMap" id="BSC_PROG003D0009Q_measureDataOrganizationOid" onChange="BSC_PROG003D0009Q_setMeasureDataOrgaValue();" readonly="Y" value="all"></gs:filteringSelect>
  									<div data-dojo-type="dijit/Tooltip" data-dojo-props="connectId:'BSC_PROG003D0009Q_measureDataOrganizationOid'">
  					    				Select measure data organization/department.
  									</div>									
  									&nbsp;&nbsp;
  									<s:property value="getText('BSC_PROG003D0009Q_measureDataEmployeeOid')"/>
  									<gs:filteringSelect name="BSC_PROG003D0009Q_measureDataEmployeeOid" dataSource="measureDataEmployeeMap" id="BSC_PROG003D0009Q_measureDataEmployeeOid" onChange="BSC_PROG003D0009Q_setMeasureDataEmplValue();" readonly="Y" value="all"></gs:filteringSelect>
  									<div data-dojo-type="dijit/Tooltip" data-dojo-props="connectId:'BSC_PROG003D0009Q_measureDataEmployeeOid'">
  					    				Select measure data personal/Employee.
  									</div>									
  								</td>
  							</tr>																						
  																											
  						</table>
  			    			
  		    		</div>		    		
  		    	</div>	
  		    	
  			    			
  			</td>
  		</tr>
  	</table>
  
  	<div id="BSC_PROG003D0009Q_content_vision"></div>	
  	<br>	
  	<br>
  	
  	<div id="BSC_PROG003D0009Q_content1"></div>	
  	<br>
  	<div id="BSC_PROG003D0009Q_perspectives_container"></div>
  	<br>
  	<br>
  	
  	<div id="BSC_PROG003D0009Q_content2"></div>	
  	<br>
  	<div id="BSC_PROG003D0009Q_objectives_container"></div>	
  	<br>
  	<br>
  	
  	<div id="BSC_PROG003D0009Q_content3"></div>	
  	<br>
  	<div id="BSC_PROG003D0009Q_kpis_container"></div>		
  	<br>
  	<br>	
  	
  	<div id="BSC_PROG003D0009Q_perspectives_daterange_container"  style="width: 100%; height: 450px; float: left"></div>
  	<br>
  	<div id="BSC_PROG003D0009Q_objectives_daterange_container"  style="width: 100%; height: 450px; float: left"></div>	
  	<br>
  	<div id="BSC_PROG003D0009Q_kpis_daterange_container"  style="width: 100%; height: 450px; float: left"></div>
  	<br>
  		
  <script type="text/javascript">${programId}_page_message();</script>	
  </body>
  </html>
  