window.IDICommon=window.IDICommon||{getHash:function(a){var b=a.indexOf("#")+1;return b?a.substr(b):""},htmlEscape:function(a){return/[&<>\"]/.test(a)?a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;"):a},makeIframeTag:function(a){var b="<iframe",d;for(d in a)b+=" "+d+'="'+IDICommon.htmlEscape(a[d])+'"';return b+"></iframe>"},getIframe:function(a,b){try{return a.frames[b]}catch(d){return null}},makeIframeNode:function(a){var b=document.createElement("iframe"),
d;for(d in a)b.setAttribute(d,a[d]);return b},appendHiddenIframe:function(a,b){setTimeout(function(){document.body.appendChild(IDICommon.makeIframeNode({id:a,name:a,src:b,width:0,height:0,frameBorder:0}))},0)},writeHiddenIframe:function(a,b){document.write(IDICommon.makeIframeTag({id:a,name:a,src:b,width:0,height:0,frameBorder:0}))},splitURIComponent:function(a,b){for(var d=[],k=a.length,g=0;g<k;){var e=a.substr(g,b),h=e.length;if(g+h<k)for(var f=1;f<3;++f)e.charAt(h-f)=="%"&&(e=e.substr(0,h-=f));
d.push(e);g+=h}return d},MAX_URL_LENGTH:4095,IDI_DEFAULT_POLLING_INTERVAL:1E3};window.IDIModule=window.IDIModule||function(){function a(a){if(window.parent!=window){for(var c;c=IDICommon.getIframe(window.parent,window.name+"_"+l);){try{if(c.location.href=="about:blank")break}catch(b){break}m+=IDICommon.getHash(c.location.href);++l}c=m.split("$");var d=c.length-1;if(d>0){m=c[d];for(var e=0;e<d;++e)a(decodeURIComponent(c[e]))}}}function b(){var a=window.location.href,c=IDICommon.getHash(a);if(!c&&a.charAt(a.length-1)=="#"&&window.parent!=window){for(;a=IDICommon.getIframe(window.parent,
window.name+"_"+l);)if(c+=IDICommon.getHash(a.location.href),++l,c.charAt(c.length-1)=="$")break;c.charAt(c.length-1)=="$"&&(c=c.substr(0,c.length-1))}if(c){c=c.split("&");for(a=0;a<c.length;++a){var b=c[a].split("=");if(b.length==2){var d=decodeURIComponent(b[0]),b=decodeURIComponent(b[1]);d.indexOf("up_")==0||d.indexOf("msg_")==0?n[d]=b:d=="idi_hr"&&(i=b)}}}}function d(){return n}function k(a){i=a}function g(a){if(i){for(var a=encodeURIComponent(a)+"$",c=IDICommon.MAX_URL_LENGTH-1-i.length,a=IDICommon.splitURIComponent(a,
c),c=a.length,b=0;b<c;++b)IDICommon.appendHiddenIframe(window.name+"_"+(f+b),i+"#"+a[b]);f+=c}}function e(b,c){j&&window.clearInterval(j);j=window.setInterval(function(){a(b)},typeof c=="object"&&c.pollingInterval||IDICommon.IDI_DEFAULT_POLLING_INTERVAL)}function h(){window.clearInterval(j);j=0}var f=0,l=0,m="",j=0,i="",n={};b();return{getPrefs:d,setHostRelayUrl:k,postMessageToHost:g,registerListener:e,unregisterListener:h}}();
function igmm_a(a,b){if(!a)throw Error("createDismissibleMessage(msg, opt_callback): msg is undefined or null");var c=this.b(a),d=document.createElement("td");d.width=10;var e=d.appendChild(document.createElement("span"));e.className=this.c("mmlib_xlink");e.onclick=igmm_(c,b);e.innerHTML="[x]";c.rows[0].appendChild(d);return c}
function igmm_b(a,b,c){if(a){if(typeof b=="undefined"||isNaN(b))throw Error("createTimerMessage(msg, seconds, opt_callback): seconds is undefined or NaN");}else throw Error("createTimerMessage(msg, seconds, opt_callback): msg is undefined or null");a=this.b(a);window.setTimeout(igmm_(a,c),b*1E3);return a}function igmm_c(a){if(!a)throw Error("createStaticMessage(msg): msg is undefined or null");return this.b(a)}function igmm_d(a){typeof a!="undefined"&&a&&igmm_(a)()}
function igmm_(a,b){return function(){if(!(typeof b=="function"&&b()==!1))try{a.parentNode.removeChild(a)}catch(c){}}}
function igmm_e(a){var b=document.createElement("table");b.id="mm_"+this.a+"_"+this.numMessages;b.className=this.c("mmlib_table");b.cellSpacing=0;b.cellPadding=0;this.numMessages++;var c=b.appendChild(document.createElement("tbody")),c=c.appendChild(document.createElement("tr")),c=c.appendChild(document.createElement("td"));if(typeof a=="object"&&a.parentNode&&a.parentNode.nodeType==1){var d=a.cloneNode(!0);a.style.display="none";d.id="";c.appendChild(d);a.parentNode.insertBefore(b,a.nextSibling)}else typeof a==
"object"?c.appendChild(a):c.innerHTML=a,this.d.appendChild(b);return b}function igmm_f(){var a="mm_"+this.a,b=_gel(a);if(!b){b=document.createElement("div");b.id=a;a=_getGadgetContainer(this.a);if(!a)throw Error("Cannot locate gadget container.  Are you missing a <body> tag?");a.insertBefore(b,a.firstChild)}return b}function igmm_g(a){return a+" "+a+this.a}
function _IG_MiniMessage(a,b){this.numMessages=0;this.a=a;this.d=null;this.createDismissibleMessage=igmm_a;this.createTimerMessage=igmm_b;this.createStaticMessage=igmm_c;this.dismissMessage=igmm_d;this.b=igmm_e;this.e=igmm_f;this.c=igmm_g;this.d=typeof b=="object"?b:this.e()}_IG_LoadCss(".mmlib_table {width: 100%;font: bold 9px arial,sans-serif;background-color: #fff4c2;border-collapse: separate;border-spacing: 0px;padding: 1px 0px;}.mmlib_xlink {font: normal 1.1em arial,sans-serif;font-weight: bold;color: #0000cc;cursor: pointer;}");
_exportClass("google.gadgets","MiniMessage",_IG_MiniMessage,["createDismissibleMessage",igmm_a,"createTimerMessage",igmm_b,"createStaticMessage",igmm_c,"dismissMessage",igmm_d]);

