window.IDICommon=window.IDICommon||function(){return{getHash:function(b){var d=b.indexOf("#")+1;return d?b.substr(d):""},htmlEscape:function(b){return/[&<>\"]/.test(b)?b.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;"):b},makeIframeTag:function(b){var d="<iframe";for(var f in b)d+=" "+f+'="'+IDICommon.htmlEscape(b[f])+'"';return d+"></iframe>"},getIframe:function(b,d){try{return b.frames[d]}catch(f){return null}},makeIframeNode:function(b){var d=document.createElement("iframe");
for(var f in b)d.setAttribute(f,b[f]);return d},appendHiddenIframe:function(b,d){setTimeout(function(){document.body.appendChild(IDICommon.makeIframeNode({id:b,name:b,src:d,width:0,height:0,frameBorder:0}))},0)},writeHiddenIframe:function(b,d){document.write(IDICommon.makeIframeTag({id:b,name:b,src:d,width:0,height:0,frameBorder:0}))},splitURIComponent:function(b,d){for(var f=[],n=b.length,j=0;j<n;){var h=b.substr(j,d),k=h.length;if(j+k<n)for(var i=1;i<3;++i)if(h.charAt(k-i)=="%")h=h.substr(0,k-=
i);f.push(h);j+=k}return f},MAX_URL_LENGTH:4095,IDI_DEFAULT_POLLING_INTERVAL:1E3}}();window.IDIModule=window.IDIModule||function(){function b(c){if(window.parent!=window){for(var a;a=IDICommon.getIframe(window.parent,window.name+"_"+o);){try{if(a.location.href=="about:blank")break}catch(e){break}p+=IDICommon.getHash(a.location.href);++o}a=p.split("$");var g=a.length-1;if(g>0){p=a[g];for(var q=0;q<g;++q)c(decodeURIComponent(a[q]))}}}function d(){var c=window.location.href,a=IDICommon.getHash(c);if(!a&&c.charAt(c.length-1)=="#"&&window.parent!=window){for(;c=IDICommon.getIframe(window.parent,
window.name+"_"+o);){a+=IDICommon.getHash(c.location.href);++o;if(a.charAt(a.length-1)=="$")break}if(a.charAt(a.length-1)=="$")a=a.substr(0,a.length-1)}if(a){a=a.split("&");for(c=0;c<a.length;++c){var e=a[c].split("=");if(e.length==2){var g=decodeURIComponent(e[0]);e=decodeURIComponent(e[1]);if(g.indexOf("up_")==0||g.indexOf("msg_")==0)r[g]=e;else if(g=="idi_hr")l=e}}}}function f(){return r}function n(c){l=c}function j(c){if(l){c=encodeURIComponent(c)+"$";var a=IDICommon.MAX_URL_LENGTH-1-l.length;
c=IDICommon.splitURIComponent(c,a);a=c.length;for(var e=0;e<a;++e)IDICommon.appendHiddenIframe(window.name+"_"+(i+e),l+"#"+c[e]);i+=a}}function h(c,a){m&&window.clearInterval(m);m=window.setInterval(function(){b(c)},typeof a=="object"&&a.pollingInterval||IDICommon.IDI_DEFAULT_POLLING_INTERVAL)}function k(){window.clearInterval(m);m=0}var i=0,o=0,p="",m=0,l="",r={};d();return{getPrefs:f,setHostRelayUrl:n,postMessageToHost:j,registerListener:h,unregisterListener:k}}();
function igmm_a(a,b){if(!a)throw Error("createDismissibleMessage(msg, opt_callback): msg is undefined or null");a=this.b(a);var c=document.createElement("td");c.width=10;var d=c.appendChild(document.createElement("span"));d.className=this.c("mmlib_xlink");d.onclick=igmm_(a,b);d.innerHTML="[x]";a.rows[0].appendChild(c);return a}
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")if(b()==false)return;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(true);a.style.display="none";d.id="";c.appendChild(d);a.parentNode.insertBefore(b,a.nextSibling)}else{if(typeof a==
"object")c.appendChild(a);else 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]);
