var w_Ua=this;String.prototype.Zb=function(a){return this.indexOf(a)==0};String.prototype.Tb=function(a){var b=this.length-a.length;return b>=0&&this.lastIndexOf(a,b)==b};String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};String.prototype.subs=function(){var a=this;for(var b=0;b=0;c--){this[c+b]=this[c]}for(var d=0;d0)b+=", ";var d=String(a.arguments[c]);if(d.length>40){d=d.substr(0,40)+"..."}b+=d}b+=")\n";b+=w_9(a.caller);return b}catch(e){return"[Cannot get stack trace]: "+e+"\n"}}var w_va;var w_x=null,w_Z=false;function w_ta(){if((w_x==null||w_x.closed)&&!w_Z){try{w_Z=true;w_x=window.open("","debug","width=700,height=500,toolbar=no,resizable=yes,scrollbars=yes,left=16,top=16,screenx=16,screeny=16");w_x.blur();w_x.document.open();w_Z=false;var a= "To turn off this debugging window,hit 'D' inside the main caribou window, then close this window.
";w_$(a)}catch(b){}}}function w_ua(a,b){if(!w_aa){if(typeof w_k!="undefined"){w_k(w_ea(a))}return}try{var c=(new Date).getTime()-w_va,d="["+c+"] "+w_ea(a).replace(/\n/g,"
")+"
";if(b==1){d="Error: "+d+"";w_x.focus()}}catch(e){}w_$(d)}function w_$(a){if(!w_aa){return}try{w_ta();w_x.document.write(a);w_x.scrollTo(0,1000000)}catch(b){}} ;function w_S(a){if(a in w_Y){return w_Y[a]}return w_Y[a]=navigator.userAgent.toLowerCase().indexOf(a)!=-1}var w_Y={};function w_8(){return w_S("msie")&&!window.opera}function w_Za(a){if(typeof Error!="undefined"){throw new Error(a||"Assertion Failed");}else{throw a;}}function w_Ba(a){if(a===undefined)a="Assertion failed";if(typeof w_T!="undefined")w_T(a+"\n");w_Za(a)}function w_R(a,b){if(!a){if(b===undefined)b="Assertion failed";w_Ba(b)}};function w_la(a,b){a.style.display=b?"":"none"}function w_Ha(a, b){a.style.display=b?"block":"none"}function w_Ia(a,b){a.style.display=b?"inline":"none"}function w_l(a,b){if(a==null||a.className==null)return false;if(a.className==b){return true}var c=a.className.split(" ");for(var d=0;d/g;function w_ea(a){if(!a)return"";return a.replace(w_Pa,"&").replace(w_Xa,"<").replace(w_Wa,">").replace(w_Ya,""")}var w_Ya=/\"/g;function w_Ra(a){return document.getElementById(a)}function w_Sa(a){return document.all[a]}var w_Qa= document.getElementById?w_Ra:w_Sa;function w_k(a){try{if(window.parent!=window&&window.parent.log){window.parent.log(window.name+"::"+a);return}}catch(b){}var c=w_Qa("log");if(c){var d="

"+new Date+""+a+"

";c.innerHTML=d+c.innerHTML}else{window.status=a}};function w_g(){}w_g.raise=function(a){if(typeof Error!="undefined"){throw new Error(a||"Assertion Failed");}else{throw a;}};w_g.fail=function(a){if(a===undefined)a="Assertion failed";if(!(w_T===undefined))w_T(a+"\n");w_g.raise(a)};w_g.isTrue=function(a,b){if(!a){if(b===undefined)b="Assertion failed";w_g.fail(b)}};w_g.equals=function(a,b,c){if(a!=b){if(c===undefined){c="AS_Assert.equals failed: <"+a+"> != <"+b+">"}w_g.fail(c)}};w_g.typeOf=function(a,b,c){if(typeof a==b)return;if(a||a==""){try{if(b== w_g.TYPE_MAP[typeof a]||a instanceof b){return}}catch(d){}}if(c===undefined){if(typeof b=="function"){var e=b.toString().match(/^\s*function\s+([^\s\{]+)/);if(e)b=e[1]}c="AS_Assert.typeOf failed: <"+a+"> not typeof "+b}w_g.fail(c)};w_g.TYPE_MAP={string:String,number:Number,"boolean":Boolean};w_g.numArgs=function(a,b){var c=w_g.numArgs.caller;if(c&&c.arguments.length!=a){if(b===undefined){b=c.name+" expected "+a+" arguments but received "+c.arguments.length}w_g.fail(b)}};var w_X;function w_Ma(){var a=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];if(typeof XMLHttpRequest=="undefined"&&typeof ActiveXObject!="undefined"){for(var b=0;b"+c.stack);throw c;}};var w_Va=0,w_6=0;if("undefined"==typeof w_k){w_k=function(){}}function w_Ca(a){var b=-1;try{b=a.status}catch(c){}return b}function w_Da(a){var b=null;try{b=a.statusText}catch(c){}return b}function w_Ea(a,b,c,d){if(a.readyState==4){try{var e=true;if(d){try{e=!(false===d(a))}catch(f){w_k("Message ("+b+") handling failed: "+f);throw f;}}var g=w_Ca(a);if(200===g){w_k("Message ("+b+") received after "+((new Date).getTime()-c)+" ms");try{var h=(new Date).getTime();if(e&&a.responseText.length){eval(a.responseText)}w_k("Message ("+ b+") processing took "+((new Date).getTime()-h)+" ms")}catch(f){w_k("Message ("+b+") processing failed: "+f);alert(f+"\n"+f.stack+"\n\n"+a.responseText);throw f;}}else if(204==g){w_k("Message ("+b+") received after "+((new Date).getTime()-c)+" ms")}else{w_k("Message ("+b+") failed with response "+g+" "+w_Da(a)+" after "+((new Date).getTime()-c)+" ms.")}}finally{--w_6}}}function w_Fa(a,b,c){var d="";if(b){var e="";for(var f=0;f=0;){m=m.substring(0,n)+"&"+m.substring(n+1)}w_k("Message ("+i+") sent: POST "+m+".");++w_6;w_Na(j,a,d,k)};function w_j(a,b,c,d,e,f){this.instanceId=a;this.sectionId=b;this.markups=c;if(d){this.rootElement=d}if(e){this.data=e}if(f){this.n=f;if(!w_j.IsValidDisplayMode(f)){throw"bad display mode: "+f;}}else{this.n=w_j.DISPLAY_MODE_NONE}this.isNew=false}w_j.IsValidDisplayMode=function(a){return a==w_j.DISPLAY_MODE_SNIPPET||a==w_j.DISPLAY_MODE_FULL||a==w_j.DISPLAY_MODE_LAYOUT||a==w_j.DISPLAY_MODE_NONE};w_j.DISPLAY_MODE_FULL="displayModeFull";w_j.DISPLAY_MODE_SNIPPET="displayModeSnippet";w_j.DISPLAY_MODE_LAYOUT= "displayModeLayout";w_j.DISPLAY_MODE_NONE="displayModeNone";function w_b(a){this.ra=true;this.Aa=new w_w(this);this.c=a;this.s=null}w_b.DATA_NAMESPACE_PREFIX="data";w_b.ACTION_NAMESPACE_PREFIX="b";w_b.INTERPRET_ATTR_NAMESPACE_PREFIX="expr";w_b.prototype.Ga=function(){var a=this.c.rootElement;a.innerHTML="";if(this.A()==w_j.DISPLAY_MODE_LAYOUT){a.appendChild(this.M("layout"))}else{a.appendChild(this.M("main"))}return a};w_b.prototype.lb=function(a){this.s=a};w_b.prototype.h=function(){return this.c}; w_b.prototype.l=function(a){return document.getElementById(this.c.instanceId+"_"+a)};w_b.prototype.K=function(a){var b=this.l(a);if(!b){throw"did not find element for id "+a;}return b};w_b.prototype.j=function(){return this.c["data"]};w_b.prototype.ia=function(a){return this.c.data=a};w_b.prototype.Ya=function(){return this.c["isNew"]};w_b.prototype.kb=function(a){return this.c.isNew=a};w_b.prototype.M=function(a,b){var c=b;if(!c){c=this.j()}if(!c){c={}}var d=new w_i;d.z("widget",this.Na());d.Ba(c); var e=this.Z(a,d,w_i.DEFAULT_DICTIONARY_KEY);return this.Y(e,document)};w_b.prototype.Na=function(){var a={};a["type"]=this.s.e();a["instanceId"]=this.c.instanceId;a["sectionId"]=this.c.sectionId;a["actionUrl"]=w_.qa;var b=w_.vb+"&widgetType="+this.s.e()+"&widgetId="+this.c.instanceId+"&action="+w_.EDIT_WIDGET_ACTION;a["quickEditUrl"]=b;return a};w_b.prototype.Z=function(a,b,c){var d=this.Sa(a);w_g.isTrue(d!=null,"Markup chunk not found for "+a);var e=d.varName?d.varName:"",f=b.j(c);w_g.isTrue(f!= null,"No data found for call: "+c);b.z(e,f);var g=this.D(d.rootNode,b);b.fa(e);return g};w_b.prototype.D=function(a,b){w_g.isTrue(a!=null,"Null node");var c=a;if(a.attributes){var d=[],e=[];for(var f=0;f"+a["template"]+"\n",c=this.ab(b);a.parsedTemplate=this.C(c);return a};w_b.prototype.Eb=function(a,b,c){this.Ca(a,this.l(b),c)};w_b.prototype.Ca=function(a,b,c){var d=this.s;if(b){b[a]=function(e){return d[c](e)}}}; w_b.ConfigureWidget=function(a,b){if(!b){b="config"}var c=document.forms[b]["widgetId"].value,d=document.forms[b]["widgetType"].value,e=w_e.ProcessForm(document.forms[b],a);if(e.success){w_.SaveWidget(e.values,c,d)}};function w_(){}w_.Init=function(a,b,c){w_.w={};w_.vb=a;w_.qa=b;w_.dc=c;w_.xb=null;if(!w_.za){w_.za={}}};w_.TrapClicks=function(a){var b;try{b=a.document.getElementsByTagName("A")}catch(c){return}for(var d=0;d0&&a.substring(0,4)!="http"){a="http://"+a}return a};w_.GetFirstElementInElementWithClass=function(a,b){if(w_l(a,b)){return a}if(a){var c=a.childNodes.length;for(var d=0;db){return LayoutsMessages.NUMBER_TOO_LARGE+" "+b}return undefined}};function w_i(){this.k=[];for(var a in w_.xb){this.k[this.k.length]=a}}w_i.DEFAULT_DICTIONARY_KEY="";w_i.MAX_DICTIONARY_DEPTH=50;w_i.SEPARATOR_CHAR=".";w_i.prototype.z=function(a,b){if(this.k.length>=w_i.MAX_DICTIONARY_DEPTH){w_g.raise("Cannot add another dictionary: "+a)}if(a.indexOf(w_i.SEPARATOR_CHAR)> -1){w_g.raise("Cannot add dictionary name containing '.': "+a)}var c={};c.name=a;c.data=b;this.k[this.k.length]=c};w_i.prototype.fa=function(a){var b=this.k[this.k.length-1];if(b.name!=a){w_g.raise("Dictionary "+a+" is not the last one, and can't be deleted: "+b.name)}this.k.splice(this.k.length-1,1)};w_i.prototype.J=function(a){if(a==null)a=w_i.DEFAULT_DICTIONARY_KEY;for(var b=this.k.length-1;b>=0;--b){if(this.k[b].name==a){return this.k[b].data}}return null};w_i.prototype.W=function(){return this.J(w_i.DEFAULT_DICTIONARY_KEY)}; w_i.prototype.Ba=function(a){this.z(w_i.DEFAULT_DICTIONARY_KEY,a)};w_i.prototype.j=function(a){var b=this.J(a);if(b)return b;var c=a.split(w_i.SEPARATOR_CHAR);if(c.length==1){b=this.W();return b[a]}b=this.J(c[0]);var d=0;if(b){d=1}else{b=this.W()}for(var e=d;e0&&c[0].currentStyle){d=c[0].parentNode.currentStyle.color}for(var e=0;e"+e["title"]+"";c.appendChild(f)}};w_d.prototype.Oa=function(a){var b=this.c.rootElement.getElementsByTagName("A");for(var c in b){var d=b[c];if(d.href==a)return d.parentNode}};w_d.prototype.Za=function(a){var b=a.getElementsByTagName("UL");if(b.length>0&&!w_l(b[0],"posts")){return}var c=this.Qa(a),d=a.getElementsByTagName("LI"),e=d.length;return e-1};w_f.prototype.aa=function(a){a=a||window.event; var b=a.target||a.srcElement;this.a.r("nextposts",{path:b.href});return false};w_f.prototype.Ea=function(a){var b="";if(document.selection){b=document.selection.createRange().text}else if(window.getSelection){b=window.getSelection()}else if(document.getSelection){b=document.getSelection()}window.open(a+"?t="+encodeURIComponent(b)+"&u="+encodeURIComponent(window.location.href)+"&n="+encodeURIComponent(document.title),"bloggerForm","scrollbars=no,width=475,height=300,top=175,left=75,status=yes,resizable=yes"); return false};var _BlogView=w_f;function w_s(a){this.a=a;this.c=a.h()}w_s.WIDGET_TYPE_NAME="Image";w_s.prototype.b=function(){return this.a};w_s.prototype.e=function(){return w_s.WIDGET_TYPE_NAME};w_s.prototype.f=function(){return false};w_s.prototype.i=function(){if(this.c.data["resize"]!="true"){return}var a=this.a.l(this.c.instanceId+"_img"),b=this.c.rootElement;if(!a||!b){return}var c;if(document.defaultView){c=parseInt(document.defaultView.getComputedStyle(b,null).width,10)}else if(b.currentStyle){a.style.display="none";c= b.offsetWidth;a.style.display=""}else{return}if(a.width>c){a.height=Math.round(c/a.width*a.height);a.width=c}a.style.visibility="visible"};w_s.prototype.d=function(a,b){if(a=="configure"){this.a.g(b)}};w_s.prototype.p=function(){return this.c["data"]["sourceUrl"]&&this.c["data"]["sourceUrl"].length>0};var _ImageView=w_s;var w_2="changeImageLink",w_P="imageChoiceTable",w_E="imgUrlText",w_F="picDiv",w_1="bufferImage",w_h=null,w_I,w_G,w_J,w_H,w_A,w_v,_SIV_sectionWidth;function _SIV_setConfigurationOptions(){if(w_h==null){w_e.SetError(w_E,WidgetMessages.SIV_NO_IMAGE);return}var a=document.forms.config["widgetId"].value,b=_SIV_createConfigurationOptions(document.getElementById("title").value,document.getElementById("imageCaption").value);w_.SaveWidget(b,a,w_s.WIDGET_TYPE_NAME)}function _SIV_createConfigurationOptions(a, b){var c=document.forms.config["securityToken"].value;if(w_h==null){return}var d=w_h.src;d=w_.MaybePrependHttp(d);var e=w_h.height,f=w_h.width;if(w_G!=""&&w_v==-1){w_v=e}if(w_I!=""&&w_A==-1){if(w_H_SIV_sectionWidth){e= (e*_SIV_sectionWidth/f).toFixed();f=_SIV_sectionWidth}}}else{if(w_I!=""){d=w_I;f=w_J;e=w_A}}var i={sourceUrl:d,height:e,width:f,shrinkToFit:h,securityToken:c,uploadedPhotoUrl:w_I,uploadedPhotoWidth:w_J,uploadedPhotoHeight:w_A,resizedPhotoUrl:w_G,resizedPhotoWidth:w_H,resizedPhotoHeight:w_v,sectionWidth:_SIV_sectionWidth};if(a){i["title"]=a}if(b){i["caption"]=b}return i}function _SIV_preloadImageFromWeb(){var a=document.getElementById(w_E),b=a.value;if(!b||b.length==0||b=="http://"){return}if(b.substring(0, 4)!="http"){b="http://"+b}_SIV_startAnimation();_SIV_preLoadImage(b)}var w_3,w_4;function _SIV_imgUrlTextOnKeyUp(a,b){var c=a||window.event;if(c.keyCode==9)return;document.getElementById("fromWeb").checked="true";if(w_4!=null){window.clearTimeout(w_4)}w_4=window.setTimeout(function(){var d=document.getElementById(w_E).value;if(w_3!=d.toLowerCase()){_SIV_preloadImageFromWeb();w_3=d.toLowerCase();_SIV_resetUploadedPhotoMetadata()}},1000)}function _SIV_startAnimation(){var a=document.getElementById("picImg"); a.src="img/icon_inprogress.gif";a.style.width="200px";a.style.height="200px";document.getElementById(w_F).style.height=a.style.height;_SIV_makeVisible(w_F);_SIV_makeInvisible(w_P)}function _SIV_stopAnimation(){_SIV_makeInvisible(w_F);_SIV_makeVisible(w_P);_SIV_makeInvisible(w_2)}function _SIV_processUploadedImage(a,b,c,d){w_I=a;w_G=b;w_J=c;w_H=d;w_A=-1;w_v=-1;_SIV_preLoadImage(b)}var w_5=0;function _SIV_preLoadImage(a,b){if(typeof b=="undefined")b=true;var c=document.getElementById(w_1),d;if(b){d= c.onLoad}c.onload=function(){_SIV_imgOnLoad(d)};c.onerror=_SIV_imgOnError;c.src=a}function _SIV_changeImage(a){_SIV_makeVisible(w_P);_SIV_makeInvisible(w_F);a.style.display="none";document.getElementById(w_E).value="http://";w_h=null;var b=document.getElementById("uploadFrame").contentWindow;b.location.href=b.location.href}function _SIV_imgOnLoad(a){w_5=0;w_h=document.getElementById(w_1);w_e.ClearError(w_E);var b=document.getElementById("picImg");if(w_h.width<300&&w_h.height<300){b.style.height=_SIV_px(w_h.height); b.style.width=_SIV_px(w_h.width)}else if(w_h.height>w_h.width){b.style.height=_SIV_px(300);b.style.width=_SIV_px(300*w_h.width/w_h.height)}else{b.style.width=_SIV_px(300);b.style.height=_SIV_px(300*w_h.height/w_h.width)}b.margin=5;document.getElementById(w_F).style.height=_SIV_px(b.height);b.src=w_h.src;_SIV_makeVisible(w_F);_SIV_makeInvisible(w_P);_SIV_makeVisible(w_2);if(typeof a=="function"){a()}}function _SIV_imgOnError(){if(w_5++<2){window.setTimeout(function(){_SIV_preLoadImage(document.getElementById(w_1).src, false)},2000);return}w_5=0;w_e.SetError(w_E,WidgetMessages.SIV_INVALID_URL);_SIV_makeInvisible(w_F);_SIV_makeVisible(w_P);_SIV_makeInvisible(w_2)}function _SIV_initializeWindow(a,b,c,d,e,f,g){w_I=a;w_J=b;w_A=c;w_G=d;w_H=e;w_v=f;_SIV_sectionWidth=g;var h=document.getElementById(w_E);if(h.value!=""){_SIV_preloadImageFromWeb();w_3=h.value;document.getElementById("title").focus()}}function _SIV_initFrame(){var a=document.getElementById("uploadFrame");a.height=a.contentWindow.document.body.scrollHeight; a.allowTransparency=true}function _SIV_px(a){return Math.round(a)+"px"}function _SIV_makeVisible(a){document.getElementById(a).style.display="block"}function _SIV_makeInvisible(a){document.getElementById(a).style.display="none"}function _SIV_resetUploadedPhotoMetadata(){w_I="";w_G="";w_J=-1;w_H=-1;w_A=-1;w_v=-1}function _SIV_hasLoadedImage(){return w_h}function _SIV_fromPCTabHandler(a){var b=a||window.event;if(b.keyCode==9&&!b.shiftKey){w_ka(document.getElementById("uploadFrame")).getElementById("imageFileName").focus(); return false}return true}function _SIV_fromWebTabHandler(a){var b=a||window.event;if(b.keyCode==9&&b.shiftKey){w_ka(document.getElementById("uploadFrame")).getElementById("imageFileName").focus();return false}return true}function w_ka(a){var b=a.contentWindow||a.contentDocument;if(b.document){b=b.document}return b};function w_m(a){this.a=a;this.c=a.h()}w_m.WIDGET_TYPE_NAME="Header";w_m.prototype.e=function(){return w_m.WIDGET_TYPE_NAME};w_m.prototype.f=function(){return false};w_m.prototype.b=function(){return this.a};w_m.prototype.d=function(a,b){this.a.g(b)};w_m.FilterMap={title:w_e.GetRequiredStringFilter(),description:null,imagePlacement:null,useImage:null,securityToken:null};w_m.ConfigureWidget=function(){var a;if(_SIV_hasLoadedImage()){a=_SIV_createConfigurationOptions()}var b=document.forms["config"]["widgetId"].value, c=document.forms["config"]["widgetType"].value,d=w_e.ProcessForm(document.forms["config"],w_m.FilterMap);if(d.success){for(var e in a){d.values[e]=a[e]}w_.SaveWidget(d.values,b,c);return true}else{return false}};w_m.hideImageOptions=function(){document.getElementById("imageOptions").style.display="none";return false};w_m.showImageOptions=function(){document.getElementById("imageOptions").style.display="";return false};w_m.removeImage=function(a){_SIV_makeInvisible("imagePlacementTable");_SIV_changeImage(a); _SIV_resetUploadedPhotoMetadata()};var _HeaderView=w_m;_HeaderView.prototype=w_m.prototype;_HeaderView._ConfigureWidget=_HeaderView.ConfigureWidget;_HeaderView._hideImageOptions=_HeaderView.hideImageOptions;_HeaderView._showImageOptions=_HeaderView.showImageOptions;_HeaderView._removeImage=_HeaderView.removeImage;function w_p(a,b){this.a=a;this.c=a.h();this.ac=b}w_p.prototype.b=function(){return this.a};w_p.prototype.e=function(){return this.ac};w_p.prototype.d=function(a,b){if(a=="configure"){this.a.g(b)}};w_p.prototype.p=function(){return this.c.data["content"]&&this.c.data["content"].length>0};w_p.ConfigureWidget=function(a){setFormAndSubmit();var b=document.forms.stuffform["widgetId"].value,c=document.forms.stuffform["securityToken"].value,d=document.getElementById("hiddenTextarea"),e=document.getElementById("title"), f={content:d.value,title:e.value,securityToken:c};w_.SaveWidget(f,b,a)};function w_W(a){w_p.call(this,a,"Text")}w_W.inherits(w_p);w_W.ConfigureWidget=function(){w_p.ConfigureWidget("Text")};function w_V(a){w_p.call(this,a,"HTML")}w_V.inherits(w_p);w_V.ConfigureWidget=function(){w_p.ConfigureWidget("HTML")};var _TextView=w_W;_TextView.prototype=w_W.prototype;_TextView._ConfigureWidget=_TextView.ConfigureWidget;var _HTMLView=w_V;_HTMLView.prototype=w_V.prototype;_HTMLView._ConfigureWidget=_HTMLView.ConfigureWidget;function w_qa(a){document.write('