/* mootools.js */ //MooTools, My Object Oriented Javascript Tools. Copyright (c) 2006-2007 Valerio Proietti, , MIT Style License. eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[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}('o 95={8Z:\'1.11\'};k $4Y(Q){h(Q!=6W)};k $B(Q){m(!$4Y(Q))h 14;m(Q.3d)h\'1b\';o B=4D Q;m(B==\'2h\'&&Q.90){1L(Q.5r){P 1:h\'1b\';P 3:h(/\\S/).28(Q.7r)?\'91\':\'93\'}}m(B==\'2h\'||B==\'k\'){1L(Q.6T){P 1U:h\'1g\';P 5Q:h\'3P\';P 1i:h\'58\'}m(4D Q.O==\'43\'){m(Q.2n)h\'9c\';m(Q.70)h\'15\'}}h B};k $2p(){o 3B={};J(o i=0;i<15.O;i++){J(o F 1j 15[i]){o ap=15[i][F];o 54=3B[F];m(54&&$B(ap)==\'2h\'&&$B(54)==\'2h\')3B[F]=$2p(54,ap);17 3B[F]=ap}}h 3B};o $N=k(){o 18=15;m(!18[1])18=[c,18[0]];J(o F 1j 18[1])18[0][F]=18[1][F];h 18[0]};o $3p=k(){J(o i=0,l=15.O;i-1:c.3h(1G)>-1},8p:k(){h c.2A(/([.*+?^${}()|[\\]\\/\\\\])/g,\'\\\\$1\')}});1U.N({51:k(1g){m(c.O<3)h 14;m(c.O==4&&c[3]==0&&!1g)h\'9P\';o 30=[];J(o i=0;i<3;i++){o 3g=(c[i]-0).3A(16);30.1a((3g.O==1)?\'0\'+3g:3g)}h 1g?30:\'#\'+30.1w(\'\')},4p:k(1g){m(c.O!=3)h 14;o 22=[];J(o i=0;i<3;i++){22.1a(3I((c[i].O==1)?c[i]+c[i]:c[i],16))}h 1g?22:\'22(\'+22.1w(\',\')+\')\'}});5w.N({2b:k(C){o K=c;C=$2p({\'U\':K,\'H\':14,\'15\':1d,\'1O\':14,\'2T\':14,\'4F\':14},C);m($3U(C.15)&&$B(C.15)!=\'1g\')C.15=[C.15];h k(H){o 18;m(C.H){H=H||L.H;18=[(C.H===1h)?H:Y C.H(H)];m(C.15)18.N(C.15)}17 18=C.15||15;o 2y=k(){h K.3q($3y(C.U,K),18)};m(C.1O)h 7O(2y,C.1O);m(C.2T)h 9Q(2y,C.2T);m(C.4F)3b{h 2y()}3m(9G){h 14};h 2y()}},9F:k(18,U){h c.2b({\'15\':18,\'U\':U})},4F:k(18,U){h c.2b({\'15\':18,\'U\':U,\'4F\':1h})()},U:k(U,18){h c.2b({\'U\':U,\'15\':18})},9x:k(U,18){h c.2b({\'U\':U,\'H\':1h,\'15\':18})},1O:k(1O,U,18){h c.2b({\'1O\':1O,\'U\':U,\'15\':18})()},2T:k(73,U,18){h c.2b({\'2T\':73,\'U\':U,\'15\':18})()}});71.N({4P:k(){h 3I(c)},72:k(){h 3V(c)},9s:k(2X,2J){h 1e.2X(2J,1e.2J(2X,c))},3j:k(3W){3W=1e.2U(10,3W||0);h 1e.3j(c*3W)/3W},9z:k(K){J(o i=0;i\'}q=M.6S(q)}q=$(q);h(!1s||!q)?q:q.2s(1s)}});o 1C=Y 1i({1F:k(R){h(R)?$N(R,c):c}});1C.N=k(1s){J(o 1y 1j 1s){c.1p[1y]=1s[1y];c[1y]=$3p.4S(1y)}};k $(q){m(!q)h 1d;m(q.3d)h 1Q.3r(q);m([L,M].19(q))h q;o B=$B(q);m(B==\'1G\'){q=M.4y(q);B=(q)?\'1b\':14}m(B!=\'1b\')h 1d;m(q.3d)h 1Q.3r(q);m([\'2h\',\'9E\'].19(q.4G.3Z()))h q;$N(q,I.1p);q.3d=k(){};h 1Q.3r(q)};M.4X=M.2c;k $$(){o R=[];J(o i=0,j=15.O;i0&&4c<13)c.1v=\'f\'+4c}c.1v=c.1v||4q.bx(c.4b).3Z()}17 m(c.B.28(/(6v|aP|aN)/)){c.aM={\'x\':H.5H||H.7k+M.23.3Y,\'y\':H.5C||H.7j+M.23.3H};c.aJ={\'x\':H.5H?H.5H-L.8b:H.7k,\'y\':H.5C?H.5C-L.8a:H.7j};c.aQ=(H.7i==3)||(H.aW==2);1L(c.B){P\'6m\':c.1D=H.1D||H.aX;1r;P\'6h\':c.1D=H.1D||H.aV}c.7g()}h c},3R:k(){h c.4a().4e()},4a:k(){m(c.H.4a)c.H.4a();17 c.H.aS=1h;h c},4e:k(){m(c.H.4e)c.H.4e();17 c.H.aI=14;h c}});26.4k={1D:k(){m(c.1D&&c.1D.5r==3)c.1D=c.1D.2m},7h:k(){3b{26.4k.1D.1R(c)}3m(e){c.1D=c.3l}}};26.1p.7g=(L.68)?26.4k.7h:26.4k.1D;26.1z=Y 2E({\'ar\':13,\'as\':38,\'at\':40,\'2D\':37,\'5B\':39,\'ay\':27,\'az\':32,\'aF\':8,\'aG\':9,\'5D\':46});I.2g.2e={2G:k(B,K){c.$V=c.$V||{};c.$V[B]=c.$V[B]||{\'1z\':[],\'29\':[]};m(c.$V[B].1z.19(K))h c;c.$V[B].1z.1a(K);o 4j=B;o 1K=I.2e[B];m(1K){m(1K.5s)1K.5s.1R(c,K);m(1K.25)K=1K.25;m(1K.B)4j=1K.B}m(!c.5z)K=K.2b({\'U\':c,\'H\':1h});c.$V[B].29.1a(K);h(I.6q.19(4j))?c.34(4j,K):c},5p:k(B,K){m(!c.$V||!c.$V[B])h c;o 1Y=c.$V[B].1z.3h(K);m(1Y==-1)h c;o 1v=c.$V[B].1z.4i(1Y,1)[0];o G=c.$V[B].29.4i(1Y,1)[0];o 1K=I.2e[B];m(1K){m(1K.2W)1K.2W.1R(c,K);m(1K.B)B=1K.B}h(I.6q.19(B))?c.7A(B,G):c},5g:k(2i){h I.4h(c,\'2G\',2i)},4g:k(B){m(!c.$V)h c;m(!B){J(o 4x 1j c.$V)c.4g(4x);c.$V=1d}17 m(c.$V[B]){c.$V[B].1z.1A(k(K){c.5p(B,K)},c);c.$V[B]=1d}h c},1N:k(B,18,1O){m(c.$V&&c.$V[B]){c.$V[B].1z.1A(k(K){K.2b({\'U\':c,\'1O\':1O,\'15\':18})()},c)}h c},6x:k(T,B){m(!T.$V)h c;m(!B){J(o 4x 1j T.$V)c.6x(T,4x)}17 m(T.$V[B]){T.$V[B].1z.1A(k(K){c.2G(B,K)},c)}h c}};L.N(I.2g.2e);M.N(I.2g.2e);I.N(I.2g.2e);I.2e=Y 2E({\'6B\':{B:\'6m\',25:k(H){H=Y 26(H);m(H.1D!=c&&!c.65(H.1D))c.1N(\'6B\',H)}},\'6z\':{B:\'6h\',25:k(H){H=Y 26(H);m(H.1D!=c&&!c.65(H.1D))c.1N(\'6z\',H)}},\'4B\':{B:(L.68)?\'6s\':\'4B\'}});I.6q=[\'6v\',\'bk\',\'bp\',\'bq\',\'4B\',\'6s\',\'6m\',\'6h\',\'bw\',\'6A\',\'bu\',\'bt\',\'7H\',\'5i\',\'6w\',\'bs\',\'bh\',\'bg\',\'b5\',\'7Y\',\'b6\',\'b4\',\'2R\',\'b3\',\'7L\',\'b0\',\'6a\'];5w.N({b2:k(U,18){h c.2b({\'U\':U,\'15\':18,\'H\':26})}});1C.N({bf:k(2r){h Y 1C(c.2t(k(q){h(I.3t(q)==2r)}))},8r:k(1n,1T){o R=c.2t(k(q){h(q.1n&&q.1n.19(1n,\' \'))});h(1T)?R:Y 1C(R)},8n:k(2Z,1T){o R=c.2t(k(q){h(q.2Z==2Z)});h(1T)?R:Y 1C(R)},7B:k(1m,5n,G,1T){o R=c.2t(k(q){o 1B=I.3z(q,1m);m(!1B)h 14;m(!5n)h 1h;1L(5n){P\'=\':h(1B==G);P\'*=\':h(1B.19(G));P\'^=\':h(1B.6y(0,G.O)==G);P\'$=\':h(1B.6y(1B.O-G.O)==G);P\'!=\':h(1B!=G);P\'~=\':h 1B.19(G,\' \')}h 14});h(1T)?R:Y 1C(R)}});k $E(1q,2t){h($(2t)||M).8h(1q)};k $bb(1q,2t){h($(2t)||M).4X(1q)};$$.2z={\'3P\':/^(\\w*|\\*)(?:#([\\w-]+)|\\.([\\w-]+))?(?:\\[(\\w+)(?:([!*^$]?=)["\']?([^"\'\\]]*)["\']?)?])?$/,\'2O\':{64:k(1f,2f,W,i){o 1X=[2f.ba?\'5T:\':\'\',W[1]];m(W[2])1X.1a(\'[@2Z="\',W[2],\'"]\');m(W[3])1X.1a(\'[19(61(" ", @58, " "), " \',W[3],\' ")]\');m(W[4]){m(W[5]&&W[6]){1L(W[5]){P\'*=\':1X.1a(\'[19(@\',W[4],\', "\',W[6],\'")]\');1r;P\'^=\':1X.1a(\'[b9-bc(@\',W[4],\', "\',W[6],\'")]\');1r;P\'$=\':1X.1a(\'[bd(@\',W[4],\', 1G-O(@\',W[4],\') - \',W[6].O,\' + 1) = "\',W[6],\'"]\');1r;P\'=\':1X.1a(\'[@\',W[4],\'="\',W[6],\'"]\');1r;P\'!=\':1X.1a(\'[@\',W[4],\'!="\',W[6],\'"]\')}}17{1X.1a(\'[@\',W[4],\']\')}}1f.1a(1X.1w(\'\'));h 1f},63:k(1f,2f,1T){o R=[];o 2O=M.5a(\'.//\'+1f.1w(\'//\'),2f,$$.2z.8m,be.b7,1d);J(o i=0,j=2O.b1;i<\\/21>\');$(\'5G\').4T=k(){m(c.3M==\'7G\')3S()}}}17{L.34("7H",3S);M.34("aL",3S)}}};L.aK=k(K){h c.2G(\'59\',K)};L.N({8c:k(){m(c.57)h c.aO;m(c.7W)h M.4l.7K;h M.23.7K},8d:k(){m(c.57)h c.ch;m(c.7W)h M.4l.7X;h M.23.7X},8f:k(){m(c.1V)h 1e.2J(M.23.5k,M.23.4d);m(c.2Y)h M.4l.4d;h M.23.4d},8e:k(){m(c.1V)h 1e.2J(M.23.5e,M.23.4m);m(c.2Y)h M.4l.4m;h M.23.4m},87:k(){h c.8b||M.23.3Y},81:k(){h c.8a||M.23.3H},89:k(){h{\'3J\':{\'x\':c.8c(),\'y\':c.8d()},\'8g\':{\'x\':c.8f(),\'y\':c.8e()},\'6a\':{\'x\':c.87(),\'y\':c.81()}}},3D:k(){h{\'x\':0,\'y\':0}}});o 1c={};1c.4r=Y 1i({C:{86:1i.1M,3s:1i.1M,6f:1i.1M,1x:k(p){h-(1e.80(1e.5U*p)-1)/2},2M:bN,2j:\'41\',44:1h,83:50},1F:k(C){c.1b=c.1b||1d;c.4M(C);m(c.C.1F)c.C.1F.1R(c)},82:k(){o 2x=$2x();m(2x=(7-4*a)/11){G=-1e.2U((11-6*a-11*p)/4,2)+b*b;1r}}h G},9i:k(p,x){h 1e.2U(2,10*--p)*1e.80(20*p*1e.5U*(x[0]||1)/3)}});[\'8C\',\'8z\',\'8v\',\'8u\'].1A(k(1x,i){1c.2q[1x]=Y 1c.5M(k(p){h 1e.2U(p,[i+2])});1c.2q.5J(1x)});o 6i=Y 1i({C:{1E:\'3i\',7C:1h,7E:1i.1M,3x:1i.1M,4E:1i.1M,7I:1h,3N:\'8H-8\',8i:14,2V:{}},6c:k(){c.1I=(L.4O)?Y 4O():(L.1V?Y 88(\'a5.a4\'):14);h c},1F:k(C){c.6c().4M(C);c.C.3Q=c.C.3Q||c.3Q;c.2V={};m(c.C.7I&&c.C.1E==\'3i\'){o 3N=(c.C.3N)?\'; 9r=\'+c.C.3N:\'\';c.3X(\'7U-B\',\'7T/x-7J-9Y-a0\'+3N)}m(c.C.1F)c.C.1F.1R(c)},7D:k(){m(c.1I.3M!=4||!c.3o)h;c.3o=14;o 2S=0;3b{2S=c.1I.2S}3m(e){};m(c.C.3Q.1R(c,2S))c.3x();17 c.4E();c.1I.4T=1i.1M},3Q:k(2S){h((2S>=al)&&(2S]*>([\\s\\S]*?)<\\/21>/9T;4C((21=3P.9O(c.2I.1t)))2u.1a(21[1]);2u=2u.1w(\'\\n\')}m(2u)(L.7V)?L.7V(2u):L.7O(2u,0)},7P:k(1m){3b{h c.1I.9M(1m)}3m(e){};h 1d}});5x.3w=k(2i){o 3k=[];J(o F 1j 2i)3k.1a(4I(F)+\'=\'+4I(2i[F]));h 3k.1w(\'&\')};I.N({4V:k(C){h Y 7Q(c.3z(\'a8\'),$2p({1o:c.3w()},C,{1E:\'3i\'})).8q()}});o 9N=Y 2E({C:{4H:14,56:14,2M:14,42:14},2s:k(1v,G,C){C=$2p(c.C,C);G=4I(G);m(C.4H)G+=\'; 4H=\'+C.4H;m(C.56)G+=\'; 56=\'+C.56;m(C.2M){o 4W=Y 8l();4W.9w(4W.8k()+C.2M*24*60*60*8o);G+=\'; a6=\'+4W.8V()}m(C.42)G+=\'; 42\';M.31=1v+\'=\'+G;h $N(C,{\'1v\':1v,\'G\':G})},5l:k(1v){o G=M.31.2d(\'(?:^|;)\\\\s*\'+1v.8p()+\'=([^;]*)\');h G?9m(G[1]):14},2W:k(31,C){m($B(31)==\'2h\')c.2s(31.1v,\'\',$2p(31,{2M:-1}));17 c.2s(31,\'\',$2p(C,{2M:-1}))}});o 4K={3A:k(Q){1L($B(Q)){P\'1G\':h\'"\'+Q.2A(/(["\\\\])/g,\'\\\\$1\')+\'"\';P\'1g\':h\'[\'+Q.25(4K.3A).1w(\',\')+\']\';P\'2h\':o 1G=[];J(o F 1j Q)1G.1a(4K.3A(F)+\':\'+4K.3A(Q[F]));h\'{\'+1G.1w(\',\')+\'}\';P\'43\':m(bP(Q))1r;P 14:h\'1d\'}h 4q(Q)},5a:k(53,42){h(($B(53)!=\'1G\')||(42&&!53.28(/^("(\\\\.|[^"\\\\\\n\\r])*?"|[,:{}\\[\\]0-9.\\-+b8-u \\n\\r\\t])+?$/)))?1d:bZ(\'(\'+53+\')\')}};',62,764,'||||||||||||this|||||return|||function||if||var||el|||||||||||type|options|||property|value|event|Element|for|fn|window|document|extend|length|case|obj|elements||from|bind|events|param||new||||to||false|arguments||else|args|contains|push|element|Fx|null|Math|items|array|true|Class|in|style|result|name|className|data|prototype|selector|break|props|text|css|key|join|transition|prop|keys|each|current|Elements|relatedTarget|method|initialize|string|start|transport|parent|custom|switch|empty|fireEvent|delay|opacity|Garbage|call|now|nocash|Array|ie|timer|temp|pos|params||script|rgb|documentElement||map|Event||test|values|parsed|create|getElementsByTagName|match|Events|context|Methods|object|source|unit|properties|parse|parentNode|item|overflown|merge|Transitions|tag|set|filter|scripts|index|top|time|returns|shared|replace|url|option|left|Abstract|border|addEvent|getStyle|response|max|Styles|CSS|duration|iterable|xpath|previous|tmp|select|status|periodical|pow|headers|remove|min|webkit|id|hex|cookie||val|addListener|getValue|chains||||len|try|fromTo|htmlElement|results|fx|bit|indexOf|post|round|queryString|target|catch|inject|running|native|apply|collect|onComplete|getTag|getNow|next|toQueryString|onSuccess|pick|getProperty|toString|mix|width|getPosition|klass|unique|compute|scrollTop|parseInt|size|HTMLElement|walk|readyState|encoding|xml|regexp|isSuccess|stop|domReady|_method|chk|parseFloat|precision|setHeader|scrollLeft|toLowerCase||px|secure|number|wait|setStyle||increase|Listeners|src|stopPropagation|code|fKey|scrollWidth|preventDefault|loaded|removeEvents|setMany|splice|realType|fix|body|scrollHeight|split|Multi|hexToRgb|String|Base|color|end|Properties|trash|getElements|evType|getElementById|setNow|brother|mousewheel|while|typeof|onFailure|attempt|tagName|domain|encodeURIComponent|visibility|Json|forEach|setOptions|included|XMLHttpRequest|toInt|evalScripts|regex|generic|onreadystatechange|every|send|date|getElementsBySelector|defined|setProperty||rgbToHex|proto|str|mp|currentStyle|path|webkit419|class|domready|evaluate|charAt|qs|evalResponse|offsetHeight|setHTML|addEvents|disabled|unload|update|offsetWidth|get|multiple|operator|merged|removeEvent|hidden|nodeType|add|height|position|bottom|Function|Object|newArray|addEventListener|checked|right|pageY|delete|include|random|ie_ready|pageX|implement|compat|Color|camelCase|Transition|trim|found|padding|RegExp|clean|hasClass|xhtml|PI|Style|cssText|easeType|transitions|innerText||concat|firstChild|getItems|getParam|hasChild|flag|node|gecko|appendChild|scroll|on|setTransport|Dom|pairs|onCancel|selected|mouseout|XHR|Options|Chain|getMany|mouseover|clear|first|default|NativeEvents|callChain|DOMMouseScroll|toUpperCase|insertBefore|click|beforeunload|cloneEvents|substr|mouseleave|keydown|mouseenter|capitalize|contents|removeClass|argument|after|where|before|addClass|setStyles|hyphenate|getNext|defaultView|zoom|setOpacity|visible|elementsProperty|createElement|constructor|pp|ie6|undefined|picked|head|Merge|callee|Number|toFloat|interval|slice|copy|getLast|childNodes|continue|extended|removeEventListener|PropertiesIFlag|direction|borderShort|shift|wheelDelta|fixRelatedTarget|relatedTargetGecko|which|clientY|clientX|Left|Bottom|styleSheet|innerHTML|appendText|removeChild|nodeValue|setProperties|textContent|fixStyle|Top|Right|margin|0px|Width|removeListener|filterByAttribute|async|onStateChange|onRequest|cancel|complete|load|urlEncoded|www|clientWidth|abort|javascript|input|setTimeout|getHeader|Ajax|textarea|getFormElements|application|Content|execScript|opera|clientHeight|change|delta|cos|getScrollTop|step|fps|sin|Single|onStart|getScrollLeft|ActiveXObject|getSize|pageYOffset|pageXOffset|getWidth|getHeight|getScrollHeight|getScrollWidth|scrollSize|getElement|autoCancel|prefix|getTime|Date|resolver|filterById|1000|escapeRegExp|request|filterByClass|normal|sel|Quint|Quart|100|alpha|floor|Cubic|getStyles|getPropertyValue|Quad|InOut|getComputedStyle|hasLayout|getText|utf|taintEnabled|navigator|webkit420|cssFloat|styleFloat|getBoxObjectFor|all|ie7|clearInterval|clearTimeout|Window|Document|zIndex|toGMTString|ease|getPrevious|removeAttribute|version|nodeName|textnode|removeProperty|whitespace|getProperties|MooTools|setText|acos|Sine|Expo|setAttribute|Pow|collection|getParent|khtml|lastChild|getFirst|Circ|Elastic|getChildren|getAttribute|Back|decodeURIComponent|618|attributes|Bounce|Sibling|charset|limit|With|Accept|html|setTime|bindAsEventListener|Requested|times|setRequestHeader|close|postBody|boolean|embed|pass|err|chain|getRandom|clearChain|associate|some|getResponseHeader|Cookie|exec|transparent|setInterval|ecma|java|gi|Connection|overrideMimeType|replaceWith|replaceChild|form|cloneNode|urlencoded|clone|iframe|createTextNode|XMLHTTP|Microsoft|expires|toggleClass|action|DOMElement|adopt|responseXML|execCommand|Out|open|styles|BackgroundImageCache|responseText|injectBefore|injectInside|injectTop|200|injectAfter|300|float||linear|enter|up|down|getLeft|getCoordinates|protocol|location|esc|space|offsetTop|offsetLeft|do|offsetParent|getTop|backspace|tab|https|returnValue|client|onDomReady|DOMContentLoaded|page|menu|innerWidth|mouse|rightClick|defer|cancelBubble|In|write|toElement|button|fromElement|scrollTo|password|contextmenu|snapshotLength|bindWithEvent|error|reset|blur|submit|UNORDERED_NODE_SNAPSHOT_TYPE|Eaeflnr|starts|namespaceURI|ES|with|substring|XPathResult|filterByTag|focus|move|org|w3|dblclick|1999|getElementsByClassName|radio|checkbox|mouseup|mousedown|snapshotItem|resize|keyup|keypress|http|mousemove|fromCharCode|void|accesskey|accessKey|rowSpan|rowspan|colspan|colSpan|tabindex|tabIndex|frameborder|frameBorder|readOnly|readonly|maxlength|htmlFor|500|effects|isFinite|offset|easeIn|easeInOut|easeOut|effect|hide|borderStyle|borderColor|borderWidth|eval|clearTimer|href|maxLength|ctrlKey|alt|altKey|control|shiftKey|detachEvent|CollectGarbage|meta|metaKey|keyCode|111|detail|120|wheel|innerHeight|attachEvent|srcElement'.split('|'),0,{})) /* observer.js */ /** * Observer - Observe formelements for changes * * @version 1.0rc1 * * @license MIT-style license * @author Harald Kirschner * @copyright Author */ var Observer = new Class({ options: { periodical: false, delay: 1000 }, initialize: function(el, onFired, options){ this.setOptions(options); this.addEvent('onFired', onFired); this.element = $(el); this.listener = this.fired.bind(this); this.value = this.element.getValue(); if (this.options.periodical) this.timer = this.listener.periodical(this.options.periodical); else this.element.addEvent('keyup', this.listener); }, fired: function() { var value = this.element.getValue(); if (this.value == value) return; this.clear(); this.value = value; this.timeout = this.fireEvent.delay(this.options.delay, this, ['onFired', [value]]); }, clear: function() { $clear(this.timeout); return this; } }); Observer.implement(new Options); Observer.implement(new Events);/* autocompleter.js */ /** * Autocompleter * * @version 1.0rc4 * * @license MIT-style license * @author Harald Kirschner * @copyright Author */ var Autocompleter = {}; Autocompleter.Base = new Class({ options: { minLength: 1, useSelection: true, markQuery: true, inheritWidth: true, maxChoices: 10, injectChoice: null, onSelect: Class.empty, onShow: Class.empty, onHide: Class.empty, customTarget: null, className: 'autocompleter-choices', zIndex: 42, observerOptions: {}, fxOptions: {}, overflown: [] }, initialize: function(el, options) { this.setOptions(options); this.element = $(el); this.build(); this.observer = new Observer(this.element, this.prefetch.bind(this), $merge({ delay: 400 }, this.options.observerOptions)); this.value = this.observer.value; this.queryValue = null; }, /** * build - Initialize DOM * * Builds the html structure for choices and appends the events to the element. * Override this function to modify the html generation. */ build: function() { if ($(this.options.customTarget)) this.choices = this.options.customTarget; else { this.choices = new Element('ul', { 'class': this.options.className, styles: {zIndex: this.options.zIndex} }).injectInside(document.body); this.fix = new OverlayFix(this.choices); } this.fx = this.choices.effect('opacity', $merge({ wait: false, duration: 200 }, this.options.fxOptions)) .addEvent('onStart', function() { if (this.fx.now) return; this.choices.setStyle('display', ''); this.fix.show(); }.bind(this)) .addEvent('onComplete', function() { if (this.fx.now) return; this.choices.setStyle('display', 'none'); this.fix.hide(); }.bind(this)).set(0); this.element.setProperty('autocomplete', 'off') .addEvent(window.ie ? 'keydown' : 'keypress', this.onCommand.bindWithEvent(this)) .addEvent('mousedown', this.onCommand.bindWithEvent(this, [true])) .addEvent('focus', this.toggleFocus.bind(this, [true])) .addEvent('blur', this.toggleFocus.bind(this, [false])) .addEvent('trash', this.destroy.bind(this)); }, destroy: function() { this.choices.remove(); }, toggleFocus: function(state) { this.focussed = state; if (!state) this.hideChoices(); }, onCommand: function(e, mouse) { if (mouse && this.focussed) this.prefetch(); if (e.key && !e.shift) switch (e.key) { case 'enter': if (this.selected && this.visible) { this.choiceSelect(this.selected); e.stop(); } return; case 'up': case 'down': if (this.observer.value != (this.value || this.queryValue)) this.prefetch(); else if (this.queryValue === null) break; else if (!this.visible) this.showChoices(); else { this.choiceOver((e.key == 'up') ? this.selected.getPrevious() || this.choices.getLast() : this.selected.getNext() || this.choices.getFirst() ); this.setSelection(); } e.stop(); return; case 'esc': this.hideChoices(); return; } this.value = false; }, setSelection: function() { if (!this.options.useSelection) return; var startLength = this.queryValue.length; if (this.element.value.indexOf(this.queryValue) != 0) return; var insert = this.selected.inputValue.substr(startLength); if (document.getSelection) { this.element.value = this.queryValue + insert; this.element.selectionStart = startLength; this.element.selectionEnd = this.element.value.length; } else if (document.selection) { var sel = document.selection.createRange(); sel.text = insert; sel.move("character", - insert.length); sel.findText(insert); sel.select(); } this.value = this.observer.value = this.element.value; }, hideChoices: function() { if (!this.visible) return; this.visible = this.value = false; this.observer.clear(); this.fx.start(0); this.fireEvent('onHide', [this.element, this.choices]); }, showChoices: function() { if (this.visible || !this.choices.getFirst()) return; this.visible = true; var pos = this.element.getCoordinates(this.options.overflown); this.choices.setStyles({ left: pos.left, top: pos.bottom }); if (this.options.inheritWidth) this.choices.setStyle('width', pos.width); this.fx.start(1); this.choiceOver(this.choices.getFirst()); this.fireEvent('onShow', [this.element, this.choices]); }, prefetch: function() { if (this.element.value.length < this.options.minLength) this.hideChoices(); else if (this.element.value == this.queryValue) this.showChoices(); else this.query(); }, updateChoices: function(choices) { this.choices.empty(); this.selected = null; if (!choices || !choices.length) return; if (this.options.maxChoices < choices.length) choices.length = this.options.maxChoices; choices.each(this.options.injectChoice || function(choice, i){ var el = new Element('li').setHTML(this.markQueryValue(choice)); el.inputValue = choice; this.addChoiceEvents(el).injectInside(this.choices); }, this); this.showChoices(); }, choiceOver: function(el) { if (this.selected) this.selected.removeClass('autocompleter-selected'); this.selected = el.addClass('autocompleter-selected'); }, choiceSelect: function(el) { this.observer.value = this.element.value = el.inputValue; this.hideChoices(); this.fireEvent('onSelect', [this.element], 20); }, /** * markQueryValue * * Marks the queried word in the given string with * * Call this i.e. from your custom parseChoices, same for addChoiceEvents * * @param {String} Text * @return {String} Text */ markQueryValue: function(txt) { return (this.options.markQuery && this.queryValue) ? txt.replace(new RegExp('(' + this.queryValue.escapeRegExp() + ')', 'i'), '$1') : txt; }, /** * addChoiceEvents * * Appends the needed event handlers for a choice-entry to the given element. * * @param {Element} Choice entry * @return {Element} Choice entry */ addChoiceEvents: function(el) { return el.addEvents({ mouseover: this.choiceOver.bind(this, [el]), mousedown: this.choiceSelect.bind(this, [el]) }); } }); Autocompleter.Base.implement(new Events); Autocompleter.Base.implement(new Options); Autocompleter.Local = Autocompleter.Base.extend({ options: { minLength: 0, filterTokens : null }, initialize: function(el, tokens, options) { this.parent(el, options); this.tokens = tokens; if (this.options.filterTokens) this.filterTokens = this.options.filterTokens.bind(this); }, query: function() { this.hideChoices(); this.queryValue = this.element.value; this.updateChoices(this.filterTokens()); }, filterTokens: function(token) { var regex = new RegExp(this.queryValue.escapeRegExp(), 'i'); return this.tokens.filter(function(token) { return regex.test(token); }); } }); Autocompleter.Ajax = {}; Autocompleter.Ajax.Base = Autocompleter.Base.extend({ options: { postVar: 'value', postData: {}, ajaxOptions: {}, onRequest: Class.empty, onComplete: Class.empty }, initialize: function(el, url, options) { this.parent(el, options); this.ajax = new Ajax(url, $merge({ autoCancel: true }, this.options.ajaxOptions)); this.ajax.addEvent('onComplete', this.queryResponse.bind(this)); this.ajax.addEvent('onFailure', this.queryResponse.bind(this, [false])); }, query: function(){ var data = $extend({}, this.options.postData); data[this.options.postVar] = this.element.value; this.fireEvent('onRequest', [this.element, this.ajax]); this.ajax.request(data); }, /** * queryResponse - abstract * * Inherated classes have to extend this function and use this.parent(resp) * * @param {String} Response */ queryResponse: function(resp) { this.value = this.queryValue = this.element.value; this.selected = false; this.hideChoices(); this.fireEvent(resp ? 'onComplete' : 'onFailure', [this.element, this.ajax], 20); } }); Autocompleter.Ajax.Json = Autocompleter.Ajax.Base.extend({ queryResponse: function(resp) { this.parent(resp); var choices = Json.evaluate(resp || false); if (!choices || !choices.length) return; this.updateChoices(choices); } }); Autocompleter.Ajax.Xhtml = Autocompleter.Ajax.Base.extend({ options: { parseChoices: null }, queryResponse: function(resp) { this.parent(resp); if (!resp) return; this.choices.setHTML(resp).getChildren().each(this.options.parseChoices || this.parseChoices, this); this.showChoices(); }, parseChoices: function(el) { var value = el.innerHTML; el.inputValue = value; el.setHTML(this.markQueryValue(value)); } }); var OverlayFix = new Class({ initialize: function(el) { this.element = $(el); if (window.ie){ this.element.addEvent('trash', this.destroy.bind(this)); this.fix = new Element('iframe', { properties: { frameborder: '0', scrolling: 'no', src: 'javascript:false;' }, styles: { position: 'absolute', border: 'none', display: 'none', filter: 'progid:DXImageTransform.Microsoft.Alpha(opacity=0)' } }).injectAfter(this.element); } }, show: function() { if (this.fix) this.fix.setStyles($extend( this.element.getCoordinates(), { display: '', zIndex: (this.element.getStyle('zIndex') || 1) - 1 })); return this; }, hide: function() { if (this.fix) this.fix.setStyle('display', 'none'); return this; }, destroy: function() { this.fix.remove(); } });/* bumeran.js */ /* *********************** * bumeran js v202 * 2007, icograma.com * **********************/ /* debug */ var annoy=true; function debug(m){if(annoy){annoy=confirm(m);};}; function rmHintEv(){ rmHint(this); } function rmHint(what){ if( !($(what)) ){ what=this; } //for mootools if( $(what).hasClass('hint') ){ what.value=""; what.removeClass('hint'); } } function addHintEv(){ addHint(this); } function addHint(what){ if( !($(what)) ){ what=this; } if(what.title.indexOf("*")==0){ var t = what.title.substring(1); if(what.value=="" || what.value == t){ what.value = t; what.addClass("hint"); //moo } } } function dynLayoutEv(){ dynLayout( window.getWidth() ); }//moo function dynLayout(w){ var sizes=new Array( 755, "w800", 860, "w1024" ); var sizeClass = sizes[1]; var b=document.getElementsByTagName("HTML")[0]; for(var i=sizes.length-2;i>=0;i-=2){ if(w >= sizes[i] ){ sizeClass = sizes[i+1]; break; } } b.className = sizeClass; Cookie.set("browserWidth",w); } function init(){ dynLayoutEv(); //shortcuts para usuarios if($chk($('header_shortcuts'))) { var divRespuesta = $('header_shortcuts'); var url = '/presentacion/postulantes/client/pos_shortcuts.ngmf'; divRespuesta.empty(); new Ajax(url, { method: 'get', update: divRespuesta }).request(); } //fin shortcuts para usuarios for( var f=0; f
'); new Ajax(url, { method: 'get', onComplete: function() { divRespuesta.removeClass('ajax-loading'); }, update: divRespuesta }).request(); } }); } //caja de busqueda /* Variable que guarda el elemento de Formulario */ var miFormu = $('BUS_POS'); //valido que exista el formulario if($chk(miFormu)) { /* Agregamos nuestra funcion al evento enviar 'submit' */ miFormu.addEvent('submit', function(e) { /* Evitamos el Evento submit natural */ new Event(e).stop(); var keyword = $('KEYWORD'); rmHint(keyword); if (keyword.value == ''){ window.location = $('BUS_POS').action + '.html'; }else{ window.location = $('BUS_POS').action +'_'+escape(keyword.value)+'.html'; } }); } //encuesta con ajax var miFormu = $('formalter'); //valido que exista el formulario if($chk(miFormu)) { /* Agregamos nuestra funcion al evento enviar 'submit' */ miFormu.addEvent('submit', function(e) { /* Evitamos el Evento submit natural */ new Event(e).stop(); var alternativa=0; for (t=0; t-1){ ftype="email";efilter=true; } if(efilter){ isvalid=isValidField(fs[i].value,ftype); } //is required, or need to check if filled? var reqelm = FindTagClassUp(fs[i],".required","form"); if(!reqelm&&efilter&&isfilled){ reqelm=FindTagClassUp(fs[i],".field","form"); if(!reqelm){reqelm=fs[i];} }; if(!isvalid&&reqelm){ if(oktosend&&(ftype.indexOf("mail")>-1||ftype.indexOf("text")>-1||ftype.indexOf("select")>-1) ){ fs[i].select(); } oktosend=false; fs[i].onclick=rmErrorClass; fs[i].onkeydown=rmErrorClass; reqelm.addClass("error"); } }//end filter fs }//end for i in fs // } return oktosend; } function rmErrorClass(event){ var elm=this;var etag=FindTagClassUp(elm,".error","form");if(!etag){etag=FindTagClassUp(elm,".field","form");};if(!etag){etag=elm} if(etag){ etag.removeClass("error"); elm.onclick=null;elm.onfocus=null;elm.onkeyup=null} } function isValidField(t,k){ if(k=="email"){ if( t.indexOf("@example.com")>-1){return false;}; var emailFilter=/^.+@.+\..{2,}$/; var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\]]/ if(!(emailFilter.test(t))||t.match(illegalChars)){return(false);}else{return (true);} return false }//end email } /* --- DOM --- */ function FindTagClassUp(elm,tcsearch,tclimit){ // for mootools var elm= $(elm); var tc=( tcsearch+"." ).split("."); tc[0]=tc[0].toUpperCase(); if(!tclimit){tclimit="BODY";}; var tz=( tclimit+"." ).split("."); tz[0]=tz[0].toUpperCase(); while( n = elm.nodeName ){ if(tc[0]==""||n==tc[0]){ if( tc[1]=="" || $(elm).hasClass(tc[1]) ){ return elm; }; }; if(tz[0]==""||n==tz[0]){ if( tz[1]=="" || $(elm).hasClass(tz[1]) ){ return false; }; }; elm=elm.parentNode; }; debug("No se pudo obtener NODENAME para: ",elm); return false; }; function $path(e,c){ var e=$(e); c=c.split(" "); for(var i=0;i0){ if(num=="0"){e=a[0]; }else if(num=="last"||num>a.length){ e=a[a.length-1] }else{ e=a[num] } }else{ var a = document.getElementsByName(ci); if( a[0] ){ e=a[0]; }else{return false;}; }; }; }; return e; }; //caja de busqueda function Buscar() { var keyword = $('KEYWORD'); var form = $('BUS_POS'); rmHint(keyword); if (keyword.value == ''){ window.location = '/aplicantes/listado_postings_completo.html'; //form.action = '/aplicantes/listado_postings_completo.html'; //form.method = 'POST'; return false; }else{ form.action = '/aplicantes/a_listadopostings.ngmf'; form.method = 'GET'; return true; } } //caja de Avisos Similares AJAX function CargarSimilares(idaviso){ var divRespuesta = $('avisosSimilares'); //valido que exista el div que va a contener la respuesta if($chk(divRespuesta)) { var url = "/presentacion/avisos/client/avi_avisossimilaresbox.ngmf?idpost="+idaviso; divRespuesta.empty().addClass('ajax-loading'); divRespuesta.setHTML('

'); new Ajax(url, { method: 'get', onComplete: function() { divRespuesta.removeClass('ajax-loading'); }, update: divRespuesta }).request(); } } //caja de Avisos Visitados AJAX function CargarVisitados(idaviso,puesto,empresa){ var divRespuesta = $('avisosVisitados'); //valido que exista el div que va a contener la respuesta if($chk(divRespuesta)) { var url = '/presentacion/avisos/client/avi_avisosvisitadosbox.ngmf?idpost='+idaviso+'&puesto='+escape(puesto)+'&empresa='+escape(empresa); divRespuesta.empty().addClass('ajax-loading'); divRespuesta.setHTML('

'); new Ajax(url, { method: 'get', onComplete: function() { divRespuesta.removeClass('ajax-loading'); }, update: divRespuesta }).request(); } } //funcion para contar vistas de un posting por ajax function ContarVistaAviso(idaviso) { var url = '/aplicantes/a_posting_count.ngmf?idpost='+idaviso; new Ajax(url, { method: 'get' }).request(); } /***** DIV POPUP ****/ function desplHiddenValues(id){ var obj = document.getElementById(id).style; if(obj.display=='none'||obj .display==''){ obj .display = 'block'; }else{ obj .display = 'none'; } } function openWindow(windowID,link){ var loadingDiv = document.getElementById( windowID ); var cwidth = "415"; var cheight= "320"; var cleft = 170; var ctop = 150; if( loadingDiv.style.setAttribute ){ //IE loadingDiv.style.setAttribute('position', 'absolute'); loadingDiv.style.setAttribute('left', parseInt(cleft)); loadingDiv.style.setAttribute('top', parseInt(ctop)); loadingDiv.style.setAttribute('visibility','visible'); }else{ loadingDiv.setAttribute('style',"position:absolute;left:"+cleft+"px;top:"+ctop+"px;visibility:visible"); } shownWindow = loadingDiv; } function hideWindow(){ if (shownWindow == null) return ; if( shownWindow.style.setAttribute ){//IE shownWindow.style.setAttribute( "visibility" , "hidden" ); }else{ shownWindow.setAttribute("style","visibility:hidden;position:absolute"); } shownWindow = null; } function setContentLoaded(){ document.onclick = executeClick; contentLoaded = true; } function executeClick(e){ if (window.event) e = window.event; var srcEl = e.srcElement? e.srcElement : e.target; hideWindowByClick(srcEl); } function hideWindowByClick(srcElement){ var parent=srcElement; while( parent != null ){ if (parent.id == 'shownWindow') return ; parent = parent.offsetParent; } hideWindow(); } function EnviarValidacion(){ if(isValidField($('emailValid').value,'email')){ var divRespuesta = $('respuestaValidacion'); var url = '/aplicantes/a_validaremail.ngmf?emailValid='+$('emailValid').value; divRespuesta.empty().addClass('ajax-loading'); new Ajax(url, { method: 'get', onComplete: function() { divRespuesta.removeClass('ajax-loading'); }, update: divRespuesta }).request(); }else{ alert('Su email no parece ser correcto'); } } function EnviarValidacionZona(){ var divRespuesta = $('respuestaValidacion'); var url = '/aplicantes/a_validarzona.ngmf?zonaValid='+$('zonaValid').value; divRespuesta.empty().addClass('ajax-loading'); new Ajax(url, { method: 'get', onComplete: function() { divRespuesta.removeClass('ajax-loading'); }, update: divRespuesta }).request(); } /**** FIN POPUP ****/