var iggd_=null,iggd_a=false;function _IG_DragPosition_left(a){var b=0;if(a.offsetParent)for(;a.offsetParent;){b+=a.offsetLeft;a=a.offsetParent}else if(a.x)b=a.x;return b}function _IG_DragPosition_right(a){return _IG_DragPosition_left(a)+a.offsetWidth}function _IG_DragPosition_top(a){var b=0;if(a.offsetParent)for(;a.offsetParent;){b+=a.offsetTop;a=a.offsetParent}else if(a.y)b=a.y;return b}function _IG_DragPosition_bottom(a){return _IG_DragPosition_top(a)+a.offsetHeight}
function _IG_Drag(){this.surrogateOffsetY=this.surrogateOffsetX=1;this.bottomMargin=this.topMargin=this.rightMargin=this.leftMargin=2;this.yMapper=this.xMapper=iggd_;this.surrogateInitialY=this.surrogateInitialX=0;this.curTargetId=this.curSource=this.surrogate=iggd_;this.isRightButton=this.hasDragged=this.isDragging=iggd_a;this.b={};this.f={};this.g={};this.a={};this.h={};this.d=this.c=iggd_;this.j()}_IG_Drag.prototype.noMoveMapper=function(a,b){return a-b};_IG_Drag.prototype.onDragStart=function(){};
_IG_Drag.prototype.onDragTargetHit=function(){};_IG_Drag.prototype.onDragTargetLost=function(){};_IG_Drag.prototype.onDragEnd=function(){};_IG_Drag.prototype.onDragClick=function(){};_IG_Drag.prototype.i=function(){if(!this.surrogate){this.surrogate=document.createElement("SPAN");this.surrogate.innerHTML="";this.surrogate.style.position="absolute";this.surrogate.style.cursor="move";this.surrogate.style.left=this.surrogateInitialX+"px";this.surrogate.style.top=this.surrogateInitialY+"px";document.body.appendChild(this.surrogate)}};
_IG_Drag.prototype.addSource=function(a,b,c){if(typeof b=="undefined")b=_gel(a);if(typeof this.b[a]!="undefined")return iggd_a;this.b[a]=b;if(typeof c!="undefined")b._IG_DragSurrogateView=c;this.f[a]=b.onmousedown;b.onmousedown=this.dragStart;this.g[a]=b.style.cursor;b.style.cursor=navigator.appName=="Microsoft Internet Explorer"?"hand":"pointer";return true};
_IG_Drag.prototype.removeSource=function(a){if(typeof this.b[a]!="undefined"){this.b[a].onmousedown=this.f[a];if(typeof this.b[a].style!="undefined")this.b[a].style.cursor=this.g[a]}delete this.b[a]};_IG_Drag.prototype.removeAllSources=function(){for(var a in this.b){this.b[a].onmousedown=this.f[a];if(typeof this.b[a].style!="undefined")this.b[a].style.cursor=this.g[a]}this.b={}};
_IG_Drag.prototype.addTarget=function(a,b,c){if(typeof b=="undefined")b=_gel(a);if(typeof c=="undefined")c=0;this.a[a]=b;this.h[a]=c};_IG_Drag.prototype.removeTarget=function(a){delete this.a[a]};_IG_Drag.prototype.removeAllTargets=function(){this.a={}};
_IG_Drag.prototype.cacheTargets=function(){this.l={};this.m={};this.n={};this.k={};for(var a in this.a){this.l[a]=_IG_DragPosition_left(this.a[a])-this.leftMargin;this.m[a]=_IG_DragPosition_right(this.a[a])+this.rightMargin;this.n[a]=_IG_DragPosition_top(this.a[a])-this.topMargin;this.k[a]=_IG_DragPosition_bottom(this.a[a])+this.bottomMargin}};
_IG_Drag.prototype.e=function(a){if(typeof a=="undefined")a=window.event;if(typeof a.layerX=="undefined")a.layerX=a.offsetX;if(typeof a.layerY=="undefined")a.layerY=a.offsetY;return a};
_IG_Drag.prototype.j=function(){var a=this;this.dragStart=function(b){a.isDragging&&a.dragEnd();a.curSource=this;b=a.e(b);a.isDragging=true;a.i();var c=typeof a.curSource._IG_DragSurrogateView;if(c=="undefined")a.surrogate.innerHTML=a.curSource.innerHTML;else if(c=="boolean"||c=="number"||c=="string")a.surrogate.innerHTML=a.curSource._IG_DragSurrogateView;else{for(;a.surrogate.firstChild;)a.surrogate.removeChild(a.surrogate.firstChild);a.surrogate.appendChild(a.curSource._IG_DragSurrogateView)}a.surrogateInitialX=
_IG_DragPosition_left(a.curSource)+a.surrogateOffsetX;if(typeof a.curSource._IG_Drag_surrogateOffsetX!="undefined")a.surrogateInitialX+=a.curSource._IG_Drag_surrogateOffsetX;a.surrogateInitialY=_IG_DragPosition_top(a.curSource)+a.surrogateOffsetY;if(typeof a.curSource._IG_Drag_surrogateOffsetY!="undefined")a.surrogateInitialY+=a.curSource._IG_Drag_surrogateOffsetY;a.surrogate.style.left=a.surrogateInitialX+"px";a.surrogate.style.top=a.surrogateInitialY+"px";a.surrogate.lastMouseX=b.clientX;a.surrogate.lastMouseY=
b.clientY;a.c=document.onmousemove;a.d=document.onmouseup;document.onmousemove=a.dragMove;document.onmouseup=a.dragEnd;a.isRightButton=iggd_a;if(b.which&&b.which==3)a.isRightButton=true;if(typeof b.button!="undefined"&&b.button==2)a.isRightButton=true;a.onDragStart(a.curSource);a.curTargetId=iggd_;a.onDragTargetLost(iggd_);a.hasDragged=iggd_a;a.cacheTargets();return iggd_a};this.dragMove=function(b){a.hasDragged=true;b=a.e(b);if(b.which==0)return a.dragEnd();var c=b.clientY;b=b.clientX;var e=parseInt(a.surrogate.style.top,
10),f=parseInt(a.surrogate.style.left,10);f=a.xMapper?a.xMapper(f,f-a.surrogateInitialX):f+(b-a.surrogate.lastMouseX);var g=a.yMapper?a.yMapper(e,e-a.surrogateInitialY):e+(c-a.surrogate.lastMouseY);e=f+a.surrogate.offsetWidth/2;var h=g+a.surrogate.offsetHeight/2;a.surrogate.style.left=f+"px";a.surrogate.style.top=g+"px";a.surrogate.lastMouseX=b;a.surrogate.lastMouseY=c;c=iggd_;for(var d in a.a)if(!(c!=iggd_&&a.h[d]<a.h[c]))if(e>=a.l[d]&&e<=a.m[d]&&h>=a.n[d]&&h<=a.k[d])c=d;if(a.curTargetId!=c)if(c==
iggd_){d=a.a[a.curTargetId];a.curTargetId=iggd_;a.onDragTargetLost(d)}else if(a.curTargetId==iggd_){a.curTargetId=c;a.onDragTargetHit(a.a[c],iggd_)}else{d=a.a[a.curTargetId];a.curTargetId=c;a.onDragTargetHit(a.a[c],d)}a.c!=iggd_&&a.c();return iggd_a};this.dragEnd=function(){document.onmousemove=a.c;document.onmouseup=a.d;a.surrogate.innerHTML="";a.isDragging=iggd_a;var b=a.hasDragged;a.hasDragged=iggd_a;if(a.curSource!=iggd_){a.onDragEnd(a.curSource,a.a[a.curTargetId]);b||a.onDragClick(a.curSource)}a.curSource=
iggd_;a.d!=iggd_&&a.d();return iggd_a}};_exportClass("google.gadgets","Drag",_IG_Drag,["isDragging",function(){return this.isDragging},"hasDragged",function(){return this.hasDragged},"getSurrogate",function(){return this.surrogate},"getSurrogateInitialX",function(){return this.surrogateInitialX},"getSurrogateInitialY",function(){return this.surrogateInitialY},"getCurrentSource",function(){return this.curSource},"getCurrentTargetId",function(){return this.curTargetId}]);
var igt_a=true,igt_=null;function igt_b(){for(var b=this.q.b,a=0;a<b.length;a++)if(this===b[a])return a;return-1}function igt_c(b){this.q=b;this.i=this.c=this.a=igt_;this.getName=function(){return this.a.innerHTML};this.getNameContainer=function(){return this.a};this.getContentContainer=function(){return this.c};this.getCallback=function(){return this.i};this.getIndex=igt_b}
function igt_d(b){if(arguments.length>0)if(typeof arguments[1]=="object")return this.l(b,arguments[1]);else{var a=arguments[1],c=arguments[2];if(a){if(!this.C.exec(a))throw new Error("addTab(): second argument containing DOM ID contains invalid characters: ["+a+"]");}else a=this.p();return this.l(b,{contentContainer:_gel(a),callback:c})}}
function igt_e(b,a){if(typeof a!="function")throw new Error("addDynamicTab(): second argument must be a function, not ["+typeof a+"]");return this.l(b,{callback:a})}
function igt_f(b,a){var c=typeof a=="object"?a:{};a=-1;if(c.index>=0&&c.index<this.b.length)a=c.index;c=this.A(b,{contentContainer:c.contentContainer,callback:c.callback,tooltip:c.tooltip});var d=this.g.rows[0];if(this.b.length>0){var e=document.createElement("td");e.className=this.e("tablib_spacerTab");e.appendChild(document.createTextNode(" "));var f=a<0?d.cells[d.cells.length-1]:this.b[a].a;d.insertBefore(e,f);d.insertBefore(c.a,a<0?f:e)}else d.insertBefore(c.a,d.cells[d.cells.length-1]);if(a<
0){a=this.b.length;this.b.push(c)}else{this.b.splice(a,0,c);this.t()}d=new RegExp(this.o,"i");if(isNaN(parseInt(this.k,10)))if(this.o)b.match(d)&&this.h(c,igt_a);else a==0&&this.h(c,igt_a);else parseInt(this.k,10)==a&&this.h(c,igt_a);this.v++;this.displayTabs(igt_a);this.n(igt_a);return c.c.id}
function igt_g(b){var a=this.b[b];if(!a)throw new Error("removeTab(): first argument is out of range: ["+ +b+"]");if(a==this.d){var c=this.b.length-1;if(c>0)this.h(b<c?this.b[b+1]:this.b[b-1])}c=this.g.rows[0];if(this.b.length>1)c.removeChild(b==0?a.a.nextSibling:a.a.previousSibling);c.removeChild(a.a);this.f.removeChild(a.c);this.b.splice(b,1);this.n();if(this.b.length==0){this.displayTabs(false);this.k="";this.d=igt_}}
function igt_h(b){this.leftNavContainer.style.display="none";this.rightNavContainer.style.display="none";if(this.g.offsetWidth<=this.tabsContainer.offsetWidth)this.tabsContainer.scrollLeft=0;else{this.leftNavContainer.style.display="";this.rightNavContainer.style.display="";if(this.tabsContainer.scrollLeft+this.tabsContainer.offsetWidth>this.tabsContainer.scrollWidth)this.tabsContainer.scrollLeft=this.tabsContainer.scrollWidth-this.tabsContainer.offsetWidth;else if(this.s&&b)this.tabsContainer.scrollLeft=
this.tabsContainer.scrollWidth}}function igt_i(b,a){var c=10;if(a){b.scrollLeft+=a<0?-c:c;var d=Math.min(c,Math.abs(a));c=function(){igt_i(b,a<0?a+d:a-d)};setTimeout(c,10)}}function igt_j(b){this.f.style.display=b?"block":"none"}function igt_k(){return this.d}function igt_l(b){if(!this.b[b])throw new Error("setSelectedTab(): first argument is out of range: ["+b+"]");this.h(this.b[b])}
function igt_m(b,a){var c=this.b[b],d=this.b[a];if(!c||!d)throw new Error("moveTab(): arguments are out of range: ["+b+"-"+a+"]");var e=c.a.parentNode,f=c.a.nextSibling;e.insertBefore(c.a,d.a);e.insertBefore(d.a,f);this.b[b]=d;this.b[a]=c}
function igt_n(b,a){if(this.d!=b){if(this.d){this.d.a.className=this.e("tablib_unselected");this.d.a.onclick=this.u(this.d);if(this.m)this.d.a.onmouseover=this.d.a.onclick;this.d.c.style.display="none"}b.a.className=this.e("tablib_selected");b.a.onmouseover=b.a.onclick=igt_;b.c.style.display="block";this.d=b;(a=a==igt_a?igt_a:false)||this.t();typeof b.i=="function"&&b.i(b.c.id)}}function igt_o(){return this.b.concat()}
function igt_p(b,a){if(!b.match(/^(left|center|right)$/))throw new Error("alignTabs(): first argument must be one of: [left, center, right]");var c=this.g.rows[0],d=c.cells[0];c=c.cells[c.cells.length-1];a=isNaN(a)?"3px":a+"px";d.style.width=b=="left"?a:"";c.style.width=b=="right"?a:"";this.g.style.display="none";this.g.style.display=""}
function igt_q(b,a){var c=new igt_c(this);c.c=a.contentContainer?a.contentContainer:igt_;c.i=a.callback?a.callback:igt_;c.a=document.createElement("td");c.a.title=a.tooltip?a.tooltip:"";c.a.innerHTML=b;c.a.className=this.e("tablib_unselected");c.a.onclick=this.u(c);if(this.m)c.a.onmouseover=c.a.onclick;if(c.c)c.c.parentNode!==this.f&&this.f.appendChild(c.c);else{c.c=document.createElement("div");c.c.id=this.p();this.f.appendChild(c.c)}c.c.style.display="none";c.c.className=this.e("tablib_content_container")+
" "+c.c.className;return c}
function igt_r(){var b=document.createElement("table");b.id=this.f.id+"_header";b.className=this.e("tablib_table");b.cellSpacing="0";b.cellPadding="0";var a=document.createElement("tbody"),c=document.createElement("tr");a.appendChild(c);b.appendChild(a);a=document.createElement("td");a.className=this.e("tablib_emptyTab");a.appendChild(document.createTextNode(" "));c.appendChild(a);c.appendChild(a.cloneNode(igt_a));c=document.createElement("table");c.id=this.f.id+"_navTable";c.style.width="100%";c.cellSpacing=
"0";c.cellPadding="0";c.style.tableLayout="fixed";a=document.createElement("tbody");var d=document.createElement("tr");a.appendChild(d);c.appendChild(a);a=document.createElement("td");a.className=this.e("tablib_emptyTab")+" "+this.e("tablib_navContainer");a.style.textAlign="left";a.style.display="";var e=document.createElement("a");e.href="javascript:void(0)";e.innerHTML="&laquo;";a.appendChild(e);d.appendChild(a);var f=document.createElement("td");d.appendChild(f);var g=document.createElement("div");
g.style.width="100%";g.style.overflow="hidden";g.appendChild(b);f.appendChild(g);f=document.createElement("td");f.className=this.e("tablib_emptyTab")+" "+this.e("tablib_navContainer");f.style.textAlign="right";f.style.display="";var h=document.createElement("a");h.href="javascript:void(0)";h.innerHTML="&raquo;";f.appendChild(h);d.appendChild(f);e.onclick=function(){igt_i(g,-120)};h.onclick=function(){igt_i(g,120)};if(this.s){d=e.onclick;e.onclick=h.onclick;h.onclick=d}if(this.navTable!=igt_)this.f.replaceChild(c,
this.navTable);else{this.f.insertBefore(c,this.f.firstChild);var i=this;d=function(){i.n()};_IG_AddDOMEventHandler(window,"resize",d)}this.navTable=c;this.leftNavContainer=a;this.rightNavContainer=f;this.tabsContainer=g;return b}
function igt_s(b){var a="tl_"+this.j;b=b?b:_gel(a);if(!b){b=document.createElement("div");b.id=a;a=_getGadgetContainer(this.j);if(!a)throw Error("Cannot locate gadget container.  Are you missing a <body> tag?");a.insertBefore(b,a.firstChild)}b.className=this.e("tablib_main_container")+" "+b.className;return b}function igt_t(b){return function(){b.q.h(b)}}function igt_u(){return this.f.id+"_"+this.v}
function igt_v(){try{var b=this.d.getIndex();if(b>=0){this.k=b;this.r.set("selectedTab",b)}}catch(a){}}function igt_w(b){return b+" "+b+this.j}var igt_x=".tablib_table {width: 100%;border-collapse: separate;border-spacing: 0px;empty-cells: show;font-size: 11px;text-align: center;}.tablib_emptyTab {border-bottom: 1px solid #676767;padding: 0px 1px;}.tablib_spacerTab {border-bottom: 1px solid #676767;padding: 0px 1px;width: 1px;}.tablib_selected {padding: 2px;background-color: #ffffff;border: 1px solid #676767;border-bottom-width: 0px;color: #3366cc;font-weight: bold;width: 80px;cursor: default;}.tablib_unselected {padding: 2px;background-color: #dddddd;border: 1px solid #aaaaaa;border-bottom-color: #676767;color: #000000;width: 80px;cursor: pointer;}.tablib_navContainer {width: 10px;vertical-align: middle;}.tablib_navContainer a:link, .tablib_navContainer a:visited, .tablib_navContainer a:hover {color: #3366aa;text-decoration: none;}";
function _IG_Tabs(b,a,c){this.addTab=igt_d;this.addDynamicTab=igt_e;this.setSelectedTab=igt_l;this.getSelectedTab=igt_k;this.moveTab=igt_m;this.removeTab=igt_g;this.getTabs=igt_o;this.alignTabs=igt_p;this.displayTabs=igt_j;this.getHeaderContainer=function(){return this.g};this.setAutoSelect=function(d){this.m=d};this.l=igt_f;this.w=igt_s;this.z=igt_r;this.A=igt_q;this.h=igt_n;this.u=igt_t;this.p=igt_u;this.t=igt_v;this.e=igt_w;this.n=igt_h;this.D=igt_i;if(!b){if(typeof remote_modules!="undefined")throw new Error("Module ID is required for inlined gadgets.");
b=(b=_args().mid)?b:0}this.j=b;this.B=igt_x;this.C=/^[A-Za-z]([0-9a-zA-Z_:.-]+)?$/;this.r=new _IG_Prefs(this.j);this.k=this.r.getString("selectedTab");this.d=igt_;this.b=[];this.v=0;this.o=a?a:igt_;this.tabsContainer=this.navTable=this.leftNavContainer=this.rightNavContainer=igt_;this.s=document.body.dir=="rtl";this.m=false;this.f=this.w(c);this.g=this.z();this.displayTabs(false);_IG_LoadCss(this.B)}
_exportClass("google.gadgets","Tabs",_IG_Tabs,["addTab",igt_d,"addDynamicTab",igt_e,"getSelectedTab",igt_k,"setSelectedTab",igt_l,"swapTabs",igt_m,"removeTab",igt_g,"getTabs",igt_o,"alignTabs",igt_p,"displayTabs",igt_j,"getHeaderContainer",function(){return this.g}]);
