doc_view[1]

Download doc_view[1]

If you can't read please download the document

Upload: jorge-escobar

Post on 12-Sep-2014

181 views

Category:

Documents


0 download

TRANSCRIPT

/* :asset_packager_compatibility, 'config/asset_packages.yml' @ 1319142822 */ /* public/javascripts/prototype_uncompressed.js @ 1319142822 */ var Prototype={Version:'1.6.1',Browser:(function(){var ua=navigator.userAgent;va r isOpera=Object.prototype.toString.call(window.opera)=='[object Opera]';return{ IE:!!window.attachEvent&&!isOpera,Opera:isOpera,WebKit:ua.indexOf('AppleWebKit/' )>-1,Gecko:ua.indexOf('Gecko')>-1&&ua.indexOf('KHTML')===-1,MobileSafari:/Apple. *Mobile.*Safari/.test(ua)}})(),BrowserFeatures:{XPath:!!document.evaluate,Select orsAPI:!!document.querySelector,ElementExtensions:(function(){var constructor=wi ndow.Element window.HTMLElement;return!!(constructor&&constructor.prototype);}) (),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=='unde fined') return true;var div=document.createElement('div');var form=document.createElemen t('form');var isSupported=false;if(div['__proto__']&&(div['__proto__']!==form['_ _proto__'])){isSupported=true;} div=form=null;return isSupported;})()},ScriptFragment:']*>([\\S\\s]*?) ',JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function() {},K:function(x){return x}};if(Prototype.Browser.MobileSafari) Prototype.BrowserFeatures.SpecificElementExtensions=false;var Abstract={};var Tr y={these:function(){var returnValue;for(var i=0,length=arguments.length;i',4],SELECT:['','',1]}};(function(){var tags=Element._in sertionTranslations.tags;Object.extend(tags,{THEAD:tags.TBODY,TFOOT:tags.TBODY,T H:tags.TD});})();Element.Methods.Simulated={hasAttribute:function(element,attrib ute){attribute=Element._attributeTranslations.has[attribute] attribute;var node =$(element).getAttributeNode(attribute);return!!(node&&node.specified);}};Elemen t.Methods.ByTag={};Object.extend(Element,Element.Methods);(function(div){if(!Pro totype.BrowserFeatures.ElementExtensions&&div['__proto__']){window.HTMLElement={ };window.HTMLElement.prototype=div['__proto__'];Prototype.BrowserFeatures.Elemen tExtensions=true;} div=null;})(document.createElement('div')) Element.extend=(function(){function checkDeficiency(tagName){if(typeof window.El ement!='undefined'){var proto=window.Element.prototype;if(proto){var id='_'+(Mat h.random()+'').slice(2);var el=document.createElement(tagName);proto[id]='x';var isBuggy=(el[id]!=='x');delete proto[id];el=null;return isBuggy;}} return false;} function extendElementWith(element,methods){for(var property in methods){var val ue=methods[property];if(Object.isFunction(value)&&!(property in element)) element[property]=value.methodize();}} var HTMLOBJECTELEMENT_PROTOTYPE_BUGGY=checkDeficiency('object');if(Prototype.Bro wserFeatures.SpecificElementExtensions){if(HTMLOBJECTELEMENT_PROTOTYPE_BUGGY){re turn function(element){if(element&&typeof element._extendedByPrototype=='undefin ed'){var t=element.tagName;if(t&&(/^(?:object applet embed)$/i.test(t))){extendE lementWith(element,Element.Methods);extendElementWith(element,Element.Methods.Si mulated);extendElementWith(element,Element.Methods.ByTag[t.toUpperCase()]);}} return element;}} return Prototype.K;} var Methods={},ByTag=Element.Methods.ByTag;var extend=Object.extend(function(ele ment){if(!element typeof element._extendedByPrototype!='undefined' element.nod eType!=1 element==window)return element;var methods=Object.clone(Methods),tagNa me=element.tagName.toUpperCase();if(ByTag[tagName])Object.extend(methods,ByTag[t agName]);extendElementWith(element,methods);element._extendedByPrototype=Prototy pe.emptyFunction;return element;},{refresh:function(){if(!Prototype.BrowserFeatu res.ElementExtensions){Object.extend(Methods,Element.Methods);Object.extend(Meth ods,Element.Methods.Simulated);}}});extend.refresh();return extend;})();Element. hasAttribute=function(element,attribute){if(element.hasAttribute)return element. hasAttribute(attribute);return Element.Methods.Simulated.hasAttribute(element,at tribute);};Element.addMethods=function(methods){var F=Prototype.BrowserFeatures, T=Element.Methods.ByTag;if(!methods){Object.extend(Form,Form.Methods);Object.ext end(Form.Element,Form.Element.Methods);Object.extend(Element.Methods.ByTag,{"FOR M":Object.clone(Form.Methods),"INPUT":Object.clone(Form.Element.Methods),"SELECT ":Object.clone(Form.Element.Methods),"TEXTAREA":Object.clone(Form.Element.Method s)});} if(arguments.length==2){var tagName=methods;methods=arguments[1];} if(!tagName)Object.extend(Element.Methods,methods {});else{if(Object.isArray(ta gName))tagName.each(extend);else extend(tagName);} function extend(tagName){tagName=tagName.toUpperCase();if(!Element.Methods.ByTag [tagName]) Element.Methods.ByTag[tagName]={};Object.extend(Element.Methods.ByTag[tagName],m ethods);} function copy(methods,destination,onlyIfAbsent){onlyIfAbsent=onlyIfAbsent false ;for(var property in methods){var value=methods[property];if(!Object.isFunction( value))continue;if(!onlyIfAbsent !(property in destination)) destination[property]=value.methodize();}} function findDOMClass(tagName){var klass;var trans={"OPTGROUP":"OptGroup","TEXTA REA":"TextArea","P":"Paragraph","FIELDSET":"FieldSet","UL":"UList","OL":"OList", "DL":"DList","DIR":"Directory","H1":"Heading","H2":"Heading","H3":"Heading","H4" :"Heading","H5":"Heading","H6":"Heading","Q":"Quote","INS":"Mod","DEL":"Mod","A" :"Anchor","IMG":"Image","CAPTION":"TableCaption","COL":"TableCol","COLGROUP":"Ta bleCol","THEAD":"TableSection","TFOOT":"TableSection","TBODY":"TableSection","TR

":"TableRow","TH":"TableCell","TD":"TableCell","FRAMESET":"FrameSet","IFRAME":"I Frame"};if(trans[tagName])klass='HTML'+trans[tagName]+'Element';if(window[klass] )return window[klass];klass='HTML'+tagName+'Element';if(window[klass])return win dow[klass];klass='HTML'+tagName.capitalize()+'Element';if(window[klass])return w indow[klass];var element=document.createElement(tagName);var proto=element['__pr oto__'] element.constructor.prototype;element=null;return proto;} var elementPrototype=window.HTMLElement?HTMLElement.prototype:Element.prototype; if(F.ElementExtensions){copy(Element.Methods,elementPrototype);copy(Element.Meth ods.Simulated,elementPrototype,true);} if(F.SpecificElementExtensions){for(var tag in Element.Methods.ByTag){var klass= findDOMClass(tag);if(Object.isUndefined(klass))continue;copy(T[tag],klass.protot ype);}} Object.extend(Element,Element.Methods);delete Element.ByTag;if(Element.extend.re fresh)Element.extend.refresh();Element.cache={};};document.viewport={getDimensio ns:function(){return{width:this.getWidth(),height:this.getHeight()};},getScrollO ffsets:function(){return Element._returnOffset(window.pageXOffset document.docu mentElement.scrollLeft document.body.scrollLeft,window.pageYOffset document.do cumentElement.scrollTop document.body.scrollTop);}};(function(viewport){var B=P rototype.Browser,doc=document,element,property={};function getRootElement(){if(B .WebKit&&!doc.evaluate) return document;if(B.Opera&&window.parseFloat(window.opera.version())=0;i--){var node=node s[i];if(node.nodeType==1&&(!ofType node._countedByPrototype))node.nodeIndex=j++ ;}}else{for(var i=0,j=1,nodes=parentNode.childNodes;node=nodes[i];i++) if(node.nodeType==1&&(!ofType node._countedByPrototype))node.nodeIndex=j++;}},u nique:function(nodes){if(nodes.length==0)return nodes;var results=[],n;for(var i =0,l=nodes.length;i=0)memo.push(i);return memo;});},nth:function (nodes,formula,root,reverse,ofType){if(nodes.length==0)return[];if(formula=='eve n')formula='2n+0';if(formula=='odd')formula='2n+1';var h=Selector.handlers,resul ts=[],indexed=[],m;h.mark(nodes);for(var i=0,node;node=nodes[i];i++){if(!node.pa rentNode._countedByPrototype){h.index(node.parentNode,reverse,ofType);indexed.pu sh(node.parentNode);}} if(formula.match(/^\d+$/)){formula=Number(formula);for(var i=0,node;node=nodes[i ];i++) if(node.nodeIndex==formula)results.push(node);}else if(m=formula.match(/^(-?\d*) ?n(([+-])(\d+))?/)){if(m[1]=="-")m[1]=-1;var a=m[1]?Number(m[1]):1;var b=m[2]?Nu mber(m[2]):0;var indices=Selector.pseudos.getIndices(a,b,nodes.length);for(var i =0,node,l=indices.length;node=nodes[i];i++){for(var j=0;j+()\s-]+ \* \[.*?\])+)\s*(, $)/,function(m){expressions.push(m[1].strip());});return expressions;},matchEle ments:function(elements,expression){var matches=$$(expression),h=Selector.handle rs;h.mark(matches);for(var i=0,results=[],element;element=elements[i];i++) if(element._countedByPrototype)results.push(element);h.unmark(matches);return re sults;},findElement:function(elements,expression,index){if(Object.isNumber(expre ssion)){index=expression;expression=false;} return Selector.matchElements(elements,expression '*')[index 0];},findChildEle ments:function(element,expressions){expressions=Selector.split(expressions.join( ','));var results=[],h=Selector.handlers;for(var i=0,l=expressions.length,select or;i1)?h.unique(results):results;}});if(Prototype.Browser.IE){Object.extend (Selector.handlers,{concat:function(a,b){for(var i=0,node;node=b[i];i++) if(node.tagName!=="!")a.push(node);return a;}});} function $$(){return Selector.findChildElements(document,$A(arguments));} var Form={reset:function(form){form=$(form);form.reset();return form;},serialize Elements:function(elements,options){if(typeof options!='object')options={hash:!! options};else if(Object.isUndefined(options.hash))options.hash=true;var key,valu e,submitted=false,submit=options.submit;var data=elements.inject({},function(res ult,element){if(!element.disabled&&element.name){key=element.name;value=$(elemen t).getValue();if(value!=null&&element.type!='file'&&(element.type!='submit' (!s ubmitted&&submit!==false&&(!submit key==submit)&&(submitted=true)))){if(key in result){if(!Object.isArray(result[key]))result[key]=[result[key]];result[key].pu sh(value);} else result[key]=value;}} return result;});return options.hash?data:Object.toQueryString(data);}};Form.Met hods={serialize:function(form,options){return Form.serializeElements(Form.getEle ments(form),options);},getElements:function(form){var elements=$(form).getElemen tsByTagName('*'),element,arr=[],serializers=Form.Element.Serializers;for(var i=0 ;element=elements[i];i++){arr.push(element);} return arr.inject([],function(elements,child){if(serializers[child.tagName.toLow erCase()]) elements.push(Element.extend(child));return elements;})},getInputs:function(form ,typeName,name){form=$(form);var inputs=form.getElementsByTagName('input');if(!t ypeName&&!name)return $A(inputs).map(Element.extend);for(var i=0,matchingInputs= [],length=inputs.length;i=0;}).sortBy(function( element){return element.tabIndex}).first();return firstByIndex?firstByIndex:elem ents.find(function(element){return/^(?:input select textarea)$/i.test(element.ta gName);});},focusFirstElement:function(form){form=$(form);form.findFirstElement( ).activate();return form;},request:function(form,options){form=$(form),options=O bject.clone(options {});var params=options.parameters,action=form.readAttribute ('action') '';if(action.blank())action=window.location.href;options.parameters= form.serialize(true);if(params){if(Object.isString(params))params=params.toQuery Params();Object.extend(options.parameters,params);} if(form.hasAttribute('method')&&!options.method) options.method=form.method;return new Ajax.Request(action,options);}};Form.Eleme nt={focus:function(element){$(element).focus();return element;},select:function( element){$(element).select();return element;}};Form.Element.Methods={serialize:f unction(element){element=$(element);if(!element.disabled&&element.name){var valu e=element.getValue();if(value!=undefined){var pair={};pair[element.name]=value;r eturn Object.toQueryString(pair);}} return'';},getValue:function(element){element=$(element);var method=element.tagN ame.toLowerCase();return Form.Element.Serializers[method](element);},setValue:fu nction(element,value){element=$(element);var method=element.tagName.toLowerCase( );Form.Element.Serializers[method](element,value);return element;},clear:functio n(element){$(element).value='';return element;},present:function(element){return $(element).value!='';},activate:function(element){element=$(element);try{elemen t.focus();if(element.select&&(element.tagName.toLowerCase()!='input' !(/^(?:but ton reset submit)$/i.test(element.type)))) element.select();}catch(e){} return element;},disable:function(element){element=$(element);element.disabled=t rue;return element;},enable:function(element){element=$(element);element.disable d=false;return element;}};var Field=Form.Element;var $F=Form.Element.Methods.get

Value;Form.Element.Serializers={input:function(element,value){switch(element.typ e.toLowerCase()){case'checkbox':case'radio':return Form.Element.Serializers.inpu tSelector(element,value);default:return Form.Element.Serializers.textarea(elemen t,value);}},inputSelector:function(element,value){if(Object.isUndefined(value))r eturn element.checked?element.value:null;else element.checked=!!value;},textarea :function(element,value){if(Object.isUndefined(value))return element.value;else element.value=value;},select:function(element,value){if(Object.isUndefined(value )) return this[element.type=='select-one'?'selectOne':'selectMany'](element);else{v ar opt,currentValue,single=!Object.isArray(value);for(var i=0,length=element.len gth;i=0?this.optionValue(element.options[i ndex]):null;},selectMany:function(element){var values,length=element.length;if(! length)return null;for(var i=0,values=[];i0){this.fontSize=parseF loat(fontSize);this.fontSizeType=fontSizeType;}}.bind(this));this.factor=(this.o ptions.scaleTo-this.options.scaleFrom)/100;this.dims=null;if(this.options.scaleM ode=='box') this.dims=[this.element.offsetHeight,this.element.offsetWidth];if(/^content/.tes t(this.options.scaleMode)) this.dims=[this.element.scrollHeight,this.element.scrollWidth];if(!this.dims) this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.original Width];},update:function(position){var currentScale=(this.options.scaleFrom/100. 0)+(this.factor*position);if(this.options.scaleContent&&this.fontSize) this.element.setStyle({fontSize:this.fontSize*currentScale+this.fontSizeType});t his.setDimensions(this.dims[0]*currentScale,this.dims[1]*currentScale);},finish: function(position){if(this.restoreAfterFinish)this.element.setStyle(this.origina lStyle);},setDimensions:function(height,width){var d={};if(this.options.scaleX)d .width=width.round()+'px';if(this.options.scaleY)d.height=height.round()+'px';if (this.options.scaleFromCenter){var topd=(height-this.dims[0])/2;var leftd=(width -this.dims[1])/2;if(this.elementPositioning=='absolute'){if(this.options.scaleY) d.top=this.originalTop-topd+'px';if(this.options.scaleX)d.left=this.originalLeft -leftd+'px';}else{if(this.options.scaleY)d.top=-topd+'px';if(this.options.scaleX )d.left=-leftd+'px';}} this.element.setStyle(d);}});Effect.Highlight=Class.create(Effect.Base,{initiali ze:function(element){this.element=$(element);if(!this.element)throw(Effect._elem entDoesNotExistError);var options=Object.extend({startcolor:'#ffff99'},arguments [1] {});this.start(options);},setup:function(){if(this.element.getStyle('displa y')=='none'){this.cancel();return;} this.oldStyle={};if(!this.options.keepBackgroundImage){this.oldStyle.backgroundI mage=this.element.getStyle('background-image');this.element.setStyle({background Image:'none'});} if(!this.options.endcolor) this.options.endcolor=this.element.getStyle('background-color').parseColor('#fff fff');if(!this.options.restorecolor) this.options.restorecolor=this.element.getStyle('background-color');this._base=$ R(0,2).map(function(i){return parseInt(this.options.startcolor.slice(i*2+1,i*2+3 ),16)}.bind(this));this._delta=$R(0,2).map(function(i){return parseInt(this.opti ons.endcolor.slice(i*2+1,i*2+3),16)-this._base[i]}.bind(this));},update:function (position){this.element.setStyle({backgroundColor:$R(0,2).inject('#',function(m, v,i){return m+((this._base[i]+(this._delta[i]*position)).round().toColorPart()); }.bind(this))});},finish:function(){this.element.setStyle(Object.extend(this.old Style,{backgroundColor:this.options.restorecolor}));}});Effect.ScrollTo=function (element){var options=arguments[1] {},scrollOffsets=document.viewport.getScroll Offsets(),elementOffsets=$(element).cumulativeOffset();if(options.offset)element Offsets[1]+=options.offset;return new Effect.Tween(null,scrollOffsets.top,elemen tOffsets[1],options,function(p){scrollTo(scrollOffsets.left,p.round());});};Effe ct.Fade=function(element){element=$(element);var oldOpacity=element.getInlineOpa city();var options=Object.extend({from:element.getOpacity() 1.0,to:0.0,afterFin ishInternal:function(effect){if(effect.options.to!=0)return;effect.element.hide( ).setStyle({opacity:oldOpacity});}},arguments[1] {});return new Effect.Opacity( element,options);};Effect.Appear=function(element){element=$(element);var option s=Object.extend({from:(element.getStyle('display')=='none'?0.0:element.getOpacit y() 0.0),to:1.0,afterFinishInternal:function(effect){effect.element.forceRerend ering();},beforeSetup:function(effect){effect.element.setOpacity(effect.options.

from).show();}},arguments[1] {});return new Effect.Opacity(element,options);};E ffect.Puff=function(element){element=$(element);var oldStyle={opacity:element.ge tInlineOpacity(),position:element.getStyle('position'),top:element.style.top,lef t:element.style.left,width:element.style.width,height:element.style.height};retu rn new Effect.Parallel([new Effect.Scale(element,200,{sync:true,scaleFromCenter: true,scaleContent:true,restoreAfterFinish:true}),new Effect.Opacity(element,{syn c:true,to:0.0})],Object.extend({duration:1.0,beforeSetupInternal:function(effect ){Position.absolutize(effect.effects[0].element);},afterFinishInternal:function( effect){effect.effects[0].element.hide().setStyle(oldStyle);}},arguments[1] {}) );};Effect.BlindUp=function(element){element=$(element);element.makeClipping();v ar elementDimensions=element.getDimensions();var m=/(.*?)px/.exec(element.getSty le('height'));var height=m[1]?parseInt(m[1]):elementDimensions.height;return new Effect.Scale(element,0,Object.extend({scaleContent:false,scaleX:false,scaleMode :{originalHeight:height,originalWidth:elementDimensions.width},restoreAfterFinis h:true,afterFinishInternal:function(effect){effect.element.hide().undoClipping() ;}},arguments[1] {}));};Effect.BlindDown=function(element){element=$(element);v ar elementDimensions=element.getDimensions();return new Effect.Scale(element,100 ,Object.extend({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalH eight:elementDimensions.height,originalWidth:elementDimensions.width},restoreAft erFinish:true,afterSetup:function(effect){effect.element.makeClipping().setStyle ({height:'0px'}).show();},afterFinishInternal:function(effect){effect.element.un doClipping();}},arguments[1] {}));};Effect.SwitchOff=function(element){element= $(element);var oldOpacity=element.getInlineOpacity();return new Effect.Appear(el ement,Object.extend({duration:0.4,from:0,transition:Effect.Transitions.flicker,a fterFinishInternal:function(effect){new Effect.Scale(effect.element,1,{duration: 0.3,scaleFromCenter:true,scaleX:false,scaleContent:false,restoreAfterFinish:true ,beforeSetup:function(effect){effect.element.makePositioned().makeClipping();},a fterFinishInternal:function(effect){effect.element.hide().undoClipping().undoPos itioned().setStyle({opacity:oldOpacity});}});}},arguments[1] {}));};Effect.Drop Out=function(element){element=$(element);var oldStyle={top:element.getStyle('top '),left:element.getStyle('left'),opacity:element.getInlineOpacity()};return new Effect.Parallel([new Effect.Move(element,{x:0,y:100,sync:true}),new Effect.Opaci ty(element,{sync:true,to:0.0})],Object.extend({duration:0.5,beforeSetup:function (effect){effect.effects[0].element.makePositioned();},afterFinishInternal:functi on(effect){effect.effects[0].element.hide().undoPositioned().setStyle(oldStyle); }},arguments[1] {}));};Effect.Shake=function(element){element=$(element);var op tions=Object.extend({distance:20,duration:0.5},arguments[1] {});var distance=pa rseFloat(options.distance);var split=parseFloat(options.duration)/10.0;var oldSt yle={top:element.getStyle('top'),left:element.getStyle('left')};return new Effec t.Move(element,{x:distance,y:0,duration:split,afterFinishInternal:function(effec t){new Effect.Move(effect.element,{x:-distance*2,y:0,duration:split*2,afterFinis hInternal:function(effect){new Effect.Move(effect.element,{x:distance*2,y:0,dura tion:split*2,afterFinishInternal:function(effect){new Effect.Move(effect.element ,{x:-distance*2,y:0,duration:split*2,afterFinishInternal:function(effect){new Ef fect.Move(effect.element,{x:distance*2,y:0,duration:split*2,afterFinishInternal: function(effect){new Effect.Move(effect.element,{x:-distance,y:0,duration:split, afterFinishInternal:function(effect){effect.element.undoPositioned().setStyle(ol dStyle);}});}});}});}});}});}});};Effect.SlideDown=function(element){element=$(e lement).cleanWhitespace();var oldInnerBottom=element.down().getStyle('bottom');v ar elementDimensions=element.getDimensions();return new Effect.Scale(element,100 ,Object.extend({scaleContent:false,scaleX:false,scaleFrom:window.opera?0:1,scale Mode:{originalHeight:elementDimensions.height,originalWidth:elementDimensions.wi dth},restoreAfterFinish:true,afterSetup:function(effect){effect.element.makePosi tioned();effect.element.down().makePositioned();if(window.opera)effect.element.s etStyle({top:''});effect.element.makeClipping().setStyle({height:'0px'}).show(); },afterUpdateInternal:function(effect){effect.element.down().setStyle({bottom:(e ffect.dims[0]-effect.element.clientHeight)+'px'});},afterFinishInternal:function (effect){effect.element.undoClipping().undoPositioned();effect.element.down().un doPositioned().setStyle({bottom:oldInnerBottom});}},arguments[1] {}));};Effect. SlideUp=function(element){element=$(element).cleanWhitespace();var oldInnerBotto

m=element.down().getStyle('bottom');var elementDimensions=element.getDimensions( );return new Effect.Scale(element,window.opera?0:1,Object.extend({scaleContent:f alse,scaleX:false,scaleMode:'box',scaleFrom:100,scaleMode:{originalHeight:elemen tDimensions.height,originalWidth:elementDimensions.width},restoreAfterFinish:tru e,afterSetup:function(effect){effect.element.makePositioned();effect.element.dow n().makePositioned();if(window.opera)effect.element.setStyle({top:''});effect.el ement.makeClipping().show();},afterUpdateInternal:function(effect){effect.elemen t.down().setStyle({bottom:(effect.dims[0]-effect.element.clientHeight)+'px'});}, afterFinishInternal:function(effect){effect.element.hide().undoClipping().undoPo sitioned();effect.element.down().undoPositioned().setStyle({bottom:oldInnerBotto m});}},arguments[1] {}));};Effect.Squish=function(element){return new Effect.Sc ale(element,window.opera?1:0,{restoreAfterFinish:true,beforeSetup:function(effec t){effect.element.makeClipping();},afterFinishInternal:function(effect){effect.e lement.hide().undoClipping();}});};Effect.Grow=function(element){element=$(eleme nt);var options=Object.extend({direction:'center',moveTransition:Effect.Transiti ons.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effec t.Transitions.full},arguments[1] {});var oldStyle={top:element.style.top,left:e lement.style.left,height:element.style.height,width:element.style.width,opacity: element.getInlineOpacity()};var dims=element.getDimensions();var initialMoveX,in itialMoveY;var moveX,moveY;switch(options.direction){case'top-left':initialMoveX =initialMoveY=moveX=moveY=0;break;case'top-right':initialMoveX=dims.width;initia lMoveY=moveY=0;moveX=-dims.width;break;case'bottom-left':initialMoveX=moveX=0;in itialMoveY=dims.height;moveY=-dims.height;break;case'bottom-right':initialMoveX= dims.width;initialMoveY=dims.height;moveX=-dims.width;moveY=-dims.height;break;c ase'center':initialMoveX=dims.width/2;initialMoveY=dims.height/2;moveX=-dims.wid th/2;moveY=-dims.height/2;break;} return new Effect.Move(element,{x:initialMoveX,y:initialMoveY,duration:0.01,befo reSetup:function(effect){effect.element.hide().makeClipping().makePositioned();} ,afterFinishInternal:function(effect){new Effect.Parallel([new Effect.Opacity(ef fect.element,{sync:true,to:1.0,from:0.0,transition:options.opacityTransition}),n ew Effect.Move(effect.element,{x:moveX,y:moveY,sync:true,transition:options.move Transition}),new Effect.Scale(effect.element,100,{scaleMode:{originalHeight:dims .height,originalWidth:dims.width},sync:true,scaleFrom:window.opera?1:0,transitio n:options.scaleTransition,restoreAfterFinish:true})],Object.extend({beforeSetup: function(effect){effect.effects[0].element.setStyle({height:'0px'}).show();},aft erFinishInternal:function(effect){effect.effects[0].element.undoClipping().undoP ositioned().setStyle(oldStyle);}},options));}});};Effect.Shrink=function(element ){element=$(element);var options=Object.extend({direction:'center',moveTransitio n:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacit yTransition:Effect.Transitions.none},arguments[1] {});var oldStyle={top:element .style.top,left:element.style.left,height:element.style.height,width:element.sty le.width,opacity:element.getInlineOpacity()};var dims=element.getDimensions();va r moveX,moveY;switch(options.direction){case'top-left':moveX=moveY=0;break;case' top-right':moveX=dims.width;moveY=0;break;case'bottom-left':moveX=0;moveY=dims.h eight;break;case'bottom-right':moveX=dims.width;moveY=dims.height;break;case'cen ter':moveX=dims.width/2;moveY=dims.height/2;break;} return new Effect.Parallel([new Effect.Opacity(element,{sync:true,to:0.0,from:1. 0,transition:options.opacityTransition}),new Effect.Scale(element,window.opera?1 :0,{sync:true,transition:options.scaleTransition,restoreAfterFinish:true}),new E ffect.Move(element,{x:moveX,y:moveY,sync:true,transition:options.moveTransition} )],Object.extend({beforeStartInternal:function(effect){effect.effects[0].element .makePositioned().makeClipping();},afterFinishInternal:function(effect){effect.e ffects[0].element.hide().undoClipping().undoPositioned().setStyle(oldStyle);}},o ptions));};Effect.Pulsate=function(element){element=$(element);var options=argum ents[1] {},oldOpacity=element.getInlineOpacity(),transition=options.transition Effect.Transitions.linear,reverser=function(pos){return 1-transition((-Math.cos ((pos*(options.pulses 5)*2)*Math.PI)/2)+.5);};return new Effect.Opacity(element ,Object.extend(Object.extend({duration:2.0,from:0,afterFinishInternal:function(e ffect){effect.element.setStyle({opacity:oldOpacity});}},options),{transition:rev erser}));};Effect.Fold=function(element){element=$(element);var oldStyle={top:el

ement.style.top,left:element.style.left,width:element.style.width,height:element .style.height};element.makeClipping();return new Effect.Scale(element,5,Object.e xtend({scaleContent:false,scaleX:false,afterFinishInternal:function(effect){new Effect.Scale(element,1,{scaleContent:false,scaleY:false,afterFinishInternal:func tion(effect){effect.element.hide().undoClipping().setStyle(oldStyle);}});}},argu ments[1] {}));};Effect.Morph=Class.create(Effect.Base,{initialize:function(elem ent){this.element=$(element);if(!this.element)throw(Effect._elementDoesNotExistE rror);var options=Object.extend({style:{}},arguments[1] {});if(!Object.isString (options.style))this.style=$H(options.style);else{if(options.style.include(':')) this.style=options.style.parseStyle();else{this.element.addClassName(options.sty le);this.style=$H(this.element.getStyles());this.element.removeClassName(options .style);var css=this.element.getStyles();this.style=this.style.reject(function(s tyle){return style.value==css[style.key];});options.afterFinishInternal=function (effect){effect.element.addClassName(effect.options.style);effect.transforms.eac h(function(transform){effect.element.style[transform.style]='';});};}} this.start(options);},setup:function(){function parseColor(color){if(!color ['r gba(0, 0, 0, 0)','transparent'].include(color))color='#ffffff';color=color.parse Color();return $R(0,2).map(function(i){return parseInt(color.slice(i*2+1,i*2+3), 16);});} this.transforms=this.style.map(function(pair){var property=pair[0],value=pair[1] ,unit=null;if(value.parseColor('#zzzzzz')!='#zzzzzz'){value=value.parseColor();u nit='color';}else if(property=='opacity'){value=parseFloat(value);if(Prototype.B rowser.IE&&(!this.element.currentStyle.hasLayout)) this.element.setStyle({zoom:1});}else if(Element.CSS_LENGTH.test(value)){var com ponents=value.match(/^([\+\-]?[0-9\.]+)(.*)$/);value=parseFloat(components[1]);u nit=(components.length==3)?components[2]:null;} var originalValue=this.element.getStyle(property);return{style:property.camelize (),originalValue:unit=='color'?parseColor(originalValue):parseFloat(originalValu e 0),targetValue:unit=='color'?parseColor(value):value,unit:unit};}.bind(this)) .reject(function(transform){return((transform.originalValue==transform.targetVal ue) (transform.unit!='color'&&(isNaN(transform.originalValue) isNaN(transform. targetValue))));});},update:function(position){var style={},transform,i=this.tra nsforms.length;while(i--) style[(transform=this.transforms[i]).style]=transform.unit=='color'?'#'+ (Math.round(transform.originalValue[0]+ (transform.targetValue[0]-transform.originalValue[0])*position)).toColorPart()+ (Math.round(transform.originalValue[1]+ (transform.targetValue[1]-transform.originalValue[1])*position)).toColorPart()+ (Math.round(transform.originalValue[2]+ (transform.targetValue[2]-transform.originalValue[2])*position)).toColorPart():( transform.originalValue+ (transform.targetValue-transform.originalValue)*position).toFixed(3)+ (transform.unit===null?'':transform.unit);this.element.setStyle(style,true);}}); Effect.Transform=Class.create({initialize:function(tracks){this.tracks=[];this.o ptions=arguments[1] {};this.addTracks(tracks);},addTracks:function(tracks){trac ks.each(function(track){track=$H(track);var data=track.values().first();this.tra cks.push($H({ids:track.keys().first(),effect:Effect.Morph,options:{style:data}}) );}.bind(this));return this;},play:function(){return new Effect.Parallel(this.tr acks.map(function(track){var ids=track.get('ids'),effect=track.get('effect'),opt ions=track.get('options');var elements=[$(ids) $$(ids)].flatten();return elemen ts.map(function(e){return new effect(e,Object.extend({sync:true},options))});}). flatten(),this.options);}});Element.CSS_PROPERTIES=$w('backgroundColor backgroun dPosition borderBottomColor borderBottomStyle '+'borderBottomWidth borderLeftCol or borderLeftStyle borderLeftWidth '+'borderRightColor borderRightStyle borderRi ghtWidth borderSpacing '+'borderTopColor borderTopStyle borderTopWidth bottom cl ip color '+'fontSize fontWeight height left letterSpacing lineHeight '+'marginBo ttom marginLeft marginRight marginTop markerOffset maxHeight '+'maxWidth minHeig ht minWidth opacity outlineColor outlineOffset '+'outlineWidth paddingBottom pad dingLeft paddingRight paddingTop '+'right textIndent top width wordSpacing zInde x');Element.CSS_LENGTH=/^(([\+\-]?[0-9\.]+)(em ex px in cm mm pt pc \%)) 0$/;Str

ing.__parseStyleElement=document.createElement('div');String.prototype.parseStyl e=function(){var style,styleRules=$H();if(Prototype.Browser.WebKit) style=new Element('div',{style:this}).style;else{String.__parseStyleElement.inne rHTML='';style=String.__parseStyleElement.childNodes [0].style;} Element.CSS_PROPERTIES.each(function(property){if(style[property])styleRules.set (property,style[property]);});if(Prototype.Browser.IE&&this.include('opacity')) styleRules.set('opacity',this.match(/opacity:\s*((?:0 1)?(?:\.\d*)?)/)[1]);retur n styleRules;};if(document.defaultView&&document.defaultView.getComputedStyle){E lement.getStyles=function(element){var css=document.defaultView.getComputedStyle ($(element),null);return Element.CSS_PROPERTIES.inject({},function(styles,proper ty){styles[property]=css[property];return styles;});};}else{Element.getStyles=fu nction(element){element=$(element);var css=element.currentStyle,styles;styles=El ement.CSS_PROPERTIES.inject({},function(results,property){results[property]=css[ property];return results;});if(!styles.opacity)styles.opacity=element.getOpacity ();return styles;};} Effect.Methods={morph:function(element,style){element=$(element);new Effect.Morp h(element,Object.extend({style:style},arguments[2] {}));return element;},visual Effect:function(element,effect,options){element=$(element);var s=effect.dasheriz e().camelize(),klass=s.charAt(0).toUpperCase()+s.substring(1);new Effect[klass]( element,options);return element;},highlight:function(element,options){element=$( element);new Effect.Highlight(element,options);return element;}};$w('fade appear grow shrink fold blindUp blindDown slideUp slideDown '+'pulsate shake puff squi sh switchOff dropOut').each(function(effect){Effect.Methods[effect]=function(ele ment,options){element=$(element);Effect[effect.charAt(0).toUpperCase()+effect.su bstring(1)](element,options);return element;};});$w('getInlineOpacity forceReren dering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles').e ach(function(f){Effect.Methods[f]=Element[f];});Element.addMethods(Effect.Method s); /* public/javascripts/slider.js @ 1319142822 */ if(!Control)var Control={};Control.Slider=Class.create({initialize:function(hand le,track,options){var slider=this;if(Object.isArray(handle)){this.handles=handle .collect(function(e){return $(e)});}else{this.handles=[$(handle)];} this.track=$(track);this.options=options {};this.axis=this.options.axis 'horiz ontal';this.increment=this.options.increment 1;this.step=parseInt(this.options. step '1');this.range=this.options.range $R(0,1);this.value=0;this.values=this. handles.map(function(){return 0});this.spans=this.options.spans?this.options.spa ns.map(function(s){return $(s)}):false;this.options.startSpan=$(this.options.sta rtSpan null);this.options.endSpan=$(this.options.endSpan null);this.restricted =this.options.restricted false;this.maximum=this.options.maximum this.range.en d;this.minimum=this.options.minimum this.range.start;this.alignX=parseInt(this. options.alignX '0');this.alignY=parseInt(this.options.alignY '0');this.trackLe ngth=this.maximumOffset()-this.minimumOffset();this.handleLength=this.isVertical ()?(this.handles[0].offsetHeight!=0?this.handles[0].offsetHeight:this.handles[0] .style.height.replace(/px$/,"")):(this.handles[0].offsetWidth!=0?this.handles[0] .offsetWidth:this.handles[0].style.width.replace(/px$/,""));this.active=false;th is.dragging=false;this.disabled=false;if(this.options.disabled)this.setDisabled( );this.allowedValues=this.options.values?this.options.values.sortBy(Prototype.K) :false;if(this.allowedValues){this.minimum=this.allowedValues.min();this.maximum =this.allowedValues.max();} this.eventMouseDown=this.startDrag.bindAsEventListener(this);this.eventMouseUp=t his.endDrag.bindAsEventListener(this);this.eventMouseMove=this.update.bindAsEven tListener(this);this.handles.each(function(h,i){i=slider.handles.length-1-i;slid er.setValue(parseFloat((Object.isArray(slider.options.sliderValue)?slider.option s.sliderValue[i]:slider.options.sliderValue) slider.range.start),i);h.makePosit ioned().observe("mousedown",slider.eventMouseDown);});this.track.observe("moused own",this.eventMouseDown);document.observe("mouseup",this.eventMouseUp);document

.observe("mousemove",this.eventMouseMove);this.initialized=true;},dispose:functi on(){var slider=this;Event.stopObserving(this.track,"mousedown",this.eventMouseD own);Event.stopObserving(document,"mouseup",this.eventMouseUp);Event.stopObservi ng(document,"mousemove",this.eventMouseMove);this.handles.each(function(h){Event .stopObserving(h,"mousedown",slider.eventMouseDown);});},setDisabled:function(){ this.disabled=true;},setEnabled:function(){this.disabled=false;},getNearestValue :function(value){if(this.allowedValues){if(value>=this.allowedValues.max())retur n(this.allowedValues.max());if(value1?this.getRange(this.spa ns.length-1).max():this.value,this.maximum));},setSpan:function(span,range){if(t his.isVertical()){span.style.top=this.translateToPx(range.start);span.style.heig ht=this.translateToPx(range.end-range.start+this.range.start);}else{span.style.l eft=this.translateToPx(range.start);span.style.width=this.translateToPx(range.en d-range.start+this.range.start);}},updateStyles:function(){this.handles.each(fun ction(h){Element.removeClassName(h,'selected')});Element.addClassName(this.activ eHandle,'selected');},startDrag:function(event){if(Event.isLeftClick(event)){if( !this.disabled){this.active=true;var handle=Event.element(event);var pointer=[Ev ent.pointerX(event),Event.pointerY(event)];var track=handle;if(track==this.track ){var offsets=this.track.cumulativeOffset();this.event=event;this.setValue(this. translateToValue((this.isVertical()?pointer[1]-offsets[1]:pointer[0]-offsets[0]) -(this.handleLength/2)));var offsets=this.activeHandle.cumulativeOffset();this.o ffsetX=(pointer[0]-offsets[0]);this.offsetY=(pointer[1]-offsets[1]);}else{while( (this.handles.indexOf(handle)==-1)&&handle.parentNode) handle=handle.parentNode;if(this.handles.indexOf(handle)!=-1){this.activeHandle= handle;this.activeHandleIdx=this.handles.indexOf(this.activeHandle);this.updateS tyles();var offsets=this.activeHandle.cumulativeOffset();this.offsetX=(pointer[0

]-offsets[0]);this.offsetY=(pointer[1]-offsets[1]);}}} Event.stop(event);}},update:function(event){if(this.active){if(!this.dragging)th is.dragging=true;this.draw(event);if(Prototype.Browser.WebKit)window.scrollBy(0, 0);Event.stop(event);}},draw:function(event){var pointer=[Event.pointerX(event), Event.pointerY(event)];var offsets=this.track.cumulativeOffset();pointer[0]-=thi s.offsetX+offsets[0];pointer[1]-=this.offsetY+offsets[1];this.event=event;this.s etValue(this.translateToValue(this.isVertical()?pointer[1]:pointer[0]));if(this. initialized&&this.options.onSlide) this.options.onSlide(this.values.length>1?this.values:this.value,this);},endDrag :function(event){if(this.active&&this.dragging){this.finishDrag(event,true);Even t.stop(event);} this.active=false;this.dragging=false;},finishDrag:function(event,success){this. active=false;this.dragging=false;this.updateFinished();},updateFinished:function (){if(this.initialized&&this.options.onChange) this.options.onChange(this.values.length>1?this.values:this.value,this);this.eve nt=null;}}); /* public/javascripts/swfobject.js @ 1319142822 */ if(typeof deconcept=="undefined")var deconcept=new Object();if(typeof deconcept. util=="undefined")deconcept.util=new Object();if(typeof deconcept.SWFObjectUtil= ="undefined")deconcept.SWFObjectUtil=new Object();deconcept.SWFObject=function(s wf,id,w,h,ver,c,useExpressInstall,quality,xiRedirectUrl,redirectUrl,detectKey){i f(!document.getElementById){return;} this.DETECT_KEY=detectKey?detectKey:'detectflash';this.skipDetect=deconcept.util .getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=ne w Object();this.attributes=new Array();if(swf){this.setAttribute('swf',swf);} if(id){this.setAttribute('id',id);} if(w){this.setAttribute('width',w);} if(h){this.setAttribute('height',h);} if(ver){this.setAttribute('version',new deconcept.PlayerVersion(ver.toString().s plit(".")));} this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(c){this.addParam ('bgcolor',c);} var q=quality?quality:'high';this.addParam('quality',q);this.setAttribute('useEx pressInstall',useExpressInstall);this.setAttribute('doExpressInstall',false);var xir=(xiRedirectUrl)?xiRedirectUrl:window.location;this.setAttribute('xiRedirect Url',xir);this.setAttribute('redirectUrl','');if(redirectUrl){this.setAttribute( 'redirectUrl',redirectUrl);}} deconcept.SWFObject.prototype={setAttribute:function(name,value){this.attributes [name]=value;},getAttribute:function(name){return this.attributes[name];},addPar am:function(name,value){this.params[name]=value;},getParams:function(){return th is.params;},addVariable:function(name,value){this.variables[name]=value;},getVar iable:function(name){return this.variables[name];},getVariables:function(){retur n this.variables;},getVariablePairs:function(){var variablePairs=new Array();var key;var variables=this.getVariables();for(key in variables){variablePairs.push( key+"="+variables[key]);} return variablePairs;},getSWFHTML:function(){var swfNode="";if(navigator.plugins &&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpre ssInstall")){this.addVariable("MMplayerType","PlugIn");} swfNode='';}else{if(this.getAttribute("doExpressInstall")){this.addVariable(" MMplayerType","ActiveX");}

swfNode='';swfNode+='';var params=this.getParams();for(var key in params){swfNode+='';} var pairs=this.getVariablePairs().join("&");if(pairs.length>0){swfNode+='';} swfNode+="";} return swfNode;},write:function(elementId){if(this.getAttribute('useExpressInsta ll')){var expressInstallReqVer=new deconcept.PlayerVersion([6,0,65]);if(this.ins talledVer.versionIsValid(expressInstallReqVer)&&!this.installedVer.versionIsVali d(this.getAttribute('version'))){this.setAttribute('doExpressInstall',true);this .addVariable("MMredirectURL",escape(this.getAttribute('xiRedirectUrl')));documen t.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariab le("MMdoctitle",document.title);}} if(this.skipDetect this.getAttribute('doExpressInstall') this.installedVer.ver sionIsValid(this.getAttribute('version'))){var n=(typeof elementId=='string')?do cument.getElementById(elementId):elementId;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute('redirectUrl')!=""){document.location.replace(th is.getAttribute('redirectUrl'));}} return false;}} deconcept.SWFObjectUtil.getPlayerVersion=function(){var PlayerVersion=new deconc ept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){PlayerVersion=new d econcept.PlayerVersion(x.description.replace(/([a-zA-Z] \s)+/,"").replace(/(\s+r \s+b[0-9]+)/,".").split("."));}}else{try{var axo=new ActiveXObject("ShockwaveFl ash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.S hockwaveFlash.6");PlayerVersion=new deconcept.PlayerVersion([6,0,21]);axo.AllowS criptAccess="always";}catch(e){if(PlayerVersion.major==6){return PlayerVersion;} } try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}} if(axo!=null){PlayerVersion=new deconcept.PlayerVersion(axo.GetVariable("$versio n").split(" ")[1].split(","));}} return PlayerVersion;} deconcept.PlayerVersion=function(arrVersion){this.major=arrVersion[0]!=null?pars eInt(arrVersion[0]):0;this.minor=arrVersion[1]!=null?parseInt(arrVersion[1]):0;t his.rev=arrVersion[2]!=null?parseInt(arrVersion[2]):0;} deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.majorfv.major)return true;if(this.minorfv.minor)return true;if(this.revmaxThumbWidth){width_delta=width-maxThumbWidth;thumb.styl e.width=maxThumbWidth+"px";thumb.style.height=Math.round((thumb.getWidth()/width )*height)+"px";}};function show_explore(tab){if(tab=='tags'){$('explore_tags').s tyle.display='block';$('explore_categories').style.display='none';$('explore_tab _tags').addClassName('current');$('explore_tab_categories').removeClassName('cur rent');}else{$('explore_tags').style.display='none';$('explore_categories').styl e.display='block';$('explore_tab_tags').removeClassName('current');$('explore_ta b_categories').addClassName('current');}} function nextLightbox(curId){if(document.getElementById("alert_lightbox_"+(curId +1))){Scribd.Lightbox.open("alert_lightbox_"+(curId+1));}} function removeDocumentFromGroup(id,link){$(id).addClassName('notice_fluid');$(i d).addClassName('no_clear');$(id).innerHTML='Successfully Re moved '+link+' from Group';} function trackEvent(category,action,label,value){try{_gaq.push(['_trackEvent',ca tegory,action,label,value]);Scribd.log('GA trackEvent: '+category+', '+action+', '+label+', '+value);}catch(ohNo){}} function dateNowString(offset){var d=new Date();if(offset)d.setDate(d.getDate()+ offset);return(d.getMonth()+1)+"/"+(d.getDate()+1)+"/"+d.getFullYear();} function previousMonthString(){var d=new Date();var month=d.getMonth();var year= d.getFullYear();if(month==0){month=12;year-=1;} return month+"/"+year;} function enableButton(button){if($(button)){$(button).disabled=false;$(button).r emoveClassName('button_disabled');}} function disableButton(button){if($(button)){$(button).disabled=true;$(button).a ddClassName('button_disabled');}} Scribd.carouselLazyLoad=function(carousel){function callback(force){var currentI ndex=(this.current)?this.current._index:0;var nextItem=(this.slides.length-1==cu rrentIndex)?(this.options.circular?0:currentIndex):currentIndex+1;var item=(forc e)?carousel.slides[0]:carousel.slides[nextItem];if(item&&!item.readAttribute('im agesloaded')){item.select('a').each(function(a){var orig=a.readAttribute('orig') ;if(orig){a.style.backgroundImage='url('+a.readAttribute('orig')+')';a.writeAttr ibute('orig','');}});item.writeAttribute('imagesloaded','true');} return true;} callback.call(carousel,true);carousel.options.beforeMove=callback.bind(carousel, false);}

/* public/javascripts/lightbox.js @ 1319142822 */ if(!window.Scribd)var Scribd=new Object();Scribd.Lightbox=(function(){var scroll Height=function(){var h=window.pageYOffset document.body.scrollTop document.do cumentElement.scrollTop;return h?h:0;};var center=function(id,topOffset){if(type of topOffset=="undefined"){topOffset=0;} if((id=='toolbar_download_lightbox') (id=='toolbar_print_lightbox') (id=='prem ium_download') (id=='premium_credit_card_flow')){var container=$('viewer') $(' content_wrap');c_w=container.getWidth();c_offsets=container.cumulativeOffset();c _left_offset=c_offsets[0];el_w=$(id).getWidth();left=c_left_offset+Math.round((c _w-el_w)/2);}else{el_w=$(id).getWidth();view_w=document.viewport.getWidth();left =Math.round((view_w-el_w)/2);} if(left0){if(arguments[0].nodeName typeof arguments[0]=="string") children=arguments;else{attrs=arguments[0];children=Array.prototype.slice.call(a rguments,1);};} return DOM.Builder.create(tag,attrs,children);};},create:function(tag,attrs,chil dren){attrs=attrs {};children=children [];tag=tag.toLowerCase();var el=new Ele ment(tag,attrs);for(var i=0;i a:click':functio n(e){e.stop();var li=e.findElement('li');var dropdown=li.down('.dropdown');if(Sc ribd.openDropDown&&Scribd.openDropDown!=li){Scribd.openDropDown.removeClassName( 'open');Scribd.openDropDown=null;} if(dropdown){if(!li.hasClassName('open')){li.addClassName('open');Scribd.openDro pDown=li;}else if(!Scribd.menuOver){li.removeClassName('open');Scribd.openDropDo wn=null;}}},'.truncated_text .truncated_more:click':function(e){this.up('.trunca ted_short').hide();this.up('.truncated_short').up('.truncated_text').down('.trun cated_long').show();},'.truncated_text .truncated_less:click':function(e){this.u p('.truncated_long').hide();this.up('.truncated_long').up('.truncated_text').dow n('.truncated_short').show();},'.embed_code_title_toggle:click':function(e){if(t his.checked){$(this.id+'title').show();$(this.id+'notitle').hide();}else{$(this. id+'title').hide();$(this.id+'notitle').show();}},'ul.nav_list_lined li.expanded :mouseover':function(e){this.addClassName('expanded_hover');},'ul.nav_list_lined li.expanded:mouseout':function(e){this.removeClassName('expanded_hover');},'ul. subcategories:mouseover':function(e){e.stop();},'.autogen_class_views_shared_con tainers_revealer .revealer:mouseover':function(e){this.down('a').removeClassName ('plus').addClassName('plus_active');this.down('.show_more').show();if(this.down ('.see_all_link')){this.down('.see_all_link').show();}},'.autogen_class_views_sh ared_containers_revealer .revealer:mouseout':function(e){this.down('a').addClass Name('plus').removeClassName('plus_active');this.down('.show_more').hide();if(th is.down('.see_all_link')){this.down('.see_all_link').hide();}},'.autogen_class_v iews_shared_containers_revealer .revealer:click':function(e){if(!e.element().has

ClassName('see_all_link')){this.hide();this.up('.autogen_class_views_shared_cont ainers_revealer').down('.to_reveal').show();}},'.autogen_class_views_shared_cont ainers_revealer .less:click':function(e){this.up('.to_reveal').hide();},'#homepa ge_login_tab_link:click':function(e){$('homepage_login').show();$('homepage_sign up').hide();$('homepage_signup_tab_link').removeClassName('signup_active');$('ho mepage_signup_tab_link').addClassName('signup_inactive');$('homepage_login_tab_l ink').removeClassName('login_inactive');$('homepage_login_tab_link').addClassNam e('login_active');},'#homepage_signup_tab_link:click':function(e){$('homepage_lo gin').hide();$('homepage_signup').show();$('homepage_signup_tab_link').addClassN ame('signup_active');$('homepage_signup_tab_link').removeClassName('signup_inact ive');$('homepage_login_tab_link').addClassName('login_inactive');$('homepage_lo gin_tab_link').removeClassName('login_active');},'.horizontal_carousel_arrows .l eft_arrow img:mouseover':function(e){this.src=Scribd.cdn_path+"images/homepage/c arousel_arrow_left_active.gif";},'.horizontal_carousel_arrows .left_arrow img:mo useout':function(e){this.src=Scribd.cdn_path+"images/homepage/carousel_arrow_lef t.gif";},'.horizontal_carousel_arrows .right_arrow img:mouseover':function(e){th is.src=Scribd.cdn_path+"images/homepage/carousel_arrow_right_active.gif";},'.hor izontal_carousel_arrows .right_arrow img:mouseout':function(e){this.src=Scribd.c dn_path+"images/homepage/carousel_arrow_right.gif";},'.document_event_in_timelin e_container:mouseenter,.document_event_container:mouseenter,.event_reply_contain er:mouseenter':function(e){Scribd.documentTimelineEvents.mouseover.call(this,e); },'.document_event_in_timeline_container:mouseleave,.document_event_container:mo useleave,.event_reply_container:mouseleave':function(e){Scribd.documentTimelineE vents.mouseout.call(this,e,false);},'.document_event_children:mouseleave':functi on(e){Scribd.documentTimelineEvents.mouseReEnter.call(this,e);},'#select_all_sug gested_users:click':function(e){if(document.suggested_users_form) {count=document.suggested_users_form.elements.length;for(i=0;i=1){element.removeChild(element.firstChild);}} element.appendChild(container);} else {element.innerHTML=embedString;} var __this=this;window["_scribd_event_handler_"+embedName]=function(eventType){_ _this.__handleEvent(eventType)};var onSetupJsApi=function(e) {var e=e {};var target=e.srcElement document.getElementsByName(embedName)[0];i f(target.getAttribute('name')==embedName) {__this.api=target;var i,method,callParams,rejectedCalls=[];for(var i=0;i0){versionRevision=versionRevision.substring(0,versionRe vision.indexOf("d"));}} var flashVer=versionMajor+"."+versionMinor+"."+versionRevision;}} else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1)flashVer=4;el se if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1)flashVer=3;else if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1)flashVer=2;else if(is IE&&isWin&&!isOpera){flashVer=this.ControlVersion();} return flashVer;};this.DetectFlashVer=function(reqMajorVer,reqMinorVer,reqRevisi on) {versionStr=this.GetSwfVer();if(versionStr==-1){return false;}else if(versionStr !=0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempAr ray[1];versionArray=tempString.split(",");}else{versionArray=versionStr.split(". ");} var versionMajor=versionArray[0];var versionMinor=versionArray[1];var versionRev ision=versionArray[2];if(versionMajor>parseFloat(reqMajorVer)){return true;}else if(versionMajor==parseFloat(reqMajorVer)){if(versionMinor>parseFloat(reqMinorVe r)) return true;else if(versionMinor==parseFloat(reqMinorVer)){if(versionRevision>=p arseFloat(reqRevision)) return true;}} return false;}};this.AC_AddExtension=function(src,ext) {if(src.indexOf('?')!=-1) return src.replace(/\?/,ext+'?');else return src+ext;};this.Mod_AC_Generateobj=function(objAttrs,params,embedAttrs) {var str='';if(isIE&&isWin&&!isOpera) {str+='';for(var i in params) {str+=' ';} str+='';} else

{str+=' ';} return str;};this.Mod_AC_FL_RunContent=function(){var ret=this.Mod_AC_GetArgs(ar guments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application /x-shockwave-flash");return this.Mod_AC_Generateobj(ret.objAttrs,ret.params,ret. embedAttrs);} this.Mod_AC_SW_RunContent=function(){var ret=this.Mod_AC_GetArgs (arguments,".dcr","src","clsid:166B1BCA-3F9C-11CF-8075-444553540000",null);retur n this.Mod_AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);};this.Mod_AC_ GetArgs=function(args,ext,srcParamName,classid,mimeType){var ret=new Object();re t.embedAttrs=new Object();ret.params=new Object();ret.objAttrs=new Object();for( var i=0;i0){this.ipaper_height+=height_extra;}},set_view_containe r:function(){$('view_container').style.width=this.view_container+'px';},set_view _main:function(){$('view_main').style.width=this.view_main+'px';},set_view_meta: function(){$('view_meta').style.width=this.view_main+'px';},set_full_width_mode: function(state){if(state){if(!this.full_width_mode){$('view_main').style.width=t his.view_container+'px';$('embedded_flash').firstDescendant().width=this.view_co ntainer;this.full_width_mode=true;}}else{if(this.full_width_mode){this.set_view_ main();$('embedded_flash').firstDescendant().width=this.view_main;this.full_widt h_mode=false;}}}});var wildfire_intialized=false;function update_document_view(d ocId){url='/word/document_update/'+docId;if(document.referrer){url+="?referer="+ encodeURIComponent(document.referrer);} new Ajax.Request(url,{asynchronous:true,evalScripts:true});} function setRatingBox(currentAverage,currentCount,currentRating,locked){var opti ons={buttons:5,className:'pointy',max:5,stars:5};if(currentRating!=null){options ['rated']=currentRating;options['rerate']=true;} if(currentCount!=null){options['total']=currentCount;} if(locked!=null){options['locked']=locked;} var rating=$('rating');if(rating){new Starbox(rating,currentAverage,options);ena bleRating();}}

Scribd.setTitleEditEvents=function(){$('doc_title_text').observe('mouseover',fun ction(e){this.addClassName('highlight');});$('doc_title_text').observe('mouseout ',function(e){this.removeClassName('highlight');});$('doc_title_text').observe(' click',function(e){$('doc_title_display').hide();$('doc_title_edit').show();});} Scribd.setDocInfoReveal=function(){$('metadata-about').select('.revealer').invok e('observe','click',function(){$('document_description_short').hide();});$('meta data-about').down('.to_reveal .less').observe('click',function(){$('document_des cription_short').show();$('metadata-about').down('.revealer').show();});} Scribd.documentEditForm=Class.create({initialize:function(){this.show_edit=$('do cinfo_tabs').down('.show_edit');this.cancel_edit=$('docinfo_tabs').down('.cancel _edit');this.revealer_link=$('metadata-about').down('.revealer');this.to_reveal= $('docinfo_wrapper').down('.to_reveal');this.edit_field_containers=$('document_d escription_edit_field','document_tags_edit_form','document_category_edit_form'); this.edit_view_containers=$$('#document_description_full > p, #document_tags_vie w > p, #document_category_view');this.form_footer=$('metadata-about').down('.for m_footer');this.spinner=this.form_footer.down('.spinner');this.doc_desc_short=$( 'document_description_short');this.uneditable=$$('.uneditable');this.doc_edit_op en=false;this.cancel_edit.observe('click',this.cancelEdit.bindAsEventListener(th is));this.form_footer.down('.cancel_edit').observe('click',this.cancelEdit.bindA sEventListener(this));this.show_edit.observe('click',this.startEdit.bindAsEventL istener(this));$('document_edit_form').observe('submit',this.submit.bindAsEventL istener(this));},submit:function(e){e.stop();var form=e.element();var params=For m.serializeElements($$('#document_description, #tags'),true);var cats=Form.seria lizeElements($$('#document_category_edit_form select'),true);if(Object.values(ca ts).size()>0){var category_id=("document[child_category_id]"in cats)?cats['docum ent[child_category_id]']:cats['document[top_category_id]'];params['category_id'] =category_id;} this.spinner.show();new Ajax.Request(form.action,{method:form.method,parameters: Object.toQueryString(params),onSuccess:function(){[this.spinner,this.cancel_edit ,this.show_edit,this.form_footer].invoke('toggle');Scribd.doc_edit_open=false;th is.edit_field_containers=$('document_description_edit_field','document_tags_edit _form','document_category_edit_form');this.edit_view_containers=$$('#document_de scription_full > p, #document_tags_view > p, #document_category_view');}.bind(th is)});},startEdit:function(e){e.stop();[this.to_reveal,this.form_footer,this.can cel_edit].concat(this.edit_field_containers).invoke('show');[this.revealer_link, this.show_edit,this.doc_desc_short,this.to_reveal.down('.less')].concat(this.edi t_view_containers,this.uneditable).invoke('hide');if($('doc_edit_undo')) $('doc_edit_undo').hide();if(!$('metadata-about').visible()&&!!window.metadata_t abs) metadata_tabs.activateTab($$('#docinfo_tabs li a[href~=#about]').first());this.d oc_edit_open=true;},cancelEdit:function(e){[this.to_reveal,this.form_footer,this .cancel_edit].concat(this.edit_field_containers).invoke('hide');[this.doc_desc_s hort,this.revealer_link,this.show_edit,this.to_reveal.down('.less')].concat(this .edit_view_containers,this.uneditable).invoke('show');this.doc_edit_open=false;S cribd.Remote.Link(e,{method:'get',onComplete:function(req){this.edit_field_conta iners=$('document_description_edit_field','document_tags_edit_form','document_ca tegory_edit_form');this.edit_view_containers=$$('#document_description_full > p, #document_tags_view > p, #document_category_view');}.bind(this)});}});Scribd.ge tMoreComments=function(e,id,page,extras){var url='/documents/'+id+'/comments?pag e='+page;extras=extras {};new Ajax.Request(url,{method:'get',parameters:extras, onComplete:function(req){var revealer=$('more_comments_container_'+page).down('. revealer');if(revealer) revealer.observe('click',Scribd.getMoreComments.bindAsEventListener(revealer,id, page+1,extras));document.fire('scribd:dom_height_changed');}});} Scribd.referrerIsGoogleSearch=function(){return document.referrer&&document.refe rrer.indexOf('www.google')>-1;} Scribd.referrerIsOtherSearch=function(){if(document.referrer){var engines=['bing .com','aol.com','ask.com','yahoo.com'];for(e in engines){if(document.referrer.in dexOf(engines[e])>-1)return true;}} return false;}

Scribd.staticLoadScript=function(url){document.write('');} Scribd.showICComplete=function(container,tmpl){container=$(container);var nag_up date=function(req){container.insert({top:req.responseText});container.fire('Scri bd:dom_updated');Scribd.Facebook.getSharedFriends(container.down('.nag .facebook _friends'),6,tmpl,function(){new Effect.Appear(container.down('.nag'));});contai ner.down('#finish_signup').observe('click',Scribd.Facebook.upgradeAccount);conta iner.down('.dismiss a').observe('click',Scribd.Remote.Link.bindAsEventListener(c ontainer.down('.dismiss a'),{onCreate:function(){container.down('.nag').hide();} }));};new Ajax.Request('/nags?nag=complete_account',{method:'get',onComplete:nag _update});} /* public/javascripts/wildfire_wfapiv2.js @ 1319142822 */ if(typeof Wildfire=='undefined'){Wildfire=new Object();Wildfire.LinkedLoading=tr ue;Wildfire._pixeIframeCreated=false;Wildfire._NextZIndex=1000;} Wildfire.Flash={isIE:(navigator.appVersion.indexOf("MSIE")!=-1)?true:false,isWin :(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false,isOpera:(nav igator.userAgent.indexOf("Opera")!=-1)?true:false,getFlashVersion:function(){var version=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator .plugins["Shockwave Flash"]){var flashDescription=navigator.plugins["Shockwave F lash"].description;if(flashDescription!=null){version=flashDescription.split(" " )[2].split(".")[0];}}} else if(this.isIE&&this.isWin&&!this.isOpera){try{var axo=new ActiveXObject("Sho ckwaveFlash.ShockwaveFlash.7");var flashDescription=axo.GetVariable("$version"); }catch(e){} if(flashDescription!=null){version=flashDescription.split(" ")[1].split(",")[0]; }} return version;},AC_Generateobj:function(objAttrs,params,embedAttrs){var str=''; if(this.isIE&&this.isWin&&!this.isOpera){str+='';for(var i in params){str+=' ';} str+='';} else{str+=' ';} return str;},AC_FL_GetContent:function(){var ret=this.AC_GetArgs(arguments);retu rn this.AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);},AC_GetArgs:func tion(args,classid,mimeType){var ret={};ret.embedAttrs={};ret.params={};ret.objAt trs={};for(var i=0;imiddlePointLeft){dst.left=''+(btnPos.left+btnDiv.width-w)+'px';}e lse{dst.left=''+btnPos.left+'px';} dst.width=''+w+'px';dst.height=''+h+'px';progressDiv.style.position='absolute';p rogressDiv.style.background='url('+progressImageSrc+') no-repeat center center'; progressDiv.style.width=dst.width;progressDiv.style.height=dst.height;progressDi v.style.top=dst.top;progressDiv.style.left=dst.left;var ifrel=document.getElemen tById('gigya_ifr_'+id);if(ifrel!=null){ifrel.style.top=dst.top;ifrel.style.left= dst.left;ifrel.style.width=dst.width;ifrel.style.height=dst.height;} Wildfire._HandleEmbedAndObjectsBelow(wfDiv,w,h);} Wildfire._showWildfirePopup=function(partner,width,height,configID){var divID='w ildfire_postDiv_'+configID;var btnDiv=document.getElementById('Wildfire_Button'+ configID);var popDiv=Wildfire._GetContainer(divID);if(popDiv==null popDiv.style .visibility=='hidden'){Wildfire._preparePopup(width,height,divID,btnDiv,'http:// cdn.gigya.com/WildFire/i/progress_ani.gif');Wildfire.initPost(partner,divID,widt h,height,Wildfire._popupConfigs[configID]);}} Wildfire.revealDiv=function(divID,maxHeight){var div=document.getElementById(div ID);var nextHeight=parseInt(div.style.height.replace('px',''))+20;if(nextHeight< maxHeight){var ifrel=document.getElementById('gigya_ifr_'+divID);div.style.heigh t=nextHeight+'px';if(ifrel!=null){ifrel.style.height=nextHeight+'px';} window.setTimeout('Wildfire.revealDiv("'+divID+'", '+maxHeight+')',10);}else{div .style.height=maxHeight+'px';}} Wildfire._injectCIMP=function(){if(document.getElementById('wildfire_cimp')==nul l&&document.body!=null){var cimp=document.createElement('div');cimp.id='wildfire _cimp';cimp.width=1;cimp.height=1;cimp.style.display='none';cimp.style.visibilit y='hidden';cimp.style.position='absolute';cimp.innerHTML='';document.body.insertBefore( cimp,document.body.firstChild);}} if(typeof WildfireBtn!='undefined'&&typeof WildfireBtn.pendingButtons!='undefine d'){for(var i=0;i=8&&!X.3A.2i){X.3A.2O("2i","4x:4y-4z-4A: 4B","#2j#3B")}Y{X.1a("3C:2P",p(){q b=X.4C();b.4D="2i\\\\:*{4E:2Q(#2j#3B)}"})}}s. 2k();G.1a(2R,"2S",3.2S)},3v:p(a){o((4F 2R[a]=="4G") (3.2T(2R[a].4H)-1?b-1:b},2U:p(a){K(a>0)?(-1*a):(a).4M()},2S:p(){ s.3F()}});M.10(s,(p(){p a(b){o(!b){K}b.3G();o(b.13){b.E.1E();o(s.1i){b.1l.1E()}} s.1m=s.1m.3H(b)}K{1m:[],15:[],2k:p(){3.2l=3.1n},27:{B:"2V",2V:"B",u:"1o",1o:"u", 1R:"1R",1b:"1e",1e:"1b"},3I:{H:"1b",F:"1e"},2W:p(b){K!!1S[1]?3.27[b]:b},1i:(p(c) {q b=I 4N("4O ([\\\\d.]+)").4P(c);K b?(3J(b[1])