(function(){var c=function(a,d){return new c.selector(a,d)};c.selector=function(a,d){var f;f=typeof a=="string"?Sizzle(a,d):a&&a.Egg?a.get():a;this._isXML=Sizzle.isXML(d);this.get=function(g){var m=g!==undefined;if(!f)return m?undefined:[];if(isNaN(f.length)){g=[];g.push(f);return m?f:g}else return m?f[g]:f};this.find=function(g){f=Sizzle(g,this.get(0));return this};this.filter=function(g){f=Sizzle.matches(g,this.get());return this};this.Egg="1.0";return this};c.browser=new (function(){var a=navigator.userAgent.toLowerCase();
this.chrome=a.match(/chrome/);this.safari=!a.match(/chrome/)&&a.match(/safari/);this.webkit=a.match(/webkit/);this.opera=window.opera;this.ie5=a.match(/msie 5/);this.ie6=a.match(/msie 6/);this.ie7=a.match(/msie 7/);this.ie8=a.match(/msie 8/);this.ie=a.match(/msie/);this.kkman=a.match(/kkman/);this.firefox2=a.match(/firefox\/2/);this.firefox3=a.match(/firefox\/3/);this.firefox=a.match(/firefox/)});c.each=function(a,d){if(a){a.Egg&&(a=a.get());if(a.length===undefined)d.call(a,a);else for(var f=0,g;g=
a[f];f++)d.call(g,g)}};c.method=c.selector.prototype;c.method.size=function(){return this.get().length};c.method.each=function(a){c.each(this,a);return this};c.method.css=function(a,d){var f=function(g){if(g=="float")return"cssFloat";return g.replace(/-([a-z])/,function(m,p){return p.toUpperCase()})};if(d!==undefined)c.each(this,function(g){g.style[f(a)]=d});else if(typeof a=="string")return this.get(0)&&this.get(0).style[f(a)]||undefined;else c.each(this,function(g){for(var m in a)g.style[f(m)]=
a[m]});return this};c.method.opacity=function(a){a=parseFloat(a);a<0&&(a=0);a>1&&(a=1);c.each(this,function(d){if(c.browser.ie)d.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+a*100+")";else d.style.opacity=a});this.attr("eggOpacity",a);return this};c._displayMap={li:"list-item",table:"table",tr:"table-row",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",col:"table-column",colgroup:"table-column-group",th:"table-cell",td:"table-cell",caption:"table-caption",
button:"inline-block",textarea:"inline-block",input:"inline-block",select:"inline-block"};c._blockTags=["html","address","blockquote","body","dd","div","dl","dt","embed","fieldset","form","frame","frameset","h1","h2","h3","h4","h5","h6","noframes","object","ol","p","ul","center","dir","hr","menu","pre"];c.method.show=function(){c.each(this,function(a){if(a.eggDisplay&&a.eggDisplay!="none")a.style.display=a.eggDisplay;else{var d=a.tagName.toLowerCase();if(d.inArray(c._blockTags))a.style.display="block";
else{var f="inline";if(c._displayMap[d])f=c.browser.ie6||c.browser.ie7?"block":c._displayMap[d];a.style.display=f}}a.eggDisplay&&a.removeAttribute("eggDisplay")});return this};c.method.hide=function(){c.each(this,function(a){a.eggDisplay=a.style.display;a.style.display="none"});return this};c.method.pos=function(){for(var a=this.get(0),d=a.offsetLeft,f=a.offsetTop;a.offsetParent;){a=a.offsetParent;d+=a.offsetLeft;f+=a.offsetTop}return{x:d,y:f}};c.method.addEvent=function(a,d){c.event.add(this.get(),
a,d);return this};c.method.removeEvent=function(a,d){c.event.remove(this.get(),a,d);return this};c.each("abort beforeunload blur change click contextmenu dblclick error focus keydown keypress keyup load mousedown mousemove mouseout mouseover mouseup reset resize scroll select submit unload".split(" "),function(a){c.method[a]=function(d){d?c.event.add(this.get(),a,d):c.event.trigger(this.get(),a);return this}});c.method.hover=function(a,d){var f=this.get();c.event.add(f,"mouseover",a);c.event.add(f,
"mouseout",d);return this};c.method.html=function(a){if(a===undefined)return this.get(0).innerHTML;if(typeof a=="function")a=a.call(this);c.each(this.get(),function(d){d.innerHTML=a});return this};c.method.val=function(a){var d;if(this._isXML)if(a===undefined){d=[];c.each(this.get(),function(f){if(f.nodeType!=3&&f.nodeType!=4)f=f.firstChild;f.nodeType==3||f.nodeType==4?d.push(f.nodeValue):d.push(undefined)});if(d.length!==0){if(d.length==1)return d[0];return d}}else{c.each(this.get(),function(f){if(f.nodeType!=
3&&f.nodeType!=4)f=f.firstChild;if(f.nodeType==3||f.nodeType==4){if(typeof a=="function")a=a.call(f);f.nodeValue=a}});return this}else if(a===undefined){d=[];c.each(this.get(),function(f){d.push(f.value)});if(d.length!==0){if(d.length==1)return d[0];return d}}else{if(typeof a=="function")a=a.call(this);c.each(this.get(),function(f){f.value=a});return this}};c.method.attr=function(a,d){if(d!==undefined)c.each(this.get(),function(f){f[a]=d});else if(typeof a=="string")return this.get(0)&&this.get(0)[a]||
undefined;else c.each(this.get(),function(f){for(var g in a)f[g]=a[g]});return this};c.method.removeAttr=function(a){if(typeof a=="string")a=[a];c.each(this.get(),function(d){for(var f=0,g=a.length;f<g;f++)d.removeAttribute(a[f])});return this};c.method.appendTo=function(a){a.Egg&&(a=a.get(0));c.each(this.get(),function(d){try{a.appendChild(d)}catch(f){}});return this};c.method.removeFrom=function(a){a.Egg&&(a=a.get(0));c.each(this.get(),function(d){try{a.removeChild(d)}catch(f){}});return this};
c.tooltip={counter:0,_getCursorPos:function(a,d){var f=c.body(),g=a.clientY+f.scrollTop+10,m=a.clientX+f.scrollLeft+10,p=d.attr("offsetWidth"),k=d.attr("offsetHeight");if(m+p>f.clientWidth+f.scrollLeft)m-=p+20;if(g+k>f.clientHeight+f.scrollTop)g-=k+20;return{x:m,y:g}}};c.method.tooltip=function(a,d){if(!(typeof a).inArray(["string","function"])){d=a;a=undefined}d=d||{};var f,g;switch(d.trigger){case "click":f=this.mousedown;g=this.mouseup;break;case "input":f=this.focus;g=this.blur;break;case "hover":default:}f=
f||this.mouseover;g=g||this.mouseout;var m;f.call(this,function(p){p=window.event||p;var k=c(p.srcElement||p.target),n=c(document.createElement("div")),s="egg_tip"+ ++c.tooltip.counter;k.attr("egg_my_tooltip_id",s);var t="cursor",u="cursor";if(d.position){d.position=d.position.toLowerCase();var w=d.position.split(" ");if(w.length==2){t=w[1];u=w[0]}if(!t.inArray(["cursor","top","center","bottom","before","after"])){t=parseInt(t,10);isNaN(t)&&(t="cursor")}if(!u.inArray(["cursor","left","center","right",
"before","after"])){u=parseInt(u,10);isNaN(u)&&(u="cursor")}}if(u=="cursor"||t=="cursor"){m=function(z){z=window.event||z;z=c.tooltip._getCursorPos(z,n);u=="cursor"&&n.css("left",z.x+"px");t=="cursor"&&n.css("top",z.y+"px")};k.mousemove(m)}n.attr("id",s);if(!d.className&&!d.css)n.css({border:"solid 1px #b46600","background-color":"#fffad2",color:"#464646"});else{d.className&&n.attr("className",d.className);d.css&&n.css(css)}s=a;if(typeof s=="function")s=s.call(k);if(!s)if(s=k.attr("title")){k.attr("originalTitle",
k.attr("title"));k.attr("title","")}s=s||"";n.css({"z-index":30,position:"absolute",visibility:"hidden"}).html(s).appendTo(document.body);s=k.pos();p=c.tooltip._getCursorPos(p,n);var y,v;if(typeof t=="string")switch(t){case "top":y=s.y;break;case "center":y=parseInt(s.y+k.attr("offsetHeight")/2-n.attr("offsetHeight")/2,10);break;case "bottom":y=s.y+k.attr("offsetHeight")-n.attr("offsetHeight");break;case "before":y=s.y-n.attr("offsetHeight");break;case "after":y=s.y+k.attr("offsetHeight");break;case "cursor":y=
p.y;break;default:}else y=t;if(typeof u=="string")switch(u){case "left":v=s.x;break;case "center":v=parseInt(s.x+k.attr("offsetWidth")/2-n.attr("offsetWidth")/2,10);break;case "right":v=s.x+k.attr("offsetWidth")-n.attr("offsetWidth");break;case "before":v=s.x-n.attr("offsetWidth");break;case "after":v=s.x+k.attr("offsetWidth");break;case "cursor":v=p.x;break;default:}else v=u;if(d.offset&&u!="cursor")v+=parseInt(d.offset[0],10);if(d.offset&&t!="cursor")y+=parseInt(d.offset[1],10);p=function(){n.css({left:v+
"px",top:y+"px",visibility:"visible"});d.onShow&&d.onShow.call(k,n)};d.delay&&parseInt(d.delay,10)>0?setTimeout(p,d.delay):p()});g.call(this,function(p){p=window.event||p;p=c(p.srcElement||p.target);c("#"+p.attr("egg_my_tooltip_id")).removeFrom(document.body);c.tooltip.counter--;p.attr("title",p.attr("originalTitle"));p.removeEvent("mousemove",m);d.onHide&&d.onHide.call(p)});return this};c.cookie={get:function(a){a+="=";var d=document.cookie.indexOf(a,0);if(d==-1)return"";var f=document.cookie.indexOf(";",
d);f==-1&&(f=document.cookie.length);return unescape(document.cookie.substring(d+a.length,f))},set:function(a,d,f,g,m,p){if(a===undefined||d===undefined)return false;a=a+"="+escape(d);f&&(a+=";domain="+f);if(typeof m=="number"){f=new Date;f.setDate(f.getDate()+m);a+=";expires="+f.toGMTString()}else m&&(a+=";expires="+m);g&&(a+=";path="+g);p&&(a+=";secure");document.cookie=a;return true},del:function(a,d,f){if(a===undefined)return false;a=a+"=";d!==undefined&&(a+=";domain="+d);a+=";expires=Thu, 01-Jan-1970 00:00:01 GMT";
f!==undefined&&(a+=";path="+f);document.cookie=a;return true}};c.event={add:function(a,d,f){c.each(a,function(g){try{if(g.attachEvent)g.attachEvent("on"+d,f);else if(c.browser.opera)g["on"+d]=f;else g.addEventListener(d,f,false)}catch(m){}})},remove:function(a,d,f){c.each(a,function(g){try{g.detachEvent?g.detachEvent("on"+d,f):g.removeEventListener(d,f,false)}catch(m){}})},trigger:function(a,d,f){f=f||{};c.each(a,function(){try{if(this.fireEvent)this.fireEvent("on"+d);else{var g=null;switch(d){case "abort":case "change":case "error":case "load":case "reset":case "resize":case "scroll":case "select":case "submit":case "unload":g=
document.createEvent("Event");g.initEvent(d,true,true);break;case "keydown":case "keypress":case "keyup":g=document.createEvent("KeyboardEvent");g.initKeyEvent(d,true,true,window,f.ctrlKey||false,f.altKey||false,f.shiftKey||false,f.metaKey||false,f.keyCode||0,f.charCode||0);break;case "click":case "dblclick":case "mousedown":case "mouseup":case "mouseover":case "mousemove":case "mouseout":g=document.createEvent("MouseEvent");g.initMouseEvent(d,true,true,window,f.detail||0,f.screenX||0,f.screenY||
0,f.clientX||0,f.clientY||0,f.ctrlKey||false,f.altKey||false,f.shiftKey||false,f.metaKey||false,f.button||0,f.relatedTarget||null);break;case "focus":case "blur":g=document.createEvent("UIEvent");g.initUIEvent(d,true,true,window,f.detail||0);break;default:return}this.dispatchEvent(g)}}catch(m){}})},preventDefault:function(a){a.preventDefault&&a.preventDefault();a.returnValue=false},stop:function(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}};c.body=function(a){a=a||document;if(a.compatMode&&
a.compatMode=="CSS1Compat")return a.documentElement;return a.body};c.lightbox=function(a,d){d=d||{};var f=c.body(),g=c(document.createElement("div"));g.attr("id","egg_mask").opacity(0.7).css({position:"absolute",top:"0px",left:"0px",zIndex:9,backgroundColor:d.maskBgColor||"black",width:f.scrollWidth+"px",height:f.scrollHeight+"px"});var m;m=d.closeTrigger=="none"?function(){}:typeof d.closeTrigger=="function"?d.closeTrigger:c.lightbox.close;g.click(m);var p=c(document.createElement("div")),k=d.absolute?
"absolute":"fixed";if(c.browser.ie){k="absolute";if(!d.absolute&&!c.browser.ie6&&document.compatMode&&document.compatMode=="CSS1Compat")k="fixed"}p.attr("id","egg_box").css({position:k,textAlign:"center",zIndex:10,visibility:"hidden"});d.className&&p.attr("className",d.className);d.css&&p.css(d.css);typeof a=="object"?p.get(0).appendChild(a):p.html(a);p.attr({originalScrollWidth:f.scrollWidth,originalScrollHeight:f.scrollHeight});c("select, object, embed").css("visibility","hidden");g.appendTo(document.body);
p.appendTo(document.body);this.refresh=c.lightbox.refresh;this.close=m;this.refresh();p.css("visibility","visible");return this};c.lightbox.open=c.lightbox;c.lightbox.close=function(){c("select, object, embed").css("visibility","visible");c("#egg_mask").removeFrom(document.body);c("#egg_box").removeFrom(document.body)};c.lightbox.refresh=function(a){var d=c("#egg_box"),f=c.body();if(d.size()!==0){if(a!==undefined)typeof a=="object"?d.get(0).appendChild(a):d.html(a);var g,m;g=d.get(0).offsetWidth;
m=d.get(0).offsetHeight;a=Math.floor(f.clientHeight/2-m/2);if(d.css("position")=="absolute")a+=f.scrollTop;if(a+m>d.attr("originalScrollHeight"))a=d.attr("originalScrollHeight")-m;a<0&&(a=0);g=Math.floor(f.clientWidth/2-g/2);g<0&&(g=0);d.css({left:g+"px",top:a+"px"});c("#egg_mask").css({width:f.scrollWidth+"px",height:f.scrollHeight+"px"})}};c.msgbox=function(a,d){if(!(c("#egg_msgbox").size()>0)){d=d||c.msgbox.configure||{};var f=c.body(),g,m;if(!d.modeless){m=c(document.createElement("div"));m.attr("id",
"egg_msgbox_mask").opacity(0).css({position:"absolute",top:"0px",left:"0px",zIndex:19,"background-color":"black",width:f.scrollWidth+"px",height:f.scrollHeight+"px"}).appendTo(document.body)}var p=d.width||350,k=d.height||22,n=d.absolute?"absolute":"fixed";g=c(document.createElement("div"));if(c.browser.ie){n="absolute";if(!d.absolute&&!c.browser.ie6&&document.compatMode&&document.compatMode=="CSS1Compat")n="fixed"}g.css({"background-color":"white",position:n,zIndex:20,border:"solid 1px #CCCCCC",
"border-top":"none",width:p+"px",visibility:"hidden"}).html(c.msgbox._getBasicLayout).attr({id:"egg_msgbox",originalScrollWidth:f.scrollWidth,originalScrollHeight:f.scrollHeight}).appendTo(document.body);f=c("#egg_msgbox_content");p=c("#egg_msgbox_title");var s=c("#egg_msgbox_title_text"),t=c("#egg_msgbox_closeButton");n=c("#egg_msgbox_buttons");f.html(a);s.html(d.title||"\u8a0a\u606f");p.mousedown(c.msgbox._drag);p.css({width:"100%",height:"30px","line-height":"30px","background-image":"url(http://pic.bahamut.com.tw/h1_bg.gif)",
"vertical-align":"middle",color:"#117e96","font-weight":"bold","font-family":"Arial","font-size":"12pt",cursor:"move"});t.css({cursor:c.browser.ie?"hand":"pointer"}).mousedown(c.msgbox.close).attr("title","\u95dc\u9589");f.css({width:"100%",color:"black",height:k+"px","vertical-align":"middle","line-height":"24px","font-family":"Arial","font-size":"15px",padding:"15px"});k='<table cellspacing="0" cellpadding="0" border="0" width="100%">';k+='<tr id="egg_msgbox_btn_table"></tr></table>';n.css({width:"100%",
"text-align":"center",padding:"0 10px 10px 10px"}).html(k);k=c("#egg_msgbox_btn_table").get(0);d.buttons&c.msgbox.OK&&c.msgbox._createButton("\u78ba\u5b9a",d.onOk).appendTo(k);d.buttons&c.msgbox.YES&&c.msgbox._createButton("\u662f",d.onYes).appendTo(k);for(var u in d.customButtons){n=d.customButtons[u];c.msgbox._createButton(n.label,n.click,n.config).appendTo(k)}d.buttons&c.msgbox.NO&&c.msgbox._createButton("\u5426",d.onNo).appendTo(k);if(d.buttons&c.msgbox.CANCEL)c.msgbox._createButton("\u53d6\u6d88",
d.onCancel||c.msgbox.close).appendTo(k);c.msgbox._setMsgBoxPosition(g);g.css("visibility","visible");g={box:g,title:p,content:f};d.onShow&&(ret=d.onShow.call(g));if(!d.buttons&&!d.customButtons&&!d.onHide)c.msgbox._fadeOutTimer=setTimeout(c.msgbox._fadeOut,2500);else m&&m.click(c.msgbox._notify)}};c.msgbox.OK=1;c.msgbox.CANCEL=2;c.msgbox.YES=4;c.msgbox.NO=8;c.msgbox._isDragging=false;c.msgbox._fadeOutTimer=0;c.msgbox.configure={};c.msgbox.setConfigure=function(a){c.msgbox.configure=a||{}};c.msgbox.close=
function(){clearTimeout(c.msgbox._fadeOutTimer);var a=c("#egg_msgbox");if(a.size()!==0){a={box:a,title:c("#egg_msgbox_title"),content:c("#egg_msgbox_content")};var d=true;c.msgbox.configure.onHide&&(d=c.msgbox.configure.onHide.call(a));d&&c("#egg_msgbox,#egg_msgbox_mask").removeFrom(document.body)}};c.msgbox._drag=function(a){a=window.event||a;if(a.button===(c.browser.ie?1:0)){c.msgbox._isDragging=true;var d=c("#egg_msgbox"),f=c.body(),g=a.clientX+f.scrollLeft;f=a.clientY+f.scrollTop;c(document.createElement("div")).opacity(0).attr({id:"egg_msgbox_cover",
unselectable:"on",eggMsgboxDragLeft:g-d.attr("offsetLeft"),eggMsgboxDragTop:f-d.attr("offsetTop")}).css({backgroundColor:"red",width:"150px",height:"150px",position:"absolute",left:g-75+"px",top:f-75+"px",zIndex:21,cursor:"move"}).mousemove(c.msgbox._dragging).mouseup(c.msgbox._drop).mouseout(c.msgbox._drop).appendTo(document.body);c.event.preventDefault(a)}};c.msgbox._drop=function(a){a=window.event||a;c.msgbox._isDragging=false;c("#egg_msgbox_cover").removeFrom(document.body);c.event.preventDefault(a)};
c.msgbox._dragging=function(a){if(c.msgbox._isDragging){a=window.event||a;var d=c("#egg_msgbox_cover"),f=c.body(),g=a.clientX+f.scrollLeft;f=a.clientY+f.scrollTop;c("#egg_msgbox").css({left:g-d.attr("eggMsgboxDragLeft")+"px",top:f-d.attr("eggMsgboxDragTop")+"px"});d.css({left:g-75+"px",top:f-75+"px"});c.event.preventDefault(a)}};c.msgbox._notify=function(){var a=c("#egg_msgbox"),d=0,f=function(){var g=a.attr("eggOpacity")||1;g=parseFloat(g)==1?0.5:1;a.opacity(g);if(d<5){d++;setTimeout(f,80)}};f()};
c.msgbox._fadeOut=function(a){c.browser.ie&&c.msgbox.close();a=a||30;var d=function(){var f=c("#egg_msgbox");if(f.size()!==0){var g=f.attr("eggOpacity");g===undefined&&(g=1);g-=0.2;g=Math.round(g*100)/100;g<0&&(g=0);f.opacity(g);g>0?setTimeout(d,a):c.msgbox.close()}};d()};c.msgbox._setMsgBoxPosition=function(a){var d,f,g,m=c.body();d=a.attr("offsetWidth");f=a.attr("offsetHeight");g=Math.floor(m.clientHeight/2-f/2);if(a.css("position")=="absolute")g+=m.scrollTop;if(g+f>a.attr("originalScrollHeight"))g=
a.attr("originalScrollHeight")-f;g<0&&(g=0);d=Math.floor(m.clientWidth/2-d/2);d<0&&(d=0);a.css({left:d+"px",top:g+"px"});c("#egg_msgbox_mask").css({width:m.scrollWidth+"px",height:m.scrollHeight+"px"})};c.msgbox._getBasicLayout=function(){var a="";a+='<div id="egg_msgbox_title">';a+='<img style="float:right; margin:9px 5px 0 0;" id="egg_msgbox_closeButton" src="http://pic.bahamut.com.tw/close.gif" />';a+='<img style="float:left; margin-right:5px;" src="http://pic.bahamut.com.tw/h1_img.gif" />';a+=
'<span id="egg_msgbox_title_text"></span>';a+="</div>";a+='<div id="egg_msgbox_content"></div>';a+='<div id="egg_msgbox_buttons"></div>';return a};c.msgbox._createButton=function(a,d,f){f=f||{};var g=c(document.createElement("td"));g.css({"text-align":"center"});var m=c(document.createElement("input"));m.attr({type:"button",value:a}).css("width","80px");typeof d=="function"&&m.click(d);f.css&&m.css(f.css);f.className&&m.attr("className",f.className);m.appendTo(g.get(0));return g};c._ajaxFunctions=
{};c.ajaxLoading=function(a){c._ajaxFunctions.loading=a};c.ajaxLoaded=function(a){c._ajaxFunctions.loaded=a};c.ajaxCompleted=function(a){c._ajaxFunctions.completed=a};c.ajax=function(a){var d=null,f=false;if(!a.url.match(/^\/(?:ajax|editor)\/.+/))throw"url incorrect";try{d=new window.XMLHttpRequest}catch(g){d=new ActiveXObject("Microsoft.XMLHTTP")}if(d===null)throw"create XmlHttpRequest instance failed!";d.onreadystatechange=function(){switch(d.readyState){case 1:!f&&a.loading&&a.loading.call(a.context,
d);!f&&c._ajaxFunctions.loading&&c._ajaxFunctions.loading.call(a.context,d);break;case 2:a.loaded&&a.loaded.call(a.context,d);c._ajaxFunctions.loaded&&c._ajaxFunctions.loaded.call(a.context,d);break;case 4:f=true;c._ajaxFunctions.completed&&c._ajaxFunctions.completed.call(a.context,d);if(d.status==200){if(a.success){var m=d.getResponseHeader("content-type").indexOf("xml")!=-1?d.responseXML:d.responseText;a.success.call(a.context,m,d)}}else a.fail&&a.fail(a.context,d.status,d);break;default:}};a.param=
a.param||null;a.method=a.method||"GET";a.method=a.method.toUpperCase();if(a.method=="GET"&&a.param){a.url+="?"+a.param;a.param=null}a.username?d.open(a.method,a.url,true,a.username,a.password):d.open(a.method,a.url,true);d.setRequestHeader("content-type","application/x-www-form-urlencoded");d.setRequestHeader("X-Requested-With","XMLHttpRequest");d.send(a.param);a.timeout&&a.timeout>0&&setTimeout(function(){if(d&&!f){d.abort();throw"timeout";}},a.timeout)};c.sprintf=function(a){return c.sprintf._sprintf_(a,
arguments,1)};c.sprintf.FREGEXP=/^([^%]*)%([-+])?(0)?(\d+)?(\.(\d+))?([doxXcsf])(.*)$/;c.sprintf.HDIGITS=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];c.sprintf._empty=function(a){if(a===undefined||a===null)return true;return a===""?true:false};c.sprintf._int_=function(a){return Math.floor(a)};c.sprintf._printf_num_=function(a,d,f,g,m){a=parseInt(a,10);if(isNaN(a))return"NaN";var p=a<0?-a:a,k="";if(p===0)k="0";else for(;p>0;){k=c.sprintf.HDIGITS[p%d]+k;p=c.sprintf._int_(p/d)}if(a<
0)k="-"+k;if(g=="-")f=" ";return c.sprintf._printf_str_(k,f,g,m,-1)};c.sprintf._printf_float_=function(a,d,f,g,m){if(m===undefined){if(parseInt(a,10)!=a)return""+a;m=5}a=""+Math.round(a*Math.pow(10,m));d=a.length-m;if(d===0)return"0."+a.substr(d,m);return a.substr(0,d)+"."+a.substr(d,m)};c.sprintf._printf_str_=function(a,d,f,g,m){if(a===undefined)return"(undefined)";if(a===null)return"(null)";if((g=g-a.length)>0)if(f=="-")for(;g>0;){a+=d;g--}else for(;g>0;){a=d+a;g--}if(m>0)return a.substr(0,m);return a};
c.sprintf._sprintf_=function(a,d,f){var g="",m,p,k;p=a.split("\n");for(m=0;m<p.length;m++){if(m>0)g+="\n";for(a=p[m];k=c.sprintf.FREGEXP.exec(a);){var n="",s=" ";c.sprintf._empty(k[1])||(g+=k[1]);c.sprintf._empty(k[2])||(n=k[2]);c.sprintf._empty(k[3])||(s="0");var t=k[4],u=k[6],w=k[7];a=k[8];if(f>=d.length)g+="[missing parameter for type '"+w+"']";else{k=d[f++];switch(w){case "d":g+=c.sprintf._printf_num_(k,10,s,n,t);break;case "o":g+=c.sprintf._printf_num_(k,8,s,n,t);break;case "x":g+=c.sprintf._printf_num_(k,
16,s,n,t);break;case "X":g+=c.sprintf._printf_num_(k,16,s,n,t).toUpperCase();break;case "c":g+=String.fromCharCode(parseInt(k,10));break;case "s":g+=c.sprintf._printf_str_(k,s,n,t,u);break;case "f":g+=c.sprintf._printf_float_(k,s,n,t,u);break;default:g+="[unknown format '"+w+"']"}}}g+=a}return g};c.extend=c.selector.prototype;window.egg=window.$=c})();String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};
String.prototype.equals=function(c,a){if(!a)return this.trim().toLowerCase()==c.trim().toLowerCase();return this==c};String.prototype.inArray=function(c,a){var d=this;if(a)d=d.toLowerCase();for(var f=0;f<c.length;f++){if(a)c[f]=c[f].toLowerCase();if(d==c[f])return true}return false};String.prototype.utf8Length=function(){var c=this.match(/[^\x00-\xff]/ig);return c===null?this.length:this.length+c.length*2};
(function(){function c(b,e,h,i,l,j){l=0;for(var q=i.length;l<q;l++){var o=i[l];if(o){o=o[b];for(var r=false;o;){if(o.sizcache===h){r=i[o.sizset];break}if(o.nodeType===1&&!j){o.sizcache=h;o.sizset=l}if(o.nodeName.toLowerCase()===e){r=o;break}o=o[b]}i[l]=r}}}function a(b,e,h,i,l,j){l=0;for(var q=i.length;l<q;l++){var o=i[l];if(o){o=o[b];for(var r=false;o;){if(o.sizcache===h){r=i[o.sizset];break}if(o.nodeType===1){if(!j){o.sizcache=h;o.sizset=l}if(typeof e!=="string"){if(o===e){r=true;break}}else if(k.filter(e,
[o]).length>0){r=o;break}}o=o[b]}i[l]=r}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,f=0,g=Object.prototype.toString,m=false,p=true;[0,0].sort(function(){p=false;return 0});var k=function(b,e,h,i){h=h||[];var l=e=e||document;if(e.nodeType!==1&&e.nodeType!==9)return[];if(!b||typeof b!=="string")return h;var j=[],q,o,r,D,A=true,C=k.isXML(e),B=b,x;do{d.exec("");if(q=d.exec(B)){B=q[3];j.push(q[1]);if(q[2]){D=
q[3];break}}}while(q);if(j.length>1&&s.exec(b))if(j.length===2&&n.relative[j[0]])o=z(j[0]+j[1],e);else for(o=n.relative[j[0]]?[e]:k(j.shift(),e);j.length;){b=j.shift();if(n.relative[b])b+=j.shift();o=z(b,o)}else{if(!i&&j.length>1&&e.nodeType===9&&!C&&n.match.ID.test(j[0])&&!n.match.ID.test(j[j.length-1])){q=k.find(j.shift(),e,C);e=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]}if(e){q=i?{expr:j.pop(),set:w(i)}:k.find(j.pop(),j.length===1&&(j[0]==="~"||j[0]==="+")&&e.parentNode?e.parentNode:e,C);o=q.expr?
k.filter(q.expr,q.set):q.set;if(j.length>0)r=w(o);else A=false;for(;j.length;){q=x=j.pop();if(n.relative[x])q=j.pop();else x="";if(q==null)q=e;n.relative[x](r,q,C)}}else r=[]}r||(r=o);r||k.error(x||b);if(g.call(r)==="[object Array]")if(A)if(e&&e.nodeType===1)for(b=0;r[b]!=null;b++){if(r[b]&&(r[b]===true||r[b].nodeType===1&&k.contains(e,r[b])))h.push(o[b])}else for(b=0;r[b]!=null;b++)r[b]&&r[b].nodeType===1&&h.push(o[b]);else h.push.apply(h,r);else w(r,h);if(D){k(D,l,h,i);k.uniqueSort(h)}return h};
k.uniqueSort=function(b){if(v){m=p;b.sort(v);if(m)for(var e=1;e<b.length;e++)b[e]===b[e-1]&&b.splice(e--,1)}return b};k.matches=function(b,e){return k(b,null,null,e)};k.find=function(b,e,h){var i;if(!b)return[];for(var l=0,j=n.order.length;l<j;l++){var q=n.order[l],o;if(o=n.leftMatch[q].exec(b)){var r=o[1];o.splice(1,1);if(r.substr(r.length-1)!=="\\"){o[1]=(o[1]||"").replace(/\\/g,"");i=n.find[q](o,e,h);if(i!=null){b=b.replace(n.match[q],"");break}}}}i||(i=e.getElementsByTagName("*"));return{set:i,
expr:b}};k.filter=function(b,e,h,i){for(var l=b,j=[],q=e,o,r,D=e&&e[0]&&k.isXML(e[0]);b&&e.length;){for(var A in n.filter)if((o=n.leftMatch[A].exec(b))!=null&&o[2]){var C=n.filter[A],B,x;x=o[1];r=false;o.splice(1,1);if(x.substr(x.length-1)!=="\\"){if(q===j)j=[];if(n.preFilter[A])if(o=n.preFilter[A](o,q,h,j,i,D)){if(o===true)continue}else r=B=true;if(o)for(var E=0;(x=q[E])!=null;E++)if(x){B=C(x,o,E,q);var F=i^!!B;if(h&&B!=null)if(F)r=true;else q[E]=false;else if(F){j.push(x);r=true}}if(B!==undefined){h||
(q=j);b=b.replace(n.match[A],"");if(!r)return[];break}}}if(b===l)if(r==null)k.error(b);else break;l=b}return q};k.error=function(b){throw"Syntax error, unrecognized expression: "+b;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/,
POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(b){return b.getAttribute("href")}},relative:{"+":function(b,e){var h=typeof e==="string",i=h&&!/\W/.test(e);h=h&&!i;if(i)e=e.toLowerCase();i=0;for(var l=b.length,j;i<l;i++)if(j=b[i]){for(;(j=j.previousSibling)&&j.nodeType!==1;);b[i]=h||j&&j.nodeName.toLowerCase()===
e?j||false:j===e}h&&k.filter(e,b,true)},">":function(b,e){var h=typeof e==="string",i,l=0,j=b.length;if(h&&!/\W/.test(e))for(e=e.toLowerCase();l<j;l++){if(i=b[l]){h=i.parentNode;b[l]=h.nodeName.toLowerCase()===e?h:false}}else{for(;l<j;l++)if(i=b[l])b[l]=h?i.parentNode:i.parentNode===e;h&&k.filter(e,b,true)}},"":function(b,e,h){var i=f++,l=a,j;if(typeof e==="string"&&!/\W/.test(e)){j=e=e.toLowerCase();l=c}l("parentNode",e,i,b,j,h)},"~":function(b,e,h){var i=f++,l=a,j;if(typeof e==="string"&&!/\W/.test(e)){j=
e=e.toLowerCase();l=c}l("previousSibling",e,i,b,j,h)}},find:{ID:function(b,e,h){if(typeof e.getElementById!=="undefined"&&!h)return(b=e.getElementById(b[1]))?[b]:[]},NAME:function(b,e){if(typeof e.getElementsByName!=="undefined"){for(var h=[],i=e.getElementsByName(b[1]),l=0,j=i.length;l<j;l++)i[l].getAttribute("name")===b[1]&&h.push(i[l]);return h.length===0?null:h}},TAG:function(b,e){return e.getElementsByTagName(b[1])}},preFilter:{CLASS:function(b,e,h,i,l,j){b=" "+b[1].replace(/\\/g,"")+" ";if(j)return b;
j=0;for(var q;(q=e[j])!=null;j++)if(q)if(l^(q.className&&(" "+q.className+" ").replace(/[\t\n]/g," ").indexOf(b)>=0))h||i.push(q);else if(h)e[j]=false;return false},ID:function(b){return b[1].replace(/\\/g,"")},TAG:function(b){return b[1].toLowerCase()},CHILD:function(b){if(b[1]==="nth"){var e=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(b[2]==="even"&&"2n"||b[2]==="odd"&&"2n+1"||!/\D/.test(b[2])&&"0n+"+b[2]||b[2]);b[2]=e[1]+(e[2]||1)-0;b[3]=e[3]-0}b[0]=f++;return b},ATTR:function(b,e,h,i,l,j){e=b[1].replace(/\\/g,
"");if(!j&&n.attrMap[e])b[1]=n.attrMap[e];if(b[2]==="~=")b[4]=" "+b[4]+" ";return b},PSEUDO:function(b,e,h,i,l){if(b[1]==="not")if((d.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,e);else{b=k.filter(b[3],e,h,true^l);h||i.push.apply(i,b);return false}else if(n.match.POS.test(b[0])||n.match.CHILD.test(b[0]))return true;return b},POS:function(b){b.unshift(true);return b}},filters:{enabled:function(b){return b.disabled===false&&b.type!=="hidden"},disabled:function(b){return b.disabled===
true},checked:function(b){return b.checked===true},selected:function(b){return b.selected===true},parent:function(b){return!!b.firstChild},empty:function(b){return!b.firstChild},has:function(b,e,h){return!!k(h[3],b).length},header:function(b){return/h\d/i.test(b.nodeName)},text:function(b){return"text"===b.type},radio:function(b){return"radio"===b.type},checkbox:function(b){return"checkbox"===b.type},file:function(b){return"file"===b.type},password:function(b){return"password"===b.type},submit:function(b){return"submit"===
b.type},image:function(b){return"image"===b.type},reset:function(b){return"reset"===b.type},button:function(b){return"button"===b.type||b.nodeName.toLowerCase()==="button"},input:function(b){return/input|select|textarea|button/i.test(b.nodeName)}},setFilters:{first:function(b,e){return e===0},last:function(b,e,h,i){return e===i.length-1},even:function(b,e){return e%2===0},odd:function(b,e){return e%2===1},lt:function(b,e,h){return e<h[3]-0},gt:function(b,e,h){return e>h[3]-0},nth:function(b,e,h){return h[3]-
0===e},eq:function(b,e,h){return h[3]-0===e}},filter:{PSEUDO:function(b,e,h,i){var l=e[1],j=n.filters[l];if(j)return j(b,h,e,i);else if(l==="contains")return(b.textContent||b.innerText||k.getText([b])||"").indexOf(e[3])>=0;else if(l==="not"){e=e[3];h=0;for(i=e.length;h<i;h++)if(e[h]===b)return false;return true}else k.error("Syntax error, unrecognized expression: "+l)},CHILD:function(b,e){var h=e[1],i=b;switch(h){case "only":case "first":for(;i=i.previousSibling;)if(i.nodeType===1)return false;if(h===
"first")return true;i=b;case "last":for(;i=i.nextSibling;)if(i.nodeType===1)return false;return true;case "nth":h=e[2];var l=e[3];if(h===1&&l===0)return true;var j=e[0],q=b.parentNode;if(q&&(q.sizcache!==j||!b.nodeIndex)){var o=0;for(i=q.firstChild;i;i=i.nextSibling)if(i.nodeType===1)i.nodeIndex=++o;q.sizcache=j}i=b.nodeIndex-l;return h===0?i===0:i%h===0&&i/h>=0}},ID:function(b,e){return b.nodeType===1&&b.getAttribute("id")===e},TAG:function(b,e){return e==="*"&&b.nodeType===1||b.nodeName.toLowerCase()===
e},CLASS:function(b,e){return(" "+(b.className||b.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(b,e){var h=e[1];h=n.attrHandle[h]?n.attrHandle[h](b):b[h]!=null?b[h]:b.getAttribute(h);var i=h+"",l=e[2],j=e[4];return h==null?l==="!=":l==="="?i===j:l==="*="?i.indexOf(j)>=0:l==="~="?(" "+i+" ").indexOf(j)>=0:!j?i&&h!==false:l==="!="?i!==j:l==="^="?i.indexOf(j)===0:l==="$="?i.substr(i.length-j.length)===j:l==="|="?i===j||i.substr(0,j.length+1)===j+"-":false},POS:function(b,e,h,i){var l=n.setFilters[e[2]];
if(l)return l(b,h,e,i)}}},s=n.match.POS,t=function(b,e){return"\\"+(e-0+1)};for(var u in n.match){n.match[u]=RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,t))}var w=function(b,e){b=Array.prototype.slice.call(b,0);if(e){e.push.apply(e,b);return e}return b};try{Array.prototype.slice.call(document.documentElement.childNodes,0)}catch(y){w=function(b,e){var h=e||[],i=0;if(g.call(b)==="[object Array]")Array.prototype.push.apply(h,
b);else if(typeof b.length==="number")for(var l=b.length;i<l;i++)h.push(b[i]);else for(;b[i];i++)h.push(b[i]);return h}}var v;if(document.documentElement.compareDocumentPosition)v=function(b,e){if(!b.compareDocumentPosition||!e.compareDocumentPosition){if(b==e)m=true;return b.compareDocumentPosition?-1:1}var h=b.compareDocumentPosition(e)&4?-1:b===e?0:1;if(h===0)m=true;return h};else if("sourceIndex"in document.documentElement)v=function(b,e){if(!b.sourceIndex||!e.sourceIndex){if(b==e)m=true;return b.sourceIndex?
-1:1}var h=b.sourceIndex-e.sourceIndex;if(h===0)m=true;return h};else if(document.createRange)v=function(b,e){if(!b.ownerDocument||!e.ownerDocument){if(b==e)m=true;return b.ownerDocument?-1:1}var h=b.ownerDocument.createRange(),i=e.ownerDocument.createRange();h.setStart(b,0);h.setEnd(b,0);i.setStart(e,0);i.setEnd(e,0);h=h.compareBoundaryPoints(Range.START_TO_END,i);if(h===0)m=true;return h};k.getText=function(b){for(var e="",h,i=0;b[i];i++){h=b[i];if(h.nodeType===3||h.nodeType===4)e+=h.nodeValue;
else if(h.nodeType!==8)e+=k.getText(h.childNodes)}return e};(function(){var b=document.createElement("div"),e="script"+(new Date).getTime();b.innerHTML="<a name='"+e+"'/>";var h=document.documentElement;h.insertBefore(b,h.firstChild);if(document.getElementById(e)){n.find.ID=function(i,l,j){if(typeof l.getElementById!=="undefined"&&!j)return(l=l.getElementById(i[1]))?l.id===i[1]||typeof l.getAttributeNode!=="undefined"&&l.getAttributeNode("id").nodeValue===i[1]?[l]:undefined:[]};n.filter.ID=function(i,
l){var j=typeof i.getAttributeNode!=="undefined"&&i.getAttributeNode("id");return i.nodeType===1&&j&&j.nodeValue===l}}h.removeChild(b);h=b=null})();(function(){var b=document.createElement("div");b.appendChild(document.createComment(""));if(b.getElementsByTagName("*").length>0)n.find.TAG=function(e,h){var i=h.getElementsByTagName(e[1]);if(e[1]==="*"){for(var l=[],j=0;i[j];j++)i[j].nodeType===1&&l.push(i[j]);i=l}return i};b.innerHTML="<a href='#'></a>";if(b.firstChild&&typeof b.firstChild.getAttribute!==
"undefined"&&b.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(e){return e.getAttribute("href",2)};b=null})();document.querySelectorAll&&function(){var b=k,e=document.createElement("div");e.innerHTML="<p class='TEST'></p>";if(!(e.querySelectorAll&&e.querySelectorAll(".TEST").length===0)){k=function(i,l,j,q){l=l||document;if(!q&&l.nodeType===9&&!k.isXML(l))try{return w(l.querySelectorAll(i),j)}catch(o){}return b(i,l,j,q)};for(var h in b)k[h]=b[h];e=null}}();(function(){var b=document.createElement("div");
b.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!b.getElementsByClassName||b.getElementsByClassName("e").length===0)){b.lastChild.className="e";if(b.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(e,h,i){if(typeof h.getElementsByClassName!=="undefined"&&!i)return h.getElementsByClassName(e[1])};b=null}}})();k.contains=document.compareDocumentPosition?function(b,e){return!!(b.compareDocumentPosition(e)&16)}:function(b,e){return b!==e&&
(b.contains?b.contains(e):true)};k.isXML=function(b){return(b=(b?b.ownerDocument||b:0).documentElement)?b.nodeName!=="HTML":false};var z=function(b,e){for(var h=[],i="",l,j=e.nodeType?[e]:e;l=n.match.PSEUDO.exec(b);){i+=l[0];b=b.replace(n.match.PSEUDO,"")}b=n.relative[b]?b+"*":b;l=0;for(var q=j.length;l<q;l++)k(b,j[l],h);return k.filter(i,h)};window.Sizzle=k})();
