anchor.diff:  				                        className: taskColor,
   				                        id:_formUrl+"?dataId="+doc.data[i].bizKey+"&taskId="+doc.data[i].id+"&processInstanceId="+doc.data[i].processInstanceId,
   				                    });
  -				                }
  -				                callback(events);
  -				            }
  -				        });
  -				         
  -				    },
  -			
  -			        eventRender: function (event, element, icon) {
  -			        },
  -			
  -			        windowResize: function (event, ui) {
  -			            $('#calendar').fullCalendar('render');
  -			        }
  -			    });
  +			                	}else if(taskPriority == doc.data[i].priority){
  +			                		if(doc.data[i].priority == "50"){
  +				                		taskColor = ["event", "bg-color-greenLight"];
  +				                	}else if(doc.data[i].priority == "0"){
  +				                		taskColor = ["event", "bg-color-darken"];
  +				                	}else if(doc.data[i].priority == "100"){
  +				                		taskColor = ["event", "bg-color-red"];
  +				                	}
  +				                	var create_time = new Date(doc.data[i].createTime);
  +				                	var due_time;
  +				                	if(doc.data[i].dueDate == null){
  +				                		due_time = null;
  +				                	}else{
  +				                		due_time = new Date(doc.data[i].dueDate);
  +				                	}
  +				                	events.push({
  +				                        title: doc.data[i].subject,
  +				                        start: create_time, 
  +										end:due_time,
  +				                        className: taskColor,
  +				                        id:_formUrl+"?dataId="+doc.data[i].bizKey+"&taskId="+doc.data[i].id+"&processInstanceId="+doc.data[i].processInstanceId,
  +				                    });
  +			                	}
  +			                	
  +			                }
  +			                callback(events);
  +			            }
  +			        });
  +			         
  +			    },
  +		
  +		        eventRender: function (event, element, icon) {
  +		        },
  +		
  +		        windowResize: function (event, ui) {
  +		            $('#calendar').fullCalendar('render');
  +		        }
  +		    });
  +		 
  +		    $('.fc-right, .fc-left').hide();
  +		
  +			$('#btn-prev').click(function () {
  +			    //$('.fc-prev-button').click();
  +			    $('#calendar').fullCalendar('prev');
  +			    var moment = $('#calendar').fullCalendar('getDate');
  +			    //alert("The current date of the calendar is " + moment.format());
  +			    
  +			    var view = $('#calendar').fullCalendar('getView');
  +			    //alert("The view's title is " + view.title);
  +			    
  +			    //alert("The view's name is " + view.name);
  +			    
  +			    //alert("The view's start is " + view.start.format());
  +			    // alert("The view's end is " + view.end.format());
  +			    //alert("The view's intervalStart is " + view.intervalStart.format());
  +			    // alert("The view's intervalEnd is " + view.intervalEnd.format());
  +			    
  +			    return false;
  +			});
  +			
  +			$('#btn-next').click(function () {
  +			    //$('.fc-next-button').click();
  +			    $('#calendar').fullCalendar('next');
  +			    var moment = $('#calendar').fullCalendar('getDate'); 
  +			    return false;
  +			});
  +			
  +			$('#calendar-buttons #btn-today').click(function () {
  +			    $('.fc-button-today').click();
  +			    return false;
  +			});
  +			
  +			$('#mt').click(function () {
  +				$('#select_view').html($('#mt').html()+"<i class='fa fa-caret-down'></i>");
  +			    $('#calendar').fullCalendar('changeView', 'month');
  +			});
  +			
  +			$('#ag').click(function () {
  +				$('#select_view').html($('#ag').html()+"<i class='fa fa-caret-down'></i>");
  +			    $('#calendar').fullCalendar('changeView', 'agendaWeek');
  +			});
  +			
  +			$('#td').click(function () {
  +				$('#select_view').html($('#td').html()+"<i class='fa fa-caret-down'></i>");
  +			    $('#calendar').fullCalendar('changeView', 'agendaDay');
  +			});
  +			
  +			$('#basicWeek').click(function () {
  +				$('#select_view').html($('#basicWeek').html()+"<i class='fa fa-caret-down'></i>");
  +			    $('#calendar').fullCalendar('changeView', 'basicWeek');
  +			});
  +			
  +			$('#basicDay').click(function () {
  +				$('#select_view').html($('#basicDay').html()+"<i class='fa fa-caret-down'></i>");
  +			    $('#calendar').fullCalendar('changeView', 'basicDay');
  +			});
  +			
  +			$('#task_createtime').click(function () {
  +				$('#select_time').html($('#task_createtime').html()+"<i class='fa fa-caret-down'></i>"); 
  +			});
  +			$('#task_duration').click(function () {
  +				$('#select_time').html($('#task_duration').html()+"<i class='fa fa-caret-down'></i>"); 
  +			});
  +			
  +			$('#priority_high').click(function () {
  +				taskPriority = "100";
  +				$('#select_priority').html($('#priority_high').html()+"<i class='fa fa-caret-down'></i>"); 
  +				$('#calendar').fullCalendar('refetchEvents');
  +			});
  +			
  +			$('#priority_mid').click(function () {
  +				taskPriority = "50";
  +				$('#select_priority').html($('#priority_mid').html()+"<i class='fa fa-caret-down'></i>"); 
  +				$('#calendar').fullCalendar('refetchEvents');
  +			});
  +			
  +			$('#priority_low').click(function () {
  +				taskPriority = "0";
  +				$('#select_priority').html($('#priority_low').html()+"<i class='fa fa-caret-down'></i>"); 
  +				$('#calendar').fullCalendar('refetchEvents');
  +			});
  +			$('#priority_all').click(function () {
  +				taskPriority = "";
  +				$('#select_priority').html($('#priority_all').html()+"<i class='fa fa-caret-down'></i>"); 
  +				$('#calendar').fullCalendar('refetchEvents');
  +			});
   			 
  -			    $('.fc-right, .fc-left').hide();
  -			
  -				$('#btn-prev').click(function () {
  -				    //$('.fc-prev-button').click();
  -				    $('#calendar').fullCalendar('prev');
  -				    var moment = $('#calendar').fullCalendar('getDate');
  -				    //alert("The current date of the calendar is " + moment.format());
  -				    
  -				    var view = $('#calendar').fullCalendar('getView');
  -				    //alert("The view's title is " + view.title);
  -				    
  -				    //alert("The view's name is " + view.name);
  -				    
  -				    //alert("The view's start is " + view.start.format());
  -				    // alert("The view's end is " + view.end.format());
  -				    //alert("The view's intervalStart is " + view.intervalStart.format());
  -				    // alert("The view's intervalEnd is " + view.intervalEnd.format());
  -				    
  -				    return false;
  +		};
  +		
  +		// end pagefunction
  +		
  +		 loadScript("js/plugin/fullcalendar/moment.min.js", function(){
  +				loadScript("js/plugin/fullcalendar/fullcalendar.min.js",function(){
  +					loadScript("js/plugin/fullcalendar/lang-all.js",pagefunction)
   				});
  -				
  -				$('#btn-next').click(function () {
  -				    //$('.fc-next-button').click();
  -				    $('#calendar').fullCalendar('next');
  -				    var moment = $('#calendar').fullCalendar('getDate'); 
  -				    return false;
  -				});
  -				
  -				$('#calendar-buttons #btn-today').click(function () {
  -				    $('.fc-button-today').click();
  -				    return false;
  -				});
  -				
  -				$('#mt').click(function () {
  -					$('#select_view').html($('#mt').html()+"<i class='fa fa-caret-down'></i>");
  -				    $('#calendar').fullCalendar('changeView', 'month');
  -				});
  -				
  -				$('#ag').click(function () {
  -					$('#select_view').html($('#ag').html()+"<i class='fa fa-caret-down'></i>");
  -				    $('#calendar').fullCalendar('changeView', 'agendaWeek');
  -				});
  -				
  -				$('#td').click(function () {
  -					$('#select_view').html($('#td').html()+"<i class='fa fa-caret-down'></i>");
  -				    $('#calendar').fullCalendar('changeView', 'agendaDay');
  -				});
  -				
  -				$('#basicWeek').click(function () {
  -					$('#select_view').html($('#basicWeek').html()+"<i class='fa fa-caret-down'></i>");
  -				    $('#calendar').fullCalendar('changeView', 'basicWeek');
  -				});
  -				
  -				$('#basicDay').click(function () {
  -					$('#select_view').html($('#basicDay').html()+"<i class='fa fa-caret-down'></i>");
  -				    $('#calendar').fullCalendar('changeView', 'basicDay');
  -				});
  -				
  -				$('#task_createtime').click(function () {
  -					$('#select_time').html($('#task_createtime').html()+"<i class='fa fa-caret-down'></i>"); 
  -				});
  -				$('#task_duration').click(function () {
  -					$('#select_time').html($('#task_duration').html()+"<i class='fa fa-caret-down'></i>"); 
  -				});
  -				
  -				
  -			};
  +			});
  +		// loadscript and run pagefunction 
   		
   		/*
   		 * CHAT
  
positive.code: 		 * FULL CALENDAR JS
  		 */
  		
  		 loadScript("js/plugin/fullcalendar/moment.min.js", function(){
  				loadScript("js/plugin/fullcalendar/fullcalendar.min.js",function(){
  					loadScript("js/plugin/fullcalendar/lang-all.js",pagefunction)
  				});
  			});
  		 $("#eventInfoTip").hide(); 
  			function showFormByUrl(formUrl){
  				$("#contentFrame").attr("src",formUrl);
  				$('#remoteModal').modal({backdrop:"static"});
  				//$('#calendar').fullCalendar('refetchEvents');
  				//$('#calendar').fullCalendar( 'removeEvents', [formUrl ] );
  			}
  			$('#remoteModal').on('hide.bs.modal', function () {
  				if(_closeTaskFlag){
  					$('#calendar').fullCalendar('refetchEvents');
  				}
  				
  			});
  			//pageSetUp();
  			var showWeekend = true;
  			var pagefunction = function() {
  				
  				// full calendar
  				 
  			    var hdr = {
  			        left:  'prev,next today',
  			        center: 'title',
  			        right:'month,agendaWeek,agendaDay'
  			    }; 
  			    /* initialize the calendar
  				 -----------------------------------------------------------------*/
  			    $('#calendar').fullCalendar({
  			    	lazyFetching:false,
  			    	aspectRatio:2,
  			    	allDaySlot:false,
  			    	weekends:showWeekend,
  			    	slotEventOverlap:false,
  			    	lang:'zh-cn',
  			    	defaultView: 'agendaWeek',
  			        header: hdr,
  			        editable: false,
  			        droppable: false, // this allows things to be dropped onto the calendar !!!
  			        viewRender:function(a,b){
  			        	$(".fc-toolbar").css("margin-bottom","0px");
  			        	 
  					},
  					eventMouseover:function(event, jsEvent, view ) {
  						
  						$("#eventInfoTipCreateTime").html("创建:  "+event.start.format());
  						$("#eventInfoTipTitle").html("标题:  "+event.title);
  						$("#eventInfoTip").css("display", "block");  
  		              	$("#eventInfoTip2").css("top",jsEvent.clientY-20);  
  		               	$("#eventInfoTip2").css("left",jsEvent.clientX-200);  
  						$("#eventInfoTip").show(); 
  					},
  					eventMouseout:function( calEvent, jsEvent, view ) {
  						$("#eventInfoTip").hide(); 
  					},
  					eventClick:function( event, jsEvent, view ) {
  						showFormByUrl(event.id);
  					},
  			
  			        events: function(start, end, timezone, callback) {
  				    	$.ajax({
  				            url: _serviceTaskUrl,
  				            dataType: 'json',
  				            data: {
  				            	createTimeB: start.format(),
  				            	createTimeE: end.format()
  				            },
  				            success: function(doc) {
  				                var events = []; 
  				                var taskColor;
  				                for(var i=0;i<doc.data.length;i++){ 
  				                	
  				                	if(doc.data[i].priority == "50"){
  				                		taskColor = ["event", "bg-color-greenLight"];
  				                	}else if(doc.data[i].priority == "0"){
  				                		taskColor = ["event", "bg-color-darken"];
  
negative.code: 		<div>
  			<span id="eventInfoTipCreateTime"></span>
  			<span id="eventInfoTipTitle"></span>
  			<span id="eventInfoTipPriority"></span>
  		</div>
  	</div>
  </div>
  