User:Greenpickle/monobook.js: Difference between revisions

From Pikipedia, the Pikmin wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 11: Line 11:
document.write('<script type="text/javascript" src="http://pikminwiki.com/index.php?title=User:Greenpickle/rcnst.js&action=raw&ctype=text/javascript"></script>');
document.write('<script type="text/javascript" src="http://pikminwiki.com/index.php?title=User:Greenpickle/rcnst.js&action=raw&ctype=text/javascript"></script>');


eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('3 E={};3 1j={};3 1k=0;3 1l=0;3 A=o;3 1m=C;3 1F=-1;3 1n=C;3 25=3k;3 11=X 1o(\'3l\',\'3m\',\'3n\',\'3o\');3 1G=X 1o(\'15\',\'3p\',\'3q\',\'3r\');3 1p=C;3 1H=7;3 26=6;3 1a=2;3 28=30;3 1I=2;3 N=o;3 1b=C;m 1J(a,r,b){v.y=a;v.r=r;v.K=b}m 29(a,b){v.15=b;v.B=a;v.D=a+\'3s\';v.12=a+\'3t\';v.1q=a+\'3u\';v.1r=a+\'3v\';v.K=o;v.O=o;v.F=0;v.1c=o;v.S=-1;v.13=0;v.16=0;v.1s=0;v.Y=C;v.1t=C}m 2a(r,a){v.r=r;3 b=8.u(r.D).G;v.Z=1K.1L((a-b)/26);5(v.Z<1a&&v.Z>=0){v.Z=1a}5(v.Z>-1a&&v.Z<0){v.Z=-1a}v.1d=a}m 2b(){T(i=0;i<11.I;i++){3 a=11[i];3 b=1G[i];1M=8.u(a);5(1M!=o){1N(a,b,1M)}}}m 1N(b,c,d){3 r=X 29(b,c);14(d,\'3w\',m(a){2c(a)});14(d,\'3x\',m(a){2d(a)});14(d,\'3y\',m(a){2e(a)});5(!1b){14(d,\'3z\',m(a){2f(a)});14(d,\'1O\',m(a){2g(a)});d.U(\'2h\',\'3A\')}14(8.u(c),\'2i\',m(a){q 2j(a)});E[b]=r;5(8.u(r.1r)==o){}}m 14(a,b,c){5(a.2k){a.2k(b,c,C)}z 5(L.2l){a.2l(\'2m\'+b,c)}}m 2c(e){3 a=P(e);3 r=E[a.y];5(r==o){q}5(1l==0){1P(r,1k,a)}3 b=a.V;1Q(r,b,25)}m 1P(r,a,b){5(a==40&&!r.Y&&A==o){r.K=\'\';1Q(r,b.V,0)}5(1b){q}5(a==40){5(r.Y){1u(r,r.S,r.S+1,M)}}z 5(a==38){5(r.Y){1u(r,r.S,r.S-1,M)}}z 5(a==27){8.u(r.B).V=r.1c;r.K=r.1c;Q(r)}z 5(r.K!=8.u(r.B).V){}}m 2e(e){3 a=P(e);3 r=E[a.y];5(r==o){q}3 b=1k;1l++;1P(r,b,a)}m 2d(e){5(!e){e=L.2n}3 a=P(e);3 r=E[a.y];5(r==o){q}1n=C;1k=(e.2o==1v)?e.3B:e.2o;1l=0}m 2j(e){3 a=P(e);1p=M;5(A!=o&&A.y!=o){1R(A.y);A=o}T(i=0;i<11.I;i++){3 r=E[11[i]];5(r!=o){3 b=8.u(r.15);5(b!=o&&b==a){r.K=8.u(r.B).V}Q(r)}}q M}m Q(r){5(1b){8.u(r.B).U(\'2p\',\'\')}z{3 c=8.u(r.D);5(c!=o){c.J.2q=\'2r\'}}r.Y=C;r.S=-1}m 1S(a){5(2s){q 2s(a)}5(2t){q 2t(a)}q o}m 2u(a){5(2v){q 2v(a)}5(2w){q 2w(a)}q o}m 2x(r,a,b,c){1j[c]=b;r.K=a;r.1c=a;5(b==\'\'){r.O=o;r.F=0;Q(r)}z{1T{3 p=3C(\'(\'+b+\')\');5(p.I<2||p[1].I==0){r.O=o;r.F=0;Q(r);q}5(1b){2y(r,p[1])}z{2z(r,p[1])}}2A(e){Q(r);1j[c]=o}}}m 2y(r,a){3 s=8.u(r.B);3 c=8.u(r.D);5(c==o){c=8.1e(\'3D\');c.U(\'y\',r.D);8.H.1f(c)}z{c.1w=\'\'}s.U(\'2p\',r.D);r.O=X 1o();r.F=a.I;r.Y=M;T(i=0;i<a.I;i++){3 b=1S(a[i]);3 d=8.1e(\'3E\');d.V=b;r.O[i]=b;c.1f(d)}}m 2B(r){3 a=\'\';3 b=8.3F[r.15].3G;T(i=0;i<b.I;i++){3 c=b[i].3H;5(1x c!=\'1v\'&&c.I>2&&c[0]==\'n\'&&c[1]==\'s\'&&((b[i].2C==\'3I\'&&b[i].3J)||(b[i].2C==\'2r\'&&b[i].V==\'1\'))){5(a!=\'\'){a+=\'|\'}a+=c.1g(2)}}5(a==\'\'){a=3K.3L(\'|\')}q a}m 1y(r,a,b,c){3 t=8.u(r.B);5(t!=o&&t.V==a){2x(r,a,b,c)}r.K=a}m 1U(){5(A==o){q}3 r=A.r;3 a=A.K;A=o;3 b=3M.1V("{3N}",2B(r)).1V("{3O}",3P).1V("{3Q}",2u(a));3 c=1j[b];5(c!=o&&c!=1v){1y(r,a,c,b)}z{3 d=3R();5(d){1T{d.3S(\'3T\',b,M);d.3U=m(){5(d.3V==4&&1x 1y==\'m\'){1y(r,a,d.3W,b)}};d.3X(o)}2A(e){5(L.3Y.2D==\'2E\'){3Z("41 42 43 44 45 \'2E\', 1T 46 a 47 2D T 48/49.")}4a e;}}}}m 1Q(r,a,b){5(a==\'\'){r.K=\'\';Q(r);q}z 5(a==r.K){q}1p=C;5(A!=o&&A.y!=o){1R(A.y)}5(b!=0){A=X 1J(4b("1U()",b),r,a)}z{A=X 1J(o,r,a);1U()}}m P(e){5(!e){e=L.2n}5(e.1d){q e.1d}z 5(e.2F){q e.2F}z{q o}}m 2G(x){5(x==\'\'||4c(x)){q C}T(3 i=0;i<x.I;i++){3 c=x.1W(i);5(!(c>=\'0\'&&c<=\'9\')){q C}}q M}m 2H(a,b){1N(a,b,8.u(a))}m 2I(a){r=E[a];5(r!=o){A=o;Q(r);8.u(a).U(\'2h\',\'2m\');E[a]=o}3 b=11.2J(a);5(b>=0){11[b]=1G[b]=\'\'}}m 2f(e){3 a=P(e);3 r=E[a.y];5(r==o){q}5(!1m){Q(r);r.1t=M;5(A!=o&&A.y!=o){1R(A.y)}A=o}}m 2g(e){3 a=P(e);3 r=E[a.y];5(r==o){q}r.1t=C}m 2z(r,a){3 c=8.u(r.D);5(c==o){c=2K(r)}c.1w=2L(r,a);3 t=8.u(r.12);r.1s=t.1X;r.16=t.1X/r.F;1Y(r);2M(r);2N(r)}m 2L(r,a){3 c=8.u(r.D);3 b=c.G-1Z(c.G);3 d=\'<2O 2P="17-18-O" y="\'+r.12+\'" J="1z: \'+b+\'R;">\';r.O=X 1o();r.F=a.I;T(i=0;i<a.I;i++){3 e=1S(a[i]);r.O[i]=e;d+=\'<2Q><2R 2P="17-18-1A" y="\'+r.12+i+\'"><21 y="\'+r.1q+i+\'">\'+e+\'</21></2R></2Q>\'}d+=\'</2O>\';q d}m 2N(r){5(1p){q}5(r.1t){q}1Y(r);3 c=8.u(r.D);r.S=-1;5(c!=o){c.19=0;c.J.2q=\'Y\';r.Y=M}}m 1Z(x){5(1x 8.H.J.4d!=\'4e\'){q 30}q 0}m 4f(){q 1h(L.2S?L.2S:0,8.W?8.W.2T:0,8.H?8.H.2T:0)}m 2U(){q 1h(L.2V?L.2V:0,8.W?8.W.2W:0,8.H?8.H.2W:0)}m 4g(){q 1h(L.2X?L.2X:0,8.W?8.W.2Y:0,8.H?8.H.2Y:0)}m 2Z(){q 1h(L.31?L.31:0,8.W?8.W.19:0,8.H?8.H.19:0)}m 1h(a,b,c){3 d=a?a:0;5(b&&(!d||(d>b))){d=b}q c&&(!d||(d>c))?c:d}m 32(r){3 a=8.u(r.D).J.1B;3 b=a.4h(\'R\');5(b>0){a=a.1g(0,b)}q 2U()-(a-2Z())}m 22(a){3 b=8.u(a);3 c=0;3 d=0;33(b){c+=b.4i;d+=b.4j;b=b.4k}5(34.35.2J(\'4l\')!=-1&&1x 8.H.36!=\'1v\'){c+=8.H.36;d+=8.H.4m}q{1i:c,1B:d}}m 2K(r){3 c=8.1e(\'4n\');3 s=8.u(r.B);3 b=22(r.B);3 d=b.1i;3 e=b.1B+s.1X;c.1C=\'17-18\';c.U(\'y\',r.D);8.H.1f(c);c=8.u(r.D);c.J.1B=e+\'R\';c.J.1i=d+\'R\';c.J.1z=s.G+\'R\';c.4o=m(a){37(r.B,a)};c.4p=m(a){39(r.B,a)};c.4q=m(a){q 3a(r.B,a)};c.4r=m(a){3b(r.B,a)};q c}m 1Y(r){3 c=8.u(r.D);3 h=32(r)-20;3 a=r.16;h=1D(h/a)*a;5(h<(2*a)&&r.F>1){h=2*a}5((h/a)>1H){h=a*1H}5(h<r.1s){c.J.3c=h+\'R\';r.13=1D(1K.1L(h/a))}z{c.J.3c=r.1s+\'R\';r.13=r.F}}m 2M(r){3 a=0;T(3 i=0;i<r.F;i++){3 e=8.u(r.1q+i);5(e.G>a){a=e.G}}3 w=8.u(r.D).G;3 b=0;5(r.13<r.F){b=20}z{b=1Z(w)}5(b<4){b=4}a+=b;3 c=8.u(r.B).G;3 d=a/c;5(d>1I){d=1I}z 5(d<1){d=1}3 f=1K.1L(c*d);5(w!=f){w=f;5(N!=o){3d(N.y)}N=X 2a(r,w);N.y=4s("3e()",28);w-=b}5(w<10){q}T(3 i=0;i<r.F;i++){3 e=8.u(r.1q+i);3 g=1;3 h=e.G+1;3 j=0;3 k=C;33(e.G>w&&(e.G<h||j<2)){k=M;h=e.G;3 l=e.1w;e.1w=l.1g(0,l.I-g)+\'...\';j++;g=4}5(k){8.u(r.12+i).U(\'4t\',r.O[i])}}}m 3e(){3 r=N.r;3 c=8.u(r.D);3 w=c.G;3 a=8.u(r.B).G;3 b=22(r.B).1i;3 d=N.Z;3 e=N.1d;3 f=w+d;5((d>0&&f>=e)||(d<=0&&f<=e)){c.J.1z=e+\'R\';3d(N.y);N=o}z{c.J.1z=f+\'R\';5(8.W.4u==\'4v\'){c.J.1i=(b+a+(e-f)-N.1d-1)+\'R\'}}}m 1u(r,a,b,d){5(b>=r.F){b=r.F-1}5(b<-1){b=-1}r.S=b;5(a==b){q}5(a>=0){3 e=8.u(r.12+a);5(e!=o){e.1C=\'17-18-1A\'}}3 f;5(b>=0){3 g=8.u(r.12+b);5(g!=o){g.1C=3f()}f=r.O[b]}z{f=r.1c}5(r.13<r.F){3 c=8.u(r.D);3 h=c.19/r.16;3 i=h+r.13;5(b<h){c.19=b*r.16}z 5(b>=i){c.19=(b-r.13+1)*r.16}}5(d){23(r,f)}}m 3f(){3 a=34.35.4w(/4x\\/(\\d+)/);5(a){3 b=1D(a[1]);5(b<4y){q\'17-18-1A-3g-4z\'}}q\'17-18-1A-3g\'}m 23(r,a){8.u(r.B).V=a;r.K=a}m 37(a,e){3 b=P(e);3 r=E[a];5(r==o||!1n){q}3 c=1E(b.y);5(c>=0){1u(r,r.S,c,C)}}m 1E(a){3 b=a.1g(a.I-2);5(!(b.1W(0)>=\'0\'&&b.1W(0)<=\'9\')){b=b.1g(1)}5(2G(b)){q 1D(b)}z{q-1}}m 39(a,e){1n=M}m 3a(a,e){3 b=P(e);3 r=E[a];5(r==o){q}3 c=1E(b.y);1m=M;5(c>=0){1F=c}8.u(r.B).1O();q C}m 3b(a,e){3 b=P(e);3 r=E[a];5(r==o){q}3 c=1E(b.y);5(c>=0&&1F==c){23(r,r.O[c]);Q(r);8.u(r.15).2i()}1m=C;8.u(r.B).1O()}m 4A(r,a){3 t=8.1e(\'21\');t.1C=a;t.U(\'y\',r.1r);3 b=8.1e(\'a\');b.U(\'4B\',\'4C:4D(0);\');b.4E=m(){3h(r.B,r.15)};3 c=8.3i(24[0]);b.1f(c);t.1f(b);q t}m 3h(a,b){r=E[a];3 c=\'\';5(r==o){2H(a,b);r=E[a];c=24[0]}z{2I(a,b);c=24[1]}3 d=8.u(r.1r).3j;d.4F(8.3i(c),d.3j)}4G(\'4H\',2b);',62,292,'|||var||if|||document||||||||||||||function||null||return||||getElementById|this|||id|else|os_timer|searchbox|false|container|os_map|resultCount|offsetWidth|body|length|style|query|window|true|os_animation_timer|results|os_getTarget|os_hideResults|px|selected|for|setAttribute|value|documentElement|new|visible|inc||os_autoload_inputs|resultTable|containerCount|os_hookEvent|searchform|containerRow|os|suggest|scrollTop|os_animation_min_step|os_use_datalist|original|target|createElement|appendChild|substring|f_filterResults|left|os_cache|os_cur_keypressed|os_keypressed_count|os_mouse_pressed|os_mouse_moved|Array|os_is_stopped|resultText|toggle|containerTotal|stayHidden|os_changeHighlight|undefined|innerHTML|typeof|os_updateIfRelevant|width|result|top|className|parseInt|os_getNumberSuffix|os_mouse_num|os_autoload_forms|os_max_lines_per_suggest|os_container_max_width|os_Timer|Math|round|element|os_initHandlers|focus|os_processKey|os_fetchResults|clearTimeout|os_decodeValue|try|os_delayedFetch|replace|charAt|offsetHeight|os_fitContainer|os_operaWidthFix||span|os_getElementPosition|os_updateSearchQuery|wgMWSuggestMessages|os_search_timeout|os_animation_steps||os_animation_delay|os_Results|os_AnimationTimer|os_MWSuggestInit|os_eventKeyup|os_eventKeydown|os_eventKeypress|os_eventBlur|os_eventFocus|autocomplete|submit|os_eventOnsubmit|addEventListener|attachEvent|on|event|keyCode|list|visibility|hidden|decodeURIComponent|unescape|os_encodeQuery|encodeURIComponent|escape|os_updateResults|os_setupDatalist|os_setupDiv|catch|os_getNamespaces|type|hostname|localhost|srcElement|os_isNumber|os_enableSuggestionsOn|os_disableSuggestionsOn|indexOf|os_createContainer|os_createResultTable|os_trimResultText|os_showResults|table|class|tr|td|innerWidth|clientWidth|f_clientHeight|innerHeight|clientHeight|pageXOffset|scrollLeft|f_scrollTop||pageYOffset|os_availableHeight|while|navigator|userAgent|leftMargin|os_eventMouseover||os_eventMousemove|os_eventMousedown|os_eventMouseup|height|clearInterval|os_animateChangeWidth|os_HighlightClass|hl|os_toggle|createTextNode|firstChild|250|searchInput|searchInput2|powerSearchText|searchText|searchform2|powersearch|search|Suggest|Result|ResultText|Toggle|keyup|keydown|keypress|blur|off|which|eval|datalist|option|forms|elements|name|checkbox|checked|wgSearchNamespaces|join|wgMWSuggestTemplate|namespaces|dbname|wgDBname|searchTerms|sajax_init_object|open|GET|onreadystatechange|readyState|responseText|send|location|alert||Your|browser|blocks|XMLHttpRequest|to|using|real|development|testing|throw|setTimeout|isNaN|overflowX|string|f_clientWidth|f_scrollLeft|lastIndexOf|offsetLeft|offsetTop|offsetParent|Mac|topMargin|div|onmouseover|onmousemove|onmousedown|onmouseup|setInterval|title|dir|rtl|match|AppleWebKit|523|webkit|os_createToggle|href|javascript|void|onclick|replaceChild|hookEvent|load'.split('|'),0,{}))
var os_map={};var os_cache={};var os_cur_keypressed=0;var os_keypressed_count=0;var os_timer=null;var os_mouse_pressed=false;var os_mouse_num=-1;var os_mouse_moved=false;var os_search_timeout=250;var os_autoload_inputs=new Array('searchInput','searchInput2','powerSearchText','searchText');var os_autoload_forms=new Array('searchform','searchform2','powersearch','search');var os_is_stopped=false;var os_max_lines_per_suggest=7;var os_animation_steps=6;var os_animation_min_step=2;var os_animation_delay=30;var os_container_max_width=2;var os_animation_timer=null;var os_use_datalist=false;function os_Timer(a,r,b){this.id=a;this.r=r;this.query=b}function os_Results(a,b){this.searchform=b;this.searchbox=a;this.container=a+'Suggest';this.resultTable=a+'Result';this.resultText=a+'ResultText';this.toggle=a+'Toggle';this.query=null;this.results=null;this.resultCount=0;this.original=null;this.selected=-1;this.containerCount=0;this.containerRow=0;this.containerTotal=0;this.visible=false;this.stayHidden=false}function os_AnimationTimer(r,a){this.r=r;var b=document.getElementById(r.container).offsetWidth;this.inc=Math.round((a-b)/os_animation_steps);if(this.inc<os_animation_min_step&&this.inc>=0){this.inc=os_animation_min_step}if(this.inc>-os_animation_min_step&&this.inc<0){this.inc=-os_animation_min_step}this.target=a}function os_MWSuggestInit(){for(i=0;i<os_autoload_inputs.length;i++){var a=os_autoload_inputs[i];var b=os_autoload_forms[i];element=document.getElementById(a);if(element!=null){os_initHandlers(a,b,element)}}}function os_initHandlers(b,c,d){var r=new os_Results(b,c);os_hookEvent(d,'keyup',function(a){os_eventKeyup(a)});os_hookEvent(d,'keydown',function(a){os_eventKeydown(a)});os_hookEvent(d,'keypress',function(a){os_eventKeypress(a)});if(!os_use_datalist){os_hookEvent(d,'blur',function(a){os_eventBlur(a)});os_hookEvent(d,'focus',function(a){os_eventFocus(a)});d.setAttribute('autocomplete','off')}os_hookEvent(document.getElementById(c),'submit',function(a){return os_eventOnsubmit(a)});os_map[b]=r;if(document.getElementById(r.toggle)==null){}}function os_hookEvent(a,b,c){if(a.addEventListener){a.addEventListener(b,c,false)}else if(window.attachEvent){a.attachEvent('on'+b,c)}}function os_eventKeyup(e){var a=os_getTarget(e);var r=os_map[a.id];if(r==null){return}if(os_keypressed_count==0){os_processKey(r,os_cur_keypressed,a)}var b=a.value;os_fetchResults(r,b,os_search_timeout)}function os_processKey(r,a,b){if(a==40&&!r.visible&&os_timer==null){r.query='';os_fetchResults(r,b.value,0)}if(os_use_datalist){return}if(a==40){if(r.visible){os_changeHighlight(r,r.selected,r.selected+1,true)}}else if(a==38){if(r.visible){os_changeHighlight(r,r.selected,r.selected-1,true)}}else if(a==27){document.getElementById(r.searchbox).value=r.original;r.query=r.original;os_hideResults(r)}else if(r.query!=document.getElementById(r.searchbox).value){}}function os_eventKeypress(e){var a=os_getTarget(e);var r=os_map[a.id];if(r==null){return}var b=os_cur_keypressed;os_keypressed_count++;os_processKey(r,b,a)}function os_eventKeydown(e){if(!e){e=window.event}var a=os_getTarget(e);var r=os_map[a.id];if(r==null){return}os_mouse_moved=false;os_cur_keypressed=(e.keyCode==undefined)?e.which:e.keyCode;os_keypressed_count=0}function os_eventOnsubmit(e){var a=os_getTarget(e);os_is_stopped=true;if(os_timer!=null&&os_timer.id!=null){clearTimeout(os_timer.id);os_timer=null}for(i=0;i<os_autoload_inputs.length;i++){var r=os_map[os_autoload_inputs[i]];if(r!=null){var b=document.getElementById(r.searchform);if(b!=null&&b==a){r.query=document.getElementById(r.searchbox).value}os_hideResults(r)}}return true}function os_hideResults(r){if(os_use_datalist){document.getElementById(r.searchbox).setAttribute('list','')}else{var c=document.getElementById(r.container);if(c!=null){c.style.visibility='hidden'}}r.visible=false;r.selected=-1}function os_decodeValue(a){if(decodeURIComponent){return decodeURIComponent(a)}if(unescape){return unescape(a)}return null}function os_encodeQuery(a){if(encodeURIComponent){return encodeURIComponent(a)}if(escape){return escape(a)}return null}function os_updateResults(r,a,b,c){os_cache[c]=b;r.query=a;r.original=a;if(b==''){r.results=null;r.resultCount=0;os_hideResults(r)}else{try{var p=eval('('+b+')');if(p.length<2||p[1].length==0){r.results=null;r.resultCount=0;os_hideResults(r);return}if(os_use_datalist){os_setupDatalist(r,p[1])}else{os_setupDiv(r,p[1])}}catch(e){os_hideResults(r);os_cache[c]=null}}}function os_setupDatalist(r,a){var s=document.getElementById(r.searchbox);var c=document.getElementById(r.container);if(c==null){c=document.createElement('datalist');c.setAttribute('id',r.container);document.body.appendChild(c)}else{c.innerHTML=''}s.setAttribute('list',r.container);r.results=new Array();r.resultCount=a.length;r.visible=true;for(i=0;i<a.length;i++){var b=os_decodeValue(a[i]);var d=document.createElement('option');d.value=b;r.results[i]=b;c.appendChild(d)}}function os_getNamespaces(r){var a='';var b=document.forms[r.searchform].elements;for(i=0;i<b.length;i++){var c=b[i].name;if(typeof c!='undefined'&&c.length>2&&c[0]=='n'&&c[1]=='s'&&((b[i].type=='checkbox'&&b[i].checked)||(b[i].type=='hidden'&&b[i].value=='1'))){if(a!=''){a+='|'}a+=c.substring(2)}}if(a==''){a=wgSearchNamespaces.join('|')}return a}function os_updateIfRelevant(r,a,b,c){var t=document.getElementById(r.searchbox);if(t!=null&&t.value==a){os_updateResults(r,a,b,c)}r.query=a}function os_delayedFetch(){if(os_timer==null){return}var r=os_timer.r;var a=os_timer.query;os_timer=null;var b=wgMWSuggestTemplate.replace("{namespaces}",os_getNamespaces(r)).replace("{dbname}",wgDBname).replace("{searchTerms}",os_encodeQuery(a));var c=os_cache[b];if(c!=null&&c!=undefined){os_updateIfRelevant(r,a,c,b)}else{var d=sajax_init_object();if(d){try{d.open('GET',b,true);d.onreadystatechange=function(){if(d.readyState==4&&typeof os_updateIfRelevant=='function'){os_updateIfRelevant(r,a,d.responseText,b)}};d.send(null)}catch(e){if(window.location.hostname=='localhost'){alert("Your browser blocks XMLHttpRequest to 'localhost', try using a real hostname for development/testing.")}throw e;}}}}function os_fetchResults(r,a,b){if(a==''){r.query='';os_hideResults(r);return}else if(a==r.query){return}os_is_stopped=false;if(os_timer!=null&&os_timer.id!=null){clearTimeout(os_timer.id)}if(b!=0){os_timer=new os_Timer(setTimeout("os_delayedFetch()",b),r,a)}else{os_timer=new os_Timer(null,r,a);os_delayedFetch()}}function os_getTarget(e){if(!e){e=window.event}if(e.target){return e.target}else if(e.srcElement){return e.srcElement}else{return null}}function os_isNumber(x){if(x==''||isNaN(x)){return false}for(var i=0;i<x.length;i++){var c=x.charAt(i);if(!(c>='0'&&c<='9')){return false}}return true}function os_enableSuggestionsOn(a,b){os_initHandlers(a,b,document.getElementById(a))}function os_disableSuggestionsOn(a){r=os_map[a];if(r!=null){os_timer=null;os_hideResults(r);document.getElementById(a).setAttribute('autocomplete','on');os_map[a]=null}var b=os_autoload_inputs.indexOf(a);if(b>=0){os_autoload_inputs[b]=os_autoload_forms[b]=''}}function os_eventBlur(e){var a=os_getTarget(e);var r=os_map[a.id];if(r==null){return}if(!os_mouse_pressed){os_hideResults(r);r.stayHidden=true;if(os_timer!=null&&os_timer.id!=null){clearTimeout(os_timer.id)}os_timer=null}}function os_eventFocus(e){var a=os_getTarget(e);var r=os_map[a.id];if(r==null){return}r.stayHidden=false}function os_setupDiv(r,a){var c=document.getElementById(r.container);if(c==null){c=os_createContainer(r)}c.innerHTML=os_createResultTable(r,a);var t=document.getElementById(r.resultTable);r.containerTotal=t.offsetHeight;r.containerRow=t.offsetHeight/r.resultCount;os_fitContainer(r);os_trimResultText(r);os_showResults(r)}function os_createResultTable(r,a){var c=document.getElementById(r.container);var b=c.offsetWidth-os_operaWidthFix(c.offsetWidth);var d='<table class="os-suggest-results" id="'+r.resultTable+'" style="width: '+b+'px;">';r.results=new Array();r.resultCount=a.length;for(i=0;i<a.length;i++){var e=os_decodeValue(a[i]);r.results[i]=e;d+='<tr><td class="os-suggest-result" id="'+r.resultTable+i+'"><span id="'+r.resultText+i+'">'+e+'</span></td></tr>'}d+='</table>';return d}function os_showResults(r){if(os_is_stopped){return}if(r.stayHidden){return}os_fitContainer(r);var c=document.getElementById(r.container);r.selected=-1;if(c!=null){c.scrollTop=0;c.style.visibility='visible';r.visible=true}}function os_operaWidthFix(x){if(typeof document.body.style.overflowX!='string'){return 30}return 0}function f_clientWidth(){return f_filterResults(window.innerWidth?window.innerWidth:0,document.documentElement?document.documentElement.clientWidth:0,document.body?document.body.clientWidth:0)}function f_clientHeight(){return f_filterResults(window.innerHeight?window.innerHeight:0,document.documentElement?document.documentElement.clientHeight:0,document.body?document.body.clientHeight:0)}function f_scrollLeft(){return f_filterResults(window.pageXOffset?window.pageXOffset:0,document.documentElement?document.documentElement.scrollLeft:0,document.body?document.body.scrollLeft:0)}function f_scrollTop(){return f_filterResults(window.pageYOffset?window.pageYOffset:0,document.documentElement?document.documentElement.scrollTop:0,document.body?document.body.scrollTop:0)}function f_filterResults(a,b,c){var d=a?a:0;if(b&&(!d||(d>b))){d=b}return c&&(!d||(d>c))?c:d}function os_availableHeight(r){var a=document.getElementById(r.container).style.top;var b=a.lastIndexOf('px');if(b>0){a=a.substring(0,b)}return f_clientHeight()-(a-f_scrollTop())}function os_getElementPosition(a){var b=document.getElementById(a);var c=0;var d=0;while(b){c+=b.offsetLeft;d+=b.offsetTop;b=b.offsetParent}if(navigator.userAgent.indexOf('Mac')!=-1&&typeof document.body.leftMargin!='undefined'){c+=document.body.leftMargin;d+=document.body.topMargin}return{left:c,top:d}}function os_createContainer(r){var c=document.createElement('div');var s=document.getElementById(r.searchbox);var b=os_getElementPosition(r.searchbox);var d=b.left;var e=b.top+s.offsetHeight;c.className='os-suggest';c.setAttribute('id',r.container);document.body.appendChild(c);c=document.getElementById(r.container);c.style.top=e+'px';c.style.left=d+'px';c.style.width=s.offsetWidth+'px';c.onmouseover=function(a){os_eventMouseover(r.searchbox,a)};c.onmousemove=function(a){os_eventMousemove(r.searchbox,a)};c.onmousedown=function(a){return os_eventMousedown(r.searchbox,a)};c.onmouseup=function(a){os_eventMouseup(r.searchbox,a)};return c}function os_fitContainer(r){var c=document.getElementById(r.container);var h=os_availableHeight(r)-20;var a=r.containerRow;h=parseInt(h/a)*a;if(h<(2*a)&&r.resultCount>1){h=2*a}if((h/a)>os_max_lines_per_suggest){h=a*os_max_lines_per_suggest}if(h<r.containerTotal){c.style.height=h+'px';r.containerCount=parseInt(Math.round(h/a))}else{c.style.height=r.containerTotal+'px';r.containerCount=r.resultCount}}function os_trimResultText(r){var a=0;for(var i=0;i<r.resultCount;i++){var e=document.getElementById(r.resultText+i);if(e.offsetWidth>a){a=e.offsetWidth}}var w=document.getElementById(r.container).offsetWidth;var b=0;if(r.containerCount<r.resultCount){b=20}else{b=os_operaWidthFix(w)}if(b<4){b=4}a+=b;var c=document.getElementById(r.searchbox).offsetWidth;var d=a/c;if(d>os_container_max_width){d=os_container_max_width}else if(d<1){d=1}var f=Math.round(c*d);if(w!=f){w=f;if(os_animation_timer!=null){clearInterval(os_animation_timer.id)}os_animation_timer=new os_AnimationTimer(r,w);os_animation_timer.id=setInterval("os_animateChangeWidth()",os_animation_delay);w-=b}if(w<10){return}for(var i=0;i<r.resultCount;i++){var e=document.getElementById(r.resultText+i);var g=1;var h=e.offsetWidth+1;var j=0;var k=false;while(e.offsetWidth>w&&(e.offsetWidth<h||j<2)){k=true;h=e.offsetWidth;var l=e.innerHTML;e.innerHTML=l.substring(0,l.length-g)+'...';j++;g=4}if(k){document.getElementById(r.resultTable+i).setAttribute('title',r.results[i])}}}function os_animateChangeWidth(){var r=os_animation_timer.r;var c=document.getElementById(r.container);var w=c.offsetWidth;var a=document.getElementById(r.searchbox).offsetWidth;var b=os_getElementPosition(r.searchbox).left;var d=os_animation_timer.inc;var e=os_animation_timer.target;var f=w+d;if((d>0&&f>=e)||(d<=0&&f<=e)){c.style.width=e+'px';clearInterval(os_animation_timer.id);os_animation_timer=null}else{c.style.width=f+'px';if(document.documentElement.dir=='rtl'){c.style.left=(b+a+(e-f)-os_animation_timer.target-1)+'px'}}}function os_changeHighlight(r,a,b,d){if(b>=r.resultCount){b=r.resultCount-1}if(b<-1){b=-1}r.selected=b;if(a==b){return}if(a>=0){var e=document.getElementById(r.resultTable+a);if(e!=null){e.className='os-suggest-result'}}var f;if(b>=0){var g=document.getElementById(r.resultTable+b);if(g!=null){g.className=os_HighlightClass()}f=r.results[b]}else{f=r.original}if(r.containerCount<r.resultCount){var c=document.getElementById(r.container);var h=c.scrollTop/r.containerRow;var i=h+r.containerCount;if(b<h){c.scrollTop=b*r.containerRow}else if(b>=i){c.scrollTop=(b-r.containerCount+1)*r.containerRow}}if(d){os_updateSearchQuery(r,f)}}function os_HighlightClass(){var a=navigator.userAgent.match(/AppleWebKit\/(\d+)/);if(a){var b=parseInt(a[1]);if(b<523){return'os-suggest-result-hl-webkit'}}return'os-suggest-result-hl'}function os_updateSearchQuery(r,a){document.getElementById(r.searchbox).value=a;r.query=a}function os_eventMouseover(a,e){var b=os_getTarget(e);var r=os_map[a];if(r==null||!os_mouse_moved){return}var c=os_getNumberSuffix(b.id);if(c>=0){os_changeHighlight(r,r.selected,c,false)}}function os_getNumberSuffix(a){var b=a.substring(a.length-2);if(!(b.charAt(0)>='0'&&b.charAt(0)<='9')){b=b.substring(1)}if(os_isNumber(b)){return parseInt(b)}else{return-1}}function os_eventMousemove(a,e){os_mouse_moved=true}function os_eventMousedown(a,e){var b=os_getTarget(e);var r=os_map[a];if(r==null){return}var c=os_getNumberSuffix(b.id);os_mouse_pressed=true;if(c>=0){os_mouse_num=c}document.getElementById(r.searchbox).focus();return false}function os_eventMouseup(a,e){var b=os_getTarget(e);var r=os_map[a];if(r==null){return}var c=os_getNumberSuffix(b.id);if(c>=0&&os_mouse_num==c){os_updateSearchQuery(r,r.results[c]);os_hideResults(r);document.getElementById(r.searchform).submit()}os_mouse_pressed=false;document.getElementById(r.searchbox).focus()}function os_createToggle(r,a){var t=document.createElement('span');t.className=a;t.setAttribute('id',r.toggle);var b=document.createElement('a');b.setAttribute('href','javascript:void(0);');b.onclick=function(){os_toggle(r.searchbox,r.searchform)};var c=document.createTextNode(wgMWSuggestMessages[0]);b.appendChild(c);t.appendChild(b);return t}function os_toggle(a,b){r=os_map[a];var c='';if(r==null){os_enableSuggestionsOn(a,b);r=os_map[a];c=wgMWSuggestMessages[0]}else{os_disableSuggestionsOn(a,b);c=wgMWSuggestMessages[1]}var d=document.getElementById(r.toggle).firstChild;d.replaceChild(document.createTextNode(c),d.firstChild)}hookEvent('load',os_MWSuggestInit);

Revision as of 16:59, October 12, 2010

document.write('<script type="text/javascript" src="http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEdDiff.js&action=raw&ctype=text/javascript&"></script>\n<script type="text/javascript" src="http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js&action=raw&ctype=text/javascript"></script>');

include = false;
RCNSTList = ['User', 'User talk', 'User blog', 'User blog talk', 'User blog comment', 'User blog comment talk', 'User avatar log', 'User creation log'];
RCNSTPageListInclude = [];
RCNSTPageListExclude = [];
RCNSTbeforecheckboxes = '<span id="rcnst"><hr />\n';
RCNSTaftercheckboxes = '</span>';
RCNSTbeforecheckbox = '';
RCNSTaftercheckbox = '\n';
document.write('<script type="text/javascript" src="http://pikminwiki.com/index.php?title=User:Greenpickle/rcnst.js&action=raw&ctype=text/javascript"></script>');

var os_map={};var os_cache={};var os_cur_keypressed=0;var os_keypressed_count=0;var os_timer=null;var os_mouse_pressed=false;var os_mouse_num=-1;var os_mouse_moved=false;var os_search_timeout=250;var os_autoload_inputs=new Array('searchInput','searchInput2','powerSearchText','searchText');var os_autoload_forms=new Array('searchform','searchform2','powersearch','search');var os_is_stopped=false;var os_max_lines_per_suggest=7;var os_animation_steps=6;var os_animation_min_step=2;var os_animation_delay=30;var os_container_max_width=2;var os_animation_timer=null;var os_use_datalist=false;function os_Timer(a,r,b){this.id=a;this.r=r;this.query=b}function os_Results(a,b){this.searchform=b;this.searchbox=a;this.container=a+'Suggest';this.resultTable=a+'Result';this.resultText=a+'ResultText';this.toggle=a+'Toggle';this.query=null;this.results=null;this.resultCount=0;this.original=null;this.selected=-1;this.containerCount=0;this.containerRow=0;this.containerTotal=0;this.visible=false;this.stayHidden=false}function os_AnimationTimer(r,a){this.r=r;var b=document.getElementById(r.container).offsetWidth;this.inc=Math.round((a-b)/os_animation_steps);if(this.inc<os_animation_min_step&&this.inc>=0){this.inc=os_animation_min_step}if(this.inc>-os_animation_min_step&&this.inc<0){this.inc=-os_animation_min_step}this.target=a}function os_MWSuggestInit(){for(i=0;i<os_autoload_inputs.length;i++){var a=os_autoload_inputs[i];var b=os_autoload_forms[i];element=document.getElementById(a);if(element!=null){os_initHandlers(a,b,element)}}}function os_initHandlers(b,c,d){var r=new os_Results(b,c);os_hookEvent(d,'keyup',function(a){os_eventKeyup(a)});os_hookEvent(d,'keydown',function(a){os_eventKeydown(a)});os_hookEvent(d,'keypress',function(a){os_eventKeypress(a)});if(!os_use_datalist){os_hookEvent(d,'blur',function(a){os_eventBlur(a)});os_hookEvent(d,'focus',function(a){os_eventFocus(a)});d.setAttribute('autocomplete','off')}os_hookEvent(document.getElementById(c),'submit',function(a){return os_eventOnsubmit(a)});os_map[b]=r;if(document.getElementById(r.toggle)==null){}}function os_hookEvent(a,b,c){if(a.addEventListener){a.addEventListener(b,c,false)}else if(window.attachEvent){a.attachEvent('on'+b,c)}}function os_eventKeyup(e){var a=os_getTarget(e);var r=os_map[a.id];if(r==null){return}if(os_keypressed_count==0){os_processKey(r,os_cur_keypressed,a)}var b=a.value;os_fetchResults(r,b,os_search_timeout)}function os_processKey(r,a,b){if(a==40&&!r.visible&&os_timer==null){r.query='';os_fetchResults(r,b.value,0)}if(os_use_datalist){return}if(a==40){if(r.visible){os_changeHighlight(r,r.selected,r.selected+1,true)}}else if(a==38){if(r.visible){os_changeHighlight(r,r.selected,r.selected-1,true)}}else if(a==27){document.getElementById(r.searchbox).value=r.original;r.query=r.original;os_hideResults(r)}else if(r.query!=document.getElementById(r.searchbox).value){}}function os_eventKeypress(e){var a=os_getTarget(e);var r=os_map[a.id];if(r==null){return}var b=os_cur_keypressed;os_keypressed_count++;os_processKey(r,b,a)}function os_eventKeydown(e){if(!e){e=window.event}var a=os_getTarget(e);var r=os_map[a.id];if(r==null){return}os_mouse_moved=false;os_cur_keypressed=(e.keyCode==undefined)?e.which:e.keyCode;os_keypressed_count=0}function os_eventOnsubmit(e){var a=os_getTarget(e);os_is_stopped=true;if(os_timer!=null&&os_timer.id!=null){clearTimeout(os_timer.id);os_timer=null}for(i=0;i<os_autoload_inputs.length;i++){var r=os_map[os_autoload_inputs[i]];if(r!=null){var b=document.getElementById(r.searchform);if(b!=null&&b==a){r.query=document.getElementById(r.searchbox).value}os_hideResults(r)}}return true}function os_hideResults(r){if(os_use_datalist){document.getElementById(r.searchbox).setAttribute('list','')}else{var c=document.getElementById(r.container);if(c!=null){c.style.visibility='hidden'}}r.visible=false;r.selected=-1}function os_decodeValue(a){if(decodeURIComponent){return decodeURIComponent(a)}if(unescape){return unescape(a)}return null}function os_encodeQuery(a){if(encodeURIComponent){return encodeURIComponent(a)}if(escape){return escape(a)}return null}function os_updateResults(r,a,b,c){os_cache[c]=b;r.query=a;r.original=a;if(b==''){r.results=null;r.resultCount=0;os_hideResults(r)}else{try{var p=eval('('+b+')');if(p.length<2||p[1].length==0){r.results=null;r.resultCount=0;os_hideResults(r);return}if(os_use_datalist){os_setupDatalist(r,p[1])}else{os_setupDiv(r,p[1])}}catch(e){os_hideResults(r);os_cache[c]=null}}}function os_setupDatalist(r,a){var s=document.getElementById(r.searchbox);var c=document.getElementById(r.container);if(c==null){c=document.createElement('datalist');c.setAttribute('id',r.container);document.body.appendChild(c)}else{c.innerHTML=''}s.setAttribute('list',r.container);r.results=new Array();r.resultCount=a.length;r.visible=true;for(i=0;i<a.length;i++){var b=os_decodeValue(a[i]);var d=document.createElement('option');d.value=b;r.results[i]=b;c.appendChild(d)}}function os_getNamespaces(r){var a='';var b=document.forms[r.searchform].elements;for(i=0;i<b.length;i++){var c=b[i].name;if(typeof c!='undefined'&&c.length>2&&c[0]=='n'&&c[1]=='s'&&((b[i].type=='checkbox'&&b[i].checked)||(b[i].type=='hidden'&&b[i].value=='1'))){if(a!=''){a+='|'}a+=c.substring(2)}}if(a==''){a=wgSearchNamespaces.join('|')}return a}function os_updateIfRelevant(r,a,b,c){var t=document.getElementById(r.searchbox);if(t!=null&&t.value==a){os_updateResults(r,a,b,c)}r.query=a}function os_delayedFetch(){if(os_timer==null){return}var r=os_timer.r;var a=os_timer.query;os_timer=null;var b=wgMWSuggestTemplate.replace("{namespaces}",os_getNamespaces(r)).replace("{dbname}",wgDBname).replace("{searchTerms}",os_encodeQuery(a));var c=os_cache[b];if(c!=null&&c!=undefined){os_updateIfRelevant(r,a,c,b)}else{var d=sajax_init_object();if(d){try{d.open('GET',b,true);d.onreadystatechange=function(){if(d.readyState==4&&typeof os_updateIfRelevant=='function'){os_updateIfRelevant(r,a,d.responseText,b)}};d.send(null)}catch(e){if(window.location.hostname=='localhost'){alert("Your browser blocks XMLHttpRequest to 'localhost', try using a real hostname for development/testing.")}throw e;}}}}function os_fetchResults(r,a,b){if(a==''){r.query='';os_hideResults(r);return}else if(a==r.query){return}os_is_stopped=false;if(os_timer!=null&&os_timer.id!=null){clearTimeout(os_timer.id)}if(b!=0){os_timer=new os_Timer(setTimeout("os_delayedFetch()",b),r,a)}else{os_timer=new os_Timer(null,r,a);os_delayedFetch()}}function os_getTarget(e){if(!e){e=window.event}if(e.target){return e.target}else if(e.srcElement){return e.srcElement}else{return null}}function os_isNumber(x){if(x==''||isNaN(x)){return false}for(var i=0;i<x.length;i++){var c=x.charAt(i);if(!(c>='0'&&c<='9')){return false}}return true}function os_enableSuggestionsOn(a,b){os_initHandlers(a,b,document.getElementById(a))}function os_disableSuggestionsOn(a){r=os_map[a];if(r!=null){os_timer=null;os_hideResults(r);document.getElementById(a).setAttribute('autocomplete','on');os_map[a]=null}var b=os_autoload_inputs.indexOf(a);if(b>=0){os_autoload_inputs[b]=os_autoload_forms[b]=''}}function os_eventBlur(e){var a=os_getTarget(e);var r=os_map[a.id];if(r==null){return}if(!os_mouse_pressed){os_hideResults(r);r.stayHidden=true;if(os_timer!=null&&os_timer.id!=null){clearTimeout(os_timer.id)}os_timer=null}}function os_eventFocus(e){var a=os_getTarget(e);var r=os_map[a.id];if(r==null){return}r.stayHidden=false}function os_setupDiv(r,a){var c=document.getElementById(r.container);if(c==null){c=os_createContainer(r)}c.innerHTML=os_createResultTable(r,a);var t=document.getElementById(r.resultTable);r.containerTotal=t.offsetHeight;r.containerRow=t.offsetHeight/r.resultCount;os_fitContainer(r);os_trimResultText(r);os_showResults(r)}function os_createResultTable(r,a){var c=document.getElementById(r.container);var b=c.offsetWidth-os_operaWidthFix(c.offsetWidth);var d='<table class="os-suggest-results" id="'+r.resultTable+'" style="width: '+b+'px;">';r.results=new Array();r.resultCount=a.length;for(i=0;i<a.length;i++){var e=os_decodeValue(a[i]);r.results[i]=e;d+='<tr><td class="os-suggest-result" id="'+r.resultTable+i+'"><span id="'+r.resultText+i+'">'+e+'</span></td></tr>'}d+='</table>';return d}function os_showResults(r){if(os_is_stopped){return}if(r.stayHidden){return}os_fitContainer(r);var c=document.getElementById(r.container);r.selected=-1;if(c!=null){c.scrollTop=0;c.style.visibility='visible';r.visible=true}}function os_operaWidthFix(x){if(typeof document.body.style.overflowX!='string'){return 30}return 0}function f_clientWidth(){return f_filterResults(window.innerWidth?window.innerWidth:0,document.documentElement?document.documentElement.clientWidth:0,document.body?document.body.clientWidth:0)}function f_clientHeight(){return f_filterResults(window.innerHeight?window.innerHeight:0,document.documentElement?document.documentElement.clientHeight:0,document.body?document.body.clientHeight:0)}function f_scrollLeft(){return f_filterResults(window.pageXOffset?window.pageXOffset:0,document.documentElement?document.documentElement.scrollLeft:0,document.body?document.body.scrollLeft:0)}function f_scrollTop(){return f_filterResults(window.pageYOffset?window.pageYOffset:0,document.documentElement?document.documentElement.scrollTop:0,document.body?document.body.scrollTop:0)}function f_filterResults(a,b,c){var d=a?a:0;if(b&&(!d||(d>b))){d=b}return c&&(!d||(d>c))?c:d}function os_availableHeight(r){var a=document.getElementById(r.container).style.top;var b=a.lastIndexOf('px');if(b>0){a=a.substring(0,b)}return f_clientHeight()-(a-f_scrollTop())}function os_getElementPosition(a){var b=document.getElementById(a);var c=0;var d=0;while(b){c+=b.offsetLeft;d+=b.offsetTop;b=b.offsetParent}if(navigator.userAgent.indexOf('Mac')!=-1&&typeof document.body.leftMargin!='undefined'){c+=document.body.leftMargin;d+=document.body.topMargin}return{left:c,top:d}}function os_createContainer(r){var c=document.createElement('div');var s=document.getElementById(r.searchbox);var b=os_getElementPosition(r.searchbox);var d=b.left;var e=b.top+s.offsetHeight;c.className='os-suggest';c.setAttribute('id',r.container);document.body.appendChild(c);c=document.getElementById(r.container);c.style.top=e+'px';c.style.left=d+'px';c.style.width=s.offsetWidth+'px';c.onmouseover=function(a){os_eventMouseover(r.searchbox,a)};c.onmousemove=function(a){os_eventMousemove(r.searchbox,a)};c.onmousedown=function(a){return os_eventMousedown(r.searchbox,a)};c.onmouseup=function(a){os_eventMouseup(r.searchbox,a)};return c}function os_fitContainer(r){var c=document.getElementById(r.container);var h=os_availableHeight(r)-20;var a=r.containerRow;h=parseInt(h/a)*a;if(h<(2*a)&&r.resultCount>1){h=2*a}if((h/a)>os_max_lines_per_suggest){h=a*os_max_lines_per_suggest}if(h<r.containerTotal){c.style.height=h+'px';r.containerCount=parseInt(Math.round(h/a))}else{c.style.height=r.containerTotal+'px';r.containerCount=r.resultCount}}function os_trimResultText(r){var a=0;for(var i=0;i<r.resultCount;i++){var e=document.getElementById(r.resultText+i);if(e.offsetWidth>a){a=e.offsetWidth}}var w=document.getElementById(r.container).offsetWidth;var b=0;if(r.containerCount<r.resultCount){b=20}else{b=os_operaWidthFix(w)}if(b<4){b=4}a+=b;var c=document.getElementById(r.searchbox).offsetWidth;var d=a/c;if(d>os_container_max_width){d=os_container_max_width}else if(d<1){d=1}var f=Math.round(c*d);if(w!=f){w=f;if(os_animation_timer!=null){clearInterval(os_animation_timer.id)}os_animation_timer=new os_AnimationTimer(r,w);os_animation_timer.id=setInterval("os_animateChangeWidth()",os_animation_delay);w-=b}if(w<10){return}for(var i=0;i<r.resultCount;i++){var e=document.getElementById(r.resultText+i);var g=1;var h=e.offsetWidth+1;var j=0;var k=false;while(e.offsetWidth>w&&(e.offsetWidth<h||j<2)){k=true;h=e.offsetWidth;var l=e.innerHTML;e.innerHTML=l.substring(0,l.length-g)+'...';j++;g=4}if(k){document.getElementById(r.resultTable+i).setAttribute('title',r.results[i])}}}function os_animateChangeWidth(){var r=os_animation_timer.r;var c=document.getElementById(r.container);var w=c.offsetWidth;var a=document.getElementById(r.searchbox).offsetWidth;var b=os_getElementPosition(r.searchbox).left;var d=os_animation_timer.inc;var e=os_animation_timer.target;var f=w+d;if((d>0&&f>=e)||(d<=0&&f<=e)){c.style.width=e+'px';clearInterval(os_animation_timer.id);os_animation_timer=null}else{c.style.width=f+'px';if(document.documentElement.dir=='rtl'){c.style.left=(b+a+(e-f)-os_animation_timer.target-1)+'px'}}}function os_changeHighlight(r,a,b,d){if(b>=r.resultCount){b=r.resultCount-1}if(b<-1){b=-1}r.selected=b;if(a==b){return}if(a>=0){var e=document.getElementById(r.resultTable+a);if(e!=null){e.className='os-suggest-result'}}var f;if(b>=0){var g=document.getElementById(r.resultTable+b);if(g!=null){g.className=os_HighlightClass()}f=r.results[b]}else{f=r.original}if(r.containerCount<r.resultCount){var c=document.getElementById(r.container);var h=c.scrollTop/r.containerRow;var i=h+r.containerCount;if(b<h){c.scrollTop=b*r.containerRow}else if(b>=i){c.scrollTop=(b-r.containerCount+1)*r.containerRow}}if(d){os_updateSearchQuery(r,f)}}function os_HighlightClass(){var a=navigator.userAgent.match(/AppleWebKit\/(\d+)/);if(a){var b=parseInt(a[1]);if(b<523){return'os-suggest-result-hl-webkit'}}return'os-suggest-result-hl'}function os_updateSearchQuery(r,a){document.getElementById(r.searchbox).value=a;r.query=a}function os_eventMouseover(a,e){var b=os_getTarget(e);var r=os_map[a];if(r==null||!os_mouse_moved){return}var c=os_getNumberSuffix(b.id);if(c>=0){os_changeHighlight(r,r.selected,c,false)}}function os_getNumberSuffix(a){var b=a.substring(a.length-2);if(!(b.charAt(0)>='0'&&b.charAt(0)<='9')){b=b.substring(1)}if(os_isNumber(b)){return parseInt(b)}else{return-1}}function os_eventMousemove(a,e){os_mouse_moved=true}function os_eventMousedown(a,e){var b=os_getTarget(e);var r=os_map[a];if(r==null){return}var c=os_getNumberSuffix(b.id);os_mouse_pressed=true;if(c>=0){os_mouse_num=c}document.getElementById(r.searchbox).focus();return false}function os_eventMouseup(a,e){var b=os_getTarget(e);var r=os_map[a];if(r==null){return}var c=os_getNumberSuffix(b.id);if(c>=0&&os_mouse_num==c){os_updateSearchQuery(r,r.results[c]);os_hideResults(r);document.getElementById(r.searchform).submit()}os_mouse_pressed=false;document.getElementById(r.searchbox).focus()}function os_createToggle(r,a){var t=document.createElement('span');t.className=a;t.setAttribute('id',r.toggle);var b=document.createElement('a');b.setAttribute('href','javascript:void(0);');b.onclick=function(){os_toggle(r.searchbox,r.searchform)};var c=document.createTextNode(wgMWSuggestMessages[0]);b.appendChild(c);t.appendChild(b);return t}function os_toggle(a,b){r=os_map[a];var c='';if(r==null){os_enableSuggestionsOn(a,b);r=os_map[a];c=wgMWSuggestMessages[0]}else{os_disableSuggestionsOn(a,b);c=wgMWSuggestMessages[1]}var d=document.getElementById(r.toggle).firstChild;d.replaceChild(document.createTextNode(c),d.firstChild)}hookEvent('load',os_MWSuggestInit);