

window.glamMetricsData = 'pubId=' + encodeURIComponent(window.glam_affiliate_id ? window.glam_affiliate_id : '104510405')
   + '&pv=' + encodeURIComponent(window.atakoOrd ? window.atakoOrd : (window.GlamGetPageViewIdN ? window.GlamGetPageViewIdN() : 0))
   + '&sess=' + encodeURIComponent(window.GlamGetSessionId ? window.GlamGetSessionId() : 0)
   + '&adId=' + encodeURIComponent(window.atakoCurrentAdId ? window.atakoCurrentAdId : 13894)
   + '&idType=' + encodeURIComponent(window.atakoCurrentIdType ? window.atakoCurrentIdType : (window.atakoCurrentAdId ? 'd' : 'i'))
   + '&adTile=' + encodeURIComponent(window.GlamGetAdTile ? window.GlamGetAdTile() : 0);
if (window.GlamGetGeoData) {
    window.glamMetricsData += '&cc=' + encodeURIComponent(window.GlamGetGeoData("country_code")) + "&rc=" + encodeURIComponent(window.GlamGetGeoData("region_code"));
}
if (window.glamMetricsExtra) {
    window.glamMetricsData += window.glamMetricsExtra;
}



// Mariah Carey Swimsuit (420801215)
if (window.atakoH && atakoH[0] == '..') {
 //no-op
} else {
  if (!window.atakoH)
     window.atakoH = location.href.substr(location.href.indexOf('#') + 1).split('&');
  if (atakoH[0] == '..') { 
    try {
      parent.parent.gadgets.rpc.receive(atakoH);
    } catch (e) {
        if (window.console) console.log("receive failed " + e);
    }        
  } else {          
if (!window.glamGadgets) {
    
    document.write("<div id='gadgetsRpcAnchor'></div>");
    document.write("<scr" + "ipt type='text/javascript' src='http://www24a.glam.com/shindig/gadgets/js/pubsub:glam.ads:glam.metrics?c=1'></scr" + "ipt>");
    
    document.write("<scr" + "ipt type='text/javascript' src='http://www24a.glam.com/shindig/gadgets/files/container/cookies.util.opt.js'></scr" + "ipt>");
    document.write("<scr" + "ipt type='text/javascript' src='http://www24a.glam.com/appdir/resources/gadgets.opt.js'></scr" + "ipt>");


    window.glamGadgets = [];
}

window.glamGadgets.push(function() {
    var gadgetParams = {specUrl: 'http://www25.glam.com/files/gadget-store/420801215/glam_polls.xml', 
        //debug : 1,
        extUrl: 'http://www25.glam.com/files/gadget-store/420801215/glam_polls.xml'};

    var appParams = '';
    if (appParams) { //sent by container.requestNavigateTo
        var viewParams = {};
        var pairs = appParams.split('&');
        for (var i=0; i<pairs.length; i++) {
          var pair=pairs[i].split('=');
          viewParams[pair[0]] = decodeURIComponent(pair[1]);
        }
        gadgetParams.viewParams = viewParams;
    }
        
    var gadget = gadgets.container.createGadget(gadgetParams);
    gadget.setServerBase("http://www24.glam.com/shindig/gadgets/");
    gadget.rpcRelayUrl = "http://www24.glam.com/rpc_relay.html";
    gadget.secureToken = escape("55265224::420801215:shindig:http%3A%2F%2Fwww25.glam.com%2Ffiles%2Fgadget-store%2F420801215%2Fglam_polls.xml:48167093667345");
    gadget.appId = 420801215;
    gadget.userId = '';
    gadget.installId = 13894;
    gadget.installedUserPrefs = {"$name":"Mariah Carey Swimsuit","$width":"500","$height":"500"};
    gadget.height = 500;
    gadget.width = 500;
    gadget.viewOrigin = '';
    gadget.canvasUrl = 'http://www24.glam.com/appdir/resources/canvas.html';
    gadget.configUrl = 'http://www24.glam.com/appdir/resources/config.html';
    gadget.gsUrl = "http://www24.glam.com/appdir";
    gadget.mid = "48167093667345";
    gadget.isConfig = "";
    gadget.developerId = 339630447;
    gadget.publisherId = 104510405;
    gadget.view = "profile";
    gadget.hashData = glamMetricsData; // XXX not safe
    
    gadget.hasInline = '1';
    gadget.inlineContent = '<script type=\'text/javascript\' >gadgets.setGadgetGlobals(\'48167093667345\', function() { var MODULE_ID = \'48167093667345\'; var gadgets={};;\nvar gadgets=gadgets||{};\ngadgets.config=function(){var A={};\nreturn{register:function(D,C,B){if(A[D]){throw new Error(\'Component "\'+D+\'" is already registered.\')\n}A[D]={validators:C||{},callback:B}\n},get:function(B){if(B){if(!A[B]){throw new Error(\'Component "\'+B+\'" not registered.\')\n}return configuration[B]||{}\n}return configuration\n},init:function(H,G){configuration=H;\nfor(var F in A){if(A.hasOwnProperty(F)){var E=A[F],D=H[F],B=E.validators;\nif(!G){for(var C in B){if(B.hasOwnProperty(C)){if(!B[C](D[C])){throw new Error(\'Invalid config value "\'+D[C]+\'" for parameter "\'+C+\'" in component "\'+F+\'"\')\n}}}}if(E.callback){E.callback(H)\n}}}},EnumValidator:function(E){var D=[];\nif(arguments.length>1){for(var C=0,B;\nB=arguments[C];\n++C){D.push(B)\n}}else{D=E\n}return function(G){for(var F=0,H;\nH=D[F];\n++F){if(G===D[F]){return true\n}}}\n},RegExValidator:function(B){return function(C){return B.test(C)\n}\n},ExistsValidator:function(B){return typeof B!=="undefined"\n},NonEmptyStringValidator:function(B){return typeof B==="string"&&B.length>0\n},BooleanValidator:function(B){return typeof B==="boolean"\n},LikeValidator:function(B){return function(D){for(var E in B){if(B.hasOwnProperty(E)){var C=B[E];\nif(!C(D[E])){return false\n}}}return true\n}\n}}\n}();;\n{{var css={\'properties\':(function(){var c=[/^\\s*inherit\\s+$/i,/^\\s*(?:#(?:[0-9a-f]{3}){1,2}|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|purple|red|silver|teal|white|yellow|transparent|inherit)\\s+$/i,/^\\s*(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|inherit)\\s+$/i,/^\\s*(?:thin|medium|thick|0|[+-]?\\d+(?:\\.\\d+)?(?:em|ex|px|in|cm|mm|pt|pc)|inherit)\\s+$/i,/^\\s*(?:none|inherit)\\s+$/i,/^\\s*(?:url\\("[^\\(\\)\\\\\\"\\r\\n]+"\\)|none|inherit)\\s+$/i,/^\\s*(?:0|[+-]?\\d+(?:\\.\\d+)?(?:em|ex|px|in|cm|mm|pt|pc)|0|(?:\\d+(?:\\.\\d+)?)%|auto|inherit)\\s+$/i,/^\\s*(?:0|(?:\\d+(?:\\.\\d+)?)(?:em|ex|px|in|cm|mm|pt|pc)|0|[+-]?\\d+(?:\\.\\d+)?%|none|inherit)\\s+$/i,/^\\s*(?:0|(?:\\d+(?:\\.\\d+)?)(?:em|ex|px|in|cm|mm|pt|pc)|0|[+-]?\\d+(?:\\.\\d+)?%|inherit)\\s+$/i,/^\\s*(?:auto|always|avoid|left|right|inherit)\\s+$/i,/^\\s*(?:0|[+-]?\\d+(?:\\.\\d+)?m?s|0|(?:\\d+(?:\\.\\d+)?)%|inherit)\\s+$/i,/^\\s*(?:0|[+-]?\\d+(?:\\.\\d+)?|inherit)\\s+$/i,/^\\s*(?:normal|0|(?:\\d+(?:\\.\\d+)?)(?:em|ex|px|in|cm|mm|pt|pc)|inherit)\\s+$/i];return{\'azimuth\':/^\\s*(?:0|[+-]?\\d+(?:\\.\\d+)?(?:deg|g?rad)|leftwards|rightwards|inherit)\\s+$/i,\'background\':c[0],\'backgroundAttachment\':/^\\s*(?:scroll|fixed|inherit)\\s+$/i,\'backgroundColor\':c[1],\'backgroundImage\':c[5],\'backgroundPosition\':/^\\s*(?:(?:0|(?:\\d+(?:\\.\\d+)?)%|0|[+-]?\\d+(?:\\.\\d+)?(?:em|ex|px|in|cm|mm|pt|pc)|left|center|right)\\s+(?:(?:0|(?:\\d+(?:\\.\\d+)?)%|0|[+-]?\\d+(?:\\.\\d+)?(?:em|ex|px|in|cm|mm|pt|pc)|top|center|bottom)\\s+)?|inherit\\s+)$/i,\'backgroundRepeat\':/^\\s*(?:repeat|repeat-x|repeat-y|no-repeat|inherit)\\s+$/i,\'border\':c[0],\'borderBottom\':c[0],\'borderBottomColor\':c[1],\'borderBottomStyle\':c[2],\'borderBottomWidth\':c[3],\'borderCollapse\':/^\\s*(?:collapse|separate|inherit)\\s+$/i,\'borderColor\':/^\\s*(?:(?:(?:#(?:[0-9a-f]{3}){1,2}|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|purple|red|silver|teal|white|yellow|transparent)\\s+){1,4}|inherit\\s+)$/i,\'borderLeft\':c[0],\'borderLeftColor\':c[1],\'borderLeftStyle\':c[2],\'borderLeftWidth\':c[3],\'borderRadius\':/^\\s*0|[+-]?\\d+(?:\\.\\d+)?(?:em|ex|px|in|cm|mm|pt|pc)\\s+(?:0|[+-]?\\d+(?:\\.\\d+)?(?:em|ex|px|in|cm|mm|pt|pc)\\s+)?$/i,\'borderRight\':c[0],\'borderRightColor\':c[1],\'borderRightStyle\':c[2],\'borderRightWidth\':c[3],\'borderSpacing\':/^\\s*(?:0|[+-]?\\d+(?:\\.\\d+)?(?:em|ex|px|in|cm|mm|pt|pc)\\s+(?:0|[+-]?\\d+(?:\\.\\d+)?(?:em|ex|px|in|cm|mm|pt|pc)\\s+)?|inherit\\s+)$/i,\'borderStyle\':/^\\s*(?:(?:(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset)\\s+){1,4}|inherit\\s+)$/i,\'borderTop\':c[0],\'borderTopColor\':c[1],\'borderTopStyle\':c[2],\'borderTopWidth\':c[3],\'borderWidth\':/^\\s*(?:(?:(?:thin|medium|thick|0|[+-]?\\d+(?:\\.\\d+)?(?:em|ex|px|in|cm|mm|pt|pc))\\s+){1,4}|inherit\\s+)$/i,\'bottom\':c[6],\'captionSide\':/^\\s*(?:top|bottom|inherit)\\s+$/i,\'clear\':/^\\s*(?:none|left|right|both|inherit)\\s+$/i,\'clip\':/^\\s*(?:auto|inherit)\\s+$/i,\'color\':/^\\s*(?:#(?:[0-9a-f]{3}){1,2}|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|purple|red|silver|teal|white|yellow|inherit)\\s+$/i,\'counterIncrement\':c[4],\'counterReset\':c[4],\'cssFloat\':/^\\s*(?:left|right|none|inherit)\\s+$/i,\'cue\':c[0],\'cueAfter\':c[5],\'cueBefore\':c[5],\'cursor\':/^\\s*(?:(?:url\\("[^\\(\\)\\\\\\"\\r\\n]+"\\)\\s+,\\s+)*(?:auto|crosshair|default|pointer|move|e-resize|ne-resize|nw-resize|n-resize|se-resize|sw-resize|s-resize|w-resize|text|wait|help|progress|all-scroll|col-resize|hand|no-drop|not-allowed|row-resize|vertical-text)|inherit)\\s+$/i,\'direction\':/^\\s*(?:ltr|rtl|inherit)\\s+$/i,\'display\':/^\\s*(?:inline|block|list-item|run-in|inline-block|table|inline-table|table-row-group|table-header-group|table-footer-group|table-row|table-column-group|table-column|table-cell|table-caption|none|inherit)\\s+$/i,\'elevation\':/^\\s*(?:0|[+-]?\\d+(?:\\.\\d+)?(?:deg|g?rad)|below|level|above|higher|lower|inherit)\\s+$/i,\'emptyCells\':/^\\s*(?:show|hide|inherit)\\s+$/i,\'font\':/^\\s*(?:caption|icon|menu|message-box|small-caption|status-bar|inherit)\\s+$/i,\'fontFamily\':/^\\s*(?:(?:"\\w(?:[\\w-]*\\w)(?:\\s+\\w([\\w-]*\\w))*"|serif|sans-serif|cursive|fantasy|monospace)\\s+(?:,\\s+(?:"\\w(?:[\\w-]*\\w)(?:\\s+\\w([\\w-]*\\w))*"|serif|sans-serif|cursive|fantasy|monospace)\\s+)*|inherit\\s+)$/i,\'fontSize\':/^\\s*(?:xx-small|x-small|small|medium|large|x-large|xx-large|(?:small|larg)er|0|(?:\\d+(?:\\.\\d+)?)(?:em|ex|px|in|cm|mm|pt|pc)|0|[+-]?\\d+(?:\\.\\d+)?%|inherit)\\s+$/i,\'fontStyle\':/^\\s*(?:normal|italic|oblique|inherit)\\s+$/i,\'fontVariant\':/^\\s*(?:normal|small-caps|inherit)\\s+$/i,\'fontWeight\':/^\\s*(?:normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit)\\s+$/i,\'height\':c[6],\'left\':c[6],\'letterSpacing\':c[12],\'lineHeight\':/^\\s*(?:normal|0|(?:\\d+(?:\\.\\d+)?)|0|(?:\\d+(?:\\.\\d+)?)(?:em|ex|px|in|cm|mm|pt|pc)|0|[+-]?\\d+(?:\\.\\d+)?%|inherit)\\s+$/i,\'listStyle\':c[0],\'listStyleImage\':c[5],\'listStylePosition\':/^\\s*(?:inside|outside|inherit)\\s+$/i,\'listStyleType\':/^\\s*(?:disc|circle|square|decimal|decimal-leading-zero|lower-roman|upper-roman|lower-greek|lower-latin|upper-latin|armenian|georgian|lower-alpha|upper-alpha|none|inherit)\\s+$/i,\'margin\':/^\\s*(?:(?:(?:0|[+-]?\\d+(?:\\.\\d+)?(?:em|ex|px|in|cm|mm|pt|pc)|0|(?:\\d+(?:\\.\\d+)?)%|auto)\\s+){1,4}|inherit\\s+)$/i,\'marginBottom\':c[6],\'marginLeft\':c[6],\'marginRight\':c[6],\'marginTop\':c[6],\'maxHeight\':c[7],\'maxWidth\':c[7],\'minHeight\':c[8],\'minWidth\':c[8],\'opacity\':c[0],\'outline\':c[0],\'outlineColor\':/^\\s*(?:#(?:[0-9a-f]{3}){1,2}|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|purple|red|silver|teal|white|yellow|invert|inherit)\\s+$/i,\'outlineStyle\':c[2],\'outlineWidth\':c[3],\'overflow\':/^\\s*(?:visible|hidden|scroll|auto|inherit)\\s+$/i,\'padding\':/^\\s*(?:(?:(?:0|(?:\\d+(?:\\.\\d+)?)(?:em|ex|px|in|cm|mm|pt|pc)|0|[+-]?\\d+(?:\\.\\d+)?%)\\s+){1,4}|inherit\\s+)$/i,\'paddingBottom\':c[8],\'paddingLeft\':c[8],\'paddingRight\':c[8],\'paddingTop\':c[8],\'pageBreakAfter\':c[9],\'pageBreakBefore\':c[9],\'pageBreakInside\':/^\\s*(?:avoid|auto|inherit)\\s+$/i,\'pause\':/^\\s*(?:(?:(?:0|[+-]?\\d+(?:\\.\\d+)?m?s|0|(?:\\d+(?:\\.\\d+)?)%)\\s+){1,2}|inherit\\s+)$/i,\'pauseAfter\':c[10],\'pauseBefore\':c[10],\'pitch\':/^\\s*(?:0|(?:\\d+(?:\\.\\d+)?)k?Hz|x-low|low|medium|high|x-high|inherit)\\s+$/i,\'pitchRange\':c[11],\'playDuring\':/^\\s*(?:auto|none|inherit)\\s+$/i,\'position\':/^\\s*(?:static|relative|absolute|fixed|inherit)\\s+$/i,\'quotes\':c[4],\'richness\':c[11],\'right\':c[6],\'speak\':/^\\s*(?:normal|none|spell-out|inherit)\\s+$/i,\'speakHeader\':/^\\s*(?:once|always|inherit)\\s+$/i,\'speakNumeral\':/^\\s*(?:digits|continuous|inherit)\\s+$/i,\'speakPunctuation\':/^\\s*(?:code|none|inherit)\\s+$/i,\'speechRate\':/^\\s*(?:0|[+-]?\\d+(?:\\.\\d+)?|x-slow|slow|medium|fast|x-fast|faster|slower|inherit)\\s+$/i,\'stress\':c[11],\'tableLayout\':/^\\s*(?:auto|fixed|inherit)\\s+$/i,\'textAlign\':/^\\s*(?:left|right|center|justify|inherit)\\s+$/i,\'textDecoration\':c[4],\'textIndent\':/^\\s*(?:0|[+-]?\\d+(?:\\.\\d+)?(?:em|ex|px|in|cm|mm|pt|pc)|0|(?:\\d+(?:\\.\\d+)?)%|inherit)\\s+$/i,\'textTransform\':/^\\s*(?:capitalize|uppercase|lowercase|none|inherit)\\s+$/i,\'textWrap\':/^\\s*(?:normal|unrestricted|none|suppress)\\s+$/i,\'top\':c[6],\'unicodeBidi\':/^\\s*(?:normal|embed|bidi-override|inherit)\\s+$/i,\'verticalAlign\':/^\\s*(?:baseline|sub|super|top|text-top|middle|bottom|text-bottom|0|(?:\\d+(?:\\.\\d+)?)%|0|[+-]?\\d+(?:\\.\\d+)?(?:em|ex|px|in|cm|mm|pt|pc)|inherit)\\s+$/i,\'visibility\':/^\\s*(?:visible|hidden|collapse|inherit)\\s+$/i,\'voiceFamily\':/^\\s*(?:(?:(?:"\\w(?:[\\w-]*\\w)(?:\\s+\\w([\\w-]*\\w))*"|male|female|child)\\s+,\\s+)*(?:"\\w(?:[\\w-]*\\w)(?:\\s+\\w([\\w-]*\\w))*"|male|female|child)|inherit)\\s+$/i,\'volume\':/^\\s*(?:0|(?:\\d+(?:\\.\\d+)?)|0|[+-]?\\d+(?:\\.\\d+)?%|silent|x-soft|soft|medium|loud|x-loud|inherit)\\s+$/i,\'whiteSpace\':/^\\s*(?:normal|pre|nowrap|pre-wrap|pre-line|inherit)\\s+$/i,\'width\':/^\\s*(?:0|(?:\\d+(?:\\.\\d+)?)(?:em|ex|px|in|cm|mm|pt|pc)|0|[+-]?\\d+(?:\\.\\d+)?%|auto|inherit)\\s+$/i,\'wordSpacing\':c[12],\'wordWrap\':/^\\s*(?:normal|break-word)\\s+$/i,\'zIndex\':/^\\s*(?:auto|\\d+|inherit)\\s+$/i,\'zoom\':/^\\s*(?:normal|0|(?:\\d+(?:\\.\\d+)?)|0|[+-]?\\d+(?:\\.\\d+)?%)\\s+$/i};})()};}{var\nhtml4={};html4 .atype={\'NONE\':0,\'URI\':1,\'SCRIPT\':2,\'STYLE\':3,\'ID\':4,\'IDREF\':5,\'IDREFS\':6,\'GLOBAL_NAME\':7,\'LOCAL_NAME\':8,\'CLASSES\':9,\'FRAME_TARGET\':10};html4\n.ATTRIBS={\'*:class\':9,\'*:dir\':0,\'*:id\':4,\'*:lang\':0,\'*:onclick\':2,\'*:ondblclick\':2,\'*:onkeydown\':2,\'*:onkeypress\':2,\'*:onkeyup\':2,\'*:onmousedown\':2,\'*:onmousemove\':2,\'*:onmouseout\':2,\'*:onmouseover\':2,\'*:onmouseup\':2,\'*:style\':3,\'*:title\':0,\'a:coords\':0,\'a:href\':1,\'a:hreflang\':0,\'a:name\':7,\'a:onblur\':2,\'a:onfocus\':2,\'a:rel\':0,\'a:rev\':0,\'a:shape\':0,\'a:tabindex\':0,\'a:target\':10,\'a:type\':0,\'area:alt\':0,\'area:coords\':0,\'area:href\':1,\'area:nohref\':0,\'area:onblur\':2,\'area:onfocus\':2,\'area:shape\':0,\'area:tabindex\':0,\'area:target\':10,\'bdo:dir\':0,\'blockquote:cite\':1,\'br:clear\':0,\'button:disabled\':0,\'button:name\':8,\'button:onblur\':2,\'button:onfocus\':2,\'button:tabindex\':0,\'button:type\':0,\'button:value\':0,\'caption:align\':0,\'col:align\':0,\'col:char\':0,\'col:charoff\':0,\'col:span\':0,\'col:valign\':0,\'col:width\':0,\'colgroup:align\':0,\'colgroup:char\':0,\'colgroup:charoff\':0,\'colgroup:span\':0,\'colgroup:valign\':0,\'colgroup:width\':0,\'del:cite\':1,\'del:datetime\':0,\'dir:compact\':0,\'div:align\':0,\'dl:compact\':0,\'font:color\':0,\'font:face\':0,\'font:size\':0,\'form:accept\':0,\'form:action\':1,\'form:enctype\':0,\'form:method\':0,\'form:name\':7,\'form:onreset\':2,\'form:onsubmit\':2,\'form:target\':10,\'h1:align\':0,\'h2:align\':0,\'h3:align\':0,\'h4:align\':0,\'h5:align\':0,\'h6:align\':0,\'hr:align\':0,\'hr:noshade\':0,\'hr:size\':0,\'hr:width\':0,\'img:align\':0,\'img:alt\':0,\'img:border\':0,\'img:height\':0,\'img:hspace\':0,\'img:ismap\':0,\'img:longdesc\':1,\'img:name\':7,\'img:src\':1,\'img:usemap\':0,\'img:vspace\':0,\'img:width\':0,\'input:accept\':0,\'input:align\':0,\'input:alt\':0,\'input:checked\':0,\'input:disabled\':0,\'input:ismap\':0,\'input:maxlength\':0,\'input:name\':8,\'input:onblur\':2,\'input:onchange\':2,\'input:onfocus\':2,\'input:onselect\':2,\'input:readonly\':0,\'input:size\':0,\'input:src\':1,\'input:tabindex\':0,\'input:type\':0,\'input:usemap\':0,\'input:value\':0,\'ins:cite\':1,\'ins:datetime\':0,\'label:for\':5,\'label:onblur\':2,\'label:onfocus\':2,\'legend:align\':0,\'li:type\':0,\'li:value\':0,\'map:name\':7,\'menu:compact\':0,\'ol:compact\':0,\'ol:start\':0,\'ol:type\':0,\'optgroup:disabled\':0,\'optgroup:label\':0,\'option:disabled\':0,\'option:label\':0,\'option:selected\':0,\'option:value\':0,\'p:align\':0,\'pre:width\':0,\'q:cite\':1,\'select:disabled\':0,\'select:multiple\':0,\'select:name\':8,\'select:onblur\':2,\'select:onchange\':2,\'select:onfocus\':2,\'select:size\':0,\'select:tabindex\':0,\'table:align\':0,\'table:bgcolor\':0,\'table:border\':0,\'table:cellpadding\':0,\'table:cellspacing\':0,\'table:frame\':0,\'table:rules\':0,\'table:summary\':0,\'table:width\':0,\'tbody:align\':0,\'tbody:char\':0,\'tbody:charoff\':0,\'tbody:valign\':0,\'td:abbr\':0,\'td:align\':0,\'td:axis\':0,\'td:bgcolor\':0,\'td:char\':0,\'td:charoff\':0,\'td:colspan\':0,\'td:headers\':6,\'td:height\':0,\'td:nowrap\':0,\'td:rowspan\':0,\'td:scope\':0,\'td:valign\':0,\'td:width\':0,\'textarea:cols\':0,\'textarea:disabled\':0,\'textarea:name\':8,\'textarea:onblur\':2,\'textarea:onchange\':2,\'textarea:onfocus\':2,\'textarea:onselect\':2,\'textarea:readonly\':0,\'textarea:rows\':0,\'textarea:tabindex\':0,\'tfoot:align\':0,\'tfoot:char\':0,\'tfoot:charoff\':0,\'tfoot:valign\':0,\'th:abbr\':0,\'th:align\':0,\'th:axis\':0,\'th:bgcolor\':0,\'th:char\':0,\'th:charoff\':0,\'th:colspan\':0,\'th:headers\':6,\'th:height\':0,\'th:nowrap\':0,\'th:rowspan\':0,\'th:scope\':0,\'th:valign\':0,\'th:width\':0,\'thead:align\':0,\'thead:char\':0,\'thead:charoff\':0,\'thead:valign\':0,\'tr:align\':0,\'tr:bgcolor\':0,\'tr:char\':0,\'tr:charoff\':0,\'tr:valign\':0,\'ul:compact\':0,\'ul:type\':0};html4\n.eflags={\'OPTIONAL_ENDTAG\':1,\'EMPTY\':2,\'CDATA\':4,\'RCDATA\':8,\'UNSAFE\':16,\'FOLDABLE\':32};html4\n.ELEMENTS={\'a\':0,\'abbr\':0,\'acronym\':0,\'address\':0,\'applet\':16,\'area\':2,\'b\':0,\'base\':18,\'basefont\':18,\'bdo\':0,\'big\':0,\'blockquote\':0,\'body\':49,\'br\':2,\'button\':0,\'caption\':0,\'center\':0,\'cite\':0,\'code\':0,\'col\':2,\'colgroup\':1,\'dd\':1,\'del\':0,\'dfn\':0,\'dir\':0,\'div\':0,\'dl\':0,\'dt\':1,\'em\':0,\'fieldset\':0,\'font\':0,\'form\':0,\'frame\':18,\'frameset\':16,\'h1\':0,\'h2\':0,\'h3\':0,\'h4\':0,\'h5\':0,\'h6\':0,\'head\':49,\'hr\':2,\'html\':49,\'i\':0,\'iframe\':20,\'img\':2,\'input\':2,\'ins\':0,\'isindex\':18,\'kbd\':0,\'label\':0,\'legend\':0,\'li\':1,\'link\':18,\'map\':0,\'menu\':0,\'meta\':18,\'noframes\':20,\'noscript\':20,\'object\':16,\'ol\':0,\'optgroup\':0,\'option\':1,\'p\':1,\'param\':18,\'pre\':0,\'q\':0,\'s\':0,\'samp\':0,\'script\':20,\'select\':0,\'small\':0,\'span\':0,\'strike\':0,\'strong\':0,\'style\':20,\'sub\':0,\'sup\':0,\'table\':0,\'tbody\':1,\'td\':1,\'textarea\':8,\'tfoot\':1,\'th\':1,\'thead\':1,\'title\':24,\'tr\':1,\'tt\':0,\'u\':0,\'ul\':0,\'var\':0};}{var\nhtml=(function(){var lcase;if(\'script\'===\'SCRIPT\'.toLowerCase()){lcase=function(s){return s.toLowerCase();};}else{lcase=function(s){return s.replace(/[A-Z]/g,function(ch){return String.fromCharCode(ch.charCodeAt(0)|32);});};}var\nENTITIES={\'LT\':\'<\',\'GT\':\'>\',\'AMP\':\'&\',\'NBSP\':\'\\xa0\',\'QUOT\':\'\\"\',\'APOS\':\'\\\'\'};var\ndecimalEscapeRe=/^#(\\d+)$/;var hexEscapeRe=/^#x([0-9A-F]+)$/;function lookupEntity(name){name=name.toUpperCase();if(ENTITIES.hasOwnProperty(name)){return ENTITIES[name];}var\nm=name.match(decimalEscapeRe);if(m){return String.fromCharCode(parseInt(m[1],10));}else\nif(!(!(m=name.match(hexEscapeRe)))){return String.fromCharCode(parseInt(m[1],16));}return\'\';}function\ndecodeOneEntity(_,name){return lookupEntity(name);}var nulRe=/\\0/g;function stripNULs(s){return s.replace(nulRe,\'\');}var\nentityRe=/&(#\\d+|#x[\\da-f]+|\\w+);/g;function unescapeEntities(s){return s.replace(entityRe,decodeOneEntity);}var\nampRe=/&/g;var looseAmpRe=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi;var ltRe=/</g;var\ngtRe=/>/g;var quotRe=/\\"/g;var eqRe=/=/g;function escapeAttrib(s){return s.replace(ampRe,\'&amp;\').replace(ltRe,\'&lt;\').replace(gtRe,\'&gt;\').replace(quotRe,\'&quot;\').replace(eqRe,\'&#61;\');}function\nnormalizeRCData(rcdata){return rcdata.replace(looseAmpRe,\'&amp;$1\').replace(ltRe,\'&lt;\').replace(gtRe,\'&gt;\');}var\nINSIDE_TAG_TOKEN=new RegExp(\'^\\\\s*(?:\'+(\'(?:\'+\'([a-z][a-z-]*)\'+(\'(\'+\'\\\\s*=\\\\s*\'+(\'(\'+\'\\"[^\\"]*\\"\'+\'|\\\'[^\\\']*\\\'\'+\'|(?=[a-z][a-z-]*\\\\s*=)\'+\'|[^>\\"\\\'\\\\s]*\'+\')\')+\')\')+\'?\'+\')\')+\'|(/?>)\'+\'|[^\\\\w\\\\s>]+)\',\'i\');var\nOUTSIDE_TAG_TOKEN=new RegExp(\'^(?:\'+\'&(\\\\#[0-9]+|\\\\#[x][0-9a-f]+|\\\\w+);\'+\'|<!--[\\\\s\\\\S]*?-->|<!\\\\w[^>]*>|<\\\\?[^>*]*>\'+\'|<(/)?([a-z][a-z0-9]*)\'+\'|([^<&>]+)\'+\'|([<&>]))\',\'i\');function\nmakeSaxParser(handler){return function parse(htmlText,param){htmlText=String(htmlText);var\nhtmlLower=null;var inTag=false;var attribs=[];var tagName;var eflags;var openTag;handler.startDoc&&handler.startDoc(param);while(htmlText){var\nm=htmlText.match(inTag?INSIDE_TAG_TOKEN:OUTSIDE_TAG_TOKEN);htmlText=htmlText.substring(m[0].length);if(inTag){if(m[1]){var\nattribName=lcase(m[1]);var decodedValue;if(m[2]){var encodedValue=m[3];switch(encodedValue.charCodeAt(0)){case\n34:;case 39:{encodedValue=encodedValue.substring(1,encodedValue.length-1);break;}}decodedValue=unescapeEntities(stripNULs(encodedValue));}else{decodedValue=attribName;}attribs.push(attribName,decodedValue);}else\nif(m[4]){if(eflags!==void 0){if(openTag){handler.startTag&&handler.startTag(tagName,attribs,param);}else{handler.endTag&&handler.endTag(tagName,param);}}if(openTag&&eflags&(html4\n.eflags.CDATA|html4 .eflags.RCDATA)){if(htmlLower===null){htmlLower=lcase(htmlText);}else{htmlLower=htmlLower.substring(htmlLower.length-htmlText.length);}var\ndataEnd=htmlLower.indexOf(\'</\'+tagName);if(dataEnd<0){dataEnd=htmlText.length;}if(eflags&html4\n.eflags.CDATA){handler.cdata&&handler.cdata(htmlText.substring(0,dataEnd),param);}else\nif(handler.rcdata){handler.rcdata(normalizeRCData(htmlText.substring(0,dataEnd)),param);}htmlText=htmlText.substring(dataEnd);}tagName=eflags=openTag=void\n0;attribs.length=0;inTag=false;}}else{if(m[1]){handler.pcdata&&handler.pcdata(m[0],param);}else\nif(m[3]){openTag=!m[2];inTag=true;tagName=m[3].toLowerCase();eflags=html4 .ELEMENTS.hasOwnProperty(tagName)?html4\n.ELEMENTS[tagName]:void 0;}else if(m[4]){handler.pcdata&&handler.pcdata(m[4],param);}else\nif(m[5]){if(handler.pcdata){switch(m[5]){case\'<\':{handler.pcdata(\'&lt;\',param);break;}case\'>\':{handler.pcdata(\'&gt;\',param);break;}default:{handler.pcdata(\'&amp;\',param);break;}}}}}}handler.endDoc&&handler.endDoc(param);};}return{\'normalizeRCData\':normalizeRCData,\'escapeAttrib\':escapeAttrib,\'unescapeEntities\':unescapeEntities,\'makeSaxParser\':makeSaxParser};})();html.makeHtmlSanitizer=function(sanitizeAttributes){var\nstack=[];var ignoring=false;return html.makeSaxParser({\'startDoc\':function(_){stack=[];ignoring=false;},\'startTag\':function(tagName,attribs,out){if(ignoring){return;}if(!html4\n.ELEMENTS.hasOwnProperty(tagName)){return;}var eflags=html4 .ELEMENTS[tagName];if(eflags&html4\n.eflags.FOLDABLE){return;}else if(eflags&html4 .eflags.UNSAFE){ignoring=!(eflags&html4\n.eflags.EMPTY);return;}attribs=sanitizeAttributes(tagName,attribs);if(attribs){if(!(eflags&html4\n.eflags.EMPTY)){stack.push(tagName);}out.push(\'<\',tagName);for(var i=0,n=attribs.length;i<n;i+=2){var\nattribName=attribs[i],value=attribs[i+1];if(value!==null&&value!==void 0){out.push(\' \',attribName,\'=\\"\',html.escapeAttrib(value),\'\\"\');}}out.push(\'>\');}},\'endTag\':function(tagName,out){if(ignoring){ignoring=false;return;}if(!html4\n.ELEMENTS.hasOwnProperty(tagName)){return;}var eflags=html4 .ELEMENTS[tagName];if(!(eflags&(html4\n.eflags.UNSAFE|html4 .eflags.EMPTY|html4 .eflags.FOLDABLE))){var index;if(eflags&html4\n.eflags.OPTIONAL_ENDTAG){for(index=stack.length;--index>=0;){var stackEl=stack[index];if(stackEl===tagName){break;}if(!(html4\n.ELEMENTS[stackEl]&html4 .eflags.OPTIONAL_ENDTAG)){return;}}}else{for(index=stack.length;--index>=0;){if(stack[index]===tagName){break;}}}if(index<0){return;}for(var\ni=stack.length;--i>index;){var stackEl=stack[i];if(!(html4 .ELEMENTS[stackEl]&html4\n.eflags.OPTIONAL_ENDTAG)){out.push(\'</\',stackEl,\'>\');}}stack.length=index;out.push(\'</\',tagName,\'>\');}},\'pcdata\':function(text,out){if(!ignoring){out.push(text);}},\'rcdata\':function(text,out){if(!ignoring){out.push(text);}},\'cdata\':function(text,out){if(!ignoring){out.push(text);}},\'endDoc\':function(out){for(var\ni=stack.length;--i>=0;){out.push(\'</\',stack[i],\'>\');}stack.length=0;}});};function\nhtml_sanitize(htmlText,opt_urlPolicy,opt_nmTokenPolicy){var out=[];html.makeHtmlSanitizer(function\nsanitizeAttribs(tagName,attribs){for(var i=0;i<attribs.length;i+=2){var attribName=attribs[i];var\nvalue=attribs[i+1];var atype=null,attribKey;if((attribKey=tagName+\':\'+attribName,html4\n.ATTRIBS.hasOwnProperty(attribKey))||(attribKey=\'*:\'+attribName,html4 .ATTRIBS.hasOwnProperty(attribKey))){atype=html4\n.ATTRIBS[attribKey];}if(atype!==null){switch(atype){case html4 .atype.SCRIPT:;case\nhtml4 .atype.STYLE:value=null;case html4 .atype.IDREF:;case html4 .atype.IDREFS:;case\nhtml4 .atype.GLOBAL_NAME:;case html4 .atype.LOCAL_NAME:;case html4 .atype.CLASSES:{value=opt_nmTokenPolicy?opt_nmTokenPolicy(value):value;break;}case\nhtml4 .atype.URI:{value=opt_urlPolicy&&opt_urlPolicy(value);break;}}}else{value=null;}attribs[i+1]=value;}return attribs;})(htmlText,out);return out.join(\'\');}}};\nvar gadgets=gadgets||{};\ngadgets.util=function(){function F(){var K;\nvar J=document.location.href;\nvar H=J.indexOf("?");\nvar I=J.indexOf("#");\nif(I===-1){K=J.substr(H+1)\n}else{K=[J.substr(H+1,I-H-1),"&",J.substr(I+1)].join("")\n}return K.split("&")\n}var D=null;\nvar C={};\nvar E=[];\nvar A={0:false,10:true,13:true,34:true,39:true,60:true,62:true,92:true,8232:true,8233:true};\nfunction B(H,I){return String.fromCharCode(I)\n}function G(H){C=H["core.util"]||{}\n}if(gadgets.config){gadgets.config.register("core.util",null,G)\n}return{getUrlParameters:function(){if(D!==null){return D\n}D={};\nvar I=null;\nif(window.gadgets&&window.gadgets.container){try{var J=window.gadgets.container.getGadgetFromModuleId(MODULE_ID);\nvar K=J.getUrlParams();\nvar O=K;\nvar S=K.indexOf("#");\nif(S>-1){O=[K.substr(0,S),"&",K.substr(S+1)].join("")\n}I=O.split("&")\n}catch(N){I=[]\n}}else{I=F()\n}var Q=window.decodeURIComponent?decodeURIComponent:unescape;\nfor(var M=0,L=I.length;\nM<L;\n++M){var P=I[M].indexOf("=");\nif(P===-1){continue\n}var H=I[M].substring(0,P);\nvar R=I[M].substring(P+1);\nR=R.replace(/\\+/g," ");\nD[H]=Q(R)\n}return D\n},makeClosure:function(K,M,L){var J=[];\nfor(var I=2,H=arguments.length;\nI<H;\n++I){J.push(arguments[I])\n}return function(){var N=J.slice();\nfor(var P=0,O=arguments.length;\nP<O;\n++P){N.push(arguments[P])\n}return M.apply(K,N)\n}\n},makeEnum:function(I){var K={};\nfor(var J=0,H;\nH=I[J];\n++J){K[H]=H\n}return K\n},getFeatureParameters:function(H){return typeof C[H]==="undefined"?null:C[H]\n},hasFeature:function(H){return typeof C[H]!=="undefined"\n},registerOnLoadHandler:function(H){E.push(H)\n},runOnLoadHandlers:function(){for(var I=0,H=E.length;\nI<H;\n++I){E[I]()\n}},escape:function(H,L){if(!H){return H\n}else{if(typeof H==="string"){return gadgets.util.escapeString(H)\n}else{if(typeof H==="array"){for(var K=0,I=H.length;\nK<I;\n++K){H[K]=gadgets.util.escape(H[K])\n}}else{if(typeof H==="object"&&L){var J={};\nfor(var M in H){if(H.hasOwnProperty(M)){J[gadgets.util.escapeString(M)]=gadgets.util.escape(H[M],true)\n}}return J\n}}}}return H\n},escapeString:function(L){var I=[],K,M;\nfor(var J=0,H=L.length;\nJ<H;\n++J){K=L.charCodeAt(J);\nM=A[K];\nif(M===true){I.push("&#",K,";")\n}else{if(M!==false){I.push(L.charAt(J))\n}}}return I.join("")\n},unescapeString:function(H){return H.replace(/&#([0-9]+);/g,B)\n}}\n}();\ngadgets.util.getUrlParameters();;\nvar shindig=shindig||{};\nshindig.Auth=function(){var authToken=null;\nvar trusted=null;\nfunction init(configuration){var urlParams=gadgets.util.getUrlParameters();\nvar config=configuration["shindig.auth"]||{};\nif(config.authToken){authToken=config.authToken\n}else{if(urlParams.st){authToken=urlParams.st\n}}if(authToken!=null){addParamsToToken(urlParams)\n}if(config.trustedJson){trusted=eval("("+config.trustedJson+")")\n}}function addParamsToToken(urlParams){var args=authToken.split("&");\nfor(var i=0;\ni<args.length;\ni++){var nameAndValue=args[i].split("=");\nif(nameAndValue.length==2){var name=nameAndValue[0];\nvar value=nameAndValue[1];\nif(value==="$"){value=encodeURIComponent(urlParams[name]);\nargs[i]=name+"="+value\n}}}authToken=args.join("&")\n}gadgets.config.register("shindig.auth",null,init);\nreturn{getSecurityToken:function(){return authToken\n},updateSecurityToken:function(newToken){authToken=newToken\n},getTrustedData:function(){return trusted\n}}\n};;\nvar shindig=shindig||{};\nshindig.auth=new shindig.Auth();;\nvar gadgets=gadgets||{};\n(function(){var I=null;\nvar K={};\nvar D={};\nvar H={};\nvar E="en";\nvar B="US";\nvar A=0;\nvar G=0;\nvar J=0;\nfunction C(){var M=gadgets.util.getUrlParameters();\nfor(var L in M){if(M.hasOwnProperty(L)){if(L.indexOf("up_")===0&&L.length>3){K[L.substr(3)]=String(M[L])\n}else{if(L==="country"){B=M[L]\n}else{if(L==="lang"){E=M[L]\n}else{if(L==="mid"){A=M[L]\n}else{if(L=="config"){G=M[L]\n}else{if(L=="iid"){J=M[L]\n}}}}}}}}}function F(){for(var L in H){if(!K[L]){K[L]=H[L]\n}}}gadgets.Prefs=function(){if(!I){C();\nF();\nI=this\n}return I\n};\ngadgets.Prefs.setInternal_=function(M,N){if(typeof M==="string"){K[M]=N\n}else{for(var L in M){if(M.hasOwnProperty(L)){K[L]=M[L]\n}}}};\ngadgets.Prefs.setMessages_=function(L){D=L\n};\ngadgets.Prefs.setDefaultPrefs_=function(L){H=L\n};\ngadgets.Prefs.prototype.getString=function(L){return K[L]?gadgets.util.escapeString(K[L]):""\n};\ngadgets.Prefs.prototype.getInt=function(L){var M=parseInt(K[L],10);\nreturn isNaN(M)?0:M\n};\ngadgets.Prefs.prototype.getFloat=function(L){var M=parseFloat(K[L]);\nreturn isNaN(M)?0:M\n};\ngadgets.Prefs.prototype.getBool=function(L){var M=K[L];\nif(M){return M==="true"||M===true||!!parseInt(M,10)\n}return false\n};\ngadgets.Prefs.prototype.set=function(L,M){throw new Error("setprefs feature required to make this call.")\n};\ngadgets.Prefs.prototype.getArray=function(P){var Q=K[P];\nif(Q){var L=Q.split("|");\nvar M=gadgets.util.escapeString;\nfor(var O=0,N=L.length;\nO<N;\n++O){L[O]=M(L[O].replace(/%7C/g,"|"))\n}return L\n}return[]\n};\ngadgets.Prefs.prototype.setArray=function(L,M){throw new Error("setprefs feature required to make this call.")\n};\ngadgets.Prefs.prototype.getMsg=function(L){return D[L]||""\n};\ngadgets.Prefs.prototype.getCountry=function(){return B\n};\ngadgets.Prefs.prototype.getLang=function(){return E\n};\ngadgets.Prefs.prototype.getModuleId=function(){return A\n};\ngadgets.Prefs.prototype.getConfigState=function(){return G?"configure":"view"\n};\ngadgets.Prefs.prototype.getInstallState=function(){return J?"installed":"preview"\n}\n})();;\nvar gadgets=gadgets||{};\ngadgets.json=function(){function f(n){return n<10?"0"+n:n\n}Date.prototype.toJSON=function(){return[this.getUTCFullYear(),"-",f(this.getUTCMonth()+1),"-",f(this.getUTCDate()),"T",f(this.getUTCHours()),":",f(this.getUTCMinutes()),":",f(this.getUTCSeconds()),"Z"].join("")\n};\nvar m={"\\b":"\\\\b","\\t":"\\\\t","\\n":"\\\\n","\\f":"\\\\f","\\r":"\\\\r",\'"\':\'\\\\"\',"\\\\":"\\\\\\\\"};\nfunction stringify(value){var a,i,k,l,r=/["\\\\\\x00-\\x1f\\x7f-\\x9f]/g,v;\nswitch(typeof value){case"string":return r.test(value)?\'"\'+value.replace(r,function(a){var c=m[a];\nif(c){return c\n}c=a.charCodeAt();\nreturn"\\\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)\n})+\'"\':\'"\'+value+\'"\';\ncase"number":return isFinite(value)?String(value):"null";\ncase"boolean":case"null":return String(value);\ncase"object":if(!value){return"null"\n}a=[];\nif(typeof value.length==="number"&&!(value.propertyIsEnumerable("length"))){l=value.length;\nfor(i=0;\ni<l;\ni+=1){a.push(stringify(value[i])||"null")\n}return"["+a.join(",")+"]"\n}for(k in value){if(value.hasOwnProperty(k)){if(typeof k==="string"){v=stringify(value[k]);\nif(v){a.push(stringify(k)+":"+v)\n}}}}return"{"+a.join(",")+"}"\n}}return{stringify:stringify,parse:function(text){if(/^[\\],:{}\\s]*$/.test(text.replace(/\\\\["\\\\\\/b-u]/g,"@").replace(/"[^"\\\\\\n\\r]*"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g,"]").replace(/(?:^|:|,)(?:\\s*\\[)+/g,""))){return eval("("+text+")")\n}return false\n}}\n}();;\nvar JSON=gadgets.json;\nvar _IG_Prefs=gadgets.Prefs;\n_IG_Prefs._parseURL=gadgets.Prefs.parseUrl;\nfunction _IG_Fetch_wrapper(B,A){B(A.data)\n}function _IG_FetchContent(B,E,C){var D=C||{};\nif(D.refreshInterval){D.REFRESH_INTERVAL=D.refreshInterval\n}else{D.REFRESH_INTERVAL=3600\n}var A=gadgets.util.makeClosure(null,_IG_Fetch_wrapper,E);\ngadgets.io.makeRequest(B,A,D)\n}function _IG_FetchXmlContent(B,E,C){var D=C||{};\nif(D.refreshInterval){D.REFRESH_INTERVAL=D.refreshInterval\n}else{D.REFRESH_INTERVAL=3600\n}D.CONTENT_TYPE="DOM";\nvar A=gadgets.util.makeClosure(null,_IG_Fetch_wrapper,E);\ngadgets.io.makeRequest(B,A,D)\n}function _IG_FetchFeedAsJSON(B,F,C,A,D){var E=D||{};\nE.CONTENT_TYPE="FEED";\nE.NUM_ENTRIES=C;\nE.GET_SUMMARIES=A;\ngadgets.io.makeRequest(B,function(I){I.data=I.data||{};\nif(I.errors&&I.errors.length>0){I.data.ErrorMsg=I.errors[0]\n}if(I.data.link){I.data.URL=B\n}if(I.data.title){I.data.Title=I.data.title\n}if(I.data.description){I.data.Description=I.data.description\n}if(I.data.link){I.data.Link=I.data.link\n}if(I.data.items&&I.data.items.length>0){I.data.Entry=I.data.items;\nfor(var G=0;\nG<I.data.Entry.length;\n++G){var H=I.data.Entry[G];\nH.Title=H.title;\nH.Link=H.link;\nH.Summary=H.summary||H.description;\nH.Date=H.pubDate\n}}F(I.data)\n},E)\n}function _IG_GetCachedUrl(A,B){var C={REFRESH_INTERVAL:3600};\nif(B&&B.refreshInterval){C.REFRESH_INTERVAL=B.refreshInterval\n}return gadgets.io.getProxyUrl(A,C)\n}function _IG_GetImageUrl(A,B){return _IG_GetCachedUrl(A,B)\n}function _IG_GetImage(B){var A=document.createElement("img");\nA.src=_IG_GetCachedUrl(B);\nreturn A\n}function _IG_RegisterOnloadHandler(A){gadgets.util.registerOnLoadHandler(A)\n}function _IG_Callback(B,C){var A=arguments;\nreturn function(){var D=Array.prototype.slice.call(arguments);\nB.apply(null,D.concat(Array.prototype.slice.call(A,1)))\n}\n}var _args=gadgets.util.getUrlParameters;\nfunction _gel(A){return document.getElementById?document.getElementById(A):null\n}function _gelstn(A){if(A==="*"&&document.all){return document.all\n}return document.getElementsByTagName?document.getElementsByTagName(A):[]\n}function _gelsbyregex(D,F){var C=_gelstn(D);\nvar E=[];\nfor(var B=0,A=C.length;\nB<A;\n++B){if(F.test(C[B].id)){E.push(C[B])\n}}return E\n}function _esc(A){return window.encodeURIComponent?encodeURIComponent(A):escape(A)\n}function _unesc(A){return window.decodeURIComponent?decodeURIComponent(A):unescape(A)\n}function _hesc(A){return gadgets.util.escapeString(A)\n}function _striptags(A){return A.replace(/<\\/?[^>]+>/g,"")\n}function _trim(A){return A.replace(/^\\s+|\\s+$/g,"")\n}function _toggle(A){A=_gel(A);\nif(A!==null){if(A.style.display.length===0||A.style.display==="block"){A.style.display="none"\n}else{if(A.style.display==="none"){A.style.display="block"\n}}}}var _global_legacy_uidCounter=0;\nfunction _uid(){return _global_legacy_uidCounter++\n}function _min(B,A){return(B<A?B:A)\n}function _max(B,A){return(B>A?B:A)\n}function _exportSymbols(A,B){var H={};\nfor(var I=0,F=B.length;\nI<F;\nI+=2){H[B[I]]=B[I+1]\n}var E=A.split(".");\nvar J=window;\nfor(var D=0,C=E.length-1;\nD<C;\n++D){var G={};\nJ[E[D]]=G;\nJ=G\n}J[E[E.length-1]]=H\n};;\nvar gadgets=gadgets||{};\ngadgets.io=function(){var config={};\nvar oauthState;\nfunction makeXhr(){if(window.XMLHttpRequest){return new window.XMLHttpRequest()\n}else{if(window.ActiveXObject){var x=new ActiveXObject("Msxml2.XMLHTTP");\nif(!x){x=new ActiveXObject("Microsoft.XMLHTTP")\n}return x\n}}}function hadError(xobj,callback){if(xobj.readyState!==4){return true\n}try{if(xobj.status!==200){callback({errors:["Error "+xobj.status]});\nreturn true\n}}catch(e){callback({errors:["Error not specified"]});\nreturn true\n}return false\n}function processNonProxiedResponse(url,callback,params,xobj){if(hadError(xobj,callback)){return \n}var data={body:xobj.responseText};\ncallback(transformResponseData(params,data))\n}var UNPARSEABLE_CRUFT="throw 1; < don\'t be evil\' >";\nfunction processResponse(url,callback,params,xobj){if(hadError(xobj,callback)){return \n}var txt=xobj.responseText;\ntxt=txt.substr(UNPARSEABLE_CRUFT.length);\nvar data=eval("("+txt+")");\ndata=data[url];\nif(data.oauthState){oauthState=data.oauthState\n}if(data.st){shindig.auth.updateSecurityToken(data.st)\n}callback(transformResponseData(params,data))\n}function transformResponseData(params,data){var resp={text:data.body,rc:data.rc,headers:data.headers,oauthApprovalUrl:data.oauthApprovalUrl,oauthError:data.oauthError,oauthErrorText:data.oauthErrorText,errors:[]};\nif(resp.text){switch(params.CONTENT_TYPE){case"JSON":case"FEED":resp.data=gadgets.json.parse(resp.text);\nif(!resp.data){resp.errors.push("failed to parse JSON");\nresp.data=null\n}break;\ncase"DOM":var dom;\nif(window.ActiveXObject){dom=new ActiveXObject("Microsoft.XMLDOM");\ndom.async=false;\ndom.validateOnParse=false;\ndom.resolveExternals=false;\nif(!dom.loadXML(resp.text)){resp.errors.push("failed to parse XML")\n}else{resp.data=dom\n}}else{var parser=new DOMParser();\ndom=parser.parseFromString(resp.text,"text/xml");\nif("parsererror"===dom.documentElement.nodeName){resp.errors.push("failed to parse XML")\n}else{resp.data=dom\n}}break;\ndefault:resp.data=resp.text;\nbreak\n}}return resp\n}function makeXhrRequest(realUrl,proxyUrl,callback,paramData,method,params,processResponseFunction,opt_contentType){var xhr=makeXhr();\nxhr.open(method,proxyUrl,true);\nif(callback){xhr.onreadystatechange=gadgets.util.makeClosure(null,processResponseFunction,realUrl,callback,params,xhr)\n}if(paramData!=null){xhr.setRequestHeader("Content-Type",opt_contentType||"application/x-www-form-urlencoded");\nxhr.send(paramData)\n}else{xhr.send(null)\n}}function respondWithPreload(postData,params,callback){if(gadgets.io.preloaded_&&gadgets.io.preloaded_[postData.url]){var preload=gadgets.io.preloaded_[postData.url];\nif(postData.httpMethod=="GET"){delete gadgets.io.preloaded_[postData.url];\nif(preload.rc!==200){callback({errors:["Error "+preload.rc]})\n}else{if(preload.oauthState){oauthState=preload.oauthState\n}var resp={body:preload.body,rc:preload.rc,headers:preload.headers,oauthApprovalUrl:preload.oauthApprovalUrl,oauthError:preload.oauthError,oauthErrorText:preload.oauthErrorText,errors:[]};\ncallback(transformResponseData(params,resp))\n}return true\n}}return false\n}function init(configuration){config=configuration["core.io"]\n}var requiredConfig={proxyUrl:new gadgets.config.RegExValidator(/.*%(raw)?url%.*/),jsonProxyUrl:gadgets.config.NonEmptyStringValidator};\ngadgets.config.register("core.io",requiredConfig,init);\nreturn{makeRequest:function(url,callback,opt_params){var params=opt_params||{};\nvar httpMethod=params.METHOD||"GET";\nvar refreshInterval=params.REFRESH_INTERVAL;\nvar auth,st;\nif(params.AUTHORIZATION&&params.AUTHORIZATION!=="NONE"){auth=params.AUTHORIZATION.toLowerCase();\nst=shindig.auth.getSecurityToken()\n}else{if(httpMethod==="GET"&&refreshInterval===undefined){refreshInterval=3600\n}}var signOwner=true;\nif(typeof params.OWNER_SIGNED!=="undefined"){signOwner=params.OWNER_SIGNED\n}var signViewer=true;\nif(typeof params.VIEWER_SIGNED!=="undefined"){signViewer=params.VIEWER_SIGNED\n}var headers=params.HEADERS||{};\nif(httpMethod==="POST"&&!headers["Content-Type"]){headers["Content-Type"]="application/x-www-form-urlencoded"\n}var urlParams=gadgets.util.getUrlParameters();\nvar paramData={url:url,httpMethod:httpMethod,headers:gadgets.io.encodeValues(headers,false),postData:params.POST_DATA||"",authz:auth||"",st:st||"",contentType:params.CONTENT_TYPE||"TEXT",numEntries:params.NUM_ENTRIES||"3",getSummaries:!!params.GET_SUMMARIES,signOwner:signOwner,signViewer:signViewer,gadget:urlParams.url,container:urlParams.container||urlParams.synd||"default",bypassSpecCache:gadgets.util.getUrlParameters().nocache||""};\nif(auth==="oauth"||auth==="signed"){paramData.oauthState=oauthState||"";\nfor(opt in params){if(params.hasOwnProperty(opt)){if(opt.indexOf("OAUTH_")===0){paramData[opt]=params[opt]\n}}}}var proxyUrl=config.jsonProxyUrl.replace("%host%",document.location.host);\nif(!respondWithPreload(paramData,params,callback,processResponse)){if(httpMethod==="GET"&&refreshInterval>0){var extraparams="?refresh="+refreshInterval+"&"+gadgets.io.encodeValues(paramData);\nmakeXhrRequest(url,proxyUrl+extraparams,callback,null,"GET",params,processResponse)\n}else{makeXhrRequest(url,proxyUrl,callback,gadgets.io.encodeValues(paramData),"POST",params,processResponse)\n}}},makeNonProxiedRequest:function(relativeUrl,callback,opt_params,opt_contentType){var params=opt_params||{};\nmakeXhrRequest(relativeUrl,relativeUrl,callback,params.POST_DATA,params.METHOD,params,processNonProxiedResponse,opt_contentType)\n},clearOAuthState:function(){oauthState=undefined\n},encodeValues:function(fields,opt_noEscaping){var escape=!opt_noEscaping;\nvar buf=[];\nvar first=false;\nfor(var i in fields){if(fields.hasOwnProperty(i)){if(!first){first=true\n}else{buf.push("&")\n}buf.push(escape?encodeURIComponent(i):i);\nbuf.push("=");\nbuf.push(escape?encodeURIComponent(fields[i]):fields[i])\n}}return buf.join("")\n},getProxyUrl:function(url,opt_params){var params=opt_params||{};\nvar refresh=params.REFRESH_INTERVAL;\nif(refresh===undefined){refresh="3600"\n}var urlParams=gadgets.util.getUrlParameters();\nreturn config.proxyUrl.replace("%url%",encodeURIComponent(url)).replace("%host%",document.location.host).replace("%rawurl%",url).replace("%refresh%",encodeURIComponent(refresh)).replace("%gadget%",encodeURIComponent(urlParams.url)).replace("%container%",encodeURIComponent(urlParams.container||urlParams.synd))\n}}\n}();\ngadgets.io.RequestParameters=gadgets.util.makeEnum(["METHOD","CONTENT_TYPE","POST_DATA","HEADERS","AUTHORIZATION","NUM_ENTRIES","GET_SUMMARIES","REFRESH_INTERVAL","OAUTH_SERVICE_NAME","OAUTH_TOKEN_NAME","OAUTH_REQUEST_TOKEN","OAUTH_REQUEST_TOKEN_SECRET"]);\ngadgets.io.MethodType=gadgets.util.makeEnum(["GET","POST","PUT","DELETE","HEAD"]);\ngadgets.io.ContentType=gadgets.util.makeEnum(["TEXT","DOM","JSON","FEED"]);\ngadgets.io.AuthorizationType=gadgets.util.makeEnum(["NONE","SIGNED","OAUTH"]);;\nvar gadgets=gadgets||{};\ngadgets.rpc=function(){var R="__cb";\nvar P="";\nvar e="__g2c_rpc";\nvar F="__c2g_rpc";\nvar H="GRPC____NIXVBS_wrapper";\nvar B="GRPC____NIXVBS_get_wrapper";\nvar Z="GRPC____NIXVBS_handle_message";\nvar O="GRPC____NIXVBS_create_channel";\nvar J={};\nvar C={};\nvar W=[];\nvar D={};\nvar U={};\nvar K={};\nvar M=0;\nvar f={};\nvar T={};\nvar E={};\nvar d={};\nif(gadgets.util){d=gadgets.util.getUrlParameters()\n}K[".."]=d.rpctoken||d.ifpctok||0;\nfunction a(){return typeof window.postMessage==="function"?"wpm":typeof document.postMessage==="function"?"dpm":window.ActiveXObject?"nix":(navigator.product==="Gecko"&&navigator.userAgent.indexOf("KHTML")==-1)?"fe":"ifpc"\n}function c(){if(I==="dpm"||I==="wpm"){window.addEventListener("message",function(j){S(gadgets.json.parse(j.data))\n},false)\n}if(I==="nix"){if(typeof window[B]!=="unknown"){window[Z]=function(j){S(gadgets.json.parse(j))\n};\nwindow[O]=function(j,l,k){if(K[j]==k){J[j]=l\n}};\nvar h="Class "+H+"\\n Private m_Intended\\nPrivate m_Auth\\nPublic Sub SetIntendedName(name)\\n If isEmpty(m_Intended) Then\\nm_Intended = name\\nEnd If\\nEnd Sub\\nPublic Sub SetAuth(auth)\\n If isEmpty(m_Auth) Then\\nm_Auth = auth\\nEnd If\\nEnd Sub\\nPublic Sub SendMessage(data)\\n "+Z+"(data)\\nEnd Sub\\nPublic Function GetAuthToken()\\n GetAuthToken = m_Auth\\nEnd Function\\nPublic Sub CreateChannel(channel, auth)\\n Call "+O+"(m_Intended, channel, auth)\\nEnd Sub\\nEnd Class\\nFunction "+B+"(name, auth)\\nDim wrap\\nSet wrap = New "+H+"\\nwrap.SetIntendedName name\\nwrap.SetAuth auth\\nSet "+B+" = wrap\\nEnd Function";\ntry{window.execScript(h,"vbscript")\n}catch(i){I="ifpc"\n}}}}var I=a();\nc();\nvar X=false;\nC[P]=function(){throw new Error("Unknown RPC service: "+this.s)\n};\nC[R]=function(i,h){var j=f[i];\nif(j){delete f[i];\nj(h)\n}};\nC.setparentrelay=function(h){X=true;\nD[".."]=h;\nif(window.console){console.log("setparentrelay received "+h)\n}return true\n};\nfunction N(i,h){if(T[i]){return \n}if(I==="fe"){try{var k=document.getElementById(i);\nk[e]=function(m){S(gadgets.json.parse(m))\n}\n}catch(j){}}if(I==="nix"){try{var k=document.getElementById(i);\nvar l=window[B](i,h);\nk.contentWindow.opener=l\n}catch(j){}}T[i]=true\n}function V(l){var n=gadgets.json.stringify;\nvar h=[];\nfor(var m=0,k=l.length;\nm<k;\n++m){h.push(encodeURIComponent(n(l[m])))\n}return h.join("&")\n}function S(i){if(i&&typeof i.s==="string"&&typeof i.f==="string"&&i.a instanceof Array){if(i.c){i.callback=function(j){gadgets.rpc.call(i.f,R,null,i.c,j)\n}\n}var h=(C[i.s]||C[P]).apply(i,i.a);\nif(i.c&&typeof h!="undefined"){gadgets.rpc.call(i.f,R,null,i.c,h)\n}}}function g(h,k,n,l){try{if(n!=".."){var j=J[".."];\nif(!j&&window.opener&&"GetAuthToken" in window.opener){j=window.opener;\nif(j.GetAuthToken()==K[".."]){var i=K[".."];\nj.CreateChannel(window[B]("..",i),i);\nJ[".."]=j;\nwindow.opener=null\n}}if(j){j.SendMessage(l);\nreturn \n}else{if(window.console){console.log("NIX failed: no handler")\n}}}else{if(J[h]){J[h].SendMessage(l);\nreturn \n}}}catch(m){if(window.console){console.log("NIX exception: "+m)\n}}if(window.console){console.log("NIX failed")\n}b(h,k,n,l)\n}function A(i,j,o,k,m){try{if(o!=".."){var h=window.frameElement;\nif(typeof h[e]==="function"){if(typeof h[e][F]!=="function"){h[e][F]=function(p){S(gadgets.json.parse(p))\n}\n}h[e](k);\nreturn \n}}else{var n=document.getElementById(i);\nif(typeof n[e]==="function"&&typeof n[e][F]==="function"){n[e][F](k);\nreturn \n}}}catch(l){}b(i,j,o,k,m)\n}function b(h,i,n,j,k){var m=gadgets.rpc.getRelayUrl(h);\nif(!m){throw new Error("No relay file assigned for IFPC")\n}var l=null;\nif(U[h]){l=[m,"#",V([n,M,1,0,V([n,i,"","",n].concat(k))])].join("")\n}else{l=[m,"#",h,"&",n,"@",M,"&1&0&",encodeURIComponent(j)].join("")\n}L(l,h=="..")\n}function L(n,p){var k;\nfor(var j=W.length-1;\nj>=0;\n--j){var o=W[j];\ntry{if(o&&(o.recyclable||o.readyState==="complete")){o.parentNode.removeChild(o);\nif(window.ActiveXObject){W[j]=o=null;\nW.splice(j,1)\n}else{o.recyclable=false;\nk=o;\nbreak\n}}}catch(m){}}if(!k){k=document.createElement("iframe");\nk.style.border=k.style.width=k.style.height="0px";\nk.style.visibility="hidden";\nk.style.position="absolute";\nk.onload=function(){this.recyclable=true\n};\nW.push(k)\n}if(!X&&p){if(window.console){console.log("waiting for parentRelaySetup")\n}var l=setInterval(function(){if(X){clearInterval(l);\nvar i=D[".."];\nk.src=i+n.slice(n.indexOf("#")+1);\ndocument.body.appendChild(k)\n}},250)\n}else{k.src=n;\nvar h=document.getElementById("gadgetsRpcAnchor");\nif(!h){h=document.body\n}setTimeout(function(){h.appendChild(k)\n},0)\n}}function G(i,k){if(typeof E[i]==="undefined"){E[i]=false;\nvar j=null;\nif(i===".."){j=(window.gadgets&&window.gadgets.container)?window:parent\n}else{j=frames[i]\n}try{E[i]=j.gadgets.rpc.receiveSameDomain\n}catch(h){if(window["gadgets"+i]){E[i]=window["gadgets"+i].rpc.receiveSameDomain\n}}}if(typeof E[i]==="function"){E[i](k);\nreturn true\n}return false\n}if(gadgets.config){function Y(h){if(h.rpc.parentRelayUrl.substring(0,7)==="http://"){D[".."]=h.rpc.parentRelayUrl\n}else{var m=document.location.hash.substring(0).split("&");\nvar l="";\nfor(var j=0,k;\nk=m[j];\n++j){if(k.indexOf("parent=")===0){l=decodeURIComponent(k.substring(7));\nbreak\n}}D[".."]=l;\nif(document.location.hash.indexOf("parentRelaySetup=1")>-1){X=true\n}}U[".."]=!!h.rpc.useLegacyProtocol\n}var Q={parentRelayUrl:gadgets.config.NonEmptyStringValidator};\ngadgets.config.register("rpc",Q,Y)\n}return{register:function(i,h){if(i==R){throw new Error("Cannot overwrite callback service")\n}if(i==P){throw new Error("Cannot overwrite default service: use registerDefault")\n}C[i]=h\n},unregister:function(h){if(h==R){throw new Error("Cannot delete callback service")\n}if(h==P){throw new Error("Cannot delete default service: use unregisterDefault")\n}delete C[h]\n},registerDefault:function(h){C[""]=h\n},unregisterDefault:function(){delete C[""]\n},call:function(o,k,p,n){++M;\no=o||"..";\nif(p){f[M]=p\n}var m="..";\nif(o===".."){if(window.gadgets&&window.gadgets.container){m=MODULE_ID\n}else{m=window.name\n}}var j={s:k,f:m,c:p?M:0,a:Array.prototype.slice.call(arguments,3),t:K[o]};\nif(G(o,j)){return \n}var h=gadgets.json.stringify(j);\nvar i=I;\nif(U[o]){i="ifpc"\n}switch(i){case"dpm":var q=o===".."?parent.document:frames[o].document;\nq.postMessage(h);\nbreak;\ncase"wpm":var l=o===".."?parent:frames[o];\nl.postMessage(h,D[o]);\nbreak;\ncase"nix":g(o,k,m,h);\nbreak;\ncase"fe":A(o,k,m,h,j.a);\nbreak;\ndefault:b(o,k,m,h,j.a);\nbreak\n}},getRelayUrl:function(h){return D[h]\n},setRelayUrl:function(i,h,j){D[i]=h;\nU[i]=!!j\n},setAuthToken:function(h,i){K[h]=i;\nN(h,i)\n},getRelayChannel:function(){return I\n},receive:function(h){if(h.length>4){S(gadgets.json.parse(decodeURIComponent(h[h.length-1])))\n}},receiveSameDomain:function(h){h.a=Array.prototype.slice.call(h.a);\nwindow.setTimeout(function(){S(h)\n},0)\n}}\n}();;\nvar gadgets=gadgets||{};\ngadgets.views=function(){var E=null;\nvar A={};\nvar C={};\nvar D=null;\nfunction B(I){var F=I.views;\nfor(var L in F){if(F.hasOwnProperty(L)){var M=F[L];\nif(!M){continue\n}A[L]=new gadgets.views.View(L,M.isOnlyVisible);\nvar G=M.aliases||[];\nfor(var K=0,J;\nJ=G[K];\n++K){A[J]=new gadgets.views.View(L,M.isOnlyVisible)\n}}}var H=gadgets.util.getUrlParameters();\nif(H["view-params"]){C=gadgets.json.parse(H["view-params"])||C\n}if(H.popup){D=decodeURIComponent(H.popup)\n}E=A[H.view]||A["default"]\n}gadgets.config.register("views",null,B);\nreturn{bind:function(U,S){if(typeof U!="string"){throw new Error("Invalid urlTemplate")\n}if(typeof S!="object"){throw new Error("Invalid environment")\n}var Q=/^([a-zA-Z0-9][a-zA-Z0-9_\\.\\-]*)(=([a-zA-Z0-9\\-\\._~]|(%[0-9a-fA-F]{2}))*)?$/,W=new RegExp("\\\\{([^}]*)\\\\}","g"),T=/^-([a-zA-Z]+)\\|([^|]*)\\|(.+)$/,M=[],P=0,K,J,H,O,L,G,N,R;\nfunction I(Y,X){return S.hasOwnProperty(Y)?S[Y]:X\n}function F(X){if(!(J=X.match(Q))){throw new Error("Invalid variable : "+X)\n}}function V(b,X,a){var Y,Z=b.split(",");\nfor(Y=0;\nY<Z.length;\n++Y){F(Z[Y]);\nif(a(X,I(J[1]),J[1])){break\n}}return X\n}while(K=W.exec(U)){M.push(U.substring(P,K.index));\nP=W.lastIndex;\nif(J=K[1].match(Q)){H=J[1];\nO=J[2]?J[2].substr(1):"";\nM.push(I(H,O))\n}else{if(J=K[1].match(T)){L=J[1];\nG=J[2];\nN=J[3];\nR=0;\nswitch(L){case"neg":R=1;\ncase"opt":if(V(N,{flag:R},function(Y,X){if(typeof X!="undefined"&&(typeof X!="object"||X.length)){Y.flag=!Y.flag;\nreturn 1\n}}).flag){M.push(G)\n}break;\ncase"join":M.push(V(N,[],function(Z,Y,X){if(typeof Y==="string"){Z.push(X+"="+Y)\n}}).join(G));\nbreak;\ncase"list":F(N);\nvalue=I(J[1]);\nif(typeof value==="object"&&typeof value.join==="function"){M.push(value.join(G))\n}break;\ncase"prefix":R=1;\ncase"suffix":F(N);\nvalue=I(J[1],J[2]&&J[2].substr(1));\nif(typeof value==="string"){M.push(R?G+value:value+G)\n}else{if(typeof value==="object"&&typeof value.join==="function"){M.push(R?G+value.join(G):value.join(G)+G)\n}}break;\ndefault:throw new Error("Invalid operator : "+L)\n}}else{throw new Error("Invalid syntax : "+K[0])\n}}}M.push(U.substr(P));\nreturn M.join("")\n},requestNavigateTo:function(N,I,P){var O=N.getName();\nif(O=="popup"){var G="";\nvar H="";\nif(I){var L=[];\nfor(p in I){if(p!="popupParams"){L.push(p+"="+encodeURIComponent(I[p]))\n}}var K=L.join("&");\nH="&appParams="+encodeURIComponent(K)\n}var M=function(V){var T=[];\nvar U={resizable:"no",menubar:"no",directories:"no",location:"no",status:"no",scrollbars:"no",top:50,left:50,height:600,width:600};\nfor(var S in U){var R=V[S]||U[S];\nvar Q=S+"="+R;\nT.push(Q)\n}return T.join(",")\n};\nvar J=I||{};\nvar F=M(J.popupParams||{});\nwindow.open((H?D+H:D),J.name||"_blank",F)\n}else{gadgets.rpc.call(null,"requestNavigateTo",null,O,I,P)\n}},getCurrentView:function(){return E\n},getSupportedViews:function(){return A\n},getParams:function(){return C\n}}\n}();\ngadgets.views.View=function(A,B){this.name_=A;\nthis.isOnlyVisible_=!!B\n};\ngadgets.views.View.prototype.getName=function(){return this.name_\n};\ngadgets.views.View.prototype.getUrlTemplate=function(){return gadgets.config&&gadgets.config.views&&gadgets.config.views[this.name_]&&gadgets.config.views[this.name_].urlTemplate\n};\ngadgets.views.View.prototype.bind=function(A){return gadgets.views.bind(this.getUrlTemplate(),A)\n};\ngadgets.views.View.prototype.isOnlyVisibleGadget=function(){return this.isOnlyVisible_\n};\ngadgets.views.ViewType=gadgets.util.makeEnum(["PROFILE","CANVAS","POPUP","LIGHTBOX","CONFIG","CONFIG-SMALL","PREVIEW"]);;\n\n     gadgets.config.register("glam.ads", null, function(config) {\n        glam.ads._adiframe = config["glam.ads"][\'adiframe\'];\n        var urlParams = gadgets.util.getUrlParameters();\n        glam.ads._appId = urlParams[\'appid\'];\n        glam.ads._pubId = urlParams[\'pubid\'];\n        glam.ads._devId = urlParams[\'devid\'];\n    });\n    ;\nvar glam=glam||{};\nglam.ads=function(){var A=0;\nreturn{getAdTag:function(D,F){var B=glam.ads.getAvailableAdFormats()[D.name||D];\nif(!B){return{adtype:D,error:"unknown adtype"}\n}var C=B.width;\nvar E=B.height;\nvar G=glam.ads._getAdIframeUrl(B,F);\nA++;\nG+="&cnt="+A;\nreturn{adtype:D,adtag:\'<iframe src="\'+G+\'" width="\'+C+\'" height="\'+E+\'" frameborder="0" marginheight="0" marginwidth="0" scrolling="no"></iframe>\'}\n}}\n}();\nglam.ads._getAdIframeUrl=function(A,D){D=D||{};\nif(D.moduleId&&window.gadgets&&gadgets.container){gadgets.container.updateAdOpts(D)\n}var G=D.appId||glam.ads._appId;\nvar E=D.pubId||glam.ads._pubId;\nvar B=D.devId||glam.ads._devId;\nvar F=D.iframeurl||glam.ads._adiframe;\nvar H="adtype="+A._gname+"&mid="+G+"&aid="+E+"&bid="+B;\nvar C="";\nif(D.cb){C="&cb="+Math.random()\n}return F+"?"+C+"#"+H\n};\nglam.ads.showAd=function(B,A){opts=A||{};\ngadgets.rpc.call(null,"showAd",opts.callback,B,opts)\n};\nglam.ads.hideAd=function(A,B){opts=B||{};\ngadgets.rpc.call(null,"hideAd",opts.callback,A,opts)\n};\nglam.ads.getAvailableAdFormats=function(){return{DEFAULT300x250:new glam.ads.AdFormat({name:"DEFAULT300x250",_gname:"300x250",width:300,height:250}),DEFAULT160x600:new glam.ads.AdFormat({name:"DEFAULT160x600",_gname:"160x600",width:160,height:600}),DEFAULT728x90:new glam.ads.AdFormat({name:"DEFAULT728x90",_gname:"728x90",width:728,height:90})}\n};\nglam.ads.AdType=gadgets.util.makeEnum(["DEFAULT300x250","DEFAULT160x600","DEFAULT728x90"]);\nglam.ads.AdFormat=function(B){B=B||{};\nfor(var A in B){this[A]=B[A]\n}};\nglam.ads.AdFormat.prototype.getField=function(A,B){var C=this.hasOwnProperty(A)?this[A]:undefined;\nif(B&&B.escapeType=="none"){return C\n}else{return gadgets.util.escape(C,false)\n}};\nglam.ads.AdFormat.Field={NAME:"name",WIDTH:"width",HEIGHT:"height"};;\nvar opensocial=function(){};\nopensocial.requestSendMessage=function(A,D,B,C){opensocial.Container.get().requestSendMessage(A,D,B,C)\n};\nopensocial.requestShareApp=function(A,D,B,C){opensocial.Container.get().requestShareApp(A,D,B,C)\n};\nopensocial.requestCreateActivity=function(C,B,A){if(!C||(!C.getField(opensocial.Activity.Field.TITLE)&&!C.getField(opensocial.Activity.Field.TITLE_ID))){if(A){window.setTimeout(function(){A(new opensocial.ResponseItem(null,null,opensocial.ResponseItem.Error.BAD_REQUEST,"You must pass in an activity with a title or title id."))\n},0)\n}return \n}opensocial.Container.get().requestCreateActivity(C,B,A)\n};\nopensocial.CreateActivityPriority={HIGH:"HIGH",LOW:"LOW"};\nopensocial.hasPermission=function(A){return opensocial.Container.get().hasPermission(A)\n};\nopensocial.requestPermission=function(B,C,A){opensocial.Container.get().requestPermission(B,C,A)\n};\nopensocial.Permission={VIEWER:"viewer"};\nopensocial.getEnvironment=function(){return opensocial.Container.get().getEnvironment()\n};\nopensocial.newDataRequest=function(){return opensocial.Container.get().newDataRequest()\n};\nopensocial.newActivity=function(A){return opensocial.Container.get().newActivity(A)\n};\nopensocial.newMediaItem=function(C,A,B){return opensocial.Container.get().newMediaItem(C,A,B)\n};\nopensocial.newMessage=function(A,B){return opensocial.Container.get().newMessage(A,B)\n};\nopensocial.EscapeType={HTML_ESCAPE:"htmlEscape",NONE:"none"};\nopensocial.newIdSpec=function(A){return opensocial.Container.get().newIdSpec(A)\n};\nopensocial.newNavigationParameters=function(A){return opensocial.Container.get().newNavigationParameters(A)\n};\nFunction.prototype.inherits=function(A){function B(){}B.prototype=A.prototype;\nthis.superClass_=A.prototype;\nthis.prototype=new B();\nthis.prototype.constructor=this\n};;\nopensocial.Activity=function(A){this.fields_=A\n};\nopensocial.Activity.Field={TITLE_ID:"titleId",TITLE:"title",TEMPLATE_PARAMS:"templateParams",URL:"url",MEDIA_ITEMS:"mediaItems",BODY_ID:"bodyId",BODY:"body",EXTERNAL_ID:"externalId",STREAM_TITLE:"streamTitle",STREAM_URL:"streamUrl",STREAM_SOURCE_URL:"streamSourceUrl",STREAM_FAVICON_URL:"streamFaviconUrl",PRIORITY:"priority",ID:"id",USER_ID:"userId",APP_ID:"appId",POSTED_TIME:"postedTime"};\nopensocial.Activity.prototype.getId=function(){return this.getField(opensocial.Activity.Field.ID)\n};\nopensocial.Activity.prototype.getField=function(A,B){return opensocial.Container.getField(this.fields_,A,B)\n};\nopensocial.Activity.prototype.setField=function(A,B){return this.fields_[A]=B\n};;\nopensocial.Address=function(A){this.fields_=A||{}\n};\nopensocial.Address.Field={TYPE:"type",UNSTRUCTURED_ADDRESS:"unstructuredAddress",PO_BOX:"poBox",STREET_ADDRESS:"streetAddress",EXTENDED_ADDRESS:"extendedAddress",REGION:"region",LOCALITY:"locality",POSTAL_CODE:"postalCode",COUNTRY:"country",LATITUDE:"latitude",LONGITUDE:"longitude"};\nopensocial.Address.prototype.getField=function(A,B){return opensocial.Container.getField(this.fields_,A,B)\n};;\nopensocial.BodyType=function(A){this.fields_=A||{}\n};\nopensocial.BodyType.Field={BUILD:"build",HEIGHT:"height",WEIGHT:"weight",EYE_COLOR:"eyeColor",HAIR_COLOR:"hairColor"};\nopensocial.BodyType.prototype.getField=function(A,B){return opensocial.Container.getField(this.fields_,A,B)\n};;\nopensocial.Collection=function(C,B,A){this.array_=C||[];\nthis.offset_=B||0;\nthis.totalSize_=A||this.array_.length\n};\nopensocial.Collection.prototype.getById=function(C){for(var A=0;\nA<this.size();\nA++){var B=this.array_[A];\nif(B.getId()==C){return B\n}}return null\n};\nopensocial.Collection.prototype.size=function(){return this.array_.length\n};\nopensocial.Collection.prototype.each=function(B){for(var A=0;\nA<this.size();\nA++){B(this.array_[A])\n}};\nopensocial.Collection.prototype.asArray=function(){return this.array_\n};\nopensocial.Collection.prototype.getTotalSize=function(){return this.totalSize_\n};\nopensocial.Collection.prototype.getOffset=function(){return this.offset_\n};;\nopensocial.Container=function(){};\nopensocial.Container.container_=null;\nopensocial.Container.setContainer=function(A){opensocial.Container.container_=A\n};\nopensocial.Container.get=function(){return opensocial.Container.container_\n};\nopensocial.Container.prototype.getEnvironment=function(){};\nopensocial.Container.prototype.requestSendMessage=function(A,D,B,C){if(B){window.setTimeout(function(){B(new opensocial.ResponseItem(null,null,opensocial.ResponseItem.Error.NOT_IMPLEMENTED,null))\n},0)\n}};\nopensocial.Container.prototype.requestShareApp=function(A,D,B,C){if(B){window.setTimeout(function(){B(new opensocial.ResponseItem(null,null,opensocial.ResponseItem.Error.NOT_IMPLEMENTED,null))\n},0)\n}};\nopensocial.Container.prototype.requestCreateActivity=function(C,B,A){if(A){window.setTimeout(function(){A(new opensocial.ResponseItem(null,null,opensocial.ResponseItem.Error.NOT_IMPLEMENTED,null))\n},0)\n}};\nopensocial.Container.prototype.hasPermission=function(A){return false\n};\nopensocial.Container.prototype.requestPermission=function(B,C,A){if(A){window.setTimeout(function(){A(new opensocial.ResponseItem(null,null,opensocial.ResponseItem.Error.NOT_IMPLEMENTED,null))\n},0)\n}};\nopensocial.Container.prototype.requestData=function(A,B){};\nopensocial.Container.prototype.newFetchPersonRequest=function(B,A){};\nopensocial.Container.prototype.newFetchPeopleRequest=function(A,B){};\nopensocial.Container.prototype.newFetchPersonAppDataRequest=function(A,C,B){};\nopensocial.Container.prototype.newUpdatePersonAppDataRequest=function(C,A,B){};\nopensocial.Container.prototype.newRemovePersonAppDataRequest=function(B,A){};\nopensocial.Container.prototype.newFetchActivitiesRequest=function(A,B){};\nopensocial.Container.prototype.newCollection=function(C,B,A){return new opensocial.Collection(C,B,A)\n};\nopensocial.Container.prototype.newPerson=function(A,B,C){return new opensocial.Person(A,B,C)\n};\nopensocial.Container.prototype.newActivity=function(A){return new opensocial.Activity(A)\n};\nopensocial.Container.prototype.newMediaItem=function(C,A,B){return new opensocial.MediaItem(C,A,B)\n};\nopensocial.Container.prototype.newMessage=function(A,B){return new opensocial.Message(A,B)\n};\nopensocial.Container.prototype.newIdSpec=function(A){return new opensocial.IdSpec(A)\n};\nopensocial.Container.prototype.newNavigationParameters=function(A){return new opensocial.NavigationParameters(A)\n};\nopensocial.Container.prototype.newResponseItem=function(A,C,B,D){return new opensocial.ResponseItem(A,C,B,D)\n};\nopensocial.Container.prototype.newDataResponse=function(A,B){return new opensocial.DataResponse(A,B)\n};\nopensocial.Container.prototype.newDataRequest=function(){return new opensocial.DataRequest()\n};\nopensocial.Container.prototype.newEnvironment=function(B,A){return new opensocial.Environment(B,A)\n};\nopensocial.Container.isArray=function(A){return A instanceof Array\n};\nopensocial.Container.getField=function(A,B,C){var D=A[B];\nreturn opensocial.Container.escape(D,C,false)\n};\nopensocial.Container.escape=function(C,B,A){if(B&&B.escapeType=="none"){return C\n}else{return gadgets.util.escape(C,A)\n}};\nvar cajita;\nvar ___;\nvar attachDocumentStub;\nvar uriCallback={rewrite:function rewrite(B,A){B=String(B);\nif(/^#/.test(B)){return"#"+encodeURIComponent(decodeURIComponent(B.substring(1)))\n}else{if(/^\\/(?:[^\\/][^?#]*)?$/){return encodeURI(decodeURI(B))\n}}return null\n}};\nopensocial.Container.prototype.enableCaja=function(){___=window.___;\ncajita=window.cajita;\nvalijaMaker=window.valijaMaker;\nattachDocumentStub=window.attachDocumentStub;\nvar A=___.copy(___.sharedImports);\nA.outers=A;\nA.console=console;\nA.$v=___.asSimpleFunc(valijaMaker)(A);\n___.getNewModuleHandler().setImports(A);\nattachDocumentStub("-g___",uriCallback,A);\nvar D=document.createElement("div");\nD.className="g___";\nA.htmlEmitter___=new HtmlEmitter(D);\ndocument.body.appendChild(D);\nA.gadgets=gadgets;\nA.opensocial=opensocial;\nvar C={c_gadgets:{c_MiniMessage:{m_createDismissibleMessage:0,m_createStaticMessage:0,m_createTimerMessage:0,m_dismissMessage:0},c_Prefs:{m_getArray:0,m_getBool:0,m_getCountry:0,m_getFloat:0,m_getInt:0,m_getLang:0,m_getMsg:0,m_getString:0,m_set:0,m_setArray:0},c_Tab:{m_getCallback:0,m_getContentContainer:0,m_getIndex:0,m_getName:0,m_getNameContainer:0},c_TabSet:{m_addTab:0,m_alignTabs:0,m_displayTabs:0,m_getHeaderContainer:0,m_getSelectedTab:0,m_getTabs:0,m_removeTab:0,m_setSelectedTab:0,m_swapTabs:0},c_flash:{s_embedCachedFlash:0,s_embedFlash:0,s_getMajorVersion:0},c_io:{c_AuthorizationType:{s_NONE:0,s_OAUTH:0,s_SIGNED:0},c_ContentType:{s_DOM:0,s_FEED:0,s_JSON:0,s_TEXT:0},c_MethodType:{s_DELETE:0,s_GET:0,s_HEAD:0,s_POST:0,s_PUT:0},c_ProxyUrlRequestParameters:{s_REFRESH_INTERVAL:0},c_RequestParameters:{s_AUTHORIZATION:0,s_CONTENT_TYPE:0,s_GET_SUMMARIES:0,s_HEADERS:0,s_METHOD:0,s_NUM_ENTRIES:0,s_POST_DATA:0},s_encodeValues:0,s_getProxyUrl:0,s_makeRequest:0},c_json:{s_parse:0,s_stringify:0},c_pubsub:{s_publish:0,s_subscribe:0,s_unsubscribe:0},c_rpc:{s_call:0,s_register:0,s_registerDefault:0,s_unregister:0,s_unregisterDefault:0},c_skins:{c_Property:{s_ANCHOR_COLOR:0,s_BG_COLOR:0,s_BG_IMAGE:0,s_FONT_COLOR:0},s_getProperty:0},c_util:{s_escapeString:0,s_getFeatureParameters:0,s_hasFeature:0,s_registerOnLoadHandler:0,s_unescapeString:0},c_views:{c_View:{m_bind:0,m_getUrlTemplate:0,m_isOnlyVisibleGadget:0},c_ViewType:{s_CANVAS:0,s_HOME:0,s_PREVIEW:0,s_PROFILE:0},s_bind:0,s_getCurrentView:0,s_getParams:0,s_requestNavigateTo:0},c_window:{s_adjustHeight:0,s_getViewportDimensions:0,s_setTitle:0}},c_opensocial:{c_Activity:{c_Field:{s_APP_ID:0,s_BODY:0,s_BODY_ID:0,s_EXTERNAL_ID:0,s_ID:0,s_MEDIA_ITEMS:0,s_POSTED_TIME:0,s_PRIORITY:0,s_STREAM_FAVICON_URL:0,s_STREAM_SOURCE_URL:0,s_STREAM_TITLE:0,s_STREAM_URL:0,s_TEMPLATE_PARAMS:0,s_TITLE:0,s_TITLE_ID:0,s_URL:0,s_USER_ID:0},m_getField:0,m_getId:0,m_setField:0},c_Address:{c_Field:{s_COUNTRY:0,s_EXTENDED_ADDRESS:0,s_LATITUDE:0,s_LOCALITY:0,s_LONGITUDE:0,s_POSTAL_CODE:0,s_PO_BOX:0,s_REGION:0,s_STREET_ADDRESS:0,s_TYPE:0,s_UNSTRUCTURED_ADDRESS:0},m_getField:0},c_BodyType:{c_Field:{s_BUILD:0,s_EYE_COLOR:0,s_HAIR_COLOR:0,s_HEIGHT:0,s_WEIGHT:0},m_getField:0},c_Collection:{m_asArray:0,m_each:0,m_getById:0,m_getOffset:0,m_getTotalSize:0,m_size:0},c_CreateActivityPriority:{s_HIGH:0,s_LOW:0},c_DataRequest:{c_DataRequestFields:{s_ESCAPE_TYPE:0},c_FilterType:{s_ALL:0,s_HAS_APP:0,s_TOP_FRIENDS:0},c_PeopleRequestFields:{s_FILTER:0,s_FILTER_OPTIONS:0,s_FIRST:0,s_MAX:0,s_PROFILE_DETAILS:0,s_SORT_ORDER:0},c_SortOrder:{s_NAME:0,s_TOP_FRIENDS:0},m_add:0,m_newFetchActivitiesRequest:0,m_newFetchPeopleRequest:0,m_newFetchPersonAppDataRequest:0,m_newFetchPersonRequest:0,m_newRemovePersonAppDataRequest:0,m_newUpdatePersonAppDataRequest:0,m_send:0},c_DataResponse:{m_get:0,m_getErrorMessage:0,m_hadError:0},c_Email:{c_Field:{s_ADDRESS:0,s_TYPE:0},m_getField:0},c_Enum:{c_Drinker:{s_HEAVILY:0,s_NO:0,s_OCCASIONALLY:0,s_QUIT:0,s_QUITTING:0,s_REGULARLY:0,s_SOCIALLY:0,s_YES:0},c_Gender:{s_FEMALE:0,s_MALE:0},c_LookingFor:{s_ACTIVITY_PARTNERS:0,s_DATING:0,s_FRIENDS:0,s_NETWORKING:0,s_RANDOM:0,s_RELATIONSHIP:0},c_Presence:{s_AWAY:0,s_CHAT:0,s_DND:0,s_OFFLINE:0,s_ONLINE:0,s_XA:0},c_Smoker:{s_HEAVILY:0,s_NO:0,s_OCCASIONALLY:0,s_QUIT:0,s_QUITTING:0,s_REGULARLY:0,s_SOCIALLY:0,s_YES:0},m_getDisplayValue:0,m_getKey:0},c_Environment:{c_ObjectType:{s_ACTIVITY:0,s_ACTIVITY_MEDIA_ITEM:0,s_ADDRESS:0,s_BODY_TYPE:0,s_EMAIL:0,s_FILTER_TYPE:0,s_MESSAGE:0,s_MESSAGE_TYPE:0,s_NAME:0,s_ORGANIZATION:0,s_PERSON:0,s_PHONE:0,s_SORT_ORDER:0,s_URL:0},m_getDomain:0,m_supportsField:0},c_EscapeType:{s_HTML_ESCAPE:0,s_NONE:0},c_IdSpec:{c_Field:{s_GROUP_ID:0,s_NETWORK_DISTANCE:0,s_USER_ID:0},c_PersonId:{s_OWNER:0,s_VIEWER:0},m_getField:0,m_setField:0},c_MediaItem:{c_Field:{s_MIME_TYPE:0,s_TYPE:0,s_URL:0},c_Type:{s_AUDIO:0,s_IMAGE:0,s_VIDEO:0},m_getField:0,m_setField:0},c_Message:{c_Field:{s_BODY:0,s_BODY_ID:0,s_TITLE:0,s_TITLE_ID:0,s_TYPE:0},c_Type:{s_EMAIL:0,s_NOTIFICATION:0,s_PRIVATE_MESSAGE:0,s_PUBLIC_MESSAGE:0},m_getField:0,m_setField:0},c_Name:{c_Field:{s_ADDITIONAL_NAME:0,s_FAMILY_NAME:0,s_GIVEN_NAME:0,s_HONORIFIC_PREFIX:0,s_HONORIFIC_SUFFIX:0,s_UNSTRUCTURED:0},m_getField:0},c_NavigationParameters:{c_DestinationType:{s_RECIPIENT_DESTINATION:0,s_VIEWER_DESTINATION:0},c_Field:{s_OWNER:0,s_PARAMETERS:0,s_VIEW:0},m_getField:0,m_setField:0},c_Organization:{c_Field:{s_ADDRESS:0,s_DESCRIPTION:0,s_END_DATE:0,s_FIELD:0,s_NAME:0,s_SALARY:0,s_START_DATE:0,s_SUB_FIELD:0,s_TITLE:0,s_WEBPAGE:0},m_getField:0},c_Permission:{s_VIEWER:0},c_Person:{c_Field:{s_ABOUT_ME:0,s_ACTIVITIES:0,s_ADDRESSES:0,s_AGE:0,s_BODY_TYPE:0,s_BOOKS:0,s_CARS:0,s_CHILDREN:0,s_CURRENT_LOCATION:0,s_DATE_OF_BIRTH:0,s_DRINKER:0,s_EMAILS:0,s_ETHNICITY:0,s_FASHION:0,s_FOOD:0,s_GENDER:0,s_HAPPIEST_WHEN:0,s_HAS_APP:0,s_HEROES:0,s_HUMOR:0,s_ID:0,s_INTERESTS:0,s_JOBS:0,s_JOB_INTERESTS:0,s_LANGUAGES_SPOKEN:0,s_LIVING_ARRANGEMENT:0,s_LOOKING_FOR:0,s_MOVIES:0,s_MUSIC:0,s_NAME:0,s_NETWORK_PRESENCE:0,s_NICKNAME:0,s_PETS:0,s_PHONE_NUMBERS:0,s_POLITICAL_VIEWS:0,s_PROFILE_SONG:0,s_PROFILE_URL:0,s_PROFILE_VIDEO:0,s_QUOTES:0,s_RELATIONSHIP_STATUS:0,s_RELIGION:0,s_ROMANCE:0,s_SCARED_OF:0,s_SCHOOLS:0,s_SEXUAL_ORIENTATION:0,s_SMOKER:0,s_SPORTS:0,s_STATUS:0,s_TAGS:0,s_THUMBNAIL_URL:0,s_TIME_ZONE:0,s_TURN_OFFS:0,s_TURN_ONS:0,s_TV_SHOWS:0,s_URLS:0},m_getDisplayName:0,m_getField:0,m_getId:0,m_isOwner:0,m_isViewer:0},c_Phone:{c_Field:{s_NUMBER:0,s_TYPE:0},m_getField:0},c_ResponseItem:{c_Error:{s_BAD_REQUEST:0,s_FORBIDDEN:0,s_INTERNAL_ERROR:0,s_LIMIT_EXCEEDED:0,s_NOT_IMPLEMENTED:0,s_UNAUTHORIZED:0},m_getData:0,m_getErrorCode:0,m_getErrorMessage:0,m_getOriginalDataRequest:0,m_hadError:0},c_Url:{c_Field:{s_ADDRESS:0,s_LINK_TEXT:0,s_TYPE:0},m_getField:0},s_getEnvironment:0,s_hasPermission:0,s_newActivity:0,s_newDataRequest:0,s_newIdSpec:0,s_newMediaItem:0,s_newMessage:0,s_newNavigationParameters:0,s_requestCreateActivity:0,s_requestPermission:0,s_requestSendMessage:0,s_requestShareApp:0}};\nfunction B(I,J){if(!J){return \n}for(var F in I){if(I.hasOwnProperty(F)){var E=F.match(/^([mcs])_(\\w+)$/);\nvar H=E[1],G=E[2];\nswitch(H){case"c":___.allowRead(J,G);\nB(I[F],J[G]);\nbreak;\ncase"m":___.allowCall(J.prototype,G);\nbreak;\ncase"f":___.allowRead(J.prototype,G);\nbreak;\ncase"s":if("function"===typeof J[G]){___.allowCall(J,G)\n}else{___.allowRead(J,G)\n}break\n}}}}B(C,window)\n};;\nopensocial.DataRequest=function(){this.requestObjects_=[]\n};\nopensocial.DataRequest.prototype.requestObjects_=null;\nopensocial.DataRequest.prototype.getRequestObjects=function(){return this.requestObjects_\n};\nopensocial.DataRequest.prototype.add=function(B,A){return this.requestObjects_.push({key:A,request:B})\n};\nopensocial.DataRequest.prototype.send=function(A){var B=A||function(){};\nopensocial.Container.get().requestData(this,B)\n};\nopensocial.DataRequest.SortOrder={TOP_FRIENDS:"topFriends",NAME:"name"};\nopensocial.DataRequest.FilterType={ALL:"all",HAS_APP:"hasApp",TOP_FRIENDS:"topFriends",IS_FRIENDS_WITH:"isFriendsWith"};\nopensocial.DataRequest.PeopleRequestFields={PROFILE_DETAILS:"profileDetail",SORT_ORDER:"sortOrder",FILTER:"filter",FILTER_OPTIONS:"filterOptions",FIRST:"first",MAX:"max"};\nopensocial.DataRequest.prototype.addDefaultParam=function(C,B,A){C[B]=C[B]||A\n};\nopensocial.DataRequest.prototype.addDefaultProfileFields=function(B){var A=opensocial.DataRequest.PeopleRequestFields;\nvar C=B[A.PROFILE_DETAILS]||[];\nB[A.PROFILE_DETAILS]=C.concat([opensocial.Person.Field.ID,opensocial.Person.Field.NAME,opensocial.Person.Field.THUMBNAIL_URL])\n};\nopensocial.DataRequest.prototype.asArray=function(A){if(opensocial.Container.isArray(A)){return A\n}else{return[A]\n}};\nopensocial.DataRequest.prototype.newFetchPersonRequest=function(B,A){A=A||{};\nthis.addDefaultProfileFields(A);\nreturn opensocial.Container.get().newFetchPersonRequest(B,A)\n};\nopensocial.DataRequest.prototype.newFetchPeopleRequest=function(B,C){C=C||{};\nvar A=opensocial.DataRequest.PeopleRequestFields;\nthis.addDefaultProfileFields(C);\nthis.addDefaultParam(C,A.SORT_ORDER,opensocial.DataRequest.SortOrder.TOP_FRIENDS);\nthis.addDefaultParam(C,A.FILTER,opensocial.DataRequest.FilterType.ALL);\nthis.addDefaultParam(C,A.FIRST,0);\nthis.addDefaultParam(C,A.MAX,20);\nreturn opensocial.Container.get().newFetchPeopleRequest(B,C)\n};\nopensocial.DataRequest.DataRequestFields={ESCAPE_TYPE:"escapeType"};\nopensocial.DataRequest.prototype.newFetchPersonAppDataRequest=function(A,C,B){return opensocial.Container.get().newFetchPersonAppDataRequest(A,this.asArray(C),B)\n};\nopensocial.DataRequest.prototype.newUpdatePersonAppDataRequest=function(C,A,B){return opensocial.Container.get().newUpdatePersonAppDataRequest(C,A,B)\n};\nopensocial.DataRequest.prototype.newRemovePersonAppDataRequest=function(B,A){return opensocial.Container.get().newRemovePersonAppDataRequest(B,A)\n};\nopensocial.DataRequest.ActivityRequestFields={APP_ID:"appId"};\nopensocial.DataRequest.prototype.newFetchActivitiesRequest=function(A,B){B=B||{};\nreturn opensocial.Container.get().newFetchActivitiesRequest(A,B)\n};;\nopensocial.DataResponse=function(A,B,C){this.responseItems_=A;\nthis.globalError_=B;\nthis.errorMessage_=C\n};\nopensocial.DataResponse.prototype.hadError=function(){return !!this.globalError_\n};\nopensocial.DataResponse.prototype.getErrorMessage=function(){return this.errorMessage_\n};\nopensocial.DataResponse.prototype.get=function(A){return this.responseItems_[A]\n};;\nopensocial.Email=function(A){this.fields_=A||{}\n};\nopensocial.Email.Field={TYPE:"type",ADDRESS:"address"};\nopensocial.Email.prototype.getField=function(A,B){return opensocial.Container.getField(this.fields_,A,B)\n};;\nopensocial.Enum=function(B,A){this.key=B;\nthis.displayValue=A\n};\nopensocial.Enum.prototype.getKey=function(){return gadgets.util.escape(this.key)\n};\nopensocial.Enum.prototype.getDisplayValue=function(){return gadgets.util.escape(this.displayValue)\n};\nopensocial.Enum.Smoker={NO:"NO",YES:"YES",SOCIALLY:"SOCIALLY",OCCASIONALLY:"OCCASIONALLY",REGULARLY:"REGULARLY",HEAVILY:"HEAVILY",QUITTING:"QUITTING",QUIT:"QUIT"};\nopensocial.Enum.Drinker={NO:"NO",YES:"YES",SOCIALLY:"SOCIALLY",OCCASIONALLY:"OCCASIONALLY",REGULARLY:"REGULARLY",HEAVILY:"HEAVILY",QUITTING:"QUITTING",QUIT:"QUIT"};\nopensocial.Enum.Gender={MALE:"MALE",FEMALE:"FEMALE"};\nopensocial.Enum.LookingFor={DATING:"DATING",FRIENDS:"FRIENDS",RELATIONSHIP:"RELATIONSHIP",NETWORKING:"NETWORKING",ACTIVITY_PARTNERS:"ACTIVITY_PARTNERS",RANDOM:"RANDOM"};\nopensocial.Enum.Presence={AWAY:"AWAY",CHAT:"CHAT",DND:"DND",OFFLINE:"OFFLINE",ONLINE:"ONLINE",XA:"XA"};;\nopensocial.Environment=function(B,A){this.domain=B;\nthis.supportedFields=A\n};\nopensocial.Environment.prototype.getDomain=function(){return this.domain\n};\nopensocial.Environment.ObjectType={PERSON:"person",ADDRESS:"address",BODY_TYPE:"bodyType",EMAIL:"email",NAME:"name",ORGANIZATION:"organization",PHONE:"phone",URL:"url",ACTIVITY:"activity",MEDIA_ITEM:"mediaItem",MESSAGE:"message",MESSAGE_TYPE:"messageType",SORT_ORDER:"sortOrder",FILTER_TYPE:"filterType"};\nopensocial.Environment.prototype.supportsField=function(A,C){var B=this.supportedFields[A]||[];\nreturn !!B[C]\n};;\nopensocial.IdSpec=function(A){this.fields_=A||{}\n};\nopensocial.IdSpec.Field={USER_ID:"userId",GROUP_ID:"groupId",NETWORK_DISTANCE:"networkDistance"};\nopensocial.IdSpec.PersonId={OWNER:"OWNER",VIEWER:"VIEWER"};\nopensocial.IdSpec.GroupId={SELF:"SELF",FRIENDS:"FRIENDS",ALL:"ALL"};\nopensocial.IdSpec.prototype.getField=function(A,B){return opensocial.Container.getField(this.fields_,A,B)\n};\nopensocial.IdSpec.prototype.setField=function(A,B){return this.fields_[A]=B\n};;\nopensocial.MediaItem=function(C,A,B){this.fields_=B||{};\nthis.fields_[opensocial.MediaItem.Field.MIME_TYPE]=C;\nthis.fields_[opensocial.MediaItem.Field.URL]=A\n};\nopensocial.MediaItem.Type={IMAGE:"image",VIDEO:"video",AUDIO:"audio"};\nopensocial.MediaItem.Field={TYPE:"type",MIME_TYPE:"mimeType",URL:"url"};\nopensocial.MediaItem.prototype.getField=function(A,B){return opensocial.Container.getField(this.fields_,A,B)\n};\nopensocial.MediaItem.prototype.setField=function(A,B){return this.fields_[A]=B\n};;\nopensocial.Message=function(A,B){this.fields_=B||{};\nthis.fields_[opensocial.Message.Field.BODY]=A\n};\nopensocial.Message.Field={TYPE:"type",TITLE:"title",BODY:"body",TITLE_ID:"titleId",BODY_ID:"bodyId"};\nopensocial.Message.Type={EMAIL:"email",NOTIFICATION:"notification",PRIVATE_MESSAGE:"privateMessage",PUBLIC_MESSAGE:"publicMessage"};\nopensocial.Message.prototype.getField=function(A,B){return opensocial.Container.getField(this.fields_,A,B)\n};\nopensocial.Message.prototype.setField=function(A,B){return this.fields_[A]=B\n};;\nopensocial.Name=function(A){this.fields_=A||{}\n};\nopensocial.Name.Field={FAMILY_NAME:"familyName",GIVEN_NAME:"givenName",ADDITIONAL_NAME:"additionalName",HONORIFIC_PREFIX:"honorificPrefix",HONORIFIC_SUFFIX:"honorificSuffix",UNSTRUCTURED:"unstructured"};\nopensocial.Name.prototype.getField=function(A,B){return opensocial.Container.getField(this.fields_,A,B)\n};;\nopensocial.NavigationParameters=function(A){this.fields_=A||{}\n};\nopensocial.NavigationParameters.Field={VIEW:"view",OWNER:"owner",PARAMETERS:"parameters"};\nopensocial.NavigationParameters.prototype.getField=function(A,B){return opensocial.Container.getField(this.fields_,A,B)\n};\nopensocial.NavigationParameters.prototype.setField=function(A,B){return this.fields_[A]=B\n};\nopensocial.NavigationParameters.DestinationType={VIEWER_DESTINATION:"viewerDestination",RECIPIENT_DESTINATION:"recipientDestination"};;\nopensocial.Organization=function(A){this.fields_=A||{}\n};\nopensocial.Organization.Field={NAME:"name",TITLE:"title",DESCRIPTION:"description",FIELD:"field",SUB_FIELD:"subField",START_DATE:"startDate",END_DATE:"endDate",SALARY:"salary",ADDRESS:"address",WEBPAGE:"webpage"};\nopensocial.Organization.prototype.getField=function(A,B){return opensocial.Container.getField(this.fields_,A,B)\n};;\nopensocial.Person=function(A,B,C){this.fields_=A||{};\nthis.isOwner_=B;\nthis.isViewer_=C\n};\nopensocial.Person.Field={ID:"id",NAME:"name",NICKNAME:"nickname",THUMBNAIL_URL:"thumbnailUrl",PROFILE_URL:"profileUrl",CURRENT_LOCATION:"currentLocation",ADDRESSES:"addresses",EMAILS:"emails",PHONE_NUMBERS:"phoneNumbers",ABOUT_ME:"aboutMe",STATUS:"status",PROFILE_SONG:"profileSong",PROFILE_VIDEO:"profileVideo",GENDER:"gender",SEXUAL_ORIENTATION:"sexualOrientation",RELATIONSHIP_STATUS:"relationshipStatus",AGE:"age",DATE_OF_BIRTH:"dateOfBirth",BODY_TYPE:"bodyType",ETHNICITY:"ethnicity",SMOKER:"smoker",DRINKER:"drinker",CHILDREN:"children",PETS:"pets",LIVING_ARRANGEMENT:"livingArrangement",TIME_ZONE:"timeZone",LANGUAGES_SPOKEN:"languagesSpoken",JOBS:"jobs",JOB_INTERESTS:"jobInterests",SCHOOLS:"schools",INTERESTS:"interests",URLS:"urls",MUSIC:"music",MOVIES:"movies",TV_SHOWS:"tvShows",BOOKS:"books",ACTIVITIES:"activities",SPORTS:"sports",HEROES:"heroes",QUOTES:"quotes",CARS:"cars",FOOD:"food",TURN_ONS:"turnOns",TURN_OFFS:"turnOffs",TAGS:"tags",ROMANCE:"romance",SCARED_OF:"scaredOf",HAPPIEST_WHEN:"happiestWhen",FASHION:"fashion",HUMOR:"humor",LOOKING_FOR:"lookingFor",RELIGION:"religion",POLITICAL_VIEWS:"politicalViews",HAS_APP:"hasApp",NETWORK_PRESENCE:"networkPresence",CURRENT_SITE:"siteUrl"};\nopensocial.Person.prototype.getId=function(){return this.getField(opensocial.Person.Field.ID)\n};\nvar ORDERED_NAME_FIELDS_=[opensocial.Name.Field.HONORIFIC_PREFIX,opensocial.Name.Field.GIVEN_NAME,opensocial.Name.Field.FAMILY_NAME,opensocial.Name.Field.HONORIFIC_SUFFIX,opensocial.Name.Field.ADDITIONAL_NAME];\nopensocial.Person.prototype.getDisplayName=function(){var B=this.getField(opensocial.Person.Field.NAME);\nif(B){var E=B.getField(opensocial.Name.Field.UNSTRUCTURED);\nif(E){return E\n}var D="";\nfor(var C=0;\nC<ORDERED_NAME_FIELDS_.length;\nC++){var A=B.getField(ORDERED_NAME_FIELDS_[C]);\nif(A){D+=A+" "\n}}return D.replace(/^\\s+|\\s+$/g,"")\n}return this.getField(opensocial.Person.Field.NICKNAME)\n};\nopensocial.Person.prototype.getField=function(A,B){return opensocial.Container.getField(this.fields_,A,B)\n};\nopensocial.Person.prototype.isViewer=function(){return !!this.isViewer_\n};\nopensocial.Person.prototype.isOwner=function(){return !!this.isOwner_\n};;\nopensocial.Phone=function(A){this.fields_=A||{}\n};\nopensocial.Phone.Field={TYPE:"type",NUMBER:"number"};\nopensocial.Phone.prototype.getField=function(A,B){return opensocial.Container.getField(this.fields_,A,B)\n};;\nopensocial.ResponseItem=function(A,C,B,D){this.originalDataRequest_=A;\nthis.data_=C;\nthis.errorCode_=B;\nthis.errorMessage_=D\n};\nopensocial.ResponseItem.prototype.hadError=function(){return !!this.errorCode_\n};\nopensocial.ResponseItem.Error={NOT_IMPLEMENTED:"notImplemented",UNAUTHORIZED:"unauthorized",FORBIDDEN:"forbidden",BAD_REQUEST:"badRequest",INTERNAL_ERROR:"internalError",LIMIT_EXCEEDED:"limitExceeded"};\nopensocial.ResponseItem.prototype.getErrorCode=function(){return this.errorCode_\n};\nopensocial.ResponseItem.prototype.getErrorMessage=function(){return this.errorMessage_\n};\nopensocial.ResponseItem.prototype.getOriginalDataRequest=function(){return this.originalDataRequest_\n};\nopensocial.ResponseItem.prototype.getData=function(){return this.data_\n};;\nopensocial.Url=function(A){this.fields_=A||{}\n};\nopensocial.Url.Field={TYPE:"type",LINK_TEXT:"linkText",ADDRESS:"value",SITE_ID:"siteId",FEED_URL:"rssFeedUrl",DESCRIPTION:"description",THUMBNAIL_URL:"thumbnailUrl",EDITORIAL_CATEGORY:"editorialCategory"};\nopensocial.Url.prototype.getField=function(A,B){return opensocial.Container.getField(this.fields_,A,B)\n};;\nvar FieldTranslations={};\nFieldTranslations.translateServerPersonToJsPerson=function(A){if(A.emails){for(var E=0;\nE<A.emails.length;\nE++){A.emails[E].address=A.emails[E].value\n}}if(A.phoneNumbers){for(var F=0;\nF<A.phoneNumbers.length;\nF++){A.phoneNumbers[F].number=A.phoneNumbers[F].value\n}}if(A.birthday){A.dateOfBirth=A.birthday\n}if(A.utcOffset){A.timeZone=A.utcOffset\n}if(A.addresses){for(var C=0;\nC<A.addresses.length;\nC++){A.addresses[C].unstructuredAddress=A.addresses[C].formatted\n}}if(A.gender){var D=A.gender=="male"?"MALE":(A.gender=="female")?"FEMALE":null;\nA.gender={key:D,displayValue:A.gender}\n}FieldTranslations.translateUrlJson(A.profileSong);\nFieldTranslations.translateUrlJson(A.profileVideo);\nif(A.urls){for(var B=0;\nB<A.urls.length;\nB++){FieldTranslations.translateUrlJson(A.urls[B])\n}}FieldTranslations.translateEnumJson(A.drinker);\nFieldTranslations.translateEnumJson(A.lookingFor);\nFieldTranslations.translateEnumJson(A.networkPresence);\nFieldTranslations.translateEnumJson(A.smoker);\nif(A.organizations){A.jobs=[];\nA.schools=[];\nfor(var G=0;\nG<A.organizations.length;\nG++){var H=A.organizations[G];\nif(H.type=="job"){A.jobs.push(H)\n}else{if(H.type=="school"){A.schools.push(H)\n}}}}};\nFieldTranslations.translateEnumJson=function(A){if(A){A.key=A.value\n}};\nFieldTranslations.translateUrlJson=function(A){if(A){A.address=A.value\n}};\nFieldTranslations.translateJsPersonFieldsToServerFields=function(A){for(var B=0;\nB<A.length;\nB++){if(A[B]=="dateOfBirth"){A[B]="birthday"\n}else{if(A[B]=="timeZone"){A[B]="utcOffset"\n}}}A.push("id");\nA.push("displayName")\n};;\nvar JsonActivity=function(A,B){A=A||{};\nif(!B){JsonActivity.constructArrayObject(A,"mediaItems",JsonMediaItem)\n}opensocial.Activity.call(this,A)\n};\nJsonActivity.inherits(opensocial.Activity);\nJsonActivity.prototype.toJsonObject=function(){var C=JsonActivity.copyFields(this.fields_);\nvar D=C.mediaItems||[];\nvar A=[];\nfor(var B=0;\nB<D.length;\nB++){A[B]=D[B].toJsonObject()\n}C.mediaItems=A;\nreturn C\n};\nvar JsonMediaItem=function(A){opensocial.MediaItem.call(this,A.mimeType,A.url,A)\n};\nJsonMediaItem.inherits(opensocial.MediaItem);\nJsonMediaItem.prototype.toJsonObject=function(){return JsonActivity.copyFields(this.fields_)\n};\nJsonActivity.constructArrayObject=function(D,E,B){var C=D[E];\nif(C){for(var A=0;\nA<C.length;\nA++){C[A]=new B(C[A])\n}}};\nJsonActivity.copyFields=function(A){var B={};\nfor(var C in A){B[C]=A[C]\n}return B\n};;\nvar JsonPerson=function(A){A=A||{};\nJsonPerson.constructObject(A,"bodyType",opensocial.BodyType);\nJsonPerson.constructObject(A,"currentLocation",opensocial.Address);\nJsonPerson.constructObject(A,"dateOfBirth",Date);\nJsonPerson.constructObject(A,"name",opensocial.Name);\nJsonPerson.constructObject(A,"profileSong",opensocial.Url);\nJsonPerson.constructObject(A,"profileVideo",opensocial.Url);\nJsonPerson.constructArrayObject(A,"addresses",opensocial.Address);\nJsonPerson.constructArrayObject(A,"emails",opensocial.Email);\nJsonPerson.constructArrayObject(A,"jobs",opensocial.Organization);\nJsonPerson.constructArrayObject(A,"phoneNumbers",opensocial.Phone);\nJsonPerson.constructArrayObject(A,"schools",opensocial.Organization);\nJsonPerson.constructArrayObject(A,"urls",opensocial.Url);\nJsonPerson.constructEnum(A,"gender");\nJsonPerson.constructEnum(A,"smoker");\nJsonPerson.constructEnum(A,"drinker");\nJsonPerson.constructEnum(A,"networkPresence");\nJsonPerson.constructEnumArray(A,"lookingFor");\nJsonPerson.constructObject(A,"siteUrl",opensocial.Url);\nopensocial.Person.call(this,A,A.isOwner,A.isViewer)\n};\nJsonPerson.inherits(opensocial.Person);\nJsonPerson.constructEnum=function(B,C){var A=B[C];\nif(A){B[C]=new opensocial.Enum(A.key,A.displayValue)\n}};\nJsonPerson.constructEnumArray=function(C,D){var B=C[D];\nif(B){for(var A=0;\nA<B.length;\nA++){B[A]=new opensocial.Enum(B[A].key,B[A].displayValue)\n}}};\nJsonPerson.constructObject=function(C,D,A){var B=C[D];\nif(B){C[D]=new A(B)\n}};\nJsonPerson.constructArrayObject=function(D,E,B){var C=D[E];\nif(C){for(var A=0;\nA<C.length;\nA++){C[A]=new B(C[A])\n}}};\nJsonPerson.prototype.getDisplayName=function(){return this.getField("displayName")\n};;\nvar JsonRpcContainer=function(E,G,F){opensocial.Container.call(this);\nvar D={};\nfor(var B in F){if(F.hasOwnProperty(B)){D[B]={};\nfor(var C=0;\nC<F[B].length;\nC++){var A=F[B][C];\nD[B][A]=true\n}}}this.environment_=new opensocial.Environment(G,D);\nthis.baseUrl_=E;\nthis.securityToken_=shindig.auth.getSecurityToken()\n};\nJsonRpcContainer.inherits(opensocial.Container);\nJsonRpcContainer.prototype.getEnvironment=function(){return this.environment_\n};\nJsonRpcContainer.prototype.requestCreateActivity=function(D,B,A){A=A||function(){};\nvar C=opensocial.newDataRequest();\nvar E=new opensocial.IdSpec({userId:"VIEWER"});\nC.add(this.newCreateActivityRequest(E,D),"key");\nC.send(function(F){A(F.get("key"))\n})\n};\nJsonRpcContainer.prototype.requestData=function(F,J){J=J||function(){};\nvar D=F.getRequestObjects();\nvar H=D.length;\nif(H==0){window.setTimeout(function(){J(new opensocial.DataResponse({},true))\n},0);\nreturn \n}var K=new Array(H);\nfor(var E=0;\nE<H;\nE++){var I=D[E];\nK[E]=I.request.rpc;\nif(I.key){K[E].id=I.key\n}}var B=function(W){if(W.errors[0]){JsonRpcContainer.generateErrorResponse(W,D,J);\nreturn \n}W=W.data;\nvar M=false;\nvar V={};\nfor(var Q=0;\nQ<W.length;\nQ++){W[W[Q].id]=W[Q]\n}for(var N=0;\nN<D.length;\nN++){var P=D[N];\nvar O=W[N];\nif(P.key&&O.id!=P.key){throw"Request key("+P.key+") and response id("+O.id+") do not match"\n}var L=O.data;\nvar T=O.error;\nvar S="";\nif(T){S=T.message\n}var R=P.request.processResponse(P.request,L,T,S);\nM=M||R.hadError();\nif(P.key){V[P.key]=R\n}}var U=new opensocial.DataResponse(V,M);\nJ(U)\n};\nvar G={CONTENT_TYPE:"JSON",METHOD:"POST",AUTHORIZATION:"SIGNED",POST_DATA:gadgets.json.stringify(K)};\nvar A=[this.baseUrl_,"/rpc"];\nvar C=shindig.auth.getSecurityToken();\nif(C){A.push("?st=",encodeURIComponent(C))\n}this.sendRequest(A.join(""),B,G,"application/json")\n};\nJsonRpcContainer.prototype.sendRequest=function(A,D,B,C){gadgets.io.makeNonProxiedRequest(A,D,B,C)\n};\nJsonRpcContainer.generateErrorResponse=function(A,D,F){var B=JsonRpcContainer.translateHttpError(A.errors[0]||A.data.error)||opensocial.ResponseItem.Error.INTERNAL_ERROR;\nvar E={};\nfor(var C=0;\nC<D.length;\nC++){E[D[C].key]=new opensocial.ResponseItem(D[C].request,null,B)\n}F(new opensocial.DataResponse(E,true))\n};\nJsonRpcContainer.translateHttpError=function(A){if(A=="Error 501"){return opensocial.ResponseItem.Error.NOT_IMPLEMENTED\n}else{if(A=="Error 401"){return opensocial.ResponseItem.Error.UNAUTHORIZED\n}else{if(A=="Error 403"){return opensocial.ResponseItem.Error.FORBIDDEN\n}else{if(A=="Error 400"){return opensocial.ResponseItem.Error.BAD_REQUEST\n}else{if(A=="Error 500"){return opensocial.ResponseItem.Error.INTERNAL_ERROR\n}else{if(A=="Error 404"){return opensocial.ResponseItem.Error.BAD_REQUEST\n}else{if(A=="Error 417"){return opensocial.ResponseItem.Error.LIMIT_EXCEEDED\n}}}}}}}};\nJsonRpcContainer.prototype.makeIdSpec=function(A){return new opensocial.IdSpec({userId:A})\n};\nJsonRpcContainer.prototype.translateIdSpec=function(A){var D=A.getField("userId");\nvar C=A.getField("groupId");\nif(!opensocial.Container.isArray(D)){D=[D]\n}for(var B=0;\nB<D.length;\nB++){if(D[B]=="OWNER"){D[B]="@owner"\n}else{if(D[B]=="VIEWER"){D[B]="@viewer"\n}}}if(C=="FRIENDS"){C="@friends"\n}else{if(C=="SELF"||!C){C="@self"\n}}return{userId:D,groupId:C}\n};\nJsonRpcContainer.prototype.newFetchPersonRequest=function(D,C){var A=this.newFetchPeopleRequest(this.makeIdSpec(D),C);\nvar B=this;\nreturn new JsonRpcRequestItem(A.rpc,function(E){return B.createPersonFromJson(E)\n})\n};\nJsonRpcContainer.prototype.newFetchPeopleRequest=function(A,C){var D={method:"people.get"};\nD.params=this.translateIdSpec(A);\nif(C.profileDetail){FieldTranslations.translateJsPersonFieldsToServerFields(C.profileDetail);\nD.params.fields=C.profileDetail\n}if(C.first){D.params.startIndex=C.first\n}if(C.max){D.params.count=C.max\n}if(C.sortOrder){D.params.sortBy=C.sortOrder\n}if(C.filter){D.params.filterBy=C.filter\n}if(A.getField("networkDistance")){D.params.networkDistance=A.getField("networkDistance")\n}var B=this;\nreturn new JsonRpcRequestItem(D,function(H){var G;\nif(H.list){G=H.list\n}else{G=[H]\n}var F=[];\nfor(var E=0;\nE<G.length;\nE++){F.push(B.createPersonFromJson(G[E]))\n}return new opensocial.Collection(F,H.startIndex,H.totalResults)\n})\n};\nJsonRpcContainer.prototype.createPersonFromJson=function(A){FieldTranslations.translateServerPersonToJsPerson(A);\nreturn new JsonPerson(A)\n};\nJsonRpcContainer.prototype.getFieldsList=function(A){if(this.hasNoKeys(A)||this.isWildcardKey(A[0])){return[]\n}else{return A\n}};\nJsonRpcContainer.prototype.hasNoKeys=function(A){return !A||A.length==0\n};\nJsonRpcContainer.prototype.isWildcardKey=function(A){return A=="*"\n};\nJsonRpcContainer.prototype.newFetchPersonAppDataRequest=function(A,C,B){var D={method:"appdata.get"};\nD.params=this.translateIdSpec(A);\nD.params.appId="@app";\nD.params.fields=this.getFieldsList(C);\nif(A.getField("networkDistance")){D.params.networkDistance=A.getField("networkDistance")\n}return new JsonRpcRequestItem(D,function(E){return opensocial.Container.escape(E,B,true)\n})\n};\nJsonRpcContainer.prototype.newUpdatePersonAppDataRequest=function(D,A,B){var C={method:"appdata.update"};\nC.params=this.translateIdSpec(this.makeIdSpec(D));\nC.params.appId="@app";\nC.params.data={};\nC.params.data[A]=B;\nC.params.fields=A;\nreturn new JsonRpcRequestItem(C)\n};\nJsonRpcContainer.prototype.newRemovePersonAppDataRequest=function(C,A){var B={method:"appdata.delete"};\nB.params=this.translateIdSpec(this.makeIdSpec(C));\nB.params.appId="@app";\nB.params.fields=this.getFieldsList(A);\nreturn new JsonRpcRequestItem(B)\n};\nJsonRpcContainer.prototype.newFetchActivitiesRequest=function(A,B){var C={method:"activities.get"};\nC.params=this.translateIdSpec(A);\nC.params.appId="@app";\nif(A.getField("networkDistance")){C.params.networkDistance=A.getField("networkDistance")\n}return new JsonRpcRequestItem(C,function(E){E=E.list;\nvar F=[];\nfor(var D=0;\nD<E.length;\nD++){F.push(new JsonActivity(E[D]))\n}return new opensocial.Collection(F)\n})\n};\nJsonRpcContainer.prototype.newActivity=function(A){return new JsonActivity(A,true)\n};\nJsonRpcContainer.prototype.newMediaItem=function(C,A,B){B=B||{};\nB.mimeType=C;\nB.url=A;\nreturn new JsonMediaItem(B)\n};\nJsonRpcContainer.prototype.newCreateActivityRequest=function(A,B){var C={method:"activities.create"};\nC.params=this.translateIdSpec(A);\nC.params.appId="@app";\nif(A.getField("networkDistance")){C.params.networkDistance=A.getField("networkDistance")\n}C.params.activity=B.toJsonObject();\nreturn new JsonRpcRequestItem(C)\n};\nvar JsonRpcRequestItem=function(B,A){this.rpc=B;\nthis.processData=A||function(C){return C\n};\nthis.processResponse=function(C,F,E,D){var G=E?JsonRpcContainer.translateHttpError("Error "+E.code):null;\nreturn new opensocial.ResponseItem(C,E?null:this.processData(F),G,D)\n}\n};;\nvar RestfulContainer=function(E,G,F){opensocial.Container.call(this);\nvar D={};\nfor(var B in F){if(F.hasOwnProperty(B)){D[B]={};\nfor(var C=0;\nC<F[B].length;\nC++){var A=F[B][C];\nD[B][A]=true\n}}}this.environment_=new opensocial.Environment(G,D);\nthis.baseUrl_=E;\nthis.securityToken_=shindig.auth.getSecurityToken()\n};\nRestfulContainer.inherits(opensocial.Container);\nRestfulContainer.prototype.getEnvironment=function(){return this.environment_\n};\nRestfulContainer.prototype.requestCreateActivity=function(D,B,A){A=A||function(){};\nvar C=opensocial.newDataRequest();\nvar E=new opensocial.IdSpec({userId:"VIEWER"});\nC.add(this.newCreateActivityRequest(E,D),"key");\nC.send(function(F){A(F.get("key"))\n})\n};\nRestfulContainer.prototype.requestData=function(E,I){I=I||function(){};\nvar B=E.getRequestObjects();\nvar G=B.length;\nif(G==0){window.setTimeout(function(){I(new opensocial.DataResponse({},true))\n},0);\nreturn \n}var J={};\nvar C=0;\nfor(var D=0;\nD<G;\nD++){var H=B[D];\nif(!H.key){H.key="systemKey"+C;\nwhile(J[H.key]){C++;\nH.key="systemKey"+C\n}}J[H.key]={url:H.request.url,method:H.request.method};\nif(H.request.postData){J[H.key].postData=H.request.postData\n}}var A=function(V){if(V.errors[0]||V.data.error){RestfulContainer.generateErrorResponse(V,B,I);\nreturn \n}V=V.data;\nvar R=V.responses||[];\nvar L=false;\nvar U={};\nfor(var M=0;\nM<B.length;\nM++){var O=B[M];\nvar N=R[O.key];\nvar K=N.response;\nvar S=N.error;\nvar Q=N.errorMessage;\nvar P=O.request.processResponse(O.request,K,S,Q);\nL=L||P.hadError();\nU[O.key]=P\n}var T=new opensocial.DataResponse(U,L);\nI(T)\n};\nvar F={CONTENT_TYPE:"JSON",METHOD:"POST",AUTHORIZATION:"SIGNED",POST_DATA:gadgets.json.stringify(J)};\ngadgets.io.makeNonProxiedRequest(this.baseUrl_+"/rest/jsonBatch?st="+encodeURIComponent(shindig.auth.getSecurityToken()),A,F,"application/json")\n};\nRestfulContainer.generateErrorResponse=function(A,D,F){var B=RestfulContainer.translateHttpError(A.errors[0]||A.data.error)||opensocial.ResponseItem.Error.INTERNAL_ERROR;\nvar E={};\nfor(var C=0;\nC<D.length;\nC++){E[D[C].key]=new opensocial.ResponseItem(D[C].request,null,B)\n}F(new opensocial.DataResponse(E,true))\n};\nRestfulContainer.translateHttpError=function(A){if(A=="Error 501"){return opensocial.ResponseItem.Error.NOT_IMPLEMENTED\n}else{if(A=="Error 401"){return opensocial.ResponseItem.Error.UNAUTHORIZED\n}else{if(A=="Error 403"){return opensocial.ResponseItem.Error.FORBIDDEN\n}else{if(A=="Error 400"){return opensocial.ResponseItem.Error.BAD_REQUEST\n}else{if(A=="Error 500"){return opensocial.ResponseItem.Error.INTERNAL_ERROR\n}else{if(A=="Error 404"){return opensocial.ResponseItem.Error.BAD_REQUEST\n}}}}}}};\nRestfulContainer.prototype.makeIdSpec=function(A){return new opensocial.IdSpec({userId:A})\n};\nRestfulContainer.prototype.translateIdSpec=function(A){var D=A.getField("userId");\nvar C=A.getField("groupId");\nif(D=="OWNER"){D="@owner"\n}else{if(D=="VIEWER"){D="@viewer"\n}else{if(opensocial.Container.isArray(A)){for(var B=0;\nB<A.length;\nB++){}}}}if(C=="FRIENDS"){C="@friends"\n}else{if(C=="SELF"||!C){C="@self"\n}}return D+"/"+C\n};\nRestfulContainer.prototype.getNetworkDistance=function(A){var B=A.getField("networkDistance")||"";\nreturn"networkDistance="+B\n};\nRestfulContainer.prototype.newFetchPersonRequest=function(D,C){var A=this.newFetchPeopleRequest(this.makeIdSpec(D),C);\nvar B=this;\nreturn new RestfulRequestItem(A.url,A.method,null,function(E){return B.createPersonFromJson(E.entry)\n})\n};\nRestfulContainer.prototype.newFetchPeopleRequest=function(A,D){var B="/people/"+this.translateIdSpec(A);\nFieldTranslations.translateJsPersonFieldsToServerFields(D.profileDetail);\nB+="?fields="+(D.profileDetail.join(","));\nB+="&startIndex="+(D.first||0);\nB+="&count="+(D.max||20);\nB+="&orderBy="+(D.sortOrder||"topFriends");\nB+="&filterBy="+(D.filter||"all");\nB+="&"+this.getNetworkDistance(A);\nvar C=this;\nreturn new RestfulRequestItem(B,"GET",null,function(H){var G;\nif(H.entry){G=H.entry\n}else{G=[H]\n}var F=[];\nfor(var E=0;\nE<G.length;\nE++){F.push(C.createPersonFromJson(G[E]))\n}return new opensocial.Collection(F,H.startIndex,H.totalResults)\n})\n};\nRestfulContainer.prototype.createPersonFromJson=function(A){FieldTranslations.translateServerPersonToJsPerson(A);\nreturn new JsonPerson(A)\n};\nRestfulContainer.prototype.getFieldsList=function(A){if(this.hasNoKeys(A)||this.isWildcardKey(A[0])){return""\n}else{return"fields="+A.join(",")\n}};\nRestfulContainer.prototype.hasNoKeys=function(A){return !A||A.length==0\n};\nRestfulContainer.prototype.isWildcardKey=function(A){return A=="*"\n};\nRestfulContainer.prototype.newFetchPersonAppDataRequest=function(A,D,C){var B="/appdata/"+this.translateIdSpec(A)+"/@app?"+this.getNetworkDistance(A)+"&"+this.getFieldsList(D);\nreturn new RestfulRequestItem(B,"GET",null,function(E){return opensocial.Container.escape(E.entry,C,true)\n})\n};\nRestfulContainer.prototype.newUpdatePersonAppDataRequest=function(E,B,D){var A="/appdata/"+this.translateIdSpec(this.makeIdSpec(E))+"/@app?fields="+B;\nvar C={};\nC[B]=D;\nreturn new RestfulRequestItem(A,"POST",C)\n};\nRestfulContainer.prototype.newRemovePersonAppDataRequest=function(C,B){var A="/appdata/"+this.translateIdSpec(this.makeIdSpec(C))+"/@app?"+this.getFieldsList(B);\nreturn new RestfulRequestItem(A,"DELETE")\n};\nRestfulContainer.prototype.newFetchActivitiesRequest=function(A,C){var B="/activities/"+this.translateIdSpec(A)+"?appId=@app&"+this.getNetworkDistance(A);\nreturn new RestfulRequestItem(B,"GET",null,function(E){E=E.entry;\nvar F=[];\nfor(var D=0;\nD<E.length;\nD++){F.push(new JsonActivity(E[D]))\n}return new opensocial.Collection(F)\n})\n};\nRestfulContainer.prototype.newActivity=function(A){return new JsonActivity(A,true)\n};\nRestfulContainer.prototype.newMediaItem=function(C,A,B){B=B||{};\nB.mimeType=C;\nB.url=A;\nreturn new JsonMediaItem(B)\n};\nRestfulContainer.prototype.newCreateActivityRequest=function(A,C){var B="/activities/"+this.translateIdSpec(A)+"/@app?"+this.getNetworkDistance(A);\nreturn new RestfulRequestItem(B,"POST",C.toJsonObject())\n};\nvar RestfulRequestItem=function(C,D,A,B){this.url=C;\nthis.method=D;\nthis.postData=A;\nthis.processData=B||function(E){return E\n};\nthis.processResponse=function(E,H,G,F){return new opensocial.ResponseItem(E,G?null:this.processData(H),G,F)\n}\n};;\n\n      var requiredConfig = {\n        "impl": gadgets.config.NonEmptyStringValidator,\n        "path": gadgets.config.NonEmptyStringValidator,\n        "domain": gadgets.config.NonEmptyStringValidator,\n        "enableCaja": gadgets.config.BooleanValidator,\n        "supportedFields": gadgets.config.ExistsValidator\n      };\n\n      gadgets.config.register("opensocial-0.8", requiredConfig,\n        function(config) {\n          var configParams = config["opensocial-0.8"];\n          var path = configParams.path;\n          path = path.replace("%host%", document.location.host);\n\n          if (configParams.impl == "rpc") {\n            ShindigContainer = function() {\n              JsonRpcContainer.call(this, path,\n              configParams.domain, configParams.supportedFields);\n            };\n            ShindigContainer.inherits(JsonRpcContainer);\n          } else {\n            ShindigContainer = function() {\n              RestfulContainer.call(this, path,\n              configParams.domain, configParams.supportedFields);\n            };\n            ShindigContainer.inherits(RestfulContainer);\n          }\n\n          opensocial.Container.setContainer(new ShindigContainer());\n\n          if (configParams.enableCaja) {\n            opensocial.Container.get().enableCaja();\n          }\n      });\n    ;\nopensocial.Activity.MediaItem=opensocial.MediaItem;\nopensocial.newActivityMediaItem=opensocial.newMediaItem;\nopensocial.DataRequest.PersonId=opensocial.IdSpec.PersonId;\nopensocial.DataRequest.Group={OWNER_FRIENDS:"OWNER_FRIENDS",VIEWER_FRIENDS:"VIEWER_FRIENDS"};\nopensocial.DataRequest.prototype.newFetchPeopleRequest_v08=opensocial.DataRequest.prototype.newFetchPeopleRequest;\nopensocial.DataRequest.prototype.newFetchPeopleRequest=function(A,B){return this.newFetchPeopleRequest_v08(translateIdSpec(A),B)\n};\nopensocial.DataRequest.prototype.newFetchPersonAppDataRequest_v08=opensocial.DataRequest.prototype.newFetchPersonAppDataRequest;\nopensocial.DataRequest.prototype.newFetchPersonAppDataRequest=function(A,C,B){return this.newFetchPersonAppDataRequest_v08(translateIdSpec(A),C,B)\n};\nopensocial.DataRequest.prototype.newFetchActivitiesRequest_v08=opensocial.DataRequest.prototype.newFetchActivitiesRequest;\nopensocial.DataRequest.prototype.newFetchActivitiesRequest=function(A,C){var B=this.newFetchActivitiesRequest_v08(translateIdSpec(A),C);\nB.isActivityRequest=true;\nreturn B\n};\nopensocial.ResponseItem.prototype.getData_v08=opensocial.ResponseItem.prototype.getData;\nopensocial.ResponseItem.prototype.getData=function(){var A=this.getData_v08();\nif(this.getOriginalDataRequest()&&this.getOriginalDataRequest().isActivityRequest){return{activities:A}\n}return A\n};\nopensocial.Environment.ObjectType.ACTIVITY_MEDIA_ITEM=opensocial.Environment.ObjectType.MEDIA_ITEM;\nopensocial.Person.prototype.getField_v08=opensocial.Person.prototype.getField;\nopensocial.Person.prototype.getField=function(B,D){var E=this.getField_v08(B,D);\nif(B=="lookingFor"&&E){var C=new Array(E.length);\nfor(var A=0;\nA<E.length;\nA++){C[A]=E[A].getDisplayValue()\n}return C.join()\n}else{return E\n}};\nfunction translateIdSpec(A){if(A=="OWNER_FRIENDS"){return new opensocial.IdSpec({userId:"OWNER",groupId:"FRIENDS"})\n}else{if(A=="VIEWER_FRIENDS"){return new opensocial.IdSpec({userId:"VIEWER",groupId:"FRIENDS"})\n}else{return new opensocial.IdSpec({userId:A})\n}}};;\ngadgets.config.init({"rpc":{"useLegacyProtocol":false,"parentRelayUrl":"/rpc_relay.html"},"views":{"lightbox":{"isOnlyVisible":true,"urlTemplate":"http://localhost/gadgets/lightbox?{var}","aliases":[]},"preview":{"isOnlyVisible":true,"urlTemplate":"http://localhost/gadgets/preview?{var}","aliases":[]},"popup":{"isOnlyVisible":true,"urlTemplate":"http://localhost/gadgets/popup?{var}","aliases":[]},"config":{"isOnlyVisible":true,"urlTemplate":"http://localhost/gadgets/config?{var}","aliases":[]},"canvas":{"isOnlyVisible":true,"urlTemplate":"http://www24.glam.com/appdir/resources/canvas.html?{var}","aliases":[]},"config-small":{"isOnlyVisible":false,"urlTemplate":"http://localhost/gadgets/config-small?{var}","aliases":[]},"profile":{"isOnlyVisible":false,"urlTemplate":"http://localhost/gadgets/profile?{var}","aliases":[]}},"core.util":{"views":{},"opensocial-0.7":{},"glam.ads":{}},"glam.ads":{"adiframe":"http://www24.glam.com/appdir/resources/adiframe.html"},"core.io":{"jsonProxyUrl":"http://%host%/shindig/gadgets/makeRequest","proxyUrl":"http://%host%/shindig/gadgets/proxy?refresh=%refresh%&url=%url%"},"opensocial-0.8":{"impl":"rpc","domain":"shindig","path":"http://%host%/shindig/social","supportedFields":{"person":["id",{"name":["familyName","givenName","unstructured"]},"thumbnailUrl","profileUrl"],"activity":["id","title"]},"enableCaja":false}});\n\ngadgets.Prefs.setMessages_({});gadgets.Prefs.setDefaultPrefs_({});gadgets.io.preloaded_={};\nvar globals = {};\nglobals[\'gadgets\'] = gadgets;\ntry { globals[\'opensocial\'] = opensocial; } catch (e) {}\ntry { globals[\'glam\'] = glam; } catch (e) {}\nreturn globals; });</scri'+'pt><div>\n\n<script type="text/javascript">\n/***COMMON_EXTENDED_JS***/\nif(typeof TWIIGS=="undefined"||!TWIIGS){var TWIIGS={view:{},data:{}};(function(){if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=A[C].split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules;if(!I[A]){I[A]={versions:[],builds:[]};}var B=I[A],H=D.version,G=D.build,F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(var C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0};var B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\\/([^\\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\\//.test(B)){C.mobile="Apple";}else{A=B.match(/NokiaN[^\\/]*/);if(A){C.mobile=A[0];}}A=B.match(/AdobeAIR\\/([^\\s]*)/);if(A){C.air=A[0];}}if(!C.webkit){A=B.match(/Opera[\\s\\/]([^\\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\\/([^\\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\\s\\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var A=YAHOO.lang,C=["toString","valueOf"],B={isArray:function(D){if(D){return A.isNumber(D.length)&&A.isFunction(D.splice);}return false;},isBoolean:function(D){return typeof D==="boolean";},isFunction:function(D){return typeof D==="function";},isNull:function(D){return D===null;},isNumber:function(D){return typeof D==="number"&&isFinite(D);},isObject:function(D){return(D&&(typeof D==="object"||A.isFunction(D)))||false;},isString:function(D){return typeof D==="string";},isUndefined:function(D){return typeof D==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(F,E){for(var D=0;D<C.length;D=D+1){var H=C[D],G=E[H];if(A.isFunction(G)&&G!=Object.prototype[H]){F[H]=G;}}}:function(){},extend:function(H,I,G){if(!I||!H){throw new Error("extend failed, please check that "+"all dependencies are included.");}var E=function(){};E.prototype=I.prototype;H.prototype=new E();H.prototype.constructor=H;H.superclass=I.prototype;if(I.prototype.constructor==Object.prototype.constructor){I.prototype.constructor=I;}if(G){for(var D in G){if(A.hasOwnProperty(G,D)){H.prototype[D]=G[D];}}A._IEEnumFix(H.prototype,G);}},augmentObject:function(H,G){if(!G||!H){throw new Error("Absorb failed, verify dependencies.");}var D=arguments,F,I,E=D[2];if(E&&E!==true){for(F=2;F<D.length;F=F+1){H[D[F]]=G[D[F]];}}else{for(I in G){if(E||!(I in H)){H[I]=G[I];}}A._IEEnumFix(H,G);}},augmentProto:function(G,F){if(!F||!G){throw new Error("Augment failed, verify dependencies.");}var D=[G.prototype,F.prototype];for(var E=2;E<arguments.length;E=E+1){D.push(arguments[E]);}A.augmentObject.apply(this,D);},dump:function(D,I){var F,H,K=[],L="{...}",E="f(){...}",J=", ",G=" => ";if(!A.isObject(D)){return D+"";}else{if(D instanceof Date||("nodeType"in D&&"tagName"in D)){return D;}else{if(A.isFunction(D)){return E;}}}I=(A.isNumber(I))?I:3;if(A.isArray(D)){K.push("[");for(F=0,H=D.length;F<H;F=F+1){if(A.isObject(D[F])){K.push((I>0)?A.dump(D[F],I-1):L);}else{K.push(D[F]);}K.push(J);}if(K.length>1){K.pop();}K.push("]");}else{K.push("{");for(F in D){if(A.hasOwnProperty(D,F)){K.push(F+G);if(A.isObject(D[F])){K.push((I>0)?A.dump(D[F],I-1):L);}else{K.push(D[F]);}K.push(J);}}if(K.length>1){K.pop();}K.push("}");}return K.join("");},substitute:function(S,E,L){var I,H,G,O,P,R,N=[],F,J="dump",M=" ",D="{",Q="}";for(;;){I=S.lastIndexOf(D);if(I<0){break;}H=S.indexOf(Q,I);if(I+1>=H){break;}F=S.substring(I+1,H);O=F;R=null;G=O.indexOf(M);if(G>-1){R=O.substring(G+1);O=O.substring(0,G);}P=E[O];if(L){P=L(O,P,R);}if(A.isObject(P)){if(A.isArray(P)){P=A.dump(P,parseInt(R,10));}else{R=R||"";var K=R.indexOf(J);if(K>-1){R=R.substring(4);}if(P.toString===Object.prototype.toString||K>-1){P=A.dump(P,parseInt(R,10));}else{P=P.toString();}}}else{if(!A.isString(P)&&!A.isNumber(P)){P="~-"+N.length+"-~";N[N.length]=F;}}S=S.substring(0,I)+P+S.substring(H+1);}for(I=N.length-1;I>=0;I=I-1){S=S.replace(new RegExp("~-"+I+"-~"),"{"+N[I]+"}","g");}return S;},trim:function(D){try{return D.replace(/^\\s+|\\s+$/g,"");}catch(E){return D;}},merge:function(){var G={},E=arguments;for(var F=0,D=E.length;F<D;F=F+1){A.augmentObject(G,E[F],true);}return G;},later:function(K,E,L,G,H){K=K||0;E=E||{};var F=L,J=G,I,D;if(A.isString(L)){F=E[L];}if(!F){throw new TypeError("method undefined");}if(!A.isArray(J)){J=[G];}I=function(){F.apply(E,J);};D=(H)?setInterval(I,K):setTimeout(I,K);return{interval:H,cancel:function(){if(this.interval){clearInterval(D);}else{clearTimeout(D);}}};},isValue:function(D){return(A.isObject(D)||A.isString(D)||A.isNumber(D)||A.isBoolean(D));}};A.hasOwnProperty=(Object.prototype.hasOwnProperty)?function(D,E){return D&&D.hasOwnProperty(E);}:function(D,E){return!A.isUndefined(D[E])&&D.constructor.prototype[E]!==D[E];};B.augmentObject(A,B,true);YAHOO.util.Lang=A;A.augment=A.augmentProto;YAHOO.augment=A.augmentProto;YAHOO.extend=A.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.5.2",build:"1076"});(function(){var B=YAHOO.util,K,I,J={},F={},M=window.document;YAHOO.env._id_counter=YAHOO.env._id_counter||0;var C=YAHOO.env.ua.opera,L=YAHOO.env.ua.webkit,A=YAHOO.env.ua.gecko,G=YAHOO.env.ua.ie;var E={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i,OP_SCROLL:/^(?:inline|table-row)$/i};var N=function(P){if(!E.HYPHEN.test(P)){return P;}if(J[P]){return J[P];}var Q=P;while(E.HYPHEN.exec(Q)){Q=Q.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}J[P]=Q;return Q;};var O=function(Q){var P=F[Q];if(!P){P=new RegExp("(?:^|\\\\s+)"+Q+"(?:\\\\s+|$)");F[Q]=P;}return P;};if(M.defaultView&&M.defaultView.getComputedStyle){K=function(P,S){var R=null;if(S=="float"){S="cssFloat";}var Q=P.ownerDocument.defaultView.getComputedStyle(P,"");if(Q){R=Q[N(S)];}return P.style[S]||R;};}else{if(M.documentElement.currentStyle&&G){K=function(P,R){switch(N(R)){case"opacity":var T=100;try{T=P.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(S){try{T=P.filters("alpha").opacity;}catch(S){}}return T/100;case"float":R="styleFloat";default:var Q=P.currentStyle?P.currentStyle[R]:null;return(P.style[R]||Q);}};}else{K=function(P,Q){return P.style[Q];};}}if(G){I=function(P,Q,R){switch(Q){case"opacity":if(YAHOO.lang.isString(P.style.filter)){P.style.filter="alpha(opacity="+R*100+")";if(!P.currentStyle||!P.currentStyle.hasLayout){P.style.zoom=1;}}break;case"float":Q="styleFloat";default:P.style[Q]=R;}};}else{I=function(P,Q,R){if(Q=="float"){Q="cssFloat";}P.style[Q]=R;};}var D=function(P,Q){return P&&P.nodeType==1&&(!Q||Q(P));};YAHOO.util.Dom={get:function(R){if(R&&(R.nodeType||R.item)){return R;}if(YAHOO.lang.isString(R)||!R){return M.getElementById(R);}if(R.length!==undefined){var S=[];for(var Q=0,P=R.length;Q<P;++Q){S[S.length]=B.Dom.get(R[Q]);}return S;}return R;},getStyle:function(P,R){R=N(R);var Q=function(S){return K(S,R);};return B.Dom.batch(P,Q,B.Dom,true);},setStyle:function(P,R,S){R=N(R);var Q=function(T){I(T,R,S);};B.Dom.batch(P,Q,B.Dom,true);},getXY:function(P){var Q=function(R){if((R.parentNode===null||R.offsetParent===null||this.getStyle(R,"display")=="none")&&R!=R.ownerDocument.body){return false;}return H(R);};return B.Dom.batch(P,Q,B.Dom,true);},getX:function(P){var Q=function(R){return B.Dom.getXY(R)[0];};return B.Dom.batch(P,Q,B.Dom,true);},getY:function(P){var Q=function(R){return B.Dom.getXY(R)[1];};return B.Dom.batch(P,Q,B.Dom,true);},setXY:function(P,S,R){var Q=function(V){var U=this.getStyle(V,"position");if(U=="static"){this.setStyle(V,"position","relative");U="relative";}var X=this.getXY(V);if(X===false){return false;}var W=[parseInt(this.getStyle(V,"left"),10),parseInt(this.getStyle(V,"top"),10)];if(isNaN(W[0])){W[0]=(U=="relative")?0:V.offsetLeft;}if(isNaN(W[1])){W[1]=(U=="relative")?0:V.offsetTop;}if(S[0]!==null){V.style.left=S[0]-X[0]+W[0]+"px";}if(S[1]!==null){V.style.top=S[1]-X[1]+W[1]+"px";}if(!R){var T=this.getXY(V);if((S[0]!==null&&T[0]!=S[0])||(S[1]!==null&&T[1]!=S[1])){this.setXY(V,S,true);}}};B.Dom.batch(P,Q,B.Dom,true);},setX:function(Q,P){B.Dom.setXY(Q,[P,null]);},setY:function(P,Q){B.Dom.setXY(P,[null,Q]);},getRegion:function(P){var Q=function(R){if((R.parentNode===null||R.offsetParent===null||this.getStyle(R,"display")=="none")&&R!=R.ownerDocument.body){return false;}var S=B.Region.getRegion(R);return S;};return B.Dom.batch(P,Q,B.Dom,true);},getClientWidth:function(){return B.Dom.getViewportWidth();},getClientHeight:function(){return B.Dom.getViewportHeight();},getElementsByClassName:function(T,X,U,V){X=X||"*";U=(U)?B.Dom.get(U):null||M;if(!U){return[];}var Q=[],P=U.getElementsByTagName(X),W=O(T);for(var R=0,S=P.length;R<S;++R){if(W.test(P[R].className)){Q[Q.length]=P[R];if(V){V.call(P[R],P[R]);}}}return Q;},hasClass:function(R,Q){var P=O(Q);var S=function(T){return P.test(T.className);};return B.Dom.batch(R,S,B.Dom,true);},addClass:function(Q,P){var R=function(S){if(this.hasClass(S,P)){return false;}S.className=YAHOO.lang.trim([S.className,P].join(" "));return true;};return B.Dom.batch(Q,R,B.Dom,true);},removeClass:function(R,Q){var P=O(Q);var S=function(T){if(!Q||!this.hasClass(T,Q)){return false;}var U=T.className;T.className=U.replace(P," ");if(this.hasClass(T,Q)){this.removeClass(T,Q);}T.className=YAHOO.lang.trim(T.className);return true;};return B.Dom.batch(R,S,B.Dom,true);},replaceClass:function(S,Q,P){if(!P||Q===P){return false;}var R=O(Q);var T=function(U){if(!this.hasClass(U,Q)){this.addClass(U,P);return true;}U.className=U.className.replace(R," "+P+" ");if(this.hasClass(U,Q)){this.replaceClass(U,Q,P);}U.className=YAHOO.lang.trim(U.className);return true;};return B.Dom.batch(S,T,B.Dom,true);},generateId:function(P,R){R=R||"yui-gen";var Q=function(S){if(S&&S.id){return S.id;}var T=R+YAHOO.env._id_counter++;if(S){S.id=T;}return T;};return B.Dom.batch(P,Q,B.Dom,true)||Q.apply(B.Dom,arguments);},isAncestor:function(P,Q){P=B.Dom.get(P);Q=B.Dom.get(Q);if(!P||!Q){return false;}if(P.contains&&Q.nodeType&&!L){return P.contains(Q);}else{if(P.compareDocumentPosition&&Q.nodeType){return!!(P.compareDocumentPosition(Q)&16);}else{if(Q.nodeType){return!!this.getAncestorBy(Q,function(R){return R==P;});}}}return false;},inDocument:function(P){return this.isAncestor(M.documentElement,P);},getElementsBy:function(W,Q,R,T){Q=Q||"*";R=(R)?B.Dom.get(R):null||M;if(!R){return[];}var S=[],V=R.getElementsByTagName(Q);for(var U=0,P=V.length;U<P;++U){if(W(V[U])){S[S.length]=V[U];if(T){T(V[U]);}}}return S;},batch:function(T,W,V,R){T=(T&&(T.tagName||T.item))?T:B.Dom.get(T);if(!T||!W){return false;}var S=(R)?V:window;if(T.tagName||T.length===undefined){return W.call(S,T,V);}var U=[];for(var Q=0,P=T.length;Q<P;++Q){U[U.length]=W.call(S,T[Q],V);}return U;},getDocumentHeight:function(){var Q=(M.compatMode!="CSS1Compat")?M.body.scrollHeight:M.documentElement.scrollHeight;var P=Math.max(Q,B.Dom.getViewportHeight());return P;},getDocumentWidth:function(){var Q=(M.compatMode!="CSS1Compat")?M.body.scrollWidth:M.documentElement.scrollWidth;var P=Math.max(Q,B.Dom.getViewportWidth());return P;},getViewportHeight:function(){var P=self.innerHeight;var Q=M.compatMode;if((Q||G)&&!C){P=(Q=="CSS1Compat")?M.documentElement.clientHeight:M.body.clientHeight;}return P;},getViewportWidth:function(){var P=self.innerWidth;var Q=M.compatMode;if(Q||G){P=(Q=="CSS1Compat")?M.documentElement.clientWidth:M.body.clientWidth;}return P;},getAncestorBy:function(P,Q){while(P=P.parentNode){if(D(P,Q)){return P;}}return null;},getAncestorByClassName:function(Q,P){Q=B.Dom.get(Q);if(!Q){return null;}var R=function(S){return B.Dom.hasClass(S,P);};return B.Dom.getAncestorBy(Q,R);},getAncestorByTagName:function(Q,P){Q=B.Dom.get(Q);if(!Q){return null;}var R=function(S){return S.tagName&&S.tagName.toUpperCase()==P.toUpperCase();};return B.Dom.getAncestorBy(Q,R);},getPreviousSiblingBy:function(P,Q){while(P){P=P.previousSibling;if(D(P,Q)){return P;}}return null;},getPreviousSibling:function(P){P=B.Dom.get(P);if(!P){return null;}return B.Dom.getPreviousSiblingBy(P);},getNextSiblingBy:function(P,Q){while(P){P=P.nextSibling;if(D(P,Q)){return P;}}return null;},getNextSibling:function(P){P=B.Dom.get(P);if(!P){return null;}return B.Dom.getNextSiblingBy(P);},getFirstChildBy:function(P,R){var Q=(D(P.firstChild,R))?P.firstChild:null;return Q||B.Dom.getNextSiblingBy(P.firstChild,R);},getFirstChild:function(P,Q){P=B.Dom.get(P);if(!P){return null;}return B.Dom.getFirstChildBy(P);},getLastChildBy:function(P,R){if(!P){return null;}var Q=(D(P.lastChild,R))?P.lastChild:null;return Q||B.Dom.getPreviousSiblingBy(P.lastChild,R);},getLastChild:function(P){P=B.Dom.get(P);return B.Dom.getLastChildBy(P);},getChildrenBy:function(Q,S){var R=B.Dom.getFirstChildBy(Q,S);var P=R?[R]:[];B.Dom.getNextSiblingBy(R,function(T){if(!S||S(T)){P[P.length]=T;}return false;});return P;},getChildren:function(P){P=B.Dom.get(P);if(!P){}return B.Dom.getChildrenBy(P);},getDocumentScrollLeft:function(P){P=P||M;return Math.max(P.documentElement.scrollLeft,P.body.scrollLeft);},getDocumentScrollTop:function(P){P=P||M;return Math.max(P.documentElement.scrollTop,P.body.scrollTop);},insertBefore:function(Q,P){Q=B.Dom.get(Q);P=B.Dom.get(P);if(!Q||!P||!P.parentNode){return null;}return P.parentNode.insertBefore(Q,P);},insertAfter:function(Q,P){Q=B.Dom.get(Q);P=B.Dom.get(P);if(!Q||!P||!P.parentNode){return null;}if(P.nextSibling){return P.parentNode.insertBefore(Q,P.nextSibling);}else{return P.parentNode.appendChild(Q);}},getClientRegion:function(){var R=B.Dom.getDocumentScrollTop(),Q=B.Dom.getDocumentScrollLeft(),S=B.Dom.getViewportWidth()+Q,P=B.Dom.getViewportHeight()+R;return new B.Region(R,S,P,Q);}};var H=function(){if(M.documentElement.getBoundingClientRect){return function(Q){var R=Q.getBoundingClientRect();var P=Q.ownerDocument;return[R.left+B.Dom.getDocumentScrollLeft(P),R.top+B.Dom.getDocumentScrollTop(P)];};}else{return function(R){var S=[R.offsetLeft,R.offsetTop];var Q=R.offsetParent;var P=(L&&B.Dom.getStyle(R,"position")=="absolute"&&R.offsetParent==R.ownerDocument.body);if(Q!=R){while(Q){S[0]+=Q.offsetLeft;S[1]+=Q.offsetTop;if(!P&&L&&B.Dom.getStyle(Q,"position")=="absolute"){P=true;}Q=Q.offsetParent;}}if(P){S[0]-=R.ownerDocument.body.offsetLeft;S[1]-=R.ownerDocument.body.offsetTop;}Q=R.parentNode;while(Q.tagName&&!E.ROOT_TAG.test(Q.tagName)){if(Q.scrollTop||Q.scrollLeft){if(!E.OP_SCROLL.test(B.Dom.getStyle(Q,"display"))){if(!C||B.Dom.getStyle(Q,"overflow")!=="visible"){S[0]-=Q.scrollLeft;S[1]-=Q.scrollTop;}}}Q=Q.parentNode;}return S;};}}();})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this[0]=B;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.5.2",build:"1076"});YAHOO.util.CustomEvent=function(D,B,C,A){this.type=D;this.scope=B||window;this.silent=C;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(B,C,A){if(!B){throw new Error("Invalid callback for subscriber to \'"+this.type+"\'");}if(this.subscribeEvent){this.subscribeEvent.fire(B,C,A);}this.subscribers.push(new YAHOO.util.Subscriber(B,C,A));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true;}}return E;},fire:function(){this.lastError=null;var K=[],E=this.subscribers.length;if(!E&&this.silent){return true;}var I=[].slice.call(arguments,0),G=true,D,J=false;if(!this.silent){}var C=this.subscribers.slice(),A=YAHOO.util.Event.throwErrors;for(D=0;D<E;++D){var M=C[D];if(!M){J=true;}else{if(!this.silent){}var L=M.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var B=null;if(I.length>0){B=I[0];}try{G=M.fn.call(L,B,M.obj);}catch(F){this.lastError=F;if(A){throw F;}}}else{try{G=M.fn.call(L,this.type,I,M.obj);}catch(H){this.lastError=H;if(A){throw H;}}}if(false===G){if(!this.silent){}break;}}}return(G!==false);},unsubscribeAll:function(){for(var A=this.subscribers.length-1;A>-1;A--){this._delete(A);}this.subscribers=[];return A;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers.splice(A,1);},toString:function(){return"CustomEvent: "+"\'"+this.type+"\', "+"scope: "+this.scope;}};YAHOO.util.Subscriber=function(B,C,A){this.fn=B;this.obj=YAHOO.lang.isUndefined(C)?null:C;this.override=A;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){var K=this;var L=function(){K._tryPreloadAttach();};this._interval=setInterval(L,this.POLL_INTERVAL);}},onAvailable:function(P,M,Q,O,N){var K=(YAHOO.lang.isString(P))?[P]:P;for(var L=0;L<K.length;L=L+1){F.push({id:K[L],fn:M,obj:Q,override:O,checkReady:N});}C=this.POLL_RETRYS;this.startInterval();},onContentReady:function(M,K,N,L){this.onAvailable(M,K,N,L,true);},onDOMReady:function(K,M,L){if(this.DOMReady){setTimeout(function(){var N=window;if(L){if(L===true){N=M;}else{N=L;}}K.call(N,"DOMReady",[],M);},0);}else{this.DOMReadyEvent.subscribe(K,M,L);}},addListener:function(M,K,V,Q,L){if(!V||!V.call){return false;}if(this._isValidCollection(M)){var W=true;for(var R=0,T=M.length;R<T;++R){W=this.on(M[R],K,V,Q,L)&&W;}return W;}else{if(YAHOO.lang.isString(M)){var P=this.getEl(M);if(P){M=P;}else{this.onAvailable(M,function(){YAHOO.util.Event.on(M,K,V,Q,L);});return true;}}}if(!M){return false;}if("unload"==K&&Q!==this){J[J.length]=[M,K,V,Q,L];return true;}var Y=M;if(L){if(L===true){Y=Q;}else{Y=L;}}var N=function(Z){return V.call(Y,YAHOO.util.Event.getEvent(Z,M),Q);};var X=[M,K,V,N,Y,Q,L];var S=I.length;I[S]=X;if(this.useLegacyEvent(M,K)){var O=this.getLegacyIndex(M,K);if(O==-1||M!=G[O][0]){O=G.length;B[M.id+K]=O;G[O]=[M,K,M["on"+K]];E[O]=[];M["on"+K]=function(Z){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(Z),O);};}E[O].push(X);}else{try{this._simpleAdd(M,K,N,false);}catch(U){this.lastError=U;this.removeListener(M,K,V);return false;}}return true;},fireLegacyEvent:function(O,M){var Q=true,K,S,R,T,P;S=E[M].slice();for(var L=0,N=S.length;L<N;++L){R=S[L];if(R&&R[this.WFN]){T=R[this.ADJ_SCOPE];P=R[this.WFN].call(T,O);Q=(Q&&P);}}K=G[M];if(K&&K[2]){K[2](O);}return Q;},getLegacyIndex:function(L,M){var K=this.generateId(L)+M;if(typeof B[K]=="undefined"){return-1;}else{return B[K];}},useLegacyEvent:function(L,M){if(this.webkit&&("click"==M||"dblclick"==M)){var K=parseInt(this.webkit,10);if(!isNaN(K)&&K<418){return true;}}return false;},removeListener:function(L,K,T){var O,R,V;if(typeof L=="string"){L=this.getEl(L);}else{if(this._isValidCollection(L)){var U=true;for(O=L.length-1;O>-1;O--){U=(this.removeListener(L[O],K,T)&&U);}return U;}}if(!T||!T.call){return this.purgeElement(L,false,K);}if("unload"==K){for(O=J.length-1;O>-1;O--){V=J[O];if(V&&V[0]==L&&V[1]==K&&V[2]==T){J.splice(O,1);return true;}}return false;}var P=null;var Q=arguments[3];if("undefined"===typeof Q){Q=this._getCacheIndex(L,K,T);}if(Q>=0){P=I[Q];}if(!L||!P){return false;}if(this.useLegacyEvent(L,K)){var N=this.getLegacyIndex(L,K);var M=E[N];if(M){for(O=0,R=M.length;O<R;++O){V=M[O];if(V&&V[this.EL]==L&&V[this.TYPE]==K&&V[this.FN]==T){M.splice(O,1);break;}}}}else{try{this._simpleRemove(L,K,P[this.WFN],false);}catch(S){this.lastError=S;return false;}}delete I[Q][this.WFN];delete I[Q][this.FN];I.splice(Q,1);return true;},getTarget:function(M,L){var K=M.target||M.srcElement;return this.resolveTextNode(K);},resolveTextNode:function(L){try{if(L&&3==L.nodeType){return L.parentNode;}}catch(K){}return L;},getPageX:function(L){var K=L.pageX;if(!K&&0!==K){K=L.clientX||0;if(this.isIE){K+=this._getScrollLeft();}}return K;},getPageY:function(K){var L=K.pageY;if(!L&&0!==L){L=K.clientY||0;if(this.isIE){L+=this._getScrollTop();}}return L;},getXY:function(K){return[this.getPageX(K),this.getPageY(K)];},getRelatedTarget:function(L){var K=L.relatedTarget;if(!K){if(L.type=="mouseout"){K=L.toElement;}else{if(L.type=="mouseover"){K=L.fromElement;}}}return this.resolveTextNode(K);},getTime:function(M){if(!M.time){var L=new Date().getTime();try{M.time=L;}catch(K){this.lastError=K;return L;}}return M.time;},stopEvent:function(K){this.stopPropagation(K);this.preventDefault(K);},stopPropagation:function(K){if(K.stopPropagation){K.stopPropagation();}else{K.cancelBubble=true;}},preventDefault:function(K){if(K.preventDefault){K.preventDefault();}else{K.returnValue=false;}},getEvent:function(M,K){var L=M||window.event;if(!L){var N=this.getEvent.caller;while(N){L=N.arguments[0];if(L&&Event==L.constructor){break;}N=N.caller;}}return L;},getCharCode:function(L){var K=L.keyCode||L.charCode||0;if(YAHOO.env.ua.webkit&&(K in D)){K=D[K];}return K;},_getCacheIndex:function(O,P,N){for(var M=0,L=I.length;M<L;M=M+1){var K=I[M];if(K&&K[this.FN]==N&&K[this.EL]==O&&K[this.TYPE]==P){return M;}}return-1;},generateId:function(K){var L=K.id;if(!L){L="yuievtautoid-"+A;++A;K.id=L;}return L;},_isValidCollection:function(L){try{return(L&&typeof L!=="string"&&L.length&&!L.tagName&&!L.alert&&typeof L[0]!=="undefined");}catch(K){return false;}},elCache:{},getEl:function(K){return(typeof K==="string")?document.getElementById(K):K;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(L){if(!H){H=true;var K=YAHOO.util.Event;K._ready();K._tryPreloadAttach();}},_ready:function(L){var K=YAHOO.util.Event;if(!K.DOMReady){K.DOMReady=true;K.DOMReadyEvent.fire();K._simpleRemove(document,"DOMContentLoaded",K._ready);}},_tryPreloadAttach:function(){if(F.length===0){C=0;clearInterval(this._interval);this._interval=null;return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var Q=!H;if(!Q){Q=(C>0&&F.length>0);}var P=[];var R=function(T,U){var S=T;if(U.override){if(U.override===true){S=U.obj;}else{S=U.override;}}U.fn.call(S,U.obj);};var L,K,O,N,M=[];for(L=0,K=F.length;L<K;L=L+1){O=F[L];if(O){N=this.getEl(O.id);if(N){if(O.checkReady){if(H||N.nextSibling||!Q){M.push(O);F[L]=null;}}else{R(N,O);F[L]=null;}}else{P.push(O);}}}for(L=0,K=M.length;L<K;L=L+1){O=M[L];R(this.getEl(O.id),O);}C--;if(Q){for(L=F.length-1;L>-1;L--){O=F[L];if(!O||!O.id){F.splice(L,1);}}this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;},purgeElement:function(O,P,R){var M=(YAHOO.lang.isString(O))?this.getEl(O):O;var Q=this.getListeners(M,R),N,K;if(Q){for(N=Q.length-1;N>-1;N--){var L=Q[N];this.removeListener(M,L.type,L.fn);}}if(P&&M&&M.childNodes){for(N=0,K=M.childNodes.length;N<K;++N){this.purgeElement(M.childNodes[N],P,R);}}},getListeners:function(M,K){var P=[],L;if(!K){L=[I,J];}else{if(K==="unload"){L=[J];}else{L=[I];}}var R=(YAHOO.lang.isString(M))?this.getEl(M):M;for(var O=0;O<L.length;O=O+1){var T=L[O];if(T){for(var Q=0,S=T.length;Q<S;++Q){var N=T[Q];if(N&&N[this.EL]===R&&(!K||K===N[this.TYPE])){P.push({type:N[this.TYPE],fn:N[this.FN],obj:N[this.OBJ],adjust:N[this.OVERRIDE],scope:N[this.ADJ_SCOPE],index:Q});}}}}return(P.length)?P:null;},_unload:function(Q){var K=YAHOO.util.Event,N,M,L,P,O,R=J.slice();for(N=0,P=J.length;N<P;++N){L=R[N];if(L){var S=window;if(L[K.ADJ_SCOPE]){if(L[K.ADJ_SCOPE]===true){S=L[K.UNLOAD_OBJ];}else{S=L[K.ADJ_SCOPE];}}L[K.FN].call(S,K.getEvent(Q,L[K.EL]),L[K.UNLOAD_OBJ]);R[N]=null;L=null;S=null;}}J=null;if(I){for(M=I.length-1;M>-1;M--){L=I[M];if(L){K.removeListener(L[K.EL],L[K.TYPE],L[K.FN],M);}}L=null;}G=null;K._simpleRemove(window,"unload",K._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var K=document.documentElement,L=document.body;if(K&&(K.scrollTop||K.scrollLeft)){return[K.scrollTop,K.scrollLeft];}else{if(L){return[L.scrollTop,L.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(M,N,L,K){M.addEventListener(N,L,(K));};}else{if(window.attachEvent){return function(M,N,L,K){M.attachEvent("on"+N,L);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(M,N,L,K){M.removeEventListener(N,L,(K));};}else{if(window.detachEvent){return function(L,M,K){L.detachEvent("on"+M,K);};}else{return function(){};}}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;if(EU.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null;}catch(ex){}},EU.POLL_INTERVAL);}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,override:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].override);}}}return I[G];},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null;}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F]);}return G.fire.apply(G,B);},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true;}}return false;}};YAHOO.util.KeyListener=function(A,F,B,C){if(!A){}else{if(!F){}else{if(!B){}}}if(!C){C=YAHOO.util.KeyListener.KEYDOWN;}var D=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof A=="string"){A=document.getElementById(A);}if(typeof B=="function"){D.subscribe(B);}else{D.subscribe(B.fn,B.scope,B.correctScope);}function E(J,I){if(!F.shift){F.shift=false;}if(!F.alt){F.alt=false;}if(!F.ctrl){F.ctrl=false;}if(J.shiftKey==F.shift&&J.altKey==F.alt&&J.ctrlKey==F.ctrl){var G;if(F.keys instanceof Array){for(var H=0;H<F.keys.length;H++){G=F.keys[H];if(G==J.charCode){D.fire(J.charCode,J);break;}else{if(G==J.keyCode){D.fire(J.keyCode,J);break;}}}}else{G=F.keys;if(G==J.charCode){D.fire(J.charCode,J);}else{if(G==J.keyCode){D.fire(J.keyCode,J);}}}}}this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(A,C,E);this.enabledEvent.fire(F);}this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(A,C,E);this.disabledEvent.fire(F);}this.enabled=false;};this.toString=function(){return"KeyListener ["+F.keys+"] "+A.tagName+(A.id?"["+A.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.util.KeyListener.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};YAHOO.register("event",YAHOO.util.Event,{version:"2.5.2",build:"1076"});YAHOO.register("yahoo-dom-event",YAHOO,{version:"2.5.2",build:"1076"});YAHOO.util.Get=function(){var M={},L=0,Q=0,E=false,N=YAHOO.env.ua,R=YAHOO.lang;var J=function(V,S,W){var T=W||window,X=T.document,Y=X.createElement(V);for(var U in S){if(S[U]&&YAHOO.lang.hasOwnProperty(S,U)){Y.setAttribute(U,S[U]);}}return Y;};var H=function(S,T,V){var U=V||"utf-8";return J("link",{"id":"yui__dyn_"+(Q++),"type":"text/css","charset":U,"rel":"stylesheet","href":S},T);};var O=function(S,T,V){var U=V||"utf-8";return J("script",{"id":"yui__dyn_"+(Q++),"type":"text/javascript","charset":U,"src":S},T);};var A=function(S,T){return{tId:S.tId,win:S.win,data:S.data,nodes:S.nodes,msg:T,purge:function(){D(this.tId);}};};var B=function(S,V){var T=M[V],U=(R.isString(S))?T.win.document.getElementById(S):S;if(!U){P(V,"target node not found: "+S);}return U;};var P=function(V,U){var S=M[V];if(S.onFailure){var T=S.scope||S.win;S.onFailure.call(T,A(S,U));}};var C=function(V){var S=M[V];S.finished=true;if(S.aborted){var U="transaction "+V+" was aborted";P(V,U);return;}if(S.onSuccess){var T=S.scope||S.win;S.onSuccess.call(T,A(S));}};var G=function(U,Y){var T=M[U];if(T.aborted){var W="transaction "+U+" was aborted";P(U,W);return;}if(Y){T.url.shift();if(T.varName){T.varName.shift();}}else{T.url=(R.isString(T.url))?[T.url]:T.url;if(T.varName){T.varName=(R.isString(T.varName))?[T.varName]:T.varName;}}var b=T.win,a=b.document,Z=a.getElementsByTagName("head")[0],V;if(T.url.length===0){if(T.type==="script"&&N.webkit&&N.webkit<420&&!T.finalpass&&!T.varName){var X=O(null,T.win,T.charset);X.innerHTML=\'YAHOO.util.Get._finalize("\'+U+\'");\';T.nodes.push(X);Z.appendChild(X);}else{C(U);}return;}var S=T.url[0];if(T.type==="script"){V=O(S,b,T.charset);}else{V=H(S,b,T.charset);}F(T.type,V,U,S,b,T.url.length);T.nodes.push(V);if(T.insertBefore){var c=B(T.insertBefore,U);if(c){c.parentNode.insertBefore(V,c);}}else{Z.appendChild(V);}if((N.webkit||N.gecko)&&T.type==="css"){G(U,S);}};var K=function(){if(E){return;}E=true;for(var S in M){var T=M[S];if(T.autopurge&&T.finished){D(T.tId);delete M[S];}}E=false;};var D=function(Z){var W=M[Z];if(W){var Y=W.nodes,S=Y.length,X=W.win.document,V=X.getElementsByTagName("head")[0];if(W.insertBefore){var U=B(W.insertBefore,Z);if(U){V=U.parentNode;}}for(var T=0;T<S;T=T+1){V.removeChild(Y[T]);}}W.nodes=[];};var I=function(T,S,U){var W="q"+(L++);U=U||{};if(L%YAHOO.util.Get.PURGE_THRESH===0){K();}M[W]=R.merge(U,{tId:W,type:T,url:S,finished:false,nodes:[]});var V=M[W];V.win=V.win||window;V.scope=V.scope||V.win;V.autopurge=("autopurge"in V)?V.autopurge:(T==="script")?true:false;R.later(0,V,G,W);return{tId:W};};var F=function(b,W,V,T,X,Y,a){var Z=a||G;if(N.ie){W.onreadystatechange=function(){var c=this.readyState;if("loaded"===c||"complete"===c){Z(V,T);}};}else{if(N.webkit){if(b==="script"){if(N.webkit>=420){W.addEventListener("load",function(){Z(V,T);});}else{var S=M[V];if(S.varName){var U=YAHOO.util.Get.POLL_FREQ;S.maxattempts=YAHOO.util.Get.TIMEOUT/U;S.attempts=0;S._cache=S.varName[0].split(".");S.timer=R.later(U,S,function(h){var e=this._cache,d=e.length,c=this.win,f;for(f=0;f<d;f=f+1){c=c[e[f]];if(!c){this.attempts++;if(this.attempts++>this.maxattempts){var g="Over retry limit, giving up";S.timer.cancel();P(V,g);}else{}return;}}S.timer.cancel();Z(V,T);},null,true);}else{R.later(YAHOO.util.Get.POLL_FREQ,null,Z,[V,T]);}}}}else{W.onload=function(){Z(V,T);};}}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(S){R.later(0,null,C,S);},abort:function(T){var U=(R.isString(T))?T:T.tId;var S=M[U];if(S){S.aborted=true;}},script:function(S,T){return I("script",S,T);},css:function(S,T){return I("css",S,T);}};}();YAHOO.register("get",YAHOO.util.Get,{version:"2.5.2",build:"1076"});YAHOO.util.Connect={_msxml_progid:["Microsoft.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:"application/x-www-form-urlencoded; charset=UTF-8",_default_form_header:"application/x-www-form-urlencoded",_use_default_xhr_header:true,_default_xhr_header:"XMLHttpRequest",_has_default_headers:true,_default_headers:{},_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,_submitElementValue:null,_hasSubmitListener:(function(){if(YAHOO.util.Event){YAHOO.util.Event.addListener(document,"click",function(B){var A=YAHOO.util.Event.getTarget(B);if(A.nodeName.toLowerCase()=="input"&&(A.type&&A.type.toLowerCase()=="submit")){YAHOO.util.Connect._submitElementValue=encodeURIComponent(A.name)+"="+encodeURIComponent(A.value);}});return true;}return false;})(),startEvent:new YAHOO.util.CustomEvent("start"),completeEvent:new YAHOO.util.CustomEvent("complete"),successEvent:new YAHOO.util.CustomEvent("success"),failureEvent:new YAHOO.util.CustomEvent("failure"),uploadEvent:new YAHOO.util.CustomEvent("upload"),abortEvent:new YAHOO.util.CustomEvent("abort"),_customEvents:{onStart:["startEvent","start"],onComplete:["completeEvent","complete"],onSuccess:["successEvent","success"],onFailure:["failureEvent","failure"],onUpload:["uploadEvent","upload"],onAbort:["abortEvent","abort"]},setProgId:function(A){this._msxml_progid.unshift(A);YAHOO.log("ActiveX Program Id  "+A+" added to _msxml_progid.","info","Connection");},setDefaultPostHeader:function(A){if(typeof A=="string"){this._default_post_header=A;YAHOO.log("Default POST header set to  "+A,"info","Connection");}else{if(typeof A=="boolean"){this._use_default_post_header=A;}}},setDefaultXhrHeader:function(A){if(typeof A=="string"){this._default_xhr_header=A;YAHOO.log("Default XHR header set to  "+A,"info","Connection");}else{this._use_default_xhr_header=A;}},setPollingInterval:function(A){if(typeof A=="number"&&isFinite(A)){this._polling_interval=A;YAHOO.log("Default polling interval set to "+A+"ms","info","Connection");}},createXhrObject:function(E){var D,A;try{A=new XMLHttpRequest();D={conn:A,tId:E};YAHOO.log("XHR object created for transaction "+E,"info","Connection");}catch(C){for(var B=0;B<this._msxml_progid.length;++B){try{A=new ActiveXObject(this._msxml_progid[B]);D={conn:A,tId:E};YAHOO.log("ActiveX XHR object created for transaction "+E,"info","Connection");break;}catch(C){}}}finally{return D;}},getConnectionObject:function(A){var C;var D=this._transaction_id;try{if(!A){C=this.createXhrObject(D);}else{C={};C.tId=D;C.isUpload=true;}if(C){this._transaction_id++;}}catch(B){}finally{return C;}},asyncRequest:function(F,C,E,A){var D=(this._isFileUpload)?this.getConnectionObject(true):this.getConnectionObject();var B=(E&&E.argument)?E.argument:null;if(!D){YAHOO.log("Unable to create connection object.","error","Connection");return null;}else{if(E&&E.customevents){this.initCustomEvents(D,E);}if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(D,E,C,A);return D;}if(F.toUpperCase()=="GET"){if(this._sFormData.length!==0){C+=((C.indexOf("?")==-1)?"?":"&")+this._sFormData;}}else{if(F.toUpperCase()=="POST"){A=A?this._sFormData+"&"+A:this._sFormData;}}}if(F.toUpperCase()=="GET"&&(E&&E.cache===false)){C+=((C.indexOf("?")==-1)?"?":"&")+"rnd="+new Date().valueOf().toString();}D.conn.open(F,C,true);if(this._use_default_xhr_header){if(!this._default_headers["X-Requested-With"]){this.initHeader("X-Requested-With",this._default_xhr_header,true);YAHOO.log("Initialize transaction header X-Request-Header to XMLHttpRequest.","info","Connection");}}if((F.toUpperCase()=="POST"&&this._use_default_post_header)&&this._isFormSubmit===false){this.initHeader("Content-Type",this._default_post_header);YAHOO.log("Initialize header Content-Type to application/x-www-form-urlencoded; UTF-8 for POST transaction.","info","Connection");}if(this._has_default_headers||this._has_http_headers){this.setHeader(D);}this.handleReadyState(D,E);D.conn.send(A||"");YAHOO.log("Transaction "+D.tId+" sent.","info","Connection");if(this._isFormSubmit===true){this.resetFormState();}this.startEvent.fire(D,B);if(D.startEvent){D.startEvent.fire(D,B);}return D;}},initCustomEvents:function(A,C){for(var B in C.customevents){if(this._customEvents[B][0]){A[this._customEvents[B][0]]=new YAHOO.util.CustomEvent(this._customEvents[B][1],(C.scope)?C.scope:null);YAHOO.log("Transaction-specific Custom Event "+A[this._customEvents[B][1]]+" created.","info","Connection");A[this._customEvents[B][0]].subscribe(C.customevents[B]);YAHOO.log("Transaction-specific Custom Event "+A[this._customEvents[B][1]]+" subscribed.","info","Connection");}}},handleReadyState:function(C,D){var B=this;var A=(D&&D.argument)?D.argument:null;if(D&&D.timeout){this._timeOut[C.tId]=window.setTimeout(function(){B.abort(C,D,true);},D.timeout);}this._poll[C.tId]=window.setInterval(function(){if(C.conn&&C.conn.readyState===4){window.clearInterval(B._poll[C.tId]);delete B._poll[C.tId];if(D&&D.timeout){window.clearTimeout(B._timeOut[C.tId]);delete B._timeOut[C.tId];}B.completeEvent.fire(C,A);if(C.completeEvent){C.completeEvent.fire(C,A);}B.handleTransactionResponse(C,D);}},this._polling_interval);},handleTransactionResponse:function(F,G,A){var D,C;var B=(G&&G.argument)?G.argument:null;try{if(F.conn.status!==undefined&&F.conn.status!==0){D=F.conn.status;}else{D=13030;}}catch(E){D=13030;}if(D>=200&&D<300||D===1223){C=this.createResponseObject(F,B);if(G&&G.success){if(!G.scope){G.success(C);YAHOO.log("Success callback. HTTP code is "+D,"info","Connection");}else{G.success.apply(G.scope,[C]);YAHOO.log("Success callback with scope. HTTP code is "+D,"info","Connection");}}this.successEvent.fire(C);if(F.successEvent){F.successEvent.fire(C);}}else{switch(D){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:C=this.createExceptionObject(F.tId,B,(A?A:false));if(G&&G.failure){if(!G.scope){G.failure(C);YAHOO.log("Failure callback. Exception detected. Status code is "+D,"warn","Connection");}else{G.failure.apply(G.scope,[C]);YAHOO.log("Failure callback with scope. Exception detected. Status code is "+D,"warn","Connection");}}break;default:C=this.createResponseObject(F,B);if(G&&G.failure){if(!G.scope){G.failure(C);YAHOO.log("Failure callback. HTTP status code is "+D,"warn","Connection");}else{G.failure.apply(G.scope,[C]);YAHOO.log("Failure callback with scope. HTTP status code is "+D,"warn","Connection");}}}this.failureEvent.fire(C);if(F.failureEvent){F.failureEvent.fire(C);}}this.releaseObject(F);C=null;},createResponseObject:function(A,G){var D={};var I={};try{var C=A.conn.getAllResponseHeaders();var F=C.split("\\n");for(var E=0;E<F.length;E++){var B=F[E].indexOf(":");if(B!=-1){I[F[E].substring(0,B)]=F[E].substring(B+2);}}}catch(H){}D.tId=A.tId;D.status=(A.conn.status==1223)?204:A.conn.status;D.statusText=(A.conn.status==1223)?"No Content":A.conn.statusText;D.getResponseHeader=I;D.getAllResponseHeaders=C;D.responseText=A.conn.responseText;D.responseXML=A.conn.responseXML;if(G){D.argument=G;}return D;},createExceptionObject:function(H,D,A){var F=0;var G="communication failure";var C=-1;var B="transaction aborted";var E={};E.tId=H;if(A){E.status=C;E.statusText=B;}else{E.status=F;E.statusText=G;}if(D){E.argument=D;}return E;},initHeader:function(A,D,C){var B=(C)?this._default_headers:this._http_headers;B[A]=D;if(C){this._has_default_headers=true;}else{this._has_http_headers=true;}},setHeader:function(A){if(this._has_default_headers){for(var B in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,B)){A.conn.setRequestHeader(B,this._default_headers[B]);YAHOO.log("Default HTTP header "+B+" set with value of "+this._default_headers[B],"info","Connection");}}}if(this._has_http_headers){for(var B in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,B)){A.conn.setRequestHeader(B,this._http_headers[B]);YAHOO.log("HTTP header "+B+" set with value of "+this._http_headers[B],"info","Connection");}}delete this._http_headers;this._http_headers={};this._has_http_headers=false;}},resetDefaultHeaders:function(){delete this._default_headers;this._default_headers={};this._has_default_headers=false;},setForm:function(K,E,B){this.resetFormState();var J;if(typeof K=="string"){J=(document.getElementById(K)||document.forms[K]);}else{if(typeof K=="object"){J=K;}else{YAHOO.log("Unable to create form object "+K,"warn","Connection");return;}}if(E){var F=this.createFrame((window.location.href.toLowerCase().indexOf("https")===0||B)?true:false);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=J;return;}var A,I,G,L;var H=false;for(var D=0;D<J.elements.length;D++){A=J.elements[D];L=A.disabled;I=A.name;G=A.value;if(!L&&I){switch(A.type){case"select-one":case"select-multiple":for(var C=0;C<A.options.length;C++){if(A.options[C].selected){if(window.ActiveXObject){this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(A.options[C].attributes["value"].specified?A.options[C].value:A.options[C].text)+"&";}else{this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(A.options[C].hasAttribute("value")?A.options[C].value:A.options[C].text)+"&";}}}break;case"radio":case"checkbox":if(A.checked){this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(G)+"&";}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(H===false){if(this._hasSubmitListener&&this._submitElementValue){this._sFormData+=this._submitElementValue+"&";}else{this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(G)+"&";}H=true;}break;default:this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(G)+"&";}}}this._isFormSubmit=true;this._sFormData=this._sFormData.substr(0,this._sFormData.length-1);YAHOO.log("Form initialized for transaction. HTML form POST message is: "+this._sFormData,"info","Connection");this.initHeader("Content-Type",this._default_form_header);YAHOO.log("Initialize header Content-Type to application/x-www-form-urlencoded for setForm() transaction.","info","Connection");return this._sFormData;},resetFormState:function(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData="";},createFrame:function(A){var B="yuiIO"+this._transaction_id;var C;if(window.ActiveXObject){C=document.createElement(\'<iframe id="\'+B+\'" name="\'+B+\'" />\');if(typeof A=="boolean"){C.src="javascript:false";}}else{C=document.createElement("iframe");C.id=B;C.name=B;}C.style.position="absolute";C.style.top="-1000px";C.style.left="-1000px";document.body.appendChild(C);YAHOO.log("File upload iframe created. Id is:"+B,"info","Connection");},appendPostData:function(A){var D=[];var B=A.split("&");for(var C=0;C<B.length;C++){var E=B[C].indexOf("=");if(E!=-1){D[C]=document.createElement("input");D[C].type="hidden";D[C].name=B[C].substring(0,E);D[C].value=B[C].substring(E+1);this._formNode.appendChild(D[C]);}}return D;},uploadFile:function(D,M,E,C){var N=this;var H="yuiIO"+D.tId;var I="multipart/form-data";var K=document.getElementById(H);var J=(M&&M.argument)?M.argument:null;var B={action:this._formNode.getAttribute("action"),method:this._formNode.getAttribute("method"),target:this._formNode.getAttribute("target")};this._formNode.setAttribute("action",E);this._formNode.setAttribute("method","POST");this._formNode.setAttribute("target",H);if(YAHOO.env.ua.ie){this._formNode.setAttribute("encoding",I);}else{this._formNode.setAttribute("enctype",I);}if(C){var L=this.appendPostData(C);}this._formNode.submit();this.startEvent.fire(D,J);if(D.startEvent){D.startEvent.fire(D,J);}if(M&&M.timeout){this._timeOut[D.tId]=window.setTimeout(function(){N.abort(D,M,true);},M.timeout);}if(L&&L.length>0){for(var G=0;G<L.length;G++){this._formNode.removeChild(L[G]);}}for(var A in B){if(YAHOO.lang.hasOwnProperty(B,A)){if(B[A]){this._formNode.setAttribute(A,B[A]);}else{this._formNode.removeAttribute(A);}}}this.resetFormState();var F=function(){if(M&&M.timeout){window.clearTimeout(N._timeOut[D.tId]);delete N._timeOut[D.tId];}N.completeEvent.fire(D,J);if(D.completeEvent){D.completeEvent.fire(D,J);}var P={};P.tId=D.tId;P.argument=M.argument;try{P.responseText=K.contentWindow.document.body?K.contentWindow.document.body.innerHTML:K.contentWindow.document.documentElement.textContent;P.responseXML=K.contentWindow.document.XMLDocument?K.contentWindow.document.XMLDocument:K.contentWindow.document;}catch(O){}if(M&&M.upload){if(!M.scope){M.upload(P);YAHOO.log("Upload callback.","info","Connection");}else{M.upload.apply(M.scope,[P]);YAHOO.log("Upload callback with scope.","info","Connection");}}N.uploadEvent.fire(P);if(D.uploadEvent){D.uploadEvent.fire(P);}YAHOO.util.Event.removeListener(K,"load",F);setTimeout(function(){document.body.removeChild(K);N.releaseObject(D);YAHOO.log("File upload iframe destroyed. Id is:"+H,"info","Connection");},100);};YAHOO.util.Event.addListener(K,"load",F);},abort:function(E,G,A){var D;var B=(G&&G.argument)?G.argument:null;if(E&&E.conn){if(this.isCallInProgress(E)){E.conn.abort();window.clearInterval(this._poll[E.tId]);delete this._poll[E.tId];if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId];}D=true;}}else{if(E&&E.isUpload===true){var C="yuiIO"+E.tId;var F=document.getElementById(C);if(F){YAHOO.util.Event.removeListener(F,"load");document.body.removeChild(F);YAHOO.log("File upload iframe destroyed. Id is:"+C,"info","Connection");if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId];}D=true;}}else{D=false;}}if(D===true){this.abortEvent.fire(E,B);if(E.abortEvent){E.abortEvent.fire(E,B);}this.handleTransactionResponse(E,G,true);YAHOO.log("Transaction "+E.tId+" aborted.","info","Connection");}return D;},isCallInProgress:function(B){if(B&&B.conn){return B.conn.readyState!==4&&B.conn.readyState!==0;}else{if(B&&B.isUpload===true){var A="yuiIO"+B.tId;return document.getElementById(A)?true:false;}else{return false;}}},releaseObject:function(A){if(A&&A.conn){A.conn=null;YAHOO.log("Connection object for transaction "+A.tId+" destroyed.","info","Connection");A=null;}}};YAHOO.register("connection",YAHOO.util.Connect,{version:"2.5.2",build:"1076"});(function(){var B=YAHOO.util;var A=function(D,C,E,F){if(!D){}this.init(D,C,E,F);};A.NAME="Anim";A.prototype={toString:function(){var C=this.getEl()||{};var D=C.id||C.tagName;return(this.constructor.NAME+": "+D);},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(C,E,D){return this.method(this.currentFrame,E,D-E,this.totalFrames);},setAttribute:function(C,E,D){if(this.patterns.noNegatives.test(C)){E=(E>0)?E:0;}B.Dom.setStyle(this.getEl(),C,E+D);},getAttribute:function(C){var E=this.getEl();var G=B.Dom.getStyle(E,C);if(G!=="auto"&&!this.patterns.offsetUnit.test(G)){return parseFloat(G);}var D=this.patterns.offsetAttribute.exec(C)||[];var H=!!(D[3]);var F=!!(D[2]);if(F||(B.Dom.getStyle(E,"position")=="absolute"&&H)){G=E["offset"+D[0].charAt(0).toUpperCase()+D[0].substr(1)];}else{G=0;}return G;},getDefaultUnit:function(C){if(this.patterns.defaultUnit.test(C)){return"px";}return"";},setRuntimeAttribute:function(D){var I;var E;var F=this.attributes;this.runtimeAttributes[D]={};var H=function(J){return(typeof J!=="undefined");};if(!H(F[D]["to"])&&!H(F[D]["by"])){return false;}I=(H(F[D]["from"]))?F[D]["from"]:this.getAttribute(D);if(H(F[D]["to"])){E=F[D]["to"];}else{if(H(F[D]["by"])){if(I.constructor==Array){E=[];for(var G=0,C=I.length;G<C;++G){E[G]=I[G]+F[D]["by"][G]*1;}}else{E=I+F[D]["by"]*1;}}}this.runtimeAttributes[D].start=I;this.runtimeAttributes[D].end=E;this.runtimeAttributes[D].unit=(H(F[D].unit))?F[D]["unit"]:this.getDefaultUnit(D);return true;},init:function(E,J,I,C){var D=false;var F=null;var H=0;E=B.Dom.get(E);this.attributes=J||{};this.duration=!YAHOO.lang.isUndefined(I)?I:1;this.method=C||B.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=B.AnimMgr.fps;this.setEl=function(M){E=B.Dom.get(M);};this.getEl=function(){return E;};this.isAnimated=function(){return D;};this.getStartTime=function(){return F;};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false;}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(B.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1;}B.AnimMgr.registerElement(this);return true;};this.stop=function(M){if(!this.isAnimated()){return false;}if(M){this.currentFrame=this.totalFrames;this._onTween.fire();}B.AnimMgr.stop(this);};var L=function(){this.onStart.fire();this.runtimeAttributes={};for(var M in this.attributes){this.setRuntimeAttribute(M);}D=true;H=0;F=new Date();};var K=function(){var O={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};O.toString=function(){return("duration: "+O.duration+", currentFrame: "+O.currentFrame);};this.onTween.fire(O);var N=this.runtimeAttributes;for(var M in N){this.setAttribute(M,this.doMethod(M,N[M].start,N[M].end),N[M].unit);}H+=1;};var G=function(){var M=(new Date()-F)/1000;var N={duration:M,frames:H,fps:H/M};N.toString=function(){return("duration: "+N.duration+", frames: "+N.frames+", fps: "+N.fps);};D=false;H=0;this.onComplete.fire(N);};this._onStart=new B.CustomEvent("_start",this,true);this.onStart=new B.CustomEvent("start",this);this.onTween=new B.CustomEvent("tween",this);this._onTween=new B.CustomEvent("_tween",this,true);this.onComplete=new B.CustomEvent("complete",this);this._onComplete=new B.CustomEvent("_complete",this,true);this._onStart.subscribe(L);this._onTween.subscribe(K);this._onComplete.subscribe(G);}};B.Anim=A;})();YAHOO.util.AnimMgr=new function(){var C=null;var B=[];var A=0;this.fps=1000;this.delay=1;this.registerElement=function(F){B[B.length]=F;A+=1;F._onStart.fire();this.start();};this.unRegister=function(G,F){F=F||E(G);if(!G.isAnimated()||F==-1){return false;}G._onComplete.fire();B.splice(F,1);A-=1;if(A<=0){this.stop();}return true;};this.start=function(){if(C===null){C=setInterval(this.run,this.delay);}};this.stop=function(H){if(!H){clearInterval(C);for(var G=0,F=B.length;G<F;++G){this.unRegister(B[0],0);}B=[];C=null;A=0;}else{this.unRegister(H);}};this.run=function(){for(var H=0,F=B.length;H<F;++H){var G=B[H];if(!G||!G.isAnimated()){continue;}if(G.currentFrame<G.totalFrames||G.totalFrames===null){G.currentFrame+=1;if(G.useSeconds){D(G);}G._onTween.fire();}else{YAHOO.util.AnimMgr.stop(G,H);}}};var E=function(H){for(var G=0,F=B.length;G<F;++G){if(B[G]==H){return G;}}return-1;};var D=function(G){var J=G.totalFrames;var I=G.currentFrame;var H=(G.currentFrame*G.duration*1000/G.totalFrames);var F=(new Date()-G.getStartTime());var K=0;if(F<G.duration*1000){K=Math.round((F/H-1)*G.currentFrame);}else{K=J-(I+1);}if(K>0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1);}G.currentFrame+=K;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B<F;++B){C[B]=[E[B][0],E[B][1]];}for(var A=1;A<F;++A){for(B=0;B<F-A;++B){C[B][0]=(1-D)*C[B][0]+D*C[parseInt(B+1,10)][0];C[B][1]=(1-D)*C[B][1]+D*C[parseInt(B+1,10)][1];}}return[C[0][0],C[0][1]];};};(function(){var A=function(F,E,G,H){A.superclass.constructor.call(this,F,E,G,H);};A.NAME="ColorAnim";var C=YAHOO.util;YAHOO.extend(A,C.Anim);var D=A.superclass;var B=A.prototype;B.patterns.color=/color$/i;B.patterns.rgb=/^rgb\\(([0-9]+)\\s*,\\s*([0-9]+)\\s*,\\s*([0-9]+)\\)$/i;B.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;B.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;B.patterns.transparent=/^transparent|rgba\\(0, 0, 0, 0\\)$/;B.parseColor=function(E){if(E.length==3){return E;}var F=this.patterns.hex.exec(E);if(F&&F.length==4){return[parseInt(F[1],16),parseInt(F[2],16),parseInt(F[3],16)];}F=this.patterns.rgb.exec(E);if(F&&F.length==4){return[parseInt(F[1],10),parseInt(F[2],10),parseInt(F[3],10)];}F=this.patterns.hex3.exec(E);if(F&&F.length==4){return[parseInt(F[1]+F[1],16),parseInt(F[2]+F[2],16),parseInt(F[3]+F[3],16)];}return null;};B.getAttribute=function(E){var G=this.getEl();if(this.patterns.color.test(E)){var H=YAHOO.util.Dom.getStyle(G,E);if(this.patterns.transparent.test(H)){var F=G.parentNode;H=C.Dom.getStyle(F,E);while(F&&this.patterns.transparent.test(H)){F=F.parentNode;H=C.Dom.getStyle(F,E);if(F.tagName.toUpperCase()=="HTML"){H="#fff";}}}}else{H=D.getAttribute.call(this,E);}return H;};B.doMethod=function(F,J,G){var I;if(this.patterns.color.test(F)){I=[];for(var H=0,E=J.length;H<E;++H){I[H]=D.doMethod.call(this,F,J[H],G[H]);}I="rgb("+Math.floor(I[0])+","+Math.floor(I[1])+","+Math.floor(I[2])+")";}else{I=D.doMethod.call(this,F,J,G);}return I;};B.setRuntimeAttribute=function(F){D.setRuntimeAttribute.call(this,F);if(this.patterns.color.test(F)){var H=this.attributes;var J=this.parseColor(this.runtimeAttributes[F].start);var G=this.parseColor(this.runtimeAttributes[F].end);if(typeof H[F]["to"]==="undefined"&&typeof H[F]["by"]!=="undefined"){G=this.parseColor(H[F].by);for(var I=0,E=J.length;I<E;++I){G[I]=J[I]+G[I];}}this.runtimeAttributes[F].start=J;this.runtimeAttributes[F].end=G;}};C.ColorAnim=A;})();YAHOO.util.Easing={easeNone:function(B,A,D,C){return D*B/C+A;},easeIn:function(B,A,D,C){return D*(B/=C)*B+A;},easeOut:function(B,A,D,C){return-D*(B/=C)*(B-2)+A;},easeBoth:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B+A;}return-D/2*((--B)*(B-2)-1)+A;},easeInStrong:function(B,A,D,C){return D*(B/=C)*B*B*B+A;},easeOutStrong:function(B,A,D,C){return-D*((B=B/C-1)*B*B*B-1)+A;},easeBothStrong:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B*B*B+A;}return-D/2*((B-=2)*B*B*B-2)+A;},elasticIn:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return-(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;},elasticOut:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return B*Math.pow(2,-10*C)*Math.sin((C*F-D)*(2*Math.PI)/E)+G+A;},elasticBoth:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F/2)==2){return A+G;}if(!E){E=F*(0.3*1.5);}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}if(C<1){return-0.5*(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;}return B*Math.pow(2,-10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E)*0.5+G+A;},backIn:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*(B/=D)*B*((C+1)*B-C)+A;},backOut:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*((B=B/D-1)*B*((C+1)*B+C)+1)+A;},backBoth:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}if((B/=D/2)<1){return E/2*(B*B*(((C*=(1.525))+1)*B-C))+A;}return E/2*((B-=2)*B*(((C*=(1.525))+1)*B+C)+2)+A;},bounceIn:function(B,A,D,C){return D-YAHOO.util.Easing.bounceOut(C-B,0,D,C)+A;},bounceOut:function(B,A,D,C){if((B/=C)<(1/2.75)){return D*(7.5625*B*B)+A;}else{if(B<(2/2.75)){return D*(7.5625*(B-=(1.5/2.75))*B+0.75)+A;}else{if(B<(2.5/2.75)){return D*(7.5625*(B-=(2.25/2.75))*B+0.9375)+A;}}}return D*(7.5625*(B-=(2.625/2.75))*B+0.984375)+A;},bounceBoth:function(B,A,D,C){if(B<C/2){return YAHOO.util.Easing.bounceIn(B*2,0,D,C)*0.5+A;}return YAHOO.util.Easing.bounceOut(B*2-C,0,D,C)*0.5+D*0.5+A;}};(function(){var A=function(H,G,I,J){if(H){A.superclass.constructor.call(this,H,G,I,J);}};A.NAME="Motion";var E=YAHOO.util;YAHOO.extend(A,E.ColorAnim);var F=A.superclass;var C=A.prototype;C.patterns.points=/^points$/i;C.setAttribute=function(G,I,H){if(this.patterns.points.test(G)){H=H||"px";F.setAttribute.call(this,"left",I[0],H);F.setAttribute.call(this,"top",I[1],H);}else{F.setAttribute.call(this,G,I,H);}};C.getAttribute=function(G){if(this.patterns.points.test(G)){var H=[F.getAttribute.call(this,"left"),F.getAttribute.call(this,"top")];}else{H=F.getAttribute.call(this,G);}return H;};C.doMethod=function(G,K,H){var J=null;if(this.patterns.points.test(G)){var I=this.method(this.currentFrame,0,100,this.totalFrames)/100;J=E.Bezier.getPosition(this.runtimeAttributes[G],I);}else{J=F.doMethod.call(this,G,K,H);}return J;};C.setRuntimeAttribute=function(P){if(this.patterns.points.test(P)){var H=this.getEl();var J=this.attributes;var G;var L=J["points"]["control"]||[];var I;var M,O;if(L.length>0&&!(L[0]instanceof Array)){L=[L];}else{var K=[];for(M=0,O=L.length;M<O;++M){K[M]=L[M];}L=K;}if(E.Dom.getStyle(H,"position")=="static"){E.Dom.setStyle(H,"position","relative");}if(D(J["points"]["from"])){E.Dom.setXY(H,J["points"]["from"]);}else{E.Dom.setXY(H,E.Dom.getXY(H));}G=this.getAttribute("points");if(D(J["points"]["to"])){I=B.call(this,J["points"]["to"],G);var N=E.Dom.getXY(this.getEl());for(M=0,O=L.length;M<O;++M){L[M]=B.call(this,L[M],G);}}else{if(D(J["points"]["by"])){I=[G[0]+J["points"]["by"][0],G[1]+J["points"]["by"][1]];for(M=0,O=L.length;M<O;++M){L[M]=[G[0]+L[M][0],G[1]+L[M][1]];}}}this.runtimeAttributes[P]=[G];if(L.length>0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L);}this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I;}else{F.setRuntimeAttribute.call(this,P);}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G=[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G;};var D=function(G){return(typeof G!=="undefined");};E.Motion=A;})();(function(){var D=function(F,E,G,H){if(F){D.superclass.constructor.call(this,F,E,G,H);}};D.NAME="Scroll";var B=YAHOO.util;YAHOO.extend(D,B.ColorAnim);var C=D.superclass;var A=D.prototype;A.doMethod=function(E,H,F){var G=null;if(E=="scroll"){G=[this.method(this.currentFrame,H[0],F[0]-H[0],this.totalFrames),this.method(this.currentFrame,H[1],F[1]-H[1],this.totalFrames)];}else{G=C.doMethod.call(this,E,H,F);}return G;};A.getAttribute=function(E){var G=null;var F=this.getEl();if(E=="scroll"){G=[F.scrollLeft,F.scrollTop];}else{G=C.getAttribute.call(this,E);}return G;};A.setAttribute=function(E,H,G){var F=this.getEl();if(E=="scroll"){F.scrollLeft=H[0];F.scrollTop=H[1];}else{C.setAttribute.call(this,E,H,G);}};B.Scroll=D;})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.5.2",build:"1076"});(function(){YAHOO.util.Config=function(D){if(D){this.init(D);}};var B=YAHOO.lang,C=YAHOO.util.CustomEvent,A=YAHOO.util.Config;A.CONFIG_CHANGED_EVENT="configChanged";A.BOOLEAN_TYPE="boolean";A.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(D){this.owner=D;this.configChangedEvent=this.createEvent(A.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=C.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[];},checkBoolean:function(D){return(typeof D==A.BOOLEAN_TYPE);},checkNumber:function(D){return(!isNaN(D));},fireEvent:function(D,F){var E=this.config[D];if(E&&E.event){E.event.fire(F);}},addProperty:function(E,D){E=E.toLowerCase();this.config[E]=D;D.event=this.createEvent(E,{scope:this.owner});D.event.signature=C.LIST;D.key=E;if(D.handler){D.event.subscribe(D.handler,this.owner);}this.setProperty(E,D.value,true);if(!D.suppressEvent){this.queueProperty(E,D.value);}},getConfig:function(){var D={},F,E;for(F in this.config){E=this.config[F];if(E&&E.event){D[F]=E.value;}}return D;},getProperty:function(D){var E=this.config[D.toLowerCase()];if(E&&E.event){return E.value;}else{return undefined;}},resetProperty:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event){if(this.initialConfig[D]&&!B.isUndefined(this.initialConfig[D])){this.setProperty(D,this.initialConfig[D]);return true;}}else{return false;}},setProperty:function(E,G,D){var F;E=E.toLowerCase();if(this.queueInProgress&&!D){this.queueProperty(E,G);return true;}else{F=this.config[E];if(F&&F.event){if(F.validator&&!F.validator(G)){return false;}else{F.value=G;if(!D){this.fireEvent(E,G);this.configChangedEvent.fire([E,G]);}return true;}}else{return false;}}},queueProperty:function(S,P){S=S.toLowerCase();var R=this.config[S],K=false,J,G,H,I,O,Q,F,M,N,D,L,T,E;if(R&&R.event){if(!B.isUndefined(P)&&R.validator&&!R.validator(P)){return false;}else{if(!B.isUndefined(P)){R.value=P;}else{P=R.value;}K=false;J=this.eventQueue.length;for(L=0;L<J;L++){G=this.eventQueue[L];if(G){H=G[0];I=G[1];if(H==S){this.eventQueue[L]=null;this.eventQueue.push([S,(!B.isUndefined(P)?P:I)]);K=true;break;}}}if(!K&&!B.isUndefined(P)){this.eventQueue.push([S,P]);}}if(R.supercedes){O=R.supercedes.length;for(T=0;T<O;T++){Q=R.supercedes[T];F=this.eventQueue.length;for(E=0;E<F;E++){M=this.eventQueue[E];if(M){N=M[0];D=M[1];if(N==Q.toLowerCase()){this.eventQueue.push([N,D]);this.eventQueue[E]=null;break;}}}}}return true;}else{return false;}},refireEvent:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event&&!B.isUndefined(E.value)){if(this.queueInProgress){this.queueProperty(D);}else{this.fireEvent(D,E.value);}}},applyConfig:function(D,G){var F,E;if(G){E={};for(F in D){if(B.hasOwnProperty(D,F)){E[F.toLowerCase()]=D[F];}}this.initialConfig=E;}for(F in D){if(B.hasOwnProperty(D,F)){this.queueProperty(F,D[F]);}}},refresh:function(){var D;for(D in this.config){this.refireEvent(D);}},fireQueue:function(){var E,H,D,G,F;this.queueInProgress=true;for(E=0;E<this.eventQueue.length;E++){H=this.eventQueue[E];if(H){D=H[0];G=H[1];F=this.config[D];F.value=G;this.fireEvent(D,G);}}this.queueInProgress=false;this.eventQueue=[];},subscribeToConfigEvent:function(E,F,H,D){var G=this.config[E.toLowerCase()];if(G&&G.event){if(!A.alreadySubscribed(G.event,F,H)){G.event.subscribe(F,H,D);}return true;}else{return false;}},unsubscribeFromConfigEvent:function(D,E,G){var F=this.config[D.toLowerCase()];if(F&&F.event){return F.event.unsubscribe(E,G);}else{return false;}},toString:function(){var D="Config";if(this.owner){D+=" ["+this.owner.toString()+"]";}return D;},outputEventQueue:function(){var D="",G,E,F=this.eventQueue.length;for(E=0;E<F;E++){G=this.eventQueue[E];if(G){D+=G[0]+"="+G[1]+", ";}}return D;},destroy:function(){var E=this.config,D,F;for(D in E){if(B.hasOwnProperty(E,D)){F=E[D];F.event.unsubscribeAll();F.event=null;}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null;}};A.alreadySubscribed=function(E,H,I){var F=E.subscribers.length,D,G;if(F>0){G=F-1;do{D=E.subscribers[G];if(D&&D.obj==I&&D.fn==H){return true;}}while(G--);}return false;};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Module=function(Q,P){if(Q){this.init(Q,P);}else{}};var F=YAHOO.util.Dom,D=YAHOO.util.Config,M=YAHOO.util.Event,L=YAHOO.util.CustomEvent,G=YAHOO.widget.Module,H,O,N,E,A={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTORY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},I={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:false}};G.IMG_ROOT=null;G.IMG_ROOT_SSL=null;G.CSS_MODULE="yui-module";G.CSS_HEADER="hd";G.CSS_BODY="bd";G.CSS_FOOTER="ft";G.RESIZE_MONITOR_SECURE_URL="javascript:false;";G.textResizeEvent=new L("textResize");function K(){if(!H){H=document.createElement("div");H.innerHTML=(\'<div class="\'+G.CSS_HEADER+\'"></div>\'+\'<div class="\'+G.CSS_BODY+\'"></div><div class="\'+G.CSS_FOOTER+\'"></div>\');O=H.firstChild;N=O.nextSibling;E=N.nextSibling;}return H;}function J(){if(!O){K();}return(O.cloneNode(false));}function B(){if(!N){K();}return(N.cloneNode(false));}function C(){if(!E){K();}return(E.cloneNode(false));}G.prototype={constructor:G,element:null,header:null,body:null,footer:null,id:null,imageRoot:G.IMG_ROOT,initEvents:function(){var P=L.LIST;this.beforeInitEvent=this.createEvent(A.BEFORE_INIT);this.beforeInitEvent.signature=P;this.initEvent=this.createEvent(A.INIT);this.initEvent.signature=P;this.appendEvent=this.createEvent(A.APPEND);this.appendEvent.signature=P;this.beforeRenderEvent=this.createEvent(A.BEFORE_RENDER);this.beforeRenderEvent.signature=P;this.renderEvent=this.createEvent(A.RENDER);this.renderEvent.signature=P;this.changeHeaderEvent=this.createEvent(A.CHANGE_HEADER);this.changeHeaderEvent.signature=P;this.changeBodyEvent=this.createEvent(A.CHANGE_BODY);this.changeBodyEvent.signature=P;this.changeFooterEvent=this.createEvent(A.CHANGE_FOOTER);this.changeFooterEvent.signature=P;this.changeContentEvent=this.createEvent(A.CHANGE_CONTENT);this.changeContentEvent.signature=P;this.destroyEvent=this.createEvent(A.DESTORY);this.destroyEvent.signature=P;this.beforeShowEvent=this.createEvent(A.BEFORE_SHOW);this.beforeShowEvent.signature=P;this.showEvent=this.createEvent(A.SHOW);this.showEvent.signature=P;this.beforeHideEvent=this.createEvent(A.BEFORE_HIDE);this.beforeHideEvent.signature=P;this.hideEvent=this.createEvent(A.HIDE);this.hideEvent.signature=P;},platform:function(){var P=navigator.userAgent.toLowerCase();if(P.indexOf("windows")!=-1||P.indexOf("win32")!=-1){return"windows";}else{if(P.indexOf("macintosh")!=-1){return"mac";}else{return false;}}}(),browser:function(){var P=navigator.userAgent.toLowerCase();if(P.indexOf("opera")!=-1){return"opera";}else{if(P.indexOf("msie 7")!=-1){return"ie7";}else{if(P.indexOf("msie")!=-1){return"ie";}else{if(P.indexOf("safari")!=-1){return"safari";}else{if(P.indexOf("gecko")!=-1){return"gecko";}else{return false;}}}}}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true;}else{return false;}}(),initDefaultConfig:function(){this.cfg.addProperty(I.VISIBLE.key,{handler:this.configVisible,value:I.VISIBLE.value,validator:I.VISIBLE.validator});this.cfg.addProperty(I.EFFECT.key,{suppressEvent:I.EFFECT.suppressEvent,supercedes:I.EFFECT.supercedes});this.cfg.addProperty(I.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:I.MONITOR_RESIZE.value});this.cfg.addProperty(I.APPEND_TO_DOCUMENT_BODY.key,{value:I.APPEND_TO_DOCUMENT_BODY.value});},init:function(U,T){var R,V;this.initEvents();this.beforeInitEvent.fire(G);this.cfg=new D(this);if(this.isSecure){this.imageRoot=G.IMG_ROOT_SSL;}if(typeof U=="string"){R=U;U=document.getElementById(U);if(!U){U=(K()).cloneNode(false);U.id=R;}}this.element=U;if(U.id){this.id=U.id;}V=this.element.firstChild;if(V){var Q=false,P=false,S=false;do{if(1==V.nodeType){if(!Q&&F.hasClass(V,G.CSS_HEADER)){this.header=V;Q=true;}else{if(!P&&F.hasClass(V,G.CSS_BODY)){this.body=V;P=true;}else{if(!S&&F.hasClass(V,G.CSS_FOOTER)){this.footer=V;S=true;}}}}}while((V=V.nextSibling));}this.initDefaultConfig();F.addClass(this.element,G.CSS_MODULE);if(T){this.cfg.applyConfig(T,true);}if(!D.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true);}this.initEvent.fire(G);},initResizeMonitor:function(){var Q=(YAHOO.env.ua.gecko&&this.platform=="windows");if(Q){var P=this;setTimeout(function(){P._initResizeMonitor();},0);}else{this._initResizeMonitor();}},_initResizeMonitor:function(){var P,R,T;function V(){G.textResizeEvent.fire();}if(!YAHOO.env.ua.opera){R=F.get("_yuiResizeMonitor");var U=this._supportsCWResize();if(!R){R=document.createElement("iframe");if(this.isSecure&&G.RESIZE_MONITOR_SECURE_URL&&YAHOO.env.ua.ie){R.src=G.RESIZE_MONITOR_SECURE_URL;}if(!U){T=["<html><head><script ",\'type="text/javascript">\',"window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();};<","/scri'+'pt></head>","<body></body></html>"].join("");R.src="data:text/html;charset=utf-8,"+encodeURIComponent(T);}R.id="_yuiResizeMonitor";R.style.position="absolute";R.style.visibility="hidden";var Q=document.body,S=Q.firstChild;if(S){Q.insertBefore(R,S);}else{Q.appendChild(R);}R.style.width="10em";R.style.height="10em";R.style.top=(-1*R.offsetHeight)+"px";R.style.left=(-1*R.offsetWidth)+"px";R.style.borderWidth="0";R.style.visibility="visible";if(YAHOO.env.ua.webkit){P=R.contentWindow.document;P.open();P.close();}}if(R&&R.contentWindow){G.textResizeEvent.subscribe(this.onDomResize,this,true);if(!G.textResizeInitialized){if(U){if(!M.on(R.contentWindow,"resize",V)){M.on(R,"resize",V);}}G.textResizeInitialized=true;}this.resizeMonitor=R;}}},_supportsCWResize:function(){var P=true;if(YAHOO.env.ua.gecko&&YAHOO.env.ua.gecko<=1.8){P=false;}return P;},onDomResize:function(S,R){var Q=-1*this.resizeMonitor.offsetWidth,P=-1*this.resizeMonitor.offsetHeight;this.resizeMonitor.style.top=P+"px";this.resizeMonitor.style.left=Q+"px";},setHeader:function(Q){var P=this.header||(this.header=J());if(Q.nodeName){P.innerHTML="";P.appendChild(Q);}else{P.innerHTML=Q;}this.changeHeaderEvent.fire(Q);this.changeContentEvent.fire();},appendToHeader:function(Q){var P=this.header||(this.header=J());P.appendChild(Q);this.changeHeaderEvent.fire(Q);this.changeContentEvent.fire();},setBody:function(Q){var P=this.body||(this.body=B());if(Q.nodeName){P.innerHTML="";P.appendChild(Q);}else{P.innerHTML=Q;}this.changeBodyEvent.fire(Q);this.changeContentEvent.fire();},appendToBody:function(Q){var P=this.body||(this.body=B());P.appendChild(Q);this.changeBodyEvent.fire(Q);this.changeContentEvent.fire();},setFooter:function(Q){var P=this.footer||(this.footer=C());if(Q.nodeName){P.innerHTML="";P.appendChild(Q);}else{P.innerHTML=Q;}this.changeFooterEvent.fire(Q);this.changeContentEvent.fire();},appendToFooter:function(Q){var P=this.footer||(this.footer=C());P.appendChild(Q);this.changeFooterEvent.fire(Q);this.changeContentEvent.fire();},render:function(R,P){var S=this,T;function Q(U){if(typeof U=="string"){U=document.getElementById(U);}if(U){S._addToParent(U,S.element);S.appendEvent.fire();}}this.beforeRenderEvent.fire();if(!P){P=this.element;}if(R){Q(R);}else{if(!F.inDocument(this.element)){return false;}}if(this.header&&!F.inDocument(this.header)){T=P.firstChild;if(T){P.insertBefore(this.header,T);}else{P.appendChild(this.header);}}if(this.body&&!F.inDocument(this.body)){if(this.footer&&F.isAncestor(this.moduleElement,this.footer)){P.insertBefore(this.body,this.footer);}else{P.appendChild(this.body);}}if(this.footer&&!F.inDocument(this.footer)){P.appendChild(this.footer);}this.renderEvent.fire();return true;},destroy:function(){var P,Q;if(this.element){M.purgeElement(this.element,true);P=this.element.parentNode;}if(P){P.removeChild(this.element);}this.element=null;this.header=null;this.body=null;this.footer=null;G.textResizeEvent.unsubscribe(this.onDomResize,this);this.cfg.destroy();this.cfg=null;this.destroyEvent.fire();for(Q in this){if(Q instanceof L){Q.unsubscribeAll();}}},show:function(){this.cfg.setProperty("visible",true);},hide:function(){this.cfg.setProperty("visible",false);},configVisible:function(Q,P,R){var S=P[0];if(S){this.beforeShowEvent.fire();F.setStyle(this.element,"display","block");this.showEvent.fire();}else{this.beforeHideEvent.fire();F.setStyle(this.element,"display","none");this.hideEvent.fire();}},configMonitorResize:function(R,Q,S){var P=Q[0];if(P){this.initResizeMonitor();}else{G.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null;}},_addToParent:function(P,Q){if(!this.cfg.getProperty("appendtodocumentbody")&&P===document.body&&P.firstChild){P.insertBefore(Q,P.firstChild);}else{P.appendChild(Q);}},toString:function(){return"Module "+this.id;}};YAHOO.lang.augmentProto(G,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Overlay=function(L,K){YAHOO.widget.Overlay.superclass.constructor.call(this,L,K);};var F=YAHOO.lang,I=YAHOO.util.CustomEvent,E=YAHOO.widget.Module,J=YAHOO.util.Event,D=YAHOO.util.Dom,C=YAHOO.util.Config,B=YAHOO.widget.Overlay,G,A={"BEFORE_MOVE":"beforeMove","MOVE":"move"},H={"X":{key:"x",validator:F.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:F.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,validator:F.isBoolean,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"ZINDEX":{key:"zindex",value:null},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:false,validator:F.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(YAHOO.env.ua.ie==6?true:false),validator:F.isBoolean,supercedes:["zindex"]}};B.IFRAME_SRC="javascript:false;";B.IFRAME_OFFSET=3;B.VIEWPORT_OFFSET=10;B.TOP_LEFT="tl";B.TOP_RIGHT="tr";B.BOTTOM_LEFT="bl";B.BOTTOM_RIGHT="br";B.CSS_OVERLAY="yui-overlay";B.windowScrollEvent=new I("windowScroll");B.windowResizeEvent=new I("windowResize");B.windowScrollHandler=function(K){if(YAHOO.env.ua.ie){if(!window.scrollEnd){window.scrollEnd=-1;}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){B.windowScrollEvent.fire();},1);}else{B.windowScrollEvent.fire();}};B.windowResizeHandler=function(K){if(YAHOO.env.ua.ie){if(!window.resizeEnd){window.resizeEnd=-1;}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){B.windowResizeEvent.fire();},100);}else{B.windowResizeEvent.fire();}};B._initialized=null;if(B._initialized===null){J.on(window,"scroll",B.windowScrollHandler);J.on(window,"resize",B.windowResizeHandler);B._initialized=true;}YAHOO.extend(B,E,{init:function(L,K){B.superclass.init.call(this,L);this.beforeInitEvent.fire(B);D.addClass(this.element,B.CSS_OVERLAY);if(K){this.cfg.applyConfig(K,true);}if(this.platform=="mac"&&YAHOO.env.ua.gecko){if(!C.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true);}if(!C.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true);}}this.initEvent.fire(B);},initEvents:function(){B.superclass.initEvents.call(this);var K=I.LIST;this.beforeMoveEvent=this.createEvent(A.BEFORE_MOVE);this.beforeMoveEvent.signature=K;this.moveEvent=this.createEvent(A.MOVE);this.moveEvent.signature=K;},initDefaultConfig:function(){B.superclass.initDefaultConfig.call(this);this.cfg.addProperty(H.X.key,{handler:this.configX,validator:H.X.validator,suppressEvent:H.X.suppressEvent,supercedes:H.X.supercedes});this.cfg.addProperty(H.Y.key,{handler:this.configY,validator:H.Y.validator,suppressEvent:H.Y.suppressEvent,supercedes:H.Y.supercedes});this.cfg.addProperty(H.XY.key,{handler:this.configXY,suppressEvent:H.XY.suppressEvent,supercedes:H.XY.supercedes});this.cfg.addProperty(H.CONTEXT.key,{handler:this.configContext,suppressEvent:H.CONTEXT.suppressEvent,supercedes:H.CONTEXT.supercedes});this.cfg.addProperty(H.FIXED_CENTER.key,{handler:this.configFixedCenter,value:H.FIXED_CENTER.value,validator:H.FIXED_CENTER.validator,supercedes:H.FIXED_CENTER.supercedes});this.cfg.addProperty(H.WIDTH.key,{handler:this.configWidth,suppressEvent:H.WIDTH.suppressEvent,supercedes:H.WIDTH.supercedes});this.cfg.addProperty(H.HEIGHT.key,{handler:this.configHeight,suppressEvent:H.HEIGHT.suppressEvent,supercedes:H.HEIGHT.supercedes});this.cfg.addProperty(H.ZINDEX.key,{handler:this.configzIndex,value:H.ZINDEX.value});this.cfg.addProperty(H.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:H.CONSTRAIN_TO_VIEWPORT.value,validator:H.CONSTRAIN_TO_VIEWPORT.validator,supercedes:H.CONSTRAIN_TO_VIEWPORT.supercedes});this.cfg.addProperty(H.IFRAME.key,{handler:this.configIframe,value:H.IFRAME.value,validator:H.IFRAME.validator,supercedes:H.IFRAME.supercedes});},moveTo:function(K,L){this.cfg.setProperty("xy",[K,L]);},hideMacGeckoScrollbars:function(){D.removeClass(this.element,"show-scrollbars");D.addClass(this.element,"hide-scrollbars");},showMacGeckoScrollbars:function(){D.removeClass(this.element,"hide-scrollbars");D.addClass(this.element,"show-scrollbars");},configVisible:function(N,K,T){var M=K[0],O=D.getStyle(this.element,"visibility"),U=this.cfg.getProperty("effect"),R=[],Q=(this.platform=="mac"&&YAHOO.env.ua.gecko),b=C.alreadySubscribed,S,L,a,Y,X,W,Z,V,P;if(O=="inherit"){a=this.element.parentNode;while(a.nodeType!=9&&a.nodeType!=11){O=D.getStyle(a,"visibility");if(O!="inherit"){break;}a=a.parentNode;}if(O=="inherit"){O="visible";}}if(U){if(U instanceof Array){V=U.length;for(Y=0;Y<V;Y++){S=U[Y];R[R.length]=S.effect(this,S.duration);}}else{R[R.length]=U.effect(this,U.duration);}}if(M){if(Q){this.showMacGeckoScrollbars();}if(U){if(M){if(O!="visible"||O===""){this.beforeShowEvent.fire();P=R.length;for(X=0;X<P;X++){L=R[X];if(X===0&&!b(L.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){L.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true);}L.animateIn();}}}}else{if(O!="visible"||O===""){this.beforeShowEvent.fire();D.setStyle(this.element,"visibility","visible");this.cfg.refireEvent("iframe");this.showEvent.fire();}}}else{if(Q){this.hideMacGeckoScrollbars();}if(U){if(O=="visible"){this.beforeHideEvent.fire();P=R.length;for(W=0;W<P;W++){Z=R[W];if(W===0&&!b(Z.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){Z.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true);}Z.animateOut();}}else{if(O===""){D.setStyle(this.element,"visibility","hidden");}}}else{if(O=="visible"||O===""){this.beforeHideEvent.fire();D.setStyle(this.element,"visibility","hidden");this.hideEvent.fire();}}}},doCenterOnDOMEvent:function(){if(this.cfg.getProperty("visible")){this.center();}},configFixedCenter:function(O,M,P){var Q=M[0],L=C.alreadySubscribed,N=B.windowResizeEvent,K=B.windowScrollEvent;if(Q){this.center();if(!L(this.beforeShowEvent,this.center,this)){this.beforeShowEvent.subscribe(this.center);}if(!L(N,this.doCenterOnDOMEvent,this)){N.subscribe(this.doCenterOnDOMEvent,this,true);}if(!L(K,this.doCenterOnDOMEvent,this)){K.subscribe(this.doCenterOnDOMEvent,this,true);}}else{this.beforeShowEvent.unsubscribe(this.center);N.unsubscribe(this.doCenterOnDOMEvent,this);K.unsubscribe(this.doCenterOnDOMEvent,this);}},configHeight:function(N,L,O){var K=L[0],M=this.element;D.setStyle(M,"height",K);this.cfg.refireEvent("iframe");},configWidth:function(N,K,O){var M=K[0],L=this.element;D.setStyle(L,"width",M);this.cfg.refireEvent("iframe");},configzIndex:function(M,K,N){var O=K[0],L=this.element;if(!O){O=D.getStyle(L,"zIndex");if(!O||isNaN(O)){O=0;}}if(this.iframe||this.cfg.getProperty("iframe")===true){if(O<=0){O=1;}}D.setStyle(L,"zIndex",O);this.cfg.setProperty("zIndex",O,true);if(this.iframe){this.stackIframe();}},configXY:function(M,L,N){var P=L[0],K=P[0],O=P[1];this.cfg.setProperty("x",K);this.cfg.setProperty("y",O);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O]);},configX:function(M,L,N){var K=L[0],O=this.cfg.getProperty("y");this.cfg.setProperty("x",K,true);this.cfg.setProperty("y",O,true);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");D.setX(this.element,K,true);this.cfg.setProperty("xy",[K,O],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O]);},configY:function(M,L,N){var K=this.cfg.getProperty("x"),O=L[0];this.cfg.setProperty("x",K,true);this.cfg.setProperty("y",O,true);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");D.setY(this.element,O,true);this.cfg.setProperty("xy",[K,O],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O]);},showIframe:function(){var L=this.iframe,K;if(L){K=this.element.parentNode;if(K!=L.parentNode){this._addToParent(K,L);}L.style.display="block";}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none";}},syncIframe:function(){var K=this.iframe,M=this.element,O=B.IFRAME_OFFSET,L=(O*2),N;if(K){K.style.width=(M.offsetWidth+L+"px");K.style.height=(M.offsetHeight+L+"px");N=this.cfg.getProperty("xy");if(!F.isArray(N)||(isNaN(N[0])||isNaN(N[1]))){this.syncPosition();N=this.cfg.getProperty("xy");}D.setXY(K,[(N[0]-O),(N[1]-O)]);}},stackIframe:function(){if(this.iframe){var K=D.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(K)&&!isNaN(K)){D.setStyle(this.iframe,"zIndex",(K-1));}}},configIframe:function(N,M,O){var K=M[0];function P(){var R=this.iframe,S=this.element,T;if(!R){if(!G){G=document.createElement("iframe");if(this.isSecure){G.src=B.IFRAME_SRC;}if(YAHOO.env.ua.ie){G.style.filter="alpha(opacity=0)";G.frameBorder=0;}else{G.style.opacity="0";}G.style.position="absolute";G.style.border="none";G.style.margin="0";G.style.padding="0";G.style.display="none";}R=G.cloneNode(false);T=S.parentNode;var Q=T||document.body;this._addToParent(Q,R);this.iframe=R;}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true;}}function L(){P.call(this);this.beforeShowEvent.unsubscribe(L);this._iframeDeferred=false;}if(K){if(this.cfg.getProperty("visible")){P.call(this);}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(L);this._iframeDeferred=true;}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false;}}},_primeXYFromDOM:function(){if(YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))){this.syncPosition();this.cfg.refireEvent("xy");this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);}},configConstrainToViewport:function(L,K,M){var N=K[0];if(N){if(!C.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true);}if(!C.alreadySubscribed(this.beforeShowEvent,this._primeXYFromDOM)){this.beforeShowEvent.subscribe(this._primeXYFromDOM);}}else{this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this);}},configContext:function(M,L,O){var Q=L[0],N,P,K;if(Q){N=Q[0];P=Q[1];K=Q[2];if(N){if(typeof N=="string"){this.cfg.setProperty("context",[document.getElementById(N),P,K],true);}if(P&&K){this.align(P,K);}}}},align:function(L,K){var Q=this.cfg.getProperty("context"),P=this,O,N,R;function M(S,T){switch(L){case B.TOP_LEFT:P.moveTo(T,S);break;case B.TOP_RIGHT:P.moveTo((T-N.offsetWidth),S);break;case B.BOTTOM_LEFT:P.moveTo(T,(S-N.offsetHeight));break;case B.BOTTOM_RIGHT:P.moveTo((T-N.offsetWidth),(S-N.offsetHeight));break;}}if(Q){O=Q[0];N=this.element;P=this;if(!L){L=Q[1];}if(!K){K=Q[2];}if(N&&O){R=D.getRegion(O);switch(K){case B.TOP_LEFT:M(R.top,R.left);break;case B.TOP_RIGHT:M(R.top,R.right);break;case B.BOTTOM_LEFT:M(R.bottom,R.left);break;case B.BOTTOM_RIGHT:M(R.bottom,R.right);break;}}}},enforceConstraints:function(L,K,M){var O=K[0];var N=this.getConstrainedXY(O[0],O[1]);this.cfg.setProperty("x",N[0],true);this.cfg.setProperty("y",N[1],true);this.cfg.setProperty("xy",N,true);},getConstrainedXY:function(V,T){var N=B.VIEWPORT_OFFSET,U=D.getViewportWidth(),Q=D.getViewportHeight(),M=this.element.offsetHeight,S=this.element.offsetWidth,Y=D.getDocumentScrollLeft(),W=D.getDocumentScrollTop();var P=V;var L=T;if(S+N<U){var R=Y+N;var X=Y+U-S-N;if(V<R){P=R;}else{if(V>X){P=X;}}}else{P=N+Y;}if(M+N<Q){var O=W+N;var K=W+Q-M-N;if(T<O){L=O;}else{if(T>K){L=K;}}}else{L=N+W;}return[P,L];},center:function(){var N=B.VIEWPORT_OFFSET,O=this.element.offsetWidth,M=this.element.offsetHeight,L=D.getViewportWidth(),P=D.getViewportHeight(),K,Q;if(O<L){K=(L/2)-(O/2)+D.getDocumentScrollLeft();}else{K=N+D.getDocumentScrollLeft();}if(M<P){Q=(P/2)-(M/2)+D.getDocumentScrollTop();}else{Q=N+D.getDocumentScrollTop();}this.cfg.setProperty("xy",[parseInt(K,10),parseInt(Q,10)]);this.cfg.refireEvent("iframe");},syncPosition:function(){var K=D.getXY(this.element);this.cfg.setProperty("x",K[0],true);this.cfg.setProperty("y",K[1],true);this.cfg.setProperty("xy",K,true);},onDomResize:function(M,L){var K=this;B.superclass.onDomResize.call(this,M,L);setTimeout(function(){K.syncPosition();K.cfg.refireEvent("iframe");K.cfg.refireEvent("context");},0);},bringToTop:function(){var O=[],N=this.element;function R(V,U){var X=D.getStyle(V,"zIndex"),W=D.getStyle(U,"zIndex"),T=(!X||isNaN(X))?0:parseInt(X,10),S=(!W||isNaN(W))?0:parseInt(W,10);if(T>S){return-1;}else{if(T<S){return 1;}else{return 0;}}}function M(U){var S=D.hasClass(U,B.CSS_OVERLAY),T=YAHOO.widget.Panel;if(S&&!D.isAncestor(N,S)){if(T&&D.hasClass(U,T.CSS_PANEL)){O[O.length]=U.parentNode;}else{O[O.length]=U;}}}D.getElementsBy(M,"DIV",document.body);O.sort(R);var K=O[0],Q;if(K){Q=D.getStyle(K,"zIndex");if(!isNaN(Q)){var P=false;if(K!=N){P=true;}else{if(O.length>1){var L=D.getStyle(O[1],"zIndex");if(!isNaN(L)&&(Q==L)){P=true;}}}if(P){this.cfg.setProperty("zindex",(parseInt(Q,10)+2));}}}},destroy:function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe);}this.iframe=null;B.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);B.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);B.superclass.destroy.call(this);},toString:function(){return"Overlay "+this.id;}});}());(function(){YAHOO.widget.OverlayManager=function(G){this.init(G);};var D=YAHOO.widget.Overlay,C=YAHOO.util.Event,E=YAHOO.util.Dom,B=YAHOO.util.Config,F=YAHOO.util.CustomEvent,A=YAHOO.widget.OverlayManager;A.CSS_FOCUSED="focused";A.prototype={constructor:A,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"});},init:function(I){this.cfg=new B(this);this.initDefaultConfig();if(I){this.cfg.applyConfig(I,true);}this.cfg.fireQueue();var H=null;this.getActive=function(){return H;};this.focus=function(J){var K=this.find(J);if(K){if(H!=K){if(H){H.blur();}this.bringToTop(K);H=K;E.addClass(H.element,A.CSS_FOCUSED);K.focusEvent.fire();}}};this.remove=function(K){var M=this.find(K),J;if(M){if(H==M){H=null;}var L=(M.element===null&&M.cfg===null)?true:false;if(!L){J=E.getStyle(M.element,"zIndex");M.cfg.setProperty("zIndex",-1000,true);}this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));M.hideEvent.unsubscribe(M.blur);M.destroyEvent.unsubscribe(this._onOverlayDestroy,M);if(!L){C.removeListener(M.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);M.cfg.setProperty("zIndex",J,true);M.cfg.setProperty("manager",null);}M.focusEvent.unsubscribeAll();M.blurEvent.unsubscribeAll();M.focusEvent=null;M.blurEvent=null;M.focus=null;M.blur=null;}};this.blurAll=function(){var K=this.overlays.length,J;if(K>0){J=K-1;do{this.overlays[J].blur();}while(J--);}};this._onOverlayBlur=function(K,J){H=null;};var G=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[];}if(G){this.register(G);this.overlays.sort(this.compareZIndexDesc);}},_onOverlayElementFocus:function(I){var G=C.getTarget(I),H=this.close;if(H&&(G==H||E.isAncestor(H,G))){this.blur();}else{this.focus();}},_onOverlayDestroy:function(H,G,I){this.remove(I);},register:function(G){var K=this,L,I,H,J;if(G instanceof D){G.cfg.addProperty("manager",{value:this});G.focusEvent=G.createEvent("focus");G.focusEvent.signature=F.LIST;G.blurEvent=G.createEvent("blur");G.blurEvent.signature=F.LIST;G.focus=function(){K.focus(this);};G.blur=function(){if(K.getActive()==this){E.removeClass(this.element,A.CSS_FOCUSED);this.blurEvent.fire();}};G.blurEvent.subscribe(K._onOverlayBlur);G.hideEvent.subscribe(G.blur);G.destroyEvent.subscribe(this._onOverlayDestroy,G,this);C.on(G.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus,null,G);L=E.getStyle(G.element,"zIndex");if(!isNaN(L)){G.cfg.setProperty("zIndex",parseInt(L,10));}else{G.cfg.setProperty("zIndex",0);}this.overlays.push(G);this.bringToTop(G);return true;}else{if(G instanceof Array){I=0;J=G.length;for(H=0;H<J;H++){if(this.register(G[H])){I++;}}if(I>0){return true;}}else{return false;}}},bringToTop:function(M){var I=this.find(M),L,G,J;if(I){J=this.overlays;J.sort(this.compareZIndexDesc);G=J[0];if(G){L=E.getStyle(G.element,"zIndex");if(!isNaN(L)){var K=false;if(G!==I){K=true;}else{if(J.length>1){var H=E.getStyle(J[1].element,"zIndex");if(!isNaN(H)&&(L==H)){K=true;}}}if(K){I.cfg.setProperty("zindex",(parseInt(L,10)+2));}}J.sort(this.compareZIndexDesc);}}},find:function(G){var I=this.overlays,J=I.length,H;if(J>0){H=J-1;if(G instanceof D){do{if(I[H]==G){return I[H];}}while(H--);}else{if(typeof G=="string"){do{if(I[H].id==G){return I[H];}}while(H--);}}return null;}},compareZIndexDesc:function(J,I){var H=(J.cfg)?J.cfg.getProperty("zIndex"):null,G=(I.cfg)?I.cfg.getProperty("zIndex"):null;if(H===null&&G===null){return 0;}else{if(H===null){return 1;}else{if(G===null){return-1;}else{if(H>G){return-1;}else{if(H<G){return 1;}else{return 0;}}}}}},showAll:function(){var H=this.overlays,I=H.length,G;if(I>0){G=I-1;do{H[G].show();}while(G--);}},hideAll:function(){var H=this.overlays,I=H.length,G;if(I>0){G=I-1;do{H[G].hide();}while(G--);}},toString:function(){return"OverlayManager";}};}());(function(){YAHOO.widget.Tooltip=function(N,M){YAHOO.widget.Tooltip.superclass.constructor.call(this,N,M);};var E=YAHOO.lang,L=YAHOO.util.Event,K=YAHOO.util.CustomEvent,C=YAHOO.util.Dom,G=YAHOO.widget.Tooltip,F,H={"PREVENT_OVERLAP":{key:"preventoverlap",value:true,validator:E.isBoolean,supercedes:["x","y","xy"]},"SHOW_DELAY":{key:"showdelay",value:200,validator:E.isNumber},"AUTO_DISMISS_DELAY":{key:"autodismissdelay",value:5000,validator:E.isNumber},"HIDE_DELAY":{key:"hidedelay",value:250,validator:E.isNumber},"TEXT":{key:"text",suppressEvent:true},"CONTAINER":{key:"container"},"DISABLED":{key:"disabled",value:false,suppressEvent:true}},A={"CONTEXT_MOUSE_OVER":"contextMouseOver","CONTEXT_MOUSE_OUT":"contextMouseOut","CONTEXT_TRIGGER":"contextTrigger"};G.CSS_TOOLTIP="yui-tt";function I(N,M,O){var R=O[0],P=O[1],Q=this.cfg,S=Q.getProperty("width");if(S==P){Q.setProperty("width",R);}this.unsubscribe("hide",this._onHide,O);}function D(N,M){var O=document.body,S=this.cfg,R=S.getProperty("width"),P,Q;if((!R||R=="auto")&&(S.getProperty("container")!=O||S.getProperty("x")>=C.getViewportWidth()||S.getProperty("y")>=C.getViewportHeight())){Q=this.element.cloneNode(true);Q.style.visibility="hidden";Q.style.top="0px";Q.style.left="0px";O.appendChild(Q);P=(Q.offsetWidth+"px");O.removeChild(Q);Q=null;S.setProperty("width",P);S.refireEvent("xy");this.subscribe("hide",I,[(R||""),P]);}}function B(N,M,O){this.render(O);}function J(){L.onDOMReady(B,this.cfg.getProperty("container"),this);}YAHOO.extend(G,YAHOO.widget.Overlay,{init:function(N,M){G.superclass.init.call(this,N);this.beforeInitEvent.fire(G);C.addClass(this.element,G.CSS_TOOLTIP);if(M){this.cfg.applyConfig(M,true);}this.cfg.queueProperty("visible",false);this.cfg.queueProperty("constraintoviewport",true);this.setBody("");this.subscribe("beforeShow",D);this.subscribe("init",J);this.subscribe("render",this.onRender);this.initEvent.fire(G);},initEvents:function(){G.superclass.initEvents.call(this);var M=K.LIST;this.contextMouseOverEvent=this.createEvent(A.CONTEXT_MOUSE_OVER);this.contextMouseOverEvent.signature=M;this.contextMouseOutEvent=this.createEvent(A.CONTEXT_MOUSE_OUT);this.contextMouseOutEvent.signature=M;this.contextTriggerEvent=this.createEvent(A.CONTEXT_TRIGGER);this.contextTriggerEvent.signature=M;},initDefaultConfig:function(){G.superclass.initDefaultConfig.call(this);this.cfg.addProperty(H.PREVENT_OVERLAP.key,{value:H.PREVENT_OVERLAP.value,validator:H.PREVENT_OVERLAP.validator,supercedes:H.PREVENT_OVERLAP.supercedes});this.cfg.addProperty(H.SHOW_DELAY.key,{handler:this.configShowDelay,value:200,validator:H.SHOW_DELAY.validator});this.cfg.addProperty(H.AUTO_DISMISS_DELAY.key,{handler:this.configAutoDismissDelay,value:H.AUTO_DISMISS_DELAY.value,validator:H.AUTO_DISMISS_DELAY.validator});this.cfg.addProperty(H.HIDE_DELAY.key,{handler:this.configHideDelay,value:H.HIDE_DELAY.value,validator:H.HIDE_DELAY.validator});this.cfg.addProperty(H.TEXT.key,{handler:this.configText,suppressEvent:H.TEXT.suppressEvent});this.cfg.addProperty(H.CONTAINER.key,{handler:this.configContainer,value:document.body});this.cfg.addProperty(H.DISABLED.key,{handler:this.configContainer,value:H.DISABLED.value,supressEvent:H.DISABLED.suppressEvent});},configText:function(N,M,O){var P=M[0];if(P){this.setBody(P);}},configContainer:function(O,N,P){var M=N[0];if(typeof M=="string"){this.cfg.setProperty("container",document.getElementById(M),true);}},_removeEventListeners:function(){var P=this._context,M,O,N;if(P){M=P.length;if(M>0){N=M-1;do{O=P[N];L.removeListener(O,"mouseover",this.onContextMouseOver);L.removeListener(O,"mousemove",this.onContextMouseMove);L.removeListener(O,"mouseout",this.onContextMouseOut);}while(N--);}}},configContext:function(R,N,S){var Q=N[0],T,M,P,O;if(Q){if(!(Q instanceof Array)){if(typeof Q=="string"){this.cfg.setProperty("context",[document.getElementById(Q)],true);}else{this.cfg.setProperty("context",[Q],true);}Q=this.cfg.getProperty("context");}this._removeEventListeners();this._context=Q;T=this._context;if(T){M=T.length;if(M>0){O=M-1;do{P=T[O];L.on(P,"mouseover",this.onContextMouseOver,this);L.on(P,"mousemove",this.onContextMouseMove,this);L.on(P,"mouseout",this.onContextMouseOut,this);}while(O--);}}}},onContextMouseMove:function(N,M){M.pageX=L.getPageX(N);M.pageY=L.getPageY(N);},onContextMouseOver:function(O,N){var M=this;if(M.title){N._tempTitle=M.title;M.title="";}if(N.fireEvent("contextMouseOver",M,O)!==false&&!N.cfg.getProperty("disabled")){if(N.hideProcId){clearTimeout(N.hideProcId);N.hideProcId=null;}L.on(M,"mousemove",N.onContextMouseMove,N);N.showProcId=N.doShow(O,M);}},onContextMouseOut:function(O,N){var M=this;if(N._tempTitle){M.title=N._tempTitle;N._tempTitle=null;}if(N.showProcId){clearTimeout(N.showProcId);N.showProcId=null;}if(N.hideProcId){clearTimeout(N.hideProcId);N.hideProcId=null;}N.fireEvent("contextMouseOut",M,O);N.hideProcId=setTimeout(function(){N.hide();},N.cfg.getProperty("hidedelay"));},doShow:function(O,M){var P=25,N=this;if(YAHOO.env.ua.opera&&M.tagName&&M.tagName.toUpperCase()=="A"){P+=12;}return setTimeout(function(){var Q=N.cfg.getProperty("text");if(N._tempTitle&&(Q===""||YAHOO.lang.isUndefined(Q)||YAHOO.lang.isNull(Q))){N.setBody(N._tempTitle);}else{N.cfg.refireEvent("text");}N.moveTo(N.pageX,N.pageY+P);if(N.cfg.getProperty("preventoverlap")){N.preventOverlap(N.pageX,N.pageY);}L.removeListener(M,"mousemove",N.onContextMouseMove);N.contextTriggerEvent.fire(M);N.show();N.hideProcId=N.doHide();},this.cfg.getProperty("showdelay"));},doHide:function(){var M=this;return setTimeout(function(){M.hide();},this.cfg.getProperty("autodismissdelay"));},preventOverlap:function(Q,P){var M=this.element.offsetHeight,O=new YAHOO.util.Point(Q,P),N=C.getRegion(this.element);N.top-=5;N.left-=5;N.right+=5;N.bottom+=5;if(N.contains(O)){this.cfg.setProperty("y",(P-M-5));}},onRender:function(Q,P){function R(){var U=this.element,T=this._shadow;if(T){T.style.width=(U.offsetWidth+6)+"px";T.style.height=(U.offsetHeight+1)+"px";}}function N(){C.addClass(this._shadow,"yui-tt-shadow-visible");}function M(){C.removeClass(this._shadow,"yui-tt-shadow-visible");}function S(){var V=this._shadow,U,T,X,W;if(!V){U=this.element;T=YAHOO.widget.Module;X=YAHOO.env.ua.ie;W=this;if(!F){F=document.createElement("div");F.className="yui-tt-shadow";}V=F.cloneNode(false);U.appendChild(V);this._shadow=V;N.call(this);this.subscribe("beforeShow",N);this.subscribe("beforeHide",M);if(X==6||(X==7&&document.compatMode=="BackCompat")){window.setTimeout(function(){R.call(W);},0);this.cfg.subscribeToConfigEvent("width",R);this.cfg.subscribeToConfigEvent("height",R);this.subscribe("changeContent",R);T.textResizeEvent.subscribe(R,this,true);this.subscribe("destroy",function(){T.textResizeEvent.unsubscribe(R,this);});}}}function O(){S.call(this);this.unsubscribe("beforeShow",O);}if(this.cfg.getProperty("visible")){S.call(this);}else{this.subscribe("beforeShow",O);}},destroy:function(){this._removeEventListeners();G.superclass.destroy.call(this);},toString:function(){return"Tooltip "+this.id;}});}());(function(){YAHOO.widget.Panel=function(R,Q){YAHOO.widget.Panel.superclass.constructor.call(this,R,Q);};var I=YAHOO.lang,E=YAHOO.util.DD,F=YAHOO.util.Dom,P=YAHOO.util.Event,B=YAHOO.widget.Overlay,O=YAHOO.util.CustomEvent,C=YAHOO.util.Config,N=YAHOO.widget.Panel,H,L,D,A={"SHOW_MASK":"showMask","HIDE_MASK":"hideMask","DRAG":"drag"},J={"CLOSE":{key:"close",value:true,validator:I.isBoolean,supercedes:["visible"]},"DRAGGABLE":{key:"draggable",value:(E?true:false),validator:I.isBoolean,supercedes:["visible"]},"DRAG_ONLY":{key:"dragonly",value:false,validator:I.isBoolean,supercedes:["draggable"]},"UNDERLAY":{key:"underlay",value:"shadow",supercedes:["visible"]},"MODAL":{key:"modal",value:false,validator:I.isBoolean,supercedes:["visible","zindex"]},"KEY_LISTENERS":{key:"keylisteners",suppressEvent:true,supercedes:["visible"]}};N.CSS_PANEL="yui-panel";N.CSS_PANEL_CONTAINER="yui-panel-container";N.FOCUSABLE=["a","button","select","textarea","input"];function M(R,Q){if(!this.header&&this.cfg.getProperty("draggable")){this.setHeader("&#160;");}}function K(R,Q,S){var V=S[0],T=S[1],U=this.cfg,W=U.getProperty("width");if(W==T){U.setProperty("width",V);}this.unsubscribe("hide",K,S);}function G(R,Q){var V=YAHOO.env.ua.ie,U,T,S;if(V==6||(V==7&&document.compatMode=="BackCompat")){U=this.cfg;T=U.getProperty("width");if(!T||T=="auto"){S=(this.element.offsetWidth+"px");U.setProperty("width",S);this.subscribe("hide",K,[(T||""),S]);}}}YAHOO.extend(N,B,{init:function(R,Q){N.superclass.init.call(this,R);this.beforeInitEvent.fire(N);F.addClass(this.element,N.CSS_PANEL);this.buildWrapper();if(Q){this.cfg.applyConfig(Q,true);}this.subscribe("showMask",this._addFocusHandlers);this.subscribe("hideMask",this._removeFocusHandlers);this.subscribe("beforeRender",M);this.initEvent.fire(N);},_onElementFocus:function(Q){this.blur();},_addFocusHandlers:function(Y,S){var V=this,Z="focus",U="hidden";function X(a){if(a.type!==U&&!F.isAncestor(V.element,a)){P.on(a,Z,V._onElementFocus);return true;}return false;}var W=N.FOCUSABLE,Q=W.length,T=[];for(var R=0;R<Q;R++){T=T.concat(F.getElementsBy(X,W[R]));}this.focusableElements=T;},_removeFocusHandlers:function(T,S){var V=this.focusableElements,Q=V.length,R="focus";if(V){for(var U=0;U<Q;U++){P.removeListener(V[U],R,this._onElementFocus);}}},initEvents:function(){N.superclass.initEvents.call(this);var Q=O.LIST;this.showMaskEvent=this.createEvent(A.SHOW_MASK);this.showMaskEvent.signature=Q;this.hideMaskEvent=this.createEvent(A.HIDE_MASK);this.hideMaskEvent.signature=Q;this.dragEvent=this.createEvent(A.DRAG);this.dragEvent.signature=Q;},initDefaultConfig:function(){N.superclass.initDefaultConfig.call(this);this.cfg.addProperty(J.CLOSE.key,{handler:this.configClose,value:J.CLOSE.value,validator:J.CLOSE.validator,supercedes:J.CLOSE.supercedes});this.cfg.addProperty(J.DRAGGABLE.key,{handler:this.configDraggable,value:J.DRAGGABLE.value,validator:J.DRAGGABLE.validator,supercedes:J.DRAGGABLE.supercedes});this.cfg.addProperty(J.DRAG_ONLY.key,{value:J.DRAG_ONLY.value,validator:J.DRAG_ONLY.validator,supercedes:J.DRAG_ONLY.supercedes});this.cfg.addProperty(J.UNDERLAY.key,{handler:this.configUnderlay,value:J.UNDERLAY.value,supercedes:J.UNDERLAY.supercedes});this.cfg.addProperty(J.MODAL.key,{handler:this.configModal,value:J.MODAL.value,validator:J.MODAL.validator,supercedes:J.MODAL.supercedes});this.cfg.addProperty(J.KEY_LISTENERS.key,{handler:this.configKeyListeners,suppressEvent:J.KEY_LISTENERS.suppressEvent,supercedes:J.KEY_LISTENERS.supercedes});},configClose:function(S,Q,U){var V=Q[0],R=this.close;function T(X,W){W.hide();}if(V){if(!R){if(!D){D=document.createElement("span");D.innerHTML="&#160;";D.className="container-close";}R=D.cloneNode(true);this.innerElement.appendChild(R);P.on(R,"click",T,this);this.close=R;}else{R.style.display="block";}}else{if(R){R.style.display="none";}}},configDraggable:function(R,Q,S){var T=Q[0];if(T){if(!E){this.cfg.setProperty("draggable",false);return;}if(this.header){F.setStyle(this.header,"cursor","move");this.registerDragDrop();}this.subscribe("beforeShow",G);}else{if(this.dd){this.dd.unreg();}if(this.header){F.setStyle(this.header,"cursor","auto");}this.unsubscribe("beforeShow",G);}},configUnderlay:function(b,a,V){var Z=YAHOO.env.ua,X=(this.platform=="mac"&&Z.gecko),Y=(Z.ie==6||(Z.ie==7&&document.compatMode=="BackCompat")),c=a[0].toLowerCase(),R=this.underlay,S=this.element;function d(){var e=this.underlay;F.addClass(e,"yui-force-redraw");window.setTimeout(function(){F.removeClass(e,"yui-force-redraw");},0);}function T(){var e=false;if(!R){if(!L){L=document.createElement("div");L.className="underlay";}R=L.cloneNode(false);this.element.appendChild(R);this.underlay=R;if(Y){this.sizeUnderlay();this.cfg.subscribeToConfigEvent("width",this.sizeUnderlay);this.cfg.subscribeToConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.subscribe(this.sizeUnderlay);YAHOO.widget.Module.textResizeEvent.subscribe(this.sizeUnderlay,this,true);}if(Z.webkit&&Z.webkit<420){this.changeContentEvent.subscribe(d);}e=true;}}function W(){var e=T.call(this);if(!e&&Y){this.sizeUnderlay();}this._underlayDeferred=false;this.beforeShowEvent.unsubscribe(W);}function U(){if(this._underlayDeferred){this.beforeShowEvent.unsubscribe(W);this._underlayDeferred=false;}if(R){this.cfg.unsubscribeFromConfigEvent("width",this.sizeUnderlay);this.cfg.unsubscribeFromConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.sizeUnderlay);this.changeContentEvent.unsubscribe(d);YAHOO.widget.Module.textResizeEvent.unsubscribe(this.sizeUnderlay,this,true);this.element.removeChild(R);this.underlay=null;}}switch(c){case"shadow":F.removeClass(S,"matte");F.addClass(S,"shadow");break;case"matte":if(!X){U.call(this);}F.removeClass(S,"shadow");F.addClass(S,"matte");break;default:if(!X){U.call(this);}F.removeClass(S,"shadow");F.removeClass(S,"matte");break;}if((c=="shadow")||(X&&!R)){if(this.cfg.getProperty("visible")){var Q=T.call(this);if(!Q&&Y){this.sizeUnderlay();}}else{if(!this._underlayDeferred){this.beforeShowEvent.subscribe(W);this._underlayDeferred=true;}}}},configModal:function(R,Q,T){var S=Q[0];if(S){if(!this._hasModalityEventListeners){this.subscribe("beforeShow",this.buildMask);this.subscribe("beforeShow",this.bringToTop);this.subscribe("beforeShow",this.showMask);this.subscribe("hide",this.hideMask);B.windowResizeEvent.subscribe(this.sizeMask,this,true);this._hasModalityEventListeners=true;}}else{if(this._hasModalityEventListeners){if(this.cfg.getProperty("visible")){this.hideMask();this.removeMask();}this.unsubscribe("beforeShow",this.buildMask);this.unsubscribe("beforeShow",this.bringToTop);this.unsubscribe("beforeShow",this.showMask);this.unsubscribe("hide",this.hideMask);B.windowResizeEvent.unsubscribe(this.sizeMask,this);this._hasModalityEventListeners=false;}}},removeMask:function(){var R=this.mask,Q;if(R){this.hideMask();Q=R.parentNode;if(Q){Q.removeChild(R);}this.mask=null;}},configKeyListeners:function(T,Q,W){var S=Q[0],V,U,R;if(S){if(S instanceof Array){U=S.length;for(R=0;R<U;R++){V=S[R];if(!C.alreadySubscribed(this.showEvent,V.enable,V)){this.showEvent.subscribe(V.enable,V,true);}if(!C.alreadySubscribed(this.hideEvent,V.disable,V)){this.hideEvent.subscribe(V.disable,V,true);this.destroyEvent.subscribe(V.disable,V,true);}}}else{if(!C.alreadySubscribed(this.showEvent,S.enable,S)){this.showEvent.subscribe(S.enable,S,true);}if(!C.alreadySubscribed(this.hideEvent,S.disable,S)){this.hideEvent.subscribe(S.disable,S,true);this.destroyEvent.subscribe(S.disable,S,true);}}}},configHeight:function(T,R,U){var Q=R[0],S=this.innerElement;F.setStyle(S,"height",Q);this.cfg.refireEvent("iframe");},configWidth:function(T,Q,U){var S=Q[0],R=this.innerElement;F.setStyle(R,"width",S);this.cfg.refireEvent("iframe");},configzIndex:function(R,Q,T){N.superclass.configzIndex.call(this,R,Q,T);if(this.mask||this.cfg.getProperty("modal")===true){var S=F.getStyle(this.element,"zIndex");if(!S||isNaN(S)){S=0;}if(S===0){this.cfg.setProperty("zIndex",1);}else{this.stackMask();}}},buildWrapper:function(){var S=this.element.parentNode,Q=this.element,R=document.createElement("div");R.className=N.CSS_PANEL_CONTAINER;R.id=Q.id+"_c";if(S){S.insertBefore(R,Q);}R.appendChild(Q);this.element=R;this.innerElement=Q;F.setStyle(this.innerElement,"visibility","inherit");},sizeUnderlay:function(){var R=this.underlay,Q;if(R){Q=this.element;R.style.width=Q.offsetWidth+"px";R.style.height=Q.offsetHeight+"px";}},registerDragDrop:function(){var R=this;if(this.header){if(!E){return;}var Q=(this.cfg.getProperty("dragonly")===true);this.dd=new E(this.element.id,this.id,{dragOnly:Q});if(!this.header.id){this.header.id=this.id+"_h";}this.dd.startDrag=function(){var T,V,S,Y,X,W;if(YAHOO.env.ua.ie==6){F.addClass(R.element,"drag");}if(R.cfg.getProperty("constraintoviewport")){var U=B.VIEWPORT_OFFSET;T=R.element.offsetHeight;V=R.element.offsetWidth;S=F.getViewportWidth();Y=F.getViewportHeight();X=F.getDocumentScrollLeft();W=F.getDocumentScrollTop();if(T+U<Y){this.minY=W+U;this.maxY=W+Y-T-U;}else{this.minY=W+U;this.maxY=W+U;}if(V+U<S){this.minX=X+U;this.maxX=X+S-V-U;}else{this.minX=X+U;this.maxX=X+U;}this.constrainX=true;this.constrainY=true;}else{this.constrainX=false;this.constrainY=false;}R.dragEvent.fire("startDrag",arguments);};this.dd.onDrag=function(){R.syncPosition();R.cfg.refireEvent("iframe");if(this.platform=="mac"&&YAHOO.env.ua.gecko){this.showMacGeckoScrollbars();}R.dragEvent.fire("onDrag",arguments);};this.dd.endDrag=function(){if(YAHOO.env.ua.ie==6){F.removeClass(R.element,"drag");}R.dragEvent.fire("endDrag",arguments);R.moveEvent.fire(R.cfg.getProperty("xy"));};this.dd.setHandleElId(this.header.id);this.dd.addInvalidHandleType("INPUT");this.dd.addInvalidHandleType("SELECT");this.dd.addInvalidHandleType("TEXTAREA");}},buildMask:function(){var Q=this.mask;if(!Q){if(!H){H=document.createElement("div");H.className="mask";H.innerHTML="&#160;";}Q=H.cloneNode(true);Q.id=this.id+"_mask";document.body.insertBefore(Q,document.body.firstChild);this.mask=Q;if(YAHOO.env.ua.gecko&&this.platform=="mac"){F.addClass(this.mask,"block-scrollbars");}this.stackMask();}},hideMask:function(){if(this.cfg.getProperty("modal")&&this.mask){this.mask.style.display="none";this.hideMaskEvent.fire();F.removeClass(document.body,"masked");}},showMask:function(){if(this.cfg.getProperty("modal")&&this.mask){F.addClass(document.body,"masked");this.sizeMask();this.mask.style.display="block";this.showMaskEvent.fire();}},sizeMask:function(){if(this.mask){this.mask.style.height=F.getDocumentHeight()+"px";this.mask.style.width=F.getDocumentWidth()+"px";}},stackMask:function(){if(this.mask){var Q=F.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(Q)&&!isNaN(Q)){F.setStyle(this.mask,"zIndex",Q-1);}}},render:function(Q){return N.superclass.render.call(this,Q,this.innerElement);},destroy:function(){B.windowResizeEvent.unsubscribe(this.sizeMask,this);this.removeMask();if(this.close){P.purgeElement(this.close);}N.superclass.destroy.call(this);},toString:function(){return"Panel "+this.id;}});}());(function(){YAHOO.widget.Dialog=function(L,K){YAHOO.widget.Dialog.superclass.constructor.call(this,L,K);};var J=YAHOO.util.Event,I=YAHOO.util.CustomEvent,D=YAHOO.util.Dom,B=YAHOO.util.KeyListener,H=YAHOO.util.Connect,F=YAHOO.widget.Dialog,E=YAHOO.lang,A={"BEFORE_SUBMIT":"beforeSubmit","SUBMIT":"submit","MANUAL_SUBMIT":"manualSubmit","ASYNC_SUBMIT":"asyncSubmit","FORM_SUBMIT":"formSubmit","CANCEL":"cancel"},G={"POST_METHOD":{key:"postmethod",value:"async"},"BUTTONS":{key:"buttons",value:"none"},"HIDEAFTERSUBMIT":{key:"hideaftersubmit",value:true}};F.CSS_DIALOG="yui-dialog";function C(){var N=this._aButtons,L,M,K;if(E.isArray(N)){L=N.length;if(L>0){K=L-1;do{M=N[K];if(YAHOO.widget.Button&&M instanceof YAHOO.widget.Button){M.destroy();}else{if(M.tagName.toUpperCase()=="BUTTON"){J.purgeElement(M);J.purgeElement(M,false);}}}while(K--);}}}YAHOO.extend(F,YAHOO.widget.Panel,{form:null,initDefaultConfig:function(){F.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};this.cfg.addProperty(G.POST_METHOD.key,{handler:this.configPostMethod,value:G.POST_METHOD.value,validator:function(K){if(K!="form"&&K!="async"&&K!="none"&&K!="manual"){return false;}else{return true;}}});this.cfg.addProperty(G.HIDEAFTERSUBMIT.key,{value:G.HIDEAFTERSUBMIT.value});this.cfg.addProperty(G.BUTTONS.key,{handler:this.configButtons,value:G.BUTTONS.value});},initEvents:function(){F.superclass.initEvents.call(this);var K=I.LIST;this.beforeSubmitEvent=this.createEvent(A.BEFORE_SUBMIT);this.beforeSubmitEvent.signature=K;this.submitEvent=this.createEvent(A.SUBMIT);this.submitEvent.signature=K;this.manualSubmitEvent=this.createEvent(A.MANUAL_SUBMIT);this.manualSubmitEvent.signature=K;this.asyncSubmitEvent=this.createEvent(A.ASYNC_SUBMIT);this.asyncSubmitEvent.signature=K;this.formSubmitEvent=this.createEvent(A.FORM_SUBMIT);this.formSubmitEvent.signature=K;this.cancelEvent=this.createEvent(A.CANCEL);this.cancelEvent.signature=K;},init:function(L,K){F.superclass.init.call(this,L);this.beforeInitEvent.fire(F);D.addClass(this.element,F.CSS_DIALOG);this.cfg.setProperty("visible",false);if(K){this.cfg.applyConfig(K,true);}this.showEvent.subscribe(this.focusFirst,this,true);this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.subscribe("changeBody",this.registerForm);this.initEvent.fire(F);},doSubmit:function(){var Q=this.form,O=false,N=false,P,K,M,L;switch(this.cfg.getProperty("postmethod")){case"async":P=Q.elements;K=P.length;if(K>0){M=K-1;do{if(P[M].type=="file"){O=true;break;}}while(M--);}if(O&&YAHOO.env.ua.ie&&this.isSecure){N=true;}L=(Q.getAttribute("method")||"POST").toUpperCase();H.setForm(Q,O,N);H.asyncRequest(L,Q.getAttribute("action"),this.callback);this.asyncSubmitEvent.fire();break;case"form":Q.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break;}},registerForm:function(){var M=this.element.getElementsByTagName("form")[0],L=this,K,N;if(this.form){if(this.form==M&&D.isAncestor(this.element,this.form)){return;}else{J.purgeElement(this.form);this.form=null;}}if(!M){M=document.createElement("form");M.name="frm_"+this.id;this.body.appendChild(M);}if(M){this.form=M;J.on(M,"submit",function(O){J.stopEvent(O);this.submit();this.form.blur();},this,true);this.firstFormElement=function(){var Q,P,O=M.elements.length;for(Q=0;Q<O;Q++){P=M.elements[Q];if(P.focus&&!P.disabled&&P.type!="hidden"){return P;}}return null;}();this.lastFormElement=function(){var Q,P,O=M.elements.length;for(Q=O-1;Q>=0;Q--){P=M.elements[Q];if(P.focus&&!P.disabled&&P.type!="hidden"){return P;}}return null;}();if(this.cfg.getProperty("modal")){K=this.firstFormElement||this.firstButton;if(K){this.preventBackTab=new B(K,{shift:true,keys:9},{fn:L.focusLast,scope:L,correctScope:true});this.showEvent.subscribe(this.preventBackTab.enable,this.preventBackTab,true);this.hideEvent.subscribe(this.preventBackTab.disable,this.preventBackTab,true);}N=this.lastButton||this.lastFormElement;if(N){this.preventTabOut=new B(N,{shift:false,keys:9},{fn:L.focusFirst,scope:L,correctScope:true});this.showEvent.subscribe(this.preventTabOut.enable,this.preventTabOut,true);this.hideEvent.subscribe(this.preventTabOut.disable,this.preventTabOut,true);}}}},configClose:function(M,K,N){var O=K[0];function L(Q,P){P.cancel();}if(O){if(!this.close){this.close=document.createElement("div");D.addClass(this.close,"container-close");this.close.innerHTML="&#160;";this.innerElement.appendChild(this.close);J.on(this.close,"click",L,this);}else{this.close.style.display="block";}}else{if(this.close){this.close.style.display="none";}}},configButtons:function(U,T,O){var P=YAHOO.widget.Button,W=T[0],M=this.innerElement,V,R,L,S,Q,K,N;C.call(this);this._aButtons=null;if(E.isArray(W)){Q=document.createElement("span");Q.className="button-group";S=W.length;this._aButtons=[];for(N=0;N<S;N++){V=W[N];if(P){L=new P({label:V.text,container:Q});R=L.get("element");if(V.isDefault){L.addClass("default");this.defaultHtmlButton=R;}if(E.isFunction(V.handler)){L.set("onclick",{fn:V.handler,obj:this,scope:this});}else{if(E.isObject(V.handler)&&E.isFunction(V.handler.fn)){L.set("onclick",{fn:V.handler.fn,obj:((!E.isUndefined(V.handler.obj))?V.handler.obj:this),scope:(V.handler.scope||this)});}}this._aButtons[this._aButtons.length]=L;}else{R=document.createElement("button");R.setAttribute("type","button");if(V.isDefault){R.className="default";this.defaultHtmlButton=R;}R.innerHTML=V.text;if(E.isFunction(V.handler)){J.on(R,"click",V.handler,this,true);}else{if(E.isObject(V.handler)&&E.isFunction(V.handler.fn)){J.on(R,"click",V.handler.fn,((!E.isUndefined(V.handler.obj))?V.handler.obj:this),(V.handler.scope||this));}}Q.appendChild(R);this._aButtons[this._aButtons.length]=R;}V.htmlButton=R;if(N===0){this.firstButton=R;}if(N==(S-1)){this.lastButton=R;}}this.setFooter(Q);K=this.footer;if(D.inDocument(this.element)&&!D.isAncestor(M,K)){M.appendChild(K);}this.buttonSpan=Q;}else{Q=this.buttonSpan;K=this.footer;if(Q&&K){K.removeChild(Q);this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null;}}this.cfg.refireEvent("iframe");this.cfg.refireEvent("underlay");},getButtons:function(){var K=this._aButtons;if(K){return K;}},focusFirst:function(N,L,P){var M=this.firstFormElement,K;if(L){K=L[1];if(K){J.stopEvent(K);}}if(M){try{M.focus();}catch(O){}}else{this.focusDefaultButton();}},focusLast:function(N,L,P){var Q=this.cfg.getProperty("buttons"),M=this.lastFormElement,K;if(L){K=L[1];if(K){J.stopEvent(K);}}if(Q&&E.isArray(Q)){this.focusLastButton();}else{if(M){try{M.focus();}catch(O){}}}},focusDefaultButton:function(){var K=this.defaultHtmlButton;if(K){try{K.focus();}catch(L){}}},blurButtons:function(){var P=this.cfg.getProperty("buttons"),M,O,L,K;if(P&&E.isArray(P)){M=P.length;if(M>0){K=(M-1);do{O=P[K];if(O){L=O.htmlButton;if(L){try{L.blur();}catch(N){}}}}while(K--);}}},focusFirstButton:function(){var N=this.cfg.getProperty("buttons"),M,K;if(N&&E.isArray(N)){M=N[0];if(M){K=M.htmlButton;if(K){try{K.focus();}catch(L){}}}}},focusLastButton:function(){var O=this.cfg.getProperty("buttons"),L,N,K;if(O&&E.isArray(O)){L=O.length;if(L>0){N=O[(L-1)];if(N){K=N.htmlButton;if(K){try{K.focus();}catch(M){}}}}}},configPostMethod:function(L,K,M){this.registerForm();},validate:function(){return true;},submit:function(){if(this.validate()){this.beforeSubmitEvent.fire();this.doSubmit();this.submitEvent.fire();if(this.cfg.getProperty("hideaftersubmit")){this.hide();}return true;}else{return false;}},cancel:function(){this.cancelEvent.fire();this.hide();},getData:function(){var a=this.form,M,T,W,O,U,R,Q,L,X,N,Y,b,K,P,c,Z,V;function S(e){var d=e.tagName.toUpperCase();return((d=="INPUT"||d=="TEXTAREA"||d=="SELECT")&&e.name==O);}if(a){M=a.elements;T=M.length;W={};for(Z=0;Z<T;Z++){O=M[Z].name;U=D.getElementsBy(S,"*",a);R=U.length;if(R>0){if(R==1){U=U[0];Q=U.type;L=U.tagName.toUpperCase();switch(L){case"INPUT":if(Q=="checkbox"){W[O]=U.checked;}else{if(Q!="radio"){W[O]=U.value;}}break;case"TEXTAREA":W[O]=U.value;break;case"SELECT":X=U.options;N=X.length;Y=[];for(V=0;V<N;V++){b=X[V];if(b.selected){K=b.value;if(!K||K===""){K=b.text;}Y[Y.length]=K;}}W[O]=Y;break;}}else{Q=U[0].type;switch(Q){case"radio":for(V=0;V<R;V++){P=U[V];if(P.checked){W[O]=P.value;break;}}break;case"checkbox":Y=[];for(V=0;V<R;V++){c=U[V];if(c.checked){Y[Y.length]=c.value;}}W[O]=Y;break;}}}}}return W;},destroy:function(){C.call(this);this._aButtons=null;var K=this.element.getElementsByTagName("form"),L;if(K.length>0){L=K[0];if(L){J.purgeElement(L);if(L.parentNode){L.parentNode.removeChild(L);}this.form=null;}}F.superclass.destroy.call(this);},toString:function(){return"Dialog "+this.id;}});}());(function(){YAHOO.widget.SimpleDialog=function(E,D){YAHOO.widget.SimpleDialog.superclass.constructor.call(this,E,D);};var C=YAHOO.util.Dom,B=YAHOO.widget.SimpleDialog,A={"ICON":{key:"icon",value:"none",suppressEvent:true},"TEXT":{key:"text",value:"",suppressEvent:true,supercedes:["icon"]}};B.ICON_BLOCK="blckicon";B.ICON_ALARM="alrticon";B.ICON_HELP="hlpicon";B.ICON_INFO="infoicon";B.ICON_WARN="warnicon";B.ICON_TIP="tipicon";B.ICON_CSS_CLASSNAME="yui-icon";B.CSS_SIMPLEDIALOG="yui-simple-dialog";YAHOO.extend(B,YAHOO.widget.Dialog,{initDefaultConfig:function(){B.superclass.initDefaultConfig.call(this);this.cfg.addProperty(A.ICON.key,{handler:this.configIcon,value:A.ICON.value,suppressEvent:A.ICON.suppressEvent});this.cfg.addProperty(A.TEXT.key,{handler:this.configText,value:A.TEXT.value,suppressEvent:A.TEXT.suppressEvent,supercedes:A.TEXT.supercedes});},init:function(E,D){B.superclass.init.call(this,E);this.beforeInitEvent.fire(B);C.addClass(this.element,B.CSS_SIMPLEDIALOG);this.cfg.queueProperty("postmethod","manual");if(D){this.cfg.applyConfig(D,true);}this.beforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("");}},this,true);this.initEvent.fire(B);},registerForm:function(){B.superclass.registerForm.call(this);this.form.innerHTML+=\'<input type="hidden" name="\'+this.id+\'" value=""/>\';},configIcon:function(F,E,J){var K=E[0],D=this.body,I=B.ICON_CSS_CLASSNAME,H,G;if(K&&K!="none"){H=C.getElementsByClassName(I,"*",D);if(H){G=H.parentNode;if(G){G.removeChild(H);H=null;}}if(K.indexOf(".")==-1){H=document.createElement("span");H.className=(I+" "+K);H.innerHTML="&#160;";}else{H=document.createElement("img");H.src=(this.imageRoot+K);H.className=I;}if(H){D.insertBefore(H,D.firstChild);}}},configText:function(E,D,F){var G=D[0];if(G){this.setBody(G);this.cfg.refireEvent("icon");}},toString:function(){return"SimpleDialog "+this.id;}});}());(function(){YAHOO.widget.ContainerEffect=function(F,I,H,E,G){if(!G){G=YAHOO.util.Anim;}this.overlay=F;this.attrIn=I;this.attrOut=H;this.targetElement=E||F.element;this.animClass=G;};var B=YAHOO.util.Dom,D=YAHOO.util.CustomEvent,C=YAHOO.util.Easing,A=YAHOO.widget.ContainerEffect;A.FADE=function(E,G){var I={attributes:{opacity:{from:0,to:1}},duration:G,method:C.easeIn};var F={attributes:{opacity:{to:0}},duration:G,method:C.easeOut};var H=new A(E,I,F,E.element);H.handleUnderlayStart=function(){var K=this.overlay.underlay;if(K&&YAHOO.env.ua.ie){var J=(K.filters&&K.filters.length>0);if(J){B.addClass(E.element,"yui-effect-fade");}}};H.handleUnderlayComplete=function(){var J=this.overlay.underlay;if(J&&YAHOO.env.ua.ie){B.removeClass(E.element,"yui-effect-fade");}};H.handleStartAnimateIn=function(K,J,L){B.addClass(L.overlay.element,"hide-select");if(!L.overlay.underlay){L.overlay.cfg.refireEvent("underlay");}L.handleUnderlayStart();B.setStyle(L.overlay.element,"visibility","visible");B.setStyle(L.overlay.element,"opacity",0);};H.handleCompleteAnimateIn=function(K,J,L){B.removeClass(L.overlay.element,"hide-select");if(L.overlay.element.style.filter){L.overlay.element.style.filter=null;}L.handleUnderlayComplete();L.overlay.cfg.refireEvent("iframe");L.animateInCompleteEvent.fire();};H.handleStartAnimateOut=function(K,J,L){B.addClass(L.overlay.element,"hide-select");L.handleUnderlayStart();};H.handleCompleteAnimateOut=function(K,J,L){B.removeClass(L.overlay.element,"hide-select");if(L.overlay.element.style.filter){L.overlay.element.style.filter=null;}B.setStyle(L.overlay.element,"visibility","hidden");B.setStyle(L.overlay.element,"opacity",1);L.handleUnderlayComplete();L.overlay.cfg.refireEvent("iframe");L.animateOutCompleteEvent.fire();};H.init();return H;};A.SLIDE=function(G,I){var F=G.cfg.getProperty("x")||B.getX(G.element),K=G.cfg.getProperty("y")||B.getY(G.element),J=B.getClientWidth(),H=G.element.offsetWidth,E=new A(G,{attributes:{points:{to:[F,K]}},duration:I,method:C.easeIn},{attributes:{points:{to:[(J+25),K]}},duration:I,method:C.easeOut},G.element,YAHOO.util.Motion);E.handleStartAnimateIn=function(M,L,N){N.overlay.element.style.left=((-25)-H)+"px";N.overlay.element.style.top=K+"px";};E.handleTweenAnimateIn=function(O,N,P){var Q=B.getXY(P.overlay.element),M=Q[0],L=Q[1];if(B.getStyle(P.overlay.element,"visibility")=="hidden"&&M<F){B.setStyle(P.overlay.element,"visibility","visible");}P.overlay.cfg.setProperty("xy",[M,L],true);P.overlay.cfg.refireEvent("iframe");};E.handleCompleteAnimateIn=function(M,L,N){N.overlay.cfg.setProperty("xy",[F,K],true);N.startX=F;N.startY=K;N.overlay.cfg.refireEvent("iframe");N.animateInCompleteEvent.fire();};E.handleStartAnimateOut=function(M,L,P){var N=B.getViewportWidth(),Q=B.getXY(P.overlay.element),O=Q[1];P.animOut.attributes.points.to=[(N+25),O];};E.handleTweenAnimateOut=function(N,M,O){var Q=B.getXY(O.overlay.element),L=Q[0],P=Q[1];O.overlay.cfg.setProperty("xy",[L,P],true);O.overlay.cfg.refireEvent("iframe");};E.handleCompleteAnimateOut=function(M,L,N){B.setStyle(N.overlay.element,"visibility","hidden");N.overlay.cfg.setProperty("xy",[F,K]);N.animateOutCompleteEvent.fire();};E.init();return E;};A.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=D.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=D.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=D.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=D.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this);},animateIn:function(){this.beforeAnimateInEvent.fire();this.animIn.animate();},animateOut:function(){this.beforeAnimateOutEvent.fire();this.animOut.animate();},handleStartAnimateIn:function(F,E,G){},handleTweenAnimateIn:function(F,E,G){},handleCompleteAnimateIn:function(F,E,G){},handleStartAnimateOut:function(F,E,G){},handleTweenAnimateOut:function(F,E,G){},handleCompleteAnimateOut:function(F,E,G){},toString:function(){var E="ContainerEffect";if(this.overlay){E+=" ["+this.overlay.toString()+"]";}return E;}};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider);})();YAHOO.register("container",YAHOO.widget.Module,{version:"2.5.2",build:"1076"});TWIIGS.YAHOO=YAHOO;})();}\nif(TWIIGS&&typeof TWIIGS.php=="undefined"){TWIIGS.php=(function(){\nfunction get_html_translation_table(table,quote_style){var entities={},histogram={},decimal=0,symbol=\'\';var constMappingTable={},constMappingQuoteStyle={};var useTable={},useQuoteStyle={};useTable=(table?table.toUpperCase():\'HTML_SPECIALCHARS\');useQuoteStyle=(quote_style?quote_style.toUpperCase():\'ENT_COMPAT\');constMappingTable[0]=\'HTML_SPECIALCHARS\';constMappingTable[1]=\'HTML_ENTITIES\';constMappingQuoteStyle[0]=\'ENT_NOQUOTES\';constMappingQuoteStyle[2]=\'ENT_COMPAT\';constMappingQuoteStyle[3]=\'ENT_QUOTES\';if(!isNaN(useTable)){useTable=constMappingTable[useTable];}if(!isNaN(useQuoteStyle)){useQuoteStyle=constMappingQuoteStyle[useQuoteStyle];}if(useTable==\'HTML_SPECIALCHARS\'){entities[\'38\']=\'&amp;\';entities[\'60\']=\'&lt;\';entities[\'62\']=\'&gt;\';}else if(useTable==\'HTML_ENTITIES\'){entities[\'38\']=\'&amp;\';entities[\'60\']=\'&lt;\';entities[\'62\']=\'&gt;\';entities[\'160\']=\'&nbsp;\';entities[\'161\']=\'&iexcl;\';entities[\'162\']=\'&cent;\';entities[\'163\']=\'&pound;\';entities[\'164\']=\'&curren;\';entities[\'165\']=\'&yen;\';entities[\'166\']=\'&brvbar;\';entities[\'167\']=\'&sect;\';entities[\'168\']=\'&uml;\';entities[\'169\']=\'&copy;\';entities[\'170\']=\'&ordf;\';entities[\'171\']=\'&laquo;\';entities[\'172\']=\'&not;\';entities[\'173\']=\'&shy;\';entities[\'174\']=\'&reg;\';entities[\'175\']=\'&macr;\';entities[\'176\']=\'&deg;\';entities[\'177\']=\'&plusmn;\';entities[\'178\']=\'&sup2;\';entities[\'179\']=\'&sup3;\';entities[\'180\']=\'&acute;\';entities[\'181\']=\'&micro;\';entities[\'182\']=\'&para;\';entities[\'183\']=\'&middot;\';entities[\'184\']=\'&cedil;\';entities[\'185\']=\'&sup1;\';entities[\'186\']=\'&ordm;\';entities[\'187\']=\'&raquo;\';entities[\'188\']=\'&frac14;\';entities[\'189\']=\'&frac12;\';entities[\'190\']=\'&frac34;\';entities[\'191\']=\'&iquest;\';entities[\'192\']=\'&Agrave;\';entities[\'193\']=\'&Aacute;\';entities[\'194\']=\'&Acirc;\';entities[\'195\']=\'&Atilde;\';entities[\'196\']=\'&Auml;\';entities[\'197\']=\'&Aring;\';entities[\'198\']=\'&AElig;\';entities[\'199\']=\'&Ccedil;\';entities[\'200\']=\'&Egrave;\';entities[\'201\']=\'&Eacute;\';entities[\'202\']=\'&Ecirc;\';entities[\'203\']=\'&Euml;\';entities[\'204\']=\'&Igrave;\';entities[\'205\']=\'&Iacute;\';entities[\'206\']=\'&Icirc;\';entities[\'207\']=\'&Iuml;\';entities[\'208\']=\'&ETH;\';entities[\'209\']=\'&Ntilde;\';entities[\'210\']=\'&Ograve;\';entities[\'211\']=\'&Oacute;\';entities[\'212\']=\'&Ocirc;\';entities[\'213\']=\'&Otilde;\';entities[\'214\']=\'&Ouml;\';entities[\'215\']=\'&times;\';entities[\'216\']=\'&Oslash;\';entities[\'217\']=\'&Ugrave;\';entities[\'218\']=\'&Uacute;\';entities[\'219\']=\'&Ucirc;\';entities[\'220\']=\'&Uuml;\';entities[\'221\']=\'&Yacute;\';entities[\'222\']=\'&THORN;\';entities[\'223\']=\'&szlig;\';entities[\'224\']=\'&agrave;\';entities[\'225\']=\'&aacute;\';entities[\'226\']=\'&acirc;\';entities[\'227\']=\'&atilde;\';entities[\'228\']=\'&auml;\';entities[\'229\']=\'&aring;\';entities[\'230\']=\'&aelig;\';entities[\'231\']=\'&ccedil;\';entities[\'232\']=\'&egrave;\';entities[\'233\']=\'&eacute;\';entities[\'234\']=\'&ecirc;\';entities[\'235\']=\'&euml;\';entities[\'236\']=\'&igrave;\';entities[\'237\']=\'&iacute;\';entities[\'238\']=\'&icirc;\';entities[\'239\']=\'&iuml;\';entities[\'240\']=\'&eth;\';entities[\'241\']=\'&ntilde;\';entities[\'242\']=\'&ograve;\';entities[\'243\']=\'&oacute;\';entities[\'244\']=\'&ocirc;\';entities[\'245\']=\'&otilde;\';entities[\'246\']=\'&ouml;\';entities[\'247\']=\'&divide;\';entities[\'248\']=\'&oslash;\';entities[\'249\']=\'&ugrave;\';entities[\'250\']=\'&uacute;\';entities[\'251\']=\'&ucirc;\';entities[\'252\']=\'&uuml;\';entities[\'253\']=\'&yacute;\';entities[\'254\']=\'&thorn;\';entities[\'255\']=\'&yuml;\';}else{throw Error("Table: "+useTable+\' not supported\');return false;}if(useQuoteStyle!=\'ENT_NOQUOTES\'){entities[\'34\']=\'&quot;\';}if(useQuoteStyle==\'ENT_QUOTES\'){entities[\'39\']=\'&#039;\';}for(decimal in entities){symbol=String.fromCharCode(decimal);histogram[symbol]=entities[decimal];}return histogram;}\nfunction htmlspecialchars(string,quote_style){var histogram={},symbol=\'\',tmp_str=\'\',i=0;tmp_str=string.toString();if(false===(histogram=get_html_translation_table(\'HTML_SPECIALCHARS\',quote_style))){return false;}for(symbol in histogram){entity=histogram[symbol];tmp_str=tmp_str.split(symbol).join(entity);}return tmp_str;}\nfunction isset(){var a=arguments;var l=a.length;var i=0;if(l==0){throw new Error(\'Empty isset\');}while(i!=l){if(typeof(a[i])==\'undefined\'||a[i]===null){return false;}else{i++;}}return true;}\nfunction empty(mixed_var){var key;if(mixed_var===""||mixed_var===0||mixed_var==="0"||mixed_var===null||mixed_var===false||mixed_var===undefined||mixed_var==="undefined"){return true;}if(typeof mixed_var==\'object\'){for(key in mixed_var){if(typeof mixed_var[key]!==\'function\'){return false;}}return true;}return false;}\nfunction intval(mixed_var,base){var tmp;if(typeof(mixed_var)==\'string\'){tmp=parseInt(mixed_var*1);if(isNaN(tmp)||!isFinite(tmp)){return 0;}else{return tmp.toString(base||10);}}else if(typeof(mixed_var)==\'number\'&&isFinite(mixed_var)){return Math.floor(mixed_var);}else{return 0;}}\nfunction str_replace(search,replace,subject){var s=subject;var ra=r instanceof Array,sa=s instanceof Array;var f=[].concat(search);var r=[].concat(replace);var i=(s=[].concat(s)).length;var j=0;while(j=0,i--){if(s[i]){while(s[i]=(s[i]+\'\').split(f[j]).join(ra?r[j]||"":r[0]),++j in f){};}}return sa?s:s[0];}\nfunction shuffle(o){for(var j,x,i=o.length;i;j=parseInt(Math.random()*i),x=o[--i],o[i]=o[j],o[j]=x);return o;}\nfunction range(low,high,step){var i=0,o=[];for(low;low<=high;low+=step){o[i++]=low;}return o;}\nreturn{"htmlspecialchars":htmlspecialchars,"isset":isset,"empty":empty,\'intval\':intval,\'str_replace\':str_replace,\'shuffle\':shuffle,\'range\':range}})();}\nif(TWIIGS&&typeof TWIIGS.style=="undefined"){TWIIGS.style=(function(){$=TWIIGS.YAHOO.util.Dom.get;\nfunction default_style(stype,mods){if(typeof mods=="undefined")mods={};var params={"font-size":"1.0em","background-color":"transparent","background-image":"none","border-style":"none","clear":"none","display":"block","float":"none","position":"static","visibility":"visible","height":"auto","line-height":"normal","width":"auto","margin-top":"0","margin-right":"0","margin-bottom":"0","margin-left":"0","outline-style":"none","padding-top":"0","padding-right":"0","padding-bottom":"0","padding-left":"0","clip":"auto","overflow":"visible","vertical-align":"baseline","z-index":"auto","letter-spacing":"normal","text-align":"left","text-decoration":"none","text-indent":"0","text-shadow":"none","text-transform":"none","white-space":"normal","word-spacing":"normal"};var i;for(i in stype)params[i]=stype[i];for(i in mods)params[i]=mods[i];var style=\' style="\';for(i in params){if(params[i]!=null)style+=i+": "+params[i]+"; ";}style+=\'"\';return style;}\nfunction block_style(mods){var stype={};return default_style(stype,mods);}\nfunction hidden_style(mods){var stype={"display":"none"};return default_style(stype,mods);}\nfunction inline_style(mods){var stype={"display":"inline"};return default_style(stype,mods);}\nfunction input_style(mods){var stype={"background-color":null,"background-image":null,"border-style":null,"display":"inline","text-shadow":null};return default_style(stype,mods);}\nfunction image_style(mods){var stype={"background-color":null,"background-image":null,"display":"inline","height":null,"width":null};return default_style(stype,mods);}\nfunction link_style(mods){var stype={"display":"inline","text-decoration":null};return default_style(stype,mods);}\nfunction list_style(mods){var stype={"display":"list-item","list-style-type":"none","list-style-position":"outside","list-style-image":"none"};return default_style(stype,mods);}\nfunction show(ref){elem=$(ref);if(!elem){}else{elem.style.display="";}}\nfunction hide(ref){elem=$(ref);if(!elem){}else{elem.style.display="none";}}\nfunction enable(ref){elem=$(ref);if(!elem){}else{elem.disabled=false;}}\nfunction disable(ref){elem=$(ref);if(!elem){}else{elem.disabled=true;}}\nreturn{"default_style":default_style,"block_style":block_style,"hidden_style":hidden_style,"inline_style":inline_style,"input_style":input_style,"image_style":image_style,"link_style":link_style,"list_style":list_style,"show":show,"hide":hide,"enable":enable,"disable":disable}})();}\n/***PROFILE_JS***/\nif(TWIIGS&&typeof TWIIGS.view.poll_profile==\'undefined\'){TWIIGS.view.poll_profile=function(module_id){var $=TWIIGS.YAHOO.util.Dom.get;var e=TWIIGS.YAHOO.util.Event;var g=TWIIGS.YAHOO.util.Get;var c=TWIIGS.YAHOO.util.Connect;var w=TWIIGS.YAHOO.widget;var l=TWIIGS.YAHOO.lang;var s=TWIIGS.style;var p=TWIIGS.php;var d=TWIIGS.data;var glb={};glb.module_id=module_id;glb.safe_mode=false;glb.safe_mode_trigger_width=10;glb.default_poll_width=300;glb.max_pct_width=60;glb.max_poll_bar_width=null;glb.switching_time=200;glb.ad_results_width=640;glb.ad_results_poll_width=300;glb.ad_results_max_poll_bar_width=glb.ad_results_poll_width-glb.max_pct_width;glb.ad_results_fade_duration=0.15;glb.poll_elem_id=\'twiigs_poll_\'+glb.module_id;glb.loading_elem_id=\'twiigs_poll_loading\'+glb.module_id;glb.switching_elem_id=\'twiigs_poll_switching\'+glb.module_id;glb.question_elem_id=\'twiigs_poll_question\'+glb.module_id;glb.answers_elem_id=\'twiigs_poll_answers\'+glb.module_id;glb.results_elem_id=\'twiigs_poll_results\'+glb.module_id;glb.vote_button_area_elem_id=\'twiigs_poll_vote_button_area\'+glb.module_id;glb.vote_button_elem_id=\'twiigs_poll_vote_button\'+glb.module_id;glb.view_results_link_elem_id=\'twiigs_poll_view_results_link\'+glb.module_id;glb.vote_link_elem_id=\'twiigs_poll_vote_link\'+glb.module_id;glb.vote_response_elem_id=\'twiigs_poll_vote_response\'+glb.module_id;glb.link_elem_id=\'twiigs_poll_link\'+glb.module_id;glb.form_elem_id=\'twiigs_poll_form\'+glb.module_id;glb.ad_results_elem_id=\'twiigs_ad_results\'+glb.module_id;glb.ad_results_results_id=\'twiigs_ad_results_results\'+glb.module_id;glb.ad_results_close_link_elem_id=\'twiigs_ad_results_close_link\'+glb.module_id;glb.ad_results_color=\'#333333\';glb.ad_results_link_color=\'#3333dd\';glb.answer_id_param=\'glam_a\';glb.module_id_param=\'glam_mid\';glb.load_data_url=\'http://glam.twiigs.com/glam_poll_profile_load_data.php?\'+encodeURIComponent(glb.module_id_param)+\'=\'+encodeURIComponent(glb.module_id);glb.vote_url=\'http://glam.twiigs.com/glam_poll_profile_vote.php?\'+encodeURIComponent(glb.module_id_param)+\'=\'+encodeURIComponent(glb.module_id);glb.loading_image_url=\'http://glam.twiigs.com/img/loading.gif\';glb.poll_bar_color_default=\'orange\';glb.poll_bar_img_beg_url_template=\'http://glam.twiigs.com/img/pb_[COLOR]_beg04.png\';glb.poll_bar_img_mid_url_template=\'http://glam.twiigs.com/img/pb_[COLOR]_mid04.png\';glb.poll_bar_img_end_url_template=\'http://glam.twiigs.com/img/pb_[COLOR]_end04.png\';glb.site_url=\'http://www.twiigs.com/\';glb.poll=null;glb.poll_answer_display_order=[];glb.ad_results_overlay=null;glb.poll_bar_img_beg_url=\'\';glb.poll_bar_img_mid_url=\'\';glb.poll_bar_img_end_url=\'\';var module_html=[\'<div class="TWIIGS_poll_ad_results" id="\',glb.ad_results_elem_id,\'"\',s.block_style({\'position\':\'absolute\',\'width\':glb.ad_results_width+\'px\',\'padding-top\':\'10px\',\'padding-right\':\'10px\',\'padding-bottom\':\'10px\',\'padding-left\':\'10px\',\'visibility\':\'hidden\',\'border-width\':\'1px\',\'border-style\':\'solid\',\'border-color\':\'#444444\',\'background-color\':\'#f3f3f3\'}),\'></div>\',\'<div class="TWIIGS_poll" id="\',glb.poll_elem_id,\'"\',s.block_style({\'margin-top\':\'10px\',\'margin-right\':\'5px\',\'margin-bottom\':\'10px\',\'margin-left\':\'5px\'}),\'>\',\'<div class="TWIIGS_poll_loading" id="\',glb.loading_elem_id,\'"\',s.block_style({\'margin-top\':\'5px\',\'text-align\':\'center\'}),\'>\',\'<img src="\',glb.loading_image_url,\'"\',s.image_style({}),\' /> Loading poll...\',\'</div>\',\'<div class="TWIIGS_poll_question" id="\',glb.question_elem_id,\'"\',s.hidden_style({\'font-weight\':\'bold\'}),\'></div>\',\'<div class="TWIIGS_poll_loading" id="\',glb.switching_elem_id,\'"\',s.hidden_style({\'margin-top\':\'5px\',\'text-align\':\'center\'}),\'>\',\'<img src="\',glb.loading_image_url,\'"\',s.image_style({}),\' /> Loading...\',\'</div>\',\'<div class="TWIIGS_poll_answers" id="\',glb.answers_elem_id,\'"\',s.hidden_style({\'margin-top\':\'8px\'}),\'></div>\',\'<div class="TWIIGS_poll_results" id="\',glb.results_elem_id,\'"\',s.hidden_style({\'margin-top\':\'8px\'}),\'></div>\',\'<div class="TWIIGS_poll_link" id="\',glb.link_elem_id,\'"\',s.hidden_style({\'margin-top\':\'5px\',\'text-align\':\'right\'}),\'>\',\'<a href="\',glb.site_url,\'"\',s.link_style({\'font-weight\':\'bold\',\'text-decoration\':\'none\'}),\'>poll by twiigs.com</a>\',\'</div>\',\'</div>\',].join(\'\');document.write(module_html);e.onContentReady(glb.poll_elem_id,load_poll);function load_ad_overlay(){var ad_results_elem=$(glb.ad_results_elem_id);if(ad_results_elem){document.body.appendChild(ad_results_elem);e.onContentReady(glb.ad_results_elem_id,config_ad_overlay);}}\nfunction config_ad_overlay(){glb.ad_results_overlay=new w.Overlay(glb.ad_results_elem_id,{fixedcenter:true,visible:false,zIndex:999999,effect:{effect:w.ContainerEffect.FADE,duration:glb.ad_results_fade_duration}});glb.ad_results_overlay.render();}\nfunction load_poll(skip){if(p.empty(skip)){var elem=$(glb.poll_elem_id);if(elem){if(elem.offsetWidth<=glb.safe_mode_trigger_width){elem.style[\'width\']=glb.default_poll_width;glb.safemode=true;e.onContentReady(glb.poll_elem_id,load_poll,1);}}}\nglb.max_poll_bar_width=elem.offsetWidth-glb.max_pct_width;s.show(glb.loading_elem_id);g.script(glb.load_data_url,{\'onFailure\':display_poll_failed,\'onSuccess\':display_poll});}\nfunction display_poll_failed(){var elem=$(glb.loading_elem_id);if(elem){elem.innerHTML=\'Unable to display poll\';}}\nfunction display_poll(){glb.poll=d[glb.module_id];if(!p.empty(glb.poll)){if(!p.empty(glb.poll[\'poll_advertisements\'])){e.onDOMReady(load_ad_overlay);}\nvar poll_bar_color=glb.poll_bar_color_default;if(!p.empty(glb.poll[\'poll_bar_color\'])){poll_bar_color=glb.poll[\'poll_bar_color\'];}\nglb.poll_bar_img_beg_url=p.str_replace(\'[COLOR]\',poll_bar_color,glb.poll_bar_img_beg_url_template);glb.poll_bar_img_mid_url=p.str_replace(\'[COLOR]\',poll_bar_color,glb.poll_bar_img_mid_url_template);glb.poll_bar_img_end_url=p.str_replace(\'[COLOR]\',poll_bar_color,glb.poll_bar_img_end_url_template);if(!p.empty(glb.poll[\'poll_multiple\'])){glb.answer_id_param=glb.answer_id_param+\'[]\';}\nif(!p.empty(glb.poll[\'poll_answers\'])){glb.poll_answer_display_order=p.range(0,glb.poll[\'poll_answers\'].length-1,1);if(!p.empty(glb.poll[\'poll_randomize\'])){glb.poll_answer_display_order=p.shuffle(glb.poll_answer_display_order);}}\ns.hide(glb.loading_elem_id);s.show(glb.question_elem_id);if(p.empty(glb.poll[\'user_voted\'])&&!p.empty(glb.poll[\'poll_status\'])){s.show(glb.answers_elem_id);}\nelse{s.show(glb.results_elem_id);}\ns.show(glb.link_elem_id);update_poll_question();update_poll_answers();update_poll_results();}\nelse{display_poll_failed();}}\nfunction switch_to_poll_answers(){s.hide(glb.results_elem_id);s.show(glb.switching_elem_id);setTimeout(\'TWIIGS.style.hide("\'+glb.switching_elem_id+\'");TWIIGS.style.show("\'+glb.answers_elem_id+\'");\',glb.switching_time);}\nfunction switch_to_poll_results(){s.hide(glb.answers_elem_id);s.show(glb.switching_elem_id);setTimeout(\'TWIIGS.style.hide("\'+glb.switching_elem_id+\'");TWIIGS.style.show("\'+glb.results_elem_id+\'");\',glb.switching_time);}\nfunction update_poll_question(){var elem=$(glb.question_elem_id);if(p.isset(glb.poll[\'poll_question\'])){elem.innerHTML=p.htmlspecialchars(glb.poll[\'poll_question\']);}}\nfunction update_poll_answers(){if(!p.empty(glb.poll[\'poll_answers\'])&&!p.empty(glb.poll_answer_display_order)){var poll_answers=glb.poll[\'poll_answers\'];var input_type=\'radio\';if(!p.empty(glb.poll[\'poll_multiple\'])){input_type=\'checkbox\';}\nvar answers=[];var len=glb.poll_answer_display_order.length;for(var j=0;j<len;j++){var i=glb.poll_answer_display_order[j];var answer_id=parseInt(i)+1;answers[j]=[\'<li class="TWIIGS_poll_answer_choice"\',s.list_style({\'margin-bottom\':\'7px\',\'margin-left\':\'4px\',\'*margin-bottom\':\'2px\'}),\'>\',\'<input name="\',glb.answer_id_param,\'" type="\',input_type,\'" value="\',p.htmlspecialchars(answer_id),\'"\',s.input_style({}),\' /> \',\'<label\',s.inline_style({}),\'>\',p.htmlspecialchars(poll_answers[i]),\'</label>\',\'</li>\',].join(\'\');}\nvar view_results_html=\'\';if(p.empty(glb.poll[\'poll_hide_results\'])){view_results_html=[\'<div class="TWIIGS_poll_view_results"\',s.block_style({\'margin-top\':\'2px\',\'text-align\':\'center\'}),\'>\',\'<a id="\',glb.view_results_link_elem_id,\'" href="javascript:void(0);"\',s.link_style({\'text-decoration\':\'none\'}),\'>view results</a>\',\'</div>\',].join(\'\');}\nvar answers_html=[\'<form id="\',glb.form_elem_id,\'"\',s.block_style({}),\'>\',\'<ul class="TWIIGS_poll_answer_choices"\',s.list_style({}),\'>\',answers.join(""),\'</ul>\',\'</form>\',\'<div class="TWIIGS_poll_vote" id="\',glb.vote_button_area_elem_id,\'"\',s.block_style({\'margin-top\':\'2px\',\'text-align\':\'center\'}),\'>\',\'<input id="\',glb.vote_button_elem_id,\'" type="button" value="vote"\',s.input_style({\'padding-right\':\'4px\',\'padding-left\':\'4px\',\'text-align\':\'center\'}),\' />\',\'</div>\',\'<div class="TWIIGS_poll_vote_response" id="\',glb.vote_response_elem_id,\'"\',s.hidden_style({\'font-style\':\'italic\',\'margin-top\':\'2px\',\'text-align\':\'center\'}),\'>\',\'An error occurred while recording your vote.\',\'</div>\',view_results_html,].join(\'\');var elem=$(glb.answers_elem_id);if(elem){elem.innerHTML=answers_html;}\ne.on(glb.view_results_link_elem_id,\'click\',switch_to_poll_results);e.on(glb.vote_button_elem_id,\'click\',submit_vote);}}\nfunction generate_results(max_bar_width,color){var results=\'Unable to display the results\';if(!p.empty(glb.poll[\'poll_hide_results\'])&&!p.empty(glb.poll[\'poll_status\'])){results=[\'<div class="TWIIGS_poll_results_message"\',s.block_style({\'font-style\':\'italic\',\'margin-top\':\'2px\',\'text-align\':\'center\'}),\'>\',\'Results will be displayed when voting ends.\',\'</div>\',].join(\'\');}\nelse if(!p.empty(glb.poll[\'poll_answers\'])){var poll_answers=glb.poll[\'poll_answers\'];var total_votes=glb.poll[\'total_votes\'];var bar_start=[\'<img src="\',glb.poll_bar_img_beg_url,\'" width="2" height="10"\',s.image_style({}),\'>\',\'<img src="\',glb.poll_bar_img_mid_url,\'" width="\',].join(\'\');var bar_end=[\'" height="10"\',s.image_style({}),\'>\',\'<img src="\',glb.poll_bar_img_end_url,\'" width="2" height="10"\',s.image_style({}),\'> \',].join(\'\');var answers=[];for(var i in poll_answers){var votes=(p.isset(glb.poll[\'poll_results\'][i]))?glb.poll[\'poll_results\'][i]:0;var ratio=votes/total_votes;var pct=p.intval(ratio*100);var bar_width=p.intval(max_bar_width*ratio);var poll_bar_title=\'\';if(p.empty(glb.poll[\'poll_hide_votes\'])){poll_bar_title=votes+\' votes\';}\nanswers[i]=[\'<li class="TWIIGS_poll_results_answer_choice"\',s.list_style({\'margin-bottom\':\'7px\',\'margin-left\':\'4px\',\'*margin-bottom\':\'2px\'}),\'>\',\'<label\',s.block_style({\'color\':color}),\'>\',p.htmlspecialchars(poll_answers[i]),\'</label>\',\'<span title="\',poll_bar_title,\'"\',s.block_style({\'color\':color}),\'>\',bar_start,bar_width,bar_end,pct,\'%</span>\',\'</li>\',].join(\'\');}\nresults=answers.join(\'\');}\nreturn results;}\nfunction update_poll_results(){var results=generate_results(glb.max_poll_bar_width,null);if(results){var vote_link=\'\';if(p.empty(glb.poll[\'poll_status\'])){vote_link=[\'<div class="TWIIGS_poll_results_voting_message"\',s.block_style({\'font-style\':\'italic\',\'margin-top\':\'2px\',\'text-align\':\'center\'}),\'>\',\'Voting has ended.\',\'</div>\',].join(\'\');}\nelse if(p.empty(glb.poll[\'user_voted\'])){vote_link=[\'<div class="TWIIGS_poll_results_vote_link"\',s.block_style({\'margin-top\':\'2px\',\'text-align\':\'center\'}),\'>\',\'<a id="\',glb.vote_link_elem_id,\'" href="javascript:void(0);"\',s.link_style({\'text-decoration\':\'none\'}),\'>vote</a>\',\'</div>\',].join(\'\');}\nelse{vote_link=[\'<div class="TWIIGS_poll_results_voting_message"\',s.block_style({\'font-style\':\'italic\',\'margin-top\':\'2px\',\'text-align\':\'center\'}),\'>\',\'Thanks for voting!\',\'</div>\',].join(\'\');}\nvar total_votes_html=\'\';if(p.empty(glb.poll[\'poll_hide_votes\'])&&p.empty(glb.poll[\'poll_hide_results\'])){total_votes_html=[\'<div class="TWIIGS_poll_results_total_votes"\',s.block_style({\'margin-top\':\'2px\',\'text-align\':\'center\'}),\'>\',\'Total votes: \',glb.poll[\'total_votes\'],\'</div>\',].join(\'\');}\nvar results_html=[\'<ul class="TWIIGS_poll_results_answer_choices"\',s.list_style({}),\'>\',results,\'</ul>\',total_votes_html,vote_link,].join(\'\');var elem=$(glb.results_elem_id);if(elem){elem.innerHTML=results_html;}\ne.on(glb.vote_link_elem_id,\'click\',switch_to_poll_answers);}}\nfunction update_ad_results(){var results=generate_results(glb.ad_results_max_poll_bar_width,glb.ad_results_color);var ad=generate_ad();if(results){var total_votes_html=\'\';if(p.empty(glb.poll[\'poll_hide_votes\'])&&p.empty(glb.poll[\'poll_hide_results\'])){total_votes_html=[\'<div class="TWIIGS_poll_ad_results_total_votes"\',s.block_style({\'margin-top\':\'2px\',\'text-align\':\'center\',\'color\':glb.ad_results_color}),\'>\',\'Total votes: \',glb.poll[\'total_votes\'],\'</div>\',].join(\'\');}\nvar results_headline_html=\'\';if(p.empty(glb.poll[\'poll_hide_results\'])||p.empty(glb.poll[\'poll_status\'])){results_headline_html=[\'<div class="TWIIGS_poll_ad_results_headline"\',s.block_style({\'margin-top\':\'10px\',\'font-weight\':\'bold\',\'color\':glb.ad_results_color}),\'>Results:</div>\',].join(\'\');}\nvar ad_results_html=[\'<div class="TWIIGS_poll_ad_results_container" id="\',glb.ad_results_results_id,\'"\',s.block_style({\'float\':\'left\',\'width\':glb.ad_results_poll_width+\'px\'}),\'>\',\'<div class="TWIIGS_poll_ad_results_voting_message"\',s.block_style({\'font-style\':\'italic\',\'text-align\':\'center\',\'color\':glb.ad_results_color}),\'>Thanks for voting!</div>\',results_headline_html,\'<ul class="TWIIGS_poll_ad_results_answer_choices"\',s.list_style({}),\'>\',results,\'</ul>\',total_votes_html,\'</div>\',\'<div\',s.block_style({\'float\':\'right\',\'width\':\'300px\'}),\'>\',ad,\'</div>\',\'<div class="TWIIGS_poll_ad_results_close_link"\',s.block_style({\'clear\':\'both\',\'margin-top\':\'8px\',\'text-align\':\'center\'}),\'>\',\'<a id="\',glb.ad_results_close_link_elem_id,\'" href="javascript:void(0);"\',s.link_style({\'font-weight\':\'bold\',\'text-decoration\':\'none\',\'color\':glb.ad_results_link_color}),\'>close</a>\',\'</div>\',].join(\'\');var elem=$(glb.ad_results_elem_id);if(elem){elem.innerHTML=ad_results_html;}\ne.on(glb.ad_results_elem_id,\'click\',hide_ad_results);e.on(glb.ad_results_close_link_elem_id,\'click\',hide_ad_results);}}\nfunction generate_ad(){var adtag=glam.ads.getAdTag(glam.ads.AdType.DEFAULT300x250,{\'moduleId\':glb.module_id});return adtag.adtag;}\nfunction hide_ad_results(){s.hide(glb.ad_results_elem_id);}\nfunction display_ad_results(){update_ad_results();s.show(glb.ad_results_elem_id);glb.ad_results_overlay.show();}\nfunction submit_vote(){var form_elem=$(glb.form_elem_id);if(form_elem){var form_params=c.setForm(form_elem);var user_vote_url=glb.vote_url+\'&\'+form_params;g.script(user_vote_url,{\'onFailure\':vote_failure,\'onSuccess\':vote_success});s.hide(glb.answers_elem_id);s.show(glb.switching_elem_id);}}\nfunction vote_failure(){s.hide(glb.switching_elem_id);s.show(glb.answers_elem_id);s.hide(glb.vote_button_area_elem_id);s.show(glb.vote_response_elem_id);}\nfunction vote_success(){var form_elem=$(glb.form_elem_id);if(form_elem){var answers=form_elem.elements[glb.answer_id_param];for(var i=0;i<answers.length;i++){if(answers[i].checked){var answer_idx=parseInt(answers[i].value)-1;glb.poll[\'poll_results\'][answer_idx]++;}}\nglb.poll[\'total_votes\']++;glb.poll[\'user_voted\']=true;}\nupdate_poll_results();if(!p.empty(glb.poll[\'poll_advertisements\'])){display_ad_results();}\nswitch_to_poll_results();}};}\n/***MAIN***/\nTWIIGS.view.poll_profile(48167093667345);\n</scri'+'pt>\n\n  <script>gadgets.util.runOnLoadHandlers();</scri'+'pt></div>';
    

    gadgets.container.addGadget(gadget);
    gadgets.container.layoutManager.addGadgetChromeId(gadget.id, 'gadget-1878652072');

    var p = gadgets.container.gadgetService.getUrlForView(gadget.id, 'popup');
    if (p) { gadget.popupUrl = p; }

    gadgets.container.renderGadget(gadget);
});

var Atako = {};
Atako.renderGadget = function () {
  try {
    for (var i=0; i<window.glamGadgets.length; i++) {
        window.glamGadgets[i].call();
    }
  } catch (e) {
    if (window.console) console.log('error rendering gadget ' + e); 
  }
  window.glamGadgets = [];
};

document.write("<div id='gadget-1878652072' class='gadgets-gadget-chrome'>&nbsp;</div>");

document.write("<scr" + "ipt type='text/javascript' src='http://www24a.glam.com/appdir/resources/rendergadget.js'></scr" + "ipt>");

} }
