/* Copyright 2008 Google Inc. All Rights Reserved. */ (function(){var global=this;if(!Function.prototype.apply)Function.prototype.apply=function(a,b){var c=[];a||(a=global);b=b||[];for(var d=0;d<b.length;d++)c[d]="args["+d+"]";c="oScope.__applyTemp__.peek()("+c.join(",")+");";if(!a.__applyTemp__)a.__applyTemp__=[];a.__applyTemp__.push(this);c=eval(c);a.__applyTemp__.pop();return c};if(!Array.prototype.push)Array.prototype.push=function(){for(var a=0;a<arguments.length;a++)this[this.length]=arguments[a];return this.length};
if(!Array.prototype.pop)Array.prototype.pop=function(){if(this.length){var a=this[this.length-1];this.length--;return a}};Array.prototype.peek=function(){return this[this.length-1]};if(!Array.prototype.shift)Array.prototype.shift=function(){if(this.length!=0){for(var a=this[0],b=0;b<this.length-1;b++)this[b]=this[b+1];this.length--;return a}};
if(!Array.prototype.unshift)Array.prototype.unshift=function(){for(var a=arguments.length,b=this.length-1;b>=0;b--)this[b+a]=this[b];for(b=0;b<a;b++)this[b]=arguments[b];return this.length};if(!Array.prototype.forEach)Array.prototype.forEach=function(a,b){for(var c=0;c<this.length;c++)a.call(b,this[c],c,this)};
function bind(a,b){var c=a.boundArgs_||[];c=c.concat(Array.prototype.slice.call(arguments,2));if(typeof a.boundSelf_!="undefined")b=a.boundSelf_;if(typeof a.boundFn_!="undefined")a=a.boundFn_;var d=function(){var g=c.concat(Array.prototype.slice.call(arguments));return a.apply(b,g)};d.boundArgs_=c;d.boundSelf_=b;d.boundFn_=a;return d}Function.prototype.bind=function(a){return bind.apply(null,[this,a].concat(Array.prototype.slice.call(arguments,1)))};var DB_mode=false;function DumpError(a){try{throw a;}catch(b){DumpException(b)}}
function DumpException(a,b){b="Javascript exception: "+(b?b:"")+" "+a;if(BR_AgentContains_("msie")&&!window.opera)b+=" "+a.name+": "+a.message+" ("+a.number+")";var c="";if(typeof a=="string")c=a+"\n";else for(var d in a)try{c+=d+": "+a[d]+"\n"}catch(g){}c+=DB_GetStackTrace(DumpException.caller);a=b+"\n"+c;if(DB_mode){try{var e=(new Date).getTime()-DB_starttime,f="["+e+"] "+HtmlEscape(a).replace(/\n/g,"<br>")+"<br>";f="<font color=#ff0000><b>Error: "+f+"</b></font>";DB_win.focus()}catch(h){}DB_WriteDebugHtml(f)}else typeof log!=
"undefined"&&log(HtmlEscape(a))}var function_name_re_=/function (\w+)/;
function DB_GetStackTrace(a){try{if(!(BR_AgentContains_("msie")&&!window.opera)&&!(BR_AgentContains_("safari")||BR_AgentContains_("konqueror"))&&BR_AgentContains_("mozilla"))return Error().stack;if(!a)return"";var b;var c=function_name_re_.exec(String(a));b=c?c[1]:"";b="- "+b+"(";for(c=0;c<a.arguments.length;c++){if(c>0)b+=", ";var d=String(a.arguments[c]);if(d.length>40)d=d.substr(0,40)+"...";b+=d}b+=")\n";b+=DB_GetStackTrace(a.caller);return b}catch(g){return"[Cannot get stack trace]: "+g+"\n"}}
var DB_starttime,DB_win=null,DB_winopening=false;
function DB_WriteDebugHtml(a){if(DB_mode)try{if((DB_win==null||DB_win.closed)&&!DB_winopening)try{DB_winopening=true;DB_win=window.open("","debug","width=700,height=500,toolbar=no,resizable=yes,scrollbars=yes,left=16,top=16,screenx=16,screeny=16");DB_win.blur();DB_win.document.open();DB_winopening=false;var b="<font color=#ff0000><b>To turn off this debugging window,hit 'D' inside the main caribou window, then close this window.</b></font><br>";DB_WriteDebugHtml(b)}catch(c){}DB_win.document.write(a);DB_win.scrollTo(0,
1000000)}catch(d){}};function BR_AgentContains_(a){if(a in BR_AgentContains_cache_)return BR_AgentContains_cache_[a];return BR_AgentContains_cache_[a]=navigator.userAgent.toLowerCase().indexOf(a)!=-1}var BR_AgentContains_cache_={};function HasClass(a,b){if(a==null||a.className==null)return false;if(a.className==b)return true;a=a.className.split(" ");for(var c=0;c<a.length;c++)if(a[c]==b)return true;return false}
function RemoveClass(a,b){if(a.className!=null)if(a.className==b)a.className="";else{for(var c=a.className.split(" "),d=[],g=false,e=0;e<c.length;e++)if(c[e]!=b)c[e]&&d.push(c[e]);else g=true;if(g)a.className=d.join(" ")}}var amp_re_=/&/g,lt_re_=/</g,gt_re_=/>/g;function HtmlEscape(a){if(!a)return"";return a.replace(amp_re_,"&amp;").replace(lt_re_,"&lt;").replace(gt_re_,"&gt;").replace(quote_re_,"&quot;")}var quote_re_=/\"/g;function forid_1(a){return document.getElementById(a)}
function forid_2(a){return document.all[a]}var forid=document.getElementById?forid_1:forid_2;function log(a){try{if(window.parent!=window&&window.parent.log){window.parent.log(window.name+"::"+a);return}}catch(b){}var c=forid("log");if(c){a="<p class=logentry><span class=logdate>"+new Date+"</span><span class=logmsg>"+a+"</span></p>";c.innerHTML=a+c.innerHTML}else window.status=a};function AS_Assert(){}AS_Assert.raise=function(a){if(typeof Error!="undefined")throw new Error(a||"Assertion Failed");else throw a;};AS_Assert.fail=function(a){a=a||"Assertion failed";typeof DumpError!="undefined"&&DumpError(a+"\n");AS_Assert.raise(a)};AS_Assert.isTrue=function(a,b){if(!a){if(b===undefined)b="Assertion failed";AS_Assert.fail(b)}};AS_Assert.equals=function(a,b,c){if(a!=b){if(c===undefined)c="AS_Assert.equals failed: <"+a+"> != <"+b+">";AS_Assert.fail(c)}};
AS_Assert.typeOf=function(a,b,c){if(typeof a!=b){if(a||a=="")try{if(b==AS_Assert.TYPE_MAP[typeof a]||a instanceof b)return}catch(d){}if(c===undefined){if(typeof b=="function")if(c=b.toString().match(/^\s*function\s+([^\s\{]+)/))b=c[1];c="AS_Assert.typeOf failed: <"+a+"> not typeof "+b}AS_Assert.fail(c)}};AS_Assert.TYPE_MAP={string:String,number:Number,"boolean":Boolean};
AS_Assert.numArgs=function(a,b){var c=AS_Assert.numArgs.caller;if(c&&c.arguments.length!=a){if(b===undefined)b=c.name+" expected "+a+" arguments  but received "+c.arguments.length;AS_Assert.fail(b)}};Function.prototype.bind=function(a){if(typeof this!="function")throw new Error("Bind must be called as a method of a function object.");var b=this,c=Array.prototype.splice.call(arguments,1,arguments.length);return function(){for(var d=c.concat(),g=0;g<arguments.length;g++)d.push(arguments[g]);return b.apply(a,d)}};var listen,unlisten,unlistenByKey;
(function(){var a={},b=0;function c(e){if(e.listen_hc_==null)e.listen_hc_=++b;return e.listen_hc_}function d(e,f,h,i){e=c(e);h=c(h);i=!!i;return f=e+"_"+f+"_"+h+"_"+i}listen=function(e,f,h,i){var j=d(e,f,h,i);if(j in a)return j;var k=g.bind(null,j);a[j]={listener:h,proxy:k,event:f,node:e,useCapture:i};if(e.addEventListener)e.addEventListener(f,k,i);else if(e.attachEvent)e.attachEvent("on"+f,k);else throw new Error("Node {"+e+"} does not support event listeners.");return j};unlisten=function(e,f,h,
i){e=d(e,f,h,i);return unlistenByKey(e)};unlistenByKey=function(e){if(!(e in a))return false;var f=a[e],h=f.proxy,i=f.event,j=f.node;f=f.useCapture;if(j.removeEventListener)j.removeEventListener(i,h,f);else j.detachEvent&&j.detachEvent("on"+i,h);delete a[e];return true};function g(e){var f=Array.prototype.splice.call(arguments,1,arguments.length);return a[e].listener.apply(null,f)}})();function Point(a,b,c){this.x=a;this.y=b;this.coordinateFrame=c||null}Point.prototype.toString=function(){return"[P "+this.x+","+this.y+"]"};function Delta(a,b){this.dx=a;this.dy=b}Delta.prototype.toString=function(){return"[D "+this.dx+","+this.dy+"]"};function Rect(a,b,c,d,g){this.x=a;this.y=b;this.w=c;this.h=d;this.coordinateFrame=g||null}Rect.prototype.contains=function(a){return this.x<=a.x&&a.x<this.x+this.w&&this.y<=a.y&&a.y<this.y+this.h};
Rect.prototype.toString=function(){return"[R "+this.w+"x"+this.h+"+"+this.x+"+"+this.y+"]"};var XH_ieProgId_,JSCompiler_inline_XH_ACTIVE_X_IDENTS_23=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];
if(typeof XMLHttpRequest=="undefined"&&typeof ActiveXObject!="undefined"){for(var JSCompiler_inline_i$$26_24=0;JSCompiler_inline_i$$26_24<JSCompiler_inline_XH_ACTIVE_X_IDENTS_23.length;JSCompiler_inline_i$$26_24++){var JSCompiler_inline_candidate_25=JSCompiler_inline_XH_ACTIVE_X_IDENTS_23[JSCompiler_inline_i$$26_24];try{new ActiveXObject(JSCompiler_inline_candidate_25);XH_ieProgId_=JSCompiler_inline_candidate_25;break}catch(JSCompiler_inline_e$$12_26){}}if(!XH_ieProgId_)throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed.");
};if("undefined"==typeof log)log=function(){};var DW_sidebarXmlHttp=undefined;
function DW_toggleSidebar(a,b,c){a:{for(b=b;b;){if(HasClass(b,"collapse")){RemoveClass(b,"collapse");b=b;var d="expand";HasClass(b,d)||(b.className+=" "+d);b=true;break a}if(HasClass(b,"expand")){RemoveClass(b,"expand");b=b;d="collapse";HasClass(b,d)||(b.className+=" "+d);b=false;break a}b=b.parentNode}b=void 0}a=a;d=c;if(d!="None"){b=b?1:0;DW_sidebarXmlHttp=XH_ieProgId_?new ActiveXObject(XH_ieProgId_):new XMLHttpRequest;c="/p/"+a+"/w/setSidebarPref.do";b="expanded="+b+"&token="+d;a=DW_sidebarXmlHttp;
b=b;d=DW_setSidebarCallback;a.open("POST",c,true);a.onreadystatechange=d;a.setRequestHeader("Content-Type","application/x-www-form-urlencoded");a.setRequestHeader("Content-Length",b.length);try{a.send(b)}catch(g){log("XMLHttpSend failed "+g.toString()+"<br>"+g.stack);throw g;}}}function DW_setSidebarCallback(){DW_sidebarXmlHttp.readyState==4&&DW_sidebarXmlHttp.status==200&&DW_gotSidebar(DW_sidebarXmlHttp.responseText)}
function DW_gotSidebar(a){try{eval("_d="+a)}catch(b){alert("DW: error parsing response of wiki sidebar")}}var DW_cancelBubble=false;function DW_cancelBubbling(){DW_cancelBubble=true}function DW_controlledUL(a){for(var b=a.nextSibling;b&&b.tagName!="LI"&&b.tagName!="UL";)b=b.nextSibling;if(!b||b.tagName=="LI")for(b=a.firstChild;b&&b.tagName!="UL";)b=b.nextSibling;return b}
function DW_toggleTree(a){if(!a)a=window.event;a.cancelBubble=true;a.stopPropagation&&a.stopPropagation();if(!DW_cancelBubble){var b;if(a.target)b=a.target;else if(a.srcElement)b=a.srcElement;if(a=DW_controlledUL(b))if(this.className=="treeopen"){b.className="";a.className=""}else{b.className="treeopen";a.className="treeleafcontainer"}}}var DW_currentlyViewedLink=undefined;
function DW_setUpTree(a){if(a)for(a=a.firstChild;a;){if(a.tagName=="LI"){for(var b=a.firstChild;b&&b.tagName!="A";)b=b.nextSibling;if(b&&b.tagName=="A"){b.onclick=DW_cancelBubbling;if(document.location.href.split("?")[0]==b.href)DW_currentlyViewedLink=b}if(b=DW_controlledUL(a)){a.onclick=DW_toggleTree;DW_setUpTree(b)}else a.className="treeleaf"}a=a.nextSibling}}DW_setUpTree(DW_controlledUL(document.getElementById("sidebarcontainer")));
if(DW_currentlyViewedLink){DW_currentlyViewedLink.className="currentpagelink";for(var JSCompiler_inline_parent$$3_46=DW_currentlyViewedLink.parentNode.parentNode;JSCompiler_inline_parent$$3_46&&JSCompiler_inline_parent$$3_46.tagName=="UL";){JSCompiler_inline_parent$$3_46.className="treeleafcontainer";for(var JSCompiler_inline_prevItem_47=JSCompiler_inline_parent$$3_46.previousSibling;JSCompiler_inline_prevItem_47&&JSCompiler_inline_prevItem_47.tagName!="LI";)JSCompiler_inline_prevItem_47=JSCompiler_inline_prevItem_47.previousSibling;
if(JSCompiler_inline_prevItem_47&&JSCompiler_inline_prevItem_47.tagName=="LI")JSCompiler_inline_prevItem_47.className="treeopen";JSCompiler_inline_parent$$3_46=JSCompiler_inline_parent$$3_46.parentNode}var JSCompiler_inline_parent$$4_51=DW_currentlyViewedLink.parentNode;if(!JSCompiler_inline_parent$$4_51.className){var JSCompiler_inline_nextUL$$2_52=DW_controlledUL(JSCompiler_inline_parent$$4_51);if(JSCompiler_inline_nextUL$$2_52){JSCompiler_inline_parent$$4_51.className="treeopen";JSCompiler_inline_nextUL$$2_52.className=
"treeleafcontainer"}}}_DW_toggleSidebar=DW_toggleSidebar;_toggleTree=DW_toggleTree;})()
