| function getObjY(a) { | 
|     for (var b = 0; null != a;) | 
|         b += a.offsetTop - a.scrollTop, a = a.offsetParent; | 
|     return b | 
| } | 
| function windowResize() { | 
|     var parentOffset = j$('#calendar').offset(); | 
|     blockHeight = j$(window).innerHeight() - 145 - parentOffset.top; | 
|     sbwidth = scrollbarWidth(); | 
|     if (j$(escapeVfId('fc-scroller')).height() > blockHeight) { | 
|         j$(escapeVfId('fc-scroller-container')).css('height', blockHeight + 'px'); | 
|     } else { | 
|         j$(escapeVfId('fc-scroller-container')).css('height', ''); | 
|     } | 
|     if (sbwidth > 0) { | 
|         j$(escapeVfId('fc-widget-campaign-div')).css('margin-right', (sbwidth - 1) + 'px').css('border-right-width', '1px'); | 
|         j$(escapeVfId('fc-widget-header-div')).css('margin-right', (sbwidth - 1) + 'px').css('border-right-width', '1px'); | 
|     } | 
| } | 
|   | 
| function resizeByPhoto(imgId, linkId) { | 
|     var photowidth = j$("#" + imgId).width(); | 
|     if (photowidth > 0) { | 
|         j$("#" + linkId).parent().css('width', (110 - 1 - Math.ceil(photowidth)) + 'px');      // col_User width:110px | 
|     } | 
| } | 
|   | 
| function hideFcPopover() { | 
|     j$('#fc-popover').hide(); | 
| } | 
|   | 
| // Mark | 
| function searchMark() { | 
|     hideFcPopover(); | 
|     var jSearch = j$(escapeVfId('Page:Form:searchText')); | 
|     var pSearch = j$(escapeVfId('Page:Form:searchText')).val(); | 
|     var smax = 0; | 
|     jSearch.attr("current", "0"); | 
|     j$("div.forEvtMark").each(function(index) { | 
|         var forRevers = j$(this).children('.fc-time'); | 
|         var searchWordText = j$(this).children('.fc-searchWord').text(); | 
|         j$(this).attr("id", ""); | 
|         if (pSearch != '') { | 
|             pSearch = pSearch.toUpperCase(); | 
|         } | 
|         if (searchWordText.indexOf(pSearch) >= 0) { | 
|             forRevers.css("background-color", "yellow").css("color", "red"); | 
|             smax++; | 
|             j$(this).attr("id", "Mark" + smax); | 
|         } else { | 
|             forRevers.css("background-color", "").css("color", ""); | 
|         } | 
|     }); | 
|     jSearch.attr("max", "" + smax); | 
| } | 
|   | 
| // Next Mark | 
| function nextMark() { | 
|     var jSearch = j$(escapeVfId('Page:Form:searchText')); | 
|     var scur = parseInt(jSearch.attr("current")); | 
|     var smax = parseInt(jSearch.attr("max")); | 
|     j$("#Mark" + scur).children('.fc-time').css("background-color", "yellow").css("color", "red"); | 
|     scur++ | 
|     if (scur > smax) { | 
|         scur = 1; | 
|     } | 
|     jSearch.attr("current", "" + scur); | 
|     var mTop = j$("#Mark" + scur).offsetParent().offset().top; | 
|     var cTop = j$("#fc-scroller").offset().top | 
|     j$("#fc-scroller-container").scrollTop(mTop - cTop - 1); | 
|     j$("#Mark" + scur).children('.fc-time').css("background-color", "#dc143c").css("color", "#fff"); | 
| } | 
|   | 
| // Prev Mark | 
| function prevMark() { | 
|     var jSearch = j$(escapeVfId('Page:Form:searchText')); | 
|     var scur = parseInt(jSearch.attr("current")); | 
|     var smax = parseInt(jSearch.attr("max")); | 
|     j$("#Mark" + scur).children('.fc-time').css("background-color", "yellow").css("color", "red"); | 
|     scur-- | 
|     if (scur <= 0) { | 
|         scur = smax; | 
|     } | 
|     jSearch.attr("current", "" + scur); | 
|     var mTop = j$("#Mark" + scur).offsetParent().offset().top; | 
|     var cTop = j$("#fc-scroller").offset().top | 
|     j$("#fc-scroller-container").scrollTop(mTop - cTop - 1); | 
|     j$("#Mark" + scur).children('.fc-time').css("background-color", "#dc143c").css("color", "#fff"); | 
| } |