hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdoug...@apache.org
Subject svn commit: r723855 [13/23] - in /hadoop/core/trunk: ./ src/contrib/ src/contrib/chukwa/ src/contrib/chukwa/bin/ src/contrib/chukwa/conf/ src/contrib/chukwa/docs/ src/contrib/chukwa/docs/paper/ src/contrib/chukwa/hadoop-packaging/ src/contrib/chukwa/li...
Date Fri, 05 Dec 2008 20:30:21 GMT
Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/js/excanvas.pack.js
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/js/excanvas.pack.js?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/js/excanvas.pack.js (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/js/excanvas.pack.js Fri Dec  5 12:30:14 2008
@@ -0,0 +1 @@
+if(!window.CanvasRenderingContext2D){(function(){var m=Math;var mr=m.round;var ms=m.sin;var mc=m.cos;var Z=10;var Z2=Z/2;var G_vmlCanvasManager_={init:function(opt_doc){var doc=opt_doc||document;if(/MSIE/.test(navigator.userAgent)&&!window.opera){var self=this;doc.attachEvent("onreadystatechange",function(){self.init_(doc)})}},init_:function(doc){if(doc.readyState=="complete"){if(!doc.namespaces["g_vml_"]){doc.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml")}var ss=doc.createStyleSheet();ss.cssText="canvas{display:inline-block;overflow:hidden;"+"text-align:left;width:300px;height:150px}"+"g_vml_\\:*{behavior:url(#default#VML)}";var els=doc.getElementsByTagName("canvas");for(var i=0;i<els.length;i++){if(!els[i].getContext){this.initElement(els[i])}}}},fixElement_:function(el){var outerHTML=el.outerHTML;var newEl=el.ownerDocument.createElement(outerHTML);if(outerHTML.slice(-2)!="/>"){var tagName="/"+el.tagName;var ns;while((ns=el.nextSibling)&&ns.tagName!=tagName){ns.r
 emoveNode()}if(ns){ns.removeNode()}}el.parentNode.replaceChild(newEl,el);return newEl},initElement:function(el){el=this.fixElement_(el);el.getContext=function(){if(this.context_){return this.context_}return this.context_=new CanvasRenderingContext2D_(this)};el.attachEvent('onpropertychange',onPropertyChange);el.attachEvent('onresize',onResize);var attrs=el.attributes;if(attrs.width&&attrs.width.specified){el.style.width=attrs.width.nodeValue+"px"}else{el.width=el.clientWidth}if(attrs.height&&attrs.height.specified){el.style.height=attrs.height.nodeValue+"px"}else{el.height=el.clientHeight}return el}};function onPropertyChange(e){var el=e.srcElement;switch(e.propertyName){case'width':el.style.width=el.attributes.width.nodeValue+"px";el.getContext().clearRect();break;case'height':el.style.height=el.attributes.height.nodeValue+"px";el.getContext().clearRect();break}}function onResize(e){var el=e.srcElement;if(el.firstChild){el.firstChild.style.width=el.clientWidth+'px';el.first
 Child.style.height=el.clientHeight+'px'}}G_vmlCanvasManager_.init();var dec2hex=[];for(var i=0;i<16;i++){for(var j=0;j<16;j++){dec2hex[i*16+j]=i.toString(16)+j.toString(16)}}function createMatrixIdentity(){return[[1,0,0],[0,1,0],[0,0,1]]}function matrixMultiply(m1,m2){var result=createMatrixIdentity();for(var x=0;x<3;x++){for(var y=0;y<3;y++){var sum=0;for(var z=0;z<3;z++){sum+=m1[x][z]*m2[z][y]}result[x][y]=sum}}return result}function copyState(o1,o2){o2.fillStyle=o1.fillStyle;o2.lineCap=o1.lineCap;o2.lineJoin=o1.lineJoin;o2.lineWidth=o1.lineWidth;o2.miterLimit=o1.miterLimit;o2.shadowBlur=o1.shadowBlur;o2.shadowColor=o1.shadowColor;o2.shadowOffsetX=o1.shadowOffsetX;o2.shadowOffsetY=o1.shadowOffsetY;o2.strokeStyle=o1.strokeStyle;o2.arcScaleX_=o1.arcScaleX_;o2.arcScaleY_=o1.arcScaleY_}function processStyle(styleString){var str,alpha=1;styleString=String(styleString);if(styleString.substring(0,3)=="rgb"){var start=styleString.indexOf("(",3);var end=styleString.indexOf(")",star
 t+1);var guts=styleString.substring(start+1,end).split(",");str="#";for(var i=0;i<3;i++){str+=dec2hex[Number(guts[i])]}if((guts.length==4)&&(styleString.substr(3,1)=="a")){alpha=guts[3]}}else{str=styleString}return[str,alpha]}function processLineCap(lineCap){switch(lineCap){case"butt":return"flat";case"round":return"round";case"square":default:return"square"}}function CanvasRenderingContext2D_(surfaceElement){this.m_=createMatrixIdentity();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=Z*1;this.globalAlpha=1;this.canvas=surfaceElement;var el=surfaceElement.ownerDocument.createElement('div');el.style.width=surfaceElement.clientWidth+'px';el.style.height=surfaceElement.clientHeight+'px';el.style.overflow='hidden';el.style.position='absolute';surfaceElement.appendChild(el);this.element_=el;this.arcScaleX_=1;this.arcScaleY_=1}var contextPrototype=CanvasR
 enderingContext2D_.prototype;contextPrototype.clearRect=function(){this.element_.innerHTML="";this.currentPath_=[]};contextPrototype.beginPath=function(){this.currentPath_=[]};contextPrototype.moveTo=function(aX,aY){this.currentPath_.push({type:"moveTo",x:aX,y:aY});this.currentX_=aX;this.currentY_=aY};contextPrototype.lineTo=function(aX,aY){this.currentPath_.push({type:"lineTo",x:aX,y:aY});this.currentX_=aX;this.currentY_=aY};contextPrototype.bezierCurveTo=function(aCP1x,aCP1y,aCP2x,aCP2y,aX,aY){this.currentPath_.push({type:"bezierCurveTo",cp1x:aCP1x,cp1y:aCP1y,cp2x:aCP2x,cp2y:aCP2y,x:aX,y:aY});this.currentX_=aX;this.currentY_=aY};contextPrototype.quadraticCurveTo=function(aCPx,aCPy,aX,aY){var cp1x=this.currentX_+2.0/3.0*(aCPx-this.currentX_);var cp1y=this.currentY_+2.0/3.0*(aCPy-this.currentY_);var cp2x=cp1x+(aX-this.currentX_)/3.0;var cp2y=cp1y+(aY-this.currentY_)/3.0;this.bezierCurveTo(cp1x,cp1y,cp2x,cp2y,aX,aY)};contextPrototype.arc=function(aX,aY,aRadius,aStartAngle,aEn
 dAngle,aClockwise){aRadius*=Z;var arcType=aClockwise?"at":"wa";var xStart=aX+(mc(aStartAngle)*aRadius)-Z2;var yStart=aY+(ms(aStartAngle)*aRadius)-Z2;var xEnd=aX+(mc(aEndAngle)*aRadius)-Z2;var yEnd=aY+(ms(aEndAngle)*aRadius)-Z2;if(xStart==xEnd&&!aClockwise){xStart+=0.125}this.currentPath_.push({type:arcType,x:aX,y:aY,radius:aRadius,xStart:xStart,yStart:yStart,xEnd:xEnd,yEnd:yEnd})};contextPrototype.rect=function(aX,aY,aWidth,aHeight){this.moveTo(aX,aY);this.lineTo(aX+aWidth,aY);this.lineTo(aX+aWidth,aY+aHeight);this.lineTo(aX,aY+aHeight);this.closePath()};contextPrototype.strokeRect=function(aX,aY,aWidth,aHeight){this.beginPath();this.moveTo(aX,aY);this.lineTo(aX+aWidth,aY);this.lineTo(aX+aWidth,aY+aHeight);this.lineTo(aX,aY+aHeight);this.closePath();this.stroke()};contextPrototype.fillRect=function(aX,aY,aWidth,aHeight){this.beginPath();this.moveTo(aX,aY);this.lineTo(aX+aWidth,aY);this.lineTo(aX+aWidth,aY+aHeight);this.lineTo(aX,aY+aHeight);this.closePath();this.fill()};cont
 extPrototype.createLinearGradient=function(aX0,aY0,aX1,aY1){var gradient=new CanvasGradient_("gradient");return gradient};contextPrototype.createRadialGradient=function(aX0,aY0,aR0,aX1,aY1,aR1){var gradient=new CanvasGradient_("gradientradial");gradient.radius1_=aR0;gradient.radius2_=aR1;gradient.focus_.x=aX0;gradient.focus_.y=aY0;return gradient};contextPrototype.drawImage=function(image,var_args){var dx,dy,dw,dh,sx,sy,sw,sh;var oldRuntimeWidth=image.runtimeStyle.width;var oldRuntimeHeight=image.runtimeStyle.height;image.runtimeStyle.width='auto';image.runtimeStyle.height='auto';var w=image.width;var h=image.height;image.runtimeStyle.width=oldRuntimeWidth;image.runtimeStyle.height=oldRuntimeHeight;if(arguments.length==3){dx=arguments[1];dy=arguments[2];sx=sy=0;sw=dw=w;sh=dh=h}else if(arguments.length==5){dx=arguments[1];dy=arguments[2];dw=arguments[3];dh=arguments[4];sx=sy=0;sw=w;sh=h}else if(arguments.length==9){sx=arguments[1];sy=arguments[2];sw=arguments[3];sh=arguments[
 4];dx=arguments[5];dy=arguments[6];dw=arguments[7];dh=arguments[8]}else{throw"Invalid number of arguments";}var d=this.getCoords_(dx,dy);var w2=sw/2;var h2=sh/2;var vmlStr=[];var W=10;var H=10;vmlStr.push(' <g_vml_:group',' coordsize="',Z*W,',',Z*H,'"',' coordorigin="0,0"',' style="width:',W,';height:',H,';position:absolute;');if(this.m_[0][0]!=1||this.m_[0][1]){var filter=[];filter.push("M11='",this.m_[0][0],"',","M12='",this.m_[1][0],"',","M21='",this.m_[0][1],"',","M22='",this.m_[1][1],"',","Dx='",mr(d.x/Z),"',","Dy='",mr(d.y/Z),"'");var max=d;var c2=this.getCoords_(dx+dw,dy);var c3=this.getCoords_(dx,dy+dh);var c4=this.getCoords_(dx+dw,dy+dh);max.x=Math.max(max.x,c2.x,c3.x,c4.x);max.y=Math.max(max.y,c2.y,c3.y,c4.y);vmlStr.push("padding:0 ",mr(max.x/Z),"px ",mr(max.y/Z),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",filter.join(""),", sizingmethod='clip');")}else{vmlStr.push("top:",mr(d.y/Z),"px;left:",mr(d.x/Z),"px;")}vmlStr.push(' ">','<g_vml_:image src="',imag
 e.src,'"',' style="width:',Z*dw,';',' height:',Z*dh,';"',' cropleft="',sx/w,'"',' croptop="',sy/h,'"',' cropright="',(w-sx-sw)/w,'"',' cropbottom="',(h-sy-sh)/h,'"',' />','</g_vml_:group>');this.element_.insertAdjacentHTML("BeforeEnd",vmlStr.join(""))};contextPrototype.stroke=function(aFill){var lineStr=[];var lineOpen=false;var a=processStyle(aFill?this.fillStyle:this.strokeStyle);var color=a[0];var opacity=a[1]*this.globalAlpha;var W=10;var H=10;lineStr.push('<g_vml_:shape',' fillcolor="',color,'"',' filled="',Boolean(aFill),'"',' style="position:absolute;width:',W,';height:',H,';"',' coordorigin="0 0" coordsize="',Z*W,' ',Z*H,'"',' stroked="',!aFill,'"',' strokeweight="',this.lineWidth,'"',' strokecolor="',color,'"',' path="');var newSeq=false;var min={x:null,y:null};var max={x:null,y:null};for(var i=0;i<this.currentPath_.length;i++){var p=this.currentPath_[i];if(p.type=="moveTo"){lineStr.push(" m ");var c=this.getCoords_(p.x,p.y);lineStr.push(mr(c.x),",",mr(c.y))}else if
 (p.type=="lineTo"){lineStr.push(" l ");var c=this.getCoords_(p.x,p.y);lineStr.push(mr(c.x),",",mr(c.y))}else if(p.type=="close"){lineStr.push(" x ")}else if(p.type=="bezierCurveTo"){lineStr.push(" c ");var c=this.getCoords_(p.x,p.y);var c1=this.getCoords_(p.cp1x,p.cp1y);var c2=this.getCoords_(p.cp2x,p.cp2y);lineStr.push(mr(c1.x),",",mr(c1.y),",",mr(c2.x),",",mr(c2.y),",",mr(c.x),",",mr(c.y))}else if(p.type=="at"||p.type=="wa"){lineStr.push(" ",p.type," ");var c=this.getCoords_(p.x,p.y);var cStart=this.getCoords_(p.xStart,p.yStart);var cEnd=this.getCoords_(p.xEnd,p.yEnd);lineStr.push(mr(c.x-this.arcScaleX_*p.radius),",",mr(c.y-this.arcScaleY_*p.radius)," ",mr(c.x+this.arcScaleX_*p.radius),",",mr(c.y+this.arcScaleY_*p.radius)," ",mr(cStart.x),",",mr(cStart.y)," ",mr(cEnd.x),",",mr(cEnd.y))}if(c){if(min.x==null||c.x<min.x){min.x=c.x}if(max.x==null||c.x>max.x){max.x=c.x}if(min.y==null||c.y<min.y){min.y=c.y}if(max.y==null||c.y>max.y){max.y=c.y}}}lineStr.push(' ">');if(typeof this
 .fillStyle=="object"){var focus={x:"50%",y:"50%"};var width=(max.x-min.x);var height=(max.y-min.y);var dimension=(width>height)?width:height;focus.x=mr((this.fillStyle.focus_.x/width)*100+50)+"%";focus.y=mr((this.fillStyle.focus_.y/height)*100+50)+"%";var colors=[];if(this.fillStyle.type_=="gradientradial"){var inside=(this.fillStyle.radius1_/dimension*100);var expansion=(this.fillStyle.radius2_/dimension*100)-inside}else{var inside=0;var expansion=100}var insidecolor={offset:null,color:null};var outsidecolor={offset:null,color:null};this.fillStyle.colors_.sort(function(cs1,cs2){return cs1.offset-cs2.offset});for(var i=0;i<this.fillStyle.colors_.length;i++){var fs=this.fillStyle.colors_[i];colors.push((fs.offset*expansion)+inside,"% ",fs.color,",");if(fs.offset>insidecolor.offset||insidecolor.offset==null){insidecolor.offset=fs.offset;insidecolor.color=fs.color}if(fs.offset<outsidecolor.offset||outsidecolor.offset==null){outsidecolor.offset=fs.offset;outsidecolor.color=fs.co
 lor}}colors.pop();lineStr.push('<g_vml_:fill',' color="',outsidecolor.color,'"',' color2="',insidecolor.color,'"',' type="',this.fillStyle.type_,'"',' focusposition="',focus.x,', ',focus.y,'"',' colors="',colors.join(""),'"',' opacity="',opacity,'" />')}else if(aFill){lineStr.push('<g_vml_:fill color="',color,'" opacity="',opacity,'" />')}else{lineStr.push('<g_vml_:stroke',' opacity="',opacity,'"',' joinstyle="',this.lineJoin,'"',' miterlimit="',this.miterLimit,'"',' endcap="',processLineCap(this.lineCap),'"',' weight="',this.lineWidth,'px"',' color="',color,'" />')}lineStr.push("</g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",lineStr.join(""))};contextPrototype.fill=function(){this.stroke(true)};contextPrototype.closePath=function(){this.currentPath_.push({type:"close"})};contextPrototype.getCoords_=function(aX,aY){return{x:Z*(aX*this.m_[0][0]+aY*this.m_[1][0]+this.m_[2][0])-Z2,y:Z*(aX*this.m_[0][1]+aY*this.m_[1][1]+this.m_[2][1])-Z2}};contextPrototype.save=f
 unction(){var o={};copyState(this,o);this.aStack_.push(o);this.mStack_.push(this.m_);this.m_=matrixMultiply(createMatrixIdentity(),this.m_)};contextPrototype.restore=function(){copyState(this.aStack_.pop(),this);this.m_=this.mStack_.pop()};contextPrototype.translate=function(aX,aY){var m1=[[1,0,0],[0,1,0],[aX,aY,1]];this.m_=matrixMultiply(m1,this.m_)};contextPrototype.rotate=function(aRot){var c=mc(aRot);var s=ms(aRot);var m1=[[c,s,0],[-s,c,0],[0,0,1]];this.m_=matrixMultiply(m1,this.m_)};contextPrototype.scale=function(aX,aY){this.arcScaleX_*=aX;this.arcScaleY_*=aY;var m1=[[aX,0,0],[0,aY,0],[0,0,1]];this.m_=matrixMultiply(m1,this.m_)};contextPrototype.clip=function(){};contextPrototype.arcTo=function(){};contextPrototype.createPattern=function(){return new CanvasPattern_};function CanvasGradient_(aType){this.type_=aType;this.radius1_=0;this.radius2_=0;this.colors_=[];this.focus_={x:0,y:0}}CanvasGradient_.prototype.addColorStop=function(aOffset,aColor){aColor=processStyle(aCo
 lor);this.colors_.push({offset:1-aOffset,color:aColor})};function CanvasPattern_(){}G_vmlCanvasManager=G_vmlCanvasManager_;CanvasRenderingContext2D=CanvasRenderingContext2D_;CanvasGradient=CanvasGradient_;CanvasPattern=CanvasPattern_})()}

Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/js/flexigrid.js
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/js/flexigrid.js?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/js/flexigrid.js (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/js/flexigrid.js Fri Dec  5 12:30:14 2008
@@ -0,0 +1,1451 @@
+/*
+ * Flexigrid for jQuery - New Wave Grid
+ *
+ * Copyright (c) 2008 Paulo P. Marinas (webplicity.net/flexigrid)
+ * licensed under the MIT (MIT-LICENSE.txt)
+ *
+ * $Date: 2008-04-01 00:09:43 +0800 (Tue, 01 Apr 2008) $
+ */
+ 
+(function($){
+		  
+	$.addFlex = function(t,p)
+	{
+
+		if (t.grid) return false; //return if already exist	
+		
+		// apply default properties
+		p = $.extend({
+			 height: 200, //default height
+			 width: 'auto', //auto width
+			 striped: true, //apply odd even stripes
+			 novstripe: false,
+			 minwidth: 30, //min width of columns
+			 minheight: 100, //min height of columns
+			 resizable: true, //resizable table
+			 url: false, //ajax url
+			 method: 'POST', // data sending method
+			 dataType: 'xml', // type of data loaded
+			 errormsg: 'Connection Error',
+			 usepager: false, //
+			 nowrap: true, //
+			 page: 1, //current page
+			 total: 1, //total pages
+			 useRp: true, //use the results per page select box
+			 rp: 15, // results per page
+			 rpOptions: [10,15,20,25,40],
+			 title: false,
+			 pagestat: 'Displaying {from} to {to} of {total} items',
+			 procmsg: 'Processing, please wait ...',
+			 query: '',
+			 qtype: '',
+			 nomsg: 'No items',
+			 minColToggle: 1, //minimum allowed column to be hidden
+			 showToggleBtn: true, //show or hide column toggle popup
+			 hideOnSubmit: true,
+			 autoload: true,
+			 blockOpacity: 0.5,
+			 onToggleCol: false,
+			 onChangeSort: false,
+			 onSuccess: false,
+			 onSubmit: false // using a custom populate function
+		  }, p);
+		  		
+
+		$(t)
+		.show() //show if hidden
+		.attr({cellPadding: 0, cellSpacing: 0, border: 0})  //remove padding and spacing
+		.removeAttr('width') //remove width properties	
+		;
+		
+		//create grid class
+		var g = {
+			hset : {},
+			rePosDrag: function () {
+
+			var cdleft = 0 - this.hDiv.scrollLeft;
+			if (this.hDiv.scrollLeft>0) cdleft -= Math.floor(p.cgwidth/2);
+			$(g.cDrag).css({top:g.hDiv.offsetTop+1});
+			var cdpad = this.cdpad;
+			
+			$('div',g.cDrag).hide();
+			
+			$('thead tr:first th:visible',this.hDiv).each
+				(
+			 	function ()
+					{
+					var n = $('thead tr:first th:visible',g.hDiv).index(this);
+
+					var cdpos = parseInt($('div',this).width());
+					var ppos = cdpos;
+					if (cdleft==0) 
+							cdleft -= Math.floor(p.cgwidth/2); 
+
+					cdpos = cdpos + cdleft + cdpad;
+					
+					$('div:eq('+n+')',g.cDrag).css({'left':cdpos+'px'}).show();
+
+					cdleft = cdpos;
+					}
+				);
+				
+			},
+			fixHeight: function (newH) {
+				
+					if (!newH) newH = $(g.bDiv).height();
+					var hdHeight = $(this.hDiv).height();
+					$('div',this.cDrag).each(
+						function ()
+							{
+								$(this).height(newH+hdHeight);
+							}
+					);
+					$(g.block).css({height:newH,marginBottom:(newH * -1)});
+					
+					var hrH = g.bDiv.offsetTop + newH;
+					if (p.height != 'auto' && p.resizable) hrH = g.vDiv.offsetTop;
+					$(g.rDiv).css({height: hrH});
+				
+			},
+			dragStart: function (dragtype,e,obj) { //default drag function start
+				
+				if (dragtype=='colresize') //column resize
+					{
+						$(g.nDiv).hide();$(g.nBtn).hide();
+						var n = $('div',this.cDrag).index(obj);
+						var ow = $('th:visible div:eq('+n+')',this.hDiv).width();
+						$(obj).addClass('dragging').siblings().hide();
+						$(obj).prev().addClass('dragging').show();
+						
+						this.colresize = {startX: e.pageX, ol: parseInt(obj.style.left), ow: ow, n : n };
+						$('body').css('cursor','col-resize');
+					}
+				else if (dragtype=='vresize') //table resize
+					{
+						var hgo = false;
+						$('body').css('cursor','row-resize');
+						if (obj) 
+							{
+							hgo = true;
+							$('body').css('cursor','col-resize');
+							}
+						this.vresize = {h: p.height, sy: e.pageY, w: p.width, sx: e.pageX, hgo: hgo};
+						
+					}
+				else if (dragtype=='colMove') //column header drag
+					{
+						$(g.nDiv).hide();$(g.nBtn).hide();
+						this.hset = $(this.hDiv).offset();
+						this.hset.right = this.hset.left + $('table',this.hDiv).width();
+						this.hset.bottom = this.hset.top + $('table',this.hDiv).height();
+						this.dcol = obj;
+						this.dcoln = $('th',this.hDiv).index(obj);
+						
+						this.colCopy = document.createElement("div");
+						this.colCopy.className = "colCopy";
+						this.colCopy.innerHTML = obj.innerHTML;
+						if ($.browser.msie)
+						{
+						this.colCopy.className = "colCopy ie";
+						}
+						
+						
+						$(this.colCopy).css({position:'absolute',float:'left',display:'none', textAlign: obj.align});
+						$('body').append(this.colCopy);
+						$(this.cDrag).hide();
+						
+					}
+														
+				$('body').noSelect();
+			
+			},
+			dragMove: function (e) {
+			
+				if (this.colresize) //column resize
+					{
+						var n = this.colresize.n;
+						var diff = e.pageX-this.colresize.startX;
+						var nleft = this.colresize.ol + diff;
+						var nw = this.colresize.ow + diff;
+						if (nw > p.minwidth)
+							{
+								$('div:eq('+n+')',this.cDrag).css('left',nleft);
+								this.colresize.nw = nw;
+							}
+					}
+				else if (this.vresize) //table resize
+					{
+						var v = this.vresize;
+						var y = e.pageY;
+						var diff = y-v.sy;
+						
+						if (!p.defwidth) p.defwidth = p.width;
+						
+						if (p.width != 'auto' && !p.nohresize && v.hgo)
+						{
+							var x = e.pageX;
+							var xdiff = x - v.sx;
+							var newW = v.w + xdiff;
+							if (newW > p.defwidth)
+								{
+									this.gDiv.style.width = newW + 'px';
+									p.width = newW;
+								}
+						}
+						
+						var newH = v.h + diff;
+						if ((newH > p.minheight || p.height < p.minheight) && !v.hgo)
+							{
+								this.bDiv.style.height = newH + 'px';
+								p.height = newH;
+								this.fixHeight(newH);
+							}
+						v = null;
+					}
+				else if (this.colCopy) {
+					$(this.dcol).addClass('thMove').removeClass('thOver'); 
+					if (e.pageX > this.hset.right || e.pageX < this.hset.left || e.pageY > this.hset.bottom || e.pageY < this.hset.top)
+					{
+						//this.dragEnd();
+						$('body').css('cursor','move');
+					}
+					else 
+					$('body').css('cursor','pointer');
+					$(this.colCopy).css({top:e.pageY + 10,left:e.pageX + 20, display: 'block'});
+				}													
+			
+			},
+			dragEnd: function () {
+
+				if (this.colresize)
+					{
+						var n = this.colresize.n;
+						var nw = this.colresize.nw;
+
+								$('th:visible div:eq('+n+')',this.hDiv).css('width',nw);
+								$('tr',this.bDiv).each (
+									function ()
+										{
+										$('td:visible div:eq('+n+')',this).css('width',nw);
+										}
+								);
+								this.hDiv.scrollLeft = this.bDiv.scrollLeft;
+
+
+						$('div:eq('+n+')',this.cDrag).siblings().show();
+						$('.dragging',this.cDrag).removeClass('dragging');
+						this.rePosDrag();
+						this.colresize = false;
+					}
+				else if (this.vresize)
+					{
+						this.vresize = false;
+					}
+				else if (this.colCopy)
+					{
+						$(this.colCopy).remove();
+						if (this.dcolt != null)
+							{
+							
+							
+							if (this.dcoln>this.dcolt)
+								
+								$('th:eq('+this.dcolt+')',this.hDiv).before(this.dcol);
+							else
+								$('th:eq('+this.dcolt+')',this.hDiv).after(this.dcol);
+							
+							
+							
+							this.switchCol(this.dcoln,this.dcolt);
+							$(this.cdropleft).remove();
+							$(this.cdropright).remove();
+							this.rePosDrag();
+							
+																			
+							}
+						
+						this.dcol = null;
+						this.hset = null;
+						this.dcoln = null;
+						this.dcolt = null;
+						this.colCopy = null;
+						
+						$('.thMove',this.hDiv).removeClass('thMove');
+						$(this.cDrag).show();
+					}										
+				$('body').css('cursor','default');
+				$('body').noSelect(false);
+			},
+			toggleCol: function(cid,visible) {
+				
+				var ncol = $("th[axis='col"+cid+"']",this.hDiv)[0];
+				var n = $('thead th',g.hDiv).index(ncol);
+				var cb = $('input[value='+cid+']',g.nDiv)[0];
+				
+				
+				if (visible==null)
+					{
+						visible = ncol.hide;
+					}
+				
+				
+				
+				if ($('input:checked',g.nDiv).length<p.minColToggle&&!visible) return false;
+				
+				if (visible)
+					{
+						ncol.hide = false;
+						$(ncol).show();
+						cb.checked = true;
+					}
+				else
+					{
+						ncol.hide = true;
+						$(ncol).hide();
+						cb.checked = false;
+					}
+					
+						$('tbody tr',t).each
+							(
+								function ()
+									{
+										if (visible)
+											$('td:eq('+n+')',this).show();
+										else
+											$('td:eq('+n+')',this).hide();
+									}
+							);							
+				
+				this.rePosDrag();
+				
+				if (p.onToggleCol) p.onToggleCol(cid,visible);
+				
+				return visible;
+			},
+			switchCol: function(cdrag,cdrop) { //switch columns
+				
+				$('tbody tr',t).each
+					(
+						function ()
+							{
+								if (cdrag>cdrop)
+									$('td:eq('+cdrop+')',this).before($('td:eq('+cdrag+')',this));
+								else
+									$('td:eq('+cdrop+')',this).after($('td:eq('+cdrag+')',this));
+							}
+					);
+					
+					//switch order in nDiv
+					if (cdrag>cdrop)
+						$('tr:eq('+cdrop+')',this.nDiv).before($('tr:eq('+cdrag+')',this.nDiv));
+					else
+						$('tr:eq('+cdrop+')',this.nDiv).after($('tr:eq('+cdrag+')',this.nDiv));
+						
+					if ($.browser.msie&&$.browser.version<7.0) $('tr:eq('+cdrop+') input',this.nDiv)[0].checked = true;	
+					
+					this.hDiv.scrollLeft = this.bDiv.scrollLeft;
+			},			
+			scroll: function() {
+					this.hDiv.scrollLeft = this.bDiv.scrollLeft;
+					this.rePosDrag();
+			},
+			addData: function (data) { //parse data
+				
+				$('.pReload',this.pDiv).removeClass('loading');
+				this.loading = false;
+
+				if (!data) 
+					{
+					$('.pPageStat',this.pDiv).html(p.errormsg);	
+					return false;
+					}
+
+				if (p.dataType=='xml')
+					p.total = +$('rows total',data).text();
+				else
+					p.total = data.total;
+					
+				if (p.total==0)
+					{
+					$('tr',t).unbind();
+					$(t).empty();
+					p.pages = 1;
+					p.page = 1;
+					this.buildpager();
+					$('.pPageStat',this.pDiv).html(p.nomsg);
+					return false;
+					}
+				
+				p.pages = Math.ceil(p.total/p.rp);
+				
+				if (p.dataType=='xml')
+					p.page = +$('rows page',data).text();
+				else
+					p.page = data.page;
+				
+				this.buildpager();
+
+				//build new body
+				var tbody = document.createElement('tbody');
+				
+				if (p.dataType=='json')
+				{
+					$.each
+					(
+					 data.rows,
+					 function(i,row) 
+					 	{
+							var tr = document.createElement('tr');
+							if (i % 2 && p.striped) tr.className = 'erow';
+							
+							if (row.id) tr.id = 'row' + row.id;
+							
+							//add cell
+							$('thead tr:first th',g.hDiv).each
+							(
+							 	function ()
+									{
+										
+										var td = document.createElement('td');
+										var idx = $(this).attr('axis').substr(3);
+										td.align = this.align;
+										td.innerHTML = row.cell[idx];
+										$(tr).append(td);
+										td = null;
+									}
+							);
+							
+							if ($('thead',this.gDiv).length<1) //handle if grid has no headers
+							{
+
+									for (idx=0;idx<cell.length;idx++)
+										{
+										var td = document.createElement('td');
+										td.innerHTML = row.cell[idx];
+										$(tr).append(td);
+										td = null;
+										}
+							}							
+							
+							$(tbody).append(tr);
+							tr = null;
+						}
+					);				
+					
+				} else if (p.dataType=='xml') {
+
+				i = 1;
+
+				$("rows row",data).each
+				(
+				 
+				 	function ()
+						{
+							
+							i++;
+							
+							var tr = document.createElement('tr');
+							if (i % 2 && p.striped) tr.className = 'erow';
+
+							var nid =$(this).attr('id');
+							if (nid) tr.id = 'row' + nid;
+							
+							nid = null;
+							
+							var robj = this;
+
+							
+							
+							$('thead tr:first th',g.hDiv).each
+							(
+							 	function ()
+									{
+										
+										var td = document.createElement('td');
+										var idx = $(this).attr('axis').substr(3);
+										td.align = this.align;
+										td.innerHTML = $("cell:eq("+ idx +")",robj).text();
+										$(tr).append(td);
+										td = null;
+									}
+							);
+							
+							
+							if ($('thead',this.gDiv).length<1) //handle if grid has no headers
+							{
+								$('cell',this).each
+								(
+								 	function ()
+										{
+										var td = document.createElement('td');
+										td.innerHTML = $(this).text();
+										$(tr).append(td);
+										td = null;
+										}
+								);
+							}
+							
+							$(tbody).append(tr);
+							tr = null;
+							robj = null;
+						}
+				);
+				
+				}
+
+				$('tr',t).unbind();
+				$(t).empty();
+				
+				$(t).append(tbody);
+				this.addCellProp();
+				this.addRowProp();
+				
+				this.fixHeight($(this.bDiv).height());
+				
+				this.rePosDrag();
+				
+				tbody = null; data = null; i = null; 
+				
+				if (p.onSuccess) p.onSuccess();
+				if (p.hideOnSubmit) $(g.block).remove();//$(t).show();
+				
+				this.hDiv.scrollLeft = this.bDiv.scrollLeft;
+				if ($.browser.opera) $(t).css('visibility','visible');
+				
+			},
+			changeSort: function(th) { //change sortorder
+			
+				if (this.loading) return true;
+				
+				$(g.nDiv).hide();$(g.nBtn).hide();
+				
+				if (p.sortname == $(th).attr('abbr'))
+					{
+						if (p.sortorder=='asc') p.sortorder = 'desc'; 
+						else p.sortorder = 'asc';						
+					}
+				
+				$(th).addClass('sorted').siblings().removeClass('sorted');
+				$('.sdesc',this.hDiv).removeClass('sdesc');
+				$('.sasc',this.hDiv).removeClass('sasc');
+				$('div',th).addClass('s'+p.sortorder);
+				p.sortname= $(th).attr('abbr');
+				
+				if (p.onChangeSort)
+					p.onChangeSort(p.sortname,p.sortorder);
+				else
+					this.populate();				
+			
+			},
+			buildpager: function(){ //rebuild pager based on new properties
+			
+			$('.pcontrol input').val(p.page);
+			$('.pcontrol span').html(p.pages);
+			
+			var r1 = (p.page-1) * p.rp + 1; 
+			var r2 = r1 + p.rp - 1; 
+			
+			if (p.total<r2) r2 = p.total;
+			
+			var stat = p.pagestat;
+			
+			stat = stat.replace(/{from}/,r1);
+			stat = stat.replace(/{to}/,r2);
+			stat = stat.replace(/{total}/,p.total);
+			
+			$('.pPageStat',this.pDiv).html(stat);
+			
+			},
+			populate: function () { //get latest data
+
+				if (this.loading) return true;
+
+				if (p.onSubmit)
+					{
+						var gh = p.onSubmit();
+						if (!gh) return false;
+					}
+
+				this.loading = true;
+				if (!p.url) return false;
+				
+				$('.pPageStat',this.pDiv).html(p.procmsg);
+				
+				$('.pReload',this.pDiv).addClass('loading');
+				
+				$(g.block).css({top:g.bDiv.offsetTop});
+				
+				if (p.hideOnSubmit) $(this.gDiv).prepend(g.block); //$(t).hide();
+				
+				if ($.browser.opera) $(t).css('visibility','hidden');
+				
+				if (!p.newp) p.newp = 1;
+				
+				if (p.page>p.pages) p.page = p.pages;
+				var param = {page:p.newp, rp: p.rp, sortname: p.sortname, sortorder: p.sortorder, query: p.query, qtype: p.qtype};
+
+				if (p.params)
+					{
+						var nparam = {};
+						$.each(p.params, function() {
+						  nparam[this.name] = this.value;
+						});
+						$.extend(param,nparam);
+					}
+				
+				$.ajax({
+				   type: p.method,
+				   url: p.url,
+				   data: param,
+				   dataType: p.dataType,
+				   success: function(data){g.addData(data);}
+				 });				
+			},
+			doSearch: function () {
+				p.query = $('input[name=q]',g.sDiv).val();
+				p.qtype = $('select[name=qtype]',g.sDiv).val();
+				p.newp = 1;
+				this.populate();				
+			},
+			changePage: function (ctype){ //change page
+			
+				if (this.loading) return true;
+			
+				switch(ctype)
+				{
+					case 'first': p.newp = 1; break;
+					case 'prev': if (p.page>1) p.newp = p.page - 1; break;
+					case 'next': if (p.page<p.pages) p.newp = p.page + 1; break;
+					case 'last': p.newp = p.pages; break;
+					case 'input': 
+							var nv = parseInt($('.pcontrol input').val());
+							if (isNaN(nv)) nv = 1;
+							if (nv<1) nv = 1;
+							else if (nv > p.pages) nv = p.pages;
+							$('.pcontrol input').val(nv);
+							p.newp =nv;
+							break;
+				}
+			
+				if (p.newp==p.page) return false;
+				
+				if (p.onChangePage) 
+					p.onChangePage(p.newp);
+				else				
+					this.populate();
+			
+			},
+			addCellProp: function ()
+			{
+				
+					$('tbody tr td',g.bDiv).each
+					(
+						function ()
+							{
+									var tdDiv = document.createElement('div');
+									var n = $('td',$(this).parent()).index(this);
+									var pth = $('th:eq('+n+')',g.hDiv).get(0);
+			
+									if (pth!=null)
+									{
+									if (p.sortname==$(pth).attr('abbr')&&p.sortname) 
+										{
+										this.className = 'sorted';
+										}
+									 $(tdDiv).css({textAlign:pth.align,width: $('div:first',pth)[0].style.width});
+									 
+									 if (pth.hide) $(this).css('display','none');
+									 
+									 }
+									 
+									 if (p.nowrap==false) $(tdDiv).css('white-space','normal');
+									 
+									 if (this.innerHTML=='') this.innerHTML = '&nbsp;';
+									 
+									 //tdDiv.value = this.innerHTML; //store preprocess value
+									 tdDiv.innerHTML = this.innerHTML;
+									 
+									 var prnt = $(this).parent()[0];
+									 var pid = false;
+									 if (prnt.id) pid = prnt.id.substr(3);
+									 
+									 if (pth!=null)
+									 {
+									 if (pth.process) pth.process(tdDiv,pid);
+									 }
+									 
+									$(this).empty().append(tdDiv).removeAttr('width'); //wrap content
+
+									//add editable event here 'dblclick'
+
+							}
+					);
+					
+			},
+			getCellDim: function (obj) // get cell prop for editable event
+			{
+				var ht = parseInt($(obj).height());
+				var pht = parseInt($(obj).parent().height());
+				var wt = parseInt(obj.style.width);
+				var pwt = parseInt($(obj).parent().width());
+				var top = obj.offsetParent.offsetTop;
+				var left = obj.offsetParent.offsetLeft;
+				var pdl = parseInt($(obj).css('paddingLeft'));
+				var pdt = parseInt($(obj).css('paddingTop'));
+				return {ht:ht,wt:wt,top:top,left:left,pdl:pdl, pdt:pdt, pht:pht, pwt: pwt};
+			},
+			addRowProp: function()
+			{
+					$('tbody tr',g.bDiv).each
+					(
+						function ()
+							{
+							$(this)
+							.click(
+								function (e) 
+									{ 
+										var obj = (e.target || e.srcElement); if (obj.href || obj.type) return true;
+										$(this).toggleClass('trSelected'); 
+									}
+							)
+							.mousedown(
+								function (e)
+									{
+										if (e.shiftKey)
+										{
+										$(this).toggleClass('trSelected'); 
+										g.multisel = true; 
+										this.focus();
+										$(g.gDiv).noSelect();
+										}
+									}
+							)
+							.mouseup(
+								function ()
+									{
+										if (g.multisel)
+										{
+										g.multisel = false;
+										$(g.gDiv).noSelect(false);
+										}
+									}
+							)
+							.hover(
+								function (e) 
+									{ 
+									if (g.multisel) 
+										{
+										$(this).toggleClass('trSelected'); 
+										}
+									},
+								function () {}						
+							)
+							;
+							
+							if ($.browser.msie&&$.browser.version<7.0)
+								{
+									$(this)
+									.hover(
+										function () { $(this).addClass('trOver'); },
+										function () { $(this).removeClass('trOver'); }
+									)
+									;
+								}
+							}
+					);
+					
+					
+			},
+			pager: 0
+			};		
+		
+		//create model if any
+		if (p.colModel)
+		{
+			thead = document.createElement('thead');
+			tr = document.createElement('tr');
+			
+			for (i in p.colModel)
+				{
+					var cm = p.colModel[i];
+					var th = document.createElement('th');
+
+					th.innerHTML = cm.display;
+					
+					if (cm.name)
+						$(th).attr('abbr',cm.name);
+					
+					//th.idx = i;
+					$(th).attr('axis','col'+i);
+					
+					if (cm.align)
+						th.align = cm.align;
+						
+					if (cm.width) 
+						$(th).attr('width',cm.width);
+
+					if (cm.hide)
+						{
+						th.hide = true;
+						}
+						
+					if (cm.process)
+						{
+							th.process = cm.process;
+						}
+
+					$(tr).append(th);
+				}
+			$(thead).append(tr);
+			$(t).prepend(thead);
+		} // end if p.colmodel	
+
+		//init divs
+		g.gDiv = document.createElement('div'); //create global container
+		g.mDiv = document.createElement('div'); //create title container
+		g.hDiv = document.createElement('div'); //create header container
+		g.bDiv = document.createElement('div'); //create body container
+		g.vDiv = document.createElement('div'); //create grip
+		g.rDiv = document.createElement('div'); //create horizontal resizer
+		g.cDrag = document.createElement('div'); //create column drag
+		g.block = document.createElement('div'); //creat blocker
+		g.nDiv = document.createElement('div'); //create column show/hide popup
+		g.nBtn = document.createElement('div'); //create column show/hide button
+		g.iDiv = document.createElement('div'); //create editable layer
+		g.tDiv = document.createElement('div'); //create toolbar
+		g.sDiv = document.createElement('div');
+		
+		if (p.usepager) g.pDiv = document.createElement('div'); //create pager container
+		g.hTable = document.createElement('table');
+
+		//set gDiv
+		g.gDiv.className = 'flexigrid';
+		if (p.width!='auto') g.gDiv.style.width = p.width + 'px';
+
+		//add conditional classes
+		if ($.browser.msie)
+			$(g.gDiv).addClass('ie');
+		
+		if (p.novstripe)
+			$(g.gDiv).addClass('novstripe');
+
+		$(t).before(g.gDiv);
+		$(g.gDiv)
+		.append(t)
+		;
+
+		//set toolbar
+		if (p.buttons) 
+		{
+			g.tDiv.className = 'tDiv';
+			var tDiv2 = document.createElement('div');
+			tDiv2.className = 'tDiv2';
+			
+			for (i in p.buttons)
+				{
+					var btn = p.buttons[i];
+					if (!btn.separator)
+					{
+						var btnDiv = document.createElement('div');
+						btnDiv.className = 'fbutton';
+						btnDiv.innerHTML = "<div><span>"+btn.name+"</span></div>";
+						if (btn.bclass) 
+							$('span',btnDiv)
+							.addClass(btn.bclass)
+							.css({paddingLeft:20})
+							;
+						btnDiv.onpress = btn.onpress;
+						btnDiv.name = btn.name;
+						if (btn.onpress)
+						{
+							$(btnDiv).click
+							(	
+								function () 
+								{
+								this.onpress(this.name,g.gDiv);
+								}
+							);
+						}
+						$(tDiv2).append(btnDiv);
+						if ($.browser.msie&&$.browser.version<7.0)
+						{
+							$(btnDiv).hover(function(){$(this).addClass('fbOver');},function(){$(this).removeClass('fbOver');});
+						}
+						
+					} else {
+						$(tDiv2).append("<div class='btnseparator'></div>");
+					}
+				}
+				$(g.tDiv).append(tDiv2);
+				$(g.tDiv).append("<div style='clear:both'></div>");
+				$(g.gDiv).prepend(g.tDiv);
+		}
+		
+		//set hDiv
+		g.hDiv.className = 'hDiv';
+
+		$(t).before(g.hDiv);
+
+		//set hTable
+			g.hTable.cellPadding = 0;
+			g.hTable.cellSpacing = 0;
+			$(g.hDiv).append('<div class="hDivBox"></div>');
+			$('div',g.hDiv).append(g.hTable);
+			var thead = $("thead:first",t).get(0);
+			if (thead) $(g.hTable).append(thead);
+			thead = null;
+		
+		if (!p.colmodel) var ci = 0;
+
+		//setup thead			
+			$('thead tr:first th',g.hDiv).each
+			(
+			 	function ()
+					{
+						var thdiv = document.createElement('div');
+						
+						
+					
+						if ($(this).attr('abbr'))
+							{
+							$(this).click(
+								function (e) 
+									{
+										
+										if (!$(this).hasClass('thOver')) return false;
+										var obj = (e.target || e.srcElement);
+										if (obj.href || obj.type) return true; 
+										g.changeSort(this);
+									}
+							)
+							;
+							
+							if ($(this).attr('abbr')==p.sortname)
+								{
+								this.className = 'sorted';
+								thdiv.className = 's'+p.sortorder;
+								}
+							}
+							
+							if (this.hide) $(this).hide();
+							
+							if (!p.colmodel)
+							{
+								$(this).attr('axis','col' + ci++);
+							}
+							
+							
+						 $(thdiv).css({textAlign:this.align, width: this.width + 'px'});
+						 thdiv.innerHTML = this.innerHTML;
+						 
+						$(this).empty().append(thdiv).removeAttr('width')
+						.mousedown(function (e) {g.dragStart('colMove',e,this)})
+						.hover(
+							function(){
+								if (!g.colresize&&!$(this).hasClass('thMove')&&!g.colCopy) $(this).addClass('thOver');
+								
+								if ($(this).attr('abbr')!=p.sortname&&!g.colCopy&&!g.colresize&&$(this).attr('abbr')) $('div',this).addClass('s'+p.sortorder);
+								else if ($(this).attr('abbr')==p.sortname&&!g.colCopy&&!g.colresize&&$(this).attr('abbr'))
+									{
+										var no = '';
+										if (p.sortorder=='asc') no = 'desc';
+										else no = 'asc';
+										$('div',this).removeClass('s'+p.sortorder).addClass('s'+no);
+									}
+								
+								if (g.colCopy) 
+									{
+									var n = $('th',g.hDiv).index(this);
+									
+									if (n==g.dcoln) return false;
+									
+									
+									
+									if (n<g.dcoln) $(this).append(g.cdropleft);
+									else $(this).append(g.cdropright);
+									
+									g.dcolt = n;
+									
+									} else if (!g.colresize) {
+										
+									var nv = $('th:visible',g.hDiv).index(this);
+									var onl = parseInt($('div:eq('+nv+')',g.cDrag).css('left'));
+									var nw = parseInt($(g.nBtn).width()) + parseInt($(g.nBtn).css('borderLeftWidth'));
+									nl = onl - nw + Math.floor(p.cgwidth/2);
+									
+									$(g.nDiv).hide();$(g.nBtn).hide();
+									
+									$(g.nBtn).css({'left':nl,top:g.hDiv.offsetTop}).show();
+									
+									var ndw = parseInt($(g.nDiv).width());
+									
+									$(g.nDiv).css({top:g.bDiv.offsetTop});
+									
+									if ((nl+ndw)>$(g.gDiv).width())
+										$(g.nDiv).css('left',onl-ndw+1);
+									else
+										$(g.nDiv).css('left',nl);
+										
+									if ($(this).hasClass('sorted')) 
+										$(g.nBtn).addClass('srtd');
+									else
+										$(g.nBtn).removeClass('srtd');
+										
+									}
+									
+							},
+							function(){
+								$(this).removeClass('thOver');
+								if ($(this).attr('abbr')!=p.sortname) $('div',this).removeClass('s'+p.sortorder);
+								else if ($(this).attr('abbr')==p.sortname)
+									{
+										var no = '';
+										if (p.sortorder=='asc') no = 'desc';
+										else no = 'asc';
+										
+										$('div',this).addClass('s'+p.sortorder).removeClass('s'+no);
+									}
+								if (g.colCopy) 
+									{								
+									$(g.cdropleft).remove();
+									$(g.cdropright).remove();
+									g.dcolt = null;
+									}
+							})
+						; //wrap content
+					}
+			);
+
+		//set bDiv
+		g.bDiv.className = 'bDiv';
+		$(t).before(g.bDiv);
+		$(g.bDiv)
+		.css({ height: (p.height=='auto') ? 'auto' : p.height+"px"})
+		.scroll(function (e) {g.scroll()})
+		.append(t)
+		;
+		
+		if (p.height == 'auto') 
+			{
+			$('table',g.bDiv).addClass('autoht');
+			}
+
+
+		//add td properties
+		g.addCellProp();
+		
+		//add row properties
+		g.addRowProp();
+		
+		//set cDrag
+		
+		var cdcol = $('thead tr:first th:first',g.hDiv).get(0);
+		
+		if (cdcol != null)
+		{		
+		g.cDrag.className = 'cDrag';
+		g.cdpad = 0;
+		
+		g.cdpad += (isNaN(parseInt($('div',cdcol).css('borderLeftWidth'))) ? 0 : parseInt($('div',cdcol).css('borderLeftWidth'))); 
+		g.cdpad += (isNaN(parseInt($('div',cdcol).css('borderRightWidth'))) ? 0 : parseInt($('div',cdcol).css('borderRightWidth'))); 
+		g.cdpad += (isNaN(parseInt($('div',cdcol).css('paddingLeft'))) ? 0 : parseInt($('div',cdcol).css('paddingLeft'))); 
+		g.cdpad += (isNaN(parseInt($('div',cdcol).css('paddingRight'))) ? 0 : parseInt($('div',cdcol).css('paddingRight'))); 
+		g.cdpad += (isNaN(parseInt($(cdcol).css('borderLeftWidth'))) ? 0 : parseInt($(cdcol).css('borderLeftWidth'))); 
+		g.cdpad += (isNaN(parseInt($(cdcol).css('borderRightWidth'))) ? 0 : parseInt($(cdcol).css('borderRightWidth'))); 
+		g.cdpad += (isNaN(parseInt($(cdcol).css('paddingLeft'))) ? 0 : parseInt($(cdcol).css('paddingLeft'))); 
+		g.cdpad += (isNaN(parseInt($(cdcol).css('paddingRight'))) ? 0 : parseInt($(cdcol).css('paddingRight'))); 
+
+		$(g.bDiv).before(g.cDrag);
+		
+		var cdheight = $(g.bDiv).height();
+		var hdheight = $(g.hDiv).height();
+		
+		$(g.cDrag).css({top: -hdheight + 'px'});
+		
+		$('thead tr:first th',g.hDiv).each
+			(
+			 	function ()
+					{
+						var cgDiv = document.createElement('div');
+						$(g.cDrag).append(cgDiv);
+						if (!p.cgwidth) p.cgwidth = $(cgDiv).width();
+						$(cgDiv).css({height: cdheight + hdheight})
+						.mousedown(function(e){g.dragStart('colresize',e,this);})
+						;
+						if ($.browser.msie&&$.browser.version<7.0)
+						{
+							g.fixHeight($(g.gDiv).height());
+							$(cgDiv).hover(
+								function () 
+								{
+								g.fixHeight();
+								$(this).addClass('dragging') 
+								},
+								function () { if (!g.colresize) $(this).removeClass('dragging') }
+							);
+						}
+					}
+			);
+		
+		g.rePosDrag();
+							
+		}
+		
+
+		//add strip		
+		if (p.striped) 
+			$('tbody tr:odd',g.bDiv).addClass('erow');
+			
+			
+		if (p.resizable && p.height !='auto') 
+		{
+		g.vDiv.className = 'vGrip';
+		$(g.vDiv)
+		.mousedown(function (e) { g.dragStart('vresize',e)})
+		.html('<span></span>');
+		$(g.bDiv).after(g.vDiv);
+		}
+		
+		if (p.resizable && p.width !='auto') 
+		{
+		g.rDiv.className = 'hGrip';
+		$(g.rDiv)
+		.mousedown(function (e) {g.dragStart('vresize',e,true);})
+		.html('<span></span>')
+		.css('height',$(g.gDiv).height())
+		;
+		if ($.browser.msie&&$.browser.version<7.0)
+		{
+			$(g.rDiv).hover(function(){$(this).addClass('hgOver');},function(){$(this).removeClass('hgOver');});
+		}
+		$(g.gDiv).append(g.rDiv);
+		}
+		
+		// add pager
+		if (p.usepager)
+		{
+		g.pDiv.className = 'pDiv';
+		g.pDiv.innerHTML = '<div class="pDiv2"></div>';
+		$(g.bDiv).after(g.pDiv);
+		var html = ' <div class="pGroup"> <div class="pFirst pButton"><span></span></div><div class="pPrev pButton"><span></span></div> </div> <div class="btnseparator"></div> <div class="pGroup"><span class="pcontrol">Page <input type="text" size="4" value="1" /> of <span> 1 </span></span></div> <div class="btnseparator"></div> <div class="pGroup"> <div class="pNext pButton"><span></span></div><div class="pLast pButton"><span></span></div> </div> <div class="btnseparator"></div> <div class="pGroup"> <div class="pReload pButton"><span></span></div> </div> <div class="btnseparator"></div> <div class="pGroup"><span class="pPageStat"></span></div>';
+		$('div',g.pDiv).html(html);
+		
+		$('.pReload',g.pDiv).click(function(){g.populate()});
+		$('.pFirst',g.pDiv).click(function(){g.changePage('first')});
+		$('.pPrev',g.pDiv).click(function(){g.changePage('prev')});
+		$('.pNext',g.pDiv).click(function(){g.changePage('next')});
+		$('.pLast',g.pDiv).click(function(){g.changePage('last')});
+		$('.pcontrol input',g.pDiv).keydown(function(e){if(e.keyCode==13) g.changePage('input')});
+		if ($.browser.msie&&$.browser.version<7) $('.pButton',g.pDiv).hover(function(){$(this).addClass('pBtnOver');},function(){$(this).removeClass('pBtnOver');});
+			
+			if (p.useRp)
+			{
+			var opt = "";
+			for (var nx in p.rpOptions)
+			{
+				if (p.rp == p.rpOptions[nx]) sel = 'selected="selected"'; else sel = '';
+				 opt += "<option value='" + p.rpOptions[nx] + "' " + sel + " >" + p.rpOptions[nx] + "&nbsp;&nbsp;</option>";
+			};
+			$('.pDiv2',g.pDiv).prepend("<div class='pGroup'><select name='rp'>"+opt+"</select></div> <div class='btnseparator'></div>");
+			$('select',g.pDiv).change(
+					function ()
+					{
+						if (p.onRpChange) 
+							p.onRpChange(+this.value);
+						else
+							{
+							p.newp = 1;
+							p.rp = +this.value;
+							g.populate();
+							}
+					}
+				);
+			}
+		
+		//add search button
+		if (p.searchitems)
+			{
+				$('.pDiv2',g.pDiv).prepend("<div class='pGroup'> <div class='pSearch pButton'><span></span></div> </div>  <div class='btnseparator'></div>");
+				$('.pSearch',g.spDiv).click(function(){$(g.sDiv).slideToggle('fast',function(){$('.sDiv:visible input:first',g.gDiv).trigger('focus');});});				
+				//add search box
+				g.sDiv.className = 'sDiv';
+				
+				sitems = p.searchitems;
+				
+				var sopt = "";
+				for (var s = 0; s < sitems.length; s++)
+				{
+					if (p.qtype=='' && sitems[s].isdefault==true)
+					{
+					p.qtype = sitems[s].name;
+					sel = 'selected="selected"';
+					} else sel = '';
+					sopt += "<option value='" + sitems[s].name + "' " + sel + " >" + sitems[s].display + "&nbsp;&nbsp;</option>";						
+				}
+				
+				if (p.qtype=='') p.qtype = sitems[0].name;
+				
+				$(g.sDiv).append("<div class='sDiv2'>Quick Search <input type='text' size='30' name='q' class='qsbox' /> <select name='qtype'>"+sopt+"</select> <input type='button' value='Clear' /></div>");
+
+				$('input[name=q],select[name=qtype]',g.sDiv).keydown(function(e){if(e.keyCode==13) g.doSearch()});
+				$('input[value=Clear]',g.sDiv).click(function(){$('input[name=q]',g.sDiv).val(''); p.query = ''; g.doSearch(); });
+				$(g.bDiv).after(g.sDiv);				
+				
+			}
+		
+		}
+		$(g.pDiv,g.sDiv).append("<div style='clear:both'></div>");
+	
+		// add title
+		if (p.title)
+		{
+			g.mDiv.className = 'mDiv';
+			g.mDiv.innerHTML = '<div class="ftitle">'+p.title+'</div>';
+			$(g.gDiv).prepend(g.mDiv);
+			if (p.showTableToggleBtn)
+				{
+					$(g.mDiv).append('<div class="ptogtitle" title="Minimize/Maximize Table"><span></span></div>');
+					$('div.ptogtitle',g.mDiv).click
+					(
+					 	function ()
+							{
+								$(g.gDiv).toggleClass('hideBody');
+								$(this).toggleClass('vsble');
+							}
+					);
+				}
+		}
+
+		//setup cdrops
+		g.cdropleft = document.createElement('span');
+		g.cdropleft.className = 'cdropleft';
+		g.cdropright = document.createElement('span');
+		g.cdropright.className = 'cdropright';
+
+		//add block
+		g.block.className = 'gBlock';
+		var gh = $(g.bDiv).height();
+		var gtop = g.bDiv.offsetTop;
+		$(g.block).css(
+		{
+			width: g.bDiv.style.width,
+			height: gh,
+			background: 'white',
+			position: 'relative',
+			marginBottom: (gh * -1),
+			zIndex: 999,
+			top: gtop,
+			left: '0px'
+		}
+		);
+		$(g.block).fadeTo(0,p.blockOpacity);				
+		
+		// add column control
+		if ($('th',g.hDiv).length)
+		{
+			
+			g.nDiv.className = 'nDiv';
+			g.nDiv.innerHTML = "<table cellpadding='0' cellspacing='0'><tbody></tbody></table>";
+			$(g.nDiv).css(
+			{
+				marginBottom: (gh * -1),
+				display: 'none',
+				top: gtop
+			}
+			).noSelect()
+			;
+			
+			var cn = 0;
+			
+			
+			$('th div',g.hDiv).each
+			(
+			 	function ()
+					{
+						var kcol = $("th[axis='col" + cn + "']",g.hDiv)[0];
+						var chk = 'checked="checked"';
+						if (kcol.style.display=='none') chk = '';
+						
+						$('tbody',g.nDiv).append('<tr><td class="ndcol1"><input type="checkbox" '+ chk +' class="togCol" value="'+ cn +'" /></td><td class="ndcol2">'+this.innerHTML+'</td></tr>');
+						cn++;
+					}
+			);
+			
+			if ($.browser.msie&&$.browser.version<7.0)
+				$('tr',g.nDiv).hover
+				(
+				 	function () {$(this).addClass('ndcolover');},
+					function () {$(this).removeClass('ndcolover');}
+				);
+			
+			$('td.ndcol2',g.nDiv).click
+			(
+			 	function ()
+					{
+						if ($('input:checked',g.nDiv).length<=p.minColToggle&&$(this).prev().find('input')[0].checked) return false;
+						return g.toggleCol($(this).prev().find('input').val());
+					}
+			);
+			
+			$('input.togCol',g.nDiv).click
+			(
+			 	function ()
+					{
+						
+						if ($('input:checked',g.nDiv).length<p.minColToggle&&this.checked==false) return false;
+						$(this).parent().next().trigger('click');
+						//return false;
+					}
+			);
+
+
+			$(g.gDiv).prepend(g.nDiv);
+			
+			$(g.nBtn).addClass('nBtn')
+			.html('<div></div>')
+			.attr('title','Hide/Show Columns')
+			.css('top',g.hDiv.offsetTop)
+			.click
+			(
+			 	function ()
+				{
+			 	$(g.nDiv).toggle(); return true;
+				}
+			);
+			
+			if (p.showToggleBtn) $(g.gDiv).prepend(g.nBtn);
+			
+		}
+		
+		// add date edit layer
+		$(g.iDiv)
+		.addClass('iDiv')
+		.css({display:'none'})
+		;
+		$(g.bDiv).append(g.iDiv);
+		
+		// add flexigrid events
+		$(g.bDiv)
+		.hover(function(){$(g.nDiv).hide();$(g.nBtn).hide();},function(){if (g.multisel) g.multisel = false;})
+		;
+		$(g.gDiv)
+		.hover(function(){},function(){$(g.nDiv).hide();$(g.nBtn).hide();})
+		;
+		
+		//add document events
+		$(document)
+		.mousemove(function(e){g.dragMove(e)})
+		.mouseup(function(e){g.dragEnd()})
+		.hover(function(){},function (){g.dragEnd()})
+		;
+		
+		//browser adjustments
+		if ($.browser.msie&&$.browser.version<7.0)
+		{
+			$('.hDiv,.bDiv,.mDiv,.pDiv,.vGrip,.tDiv, .sDiv',g.gDiv)
+			.css({width: '100%'});
+			$(g.gDiv).addClass('ie6');
+			if (p.width!='auto') $(g.gDiv).addClass('ie6fullwidthbug');			
+		} 
+		
+		//make grid functions accessible
+		t.p = p;
+		t.grid = g;
+		
+		// load data
+		if (p.url&&p.autoload) 
+			{
+			g.populate();
+			}
+		
+		return t;		
+			
+	};
+
+	var docloaded = false;
+
+	$(document).ready(function () {docloaded = true} );
+
+	$.fn.flexigrid = function(p) {
+
+		return this.each( function() {
+				if (!docloaded)
+				{
+					$(this).hide();
+					var t = this;
+					$(document).ready
+					(
+						function ()
+						{
+						$.addFlex(t,p);
+						}
+					);
+				} else {
+					$.addFlex(this,p);
+				}
+			});
+
+	}; //end flexigrid
+
+	$.fn.flexReload = function(p) { // function to reload grid
+
+		return this.each( function() {
+				if (this.grid&&this.p.url) this.grid.populate();
+			});
+
+	}; //end flexReload
+
+	$.fn.flexOptions = function(p) { //function to update general options
+
+		return this.each( function() {
+				if (this.grid) $.extend(this.p,p);
+			});
+
+	}; //end flexOptions
+
+	$.fn.flexToggleCol = function(cid,visible) { // function to reload grid
+
+		return this.each( function() {
+				if (this.grid) this.grid.toggleCol(cid,visible);
+			});
+
+	}; //end flexToggleCol
+
+
+	$.fn.noSelect = function(p) { //no select plugin by me :-)
+
+		if (p == null) 
+			prevent = true;
+		else
+			prevent = p;
+
+		if (prevent) {
+		
+		return this.each(function ()
+			{
+				if ($.browser.msie||$.browser.safari) $(this).bind('selectstart',function(){return false;});
+				else if ($.browser.mozilla) 
+					{
+						$(this).css('MozUserSelect','none');
+						$('body').trigger('focus');
+					}
+				else if ($.browser.opera) $(this).bind('mousedown',function(){return false;});
+				else $(this).attr('unselectable','on');
+			});
+			
+		} else {
+
+		
+		return this.each(function ()
+			{
+				if ($.browser.msie||$.browser.safari) $(this).unbind('selectstart');
+				else if ($.browser.mozilla) $(this).css('MozUserSelect','inherit');
+				else if ($.browser.opera) $(this).unbind('mousedown');
+				else $(this).removeAttr('unselectable','on');
+			});
+		
+		}
+
+	}; //end noSelect
+		
+})(jQuery);

Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/js/flexigrid.pack.js
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/js/flexigrid.pack.js?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/js/flexigrid.pack.js (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/js/flexigrid.pack.js Fri Dec  5 12:30:14 2008
@@ -0,0 +1,10 @@
+/*
+ * Flexigrid for jQuery - New Wave Grid
+ *
+ * Copyright (c) 2008 Paulo P. Marinas (webplicity.net/flexigrid)
+ * licensed under the MIT (MIT-LICENSE.txt)
+ *
+ * $Date: 2008-04-01 00:09:43 +0800 (Tue, 01 Apr 2008) $
+ */
+
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(a($){$.3W=a(t,p){8(t.2c)E o;p=$.4a({G:7a,r:\'1w\',3e:N,4j:o,4R:30,3N:4D,3f:N,2y:o,5i:\'64\',1X:\'3m\',54:\'65 70\',46:o,5o:N,16:1,1j:1,4V:N,1B:15,39:[10,15,20,25,40],2Y:o,5c:\'6P {5d} 3Y {3Y} 5t {1j} 5W\',5e:\'6s, 68 69 ...\',34:\'\',1r:\'\',56:\'6a 5W\',3k:1,5l:N,42:N,5b:N,5V:0.5,3R:o,3S:o,3V:o,41:o},p);$(t).1R().T({5F:0,5G:0,6b:0}).3q(\'r\');b g={1q:{},27:a(){b 2v=0-6.d.1z;8(6.d.1z>0)2v-=3x.4u(p.2M/2);$(g.14).c({1c:g.d.1D+1});b 1i=6.1i;$(\'9\',g.14).J();$(\'U f:1e m:12\',6.d).R(a(){b n=$(\'U f:1e m:12\',g.d).22(6);b 2o=F($(\'9\',6).r());b 6c=2o;8(2v==0)2v-=3x.4u(p.2M/2);2o=2o+2v+1i;$(\'9:S(\'+n+\')\',g.14).c({\'19\':2o+\'1Y\'}).1R();2v=2o})},2O:a(1
 k){8(!1k)1k=$(g.z).G();b 4L=$(6.d).G();$(\'9\',6.14).R(a(){$(6).G(1k+4L)});$(g.1H).c({G:1k,4B:(1k*-1)});b 3K=g.z.1D+1k;8(p.G!=\'1w\'&&p.3f)3K=g.2P.1D;$(g.2E).c({G:3K})},2Q:a(3g,e,L){8(3g==\'Y\'){$(g.B).J();$(g.18).J();b n=$(\'9\',6.14).22(L);b 3C=$(\'m:12 9:S(\'+n+\')\',6.d).r();$(L).K(\'2m\').4g().J();$(L).2Z().K(\'2m\').1R();6.Y={4H:e.23,55:F(L.1x.19),3C:3C,n:n};$(\'1y\').c(\'2t\',\'2l-3L\')}j 8(3g==\'1L\'){b 2B=o;$(\'1y\').c(\'2t\',\'1C-3L\');8(L){2B=N;$(\'1y\').c(\'2t\',\'2l-3L\')}6.1L={h:p.G,5S:e.38,w:p.r,4W:e.23,2B:2B}}j 8(3g==\'5P\'){$(g.B).J();$(g.18).J();6.1q=$(6.d).6d();6.1q.5x=6.1q.19+$(\'2I\',6.d).r();6.1q.5y=6.1q.1c+$(\'2I\',6.d).G();6.2U=L;6.2s=$(\'m\',6.d).22(L);6.W=l.u("9");6.W.P="W";6.W.11=L.11;8($.H.1h){6.W.P="W 5z"}$(6.W).c({5Q:\'6e\',6f:\'19\',1Q:\'2n\',4q:L.1u});$(\'1y\').D(6.W);$(6.14).J()}$(\'1y\').2G()},5A:a(e){8(6.Y){b n=6.Y.n;b 31=e.23-6.Y.4H;b 4S=6.Y.55+31;b 1A=6.Y.3C+31;8(1A>p.4R){$(\'9:S(\'+n+\')\',6.14).c(\'19\',4S);6.Y.1A=1A}}j 8(6.1L){b v=6.1L
 ;b y=e.38;b 31=y-v.5S;8(!p.3M)p.3M=p.r;8(p.r!=\'1w\'&&!p.6g&&v.2B){b x=e.23;b 4Y=x-v.4W;b 3r=v.w+4Y;8(3r>p.3M){6.I.1x.r=3r+\'1Y\';p.r=3r}}b 1k=v.h+31;8((1k>p.3N||p.G<p.3N)&&!v.2B){6.z.1x.G=1k+\'1Y\';p.G=1k;6.2O(1k)}v=M}j 8(6.W){$(6.2U).K(\'3w\').Z(\'3A\');8(e.23>6.1q.5x||e.23<6.1q.19||e.38>6.1q.5y||e.38<6.1q.1c){$(\'1y\').c(\'2t\',\'6j\')}j $(\'1y\').c(\'2t\',\'6k\');$(6.W).c({1c:e.38+10,19:e.23+20,1Q:\'1H\'})}},4p:a(){8(6.Y){b n=6.Y.n;b 1A=6.Y.1A;$(\'m:12 9:S(\'+n+\')\',6.d).c(\'r\',1A);$(\'f\',6.z).R(a(){$(\'k:12 9:S(\'+n+\')\',6).c(\'r\',1A)});6.d.1z=6.z.1z;$(\'9:S(\'+n+\')\',6.14).4g().1R();$(\'.2m\',6.14).Z(\'2m\');6.27();6.Y=o}j 8(6.1L){6.1L=o}j 8(6.W){$(6.W).2J();8(6.1V!=M){8(6.2s>6.1V)$(\'m:S(\'+6.1V+\')\',6.d).1Z(6.2U);j $(\'m:S(\'+6.1V+\')\',6.d).2p(6.2U);6.5k(6.2s,6.1V);$(6.2D).2J();$(6.2A).2J();6.27()}6.2U=M;6.1q=M;6.2s=M;6.1V=M;6.W=M;$(\'.3w\',6.d).Z(\'3w\');$(6.14).1R()}$(\'1y\').c(\'2t\',\'6l\');$(\'1y\').2G(o)},4m:a(2x,12){b 28=$("m[2k=\'2l"+2x+"\']",6.d)[0];
 b n=$(\'U m\',g.d).22(28);b 3Q=$(\'Q[1t=\'+2x+\']\',g.B)[0];8(12==M){12=28.J}8($(\'Q:1v\',g.B).1S<p.3k&&!12)E o;8(12){28.J=o;$(28).1R();3Q.1v=N}j{28.J=N;$(28).J();3Q.1v=o}$(\'1a f\',t).R(a(){8(12)$(\'k:S(\'+n+\')\',6).1R();j $(\'k:S(\'+n+\')\',6).J()});6.27();8(p.3R)p.3R(2x,12);E 12},5k:a(21,1T){$(\'1a f\',t).R(a(){8(21>1T)$(\'k:S(\'+1T+\')\',6).1Z($(\'k:S(\'+21+\')\',6));j $(\'k:S(\'+1T+\')\',6).2p($(\'k:S(\'+21+\')\',6))});8(21>1T)$(\'f:S(\'+1T+\')\',6.B).1Z($(\'f:S(\'+21+\')\',6.B));j $(\'f:S(\'+1T+\')\',6.B).2p($(\'f:S(\'+21+\')\',6.B));8($.H.1h&&$.H.1U<7.0)$(\'f:S(\'+1T+\') Q\',6.B)[0].1v=N;6.d.1z=6.z.1z},4C:a(){6.d.1z=6.z.1z;6.27()},5j:a(1f){$(\'.3h\',6.O).Z(\'2b\');6.2b=o;8(!1f){$(\'.2T\',6.O).1s(p.54);E o}8(p.1X==\'3m\')p.1j=+$(\'3n 1j\',1f).2q();j p.1j=1f.1j;8(p.1j==0){$(\'f\',t).3u();$(t).3v();p.1I=1;p.16=1;6.3T();$(\'.2T\',6.O).1s(p.56);E o}p.1I=3x.6n(p.1j/p.1B);8(p.1X==\'3m\')p.16=+$(\'3n 16\',1f).2q();j p.16=1f.16;6.3T();b 1a=l.u(\'1a\');8(p.1X==\'6p\'){$.R(1f.3
 n,a(i,1C){b f=l.u(\'f\');8(i%2&&p.3e)f.P=\'3J\';8(1C.26)f.26=\'1C\'+1C.26;$(\'U f:1e m\',g.d).R(a(){b k=l.u(\'k\');b 1K=$(6).T(\'2k\').48(3);k.1u=6.1u;k.11=1C.2X[1K];$(f).D(k);k=M});8($(\'U\',6.I).1S<1){2W(1K=0;1K<2X.1S;1K++){b k=l.u(\'k\');k.11=1C.2X[1K];$(f).D(k);k=M}}$(1a).D(f);f=M})}j 8(p.1X==\'3m\'){i=1;$("3n 1C",1f).R(a(){i++;b f=l.u(\'f\');8(i%2&&p.3e)f.P=\'3J\';b 3o=$(6).T(\'26\');8(3o)f.26=\'1C\'+3o;3o=M;b 3U=6;$(\'U f:1e m\',g.d).R(a(){b k=l.u(\'k\');b 1K=$(6).T(\'2k\').48(3);k.1u=6.1u;k.11=$("2X:S("+1K+")",3U).2q();$(f).D(k);k=M});8($(\'U\',6.I).1S<1){$(\'2X\',6).R(a(){b k=l.u(\'k\');k.11=$(6).2q();$(f).D(k);k=M})}$(1a).D(f);f=M;3U=M})}$(\'f\',t).3u();$(t).3v();$(t).D(1a);6.4v();6.3D();6.2O($(6.z).G());6.27();1a=M;1f=M;i=M;8(p.3V)p.3V();8(p.42)$(g.1H).2J();6.d.1z=6.z.1z;8($.H.3p)$(t).c(\'5f\',\'12\')},5L:a(m){8(6.2b)E N;$(g.B).J();$(g.18).J();8(p.1m==$(m).T(\'1l\')){8(p.1d==\'2H\')p.1d=\'4A\';j p.1d=\'2H\'}$(m).K(\'3b\').4g().Z(\'3b\');$(\'.59\',6.d).Z(\'59\');$(\
 '.5a\',6.d).Z(\'5a\');$(\'9\',m).K(\'s\'+p.1d);p.1m=$(m).T(\'1l\');8(p.3S)p.3S(p.1m,p.1d);j 6.1O()},3T:a(){$(\'.2r Q\').2f(p.16);$(\'.2r C\').1s(p.1I);b 3X=(p.16-1)*p.1B+1;b 3i=3X+p.1B-1;8(p.1j<3i)3i=p.1j;b 1M=p.5c;1M=1M.3Z(/{5d}/,3X);1M=1M.3Z(/{3Y}/,3i);1M=1M.3Z(/{1j}/,p.1j);$(\'.2T\',6.O).1s(1M)},1O:a(){8(6.2b)E N;8(p.41){b 2K=p.41();8(!2K)E o}6.2b=N;8(!p.2y)E o;$(\'.2T\',6.O).1s(p.5e);$(\'.3h\',6.O).K(\'2b\');$(g.1H).c({1c:g.z.1D});8(p.42)$(6.I).1J(g.1H);8($.H.3p)$(t).c(\'5f\',\'6z\');8(!p.1g)p.1g=1;8(p.16>p.1I)p.16=p.1I;b 44={16:p.1g,1B:p.1B,1m:p.1m,1d:p.1d,34:p.34,1r:p.1r};8(p.5g){b 43={};$.R(p.5g,a(){43[6.V]=6.1t});$.4a(44,43)}$.6B({29:p.5i,2y:p.2y,1f:44,1X:p.1X,6C:a(1f){g.5j(1f)}})},4l:a(){p.34=$(\'Q[V=q]\',g.1b).2f();p.1r=$(\'2h[V=1r]\',g.1b).2f();p.1g=1;6.1O()},2F:a(5m){8(6.2b)E N;6F(5m){32\'1e\':p.1g=1;33;32\'2Z\':8(p.16>1)p.1g=p.16-1;33;32\'4s\':8(p.16<p.1I)p.1g=p.16+1;33;32\'4Q\':p.1g=p.1I;33;32\'Q\':b 1n=F($(\'.2r Q\').2f());8(1F(1n))1n=1;8(1n<1)1n=1;j 8(1n>p.1I
 )1n=p.1I;$(\'.2r Q\').2f(1n);p.1g=1n;33}8(p.1g==p.16)E o;8(p.5n)p.5n(p.1g);j 6.1O()},4v:a(){$(\'1a f k\',g.z).R(a(){b 2C=l.u(\'9\');b n=$(\'k\',$(6).2V()).22(6);b 1G=$(\'m:S(\'+n+\')\',g.d).3E(0);8(1G!=M){8(p.1m==$(1G).T(\'1l\')&&p.1m){6.P=\'3b\'}$(2C).c({4q:1G.1u,r:$(\'9:1e\',1G)[0].1x.r});8(1G.J)$(6).c(\'1Q\',\'2n\')}8(p.5o==o)$(2C).c(\'5O-6H\',\'6I\');8(6.11==\'\')6.11=\'&2S;\';2C.11=6.11;b 47=$(6).2V()[0];b 49=o;8(47.26)49=47.26.48(3);8(1G!=M){8(1G.35)1G.35(2C,49)}$(6).3v().D(2C).3q(\'r\')})},6K:a(L){b 4b=F($(L).G());b 4e=F($(L).2V().G());b 4n=F(L.1x.r);b 4f=F($(L).2V().r());b 1c=L.5s.1D;b 19=L.5s.6L;b 4c=F($(L).c(\'2j\'));b 4h=F($(L).c(\'6M\'));E{4b:4b,4n:4n,1c:1c,19:19,4c:4c,4h:4h,4e:4e,4f:4f}},3D:a(){$(\'1a f\',g.z).R(a(){$(6).17(a(e){b L=(e.5H||e.5J);8(L.5K||L.29)E N;$(6).36(\'4r\')}).2e(a(e){8(e.6N){$(6).36(\'4r\');g.2z=N;6.4y();$(g.I).2G()}}).5D(a(){8(g.2z){g.2z=o;$(g.I).2G(o)}}).1o(a(e){8(g.2z){$(6).36(\'4r\')}},a(){});8($.H.1h&&$.H.1U<7.0){$(6).1o(a(){$(6).K(\'5w
 \')},a(){$(6).Z(\'5w\')})}})},6R:0};8(p.4i){U=l.u(\'U\');f=l.u(\'f\');2W(i 4o p.4i){b 1p=p.4i[i];b m=l.u(\'m\');m.11=1p.1Q;8(1p.V)$(m).T(\'1l\',1p.V);$(m).T(\'2k\',\'2l\'+i);8(1p.1u)m.1u=1p.1u;8(1p.r)$(m).T(\'r\',1p.r);8(1p.J){m.J=N}8(1p.35){m.35=1p.35}$(f).D(m)}$(U).D(f);$(t).1J(U)}g.I=l.u(\'9\');g.1N=l.u(\'9\');g.d=l.u(\'9\');g.z=l.u(\'9\');g.2P=l.u(\'9\');g.2E=l.u(\'9\');g.14=l.u(\'9\');g.1H=l.u(\'9\');g.B=l.u(\'9\');g.18=l.u(\'9\');g.3t=l.u(\'9\');g.2i=l.u(\'9\');g.1b=l.u(\'9\');8(p.46)g.O=l.u(\'9\');g.37=l.u(\'2I\');g.I.P=\'4P\';8(p.r!=\'1w\')g.I.1x.r=p.r+\'1Y\';8($.H.1h)$(g.I).K(\'5z\');8(p.4j)$(g.I).K(\'4j\');$(t).1Z(g.I);$(g.I).D(t);8(p.4k){g.2i.P=\'2i\';b 2w=l.u(\'9\');2w.P=\'2w\';2W(i 4o p.4k){b 1P=p.4k[i];8(!1P.6X){b 1E=l.u(\'9\');1E.P=\'6Y\';1E.11="<9><C>"+1P.V+"</C></9>";8(1P.5C)$(\'C\',1E).K(1P.5C).c({2j:20});1E.3s=1P.3s;1E.V=1P.V;8(1P.3s){$(1E).17(a(){6.3s(6.V,g.I)})}$(2w).D(1E);8($.H.1h&&$.H.1U<7.0){$(1E).1o(a(){$(6).K(\'5E\')},a(){$(6).Z(\'5E\')})}}j{$(2w).D
 ("<9 A=\'2a\'></9>")}}$(g.2i).D(2w);$(g.2i).D("<9 1x=\'5u:5v\'></9>");$(g.I).1J(g.2i)}g.d.P=\'d\';$(t).1Z(g.d);g.37.5F=0;g.37.5G=0;$(g.d).D(\'<9 A="72"></9>\');$(\'9\',g.d).D(g.37);b U=$("U:1e",t).3E(0);8(U)$(g.37).D(U);U=M;8(!p.5M)b 5N=0;$(\'U f:1e m\',g.d).R(a(){b 2R=l.u(\'9\');8($(6).T(\'1l\')){$(6).17(a(e){8(!$(6).4z(\'3A\'))E o;b L=(e.5H||e.5J);8(L.5K||L.29)E N;g.5L(6)});8($(6).T(\'1l\')==p.1m){6.P=\'3b\';2R.P=\'s\'+p.1d}}8(6.J)$(6).J();8(!p.5M){$(6).T(\'2k\',\'2l\'+5N++)}$(2R).c({4q:6.1u,r:6.r+\'1Y\'});2R.11=6.11;$(6).3v().D(2R).3q(\'r\').2e(a(e){g.2Q(\'5P\',e,6)}).1o(a(){8(!g.Y&&!$(6).4z(\'3w\')&&!g.W)$(6).K(\'3A\');8($(6).T(\'1l\')!=p.1m&&!g.W&&!g.Y&&$(6).T(\'1l\'))$(\'9\',6).K(\'s\'+p.1d);j 8($(6).T(\'1l\')==p.1m&&!g.W&&!g.Y&&$(6).T(\'1l\')){b 1W=\'\';8(p.1d==\'2H\')1W=\'4A\';j 1W=\'2H\';$(\'9\',6).Z(\'s\'+p.1d).K(\'s\'+1W)}8(g.W){b n=$(\'m\',g.d).22(6);8(n==g.2s)E o;8(n<g.2s)$(6).D(g.2D);j $(6).D(g.2A);g.1V=n}j 8(!g.Y){b 1n=$(\'m:12\',g.d).22(6);b 4w=F($(\'9:S(\'+1
 n+\')\',g.14).c(\'19\'));b 1A=F($(g.18).r())+F($(g.18).c(\'2L\'));3y=4w-1A+3x.4u(p.2M/2);$(g.B).J();$(g.18).J();$(g.18).c({\'19\':3y,1c:g.d.1D}).1R();b 4x=F($(g.B).r());$(g.B).c({1c:g.z.1D});8((3y+4x)>$(g.I).r())$(g.B).c(\'19\',4w-4x+1);j $(g.B).c(\'19\',3y);8($(6).4z(\'3b\'))$(g.18).K(\'5U\');j $(g.18).Z(\'5U\')}},a(){$(6).Z(\'3A\');8($(6).T(\'1l\')!=p.1m)$(\'9\',6).Z(\'s\'+p.1d);j 8($(6).T(\'1l\')==p.1m){b 1W=\'\';8(p.1d==\'2H\')1W=\'4A\';j 1W=\'2H\';$(\'9\',6).K(\'s\'+p.1d).Z(\'s\'+1W)}8(g.W){$(g.2D).2J();$(g.2A).2J();g.1V=M}})});g.z.P=\'z\';$(t).1Z(g.z);$(g.z).c({G:(p.G==\'1w\')?\'1w\':p.G+"1Y"}).4C(a(e){g.4C()}).D(t);8(p.G==\'1w\'){$(\'2I\',g.z).K(\'7e\')}g.4v();g.3D();b X=$(\'U f:1e m:1e\',g.d).3E(0);8(X!=M){g.14.P=\'14\';g.1i=0;g.1i+=(1F(F($(\'9\',X).c(\'2L\')))?0:F($(\'9\',X).c(\'2L\')));g.1i+=(1F(F($(\'9\',X).c(\'3c\')))?0:F($(\'9\',X).c(\'3c\')));g.1i+=(1F(F($(\'9\',X).c(\'2j\')))?0:F($(\'9\',X).c(\'2j\')));g.1i+=(1F(F($(\'9\',X).c(\'3d\')))?0:F($(\'9\',X).c(\'3d\'
 )));g.1i+=(1F(F($(X).c(\'2L\')))?0:F($(X).c(\'2L\')));g.1i+=(1F(F($(X).c(\'3c\')))?0:F($(X).c(\'3c\')));g.1i+=(1F(F($(X).c(\'2j\')))?0:F($(X).c(\'2j\')));g.1i+=(1F(F($(X).c(\'3d\')))?0:F($(X).c(\'3d\')));$(g.z).1Z(g.14);b 4G=$(g.z).G();b 3H=$(g.d).G();$(g.14).c({1c:-3H+\'1Y\'});$(\'U f:1e m\',g.d).R(a(){b 2N=l.u(\'9\');$(g.14).D(2N);8(!p.2M)p.2M=$(2N).r();$(2N).c({G:4G+3H}).2e(a(e){g.2Q(\'Y\',e,6)});8($.H.1h&&$.H.1U<7.0){g.2O($(g.I).G());$(2N).1o(a(){g.2O();$(6).K(\'2m\')},a(){8(!g.Y)$(6).Z(\'2m\')})}});g.27()}8(p.3e)$(\'1a f:62\',g.z).K(\'3J\');8(p.3f&&p.G!=\'1w\'){g.2P.P=\'5X\';$(g.2P).2e(a(e){g.2Q(\'1L\',e)}).1s(\'<C></C>\');$(g.z).2p(g.2P)}8(p.3f&&p.r!=\'1w\'){g.2E.P=\'63\';$(g.2E).2e(a(e){g.2Q(\'1L\',e,N)}).1s(\'<C></C>\').c(\'G\',$(g.I).G());8($.H.1h&&$.H.1U<7.0){$(g.2E).1o(a(){$(6).K(\'4I\')},a(){$(6).Z(\'4I\')})}$(g.I).D(g.2E)}8(p.46){g.O.P=\'O\';g.O.11=\'<9 A="3P"></9>\';$(g.z).2p(g.O);b 1s=\' <9 A="2d"> <9 A="4M 2g"><C></C></9><9 A="4N 2g"><C></C></9> </9> <9 A="2a
 "></9> <9 A="2d"><C A="2r">67 <Q 29="2q" 5h="4" 1t="1" /> 5t <C> 1 </C></C></9> <9 A="2a"></9> <9 A="2d"> <9 A="4X 2g"><C></C></9><9 A="4F 2g"><C></C></9> </9> <9 A="2a"></9> <9 A="2d"> <9 A="3h 2g"><C></C></9> </9> <9 A="2a"></9> <9 A="2d"><C A="2T"></C></9>\';$(\'9\',g.O).1s(1s);$(\'.3h\',g.O).17(a(){g.1O()});$(\'.4M\',g.O).17(a(){g.2F(\'1e\')});$(\'.4N\',g.O).17(a(){g.2F(\'2Z\')});$(\'.4X\',g.O).17(a(){g.2F(\'4s\')});$(\'.4F\',g.O).17(a(){g.2F(\'4Q\')});$(\'.2r Q\',g.O).5p(a(e){8(e.5q==13)g.2F(\'Q\')});8($.H.1h&&$.H.1U<7)$(\'.2g\',g.O).1o(a(){$(6).K(\'4U\')},a(){$(6).Z(\'4U\')});8(p.4V){b 3O="";2W(b 3j 4o p.39){8(p.1B==p.39[3j])2u=\'3z="3z"\';j 2u=\'\';3O+="<3l 1t=\'"+p.39[3j]+"\' "+2u+" >"+p.39[3j]+"&2S;&2S;</3l>"};$(\'.3P\',g.O).1J("<9 A=\'2d\'><2h V=\'1B\'>"+3O+"</2h></9> <9 A=\'2a\'></9>");$(\'2h\',g.O).6i(a(){8(p.52)p.52(+6.1t);j{p.1g=1;p.1B=+6.1t;g.1O()}})}8(p.58){$(\'.3P\',g.O).1J("<9 A=\'2d\'> <9 A=\'53 2g\'><C></C></9> </9>  <9 A=\'2a\'></9>");$(\'.53\',g.6m).17(
 a(){$(g.1b).6o(\'6q\',a(){$(\'.1b:12 Q:1e\',g.I).4d(\'4y\')})});g.1b.P=\'1b\';24=p.58;b 45="";2W(b s=0;s<24.1S;s++){8(p.1r==\'\'&&24[s].6r==N){p.1r=24[s].V;2u=\'3z="3z"\'}j 2u=\'\';45+="<3l 1t=\'"+24[s].V+"\' "+2u+" >"+24[s].1Q+"&2S;&2S;</3l>"}8(p.1r==\'\')p.1r=24[0].V;$(g.1b).D("<9 A=\'6w\'>6x 6A <Q 29=\'2q\' 5h=\'30\' V=\'q\' A=\'6D\' /> <2h V=\'1r\'>"+45+"</2h> <Q 29=\'6G\' 1t=\'5r\' /></9>");$(\'Q[V=q],2h[V=1r]\',g.1b).5p(a(e){8(e.5q==13)g.4l()});$(\'Q[1t=5r]\',g.1b).17(a(){$(\'Q[V=q]\',g.1b).2f(\'\');p.34=\'\';g.4l()});$(g.z).2p(g.1b)}}$(g.O,g.1b).D("<9 1x=\'5u:5v\'></9>");8(p.2Y){g.1N.P=\'1N\';g.1N.11=\'<9 A="6Q">\'+p.2Y+\'</9>\';$(g.I).1J(g.1N);8(p.6S){$(g.1N).D(\'<9 A="5B" 2Y="6T/6U 6W"><C></C></9>\');$(\'9.5B\',g.1N).17(a(){$(g.I).36(\'6Z\');$(6).36(\'71\')})}}g.2D=l.u(\'C\');g.2D.P=\'2D\';g.2A=l.u(\'C\');g.2A.P=\'2A\';g.1H.P=\'73\';b 2K=$(g.z).G();b 3F=g.z.1D;$(g.1H).c({r:g.z.1x.r,G:2K,74:\'5O\',5Q:\'75\',4B:(2K*-1),76:78,1c:3F,19:\'79\'});$(g.1H).7b(0,p.5V);8($(\'
 m\',g.d).1S){g.B.P=\'B\';g.B.11="<2I 7c=\'0\' 7d=\'0\'><1a></1a></2I>";$(g.B).c({4B:(2K*-1),1Q:\'2n\',1c:3F}).2G();b 3B=0;$(\'m 9\',g.d).R(a(){b 4E=$("m[2k=\'2l"+3B+"\']",g.d)[0];b 3I=\'1v="1v"\';8(4E.1x.1Q==\'2n\')3I=\'\';$(\'1a\',g.B).D(\'<f><k A="60"><Q 29="61" \'+3I+\' A="4Z" 1t="\'+3B+\'" /></k><k A="4O">\'+6.11+\'</k></f>\');3B++});8($.H.1h&&$.H.1U<7.0)$(\'f\',g.B).1o(a(){$(6).K(\'4K\')},a(){$(6).Z(\'4K\')});$(\'k.4O\',g.B).17(a(){8($(\'Q:1v\',g.B).1S<=p.3k&&$(6).2Z().4T(\'Q\')[0].1v)E o;E g.4m($(6).2Z().4T(\'Q\').2f())});$(\'Q.4Z\',g.B).17(a(){8($(\'Q:1v\',g.B).1S<p.3k&&6.1v==o)E o;$(6).2V().4s().4d(\'17\')});$(g.I).1J(g.B);$(g.18).K(\'18\').1s(\'<9></9>\').T(\'2Y\',\'6t/6u 6v\').c(\'1c\',g.d.1D).17(a(){$(g.B).6E();E N});8(p.5l)$(g.I).1J(g.18)}$(g.3t).K(\'3t\').c({1Q:\'2n\'});$(g.z).D(g.3t);$(g.z).1o(a(){$(g.B).J();$(g.18).J()},a(){8(g.2z)g.2z=o});$(g.I).1o(a(){},a(){$(g.B).J();$(g.18).J()});$(l).6V(a(e){g.5A(e)}).5D(a(e){g.4p()}).1o(a(){},a(){g.4p()});8($.H.1h&&$.H.1
 U<7.0){$(\'.d,.z,.1N,.O,.5X,.2i, .1b\',g.I).c({r:\'4D%\'});$(g.I).K(\'5Z\');8(p.r!=\'1w\')$(g.I).K(\'66\')}t.p=p;t.2c=g;8(p.2y&&p.5b){g.1O()}E t};b 4t=o;$(l).57(a(){4t=N});$.3a.4P=a(p){E 6.R(a(){8(!4t){$(6).J();b t=6;$(l).57(a(){$.3W(t,p)})}j{$.3W(6,p)}})};$.3a.6y=a(p){E 6.R(a(){8(6.2c&&6.p.2y)6.2c.1O()})};$.3a.6J=a(p){E 6.R(a(){8(6.2c)$.4a(6.p,p)})};$.3a.6O=a(2x,12){E 6.R(a(){8(6.2c)6.2c.4m(2x,12)})};$.3a.2G=a(p){8(p==M)3G=N;j 3G=p;8(3G){E 6.R(a(){8($.H.1h||$.H.5I)$(6).51(\'5T\',a(){E o});j 8($.H.5Y){$(6).c(\'4J\',\'2n\');$(\'1y\').4d(\'4y\')}j 8($.H.3p)$(6).51(\'2e\',a(){E o});j $(6).T(\'5R\',\'50\')})}j{E 6.R(a(){8($.H.1h||$.H.5I)$(6).3u(\'5T\');j 8($.H.5Y)$(6).c(\'4J\',\'6h\');j 8($.H.3p)$(6).3u(\'2e\');j $(6).3q(\'5R\',\'50\')})}}})(77);',62,449,'||||||this||if|div|function|var|css|hDiv||tr||||else|td|document|th||false|||width|||createElement|||||bDiv|class|nDiv|span|append|return|parseInt|height|browser|gDiv|hide|addClass|obj|null|true|pDiv|className|input|each|eq|att
 r|thead|name|colCopy|cdcol|colresize|removeClass||innerHTML|visible||cDrag||page|click|nBtn|left|tbody|sDiv|top|sortorder|first|data|newp|msie|cdpad|total|newH|abbr|sortname|nv|hover|cm|hset|qtype|html|value|align|checked|auto|style|body|scrollLeft|nw|rp|row|offsetTop|btnDiv|isNaN|pth|block|pages|prepend|idx|vresize|stat|mDiv|populate|btn|display|show|length|cdrop|version|dcolt|no|dataType|px|before||cdrag|index|pageX|sitems||id|rePosDrag|ncol|type|btnseparator|loading|grid|pGroup|mousedown|val|pButton|select|tDiv|paddingLeft|axis|col|dragging|none|cdpos|after|text|pcontrol|dcoln|cursor|sel|cdleft|tDiv2|cid|url|multisel|cdropright|hgo|tdDiv|cdropleft|rDiv|changePage|noSelect|asc|table|remove|gh|borderLeftWidth|cgwidth|cgDiv|fixHeight|vDiv|dragStart|thdiv|nbsp|pPageStat|dcol|parent|for|cell|title|prev||diff|case|break|query|process|toggleClass|hTable|pageY|rpOptions|fn|sorted|borderRightWidth|paddingRight|striped|resizable|dragtype|pReload|r2|nx|minColToggle|option|xml|rows|n
 id|opera|removeAttr|newW|onpress|iDiv|unbind|empty|thMove|Math|nl|selected|thOver|cn|ow|addRowProp|get|gtop|prevent|hdheight|chk|erow|hrH|resize|defwidth|minheight|opt|pDiv2|cb|onToggleCol|onChangeSort|buildpager|robj|onSuccess|addFlex|r1|to|replace||onSubmit|hideOnSubmit|nparam|param|sopt|usepager|prnt|substr|pid|extend|ht|pdl|trigger|pht|pwt|siblings|pdt|colModel|novstripe|buttons|doSearch|toggleCol|wt|in|dragEnd|textAlign|trSelected|next|docloaded|floor|addCellProp|onl|ndw|focus|hasClass|desc|marginBottom|scroll|100|kcol|pLast|cdheight|startX|hgOver|MozUserSelect|ndcolover|hdHeight|pFirst|pPrev|ndcol2|flexigrid|last|minwidth|nleft|find|pBtnOver|useRp|sx|pNext|xdiff|togCol|on|bind|onRpChange|pSearch|errormsg|ol|nomsg|ready|searchitems|sdesc|sasc|autoload|pagestat|from|procmsg|visibility|params|size|method|addData|switchCol|showToggleBtn|ctype|onChangePage|nowrap|keydown|keyCode|Clear|offsetParent|of|clear|both|trOver|right|bottom|ie|dragMove|ptogtitle|bclass|mouseup|fbOver
 |cellPadding|cellSpacing|target|safari|srcElement|href|changeSort|colmodel|ci|white|colMove|position|unselectable|sy|selectstart|srtd|blockOpacity|items|vGrip|mozilla|ie6|ndcol1|checkbox|odd|hGrip|POST|Connection|ie6fullwidthbug|Page|please|wait|No|border|ppos|offset|absolute|float|nohresize|inherit|change|move|pointer|default|spDiv|ceil|slideToggle|json|fast|isdefault|Processing|Hide|Show|Columns|sDiv2|Quick|flexReload|hidden|Search|ajax|success|qsbox|toggle|switch|button|space|normal|flexOptions|getCellDim|offsetLeft|paddingTop|shiftKey|flexToggleCol|Displaying|ftitle|pager|showTableToggleBtn|Minimize|Maximize|mousemove|Table|separator|fbutton|hideBody|Error|vsble|hDivBox|gBlock|background|relative|zIndex|jQuery|999|0px|200|fadeTo|cellpadding|cellspacing|autoht'.split('|'),0,{}))

Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/js/flot.extend.js
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/js/flot.extend.js?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/js/flot.extend.js (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/js/flot.extend.js Fri Dec  5 12:30:14 2008
@@ -0,0 +1,128 @@
+function showTooltip(x, y, contents) {
+        if(x>document.body.clientWidth*.6) {
+            x=x-200;
+        }
+        if(y>document.body.clientHeight*.7) {
+            y=y-40;
+        }
+        $('<div id="tooltip">' + contents + '</div>').css( {
+             position: 'absolute',
+             display: 'none',
+             top: y + 5,
+             left: x + 5,
+             border: '2px solid #aaa',
+             padding: '2px',
+             'background-color': '#fff',
+        }).appendTo("body").fadeIn(200);
+}
+
+wholePeriod=function () {
+        var cw = document.body.clientWidth-30;
+        var ch = document.body.clientHeight-50;
+        document.getElementById('placeholder').style.width=cw+'px';
+        document.getElementById('placeholder').style.height=ch+'px';
+        $.plot($("#placeholder"), _series, _options);
+};
+
+options={
+        points: { show: true },
+        xaxis: {                timeformat: "%D/%O/%y<br/>%H:%M:%S",
+                mode: "time"
+        },
+        selection: { mode: "xy" },
+        grid: {
+                hoverable: true,
+                clickable: true,
+                tickColor: "#C0C0C0",
+                backgroundColor:"#FFFFFF"
+        },
+        legend: { show: false }
+};
+
+        var previousPoint = null;
+	$("#placeholder").bind("plothover", function (event, pos, item) {
+	    var leftPad = function(n) {
+                n = "" + n;
+	        return n.length == 1 ? "0" + n : n;
+	    };
+            if (item) {
+                if (previousPoint != item.datapoint) {
+                    previousPoint = item.datapoint;
+               
+                    $("#tooltip").remove();
+                    var x = item.datapoint[0].toFixed(2),
+                         y = item.stackValue.toFixed(2);
+//item.datapoint[1].toFixed(2);
+                    var dnow=new Date();
+                    dnow.setTime(x);
+	            var dita=leftPad(dnow.getUTCDate())+"/"+leftPad(dnow.getUTCMonth()+1)+"/"+dnow.getUTCFullYear()+" "+leftPad(dnow.getUTCHours())+":"+leftPad(dnow.getUTCMinutes())+":"+leftPad(dnow.getUTCSeconds());
+ 
+                    showTooltip(item.pageX, item.pageY,
+                                item.series.label + ": " + y + "<br>Time: " + dita);
+                 }
+            } else {
+                 $("#tooltip").remove();
+                 previousPoint = null;            
+            }
+         });
+    $("#placeholder").bind("plotclick", function (event, pos, item) {
+	    var leftPad = function(n) {
+                n = "" + n;
+	        return n.length == 1 ? "0" + n : n;
+	    };
+            if (item) {
+                if (previousPoint != item.datapoint) {
+                    previousPoint = item.datapoint;
+               
+                    $("#tooltip").remove();
+                    var x = item.datapoint[0].toFixed(2),
+                         y = item.datapoint[1].toFixed(2);
+                    var dnow=new Date();
+                    dnow.setTime(x);
+	            var dita=leftPad(dnow.getUTCDate())+"/"+leftPad(dnow.getUTCMonth()+1)+"/"+dnow.getUTCFullYear()+" "+leftPad(dnow.getUTCHours())+":"+leftPad(dnow.getUTCMinutes())+":"+leftPad(dnow.getUTCSeconds());
+ 
+                    showTooltip(item.pageX, item.pageY,
+                                item.series.label + ": " + y + "<br>Time: " + dita);
+                 }
+            } else {
+                 $("#tooltip").remove();
+                 previousPoint = null;            
+            }
+    });
+		$("#placeholder").bind("selected", function (event, area) {
+			plot = $.plot(
+				$("#placeholder"),
+				_series,
+				$.extend(
+					true, 
+					{}, 
+					_options, {
+						xaxis: { min: area.x1, max: area.x2 }
+					}
+				)
+			);
+		});
+
+//  addept iframe height to content height
+function getDocHeight(doc) {
+  alert("getDocHeight called!");
+  var docHt = 0, sh, oh;
+  if (doc.height) docHt = doc.height;
+  else if (doc.body) {
+    if (doc.body.scrollHeight) docHt = sh = doc.body.scrollHeight;
+    if (doc.body.offsetHeight) docHt = oh = doc.body.offsetHeight;
+    if (sh && oh) docHt = Math.max(sh, oh);
+  }
+  return docHt;
+}
+
+function setIframeHeight(ifrm) {
+  try {
+    frame = window.parent.document.getElementById(ifrm);
+    innerDoc = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document;
+    objToResize = (frame.style) ? frame.style: frame;
+    objToResize.height = innerDoc.body.scrollHeight;
+  } catch(err) {
+    window.status = err.message;
+  }
+}

Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/js/host_selector.js
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/js/host_selector.js?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/js/host_selector.js (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/js/host_selector.js Fri Dec  5 12:30:14 2008
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+function save_host() {
+    var obj = document.getElementById("group_items");
+    var cookie = "";
+    for(var i=0;i< obj.options.length;i++) {
+        if(obj.options[i].selected) {
+            if(i!=0) {
+                cookie = cookie + "," + i;
+            } else {
+                cookie = i;
+            }
+        }
+    }
+    Set_Cookie("selected_host",cookie);
+}



Mime
View raw message