function registerNS(A){parts=A.split(".");root=window;for(i=0;i<parts.length;i++){if(typeof root[parts[i]]=="undefined"){root[parts[i]]=new Object()}root=root[parts[i]]}return root}var Prototype={Version:"1.6.0.3",Browser:{IE:!!(window.attachEvent&&navigator.userAgent.indexOf("Opera")===-1),Opera:navigator.userAgent.indexOf("Opera")>-1,WebKit:navigator.userAgent.indexOf("AppleWebKit/")>-1,Gecko:navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")===-1,MobileSafari:!!navigator.userAgent.match(/Apple.*Mobile.*Safari/)},BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:!!window.HTMLElement,SpecificElementExtensions:document.createElement("div")["__proto__"]&&document.createElement("div")["__proto__"]!==document.createElement("form")["__proto__"]},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(A){return A}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Class={create:function(){var E=null,D=$A(arguments);if(Object.isFunction(D[0])){E=D.shift()}function A(){this.initialize.apply(this,arguments)}Object.extend(A,Class.Methods);A.superclass=E;A.subclasses=[];if(E){var B=function(){};B.prototype=E.prototype;A.prototype=new B;E.subclasses.push(A)}for(var C=0;C<D.length;C++){A.addMethods(D[C])}if(!A.prototype.initialize){A.prototype.initialize=Prototype.emptyFunction}A.prototype.constructor=A;return A}};Class.Methods={addMethods:function(G){var C=this.superclass&&this.superclass.prototype;var B=Object.keys(G);if(!Object.keys({toString:true}).length){B.push("toString","valueOf")}for(var A=0,D=B.length;A<D;A++){var F=B[A],E=G[F];if(C&&Object.isFunction(E)&&E.argumentNames().first()=="$super"){var H=E;E=(function(I){return function(){return C[I].apply(this,arguments)}})(F).wrap(H);E.valueOf=H.valueOf.bind(H);E.toString=H.toString.bind(H)}this.prototype[F]=E}return this}};var Abstract={};Object.extend=function(A,C){for(var B in C){A[B]=C[B]}return A};Object.extend(Object,{inspect:function(A){try{if(Object.isUndefined(A)){return"undefined"}if(A===null){return"null"}return A.inspect?A.inspect():String(A)}catch(B){if(B instanceof RangeError){return"..."}throw B}},toJSON:function(A){var C=typeof A;switch(C){case"undefined":case"function":case"unknown":return ;case"boolean":return A.toString()}if(A===null){return"null"}if(A.toJSON){return A.toJSON()}if(Object.isElement(A)){return }var B=[];for(var E in A){var D=Object.toJSON(A[E]);if(!Object.isUndefined(D)){B.push(E.toJSON()+": "+D)}}return"{"+B.join(", ")+"}"},toQueryString:function(A){return $H(A).toQueryString()},toHTML:function(A){return A&&A.toHTML?A.toHTML():String.interpret(A)},keys:function(A){var B=[];for(var C in A){B.push(C)}return B},values:function(B){var A=[];for(var C in B){A.push(B[C])}return A},clone:function(A){return Object.extend({},A)},isElement:function(A){return !!(A&&A.nodeType==1)},isArray:function(A){return A!=null&&typeof A=="object"&&"splice" in A&&"join" in A},isHash:function(A){return A instanceof Hash},isFunction:function(A){return typeof A=="function"},isString:function(A){return typeof A=="string"},isNumber:function(A){return typeof A=="number"},isUndefined:function(A){return typeof A=="undefined"}});Object.extend(Function.prototype,{argumentNames:function(){var A=this.toString().match(/^[\s\(]*function[^(]*\(([^\)]*)\)/)[1].replace(/\s+/g,"").split(",");return A.length==1&&!A[0]?[]:A},bind:function(){if(arguments.length<2&&Object.isUndefined(arguments[0])){return this}var A=this,C=$A(arguments),B=C.shift();return function(){return A.apply(B,C.concat($A(arguments)))}},bindAsEventListener:function(){var A=this,C=$A(arguments),B=C.shift();return function(D){return A.apply(B,[D||window.event].concat(C))}},curry:function(){if(!arguments.length){return this}var A=this,B=$A(arguments);return function(){return A.apply(this,B.concat($A(arguments)))}},delay:function(){var A=this,B=$A(arguments),C=B.shift()*1000;return window.setTimeout(function(){return A.apply(A,B)},C)},defer:function(){var A=[0.01].concat($A(arguments));return this.delay.apply(this,A)},wrap:function(B){var A=this;return function(){return B.apply(this,[A.bind(this)].concat($A(arguments)))}},methodize:function(){if(this._methodized){return this._methodized}var A=this;return this._methodized=function(){return A.apply(null,[this].concat($A(arguments)))}}});Date.prototype.toJSON=function(){return'"'+this.getUTCFullYear()+"-"+(this.getUTCMonth()+1).toPaddedString(2)+"-"+this.getUTCDate().toPaddedString(2)+"T"+this.getUTCHours().toPaddedString(2)+":"+this.getUTCMinutes().toPaddedString(2)+":"+this.getUTCSeconds().toPaddedString(2)+'Z"'};var Try={these:function(){var C;for(var B=0,D=arguments.length;B<D;B++){var A=arguments[B];try{C=A();break}catch(E){}}return C}};RegExp.prototype.match=RegExp.prototype.test;RegExp.escape=function(A){return String(A).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};var PeriodicalExecuter=Class.create({initialize:function(B,A){this.callback=B;this.frequency=A;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},execute:function(){this.callback(this)},stop:function(){if(!this.timer){return }clearInterval(this.timer);this.timer=null},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.execute()}finally{this.currentlyExecuting=false}}}});Object.extend(String,{interpret:function(A){return A==null?"":String(A)},specialChar:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\\":"\\\\"}});Object.extend(String.prototype,{gsub:function(E,C){var A="",D=this,B;C=arguments.callee.prepareReplacement(C);while(D.length>0){if(B=D.match(E)){A+=D.slice(0,B.index);A+=String.interpret(C(B));D=D.slice(B.index+B[0].length)}else{A+=D,D=""}}return A},sub:function(C,A,B){A=this.gsub.prepareReplacement(A);B=Object.isUndefined(B)?1:B;return this.gsub(C,function(D){if(--B<0){return D[0]}return A(D)})},scan:function(B,A){this.gsub(B,A);return String(this)},truncate:function(B,A){B=B||30;A=Object.isUndefined(A)?"...":A;return this.length>B?this.slice(0,B-A.length)+A:String(this)},strip:function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")},extractScripts:function(){var B=new RegExp(Prototype.ScriptFragment,"img");var A=new RegExp(Prototype.ScriptFragment,"im");return(this.match(B)||[]).map(function(C){return(C.match(A)||["",""])[1]})},evalScripts:function(){return this.extractScripts().map(function(script){return eval(script)})},escapeHTML:function(){var A=arguments.callee;A.text.data=this;return A.div.innerHTML},unescapeHTML:function(){var A=new Element("div");A.innerHTML=this.stripTags();return A.childNodes[0]?(A.childNodes.length>1?$A(A.childNodes).inject("",function(B,C){return B+C.nodeValue}):A.childNodes[0].nodeValue):""},toQueryParams:function(B){var A=this.strip().match(/([^?#]*)(#.*)?$/);if(!A){return{}}return A[1].split(B||"&").inject({},function(E,F){if((F=F.split("="))[0]){var C=decodeURIComponent(F.shift());var D=F.length>1?F.join("="):F[0];if(D!=undefined){D=decodeURIComponent(D)}if(C in E){if(!Object.isArray(E[C])){E[C]=[E[C]]}E[C].push(D)}else{E[C]=D}}return E})},toArray:function(){return this.split("")},succ:function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)},times:function(A){return A<1?"":new Array(A+1).join(this)},camelize:function(){var D=this.split("-"),A=D.length;if(A==1){return D[0]}var C=this.charAt(0)=="-"?D[0].charAt(0).toUpperCase()+D[0].substring(1):D[0];for(var B=1;B<A;B++){C+=D[B].charAt(0).toUpperCase()+D[B].substring(1)}return C},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},underscore:function(){return this.gsub(/::/,"/").gsub(/([A-Z]+)([A-Z][a-z])/,"#{1}_#{2}").gsub(/([a-z\d])([A-Z])/,"#{1}_#{2}").gsub(/-/,"_").toLowerCase()},dasherize:function(){return this.gsub(/_/,"-")},inspect:function(B){var A=this.gsub(/[\x00-\x1f\\]/,function(C){var D=String.specialChar[C[0]];return D?D:"\\u00"+C[0].charCodeAt().toPaddedString(2,16)});if(B){return'"'+A.replace(/"/g,'\\"')+'"'}return"'"+A.replace(/'/g,"\\'")+"'"},toJSON:function(){return this.inspect(true)},unfilterJSON:function(A){return this.sub(A||Prototype.JSONFilter,"#{1}")},isJSON:function(){var A=this;if(A.blank()){return false}A=this.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(A)},evalJSON:function(sanitize){var json=this.unfilterJSON();try{if(!sanitize||json.isJSON()){return eval("("+json+")")}}catch(e){}throw new SyntaxError("Badly formed JSON string: "+this.inspect())},include:function(A){return this.indexOf(A)>-1},startsWith:function(A){return this.indexOf(A)===0},endsWith:function(A){var B=this.length-A.length;return B>=0&&this.lastIndexOf(A)===B},empty:function(){return this==""},blank:function(){return/^\s*$/.test(this)},interpolate:function(A,B){return new Template(this,B).evaluate(A)}});if(Prototype.Browser.WebKit||Prototype.Browser.IE){Object.extend(String.prototype,{escapeHTML:function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},unescapeHTML:function(){return this.stripTags().replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")}})}String.prototype.gsub.prepareReplacement=function(B){if(Object.isFunction(B)){return B}var A=new Template(B);return function(C){return A.evaluate(C)}};String.prototype.parseQuery=String.prototype.toQueryParams;Object.extend(String.prototype.escapeHTML,{div:document.createElement("div"),text:document.createTextNode("")});String.prototype.escapeHTML.div.appendChild(String.prototype.escapeHTML.text);var Template=Class.create({initialize:function(A,B){this.template=A.toString();this.pattern=B||Template.Pattern},evaluate:function(A){if(Object.isFunction(A.toTemplateReplacements)){A=A.toTemplateReplacements()}return this.template.gsub(this.pattern,function(D){if(A==null){return""}var F=D[1]||"";if(F=="\\"){return D[2]}var B=A,G=D[3];var E=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;D=E.exec(G);if(D==null){return F}while(D!=null){var C=D[1].startsWith("[")?D[2].gsub("\\\\]","]"):D[1];B=B[C];if(null==B||""==D[3]){break}G=G.substring("["==D[3]?D[1].length:D[0].length);D=E.exec(G)}return F+String.interpret(B)})}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;var $break={};var Enumerable={each:function(C,B){var A=0;try{this._each(function(E){C.call(B,E,A++)})}catch(D){if(D!=$break){throw D}}return this},eachSlice:function(D,C,B){var A=-D,E=[],F=this.toArray();if(D<1){return F}while((A+=D)<F.length){E.push(F.slice(A,A+D))}return E.collect(C,B)},all:function(C,B){C=C||Prototype.K;var A=true;this.each(function(E,D){A=A&&!!C.call(B,E,D);if(!A){throw $break}});return A},any:function(C,B){C=C||Prototype.K;var A=false;this.each(function(E,D){if(A=!!C.call(B,E,D)){throw $break}});return A},collect:function(C,B){C=C||Prototype.K;var A=[];this.each(function(E,D){A.push(C.call(B,E,D))});return A},detect:function(C,B){var A;this.each(function(E,D){if(C.call(B,E,D)){A=E;throw $break}});return A},findAll:function(C,B){var A=[];this.each(function(E,D){if(C.call(B,E,D)){A.push(E)}});return A},grep:function(D,C,B){C=C||Prototype.K;var A=[];if(Object.isString(D)){D=new RegExp(D)}this.each(function(F,E){if(D.match(F)){A.push(C.call(B,F,E))}});return A},include:function(A){if(Object.isFunction(this.indexOf)){if(this.indexOf(A)!=-1){return true}}var B=false;this.each(function(C){if(C==A){B=true;throw $break}});return B},inGroupsOf:function(B,A){A=Object.isUndefined(A)?null:A;return this.eachSlice(B,function(C){while(C.length<B){C.push(A)}return C})},inject:function(A,C,B){this.each(function(E,D){A=C.call(B,A,E,D)});return A},invoke:function(B){var A=$A(arguments).slice(1);return this.map(function(C){return C[B].apply(C,A)})},max:function(C,B){C=C||Prototype.K;var A;this.each(function(E,D){E=C.call(B,E,D);if(A==null||E>=A){A=E}});return A},min:function(C,B){C=C||Prototype.K;var A;this.each(function(E,D){E=C.call(B,E,D);if(A==null||E<A){A=E}});return A},partition:function(D,B){D=D||Prototype.K;var C=[],A=[];this.each(function(F,E){(D.call(B,F,E)?C:A).push(F)});return[C,A]},pluck:function(B){var A=[];this.each(function(C){A.push(C[B])});return A},reject:function(C,B){var A=[];this.each(function(E,D){if(!C.call(B,E,D)){A.push(E)}});return A},sortBy:function(B,A){return this.map(function(D,C){return{value:D,criteria:B.call(A,D,C)}}).sort(function(F,E){var D=F.criteria,C=E.criteria;return D<C?-1:D>C?1:0}).pluck("value")},toArray:function(){return this.map()},zip:function(){var B=Prototype.K,A=$A(arguments);if(Object.isFunction(A.last())){B=A.pop()}var C=[this].concat(A).map($A);return this.map(function(E,D){return B(C.pluck(D))})},size:function(){return this.toArray().length},inspect:function(){return"#<Enumerable:"+this.toArray().inspect()+">"}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,filter:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray,every:Enumerable.all,some:Enumerable.any});function $A(C){if(!C){return[]}if(C.toArray){return C.toArray()}var B=C.length||0,A=new Array(B);while(B--){A[B]=C[B]}return A}if(Prototype.Browser.WebKit){$A=function(C){if(!C){return[]}if(!(typeof C==="function"&&typeof C.length==="number"&&typeof C.item==="function")&&C.toArray){return C.toArray()}var B=C.length||0,A=new Array(B);while(B--){A[B]=C[B]}return A}}Array.from=$A;Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse){Array.prototype._reverse=Array.prototype.reverse}Object.extend(Array.prototype,{_each:function(B){for(var A=0,C=this.length;A<C;A++){B(this[A])}},clear:function(){this.length=0;return this},first:function(){return this[0]},last:function(){return this[this.length-1]},compact:function(){return this.select(function(A){return A!=null})},flatten:function(){return this.inject([],function(B,A){return B.concat(Object.isArray(A)?A.flatten():[A])})},without:function(){var A=$A(arguments);return this.select(function(B){return !A.include(B)})},reverse:function(A){return(A!==false?this:this.toArray())._reverse()},reduce:function(){return this.length>1?this:this[0]},uniq:function(A){return this.inject([],function(D,C,B){if(0==B||(A?D.last()!=C:!D.include(C))){D.push(C)}return D})},intersect:function(A){return this.uniq().findAll(function(B){return A.detect(function(C){return B===C})})},clone:function(){return[].concat(this)},size:function(){return this.length},inspect:function(){return"["+this.map(Object.inspect).join(", ")+"]"},toJSON:function(){var A=[];this.each(function(B){var C=Object.toJSON(B);if(!Object.isUndefined(C)){A.push(C)}});return"["+A.join(", ")+"]"}});if(Object.isFunction(Array.prototype.forEach)){Array.prototype._each=Array.prototype.forEach}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(C,A){A||(A=0);var B=this.length;if(A<0){A=B+A}for(;A<B;A++){if(this[A]===C){return A}}return -1}}if(!Array.prototype.lastIndexOf){Array.prototype.lastIndexOf=function(B,A){A=isNaN(A)?this.length:(A<0?this.length+A:A)+1;var C=this.slice(0,A).reverse().indexOf(B);return(C<0)?C:A-C-1}}Array.prototype.toArray=Array.prototype.clone;function $w(A){if(!Object.isString(A)){return[]}A=A.strip();return A?A.split(/\s+/):[]}if(Prototype.Browser.Opera){Array.prototype.concat=function(){var E=[];for(var B=0,C=this.length;B<C;B++){E.push(this[B])}for(var B=0,C=arguments.length;B<C;B++){if(Object.isArray(arguments[B])){for(var A=0,D=arguments[B].length;A<D;A++){E.push(arguments[B][A])}}else{E.push(arguments[B])}}return E}}Object.extend(Number.prototype,{toColorPart:function(){return this.toPaddedString(2,16)},succ:function(){return this+1},times:function(B,A){$R(0,this,true).each(B,A);return this},toPaddedString:function(C,B){var A=this.toString(B||10);return"0".times(C-A.length)+A},toJSON:function(){return isFinite(this)?this.toString():"null"}});$w("abs round ceil floor").each(function(A){Number.prototype[A]=Math[A].methodize()});function $H(A){return new Hash(A)}var Hash=Class.create(Enumerable,(function(){function A(B,C){if(Object.isUndefined(C)){return B}return B+"="+encodeURIComponent(String.interpret(C))}return{initialize:function(B){this._object=Object.isHash(B)?B.toObject():Object.clone(B)},_each:function(C){for(var B in this._object){var D=this._object[B],E=[B,D];E.key=B;E.value=D;C(E)}},set:function(B,C){return this._object[B]=C},get:function(B){if(this._object[B]!==Object.prototype[B]){return this._object[B]}},unset:function(B){var C=this._object[B];delete this._object[B];return C},toObject:function(){return Object.clone(this._object)},keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},index:function(C){var B=this.detect(function(D){return D.value===C});return B&&B.key},merge:function(B){return this.clone().update(B)},update:function(B){return new Hash(B).inject(this,function(C,D){C.set(D.key,D.value);return C})},toQueryString:function(){return this.inject([],function(D,E){var C=encodeURIComponent(E.key),B=E.value;if(B&&typeof B=="object"){if(Object.isArray(B)){return D.concat(B.map(A.curry(C)))}}else{D.push(A(C,B))}return D}).join("&")},inspect:function(){return"#<Hash:{"+this.map(function(B){return B.map(Object.inspect).join(": ")}).join(", ")+"}>"},toJSON:function(){return Object.toJSON(this.toObject())},clone:function(){return new Hash(this)}}})());Hash.prototype.toTemplateReplacements=Hash.prototype.toObject;Hash.from=$H;var ObjectRange=Class.create(Enumerable,{initialize:function(C,A,B){this.start=C;this.end=A;this.exclusive=B},_each:function(A){var B=this.start;while(this.include(B)){A(B);B=B.succ()}},include:function(A){if(A<this.start){return false}if(this.exclusive){return A<this.end}return A<=this.end}});var $R=function(C,A,B){return new ObjectRange(C,A,B)};var Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")})||false},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(A){this.responders._each(A)},register:function(A){if(!this.include(A)){this.responders.push(A)}},unregister:function(A){this.responders=this.responders.without(A)},dispatch:function(D,B,C,A){this.each(function(E){if(Object.isFunction(E[D])){try{E[D].apply(E,[B,C,A])}catch(F){}}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=Class.create({initialize:function(A){this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:"",evalJSON:true,evalJS:true};Object.extend(this.options,A||{});this.options.method=this.options.method.toLowerCase();if(Object.isString(this.options.parameters)){this.options.parameters=this.options.parameters.toQueryParams()}else{if(Object.isHash(this.options.parameters)){this.options.parameters=this.options.parameters.toObject()}}}});Ajax.Request=Class.create(Ajax.Base,{_complete:false,initialize:function($super,B,A){$super(A);this.transport=Ajax.getTransport();this.request(B)},request:function(B){this.url=B;this.method=this.options.method;var D=Object.clone(this.options.parameters);if(!["get","post"].include(this.method)){D._method=this.method;this.method="post"}this.parameters=D;if(D=Object.toQueryString(D)){if(this.method=="get"){this.url+=(this.url.include("?")?"&":"?")+D}else{if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){D+="&_="}}}try{var A=new Ajax.Response(this);if(this.options.onCreate){this.options.onCreate(A)}Ajax.Responders.dispatch("onCreate",this,A);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous){this.respondToReadyState.bind(this).defer(1)}this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();this.body=this.method=="post"?(this.options.postBody||D):null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType){this.onStateChange()}}catch(C){this.dispatchException(C)}},onStateChange:function(){var A=this.transport.readyState;if(A>1&&!((A==4)&&this._complete)){this.respondToReadyState(this.transport.readyState)}},setRequestHeaders:function(){var E={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,Accept:"text/javascript, text/html, application/xml, text/xml, */*"};if(this.method=="post"){E["Content-type"]=this.options.contentType+(this.options.encoding?"; charset="+this.options.encoding:"");if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005){E.Connection="close"}}if(typeof this.options.requestHeaders=="object"){var C=this.options.requestHeaders;if(Object.isFunction(C.push)){for(var B=0,D=C.length;B<D;B+=2){E[C[B]]=C[B+1]}}else{$H(C).each(function(F){E[F.key]=F.value})}}for(var A in E){this.transport.setRequestHeader(A,E[A])}},success:function(){var A=this.getStatus();return !A||(A>=200&&A<300)},getStatus:function(){try{return this.transport.status||0}catch(A){return 0}},respondToReadyState:function(A){var C=Ajax.Request.Events[A],B=new Ajax.Response(this);if(C=="Complete"){try{this._complete=true;(this.options["on"+B.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(B,B.headerJSON)}catch(D){this.dispatchException(D)}var E=B.getHeader("Content-type");if(this.options.evalJS=="force"||(this.options.evalJS&&this.isSameOrigin()&&E&&E.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))){this.evalResponse()}}try{(this.options["on"+C]||Prototype.emptyFunction)(B,B.headerJSON);Ajax.Responders.dispatch("on"+C,this,B,B.headerJSON)}catch(D){this.dispatchException(D)}if(C=="Complete"){this.transport.onreadystatechange=Prototype.emptyFunction}},isSameOrigin:function(){var A=this.url.match(/^\s*https?:\/\/[^\/]*/);return !A||(A[0]=="#{protocol}//#{domain}#{port}".interpolate({protocol:location.protocol,domain:document.domain,port:location.port?":"+location.port:""}))},getHeader:function(A){try{return this.transport.getResponseHeader(A)||null}catch(B){return null}},evalResponse:function(){try{return eval((this.transport.responseText||"").unfilterJSON())}catch(e){this.dispatchException(e)}},dispatchException:function(A){(this.options.onException||Prototype.emptyFunction)(this,A);Ajax.Responders.dispatch("onException",this,A)}});Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];Ajax.Response=Class.create({initialize:function(C){this.request=C;var D=this.transport=C.transport,A=this.readyState=D.readyState;if((A>2&&!Prototype.Browser.IE)||A==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=String.interpret(D.responseText);this.headerJSON=this._getHeaderJSON()}if(A==4){var B=D.responseXML;this.responseXML=Object.isUndefined(B)?null:B;this.responseJSON=this._getResponseJSON()}},status:0,statusText:"",getStatus:Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||""}catch(A){return""}},getHeader:Ajax.Request.prototype.getHeader,getAllHeaders:function(){try{return this.getAllResponseHeaders()}catch(A){return null}},getResponseHeader:function(A){return this.transport.getResponseHeader(A)},getAllResponseHeaders:function(){return this.transport.getAllResponseHeaders()},_getHeaderJSON:function(){var A=this.getHeader("X-JSON");if(!A){return null}A=decodeURIComponent(escape(A));try{return A.evalJSON(this.request.options.sanitizeJSON||!this.request.isSameOrigin())}catch(B){this.request.dispatchException(B)}},_getResponseJSON:function(){var A=this.request.options;if(!A.evalJSON||(A.evalJSON!="force"&&!(this.getHeader("Content-type")||"").include("application/json"))||this.responseText.blank()){return null}try{return this.responseText.evalJSON(A.sanitizeJSON||!this.request.isSameOrigin())}catch(B){this.request.dispatchException(B)}}});Ajax.Updater=Class.create(Ajax.Request,{initialize:function($super,A,C,B){this.container={success:(A.success||A),failure:(A.failure||(A.success?null:A))};B=Object.clone(B);var D=B.onComplete;B.onComplete=(function(E,F){this.updateContent(E.responseText);if(Object.isFunction(D)){D(E,F)}}).bind(this);$super(C,B)},updateContent:function(D){var C=this.container[this.success()?"success":"failure"],A=this.options;if(!A.evalScripts){D=D.stripScripts()}if(C=$(C)){if(A.insertion){if(Object.isString(A.insertion)){var B={};B[A.insertion]=D;C.insert(B)}else{A.insertion(C,D)}}else{C.update(D)}}}});Ajax.PeriodicalUpdater=Class.create(Ajax.Base,{initialize:function($super,A,C,B){$super(B);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=A;this.url=C;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},updateComplete:function(A){if(this.options.decay){this.decay=(A.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=A.responseText}this.timer=this.onTimerEvent.bind(this).delay(this.decay*this.frequency)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}});function $(B){if(arguments.length>1){for(var A=0,D=[],C=arguments.length;A<C;A++){D.push($(arguments[A]))}return D}if(Object.isString(B)){B=document.getElementById(B)}return Element.extend(B)}if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(F,A){var C=[];var E=document.evaluate(F,$(A)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var B=0,D=E.snapshotLength;B<D;B++){C.push(Element.extend(E.snapshotItem(B)))}return C}}if(!window.Node){var Node={}}if(!Node.ELEMENT_NODE){Object.extend(Node,{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12})}(function(){var A=this.Element;this.Element=function(D,C){C=C||{};D=D.toLowerCase();var B=Element.cache;if(Prototype.Browser.IE&&C.name){D="<"+D+' name="'+C.name+'">';delete C.name;return Element.writeAttribute(document.createElement(D),C)}if(!B[D]){B[D]=Element.extend(document.createElement(D))}return Element.writeAttribute(B[D].cloneNode(false),C)};Object.extend(this.Element,A||{});if(A){this.Element.prototype=A.prototype}}).call(window);Element.cache={};Element.Methods={visible:function(A){return $(A).style.display!="none"},toggle:function(A){A=$(A);Element[Element.visible(A)?"hide":"show"](A);return A},hide:function(A){A=$(A);A.style.display="none";return A},show:function(A){A=$(A);A.style.display="";return A},remove:function(A){A=$(A);A.parentNode.removeChild(A);return A},update:function(A,B){A=$(A);if(B&&B.toElement){B=B.toElement()}if(Object.isElement(B)){return A.update().insert(B)}B=Object.toHTML(B);A.innerHTML=B.stripScripts();B.evalScripts.bind(B).defer();return A},replace:function(B,C){B=$(B);if(C&&C.toElement){C=C.toElement()}else{if(!Object.isElement(C)){C=Object.toHTML(C);var A=B.ownerDocument.createRange();A.selectNode(B);C.evalScripts.bind(C).defer();C=A.createContextualFragment(C.stripScripts())}}B.parentNode.replaceChild(C,B);return B},insert:function(C,E){C=$(C);if(Object.isString(E)||Object.isNumber(E)||Object.isElement(E)||(E&&(E.toElement||E.toHTML))){E={bottom:E}}var D,F,B,G;for(var A in E){D=E[A];A=A.toLowerCase();F=Element._insertionTranslations[A];if(D&&D.toElement){D=D.toElement()}if(Object.isElement(D)){F(C,D);continue}D=Object.toHTML(D);B=((A=="before"||A=="after")?C.parentNode:C).tagName.toUpperCase();G=Element._getContentFromAnonymousElement(B,D.stripScripts());if(A=="top"||A=="after"){G.reverse()}G.each(F.curry(C));D.evalScripts.bind(D).defer()}return C},wrap:function(B,C,A){B=$(B);if(Object.isElement(C)){$(C).writeAttribute(A||{})}else{if(Object.isString(C)){C=new Element(C,A)}else{C=new Element("div",C)}}if(B.parentNode){B.parentNode.replaceChild(C,B)}C.appendChild(B);return C},inspect:function(B){B=$(B);var A="<"+B.tagName.toLowerCase();$H({id:"id",className:"class"}).each(function(F){var E=F.first(),C=F.last();var D=(B[E]||"").toString();if(D){A+=" "+C+"="+D.inspect(true)}});return A+">"},recursivelyCollect:function(A,C){A=$(A);var B=[];while(A=A[C]){if(A.nodeType==1){B.push(Element.extend(A))}}return B},ancestors:function(A){return $(A).recursivelyCollect("parentNode")},descendants:function(A){return $(A).select("*")},firstDescendant:function(A){A=$(A).firstChild;while(A&&A.nodeType!=1){A=A.nextSibling}return $(A)},immediateDescendants:function(A){if(!(A=$(A).firstChild)){return[]}while(A&&A.nodeType!=1){A=A.nextSibling}if(A){return[A].concat($(A).nextSiblings())}return[]},previousSiblings:function(A){return $(A).recursivelyCollect("previousSibling")},nextSiblings:function(A){return $(A).recursivelyCollect("nextSibling")},siblings:function(A){A=$(A);return A.previousSiblings().reverse().concat(A.nextSiblings())},match:function(B,A){if(Object.isString(A)){A=new Selector(A)}return A.match($(B))},up:function(B,D,A){B=$(B);if(arguments.length==1){return $(B.parentNode)}var C=B.ancestors();return Object.isNumber(D)?C[D]:Selector.findElement(C,D,A)},down:function(B,C,A){B=$(B);if(arguments.length==1){return B.firstDescendant()}return Object.isNumber(C)?B.descendants()[C]:Element.select(B,C)[A||0]},previous:function(B,D,A){B=$(B);if(arguments.length==1){return $(Selector.handlers.previousElementSibling(B))}var C=B.previousSiblings();return Object.isNumber(D)?C[D]:Selector.findElement(C,D,A)},next:function(C,D,B){C=$(C);if(arguments.length==1){return $(Selector.handlers.nextElementSibling(C))}var A=C.nextSiblings();return Object.isNumber(D)?A[D]:Selector.findElement(A,D,B)},select:function(){var A=$A(arguments),B=$(A.shift());return Selector.findChildElements(B,A)},adjacent:function(){var A=$A(arguments),B=$(A.shift());return Selector.findChildElements(B.parentNode,A).without(B)},identify:function(B){B=$(B);var C=B.readAttribute("id"),A=arguments.callee;if(C){return C}do{C="anonymous_element_"+A.counter++}while($(C));B.writeAttribute("id",C);return C},readAttribute:function(C,A){C=$(C);if(Prototype.Browser.IE){var B=Element._attributeTranslations.read;if(B.values[A]){return B.values[A](C,A)}if(B.names[A]){A=B.names[A]}if(A.include(":")){return(!C.attributes||!C.attributes[A])?null:C.attributes[A].value}}return C.getAttribute(A)},writeAttribute:function(E,C,F){E=$(E);var B={},D=Element._attributeTranslations.write;if(typeof C=="object"){B=C}else{B[C]=Object.isUndefined(F)?true:F}for(var A in B){C=D.names[A]||A;F=B[A];if(D.values[A]){C=D.values[A](E,F)}if(F===false||F===null){E.removeAttribute(C)}else{if(F===true){E.setAttribute(C,C)}else{E.setAttribute(C,F)}}}return E},getHeight:function(A){return $(A).getDimensions().height},getWidth:function(A){return $(A).getDimensions().width},classNames:function(A){return new Element.ClassNames(A)},hasClassName:function(A,B){if(!(A=$(A))){return }var C=A.className;return(C.length>0&&(C==B||new RegExp("(^|\\s)"+B+"(\\s|$)").test(C)))},addClassName:function(A,B){if(!(A=$(A))){return }if(!A.hasClassName(B)){A.className+=(A.className?" ":"")+B}return A},removeClassName:function(A,B){if(!(A=$(A))){return }A.className=A.className.replace(new RegExp("(^|\\s+)"+B+"(\\s+|$)")," ").strip();return A},toggleClassName:function(A,B){if(!(A=$(A))){return }return A[A.hasClassName(B)?"removeClassName":"addClassName"](B)},cleanWhitespace:function(B){B=$(B);var C=B.firstChild;while(C){var A=C.nextSibling;if(C.nodeType==3&&!/\S/.test(C.nodeValue)){B.removeChild(C)}C=A}return B},empty:function(A){return $(A).innerHTML.blank()},descendantOf:function(B,A){B=$(B),A=$(A);if(B.compareDocumentPosition){return(B.compareDocumentPosition(A)&8)===8}if(A.contains){return A.contains(B)&&A!==B}while(B=B.parentNode){if(B==A){return true}}return false},scrollTo:function(A){A=$(A);var B=A.cumulativeOffset();window.scrollTo(B[0],B[1]);return A},getStyle:function(B,C){B=$(B);C=C=="float"?"cssFloat":C.camelize();var D=B.style[C];if(!D||D=="auto"){var A=document.defaultView.getComputedStyle(B,null);D=A?A[C]:null}if(C=="opacity"){return D?parseFloat(D):1}return D=="auto"?null:D},getOpacity:function(A){return $(A).getStyle("opacity")},setStyle:function(B,C){B=$(B);var E=B.style,A;if(Object.isString(C)){B.style.cssText+=";"+C;return C.include("opacity")?B.setOpacity(C.match(/opacity:\s*(\d?\.?\d*)/)[1]):B}for(var D in C){if(D=="opacity"){B.setOpacity(C[D])}else{E[(D=="float"||D=="cssFloat")?(Object.isUndefined(E.styleFloat)?"cssFloat":"styleFloat"):D]=C[D]}}return B},setOpacity:function(A,B){A=$(A);A.style.opacity=(B==1||B==="")?"":(B<0.00001)?0:B;return A},getDimensions:function(C){C=$(C);var G=C.getStyle("display");if(G!="none"&&G!=null){return{width:C.offsetWidth,height:C.offsetHeight}}var B=C.style;var F=B.visibility;var D=B.position;var A=B.display;B.visibility="hidden";B.position="absolute";B.display="block";var H=C.clientWidth;var E=C.clientHeight;B.display=A;B.position=D;B.visibility=F;return{width:H,height:E}},makePositioned:function(A){A=$(A);var B=Element.getStyle(A,"position");if(B=="static"||!B){A._madePositioned=true;A.style.position="relative";if(Prototype.Browser.Opera){A.style.top=0;A.style.left=0}}return A},undoPositioned:function(A){A=$(A);if(A._madePositioned){A._madePositioned=undefined;A.style.position=A.style.top=A.style.left=A.style.bottom=A.style.right=""}return A},makeClipping:function(A){A=$(A);if(A._overflow){return A}A._overflow=Element.getStyle(A,"overflow")||"auto";if(A._overflow!=="hidden"){A.style.overflow="hidden"}return A},undoClipping:function(A){A=$(A);if(!A._overflow){return A}A.style.overflow=A._overflow=="auto"?"":A._overflow;A._overflow=null;return A},cumulativeOffset:function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;B=B.offsetParent}while(B);return Element._returnOffset(C,A)},positionedOffset:function(B){var A=0,D=0;do{A+=B.offsetTop||0;D+=B.offsetLeft||0;B=B.offsetParent;if(B){if(B.tagName.toUpperCase()=="BODY"){break}var C=Element.getStyle(B,"position");if(C!=="static"){break}}}while(B);return Element._returnOffset(D,A)},absolutize:function(B){B=$(B);if(B.getStyle("position")=="absolute"){return B}var D=B.positionedOffset();var F=D[1];var E=D[0];var C=B.clientWidth;var A=B.clientHeight;B._originalLeft=E-parseFloat(B.style.left||0);B._originalTop=F-parseFloat(B.style.top||0);B._originalWidth=B.style.width;B._originalHeight=B.style.height;B.style.position="absolute";B.style.top=F+"px";B.style.left=E+"px";B.style.width=C+"px";B.style.height=A+"px";return B},relativize:function(A){A=$(A);if(A.getStyle("position")=="relative"){return A}A.style.position="relative";var C=parseFloat(A.style.top||0)-(A._originalTop||0);var B=parseFloat(A.style.left||0)-(A._originalLeft||0);A.style.top=C+"px";A.style.left=B+"px";A.style.height=A._originalHeight;A.style.width=A._originalWidth;return A},cumulativeScrollOffset:function(B){var A=0,C=0;do{A+=B.scrollTop||0;C+=B.scrollLeft||0;B=B.parentNode}while(B);return Element._returnOffset(C,A)},getOffsetParent:function(A){if(A.offsetParent){return $(A.offsetParent)}if(A==document.body){return $(A)}while((A=A.parentNode)&&A!=document.body){if(Element.getStyle(A,"position")!="static"){return $(A)}}return $(document.body)},viewportOffset:function(D){var A=0,C=0;var B=D;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;if(B.offsetParent==document.body&&Element.getStyle(B,"position")=="absolute"){break}}while(B=B.offsetParent);B=D;do{if(!Prototype.Browser.Opera||(B.tagName&&(B.tagName.toUpperCase()=="BODY"))){A-=B.scrollTop||0;C-=B.scrollLeft||0}}while(B=B.parentNode);return Element._returnOffset(C,A)},clonePosition:function(B,D){var A=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});D=$(D);var E=D.viewportOffset();B=$(B);var F=[0,0];var C=null;if(Element.getStyle(B,"position")=="absolute"){C=B.getOffsetParent();F=C.viewportOffset()}if(C==document.body){F[0]-=document.body.offsetLeft;F[1]-=document.body.offsetTop}if(A.setLeft){B.style.left=(E[0]-F[0]+A.offsetLeft)+"px"}if(A.setTop){B.style.top=(E[1]-F[1]+A.offsetTop)+"px"}if(A.setWidth){B.style.width=D.offsetWidth+"px"}if(A.setHeight){B.style.height=D.offsetHeight+"px"}return B}};Element.Methods.identify.counter=1;Object.extend(Element.Methods,{getElementsBySelector:Element.Methods.select,childElements:Element.Methods.immediateDescendants});Element._attributeTranslations={write:{names:{className:"class",htmlFor:"for"},values:{}}};if(Prototype.Browser.Opera){Element.Methods.getStyle=Element.Methods.getStyle.wrap(function(D,B,C){switch(C){case"left":case"top":case"right":case"bottom":if(D(B,"position")==="static"){return null}case"height":case"width":if(!Element.visible(B)){return null}var E=parseInt(D(B,C),10);if(E!==B["offset"+C.capitalize()]){return E+"px"}var A;if(C==="height"){A=["border-top-width","padding-top","padding-bottom","border-bottom-width"]}else{A=["border-left-width","padding-left","padding-right","border-right-width"]}return A.inject(E,function(F,G){var H=D(B,G);return H===null?F:F-parseInt(H,10)})+"px";default:return D(B,C)}});Element.Methods.readAttribute=Element.Methods.readAttribute.wrap(function(C,A,B){if(B==="title"){return A.title}return C(A,B)})}else{if(Prototype.Browser.IE){Element.Methods.getOffsetParent=Element.Methods.getOffsetParent.wrap(function(C,B){B=$(B);try{B.offsetParent}catch(E){return $(document.body)}var A=B.getStyle("position");if(A!=="static"){return C(B)}B.setStyle({position:"relative"});var D=C(B);B.setStyle({position:A});return D});$w("positionedOffset viewportOffset").each(function(A){Element.Methods[A]=Element.Methods[A].wrap(function(E,C){C=$(C);try{C.offsetParent}catch(G){return Element._returnOffset(0,0)}var B=C.getStyle("position");if(B!=="static"){return E(C)}var D=C.getOffsetParent();if(D&&D.getStyle("position")==="fixed"){D.setStyle({zoom:1})}C.setStyle({position:"relative"});var F=E(C);C.setStyle({position:B});return F})});Element.Methods.cumulativeOffset=Element.Methods.cumulativeOffset.wrap(function(B,A){try{A.offsetParent}catch(C){return Element._returnOffset(0,0)}return B(A)});Element.Methods.getStyle=function(A,B){A=$(A);B=(B=="float"||B=="cssFloat")?"styleFloat":B.camelize();var C=A.style[B];if(!C&&A.currentStyle){C=A.currentStyle[B]}if(B=="opacity"){if(C=(A.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){if(C[1]){return parseFloat(C[1])/100}}return 1}if(C=="auto"){if((B=="width"||B=="height")&&(A.getStyle("display")!="none")){return A["offset"+B.capitalize()]+"px"}return null}return C};Element.Methods.setOpacity=function(B,E){function F(G){return G.replace(/alpha\([^\)]*\)/gi,"")}B=$(B);var A=B.currentStyle;if((A&&!A.hasLayout)||(!A&&B.style.zoom=="normal")){B.style.zoom=1}var D=B.getStyle("filter"),C=B.style;if(E==1||E===""){(D=F(D))?C.filter=D:C.removeAttribute("filter");return B}else{if(E<0.00001){E=0}}C.filter=F(D)+"alpha(opacity="+(E*100)+")";return B};Element._attributeTranslations={read:{names:{"class":"className","for":"htmlFor"},values:{_getAttr:function(A,B){return A.getAttribute(B,2)},_getAttrNode:function(A,C){var B=A.getAttributeNode(C);return B?B.value:""},_getEv:function(A,B){B=A.getAttribute(B);return B?B.toString().slice(23,-2):null},_flag:function(A,B){return $(A).hasAttribute(B)?B:null},style:function(A){return A.style.cssText.toLowerCase()},title:function(A){return A.title}}}};Element._attributeTranslations.write={names:Object.extend({cellpadding:"cellPadding",cellspacing:"cellSpacing"},Element._attributeTranslations.read.names),values:{checked:function(A,B){A.checked=!!B},style:function(A,B){A.style.cssText=B?B:""}}};Element._attributeTranslations.has={};$w("colSpan rowSpan vAlign dateTime accessKey tabIndex encType maxLength readOnly longDesc frameBorder").each(function(A){Element._attributeTranslations.write.names[A.toLowerCase()]=A;Element._attributeTranslations.has[A.toLowerCase()]=A});(function(A){Object.extend(A,{href:A._getAttr,src:A._getAttr,type:A._getAttr,action:A._getAttrNode,disabled:A._flag,checked:A._flag,readonly:A._flag,multiple:A._flag,onload:A._getEv,onunload:A._getEv,onclick:A._getEv,ondblclick:A._getEv,onmousedown:A._getEv,onmouseup:A._getEv,onmouseover:A._getEv,onmousemove:A._getEv,onmouseout:A._getEv,onfocus:A._getEv,onblur:A._getEv,onkeypress:A._getEv,onkeydown:A._getEv,onkeyup:A._getEv,onsubmit:A._getEv,onreset:A._getEv,onselect:A._getEv,onchange:A._getEv})})(Element._attributeTranslations.read.values)}else{if(Prototype.Browser.Gecko&&/rv:1\.8\.0/.test(navigator.userAgent)){Element.Methods.setOpacity=function(A,B){A=$(A);A.style.opacity=(B==1)?0.999999:(B==="")?"":(B<0.00001)?0:B;return A}}else{if(Prototype.Browser.WebKit){Element.Methods.setOpacity=function(A,B){A=$(A);A.style.opacity=(B==1||B==="")?"":(B<0.00001)?0:B;if(B==1){if(A.tagName.toUpperCase()=="IMG"&&A.width){A.width++;A.width--}else{try{var D=document.createTextNode(" ");A.appendChild(D);A.removeChild(D)}catch(C){}}}return A};Element.Methods.cumulativeOffset=function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;if(B.offsetParent==document.body){if(Element.getStyle(B,"position")=="absolute"){break}}B=B.offsetParent}while(B);return Element._returnOffset(C,A)}}}}}if(Prototype.Browser.IE||Prototype.Browser.Opera){Element.Methods.update=function(B,C){B=$(B);if(C&&C.toElement){C=C.toElement()}if(Object.isElement(C)){return B.update().insert(C)}C=Object.toHTML(C);var A=B.tagName.toUpperCase();if(A in Element._insertionTranslations.tags){$A(B.childNodes).each(function(D){B.removeChild(D)});Element._getContentFromAnonymousElement(A,C.stripScripts()).each(function(D){B.appendChild(D)})}else{B.innerHTML=C.stripScripts()}C.evalScripts.bind(C).defer();return B}}if("outerHTML" in document.createElement("div")){Element.Methods.replace=function(C,E){C=$(C);if(E&&E.toElement){E=E.toElement()}if(Object.isElement(E)){C.parentNode.replaceChild(E,C);return C}E=Object.toHTML(E);var D=C.parentNode,B=D.tagName.toUpperCase();if(Element._insertionTranslations.tags[B]){var F=C.next();var A=Element._getContentFromAnonymousElement(B,E.stripScripts());D.removeChild(C);if(F){A.each(function(G){D.insertBefore(G,F)})}else{A.each(function(G){D.appendChild(G)})}}else{C.outerHTML=E.stripScripts()}E.evalScripts.bind(E).defer();return C}}Element._returnOffset=function(B,C){var A=[B,C];A.left=B;A.top=C;return A};Element._getContentFromAnonymousElement=function(C,B){var D=new Element("div"),A=Element._insertionTranslations.tags[C];if(A){D.innerHTML=A[0]+B+A[1];A[2].times(function(){D=D.firstChild})}else{D.innerHTML=B}return $A(D.childNodes)};Element._insertionTranslations={before:function(A,B){A.parentNode.insertBefore(B,A)},top:function(A,B){A.insertBefore(B,A.firstChild)},bottom:function(A,B){A.appendChild(B)},after:function(A,B){A.parentNode.insertBefore(B,A.nextSibling)},tags:{TABLE:["<table>","</table>",1],TBODY:["<table><tbody>","</tbody></table>",2],TR:["<table><tbody><tr>","</tr></tbody></table>",3],TD:["<table><tbody><tr><td>","</td></tr></tbody></table>",4],SELECT:["<select>","</select>",1]}};(function(){Object.extend(this.tags,{THEAD:this.tags.TBODY,TFOOT:this.tags.TBODY,TH:this.tags.TD})}).call(Element._insertionTranslations);Element.Methods.Simulated={hasAttribute:function(A,C){C=Element._attributeTranslations.has[C]||C;var B=$(A).getAttributeNode(C);return !!(B&&B.specified)}};Element.Methods.ByTag={};Object.extend(Element,Element.Methods);if(!Prototype.BrowserFeatures.ElementExtensions&&document.createElement("div")["__proto__"]){window.HTMLElement={};window.HTMLElement.prototype=document.createElement("div")["__proto__"];Prototype.BrowserFeatures.ElementExtensions=true}Element.extend=(function(){if(Prototype.BrowserFeatures.SpecificElementExtensions){return Prototype.K}var A={},B=Element.Methods.ByTag;var C=Object.extend(function(F){if(!F||F._extendedByPrototype||F.nodeType!=1||F==window){return F}var D=Object.clone(A),E=F.tagName.toUpperCase(),H,G;if(B[E]){Object.extend(D,B[E])}for(H in D){G=D[H];if(Object.isFunction(G)&&!(H in F)){F[H]=G.methodize()}}F._extendedByPrototype=Prototype.emptyFunction;return F},{refresh:function(){if(!Prototype.BrowserFeatures.ElementExtensions){Object.extend(A,Element.Methods);Object.extend(A,Element.Methods.Simulated)}}});C.refresh();return C})();Element.hasAttribute=function(A,B){if(A.hasAttribute){return A.hasAttribute(B)}return Element.Methods.Simulated.hasAttribute(A,B)};Element.addMethods=function(C){var I=Prototype.BrowserFeatures,D=Element.Methods.ByTag;if(!C){Object.extend(Form,Form.Methods);Object.extend(Form.Element,Form.Element.Methods);Object.extend(Element.Methods.ByTag,{FORM:Object.clone(Form.Methods),INPUT:Object.clone(Form.Element.Methods),SELECT:Object.clone(Form.Element.Methods),TEXTAREA:Object.clone(Form.Element.Methods)})}if(arguments.length==2){var B=C;C=arguments[1]}if(!B){Object.extend(Element.Methods,C||{})}else{if(Object.isArray(B)){B.each(H)}else{H(B)}}function H(F){F=F.toUpperCase();if(!Element.Methods.ByTag[F]){Element.Methods.ByTag[F]={}}Object.extend(Element.Methods.ByTag[F],C)}function A(L,K,F){F=F||false;for(var N in L){var M=L[N];if(!Object.isFunction(M)){continue}if(!F||!(N in K)){K[N]=M.methodize()}}}function E(L){var F;var K={OPTGROUP:"OptGroup",TEXTAREA:"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:"TableCol",THEAD:"TableSection",TFOOT:"TableSection",TBODY:"TableSection",TR:"TableRow",TH:"TableCell",TD:"TableCell",FRAMESET:"FrameSet",IFRAME:"IFrame"};if(K[L]){F="HTML"+K[L]+"Element"}if(window[F]){return window[F]}F="HTML"+L+"Element";if(window[F]){return window[F]}F="HTML"+L.capitalize()+"Element";if(window[F]){return window[F]}window[F]={};window[F].prototype=document.createElement(L)["__proto__"];return window[F]}if(I.ElementExtensions){A(Element.Methods,HTMLElement.prototype);A(Element.Methods.Simulated,HTMLElement.prototype,true)}if(I.SpecificElementExtensions){for(var J in Element.Methods.ByTag){var G=E(J);if(Object.isUndefined(G)){continue}A(D[J],G.prototype)}}Object.extend(Element,Element.Methods);delete Element.ByTag;if(Element.extend.refresh){Element.extend.refresh()}Element.cache={}};document.viewport={getDimensions:function(){var A={},C=Prototype.Browser;$w("width height").each(function(E){var B=E.capitalize();if(C.WebKit&&!document.evaluate){A[E]=self["inner"+B]}else{if(C.Opera&&parseFloat(window.opera.version())<9.5){A[E]=document.body["client"+B]}else{A[E]=document.documentElement["client"+B]}}});return A},getWidth:function(){return this.getDimensions().width},getHeight:function(){return this.getDimensions().height},getScrollOffsets:function(){return Element._returnOffset(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop)}};var Selector=Class.create({initialize:function(A){this.expression=A.strip();if(this.shouldUseSelectorsAPI()){this.mode="selectorsAPI"}else{if(this.shouldUseXPath()){this.mode="xpath";this.compileXPathMatcher()}else{this.mode="normal";this.compileMatcher()}}},shouldUseXPath:function(){if(!Prototype.BrowserFeatures.XPath){return false}var A=this.expression;if(Prototype.Browser.WebKit&&(A.include("-of-type")||A.include(":empty"))){return false}if((/(\[[\w-]*?:|:checked)/).test(A)){return false}return true},shouldUseSelectorsAPI:function(){if(!Prototype.BrowserFeatures.SelectorsAPI){return false}if(!Selector._div){Selector._div=new Element("div")}try{Selector._div.querySelector(this.expression)}catch(A){return false}return true},compileMatcher:function(){var e=this.expression,ps=Selector.patterns,h=Selector.handlers,c=Selector.criteria,le,p,m;if(Selector._cache[e]){this.matcher=Selector._cache[e];return }this.matcher=["this.matcher = function(root) {","var r = root, h = Selector.handlers, c = false, n;"];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in ps){p=ps[i];if(m=e.match(p)){this.matcher.push(Object.isFunction(c[i])?c[i](m):new Template(c[i]).evaluate(m));e=e.replace(m[0],"");break}}}this.matcher.push("return h.unique(n);\n}");eval(this.matcher.join("\n"));Selector._cache[this.expression]=this.matcher},compileXPathMatcher:function(){var E=this.expression,F=Selector.patterns,B=Selector.xpath,D,A;if(Selector._cache[E]){this.xpath=Selector._cache[E];return }this.matcher=[".//*"];while(E&&D!=E&&(/\S/).test(E)){D=E;for(var C in F){if(A=E.match(F[C])){this.matcher.push(Object.isFunction(B[C])?B[C](A):new Template(B[C]).evaluate(A));E=E.replace(A[0],"");break}}}this.xpath=this.matcher.join("");Selector._cache[this.expression]=this.xpath},findElements:function(A){A=A||document;var C=this.expression,B;switch(this.mode){case"selectorsAPI":if(A!==document){var D=A.id,E=$(A).identify();C="#"+E+" "+C}B=$A(A.querySelectorAll(C)).map(Element.extend);A.id=D;return B;case"xpath":return document._getElementsByXPath(this.xpath,A);default:return this.matcher(A)}},match:function(H){this.tokens=[];var L=this.expression,A=Selector.patterns,E=Selector.assertions;var B,D,F;while(L&&B!==L&&(/\S/).test(L)){B=L;for(var I in A){D=A[I];if(F=L.match(D)){if(E[I]){this.tokens.push([I,Object.clone(F)]);L=L.replace(F[0],"")}else{return this.findElements(document).include(H)}}}}var K=true,C,J;for(var I=0,G;G=this.tokens[I];I++){C=G[0],J=G[1];if(!Selector.assertions[C](H,J)){K=false;break}}return K},toString:function(){return this.expression},inspect:function(){return"#<Selector:"+this.expression.inspect()+">"}});Object.extend(Selector,{_cache:{},xpath:{descendant:"//*",child:"/*",adjacent:"/following-sibling::*[1]",laterSibling:"/following-sibling::*",tagName:function(A){if(A[1]=="*"){return""}return"[local-name()='"+A[1].toLowerCase()+"' or local-name()='"+A[1].toUpperCase()+"']"},className:"[contains(concat(' ', @class, ' '), ' #{1} ')]",id:"[@id='#{1}']",attrPresence:function(A){A[1]=A[1].toLowerCase();return new Template("[@#{1}]").evaluate(A)},attr:function(A){A[1]=A[1].toLowerCase();A[3]=A[5]||A[6];return new Template(Selector.xpath.operators[A[2]]).evaluate(A)},pseudo:function(A){var B=Selector.xpath.pseudos[A[1]];if(!B){return""}if(Object.isFunction(B)){return B(A)}return new Template(Selector.xpath.pseudos[A[1]]).evaluate(A)},operators:{"=":"[@#{1}='#{3}']","!=":"[@#{1}!='#{3}']","^=":"[starts-with(@#{1}, '#{3}')]","$=":"[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']","*=":"[contains(@#{1}, '#{3}')]","~=":"[contains(concat(' ', @#{1}, ' '), ' #{3} ')]","|=":"[contains(concat('-', @#{1}, '-'), '-#{3}-')]"},pseudos:{"first-child":"[not(preceding-sibling::*)]","last-child":"[not(following-sibling::*)]","only-child":"[not(preceding-sibling::* or following-sibling::*)]",empty:"[count(*) = 0 and (count(text()) = 0)]",checked:"[@checked]",disabled:"[(@disabled) and (@type!='hidden')]",enabled:"[not(@disabled) and (@type!='hidden')]",not:function(B){var H=B[6],G=Selector.patterns,A=Selector.xpath,E,C;var F=[];while(H&&E!=H&&(/\S/).test(H)){E=H;for(var D in G){if(B=H.match(G[D])){C=Object.isFunction(A[D])?A[D](B):new Template(A[D]).evaluate(B);F.push("("+C.substring(1,C.length-1)+")");H=H.replace(B[0],"");break}}}return"[not("+F.join(" and ")+")]"},"nth-child":function(A){return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ",A)},"nth-last-child":function(A){return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ",A)},"nth-of-type":function(A){return Selector.xpath.pseudos.nth("position() ",A)},"nth-last-of-type":function(A){return Selector.xpath.pseudos.nth("(last() + 1 - position()) ",A)},"first-of-type":function(A){A[6]="1";return Selector.xpath.pseudos["nth-of-type"](A)},"last-of-type":function(A){A[6]="1";return Selector.xpath.pseudos["nth-last-of-type"](A)},"only-of-type":function(A){var B=Selector.xpath.pseudos;return B["first-of-type"](A)+B["last-of-type"](A)},nth:function(E,C){var F,G=C[6],B;if(G=="even"){G="2n+0"}if(G=="odd"){G="2n+1"}if(F=G.match(/^(\d+)$/)){return"["+E+"= "+F[1]+"]"}if(F=G.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(F[1]=="-"){F[1]=-1}var D=F[1]?Number(F[1]):1;var A=F[2]?Number(F[2]):0;B="[((#{fragment} - #{b}) mod #{a} = 0) and ((#{fragment} - #{b}) div #{a} >= 0)]";return new Template(B).evaluate({fragment:E,a:D,b:A})}}}},criteria:{tagName:'n = h.tagName(n, r, "#{1}", c);      c = false;',className:'n = h.className(n, r, "#{1}", c);    c = false;',id:'n = h.id(n, r, "#{1}", c);           c = false;',attrPresence:'n = h.attrPresence(n, r, "#{1}", c); c = false;',attr:function(A){A[3]=(A[5]||A[6]);return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;').evaluate(A)},pseudo:function(A){if(A[6]){A[6]=A[6].replace(/"/g,'\\"')}return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(A)},descendant:'c = "descendant";',child:'c = "child";',adjacent:'c = "adjacent";',laterSibling:'c = "laterSibling";'},patterns:{laterSibling:/^\s*~\s*/,child:/^\s*>\s*/,adjacent:/^\s*\+\s*/,descendant:/^\s/,tagName:/^\s*(\*|[\w\-]+)(\b|$)?/,id:/^#([\w\-\*]+)(\b|$)/,className:/^\.([\w\-\*]+)(\b|$)/,pseudo:/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/,attrPresence:/^\[((?:[\w]+:)?[\w]+)\]/,attr:/\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/},assertions:{tagName:function(A,B){return B[1].toUpperCase()==A.tagName.toUpperCase()},className:function(A,B){return Element.hasClassName(A,B[1])},id:function(A,B){return A.id===B[1]},attrPresence:function(A,B){return Element.hasAttribute(A,B[1])},attr:function(B,C){var A=Element.readAttribute(B,C[1]);return A&&Selector.operators[C[2]](A,C[5]||C[6])}},handlers:{concat:function(B,A){for(var C=0,D;D=A[C];C++){B.push(D)}return B},mark:function(A){var D=Prototype.emptyFunction;for(var B=0,C;C=A[B];B++){C._countedByPrototype=D}return A},unmark:function(A){for(var B=0,C;C=A[B];B++){C._countedByPrototype=undefined}return A},index:function(A,D,G){A._countedByPrototype=Prototype.emptyFunction;if(D){for(var B=A.childNodes,E=B.length-1,C=1;E>=0;E--){var F=B[E];if(F.nodeType==1&&(!G||F._countedByPrototype)){F.nodeIndex=C++}}}else{for(var E=0,C=1,B=A.childNodes;F=B[E];E++){if(F.nodeType==1&&(!G||F._countedByPrototype)){F.nodeIndex=C++}}}},unique:function(B){if(B.length==0){return B}var D=[],E;for(var C=0,A=B.length;C<A;C++){if(!(E=B[C])._countedByPrototype){E._countedByPrototype=Prototype.emptyFunction;D.push(Element.extend(E))}}return Selector.handlers.unmark(D)},descendant:function(A){var D=Selector.handlers;for(var C=0,B=[],E;E=A[C];C++){D.concat(B,E.getElementsByTagName("*"))}return B},child:function(A){var E=Selector.handlers;for(var D=0,C=[],F;F=A[D];D++){for(var B=0,G;G=F.childNodes[B];B++){if(G.nodeType==1&&G.tagName!="!"){C.push(G)}}}return C},adjacent:function(A){for(var C=0,B=[],E;E=A[C];C++){var D=this.nextElementSibling(E);if(D){B.push(D)}}return B},laterSibling:function(A){var D=Selector.handlers;for(var C=0,B=[],E;E=A[C];C++){D.concat(B,Element.nextSiblings(E))}return B},nextElementSibling:function(A){while(A=A.nextSibling){if(A.nodeType==1){return A}}return null},previousElementSibling:function(A){while(A=A.previousSibling){if(A.nodeType==1){return A}}return null},tagName:function(A,H,C,B){var I=C.toUpperCase();var E=[],G=Selector.handlers;if(A){if(B){if(B=="descendant"){for(var F=0,D;D=A[F];F++){G.concat(E,D.getElementsByTagName(C))}return E}else{A=this[B](A)}if(C=="*"){return A}}for(var F=0,D;D=A[F];F++){if(D.tagName.toUpperCase()===I){E.push(D)}}return E}else{return H.getElementsByTagName(C)}},id:function(B,A,H,F){var G=$(H),D=Selector.handlers;if(!G){return[]}if(!B&&A==document){return[G]}if(B){if(F){if(F=="child"){for(var C=0,E;E=B[C];C++){if(G.parentNode==E){return[G]}}}else{if(F=="descendant"){for(var C=0,E;E=B[C];C++){if(Element.descendantOf(G,E)){return[G]}}}else{if(F=="adjacent"){for(var C=0,E;E=B[C];C++){if(Selector.handlers.previousElementSibling(G)==E){return[G]}}}else{B=D[F](B)}}}}for(var C=0,E;E=B[C];C++){if(E==G){return[G]}}return[]}return(G&&Element.descendantOf(G,A))?[G]:[]},className:function(B,A,C,D){if(B&&D){B=this[D](B)}return Selector.handlers.byClassName(B,A,C)},byClassName:function(C,B,F){if(!C){C=Selector.handlers.descendant([B])}var H=" "+F+" ";for(var E=0,D=[],G,A;G=C[E];E++){A=G.className;if(A.length==0){continue}if(A==F||(" "+A+" ").include(H)){D.push(G)}}return D},attrPresence:function(C,B,A,G){if(!C){C=B.getElementsByTagName("*")}if(C&&G){C=this[G](C)}var E=[];for(var D=0,F;F=C[D];D++){if(Element.hasAttribute(F,A)){E.push(F)}}return E},attr:function(A,I,H,J,C,B){if(!A){A=I.getElementsByTagName("*")}if(A&&B){A=this[B](A)}var K=Selector.operators[C],F=[];for(var E=0,D;D=A[E];E++){var G=Element.readAttribute(D,H);if(G===null){continue}if(K(G,J)){F.push(D)}}return F},pseudo:function(B,C,E,A,D){if(B&&D){B=this[D](B)}if(!B){B=A.getElementsByTagName("*")}return Selector.pseudos[C](B,E,A)}},pseudos:{"first-child":function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(Selector.handlers.previousElementSibling(E)){continue}C.push(E)}return C},"last-child":function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(Selector.handlers.nextElementSibling(E)){continue}C.push(E)}return C},"only-child":function(B,G,A){var E=Selector.handlers;for(var D=0,C=[],F;F=B[D];D++){if(!E.previousElementSibling(F)&&!E.nextElementSibling(F)){C.push(F)}}return C},"nth-child":function(B,C,A){return Selector.pseudos.nth(B,C,A)},"nth-last-child":function(B,C,A){return Selector.pseudos.nth(B,C,A,true)},"nth-of-type":function(B,C,A){return Selector.pseudos.nth(B,C,A,false,true)},"nth-last-of-type":function(B,C,A){return Selector.pseudos.nth(B,C,A,true,true)},"first-of-type":function(B,C,A){return Selector.pseudos.nth(B,"1",A,false,true)},"last-of-type":function(B,C,A){return Selector.pseudos.nth(B,"1",A,true,true)},"only-of-type":function(B,D,A){var C=Selector.pseudos;return C["last-of-type"](C["first-of-type"](B,D,A),D,A)},getIndices:function(B,A,C){if(B==0){return A>0?[A]:[]}return $R(1,C).inject([],function(D,E){if(0==(E-A)%B&&(E-A)/B>=0){D.push(E)}return D})},nth:function(A,L,N,K,C){if(A.length==0){return[]}if(L=="even"){L="2n+0"}if(L=="odd"){L="2n+1"}var J=Selector.handlers,I=[],B=[],E;J.mark(A);for(var H=0,D;D=A[H];H++){if(!D.parentNode._countedByPrototype){J.index(D.parentNode,K,C);B.push(D.parentNode)}}if(L.match(/^\d+$/)){L=Number(L);for(var H=0,D;D=A[H];H++){if(D.nodeIndex==L){I.push(D)}}}else{if(E=L.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(E[1]=="-"){E[1]=-1}var O=E[1]?Number(E[1]):1;var M=E[2]?Number(E[2]):0;var P=Selector.pseudos.getIndices(O,M,A.length);for(var H=0,D,F=P.length;D=A[H];H++){for(var G=0;G<F;G++){if(D.nodeIndex==P[G]){I.push(D)}}}}}J.unmark(A);J.unmark(B);return I},empty:function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(E.tagName=="!"||E.firstChild){continue}C.push(E)}return C},not:function(A,D,I){var G=Selector.handlers,J,C;var H=new Selector(D).findElements(I);G.mark(H);for(var F=0,E=[],B;B=A[F];F++){if(!B._countedByPrototype){E.push(B)}}G.unmark(H);return E},enabled:function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(!E.disabled&&(!E.type||E.type!=="hidden")){C.push(E)}}return C},disabled:function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(E.disabled){C.push(E)}}return C},checked:function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(E.checked){C.push(E)}}return C}},operators:{"=":function(B,A){return B==A},"!=":function(B,A){return B!=A},"^=":function(B,A){return B==A||B&&B.startsWith(A)},"$=":function(B,A){return B==A||B&&B.endsWith(A)},"*=":function(B,A){return B==A||B&&B.include(A)},"$=":function(B,A){return B.endsWith(A)},"*=":function(B,A){return B.include(A)},"~=":function(B,A){return(" "+B+" ").include(" "+A+" ")},"|=":function(B,A){return("-"+(B||"").toUpperCase()+"-").include("-"+(A||"").toUpperCase()+"-")}},split:function(B){var A=[];B.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(C){A.push(C[1].strip())});return A},matchElements:function(F,G){var E=$$(G),D=Selector.handlers;D.mark(E);for(var C=0,B=[],A;A=F[C];C++){if(A._countedByPrototype){B.push(A)}}D.unmark(E);return B},findElement:function(B,C,A){if(Object.isNumber(C)){A=C;C=false}return Selector.matchElements(B,C||"*")[A||0]},findChildElements:function(E,G){G=Selector.split(G.join(","));var D=[],F=Selector.handlers;for(var C=0,B=G.length,A;C<B;C++){A=new Selector(G[C].strip());F.concat(D,A.findElements(E))}return(B>1)?F.unique(D):D}});if(Prototype.Browser.IE){Object.extend(Selector.handlers,{concat:function(B,A){for(var C=0,D;D=A[C];C++){if(D.tagName!=="!"){B.push(D)}}return B},unmark:function(A){for(var B=0,C;C=A[B];B++){C.removeAttribute("_countedByPrototype")}return A}})}function $$(){return Selector.findChildElements(document,$A(arguments))}var Form={reset:function(A){$(A).reset();return A},serializeElements:function(G,B){if(typeof B!="object"){B={hash:!!B}}else{if(Object.isUndefined(B.hash)){B.hash=true}}var C,F,A=false,E=B.submit;var D=G.inject({},function(H,I){if(!I.disabled&&I.name){C=I.name;F=$(I).getValue();if(F!=null&&I.type!="file"&&(I.type!="submit"||(!A&&E!==false&&(!E||C==E)&&(A=true)))){if(C in H){if(!Object.isArray(H[C])){H[C]=[H[C]]}H[C].push(F)}else{H[C]=F}}}return H});return B.hash?D:Object.toQueryString(D)}};Form.Methods={serialize:function(B,A){return Form.serializeElements(Form.getElements(B),A)},getElements:function(A){return $A($(A).getElementsByTagName("*")).inject([],function(B,C){if(Form.Element.Serializers[C.tagName.toLowerCase()]){B.push(Element.extend(C))}return B})},getInputs:function(G,C,D){G=$(G);var A=G.getElementsByTagName("input");if(!C&&!D){return $A(A).map(Element.extend)}for(var E=0,H=[],F=A.length;E<F;E++){var B=A[E];if((C&&B.type!=C)||(D&&B.name!=D)){continue}H.push(Element.extend(B))}return H},disable:function(A){A=$(A);Form.getElements(A).invoke("disable");return A},enable:function(A){A=$(A);Form.getElements(A).invoke("enable");return A},findFirstElement:function(B){var C=$(B).getElements().findAll(function(D){return"hidden"!=D.type&&!D.disabled});var A=C.findAll(function(D){return D.hasAttribute("tabIndex")&&D.tabIndex>=0}).sortBy(function(D){return D.tabIndex}).first();return A?A:C.find(function(D){return["input","select","textarea"].include(D.tagName.toLowerCase())})},focusFirstElement:function(A){A=$(A);A.findFirstElement().activate();return A},request:function(B,A){B=$(B),A=Object.clone(A||{});var D=A.parameters,C=B.readAttribute("action")||"";if(C.blank()){C=window.location.href}A.parameters=B.serialize(true);if(D){if(Object.isString(D)){D=D.toQueryParams()}Object.extend(A.parameters,D)}if(B.hasAttribute("method")&&!A.method){A.method=B.method}return new Ajax.Request(C,A)}};Form.Element={focus:function(A){$(A).focus();return A},select:function(A){$(A).select();return A}};Form.Element.Methods={serialize:function(A){A=$(A);if(!A.disabled&&A.name){var B=A.getValue();if(B!=undefined){var C={};C[A.name]=B;return Object.toQueryString(C)}}return""},getValue:function(A){A=$(A);var B=A.tagName.toLowerCase();return Form.Element.Serializers[B](A)},setValue:function(A,B){A=$(A);var C=A.tagName.toLowerCase();Form.Element.Serializers[C](A,B);return A},clear:function(A){$(A).value="";return A},present:function(A){return $(A).value!=""},activate:function(A){A=$(A);try{A.focus();if(A.select&&(A.tagName.toLowerCase()!="input"||!["button","reset","submit"].include(A.type))){A.select()}}catch(B){}return A},disable:function(A){A=$(A);A.disabled=true;return A},enable:function(A){A=$(A);A.disabled=false;return A}};var Field=Form.Element;var $F=Form.Element.Methods.getValue;Form.Element.Serializers={input:function(A,B){switch(A.type.toLowerCase()){case"checkbox":case"radio":return Form.Element.Serializers.inputSelector(A,B);default:return Form.Element.Serializers.textarea(A,B)}},inputSelector:function(A,B){if(Object.isUndefined(B)){return A.checked?A.value:null}else{A.checked=!!B}},textarea:function(A,B){if(Object.isUndefined(B)){return A.value}else{A.value=B}},select:function(C,F){if(Object.isUndefined(F)){return this[C.type=="select-one"?"selectOne":"selectMany"](C)}else{var B,D,G=!Object.isArray(F);for(var A=0,E=C.length;A<E;A++){B=C.options[A];D=this.optionValue(B);if(G){if(D==F){B.selected=true;return }}else{B.selected=F.include(D)}}}},selectOne:function(B){var A=B.selectedIndex;return A>=0?this.optionValue(B.options[A]):null},selectMany:function(D){var A,E=D.length;if(!E){return null}for(var C=0,A=[];C<E;C++){var B=D.options[C];if(B.selected){A.push(this.optionValue(B))}}return A},optionValue:function(A){return Element.extend(A).hasAttribute("value")?A.value:A.text}};Abstract.TimedObserver=Class.create(PeriodicalExecuter,{initialize:function($super,A,B,C){$super(C,B);this.element=$(A);this.lastValue=this.getValue()},execute:function(){var A=this.getValue();if(Object.isString(this.lastValue)&&Object.isString(A)?this.lastValue!=A:String(this.lastValue)!=String(A)){this.callback(this.element,A);this.lastValue=A}}});Form.Element.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.serialize(this.element)}});Abstract.EventObserver=Class.create({initialize:function(A,B){this.element=$(A);this.callback=B;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=="form"){this.registerFormCallbacks()}else{this.registerCallback(this.element)}},onElementEvent:function(){var A=this.getValue();if(this.lastValue!=A){this.callback(this.element,A);this.lastValue=A}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback,this)},registerCallback:function(A){if(A.type){switch(A.type.toLowerCase()){case"checkbox":case"radio":Event.observe(A,"click",this.onElementEvent.bind(this));break;default:Event.observe(A,"change",this.onElementEvent.bind(this));break}}}});Form.Element.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.serialize(this.element)}});if(!window.Event){var Event={}}Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,KEY_INSERT:45,cache:{},relatedTarget:function(B){var A;switch(B.type){case"mouseover":A=B.fromElement;break;case"mouseout":A=B.toElement;break;default:return null}return Element.extend(A)}});Event.Methods=(function(){var A;if(Prototype.Browser.IE){var B={0:1,1:4,2:2};A=function(D,C){return D.button==B[C]}}else{if(Prototype.Browser.WebKit){A=function(D,C){switch(C){case 0:return D.which==1&&!D.metaKey;case 1:return D.which==1&&D.metaKey;default:return false}}}else{A=function(D,C){return D.which?(D.which===C+1):(D.button===C)}}}return{isLeftClick:function(C){return A(C,0)},isMiddleClick:function(C){return A(C,1)},isRightClick:function(C){return A(C,2)},element:function(E){E=Event.extend(E);var D=E.target,C=E.type,F=E.currentTarget;if(F&&F.tagName){if(C==="load"||C==="error"||(C==="click"&&F.tagName.toLowerCase()==="input"&&F.type==="radio")){D=F}}if(D.nodeType==Node.TEXT_NODE){D=D.parentNode}return Element.extend(D)},findElement:function(D,F){var C=Event.element(D);if(!F){return C}var E=[C].concat(C.ancestors());return Selector.findElement(E,F,0)},pointer:function(E){var D=document.documentElement,C=document.body||{scrollLeft:0,scrollTop:0};return{x:E.pageX||(E.clientX+(D.scrollLeft||C.scrollLeft)-(D.clientLeft||0)),y:E.pageY||(E.clientY+(D.scrollTop||C.scrollTop)-(D.clientTop||0))}},pointerX:function(C){return Event.pointer(C).x},pointerY:function(C){return Event.pointer(C).y},stop:function(C){Event.extend(C);C.preventDefault();C.stopPropagation();C.stopped=true}}})();Event.extend=(function(){var A=Object.keys(Event.Methods).inject({},function(B,C){B[C]=Event.Methods[C].methodize();return B});if(Prototype.Browser.IE){Object.extend(A,{stopPropagation:function(){this.cancelBubble=true},preventDefault:function(){this.returnValue=false},inspect:function(){return"[object Event]"}});return function(B){if(!B){return false}if(B._extendedByPrototype){return B}B._extendedByPrototype=Prototype.emptyFunction;var C=Event.pointer(B);Object.extend(B,{target:B.srcElement,relatedTarget:Event.relatedTarget(B),pageX:C.x,pageY:C.y});return Object.extend(B,A)}}else{Event.prototype=Event.prototype||document.createEvent("HTMLEvents")["__proto__"];Object.extend(Event.prototype,A);return Prototype.K}})();Object.extend(Event,(function(){var B=Event.cache;function C(J){if(J._prototypeEventID){return J._prototypeEventID[0]}arguments.callee.id=arguments.callee.id||1;return J._prototypeEventID=[++arguments.callee.id]}function G(J){if(J&&J.include(":")){return"dataavailable"}return J}function A(J){return B[J]=B[J]||{}}function F(L,J){var K=A(L);return K[J]=K[J]||[]}function H(K,J,L){var O=C(K);var N=F(O,J);if(N.pluck("handler").include(L)){return false}var M=function(P){if(!Event||!Event.extend||(P.eventName&&P.eventName!=J)){return false}Event.extend(P);L.call(K,P)};M.handler=L;N.push(M);return M}function I(M,J,K){var L=F(M,J);return L.find(function(N){return N.handler==K})}function D(M,J,K){var L=A(M);if(!L[J]){return false}L[J]=L[J].without(I(M,J,K))}function E(){for(var K in B){for(var J in B[K]){B[K][J]=null}}}if(window.attachEvent){window.attachEvent("onunload",E)}if(Prototype.Browser.WebKit){window.addEventListener("unload",Prototype.emptyFunction,false)}return{observe:function(L,J,M){L=$(L);var K=G(J);var N=H(L,J,M);if(!N){return L}if(L.addEventListener){L.addEventListener(K,N,false)}else{L.attachEvent("on"+K,N)}return L},stopObserving:function(L,J,M){L=$(L);var O=C(L),K=G(J);if(!M&&J){F(O,J).each(function(P){L.stopObserving(J,P.handler)});return L}else{if(!J){Object.keys(A(O)).each(function(P){L.stopObserving(P)});return L}}var N=I(O,J,M);if(!N){return L}if(L.removeEventListener){L.removeEventListener(K,N,false)}else{L.detachEvent("on"+K,N)}D(O,J,M);return L},fire:function(L,K,J){L=$(L);if(L==document&&document.createEvent&&!L.dispatchEvent){L=document.documentElement}var M;if(document.createEvent){M=document.createEvent("HTMLEvents");M.initEvent("dataavailable",true,true)}else{M=document.createEventObject();M.eventType="ondataavailable"}M.eventName=K;M.memo=J||{};if(document.createEvent){L.dispatchEvent(M)}else{L.fireEvent(M.eventType,M)}return Event.extend(M)}}})());Object.extend(Event,Event.Methods);Element.addMethods({fire:Event.fire,observe:Event.observe,stopObserving:Event.stopObserving});Object.extend(document,{fire:Element.Methods.fire.methodize(),observe:Element.Methods.observe.methodize(),stopObserving:Element.Methods.stopObserving.methodize(),loaded:false});(function(){var B;function A(){if(document.loaded){return }if(B){window.clearInterval(B)}document.fire("dom:loaded");document.loaded=true}if(document.addEventListener){if(Prototype.Browser.WebKit){B=window.setInterval(function(){if(/loaded|complete/.test(document.readyState)){A()}},0);Event.observe(window,"load",A)}else{document.addEventListener("DOMContentLoaded",A,false)}}else{document.write("<script id=__onDOMContentLoaded defer src=//:><\/script>");$("__onDOMContentLoaded").onreadystatechange=function(){if(this.readyState=="complete"){this.onreadystatechange=null;A()}}}})();Hash.toQueryString=Object.toQueryString;var Toggle={display:Element.toggle};Element.Methods.childOf=Element.Methods.descendantOf;var Insertion={Before:function(A,B){return Element.insert(A,{before:B})},Top:function(A,B){return Element.insert(A,{top:B})},Bottom:function(A,B){return Element.insert(A,{bottom:B})},After:function(A,B){return Element.insert(A,{after:B})}};var $continue=new Error('"throw $continue" is deprecated, use "return" instead');var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},within:function(B,A,C){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(B,A,C)}this.xcomp=A;this.ycomp=C;this.offset=Element.cumulativeOffset(B);return(C>=this.offset[1]&&C<this.offset[1]+B.offsetHeight&&A>=this.offset[0]&&A<this.offset[0]+B.offsetWidth)},withinIncludingScrolloffsets:function(B,A,D){var C=Element.cumulativeScrollOffset(B);this.xcomp=A+C[0]-this.deltaX;this.ycomp=D+C[1]-this.deltaY;this.offset=Element.cumulativeOffset(B);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+B.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+B.offsetWidth)},overlap:function(B,A){if(!B){return 0}if(B=="vertical"){return((this.offset[1]+A.offsetHeight)-this.ycomp)/A.offsetHeight}if(B=="horizontal"){return((this.offset[0]+A.offsetWidth)-this.xcomp)/A.offsetWidth}},cumulativeOffset:Element.Methods.cumulativeOffset,positionedOffset:Element.Methods.positionedOffset,absolutize:function(A){Position.prepare();return Element.absolutize(A)},relativize:function(A){Position.prepare();return Element.relativize(A)},realOffset:Element.Methods.cumulativeScrollOffset,offsetParent:Element.Methods.getOffsetParent,page:Element.Methods.viewportOffset,clone:function(B,C,A){A=A||{};return Element.clonePosition(C,B,A)}};if(!document.getElementsByClassName){document.getElementsByClassName=function(B){function A(C){return C.blank()?null:"[contains(concat(' ', @class, ' '), ' "+C+" ')]"}B.getElementsByClassName=Prototype.BrowserFeatures.XPath?function(C,E){E=E.toString().strip();var D=/\s/.test(E)?$w(E).map(A).join(""):A(E);return D?document._getElementsByXPath(".//*"+D,C):[]}:function(E,F){F=F.toString().strip();var G=[],H=(/\s/.test(F)?$w(F):null);if(!H&&!F){return G}var C=$(E).getElementsByTagName("*");F=" "+F+" ";for(var D=0,J,I;J=C[D];D++){if(J.className&&(I=" "+J.className+" ")&&(I.include(F)||(H&&H.all(function(K){return !K.toString().blank()&&I.include(" "+K+" ")})))){G.push(Element.extend(J))}}return G};return function(D,C){return $(C||document.body).getElementsByClassName(D)}}(Element.Methods)}Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(A){this.element=$(A)},_each:function(A){this.element.className.split(/\s+/).select(function(B){return B.length>0})._each(A)},set:function(A){this.element.className=A},add:function(A){if(this.include(A)){return }this.set($A(this).concat(A).join(" "))},remove:function(A){if(!this.include(A)){return }this.set($A(this).without(A).join(" "))},toString:function(){return $A(this).join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);Element.addMethods();var Scriptaculous={Version:"1.8.1",require:function(B){document.write('<script type="text/javascript" src="'+B+'"><\/script>')},REQUIRED_PROTOTYPE:"1.6.0",load:function(){function B(D){var A=D.split(".");return parseInt(A[0])*100000+parseInt(A[1])*1000+parseInt(A[2])}if((typeof Prototype=="undefined")||(typeof Element=="undefined")||(typeof Element.Methods=="undefined")||(B(Prototype.Version)<B(Scriptaculous.REQUIRED_PROTOTYPE))){throw ("script.aculo.us requires the Prototype JavaScript framework >= "+Scriptaculous.REQUIRED_PROTOTYPE)}$A(document.getElementsByTagName("script")).findAll(function(A){return(A.src&&A.src.match(/scriptaculous\.js(\?.*)?$/))}).each(function(E){var A=E.src.replace(/scriptaculous\.js(\?.*)?$/,"");var F=E.src.match(/\?.*load=([a-z,]*)/);(F?F[1]:"builder,effects,dragdrop,controls,slider,sound").split(",").each(function(C){Scriptaculous.require(A+C+".js")})})}};Scriptaculous.load();String.prototype.parseColor=function(){var D="#";if(this.slice(0,4)=="rgb("){var E=this.slice(4,this.length-1).split(",");var F=0;do{D+=parseInt(E[F]).toColorPart()}while(++F<3)}else{if(this.slice(0,1)=="#"){if(this.length==4){for(var F=1;F<4;F++){D+=(this.charAt(F)+this.charAt(F)).toLowerCase()}}if(this.length==7){D=this.toLowerCase()}}}return(D.length==7?D:(arguments[0]||this))};Element.collectTextNodes=function(B){return $A($(B).childNodes).collect(function(A){return(A.nodeType==3?A.nodeValue:(A.hasChildNodes()?Element.collectTextNodes(A):""))}).flatten().join("")};Element.collectTextNodesIgnoreClass=function(C,D){return $A($(C).childNodes).collect(function(A){return(A.nodeType==3?A.nodeValue:((A.hasChildNodes()&&!Element.hasClassName(A,D))?Element.collectTextNodesIgnoreClass(A,D):""))}).flatten().join("")};Element.setContentZoom=function(C,D){C=$(C);C.setStyle({fontSize:(D/100)+"em"});if(Prototype.Browser.WebKit){window.scrollBy(0,0)}return C};Element.getInlineOpacity=function(B){return $(B).style.opacity||""};Element.forceRerendering=function(D){try{D=$(D);var E=document.createTextNode(" ");D.appendChild(E);D.removeChild(E)}catch(F){}};var Effect={_elementDoesNotExistError:{name:"ElementDoesNotExistError",message:"The specified DOM element does not exist, but is required for this effect to operate"},Transitions:{linear:Prototype.K,sinoidal:function(B){return(-Math.cos(B*Math.PI)/2)+0.5},reverse:function(B){return 1-B},flicker:function(B){var B=((-Math.cos(B*Math.PI)/4)+0.75)+Math.random()/4;return B>1?1:B},wobble:function(B){return(-Math.cos(B*Math.PI*(9*B))/2)+0.5},pulse:function(D,C){C=C||5;return(((D%(1/C))*C).round()==0?((D*C*2)-(D*C*2).floor()):1-((D*C*2)-(D*C*2).floor()))},spring:function(B){return 1-(Math.cos(B*4.5*Math.PI)*Math.exp(-B*6))},none:function(B){return 0},full:function(B){return 1}},DefaultOptions:{duration:1,fps:100,sync:false,from:0,to:1,delay:0,queue:"parallel"},tagifyText:function(C){var D="position:relative";if(Prototype.Browser.IE){D+=";zoom:1"}C=$(C);$A(C.childNodes).each(function(A){if(A.nodeType==3){A.nodeValue.toArray().each(function(B){C.insertBefore(new Element("span",{style:D}).update(B==" "?String.fromCharCode(160):B),A)});Element.remove(A)}})},multiple:function(J,I){var G;if(((typeof J=="object")||Object.isFunction(J))&&(J.length)){G=J}else{G=$(J).childNodes}var F=Object.extend({speed:0.1,delay:0},arguments[2]||{});var H=F.delay;$A(G).each(function(A,B){new I(A,Object.extend(F,{delay:B*F.speed+H}))})},PAIRS:{slide:["SlideDown","SlideUp"],blind:["BlindDown","BlindUp"],appear:["Appear","Fade"]},toggle:function(F,E){F=$(F);E=(E||"appear").toLowerCase();var D=Object.extend({queue:{position:"end",scope:(F.id||"global"),limit:1}},arguments[2]||{});Effect[F.visible()?Effect.PAIRS[E][1]:Effect.PAIRS[E][0]](F,D)}};Effect.DefaultOptions.transition=Effect.Transitions.sinoidal;Effect.ScopedQueue=Class.create(Enumerable,{initialize:function(){this.effects=[];this.interval=null},_each:function(B){this.effects._each(B)},add:function(F){var E=new Date().getTime();var D=Object.isString(F.options.queue)?F.options.queue:F.options.queue.position;switch(D){case"front":this.effects.findAll(function(A){return A.state=="idle"}).each(function(A){A.startOn+=F.finishOn;A.finishOn+=F.finishOn});break;case"with-last":E=this.effects.pluck("startOn").max()||E;break;case"end":E=this.effects.pluck("finishOn").max()||E;break}F.startOn+=E;F.finishOn+=E;if(!F.options.queue.limit||(this.effects.length<F.options.queue.limit)){this.effects.push(F)}if(!this.interval){this.interval=setInterval(this.loop.bind(this),15)}},remove:function(B){this.effects=this.effects.reject(function(A){return A==B});if(this.effects.length==0){clearInterval(this.interval);this.interval=null}},loop:function(){var E=new Date().getTime();for(var F=0,D=this.effects.length;F<D;F++){this.effects[F]&&this.effects[F].loop(E)}}});Effect.Queues={instances:$H(),get:function(B){if(!Object.isString(B)){return B}return this.instances.get(B)||this.instances.set(B,new Effect.ScopedQueue())}};Effect.Queue=Effect.Queues.get("global");Effect.Base=Class.create({position:null,start:function(options){function codeForEvent(options,eventName){return((options[eventName+"Internal"]?"this.options."+eventName+"Internal(this);":"")+(options[eventName]?"this.options."+eventName+"(this);":""))}if(options&&options.transition===false){options.transition=Effect.Transitions.linear}this.options=Object.extend(Object.extend({},Effect.DefaultOptions),options||{});this.currentFrame=0;this.state="idle";this.startOn=this.options.delay*1000;this.finishOn=this.startOn+(this.options.duration*1000);this.fromToDelta=this.options.to-this.options.from;this.totalTime=this.finishOn-this.startOn;this.totalFrames=this.options.fps*this.options.duration;eval('this.render = function(pos){ if (this.state=="idle"){this.state="running";'+codeForEvent(this.options,"beforeSetup")+(this.setup?"this.setup();":"")+codeForEvent(this.options,"afterSetup")+'};if (this.state=="running"){pos=this.options.transition(pos)*'+this.fromToDelta+"+"+this.options.from+";this.position=pos;"+codeForEvent(this.options,"beforeUpdate")+(this.update?"this.update(pos);":"")+codeForEvent(this.options,"afterUpdate")+"}}");this.event("beforeStart");if(!this.options.sync){Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).add(this)}},loop:function(E){if(E>=this.startOn){if(E>=this.finishOn){this.render(1);this.cancel();this.event("beforeFinish");if(this.finish){this.finish()}this.event("afterFinish");return }var F=(E-this.startOn)/this.totalTime,D=(F*this.totalFrames).round();if(D>this.currentFrame){this.render(F);this.currentFrame=D}}},cancel:function(){if(!this.options.sync){Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).remove(this)}this.state="finished"},event:function(B){if(this.options[B+"Internal"]){this.options[B+"Internal"](this)}if(this.options[B]){this.options[B](this)}},inspect:function(){var B=$H();for(property in this){if(!Object.isFunction(this[property])){B.set(property,this[property])}}return"#<Effect:"+B.inspect()+",options:"+$H(this.options).inspect()+">"}});Effect.Parallel=Class.create(Effect.Base,{initialize:function(B){this.effects=B||[];this.start(arguments[1])},update:function(B){this.effects.invoke("render",B)},finish:function(B){this.effects.each(function(A){A.render(1);A.cancel();A.event("beforeFinish");if(A.finish){A.finish(B)}A.event("afterFinish")})}});Effect.Tween=Class.create(Effect.Base,{initialize:function(K,H,I){K=Object.isString(K)?$(K):K;var L=$A(arguments),J=L.last(),G=L.length==5?L[3]:null;this.method=Object.isFunction(J)?J.bind(K):Object.isFunction(K[J])?K[J].bind(K):function(A){K[J]=A};this.start(Object.extend({from:H,to:I},G||{}))},update:function(B){this.method(B)}});Effect.Event=Class.create(Effect.Base,{initialize:function(){this.start(Object.extend({duration:0},arguments[0]||{}))},update:Prototype.emptyFunction});Effect.Opacity=Class.create(Effect.Base,{initialize:function(D){this.element=$(D);if(!this.element){throw (Effect._elementDoesNotExistError)}if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){this.element.setStyle({zoom:1})}var C=Object.extend({from:this.element.getOpacity()||0,to:1},arguments[1]||{});this.start(C)},update:function(B){this.element.setOpacity(B)}});Effect.Move=Class.create(Effect.Base,{initialize:function(D){this.element=$(D);if(!this.element){throw (Effect._elementDoesNotExistError)}var C=Object.extend({x:0,y:0,mode:"relative"},arguments[1]||{});this.start(C)},setup:function(){this.element.makePositioned();this.originalLeft=parseFloat(this.element.getStyle("left")||"0");this.originalTop=parseFloat(this.element.getStyle("top")||"0");if(this.options.mode=="absolute"){this.options.x=this.options.x-this.originalLeft;this.options.y=this.options.y-this.originalTop}},update:function(B){this.element.setStyle({left:(this.options.x*B+this.originalLeft).round()+"px",top:(this.options.y*B+this.originalTop).round()+"px"})}});Effect.MoveBy=function(F,D,E){return new Effect.Move(F,Object.extend({x:E,y:D},arguments[3]||{}))};Effect.Scale=Class.create(Effect.Base,{initialize:function(F,E){this.element=$(F);if(!this.element){throw (Effect._elementDoesNotExistError)}var D=Object.extend({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100,scaleTo:E},arguments[2]||{});this.start(D)},setup:function(){this.restoreAfterFinish=this.options.restoreAfterFinish||false;this.elementPositioning=this.element.getStyle("position");this.originalStyle={};["top","left","width","height","fontSize"].each(function(A){this.originalStyle[A]=this.element.style[A]}.bind(this));this.originalTop=this.element.offsetTop;this.originalLeft=this.element.offsetLeft;var B=this.element.getStyle("font-size")||"100%";["em","px","%","pt"].each(function(A){if(B.indexOf(A)>0){this.fontSize=parseFloat(B);this.fontSizeType=A}}.bind(this));this.factor=(this.options.scaleTo-this.options.scaleFrom)/100;this.dims=null;if(this.options.scaleMode=="box"){this.dims=[this.element.offsetHeight,this.element.offsetWidth]}if(/^content/.test(this.options.scaleMode)){this.dims=[this.element.scrollHeight,this.element.scrollWidth]}if(!this.dims){this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth]}},update:function(C){var D=(this.options.scaleFrom/100)+(this.factor*C);if(this.options.scaleContent&&this.fontSize){this.element.setStyle({fontSize:this.fontSize*D+this.fontSizeType})}this.setDimensions(this.dims[0]*D,this.dims[1]*D)},finish:function(B){if(this.restoreAfterFinish){this.element.setStyle(this.originalStyle)}},setDimensions:function(F,H){var G={};if(this.options.scaleX){G.width=H.round()+"px"}if(this.options.scaleY){G.height=F.round()+"px"}if(this.options.scaleFromCenter){var I=(F-this.dims[0])/2;var J=(H-this.dims[1])/2;if(this.elementPositioning=="absolute"){if(this.options.scaleY){G.top=this.originalTop-I+"px"}if(this.options.scaleX){G.left=this.originalLeft-J+"px"}}else{if(this.options.scaleY){G.top=-I+"px"}if(this.options.scaleX){G.left=-J+"px"}}}this.element.setStyle(G)}});Effect.Highlight=Class.create(Effect.Base,{initialize:function(D){this.element=$(D);if(!this.element){throw (Effect._elementDoesNotExistError)}var C=Object.extend({startcolor:"#ffff99"},arguments[1]||{});this.start(C)},setup:function(){if(this.element.getStyle("display")=="none"){this.cancel();return }this.oldStyle={};if(!this.options.keepBackgroundImage){this.oldStyle.backgroundImage=this.element.getStyle("background-image");this.element.setStyle({backgroundImage:"none"})}if(!this.options.endcolor){this.options.endcolor=this.element.getStyle("background-color").parseColor("#ffffff")}if(!this.options.restorecolor){this.options.restorecolor=this.element.getStyle("background-color")}this._base=$R(0,2).map(function(B){return parseInt(this.options.startcolor.slice(B*2+1,B*2+3),16)}.bind(this));this._delta=$R(0,2).map(function(B){return parseInt(this.options.endcolor.slice(B*2+1,B*2+3),16)-this._base[B]}.bind(this))},update:function(B){this.element.setStyle({backgroundColor:$R(0,2).inject("#",function(F,E,A){return F+((this._base[A]+(this._delta[A]*B)).round().toColorPart())}.bind(this))})},finish:function(){this.element.setStyle(Object.extend(this.oldStyle,{backgroundColor:this.options.restorecolor}))}});Effect.ScrollTo=function(H){var I=arguments[1]||{},J=document.viewport.getScrollOffsets(),G=$(H).cumulativeOffset(),F=(window.height||document.body.scrollHeight)-document.viewport.getHeight();if(I.offset){G[1]+=I.offset}return new Effect.Tween(null,J.top,G[1]>F?F:G[1],I,function(A){scrollTo(J.left,A.round())})};Effect.Fade=function(E){E=$(E);var D=E.getInlineOpacity();var F=Object.extend({from:E.getOpacity()||1,to:0,afterFinishInternal:function(A){if(A.options.to!=0){return }A.element.hide().setStyle({opacity:D})}},arguments[1]||{});return new Effect.Opacity(E,F)};Effect.Appear=function(D){D=$(D);var C=Object.extend({from:(D.getStyle("display")=="none"?0:D.getOpacity()||0),to:1,afterFinishInternal:function(A){A.element.forceRerendering()},beforeSetup:function(A){A.element.setOpacity(A.options.from).show()}},arguments[1]||{});return new Effect.Opacity(D,C)};Effect.Puff=function(D){D=$(D);var C={opacity:D.getInlineOpacity(),position:D.getStyle("position"),top:D.style.top,left:D.style.left,width:D.style.width,height:D.style.height};return new Effect.Parallel([new Effect.Scale(D,200,{sync:true,scaleFromCenter:true,scaleContent:true,restoreAfterFinish:true}),new Effect.Opacity(D,{sync:true,to:0})],Object.extend({duration:1,beforeSetupInternal:function(A){Position.absolutize(A.effects[0].element)},afterFinishInternal:function(A){A.effects[0].element.hide().setStyle(C)}},arguments[1]||{}))};Effect.BlindUp=function(B){B=$(B);B.makeClipping();return new Effect.Scale(B,0,Object.extend({scaleContent:false,scaleX:false,restoreAfterFinish:true,afterFinishInternal:function(A){A.element.hide().undoClipping()}},arguments[1]||{}))};Effect.BlindDown=function(D){D=$(D);var C=D.getDimensions();return new Effect.Scale(D,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:C.height,originalWidth:C.width},restoreAfterFinish:true,afterSetup:function(A){A.element.makeClipping().setStyle({height:"0px"}).show()},afterFinishInternal:function(A){A.element.undoClipping()}},arguments[1]||{}))};Effect.SwitchOff=function(D){D=$(D);var C=D.getInlineOpacity();return new Effect.Appear(D,Object.extend({duration:0.4,from:0,transition:Effect.Transitions.flicker,afterFinishInternal:function(A){new Effect.Scale(A.element,1,{duration:0.3,scaleFromCenter:true,scaleX:false,scaleContent:false,restoreAfterFinish:true,beforeSetup:function(B){B.element.makePositioned().makeClipping()},afterFinishInternal:function(B){B.element.hide().undoClipping().undoPositioned().setStyle({opacity:C})}})}},arguments[1]||{}))};Effect.DropOut=function(D){D=$(D);var C={top:D.getStyle("top"),left:D.getStyle("left"),opacity:D.getInlineOpacity()};return new Effect.Parallel([new Effect.Move(D,{x:0,y:100,sync:true}),new Effect.Opacity(D,{sync:true,to:0})],Object.extend({duration:0.5,beforeSetup:function(A){A.effects[0].element.makePositioned()},afterFinishInternal:function(A){A.effects[0].element.hide().undoPositioned().setStyle(C)}},arguments[1]||{}))};Effect.Shake=function(H){H=$(H);var J=Object.extend({distance:20,duration:0.5},arguments[1]||{});var G=parseFloat(J.distance);var I=parseFloat(J.duration)/10;var F={top:H.getStyle("top"),left:H.getStyle("left")};return new Effect.Move(H,{x:G,y:0,duration:I,afterFinishInternal:function(A){new Effect.Move(A.element,{x:-G*2,y:0,duration:I*2,afterFinishInternal:function(B){new Effect.Move(B.element,{x:G*2,y:0,duration:I*2,afterFinishInternal:function(C){new Effect.Move(C.element,{x:-G*2,y:0,duration:I*2,afterFinishInternal:function(D){new Effect.Move(D.element,{x:G*2,y:0,duration:I*2,afterFinishInternal:function(E){new Effect.Move(E.element,{x:-G,y:0,duration:I,afterFinishInternal:function(L){L.element.undoPositioned().setStyle(F)}})}})}})}})}})}})};Effect.SlideDown=function(E){E=$(E).cleanWhitespace();var D=E.down().getStyle("bottom");var F=E.getDimensions();return new Effect.Scale(E,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:window.opera?0:1,scaleMode:{originalHeight:F.height,originalWidth:F.width},restoreAfterFinish:true,afterSetup:function(A){A.element.makePositioned();A.element.down().makePositioned();if(window.opera){A.element.setStyle({top:""})}A.element.makeClipping().setStyle({height:"0px"}).show()},afterUpdateInternal:function(A){A.element.down().setStyle({bottom:(A.dims[0]-A.element.clientHeight)+"px"})},afterFinishInternal:function(A){A.element.undoClipping().undoPositioned();A.element.down().undoPositioned().setStyle({bottom:D})}},arguments[1]||{}))};Effect.SlideUp=function(E){E=$(E).cleanWhitespace();var D=E.down().getStyle("bottom");var F=E.getDimensions();return new Effect.Scale(E,window.opera?0:1,Object.extend({scaleContent:false,scaleX:false,scaleMode:"box",scaleFrom:100,scaleMode:{originalHeight:F.height,originalWidth:F.width},restoreAfterFinish:true,afterSetup:function(A){A.element.makePositioned();A.element.down().makePositioned();if(window.opera){A.element.setStyle({top:""})}A.element.makeClipping().show()},afterUpdateInternal:function(A){A.element.down().setStyle({bottom:(A.dims[0]-A.element.clientHeight)+"px"})},afterFinishInternal:function(A){A.element.hide().undoClipping().undoPositioned();A.element.down().undoPositioned().setStyle({bottom:D})}},arguments[1]||{}))};Effect.Squish=function(B){return new Effect.Scale(B,window.opera?1:0,{restoreAfterFinish:true,beforeSetup:function(A){A.element.makeClipping()},afterFinishInternal:function(A){A.element.hide().undoClipping()}})};Effect.Grow=function(O){O=$(O);var P=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.full},arguments[1]||{});var I={top:O.style.top,left:O.style.left,height:O.style.height,width:O.style.width,opacity:O.getInlineOpacity()};var K=O.getDimensions();var J,L;var M,N;switch(P.direction){case"top-left":J=L=M=N=0;break;case"top-right":J=K.width;L=N=0;M=-K.width;break;case"bottom-left":J=M=0;L=K.height;N=-K.height;break;case"bottom-right":J=K.width;L=K.height;M=-K.width;N=-K.height;break;case"center":J=K.width/2;L=K.height/2;M=-K.width/2;N=-K.height/2;break}return new Effect.Move(O,{x:J,y:L,duration:0.01,beforeSetup:function(A){A.element.hide().makeClipping().makePositioned()},afterFinishInternal:function(A){new Effect.Parallel([new Effect.Opacity(A.element,{sync:true,to:1,from:0,transition:P.opacityTransition}),new Effect.Move(A.element,{x:M,y:N,sync:true,transition:P.moveTransition}),new Effect.Scale(A.element,100,{scaleMode:{originalHeight:K.height,originalWidth:K.width},sync:true,scaleFrom:window.opera?1:0,transition:P.scaleTransition,restoreAfterFinish:true})],Object.extend({beforeSetup:function(B){B.effects[0].element.setStyle({height:"0px"}).show()},afterFinishInternal:function(B){B.effects[0].element.undoClipping().undoPositioned().setStyle(I)}},P))}})};Effect.Shrink=function(K){K=$(K);var L=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.none},arguments[1]||{});var G={top:K.style.top,left:K.style.left,height:K.style.height,width:K.style.width,opacity:K.getInlineOpacity()};var H=K.getDimensions();var I,J;switch(L.direction){case"top-left":I=J=0;break;case"top-right":I=H.width;J=0;break;case"bottom-left":I=0;J=H.height;break;case"bottom-right":I=H.width;J=H.height;break;case"center":I=H.width/2;J=H.height/2;break}return new Effect.Parallel([new Effect.Opacity(K,{sync:true,to:0,from:1,transition:L.opacityTransition}),new Effect.Scale(K,window.opera?1:0,{sync:true,transition:L.scaleTransition,restoreAfterFinish:true}),new Effect.Move(K,{x:I,y:J,sync:true,transition:L.moveTransition})],Object.extend({beforeStartInternal:function(A){A.effects[0].element.makePositioned().makeClipping()},afterFinishInternal:function(A){A.effects[0].element.hide().undoClipping().undoPositioned().setStyle(G)}},L))};Effect.Pulsate=function(I){I=$(I);var J=arguments[1]||{};var F=I.getInlineOpacity();var G=J.transition||Effect.Transitions.sinoidal;var H=function(A){return G(1-Effect.Transitions.pulse(A,J.pulses))};H.bind(G);return new Effect.Opacity(I,Object.extend(Object.extend({duration:2,from:0,afterFinishInternal:function(A){A.element.setStyle({opacity:F})}},J),{transition:H}))};Effect.Fold=function(D){D=$(D);var C={top:D.style.top,left:D.style.left,width:D.style.width,height:D.style.height};D.makeClipping();return new Effect.Scale(D,5,Object.extend({scaleContent:false,scaleX:false,afterFinishInternal:function(A){new Effect.Scale(D,1,{scaleContent:false,scaleY:false,afterFinishInternal:function(B){B.element.hide().undoClipping().setStyle(C)}})}},arguments[1]||{}))};Effect.Morph=Class.create(Effect.Base,{initialize:function(E){this.element=$(E);if(!this.element){throw (Effect._elementDoesNotExistError)}var D=Object.extend({style:{}},arguments[1]||{});if(!Object.isString(D.style)){this.style=$H(D.style)}else{if(D.style.include(":")){this.style=D.style.parseStyle()}else{this.element.addClassName(D.style);this.style=$H(this.element.getStyles());this.element.removeClassName(D.style);var F=this.element.getStyles();this.style=this.style.reject(function(A){return A.value==F[A.key]});D.afterFinishInternal=function(A){A.element.addClassName(A.options.style);A.transforms.each(function(B){A.element.style[B.style]=""})}}}this.start(D)},setup:function(){function B(A){if(!A||["rgba(0, 0, 0, 0)","transparent"].include(A)){A="#ffffff"}A=A.parseColor();return $R(0,2).map(function(D){return parseInt(A.slice(D*2+1,D*2+3),16)})}this.transforms=this.style.map(function(A){var H=A[0],I=A[1],J=null;if(I.parseColor("#zzzzzz")!="#zzzzzz"){I=I.parseColor();J="color"}else{if(H=="opacity"){I=parseFloat(I);if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){this.element.setStyle({zoom:1})}}else{if(Element.CSS_LENGTH.test(I)){var K=I.match(/^([\+\-]?[0-9\.]+)(.*)$/);I=parseFloat(K[1]);J=(K.length==3)?K[2]:null}}}var L=this.element.getStyle(H);return{style:H.camelize(),originalValue:J=="color"?B(L):parseFloat(L||0),targetValue:J=="color"?B(I):I,unit:J}}.bind(this)).reject(function(A){return((A.originalValue==A.targetValue)||(A.unit!="color"&&(isNaN(A.originalValue)||isNaN(A.targetValue))))})},update:function(E){var F={},H,G=this.transforms.length;while(G--){F[(H=this.transforms[G]).style]=H.unit=="color"?"#"+(Math.round(H.originalValue[0]+(H.targetValue[0]-H.originalValue[0])*E)).toColorPart()+(Math.round(H.originalValue[1]+(H.targetValue[1]-H.originalValue[1])*E)).toColorPart()+(Math.round(H.originalValue[2]+(H.targetValue[2]-H.originalValue[2])*E)).toColorPart():(H.originalValue+(H.targetValue-H.originalValue)*E).toFixed(3)+(H.unit===null?"":H.unit)}this.element.setStyle(F,true)}});Effect.Transform=Class.create({initialize:function(B){this.tracks=[];this.options=arguments[1]||{};this.addTracks(B)},addTracks:function(B){B.each(function(D){D=$H(D);var A=D.values().first();this.tracks.push($H({ids:D.keys().first(),effect:Effect.Morph,options:{style:A}}))}.bind(this));return this},play:function(){return new Effect.Parallel(this.tracks.map(function(F){var H=F.get("ids"),I=F.get("effect"),J=F.get("options");var G=[$(H)||$$(H)].flatten();return G.map(function(A){return new I(A,Object.extend({sync:true},J))})}).flatten(),this.options)}});Element.CSS_PROPERTIES=$w("backgroundColor backgroundPosition borderBottomColor borderBottomStyle borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderSpacing borderTopColor borderTopStyle borderTopWidth bottom clip color fontSize fontWeight height left letterSpacing lineHeight marginBottom marginLeft marginRight marginTop markerOffset maxHeight maxWidth minHeight minWidth opacity outlineColor outlineOffset outlineWidth paddingBottom paddingLeft paddingRight paddingTop right textIndent top width wordSpacing zIndex");Element.CSS_LENGTH=/^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/;String.__parseStyleElement=document.createElement("div");String.prototype.parseStyle=function(){var D,C=$H();if(Prototype.Browser.WebKit){D=new Element("div",{style:this}).style}else{String.__parseStyleElement.innerHTML='<div style="'+this+'"></div>';D=String.__parseStyleElement.childNodes[0].style}Element.CSS_PROPERTIES.each(function(A){if(D[A]){C.set(A,D[A])}});if(Prototype.Browser.IE&&this.include("opacity")){C.set("opacity",this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1])}return C};if(document.defaultView&&document.defaultView.getComputedStyle){Element.getStyles=function(D){var C=document.defaultView.getComputedStyle($(D),null);return Element.CSS_PROPERTIES.inject({},function(B,A){B[A]=C[A];return B})}}else{Element.getStyles=function(F){F=$(F);var D=F.currentStyle,E;E=Element.CSS_PROPERTIES.inject({},function(B,A){B[A]=D[A];return B});if(!E.opacity){E.opacity=F.getOpacity()}return E}}Effect.Methods={morph:function(C,D){C=$(C);new Effect.Morph(C,Object.extend({style:D},arguments[2]||{}));return C},visualEffect:function(I,G,J){I=$(I);var H=G.dasherize().camelize(),F=H.charAt(0).toUpperCase()+H.substring(1);new Effect[F](I,J);return I},highlight:function(D,C){D=$(D);new Effect.Highlight(D,C);return D}};$w("fade appear grow shrink fold blindUp blindDown slideUp slideDown pulsate shake puff squish switchOff dropOut").each(function(B){Effect.Methods[B]=function(A,D){A=$(A);Effect[B.charAt(0).toUpperCase()+B.substring(1)](A,D);return A}});$w("getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles").each(function(B){Effect.Methods[B]=Element[B]});Element.addMethods(Effect.Methods);var sIFR=new function(){var self=this;var ClassNames={ACTIVE:"sIFR-active",UNLOADING:"sIFR-unloading",REPLACED:"sIFR-replaced",IGNORE:"sIFR-ignore",ALTERNATE:"sIFR-alternate",CLASS:"sIFR-class",LAYOUT:"sIFR-layout",FLASH:"sIFR-flash",FIX_FOCUS:"sIFR-fixfocus",DUMMY:"sIFR-dummy"};ClassNames.IGNORE_CLASSES=[ClassNames.REPLACED,ClassNames.IGNORE,ClassNames.ALTERNATE];this.MIN_FONT_SIZE=6;this.MAX_FONT_SIZE=126;this.FLASH_PADDING_BOTTOM=5;this.VERSION="408";this.isActive=false;this.isEnabled=true;this.fixHover=true;this.autoInitialize=true;this.setPrefetchCookie=false;this.cookiePath="/";this.domains=[];this.forceWidth=true;this.fitExactly=false;this.forceTextTransform=true;this.useDomLoaded=true;this.useStyleCheck=false;this.hasFlashClassSet=false;this.repaintOnResize=true;this.replacements=[];var elementCount=0;var isInitialized=false;function Errors(){this.fire=function(id){if(this[id+"Alert"]){alert(this[id+"Alert"])}throw new Error(this[id])};this.isFile="sIFR: Did not activate because the page is being loaded from the filesystem.";this.isFileAlert="Hi!\n\nThanks for using sIFR on your page. Unfortunately sIFR couldn't activate, because it was loaded directly from your computer.\nDue to Flash security restrictions, you need to load sIFR through a web server.\n\nWe apologize for the inconvenience."}function Util(sIFR){function capitalize($){return $.toLocaleUpperCase()}this.normalize=function(str){return str.replace(/\n|\r|\xA0/g,Util.SINGLE_WHITESPACE).replace(/\s+/g,Util.SINGLE_WHITESPACE)};this.textTransform=function(type,str){switch(type){case"uppercase":return str.toLocaleUpperCase();case"lowercase":return str.toLocaleLowerCase();case"capitalize":return str.replace(/^\w|\s\w/g,capitalize)}return str};this.toHexString=function(str){if(str.charAt(0)!="#"||str.length!=4&&str.length!=7){return str}str=str.substring(1);return"0x"+(str.length==3?str.replace(/(.)(.)(.)/,"$1$1$2$2$3$3"):str)};this.toJson=function(obj,strFunc){var json="";switch(typeof (obj)){case"string":json='"'+strFunc(obj)+'"';break;case"number":case"boolean":json=obj.toString();break;case"object":json=[];for(var prop in obj){if(obj[prop]==Object.prototype[prop]){continue}json.push('"'+prop+'":'+this.toJson(obj[prop]))}json="{"+json.join(",")+"}";break}return json};this.convertCssArg=function(arg){if(!arg){return{}}if(typeof (arg)=="object"){if(arg.constructor==Array){arg=arg.join("")}else{return arg}}var obj={};var rules=arg.split("}");for(var i=0;i<rules.length;i++){var $=rules[i].match(/([^\s{]+)\s*\{(.+)\s*;?\s*/);if(!$||$.length!=3){continue}if(!obj[$[1]]){obj[$[1]]={}}var properties=$[2].split(";");for(var j=0;j<properties.length;j++){var $2=properties[j].match(/\s*([^:\s]+)\s*\:\s*([^;]+)/);if(!$2||$2.length!=3){continue}obj[$[1]][$2[1]]=$2[2].replace(/\s+$/,"")}}return obj};this.extractFromCss=function(css,selector,property,remove){var value=null;if(css&&css[selector]&&css[selector][property]){value=css[selector][property];if(remove){delete css[selector][property]}}return value};this.cssToString=function(arg){var css=[];for(var selector in arg){var rule=arg[selector];if(rule==Object.prototype[selector]){continue}css.push(selector,"{");for(var property in rule){if(rule[property]==Object.prototype[property]){continue}var value=rule[property];if(Util.UNIT_REMOVAL_PROPERTIES[property]){value=parseInt(value,10)}css.push(property,":",value,";")}css.push("}")}return css.join("")};this.escape=function(str){return escape(str).replace(/\+/g,"%2B")};this.encodeVars=function(vars){return vars.join("&").replace(/%/g,"%25")};this.copyProperties=function(from,to){for(var property in from){if(to[property]===undefined){to[property]=from[property]}}return to};this.domain=function(){var domain="";try{domain=document.domain}catch(e){}return domain};this.domainMatches=function(domain,match){if(match=="*"||match==domain){return true}var wildcard=match.lastIndexOf("*");if(wildcard>-1){match=match.substr(wildcard+1);var matchPosition=domain.lastIndexOf(match);if(matchPosition>-1&&(matchPosition+match.length)==domain.length){return true}}return false};this.uriEncode=function(s){return encodeURI(decodeURIComponent(s))};this.delay=function(ms,func,scope){var args=Array.prototype.slice.call(arguments,3);setTimeout(function(){func.apply(scope,args)},ms)}}Util.UNIT_REMOVAL_PROPERTIES={leading:true,"margin-left":true,"margin-right":true,"text-indent":true};Util.SINGLE_WHITESPACE=" ";function DomUtil(sIFR){var self=this;function getDimensionFromStyle(node,property,offsetProperty){var dimension=self.getStyleAsInt(node,property,sIFR.ua.ie);if(dimension==0){dimension=node[offsetProperty];for(var i=3;i<arguments.length;i++){dimension-=self.getStyleAsInt(node,arguments[i],true)}}return dimension}this.getBody=function(){return document.getElementsByTagName("body")[0]||null};this.querySelectorAll=function(selector){return window.parseSelector(selector)};this.addClass=function(name,node){if(node){node.className=((node.className||"")==""?"":node.className+" ")+name}};this.removeClass=function(name,node){if(node){node.className=node.className.replace(new RegExp("(^|\\s)"+name+"(\\s|$)"),"").replace(/^\s+|(\s)\s+/g,"$1")}};this.hasClass=function(name,node){return new RegExp("(^|\\s)"+name+"(\\s|$)").test(node.className)};this.hasOneOfClassses=function(names,node){for(var i=0;i<names.length;i++){if(this.hasClass(names[i],node)){return true}}return false};this.ancestorHasClass=function(node,name){node=node.parentNode;while(node&&node.nodeType==1){if(this.hasClass(name,node)){return true}node=node.parentNode}return false};this.create=function(name,className){var node=document.createElementNS?document.createElementNS(DomUtil.XHTML_NS,name):document.createElement(name);if(className){node.className=className}return node};this.getComputedStyle=function(node,property){var result;if(document.defaultView&&document.defaultView.getComputedStyle){var style=document.defaultView.getComputedStyle(node,null);result=style?style[property]:null}else{if(node.currentStyle){result=node.currentStyle[property]}}return result||""};this.getStyleAsInt=function(node,property,requirePx){var value=this.getComputedStyle(node,property);if(requirePx&&!/px$/.test(value)){return 0}return parseInt(value)||0};this.getWidthFromStyle=function(node){return getDimensionFromStyle(node,"width","offsetWidth","paddingRight","paddingLeft","borderRightWidth","borderLeftWidth")};this.getHeightFromStyle=function(node){return getDimensionFromStyle(node,"height","offsetHeight","paddingTop","paddingBottom","borderTopWidth","borderBottomWidth")};this.getDimensions=function(node){var width=node.offsetWidth;var height=node.offsetHeight;if(width==0||height==0){for(var i=0;i<node.childNodes.length;i++){var child=node.childNodes[i];if(child.nodeType!=1){continue}width=Math.max(width,child.offsetWidth);height=Math.max(height,child.offsetHeight)}}return{width:width,height:height}};this.getViewport=function(){return{width:window.innerWidth||document.documentElement.clientWidth||this.getBody().clientWidth,height:window.innerHeight||document.documentElement.clientHeight||this.getBody().clientHeight}};this.blurElement=function(element){try{element.blur();return }catch(e){}var input=this.create("input");input.style.width="0px";input.style.height="0px";element.parentNode.appendChild(input);input.focus();input.blur();input.parentNode.removeChild(input)}}DomUtil.XHTML_NS="http://www.w3.org/1999/xhtml";function UserAgentDetection(sIFR){var ua=navigator.userAgent.toLowerCase();var product=(navigator.product||"").toLowerCase();var platform=navigator.platform.toLowerCase();this.parseVersion=UserAgentDetection.parseVersion;this.macintosh=/^mac/.test(platform);this.windows=/^win/.test(platform);this.quicktime=false;this.opera=/opera/.test(ua);this.konqueror=/konqueror/.test(product);this.ie=false
/*@cc_on || true @*/
;this.ieSupported=this.ie&&!/ppc|smartphone|iemobile|msie\s5\.5/.test(ua)
/*@cc_on && @_jscript_version >= 5.5 @*/
;this.ieWin=this.windows&&this.ie
/*@cc_on && @_jscript_version >= 5.1 @*/
;this.windows=this.windows&&(!this.ie||this.ieWin);this.ieMac=this.macintosh&&this.ie
/*@cc_on && @_jscript_version < 5.1 @*/
;this.macintosh=this.macintosh&&(!this.ie||this.ieMac);this.safari=/safari/.test(ua);this.webkit=!this.konqueror&&/applewebkit/.test(ua);this.khtml=this.webkit||this.konqueror;this.gecko=!this.webkit&&product=="gecko";this.ieVersion=this.ie&&/.*msie\s(\d\.\d)/.exec(ua)?this.parseVersion(RegExp.$1):"0";this.operaVersion=this.opera&&/.*opera(\s|\/)(\d+\.\d+)/.exec(ua)?this.parseVersion(RegExp.$2):"0";this.webkitVersion=this.webkit&&/.*applewebkit\/(\d+).*/.exec(ua)?this.parseVersion(RegExp.$1):"0";this.geckoVersion=this.gecko&&/.*rv:\s*([^\)]+)\)\s+gecko/.exec(ua)?this.parseVersion(RegExp.$1):"0";this.konquerorVersion=this.konqueror&&/.*konqueror\/([\d\.]+).*/.exec(ua)?this.parseVersion(RegExp.$1):"0";this.flashVersion=0;if(this.ieWin){var axo;var stop=false;try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(e){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");this.flashVersion=this.parseVersion("6");axo.AllowScriptAccess="always"}catch(e){stop=this.flashVersion==this.parseVersion("6")}if(!stop){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){}}}if(!stop&&axo){this.flashVersion=this.parseVersion(/([\d,?]+)/.exec(axo.GetVariable("$version"))[1].replace(/,/g,"."))}}else{if(navigator.plugins&&navigator.plugins["Shockwave Flash"]){this.flashVersion=this.parseVersion(navigator.plugins["Shockwave Flash"].description.replace(/\D*(\d+\.?\d*)\s*r(\d+)/,"$1$2"));var i=0;while(this.flashVersion>=UserAgentDetection.MIN_FLASH_VERSION&&i<navigator.mimeTypes.length){var mime=navigator.mimeTypes[i];if(mime.type=="application/x-shockwave-flash"&&mime.enabledPlugin.description.toLowerCase().indexOf("quicktime")>-1){this.flashVersion=this.parseVersion("0");this.quicktime=true}i++}}}this.flash=this.flashVersion>=UserAgentDetection.MIN_FLASH_VERSION;this.transparencySupport=this.macintosh||this.windows;this.computedStyleSupport=this.ie||!!document.defaultView.getComputedStyle;this.requiresPrefetch=this.ieWin||this.khtml;this.fixFocus=this.gecko&&this.windows;this.nativeDomLoaded=this.gecko||this.webkit&&this.webkitVersion>=this.parseVersion("525")||this.konqueror&&this.konquerorMajor>this.parseVersion("03")||this.opera;this.mustCheckStyle=this.khtml||this.opera;this.forcePageLoad=this.webkit&&this.webkitVersion<this.parseVersion("523");this.properDocument=typeof (document.location)=="object";this.supported=this.flash&&this.properDocument&&(!this.ie||this.ieSupported)&&this.computedStyleSupport&&(!this.opera||this.operaVersion>=this.parseVersion("9.50"))&&(!this.webkit||this.webkitVersion>=this.parseVersion("412"))&&(!this.gecko||this.geckoVersion>=this.parseVersion("1.8.0.12"))&&(!this.konqueror)}UserAgentDetection.parseVersion=function(s){return s.replace(/(^|\D)(\d)(?=\D|$)/g,"$10000$2")};UserAgentDetection.MIN_FLASH_VERSION=UserAgentDetection.parseVersion("8");function FragmentIdentifier(sIFR){this.fix=sIFR.ua.ieWin&&window.location.hash!="";var cachedTitle;this.cache=function(){cachedTitle=document.title};function doFix(){document.title=cachedTitle}this.restore=function(){if(this.fix){setTimeout(doFix,0)}}}function PageLoad(sIFR){var dummy=null;function pollLoad(){try{if(sIFR.ua.ie||document.readyState!="loaded"&&document.readyState!="complete"){document.documentElement.doScroll("left")}}catch(e){return setTimeout(pollLoad,10)}afterDomLoad()}function afterDomLoad(){if(sIFR.useStyleCheck){checkStyle()}else{if(!sIFR.ua.mustCheckStyle){fire(null,true)}}}function checkStyle(){dummy=sIFR.dom.create("div",ClassNames.DUMMY);sIFR.dom.getBody().appendChild(dummy);pollStyle()}function pollStyle(){if(sIFR.dom.getComputedStyle(dummy,"marginLeft")=="42px"){afterStyle()}else{setTimeout(pollStyle,10)}}function afterStyle(){if(dummy&&dummy.parentNode){dummy.parentNode.removeChild(dummy)}dummy=null;fire(null,true)}function fire(evt,preserveReplacements){sIFR.initialize(preserveReplacements);if(evt&&evt.type=="load"){if(document.removeEventListener){document.removeEventListener("DOMContentLoaded",fire,false)}if(window.removeEventListener){window.removeEventListener("load",fire,false)}}}this.attach=function(){if(window.addEventListener){window.addEventListener("load",fire,false)}else{window.attachEvent("onload",fire)}if(!sIFR.useDomLoaded||sIFR.ua.forcePageLoad||sIFR.ua.ie&&window.top!=window){return }if(sIFR.ua.nativeDomLoaded){document.addEventListener("DOMContentLoaded",afterDomLoad,false)}else{if(sIFR.ua.ie||sIFR.ua.khtml){pollLoad()}}}}var PREFETCH_COOKIE="sifrFetch";function Prefetch(sIFR){var hasPrefetched=false;this.fetchMovies=function(movies){if(sIFR.setPrefetchCookie&&new RegExp(";?"+PREFETCH_COOKIE+"=true;?").test(document.cookie)){return }try{hasPrefetched=true;prefetch(movies)}catch(e){if(sIFR.debug){throw e}}if(sIFR.setPrefetchCookie){document.cookie=PREFETCH_COOKIE+"=true;path="+sIFR.cookiePath}};this.clear=function(){if(!hasPrefetched){return }try{var nodes=document.getElementsByTagName("script");for(var i=nodes.length-1;i>=0;i--){var node=nodes[i];if(node.type=="sifr/prefetch"){node.parentNode.removeChild(node)}}}catch(e){}};function prefetch(args){for(var i=0;i<args.length;i++){document.write('<script defer type="sifr/prefetch" src="'+args[i].src+'"><\/script>')}}}function BrokenFlashIE(sIFR){var active=sIFR.ua.ie;var fixCallbacks=active&&sIFR.ua.flashVersion<sIFR.ua.parseVersion("9.0.115");var resetMovies={};var registry={};this.register=function(flashNode){if(!active){return }var id=flashNode.id;registry[id]=flashNode;delete resetMovies[id];if(fixCallbacks){window[id]=flashNode}};this.reset=function(){if(!active){return false}for(var i=0;i<sIFR.replacements.length;i++){var flash=sIFR.replacements[i];var flashNode=registry[flash.id];if(!resetMovies[flash.id]&&(!flashNode.parentNode||flashNode.parentNode.nodeType==11)){flash.resetMovie();resetMovies[flash.id]=true}}return true}}function FlashInteractor(sIFR,id,vars,forceWidth,events){this.sIFR=sIFR;this.id=id;this.vars=vars;this.movie=null;this.__forceWidth=forceWidth;this.__events=events;this.__resizing=0}FlashInteractor.prototype={getFlashElement:function(){return document.getElementById(this.id)},getAlternate:function(){return document.getElementById(this.id+"_alternate")},getAncestor:function(){var ancestor=this.getFlashElement().parentNode;return !this.sIFR.dom.hasClass(ClassNames.FIX_FOCUS,ancestor)?ancestor:ancestor.parentNode},available:function(){var flashNode=this.getFlashElement();return flashNode&&flashNode.parentNode},call:function(type){var flashNode=this.getFlashElement();return Function.prototype.apply.call(flashNode[type],flashNode,Array.prototype.slice.call(arguments,1))},attempt:function(){if(!this.available()){return false}try{this.call.apply(this,arguments)}catch(e){if(this.sIFR.debug){throw e}return false}return true},updateVars:function(name,value){for(var i=0;i<this.vars.length;i++){if(this.vars[i].split("=")[0]==name){this.vars[i]=name+"="+value;break}}var vars=this.sIFR.util.encodeVars(this.vars);this.movie.injectVars(this.getFlashElement(),vars);this.movie.injectVars(this.movie.html,vars)},storeSize:function(type,value){this.movie.setSize(type,value);this.updateVars(type,value)},fireEvent:function(name){if(this.available()&&this.__events[name]){this.sIFR.util.delay(0,this.__events[name],this,this)}},resizeFlashElement:function(height,width,firstResize){if(!this.available()){return }this.__resizing++;var flashNode=this.getFlashElement();flashNode.setAttribute("height",height);this.updateVars("renderheight",height);this.storeSize("height",height);if(width!==null){flashNode.setAttribute("width",width);this.movie.setSize("width",width)}if(this.__events.onReplacement){this.sIFR.util.delay(0,this.__events.onReplacement,this,this);delete this.__events.onReplacement}if(firstResize){this.sIFR.util.delay(0,function(){this.attempt("scaleMovie");this.__resizing--},this)}else{this.__resizing--}},blurFlashElement:function(){if(this.available()){this.sIFR.dom.blurElement(this.getFlashElement())}},resetMovie:function(){this.sIFR.util.delay(0,this.movie.reset,this.movie,this.getFlashElement(),this.getAlternate())},resizeAfterScale:function(){if(this.available()&&this.__resizing==0){this.sIFR.util.delay(0,this.resize,this)}},resize:function(){if(!this.available()){return }this.__resizing++;var flashNode=this.getFlashElement();var currentWidth=flashNode.offsetWidth;if(currentWidth==0){return }var originalWidth=flashNode.getAttribute("width");var originalHeight=flashNode.getAttribute("height");var ancestor=this.getAncestor();var minHeight=this.sIFR.dom.getHeightFromStyle(ancestor);flashNode.style.width="1px";flashNode.style.height="1px";ancestor.style.minHeight=minHeight+"px";var nodes=this.getAlternate().childNodes;var clones=[];for(var i=0;i<nodes.length;i++){var node=nodes[i].cloneNode(true);clones.push(node);ancestor.appendChild(node)}var width=this.sIFR.dom.getWidthFromStyle(ancestor);for(var i=0;i<clones.length;i++){ancestor.removeChild(clones[i])}flashNode.style.width=flashNode.style.height=ancestor.style.minHeight="";flashNode.setAttribute("width",this.__forceWidth?width:originalWidth);flashNode.setAttribute("height",originalHeight);if(sIFR.ua.ie){flashNode.style.display="none";var repaint=flashNode.offsetHeight;flashNode.style.display=""}if(width!=currentWidth){if(this.__forceWidth){this.storeSize("width",width)}this.attempt("resize",width)}this.__resizing--},replaceText:function(content,alternate){var escapedContent=this.sIFR.util.escape(content);if(!this.attempt("replaceText",escapedContent)){return false}this.updateVars("content",escapedContent);var node=this.getAlternate();if(alternate){while(node.firstChild){node.removeChild(node.firstChild)}for(var i=0;i<alternate.length;i++){node.appendChild(alternate[i])}}else{try{node.innerHTML=content}catch(e){}}return true},changeCSS:function(css){css=this.sIFR.util.escape(this.sIFR.util.cssToString(this.sIFR.util.convertCssArg(css)));this.updateVars("css",css);return this.attempt("changeCSS",css)}};var MovieCreator=new function(){this.create=function(sIFR,brokenFlash,node,fixFocus,id,src,width,height,vars,wmode,backgroundColor){var klass=sIFR.ua.ie?IEFlashMovie:FlashMovie;return new klass(sIFR,brokenFlash,node,fixFocus,id,src,width,height,["flashvars",vars,"wmode",wmode,"bgcolor",backgroundColor,"allowScriptAccess","always","quality","best"])};function FlashMovie(sIFR,brokenFlash,node,fixFocus,id,src,width,height,params){var object=sIFR.dom.create("object",ClassNames.FLASH);var attrs=["type","application/x-shockwave-flash","id",id,"name",id,"data",src,"width",width,"height",height];for(var i=0;i<attrs.length;i+=2){object.setAttribute(attrs[i],attrs[i+1])}var insertion=object;if(fixFocus){insertion=dom.create("div",ClassNames.FIX_FOCUS);insertion.appendChild(object)}for(var i=0;i<params.length;i+=2){if(params[i]=="name"){continue}var param=dom.create("param");param.setAttribute("name",params[i]);param.setAttribute("value",params[i+1]);object.appendChild(param)}while(node.firstChild){node.removeChild(node.firstChild)}node.appendChild(insertion);this.html=insertion.cloneNode(true)}FlashMovie.prototype={reset:function(flashNode,alternate){flashNode.parentNode.replaceChild(this.html.cloneNode(true),flashNode)},setSize:function(type,value){this.html.setAttribute(type,value)},injectVars:function(flash,encodedVars){var params=flash.getElementsByTagName("param");for(var i=0;i<params.length;i++){if(params[i].getAttribute("name")=="flashvars"){params[i].setAttribute("value",encodedVars);break}}}};function IEFlashMovie(sIFR,brokenFlash,node,fixFocus,id,src,width,height,params){this.dom=sIFR.dom;this.broken=brokenFlash;this.html='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="'+id+'" width="'+width+'" height="'+height+'" class="'+ClassNames.FLASH+'"><param name="movie" value="'+src+'"></param></object>';var paramsHtml="";for(var i=0;i<params.length;i+=2){paramsHtml+='<param name="'+params[i]+'" value="'+params[i+1]+'"></param>'}this.html=this.html.replace(/(<\/object>)/,paramsHtml+"$1");node.innerHTML=this.html;this.broken.register(node.firstChild)}IEFlashMovie.prototype={reset:function(flashNode,alternate){alternate=alternate.cloneNode(true);var parent=flashNode.parentNode;parent.innerHTML=this.html;this.broken.register(parent.firstChild);parent.appendChild(alternate)},setSize:function(type,value){this.html=this.html.replace(type=="height"?/(height)="\d+"/:/(width)="\d+"/,'$1="'+value+'"')},injectVars:function(flash,encodedVars){if(flash!=this.html){return }this.html=this.html.replace(/(flashvars(=|\"\svalue=)\")[^\"]+/,"$1"+encodedVars)}}};this.errors=new Errors(self);var util=this.util=new Util(self);var dom=this.dom=new DomUtil(self);var ua=this.ua=new UserAgentDetection(self);var hacks={fragmentIdentifier:new FragmentIdentifier(self),pageLoad:new PageLoad(self),prefetch:new Prefetch(self),brokenFlashIE:new BrokenFlashIE(self)};this.__resetBrokenMovies=hacks.brokenFlashIE.reset;var replaceKwargsStore={kwargs:[],replaceAll:function(preserve){for(var i=0;i<this.kwargs.length;i++){self.replace(this.kwargs[i])}if(!preserve){this.kwargs=[]}}};this.activate=function(){if(!ua.supported||!this.isEnabled||this.isActive||!isValidDomain()||isFile()){return }this.isActive=true;this.setFlashClass();hacks.fragmentIdentifier.cache();if(!this.autoInitialize){return }hacks.pageLoad.attach();if(ua.ie){window.attachEvent("onunload",function(){dom.addClass(ClassNames.UNLOADING,document.documentElement)})}};this.setFlashClass=function(){if(this.hasFlashClassSet){return }dom.addClass(ClassNames.ACTIVE,dom.getBody()||document.documentElement);this.hasFlashClassSet=true};this.removeFlashClass=function(){if(!this.hasFlashClassSet){return }dom.removeClass(ClassNames.ACTIVE,dom.getBody());dom.removeClass(ClassNames.ACTIVE,document.documentElement);this.hasFlashClassSet=false};this.initialize=function(preserveReplacements){if(!this.isActive||!this.isEnabled){return }if(isInitialized){if(!preserveReplacements){replaceKwargsStore.replaceAll(false)}return }isInitialized=true;replaceKwargsStore.replaceAll(preserveReplacements);if(self.repaintOnResize){if(window.addEventListener){window.addEventListener("resize",resize,false)}else{window.attachEvent("onresize",resize)}}hacks.prefetch.clear()};this.replace=function(kwargs,mergeKwargs){if(!ua.supported){return }if(mergeKwargs){kwargs=util.copyProperties(kwargs,mergeKwargs)}if(!isInitialized){return replaceKwargsStore.kwargs.push(kwargs)}if(this.onReplacementStart){this.onReplacementStart(kwargs)}var nodes=kwargs.elements||dom.querySelectorAll(kwargs.selector);if(nodes.length==0){return }var src=getSource(kwargs.src);var css=util.convertCssArg(kwargs.css);var filters=getFilters(kwargs.filters);var forceSingleLine=kwargs.forceSingleLine===true;var preventWrap=kwargs.preventWrap===true&&!forceSingleLine;var fitExactly=forceSingleLine||(kwargs.fitExactly==null?this.fitExactly:kwargs.fitExactly)===true;var forceWidth=fitExactly||(kwargs.forceWidth==null?this.forceWidth:kwargs.forceWidth)===true;var ratios=kwargs.ratios||[];var pixelFont=kwargs.pixelFont===true;var tuneHeight=parseInt(kwargs.tuneHeight)||0;var events=!!kwargs.onRelease||!!kwargs.onRollOver||!!kwargs.onRollOut;if(fitExactly){util.extractFromCss(css,".sIFR-root","text-align",true)}var fontSize=util.extractFromCss(css,".sIFR-root","font-size",true)||"0";var backgroundColor=util.extractFromCss(css,".sIFR-root","background-color",true)||"#FFFFFF";var kerning=util.extractFromCss(css,".sIFR-root","kerning",true)||"";var opacity=util.extractFromCss(css,".sIFR-root","opacity",true)||"100";var cursor=util.extractFromCss(css,".sIFR-root","cursor",true)||"default";var leading=parseInt(util.extractFromCss(css,".sIFR-root","leading"))||0;var gridFitType=kwargs.gridFitType||(util.extractFromCss(css,".sIFR-root","text-align")=="right")?"subpixel":"pixel";var textTransform=this.forceTextTransform===false?"none":util.extractFromCss(css,".sIFR-root","text-transform",true)||"none";fontSize=/^\d+(px)?$/.test(fontSize)?parseInt(fontSize):0;opacity=parseFloat(opacity)<1?100*parseFloat(opacity):opacity;var cssText=kwargs.modifyCss?"":util.cssToString(css);var wmode=kwargs.wmode||"";if(!wmode){if(kwargs.transparent){wmode="transparent"}else{if(kwargs.opaque){wmode="opaque"}}}if(wmode=="transparent"){if(!ua.transparencySupport){wmode="opaque"}else{backgroundColor="transparent"}}for(var i=0;i<nodes.length;i++){var node=nodes[i];if(dom.hasOneOfClassses(ClassNames.IGNORE_CLASSES,node)||dom.ancestorHasClass(node,ClassNames.ALTERNATE)){continue}var dimensions=dom.getDimensions(node);var height=dimensions.height;var width=dimensions.width;var display=dom.getComputedStyle(node,"display");if(!height||!width||!display||display=="none"){continue}width=dom.getWidthFromStyle(node);var size,lines;if(!fontSize){var calculation=calculate(node);size=Math.min(this.MAX_FONT_SIZE,Math.max(this.MIN_FONT_SIZE,calculation.fontSize));if(pixelFont){size=Math.max(8,8*Math.round(size/8))}lines=calculation.lines;if(isNaN(lines)||!isFinite(lines)||lines==0){lines=1}if(lines>1&&leading){height+=Math.round((lines-1)*leading)}}else{size=fontSize;lines=1}var alternate=dom.create("span",ClassNames.ALTERNATE);var contentNode=node.cloneNode(true);node.parentNode.appendChild(contentNode);for(var j=0,l=contentNode.childNodes.length;j<l;j++){alternate.appendChild(contentNode.childNodes[j].cloneNode(true))}if(kwargs.modifyContent){kwargs.modifyContent(contentNode,kwargs.selector)}if(kwargs.modifyCss){cssText=kwargs.modifyCss(css,contentNode,kwargs.selector)}var content=parseContent(contentNode,textTransform,kwargs.uriEncode);contentNode.parentNode.removeChild(contentNode);if(kwargs.modifyContentString){content.text=kwargs.modifyContentString(content.text,kwargs.selector)}if(content.text==""){continue}height=Math.round(lines*size);var renderHeight=Math.round(lines*getRatio(size,ratios)*size)+this.FLASH_PADDING_BOTTOM+tuneHeight;var forcedWidth=forceWidth?width:"100%";var id="sIFR_replacement_"+elementCount++;var vars=["id="+id,"content="+util.escape(content.text),"width="+width,"height="+height,"renderheight="+renderHeight,"link="+util.escape(content.primaryLink.href||""),"target="+util.escape(content.primaryLink.target||""),"size="+size,"css="+util.escape(cssText),"cursor="+cursor,"tunewidth="+(kwargs.tuneWidth||0),"tuneheight="+tuneHeight,"offsetleft="+(kwargs.offsetLeft||""),"offsettop="+(kwargs.offsetTop||""),"fitexactly="+fitExactly,"preventwrap="+preventWrap,"forcesingleline="+forceSingleLine,"antialiastype="+(kwargs.antiAliasType||""),"thickness="+(kwargs.thickness||""),"sharpness="+(kwargs.sharpness||""),"kerning="+kerning,"gridfittype="+gridFitType,"flashfilters="+filters,"opacity="+opacity,"blendmode="+(kwargs.blendMode||""),"selectable="+(kwargs.selectable==null?"true":kwargs.selectable===true),"fixhover="+(this.fixHover===true),"events="+events,"version="+this.VERSION];var encodedVars=util.encodeVars(vars);var interactor=new FlashInteractor(self,id,vars,forceWidth,{onReplacement:kwargs.onReplacement,onRollOver:kwargs.onRollOver,onRollOut:kwargs.onRollOut,onRelease:kwargs.onRelease});interactor.movie=MovieCreator.create(sIFR,hacks.brokenFlashIE,node,ua.fixFocus&&kwargs.fixFocus,id,src,forcedWidth,renderHeight,encodedVars,wmode,backgroundColor);this.replacements.push(interactor);this.replacements[id]=interactor;if(kwargs.selector){if(!this.replacements[kwargs.selector]){this.replacements[kwargs.selector]=[interactor]}else{this.replacements[kwargs.selector].push(interactor)}}alternate.setAttribute("id",id+"_alternate");node.appendChild(alternate);dom.addClass(ClassNames.REPLACED,node)}hacks.fragmentIdentifier.restore();var atmo=com.atmospherebbdo;atmo.Util.runAfterEvent("sifr-replace-selector("+kwargs.selector+")-completed",atmo.Sifr.fireIfCompleted);atmo.Util.eventNotify("sifr-replace-selector("+kwargs.selector+")-started")};this.getReplacementByFlashElement=function(node){for(var i=0;i<self.replacements.length;i++){if(self.replacements[i].id==node.getAttribute("id")){return self.replacements[i]}}};this.redraw=function(){for(var i=0;i<self.replacements.length;i++){self.replacements[i].resetMovie()}};function isValidDomain(){if(self.domains.length==0){return true}var domain=util.domain();for(var i=0;i<self.domains.length;i++){if(util.domainMatches(domain,self.domains[i])){return true}}return false}function isFile(){if(document.location.protocol=="file:"){if(self.debug){self.errors.fire("isFile")}return true}return false}function getSource(src){if(ua.ie&&src.charAt(0)=="/"){src=window.location.toString().replace(/([^:]+)(:\/?\/?)([^\/]+).*/,"$1$2$3")+src}return src}function getRatio(size,ratios){for(var i=0;i<ratios.length;i+=2){if(size<=ratios[i]){return ratios[i+1]}}return ratios[ratios.length-1]||1}function getFilters(obj){var filters=[];for(var filter in obj){if(obj[filter]==Object.prototype[filter]){continue}var properties=obj[filter];filter=[filter.replace(/filter/i,"")+"Filter"];for(var property in properties){if(properties[property]==Object.prototype[property]){continue}filter.push(property+":"+util.escape(util.toJson(properties[property],util.toHexString)))}filters.push(filter.join(","))}return util.escape(filters.join(";"))}function resize(evt){var current=resize.viewport;var viewport=dom.getViewport();if(current&&viewport.width==current.width&&viewport.height==current.height){return }resize.viewport=viewport;if(self.replacements.length==0){return }if(resize.timer){clearTimeout(resize.timer)}resize.timer=setTimeout(function(){delete resize.timer;for(var i=0;i<self.replacements.length;i++){self.replacements[i].resize()}},200)}function calculate(node){var fontSize,lines;if(!ua.ie){fontSize=dom.getStyleAsInt(node,"lineHeight");lines=Math.floor(dom.getStyleAsInt(node,"height")/fontSize)}else{if(ua.ie){var fontSize=dom.getComputedStyle(node,"fontSize");if(fontSize.indexOf("px")>0){fontSize=parseInt(fontSize)}else{var html=node.innerHTML;node.style.visibility="visible";node.style.overflow="visible";node.style.position="static";node.style.zoom="normal";node.style.writingMode="lr-tb";node.style.width=node.style.height="auto";node.style.maxWidth=node.style.maxHeight=node.style.styleFloat="none";var rectNode=node;var hasLayout=node.currentStyle.hasLayout;if(hasLayout){node.innerHTML='<div class="'+ClassNames.LAYOUT+'">X<br>X<br>X</div>';rectNode=node.firstChild}else{node.innerHTML="X<br>X<br>X"}var rects=rectNode.getClientRects();fontSize=rects[1].bottom-rects[1].top;fontSize=Math.ceil(fontSize*0.8);if(hasLayout){node.innerHTML='<div class="'+ClassNames.LAYOUT+'">'+html+"</div>";rectNode=node.firstChild}else{node.innerHTML=html}rects=rectNode.getClientRects();lines=rects.length;if(hasLayout){node.innerHTML=html}node.style.visibility=node.style.width=node.style.height=node.style.maxWidth=node.style.maxHeight=node.style.overflow=node.style.styleFloat=node.style.position=node.style.zoom=node.style.writingMode=""}}}return{fontSize:fontSize,lines:lines}}function parseContent(source,textTransform,uriEncode){uriEncode=uriEncode||util.uriEncode;var stack=[],content=[];var primaryLink=null;var nodes=source.childNodes;var whiteSpaceEnd=false,firstText=false;var i=0;while(i<nodes.length){var node=nodes[i];if(node.nodeType==3&&/^(a)$/i.test(node.parentNode.nodeName)){var attributes=[];var nodeName=node.parentNode.nodeName.toLowerCase();var className=node.parentNode.className||"";if(/\s+/.test(className)){if(className.indexOf(ClassNames.CLASS)>-1){className=className.match("(\\s|^)"+ClassNames.CLASS+"-([^\\s$]*)(\\s|$)")[2]}else{className=className.match(/^([^\s]+)/)[1]}}if(className!=""){attributes.push('class="'+className+'"')}if(nodeName=="a"){var href=uriEncode(node.parentNode.getAttribute("href")||"");var target=node.parentNode.getAttribute("target")||"";attributes.push('href="'+href+'"','target="'+target+'"');if(!primaryLink){primaryLink={href:href,target:target}}}content.push("<"+nodeName+(attributes.length>0?" ":"")+attributes.join(" ")+">");var text=util.textTransform(textTransform,util.normalize(node.nodeValue)).replace(/</g,"&lt;");text=text.replace(/^\s+/,"");content.push(text);content.push("</",nodeName,">");firstText=true}else{if(node.nodeType==3){var text=util.textTransform(textTransform,util.normalize(node.nodeValue)).replace(/</g,"&lt;");if(whiteSpaceEnd&&firstText){text=text.replace(/^\s+/,"")}content.push(text);whiteSpaceEnd=/\s$/.test(text);firstText=false}}if(node.nodeType==1&&!/^(style|script)$/i.test(node.nodeName)){var attributes=[];var nodeName=node.nodeName.toLowerCase();var className=node.className||"";if(/\s+/.test(className)){if(className.indexOf(ClassNames.CLASS)>-1){className=className.match("(\\s|^)"+ClassNames.CLASS+"-([^\\s$]*)(\\s|$)")[2]}else{className=className.match(/^([^\s]+)/)[1]}}if(className!=""){attributes.push('class="'+className+'"')}if(nodeName=="a"){var href=uriEncode(node.getAttribute("href")||"");var target=node.getAttribute("target")||"";attributes.push('href="'+href+'"','target="'+target+'"');if(!primaryLink){primaryLink={href:href,target:target}}}content.push("<"+nodeName+(attributes.length>0?" ":"")+attributes.join(" ")+">");firstText=true;if(node.hasChildNodes()){stack.push(i);i=0;nodes=node.childNodes;continue}else{if(!/^(br|img)$/i.test(node.nodeName)){content.push("</",node.nodeName.toLowerCase(),">")}}}if(stack.length>0&&!node.nextSibling){do{i=stack.pop();nodes=node.parentNode.parentNode.childNodes;node=nodes[i];if(node){content.push("</",node.nodeName.toLowerCase(),">")}}while(i==nodes.length-1&&stack.length>0)}i++}return{text:content.join("").replace(/^\s+|\s+$|\s*(<br>)\s*/g,"$1"),primaryLink:primaryLink||{}}}};var parseSelector=(function(){var B=/\s*,\s*/;var A=/\s*([\s>+~(),]|^|$)\s*/g;var L=/([\s>+~,]|[^(]\+|^)([#.:@])/g;var F=/(^|\))[^\s>+~]/g;var M=/(\)|^)/;var K=/[\s#.:>+~()@]|[^\s#.:>+~()@]+/g;function H(R,P){P=P||document.documentElement;var S=R.split(B),X=[];for(var U=0;U<S.length;U++){var N=[P],W=G(S[U]);for(var T=0;T<W.length;){var Q=W[T++],O=W[T++],V="";if(W[T]=="("){while(W[T++]!=")"&&T<W.length){V+=W[T]}V=V.slice(0,-1)}N=I(N,Q,O,V)}X=X.concat(N)}return X}function G(N){var O=N.replace(A,"$1").replace(L,"$1*$2").replace(F,D);return O.match(K)||[]}function D(N){return N.replace(M,"$1 ")}function I(N,P,Q,O){return(H.selectors[P])?H.selectors[P](N,Q,O):[]}var E={toArray:function(O){var N=[];for(var P=0;P<O.length;P++){N.push(O[P])}return N}};var C={isTag:function(O,N){return(N=="*")||(N.toLowerCase()==O.nodeName.toLowerCase())},previousSiblingElement:function(N){do{N=N.previousSibling}while(N&&N.nodeType!=1);return N},nextSiblingElement:function(N){do{N=N.nextSibling}while(N&&N.nodeType!=1);return N},hasClass:function(N,O){return(O.className||"").match("(^|\\s)"+N+"(\\s|$)")},getByTag:function(N,O){return O.getElementsByTagName(N)}};var J={"#":function(N,P){for(var O=0;O<N.length;O++){if(N[O].getAttribute("id")==P){return[N[O]]}}return[]}," ":function(O,Q){var N=[];for(var P=0;P<O.length;P++){N=N.concat(E.toArray(C.getByTag(Q,O[P])))}return N},">":function(O,R){var N=[];for(var Q=0,S;Q<O.length;Q++){S=O[Q];for(var P=0,T;P<S.childNodes.length;P++){T=S.childNodes[P];if(T.nodeType==1&&C.isTag(T,R)){N.push(T)}}}return N},".":function(O,Q){var N=[];for(var P=0,R;P<O.length;P++){R=O[P];if(C.hasClass([Q],R)){N.push(R)}}return N},":":function(N,P,O){return(H.pseudoClasses[P])?H.pseudoClasses[P](N,O):[]}};H.selectors=J;H.pseudoClasses={};H.util=E;H.dom=C;return H})();if(Object.isUndefined(com)){var com={}}if(Object.isUndefined(com.qualcomm)){com.qualcomm={}}com.qualcomm.platform={Mac:navigator.platform.indexOf("Mac")>-1,Linux:navigator.platform.indexOf("Linux")>-1,Windows:navigator.platform.indexOf("Win")>-1,iPhone:navigator.platform.indexOf("iPhone")>-1};com.atmospherebbdo=com.qualcomm;com.qualcomm.Config={Search:{defaultText:"Type your question here"},Flash:{minVersion:9},TopNav:{"who-we-are":{},innovation:{},"products-and-services":{},"news-and-events":{},"financial-information":{},"global-citizenship":{},careers:{}},PreloaderSettings:{images:["http://www.qualcomm.com/common/images/global-navigation/global-navigation-thumbs.jpg","http://www.qualcomm.com/common/images/local-navigation/bg-light-blue.png","http://www.qualcomm.com/common/images/local-navigation/arrow-white-up.gif","http://www.qualcomm.com/common/images/local-navigation/arrow-white-down.gif","http://www.qualcomm.com/common/images/local-navigation/arrow-white-right.gif","http://www.qualcomm.com/common/images/global-navigation/blank.gif","http://www.qualcomm.com/common/images/global-navigation/menu-item-arrow.gif","http://www.qualcomm.com/common/images/global-navigation/top-level.gif"]},addThis:{addthis_pub:"qualcomm",addthis_header_color:"#FFFFFF",addthis_header_background:"#FF7F00",addthis_options:"favorites, delicious, digg, facebook, linkedin, reddit, slashdot, technorati, twitter, more"},SifrSettings:{swfs:{gothamThin:{src:"http://www.qualcomm.com/common/swf/sifrLatinThin.swf"},gothamBook:{src:"http://www.qualcomm.com/common/swf/sifrLatinBook.swf"}},configs:[{qualcomm:{font:"gothamThin"},selector:".copy-holder .inner h2",css:{".sIFR-root":{color:"#FFFFFF"}},wmode:"transparent"},{qualcomm:{font:"gothamThin"},selector:".tabs h2",css:{".sIFR-root":{color:"#4A0080"}},wmode:"transparent"},{qualcomm:{font:"gothamThin"},selector:".press-releases h2",css:{".sIFR-root":{color:"#4A0080",kerning:true,"letter-spacing":-1.5}},wmode:"opaque"},{qualcomm:{font:"gothamThin"},selector:"h2",css:{".sIFR-root":{color:"#4A0080",kerning:true,"letter-spacing":-2.5}},wmode:"opaque"},{qualcomm:{font:"gothamBook"},selector:"div.also-interested-in h4",css:{".sIFR-root":{color:"#4A0080"}},wmode:"transparent"},{qualcomm:{font:"gothamBook"},selector:"#recruiting-locations h4",css:{".sIFR-root":{color:"#4A0080"}},wmode:"transparent"},{qualcomm:{font:"gothamThin"},selector:"#content h4",css:{".sIFR-root":{color:"#4A0080",kerning:true,"letter-spacing":-0.5}},wmode:"transparent"},{qualcomm:{font:"gothamThin"},selector:"#sidebar h4",css:{".sIFR-root":{color:"#4A0080"}},wmode:"transparent"},{qualcomm:{font:"gothamThin"},selector:"li.level-1 a",css:{".sIFR-root":{color:"#FFFFFF",cursor:"pointer"},a:{"text-decoration":"none",color:"#FFFFFF"},"a:hover":{"text-decoration":"none",color:"#FFFFFF"}},wmode:"transparent"},{qualcomm:{font:"gothamThin"},selector:".search-box .category a",css:{".sIFR-root":{color:"#FFFFFF",cursor:"pointer"},a:{"text-decoration":"none",color:"#FFFFFF"},"a:hover":{"text-decoration":"none",color:"#FFFFFF"}},wmode:"transparent"},{qualcomm:{font:"gothamThin"},selector:".inner .use-sifr",css:{".sIFR-root":{color:"#FFFFFF"}},wmode:"transparent"}]}};var addthis_pub=com.qualcomm.Config.addThis.addthis_pub;var addthis_header_color=com.qualcomm.Config.addThis.addthis_header_color;var addthis_header_background=com.qualcomm.Config.addThis.addthis_header_background;var addthis_options=com.qualcomm.Config.addThis.addthis_options;if(Object.isUndefined(com.qualcomm.cookies)){com.qualcomm.cookies={}}com.qualcomm.cookies.writeCookie=function(D,E,B){var A="";if(B){var C=new Date();C.setTime(C.getTime()+(B*24*60*60*1000));A="; expires="+C.toGMTString()}document.cookie=D+"="+E+A+"; path=/"};com.qualcomm.cookies.readCookie=function(B){var D=B+"=";var A=document.cookie.split(";");for(var C=0;C<A.length;C++){var E=A[C];while(E.charAt(0)==" "){E=E.substring(1,E.length)}if(E.indexOf(D)==0){return E.substring(D.length,E.length)}}return null};com.qualcomm.Dev={linkInvalid:function(){alert("This link is not active on the testing site.")}};com.qualcomm.Events={};com.qualcomm.Events.OrderedEventQueue=function(){this._className="OrderedEventQueue";this._log=[];this._subscribers=[];this._notifications=[]};com.qualcomm.Events.OrderedEventQueue.prototype={subscribe:function(){var A=arguments[0];if(arguments.length>1){A=new com.qualcomm.Events.Subscriber(arguments[0],arguments[1])}if(this.hasFired(A._name)){this._subscribers.push(A);A.fire();return }this._subscribers.push(A)},remove:function(){},notify:function(B){var D=this.subscribersTo(B);this._log.push("firing event: "+B);this._notifications.push(B);for(var C=0,A=D.length;C<A;C++){D[C].fire()}},hasFired:function(C){for(var B=0,A=this._notifications.length;B<A;B++){if(this._notifications[B]==C){return true}}return false},contains:function(A){return !!this.subscribersTo(A)},subscribersTo:function(B){var D=[];for(var C=0,A=this._subscribers.length;C<A;C++){if(this._subscribers[C].is(B)){D.push(this._subscribers[C])}}return D},log:function(){return this._log}};com.qualcomm.Events.Subscriber=function(A,B){this._className="Subscriber";this._fn=B;this._name=A};com.qualcomm.Events.Subscriber.prototype={is:function(A){switch(typeof A){case"object":return A===this;case"function":return A===this._fn;break;case"string":return A===this._name;break}return false},fire:function(){return this._fn()}};function addHover(A){if(mouseOverCheck(A,this)){this.addClassName("hover")}}function removeHover(A){if(mouseOverCheck(A,this)){this.removeClassName("hover")}}function mouseOverCheck(C,B){if(!["mouseout","mouseover"].include(C.type)){return false}var A;if(C.relatedTarget){A=C.relatedTarget}else{if(C.type=="mouseout"){A=C.toElement}else{A=C.fromElement}}while(A&&A!=B){A=A.parentNode}return(A!=B)}com.qualcomm.Page={applyGlobalNavigationStyles:function(){var E=$$("#global-navigation li");var D=$("global-navigation");var H=$$("#global-navigation > li");var C=[];F();H.each(function(I){C.push(I);C=C.concat(I.descendants())});if(Prototype.Browser.IE6&&E.length){B()}else{if(!com.qualcomm.platform.Linux){G()}}A();function F(){Util.log("entering rewriteGlobalNav()");var I=$$("#global-navigation li.menu-item div.image-holder > img");for(var K=0,J=I.length;K<J;K++){Element.replace(I[K],'<div class="thumb"></div>')}Util.log("leaving rewriteGlobalNav()")}function G(){if(E.length){E.each(function(I){var K=addHover.bind(I);var J=removeHover.bind(I);I.observe("mouseover",K);I.observe("mouseout",J)})}}function B(){var I=new IframeShim();E.each(function(J){var L=function(M){addHover.call(J,M);I.positionUnder(J)};var K=function(M){if(!C.include(M.toElement)){I.hide()}removeHover.call(J,M)};J.observe("mouseover",L);J.observe("mouseout",K)})}function A(){$$("#global-navigation > li").each(function(J){var M=J.down(".menu-items");var N=M.childElements();var U=N.length;var L=new Element("img",{src:"http://www.qualcomm.com/common/images/global-navigation/dropdown-shadow-right.png"});var K=new Element("div");var W=N[U-2];for(var S=0;S<U-1;S++){var X=new Element("img",{src:"http://www.qualcomm.com/common/images/global-navigation/menu-item-arrow.gif","class":"arrow"});N[S].select(".image-holder").first().insert(X)}if(W){W.setStyle({borderBottom:"1px solid #d3d3d3"})}K.addClassName("right-shadow");K.update(L);J.appendChild(K);var O=M.getHeight();var R=parseInt(M.getStyle("left").replace(/px/,""));var Y=208;var P=294;var I=24;var T=24;var V=234;var Q=(O-T-1);K.makeClipping().setStyle({width:I+"px",height:Q+"px",left:Y+R+"px",top:J.getHeight()+"px"});L.setStyle({top:(-P+O)+"px"})})}},applyGeneralListStyles:function(A){Util.log("entering applyGeneralListStyles()");bGlobal=false;if((typeof A=="undefined")||(A==null)){A=$$("body");bGlobal=true}if((typeof A.length=="undefined")||(A.length==null)){A=$A([A])}A.each(function(B){B.select("#breadcrumb li:first-child","#accordion-panels li:first-child","#large-image-links li:first-child","#mid-size-image-links li:first-child","#video-links li:first-child","div.also-interested-in li:first-child").each(function(C){C.addClassName("first")});B.select("#breadcrumb li:last-child","#accordion-panels li:last-child","#large-image-links li:last-child","#mid-size-image-links li:last-child","#video-links li:last-child").each(function(C){C.addClassName("last")});B.select("ul").each(function(C){if(C.childElements().length==0){C.hide()}})});Util.log("leaving applyGeneralListStyles()")},applyLocalNavHoverStyles:function(){$$("#local-navigation ul li").each(function(A){A.observe("mouseover",function(){if(A.hasClassName("level-1")){if(A.hasClassName("arrow-purple-up")){A.removeClassName("arrow-purple-up");A.addClassName("arrow-white-up");A.addClassName("change-arrow-on-hover")}}else{if(A.hasClassName("level-2")){if(A.hasClassName("purple-text")){A.removeClassName("purple-text");A.addClassName("orange-text");A.addClassName("change-text-on-hover")}if(A.hasClassName("arrow-purple-up")){A.removeClassName("arrow-purple-up");A.addClassName("arrow-orange-up");A.addClassName("change-arrow-on-hover")}else{if(A.hasClassName("arrow-purple-right")){A.removeClassName("arrow-purple-right");A.addClassName("arrow-orange-right");A.addClassName("change-arrow-on-hover")}}}else{if(A.hasClassName("level-3")){if(A.hasClassName("purple-text")){A.removeClassName("purple-text");A.addClassName("orange-text");A.addClassName("bold");A.addClassName("change-text-on-hover")}if(A.hasClassName("arrow-purple-up")){A.removeClassName("arrow-purple-up");A.addClassName("arrow-orange-up");A.addClassName("change-arrow-on-hover")}else{if(A.hasClassName("arrow-purple-right")){A.removeClassName("arrow-purple-right");A.addClassName("arrow-orange-right");A.addClassName("change-arrow-on-hover")}}}else{if(A.hasClassName("level-4")){if(A.hasClassName("purple-text")){A.removeClassName("purple-text");A.addClassName("orange-text");A.addClassName("bold");A.addClassName("change-text-on-hover")}}}}}});A.observe("mouseout",function(){if(A.hasClassName("level-1")){if(A.hasClassName("change-arrow-on-hover")){if(A.hasClassName("arrow-white-up")){A.removeClassName("arrow-white-up");A.addClassName("arrow-purple-up")}A.removeClassName("change-arrow-on-hover")}}else{if(A.hasClassName("level-2")){if(A.hasClassName("change-text-on-hover")){if(A.hasClassName("orange-text")){A.removeClassName("orange-text");A.addClassName("purple-text")}A.removeClassName("change-text-on-hover")}if(A.hasClassName("change-arrow-on-hover")){if(A.hasClassName("arrow-orange-up")){A.removeClassName("arrow-orange-up");A.addClassName("arrow-purple-up")}else{if(A.hasClassName("arrow-orange-right")){A.removeClassName("arrow-orange-right");A.addClassName("arrow-purple-right")}}A.removeClassName("change-arrow-on-hover")}}else{if(A.hasClassName("level-3")){if(A.hasClassName("change-text-on-hover")){if(A.hasClassName("orange-text")){A.removeClassName("orange-text");A.removeClassName("bold");A.addClassName("purple-text")}A.removeClassName("change-text-on-hover")}if(A.hasClassName("change-arrow-on-hover")){if(A.hasClassName("arrow-orange-up")){A.removeClassName("arrow-orange-up");A.addClassName("arrow-purple-up")}else{if(A.hasClassName("arrow-orange-right")){A.removeClassName("arrow-orange-right");A.addClassName("arrow-purple-right")}}}}else{if(A.hasClassName("level-4")){if(A.hasClassName("change-text-on-hover")){if(A.hasClassName("orange-text")){A.removeClassName("orange-text");A.removeClassName("bold");A.addClassName("purple-text")}A.removeClassName("change-text-on-hover")}}}}}})})},applySpecialHoverStyles:function(){$$(".bottom a",".top a").each(function(A){var B=A.up("div");A.observe("mouseover",function(){B.addClassName("hover")});A.observe("mouseout",function(){B.removeClassName("hover")})})},applyHoverStyles:function(A){Util.log("entering applyHoverStyles()");bGlobal=false;if((typeof A=="undefined")||(A==null)){A=$$("body");bGlobal=true}if((typeof A.length=="undefined")||(A.length==null)){A=$A([A])}A.each(function(C){var B=C.select("ul.single-link > li","ul.multiple-link > li","#e2 ul#mid-size-image-links li");B.each(function(D){D.observe("mouseover",function(){this.addClassName("hover")});D.observe("mouseout",function(){this.removeClassName("hover")})})});if(bGlobal){com.qualcomm.Page.applySpecialHoverStyles();com.qualcomm.Page.applyLocalNavHoverStyles()}Util.log("leaving applyHoverStyles()")},applyGeneralListAndHoverStyles:function(A){if((typeof A=="undefined")||(A==null)){com.qualcomm.Page.applyGeneralListStyles();com.qualcomm.Page.applyHoverStyles()}else{com.qualcomm.Page.applyGeneralListStyles(A);com.qualcomm.Page.applyHoverStyles(A)}},applyPrintOnlyStyles:function(){if(com.qualcomm.Page.mediaType()!=="print"){return }$$("#header h1.logo").first().update(new Element("img",{src:"http://www.qualcomm.com/common/images/pr_print_logo.gif",width:"150",height:"32"}))},mediaType:function(){if($$("#header h1.logo a").first().getStyle("display")==="none"){return"print"}return"screen"},applySelectAllBehavior:function(){if(!$$(".select-all-link:first-child").length){return }var B=$$(".select-all-link a").first();if(B){var A=$$("#show-options input");if(A){B.writeAttribute("href","javascript:;");B.observe("click",function(){A.each(function(C){C.checked=true})})}}},applyTableStyles:function(){if(!$$("table").length){return }$$("table.calendar tbody > tr:nth-child(even)").each(function(A){A.addClassName("alternate")});$$("table.calendar td").each(function(A){if(A.cleanWhitespace().childElements().length==0){A.addClassName("empty")}})},rewriteLocalNav:function(){Util.log("entering rewriteLocalNav()");if(!$$("#local-navigation").length){Util.log("...no local nav, firing early");LocalNavDesc.notifyCompleted()}var A=new LocalNavDesc("#local-navigation");if(A&&A.top){A.write()}else{LocalNavDesc.notifyCompleted()}Util.log("leaving rewriteLocalNav()")},stylePaginationAndSiteTools:function(){var C=$$("div.pagination").first();var D=$("site-tools");if(C&&D){var E=C.up();var B=new Element("div");E.insert(B);B.insert(D);var A=new Element("div",{"class":"clear"});B.insert(A);B.insert(C);A.addClassName("line");C.addClassName("moved");D.addClassName("moved")}},setupTabs:function(A){if((typeof A=="undefined")||(A==null)){A=$$(".tabs")}if((typeof A.length=="undefined")||(A.length==null)){A=$A([A])}A.each(function(C){var B=[];var F=C.select(".buttons>li");var G=C.select(".contents>div");for(var E=0;E<F.length;E++){B.push({tab:F[E],block:G[E]})}var D=new com.qualcomm.widgets.Tabs(B)})},setSearchText:function(){},positionGlobalNavThumbs:function(){Util.log("entering positionGlobalNavThumbs()");var A=0;for(key in com.qualcomm.Config.TopNav){var C=$$("#"+key+" div.thumb");var F,B,E,D;for(F=0,l=C.length;F<l;F++){B=C[F];E=0-(A*55);D=0-(F*54);B.setStyle({backgroundPosition:E+"px "+D+"px"})}++A}Util.log("leaving positionGlobalNavThumbs()")},initPrint:function(){Util.eventNotify("init-print-started");com.qualcomm.Page.applyPrintOnlyStyles();replacing=new com.qualcomm.Sifr.replacement();com.qualcomm.Sifr.showHiddenElements();Util.runAfterEvent("sifr-all-replacements-completed",function(){Util.eventNotify("init-screen-sifr-complete")});Util.eventNotify("init-print-finished")},initScreen:function(){var B=com.qualcomm;Util.eventNotify("init-screen-started");B.Sifr.fastHide();Util.preloadImages();B.Sifr.showHiddenElements();if(com.qualcomm.Sifr.checkIsSifrAllowed()){replacing=new com.qualcomm.Sifr.replacement()}else{com.qualcomm.Page.setupTabs()}Util.runAfterEvent("sifr-all-replacements-completed",function(){if(typeof addSwfAddressListener!="undefined"){addSwfAddressListener()}com.qualcomm.Sifr.fastShow();com.qualcomm.Page.setupTabs();Util.eventNotify("init-screen-sifr-complete")});B.Page.applyGlobalNavigationStyles();B.Page.applyGeneralListAndHoverStyles();B.Page.applySelectAllBehavior();B.Page.applyTableStyles();B.Page.stylePaginationAndSiteTools();var A=$$("body#h1").length;if(!A){if(typeof B.Page.accordions!="undefined"){B.Page.accordions.setupAccordions()}}B.Page.positionGlobalNavThumbs();Util.eventNotify("init-screen-finished")},initPage:function(){Util.eventNotify("init-page-started");com.qualcomm.Session.getPageInfo();if(com.qualcomm.Page.mediaType()==="print"){com.qualcomm.Page.initPrint()}else{if(Prototype.Browser.IE&&$("h1")){Event.observe(window,"load",function(){com.qualcomm.Page.initScreen()})}else{com.qualcomm.Page.initScreen()}}Util.eventNotify("init-page-finished")}};var positionGlobalNavThumbs=com.qualcomm.Page.positionGlobalNavThumbs;var initPrint=com.qualcomm.Page.initPrint;var initScreen=com.qualcomm.Page.initScreen;var initPage=com.qualcomm.Page.initPage;com.qualcomm.Page.accordions={setupSidebarAccordion:function(){if(!$("accordion-panels")){return }var B=[];$$("#accordion-panels > li").each(function(C){var D={toggle:C.select("a.plus").first(),blocks:C.select("div.drop-block")};B.push(D)});var A=new com.qualcomm.widgets.Accordion(B,0)},setupSearchAccordion:function(){var E=$("search-accordion-panels");if(!E){return }var D=[];$$("#search-accordion-panels > li").each(function(F){var G={toggle:F.select("a.plus").first(),blocks:F.select("div.drop-block")};D.push(G)});D.push({toggle:$$("#refine-search a.show-all").first(),blocks:$$("#search-accordion-panels li div.drop-block")});D.push({toggle:$$("#refine-search a.hide-all").first(),blocks:null});var A=E.childElements().indexOf(E.select(".active").first());E.instance=new com.qualcomm.widgets.Accordion(D,A!=-1?A:undefined);var B=$$("#refine-search a.show-all").first();var C=$$("#refine-search a.hide-all").first();B.observe("click",function(){$$("#search-accordion-panels > li").each(function(F){F.addClassName("active")});this.hide();C.show()});C.observe("click",function(){$$("#search-accordion-panels > li").each(function(F){F.removeClassName("active")});this.hide();B.show()});C.hide()},setupSearchInternalToggles:function(){var A=$$("#search-accordion-panels > li div.box");if(A){A.each(function(D){var B=D.select(".show-more a").first();B.writeAttribute("href","javascript:;");var C=D.select(".additional").first();if(C){C.hide();B.observe("click",function(){C.toggleClassName("open");if(C.hasClassName("open")){B.update("Show Less");new Effect.BlindDown(C,{duration:1})}else{B.update("Show More");new Effect.BlindUp(C,{duration:1})}})}else{B.hide()}})}},setupHomepageAccordion:function(){if(!$("home-panels")){return }var A=[];$$("#home-panels > li").each(function(B){B.addClassName("active")})},setupFAQList:function(){$$("#FAQ ul.FAQ-list > li").each(function(A){var B=A.down("a");B.writeAttribute("href","javascript:;");B.observe("click",function(C){this.toggleClassName("open")}.bind(A))})},setupAccordions:function(){com.qualcomm.Page.accordions.sidebar.init();com.qualcomm.Page.accordions.setupSearchAccordion();com.qualcomm.Page.accordions.setupSearchInternalToggles();com.qualcomm.Page.accordions.setupHomepageAccordion();com.qualcomm.Page.accordions.setupFAQList()}};setupAccordions=com.qualcomm.Page.accordions.setupAccordions;setupSidebarAccordion=com.qualcomm.Page.accordions.setupSidebarAccordion;setupSearchAccordion=com.qualcomm.Page.accordions.setupSearchAccordion;setupSearchInternalToggles=com.qualcomm.Page.accordions.setupSearchInternalToggles;setupHomepageAccordion=com.qualcomm.Page.accordions.setupHomepageAccordion;setupFAQList=com.qualcomm.Page.accordions.setupFAQList;com.qualcomm.Page.accordions.sidebar={list:new Array(),types:[{selector:"li.headline-news.dynamic",klass:"News",options:{detailURL:"press_releases.xml"}},{selector:"li.videos.dynamic",klass:"Videos",options:{detailURL:"/api/videos/get"}},{selector:"li.events.dynamic",klass:"Events",options:{detailURL:"/api/events/get"}},{selector:"li.documents.dynamic",klass:"Documents",options:{detailURL:"documents.xml"}}],init:function(){var A=$("accordion-panels");if(!A){return }if(A.select("li.dynamic").length!=0){this.loading();var B=com.qualcomm.Page.accordions.sidebar;B.types.each(function(D){var C=A.select(D.selector);if(C.length>0){B.list.push(new com.qualcomm.widgets.accordions.sidebar[D.klass](C.first(),D.options))}})}else{this.loaded()}},loaded:function(){if($("accordions-loading")){$("accordions-loading").remove()}$("accordion-panels").show();com.qualcomm.Page.accordions.setupSidebarAccordion()},loading:function(){$("accordion-panels").insert({before:new Element("div",{id:"accordions-loading"}).update("Loading...")})}};com.qualcomm.Page.localizedSelector={_timeout:null,init:function(){var D=com.qualcomm.Page.localizedSelector;var A=$("localized-selector");var E=A.down(".selector-button").down("a");E.replace(new Element("span",{"class":"label"}).update(E.innerHTML));A.observe("mouseover",function(G){clearInterval(D._timeout);D._timeout=D._mouseoverHandler.delay(0.3,G)});A.observe("mouseout",function(G){clearInterval(D._timeout);D._timeout=D._mouseoutHandler.delay(0.3,G)});var C=A.select("ul li a");var B=window.location.hostname;var F=new RegExp(B.replace(/\./,".")+"/","i");C.each(function(G){if(G.readAttribute("href").match(F)){D._setCurrentLink(G)}else{if(G.match(/www\.qualcomm\.com\//)&&B.match(/jobs\.qualcomm\.com|investor\.qualcomm\.com/)){D._setCurrentLink(G)}}})},_setCurrentLink:function(A){A.up().addClassName("current");A.replace(A.innerHTML)},_mouseoverHandler:function(B){var A=$("localized-selector");var C=A.down("ul");C.show();A.addClassName("hover")},_mouseoutHandler:function(B){var A=$("localized-selector");var C=A.down("ul");C.hide();A.removeClassName("hover")}};document.observe("dom:loaded",function(){if($("localized-selector")){com.qualcomm.Page.localizedSelector.init()}});com.qualcomm.Page.Home={homeCategoriesArray:new Array(["Learning about Qualcomm","-1"],["Finding a Career","7.2,7.3,7.4,7.5,7.8,7.9"],["Investing in Qualcomm","7.2,7.3,7.4,7.5,7.8,7.9,7.14"],["Partnering with Qualcomm","7.2,7.3,7.4,7.5,7.8,7.9,7.14"],["Technical Information","7.2,7.3,7.4,7.5,7.8,7.9,7.14"],["The Latest News","-1"]),identifier:null,homeNavReq:null,sidebar:null,bannerMarkUp:function(D,B,E,C){var A=new Array();A.push("<li>");A.push('<div class="sifr-image bottom" style="width: 184px; height:88px; background: url(');A.push(D);A.push(') no-repeat 0 0;">');A.push('<a href="');A.push(B);A.push('" target="');A.push(C);A.push('" title="');A.push(E);A.push(' " style="width: 184px; height: 88px">');A.push(E);A.push("</a>");A.push('<div class="copy-holder"><div class="inner">');A.push('<p class="use-sifr">');A.push(E);A.push("</p>");A.push("</div></div></div>");A.push("</li>");finalMarkUp=A.join("");return finalMarkUp},findShowClosedProfileBanners:function(G,F){var E=new Array();var A=G.split("::");var D=A.length;try{E.push('<ul class="show-when-closed" style="overflow: visible;">');for(var B=0;B<D;B++){singleBanner=A[B].split("##");profileId=singleBanner[0];image=singleBanner[1];url=singleBanner[2];text=singleBanner[3];target=singleBanner[4];if(profileId=="All"||profileId==F||profileId.indexOf(F)!=-1){E.push(com.qualcomm.Page.Home.bannerMarkUp(image,url,text,target))}}E.push("</ul>")}catch(C){alert("EX : clsoed banner")}return E.join("")},findShowOpenProfileBanners:function(G,F){var E=new Array();var A=G.split("::");var D=A.length;E.push('<ul class="show-when-opened  " style="overflow: visible;"  >');try{for(var B=0;B<D;B++){singleBanner=A[B].split("##");profileId=singleBanner[0];image=singleBanner[1];url=singleBanner[2];text=singleBanner[3];target=singleBanner[4];if(profileId!="All"&&profileId!=F&&profileId.indexOf(F)==-1){E.push(com.qualcomm.Page.Home.bannerMarkUp(image,url,text,target))}}E.push("</ul>")}catch(C){alert("EX : open banner")}return E.join("")},homeBannerDisplay:function(D){var C=$("bannerhidden").value;var A=new Array();try{A.push('<li class="promos first active">');A.push('<a class="plus">Connect</a>');A.push('<div class="panel-content">');A.push(com.qualcomm.Page.Home.findShowClosedProfileBanners(C,D));A.push("</div>");A.push("</li>");resultantMarkUp=A.join("")}catch(B){alert("EXCE dd:"+B.description)}return resultantMarkUp},displayHomeAjaxValue:function(){var L;if(document.implementation&&document.implementation.createDocument){var F=new DOMParser();L=F.parseFromString(com.qualcomm.Page.Home.homeNavReq.responseText,"text/xml")}else{if(window.ActiveXObject){L=new ActiveXObject("Microsoft.XMLDOM");L.async="false";L.loadXML(com.qualcomm.Page.Home.homeNavReq.responseText)}}var B=new Array();try{if(L!=null){var H=L.getElementsByTagName("PRESSDATE");var K=L.getElementsByTagName("PRESSURL");var A=L.getElementsByTagName("PRESSHEADLINE");if(A.length!=0){B.push('<li class="news first active"><a href="#" class="plus">Headline News</a>');B.push('<div class="panel-content">');B.push('<ul class="show-when-closed">');var D;if(A.length>2){D=2}else{D=A.length}for(var G=0;G<D;G++){var C=H.item(G).getAttribute("date");var J=K.item(G).getAttribute("url");var I=A.item(G).getAttribute("headline");B.push('<li class="box">');B.push("<a href="+J+">");B.push(I);B.push("</a>");B.push('<div class="date">');B.push(C);B.push("</div>");B.push("</li>")}B.push("</ul>");if(A.length>2){B.push('<ul class="show-when-opened" style="overflow: visible; display: none;">');for(var G=2;G<A.length;G++){var C=H.item(G).getAttribute("date");var J=K.item(G).getAttribute("url");var I=A.item(G).getAttribute("headline");B.push('<li class="box">');B.push("<a href="+J+">");B.push(I);B.push("</a>");B.push('<div class="date">');B.push(C);B.push("</div>");B.push("</li>")}B.push("</ul>")}B.push("</div>");B.push("</li>")}return B.join("")}}catch(E){alert("exception "+E.description)}},asynchGet:function(A,B){new Ajax.Request(A,{method:"get",onSuccess:function(E){var C=new Array();com.qualcomm.Page.Home.homeNavReq=E;newsmarkup=com.qualcomm.Page.Home.displayHomeAjaxValue();try{bannermarkup=com.qualcomm.Page.Home.homeBannerDisplay(com.qualcomm.Page.Home.identifier);C.push('<ul id="home-panels">');C.push(newsmarkup);C.push(bannermarkup);C.push("</ul>");sidebar=C.join("");$("sidebar").update(sidebar);B.bind(this).defer()}catch(D){alert("EXCEPTION N: "+D)}}})},onAJAXIdentifierSelection:function(F,E){var C=null;bannermarkup=null;com.qualcomm.Page.Home.identifier=F;try{if(F!=null&&F!=""){if(com.qualcomm.Page.Home.homeCategoriesArray!=null){for(var A=0;A<com.qualcomm.Page.Home.homeCategoriesArray.length;A++){if(com.qualcomm.Page.Home.homeCategoriesArray[A][0]==F){C=com.qualcomm.Page.Home.homeCategoriesArray[A][1]}}}}}catch(B){alert("err"+B.description)}if(C!=null&&C!=""){var D="/HomeAJAXServlet?categoryid="+C+"&sid="+Math.random();com.qualcomm.Page.Home.asynchGet(D,E)}},displayHomeAjax:function(B){Util.log("entering com.qualcomm.Home.Page.displayHomeAjax()");var A=function(){var D=com.qualcomm,C=D.Config.SifrSettings;D.Sifr.showHiddenElements();D.Sifr.activate();sIFR.replace(C.swfs.gothamThin,{selector:".inner .use-sifr",css:{".sIFR-root":{color:"#FFFFFF"}},wmode:"transparent"})};com.qualcomm.Page.Home.onAJAXIdentifierSelection(B,A);Util.log("leaving com.qualcomm.Home.Page.displayHomeAjax()")},onIdentifierSelection:function(A){com.qualcomm.Home.Page.displayHomeAjax(A)},addSwfAddressListener:function(){Util.log("entering addSwfAddressListener()");var H=true,I,K,G="default",F=$$("div.story").collect(function(N){return N.id});if(!F.length){return }var C=function(N){$(N).setStyle({position:"",left:"0px",visibility:"visible"})};var L=function(N){Util.log("entering doHide() for story: "+N);$(N).setStyle({position:"absolute",left:"-100000px"});Util.log("leaving doHide() for story: "+N+" with width "+$(N).getWidth())};var D=function(N){window.scrollEffect=new Effect.ScrollTo(N,{duration:4,delay:0.5})};var J=function(){if(window.scrollEffect){window.scrollEffect.cancel()}};Event.observe(window,"click",J.bindAsEventListener(this));var E=null;var M=null;storyExists=function(O){Util.log("entering storyExists() for story: "+O);var N=document.getElementById(O);return(N&&N.hasClassName("story"))};I=function(P){if(!P||!storyExists(P)){P=G}if(E&&P==E){return }E=P;for(var O=0,N=F.length;O<N;O++){if(F[O]==P){C(F[O])}else{L(F[O])}}};K=function(){Util.log("entering onLocationChange("+O+")");var O=window.location.href,Q=O.match(/(.+)#(\S+)/);if(Q&&Q.length>0){var P=Q[1];var N=Q[2].replace(/^\//,"");if(N.charAt(N.length-1)=="/"){N=N.substring(0,N.length-1)}if(N.match(/slideshow/i)){I(N);D(N)}else{I(N)}}else{I()}Util.log("leaving onLocationChange()")};Util.runAfterEvent("sifr-all-replacements-completed",function(){K()});if(F.length>0){var B;var A=function(){if(B){window.clearTimeout(B)}if(!E||window.location.href!=M){M=window.location.href;if(H){H=false}else{K()}}B=window.setTimeout(A,500)};A()}}};bannerMarkUp=com.qualcomm.Page.Home.bannerMarkUp;findShowClosedProfileBanners=com.qualcomm.Page.Home.findShowClosedProfileBanners;findShowOpenProfileBanners=com.qualcomm.Page.Home.findShowOpenProfileBanners;homeBannerDisplay=com.qualcomm.Page.Home.homeBannerDisplay;displayHomeAjaxValue=com.qualcomm.Page.Home.displayHomeAjaxValue;asynchGet=com.qualcomm.Page.Home.asynchGet;onAJAXIdentifierSelection=com.qualcomm.Page.Home.onAJAXIdentifierSelection;displayHomeAjax=com.qualcomm.Page.Home.displayHomeAjax;onIdentifierSelection=com.qualcomm.Page.Home.onIdentifierSelection;addSwfAddressListener=com.qualcomm.Page.Home.addSwfAddressListener;initPrint=com.qualcomm.Page.Home.initPrint;initScreen=com.qualcomm.Page.Home.initScreen;initPage=com.qualcomm.Page.Home.initPage;function updateTextColor(C,B){var A=document.getElementById("global-search-field");if(B!=""){A.style.color=C}else{A.style.color="gray"}return false}function updateSearchTextValue(A){if(A!=""){globalTxtBox=document.getElementById("global-search-field");if(A=="Search..."){globalTxtBox.value="";return false}}}var sgh=null;Event.observe(window,"load",function(){if(!$("global-search-field")){return false}sgh=new QcSuggestions("sgh","global-search-field","global-suggestions","/search/suggestedterms.txt",{suggestionCount:5,onKeyUped:function(){Position.clone("global-suggestions","global-suggestions-iefix");$("global-suggestions-iefix").show()},onFocused:function(){Position.clone("global-suggestions","global-suggestions-iefix");$("global-suggestions-iefix").show()},onKeyUped:function(){$("global-suggestions-iefix").hide()},onBlured:function(){$("global-suggestions-iefix").hide()},onTimeout:function(){$("global-suggestions-iefix").hide()}});Position.clone("global-search-field","global-suggestions",{setWidth:false,setHeight:false,offsetLeft:-3,offsetTop:25})});String.prototype.addSlashes=function(){return this.replace(/(["\\\.\|\[\]\^\*\+\?\$\(\)])/g,"\\$1")};String.prototype.trim=function(){return this.replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1")};QcSuggestions=Class.create();QcSuggestions.prototype={Version:"0.0.0",initialize:function(C,D,A,B,E){this.instanceName=C;this.fieldId=D;this.suggestionsId=A;this.urlBase=B;this.setOptions(E);this.getSuggestionsList();Event.observe(this.fieldId,"keyup",this.handleKeyUp.bind(this));Event.observe(this.fieldId,"focus",this.handleFocus.bind(this));Event.observe(this.fieldId,"blur",this.handleBlur.bind(this));this._nonSuggestionKeyCodes=[13,16,17,18,27,37,38,39,40,224];this._previousFieldValue=""},setOptions:function(A){this.options={defaultFieldValue:"",updateThrottle:500,useSuggestionsTimeout:true,suggestionsTimeoutDelay:10000,suggestionCount:10,limitMatchToBeginning:false};Object.extend(this.options,A||{})},getSuggestionsList:function(){new Ajax.Request(this.urlBase,{method:"GET",onSuccess:function(A){this.possibleSuggestions=A.responseText.split("\r")}.bind(this),onFailure:function(A){}.bind(this)})},handleKeyUp:function(A){if($F(this.fieldId)!=""&&$F(this.fieldId)!=" "&&$F(this.fieldId)!=this.options.defaultFieldValue){if($F(this.fieldId)!=this._previousFieldValue&&!this._nonSuggestionKeyCodes.any(function(B){return B==Event.keyCode})){clearInterval(this.keyUpTimeoutId);this.keyUpTimeoutId=setTimeout(function(){this._previousFieldValue=$F(this.fieldId);var E="";var B=new Array();var D=$F(this.fieldId);var C=$F(this.fieldId).length;this.possibleSuggestions.each(function(K,G){if(this.options.limitMatchToBeginning){var J=new RegExp("\\W"+D.addSlashes(),"i")}else{var J=new RegExp(D.addSlashes(),"i")}var F=K.search(J);if(F!=-1&&D!=""){if(this.options.limitMatchToBeginning){F++}var I="";var H;for(H=0;H<F;H++){I+=K.substr(H,1)}I+='<span style="color: #000;">';for(H=F;H<F+C;H++){I+=K.substr(H,1)}I+="</span>";for(H=F+C;H<K.length;H++){I+=K.substr(H,1)}B.push(new Hash({display:I,original:K.replace(/\n/,"")}))}}.bind(this));if(B.length>0){E+='<div id="predictive-search-results-box" class="sr1">';E+='<div class="top"> </div>';E+='<div class="middle">';E+='<div class="presentation">';E+="<p>Are you looking for</p>";E+='<ul class="predictive-search-results">';B.each(function(F,G){if(G<this.options.suggestionCount){if(this.options.useSuggestionsTimeout){var I=document.getElementById("searchfield");var J=document.getElementById("global-search-field");if(I!=null){var H=new Template('<li style="list-style: none;"><a href="#" onmouseover="#{instanceName}.clearSuggestionsTimeout(); return false" onmouseout="#{instanceName}.startSuggestionsTimeout(); return false" onclick="document.getElementById(\'searchfield\').focus(); #{instanceName}.setFieldValue(\'#{value}\'); return false">#{display}</a></li>')}else{if(J!=null){var H=new Template('<li style="list-style: none;"><a href="#" onmouseover="#{instanceName}.clearSuggestionsTimeout(); return false" onmouseout="#{instanceName}.startSuggestionsTimeout(); return false" onclick="document.getElementById(\'global-search-field\'); #{instanceName}.setFieldValue(\'#{value}\'); return false">#{display}</a></li>')}}E+=H.evaluate({instanceName:this.instanceName,value:F.get("original"),display:F.get("display")})}else{var I=document.getElementById("searchfield");var J=document.getElementById("global-search-field");if(I!=null){var H=new Template('<li style="list-style: none;"><a href="#" onclick="document.getElementById(\'searchfield\').focus(); #{instanceName}.setFieldValue(\'#{value}\'); return false">#{display}</a></li>')}else{if(J!=null){var H=new Template('<li style="list-style: none;"><a href="#" onclick="document.getElementById(\'global-search-field\').focus(); #{instanceName}.setFieldValue(\'#{value}\'); return false">#{display}</a></li>')}}E+=H.evaluate({instanceName:this.instanceName,value:F.get("original"),display:F.get("display")})}}}.bind(this));E+="</ul>";E+="</div>";E+="</div>";E+='<div class="bottom"> </div>';E+="</div>";if(E!=""){$(this.suggestionsId).update(E).show()}if(this.options.onKeyUped){this.options.onKeyUped()}this.startSuggestionsTimeout()}else{this.clearSuggestionsTimeout();$(this.suggestionsId).hide().update()}}.bind(this),this.options.updateThrottle)}}else{$(this.suggestionsId).hide()}},handleFocus:function(A){this.clearSuggestionsTimeout();if($(this.suggestionsId).getElementsBySelector("ul").length>0&&$F(this.fieldId)!=""&&$F(this.fieldId)!=this.options.defaultFieldValue){$(this.suggestionsId).show();if(this.options.onFocused){this.options.onFocused()}}},handleBlur:function(A){this.clearSuggestionsTimeout();if($(this.suggestionsId).getElementsBySelector("ul").length>0&&$F(this.fieldId)!=""&&$F(this.fieldId)!=this.options.defaultFieldValue){setTimeout(function(){$(this.suggestionsId).hide();if(this.options.onBlured){this.options.onBlured()}}.bind(this),600)}else{if($(this.suggestionsId).getElementsBySelector("ul").length>0&&$F(this.fieldId)==""){setTimeout(function(){$(this.suggestionsId).hide().update();if(this.options.onBlured){this.options.onBlured()}}.bind(this),600)}}},setFieldValue:function(A){this.clearSuggestionsTimeout();$(this.fieldId).value=A;$(this.suggestionsId).hide().update();if(this.options.onBlured){this.options.onBlured()}},startSuggestionsTimeout:function(){this.clearSuggestionsTimeout();if(this.options.useSuggestionsTimeout){this.suggestionsTimeoutId=setTimeout(function(){$(this.suggestionsId).hide().update();if(this.options.onTimeout){this.options.onTimeout()}}.bind(this),this.options.suggestionsTimeoutDelay)}},clearSuggestionsTimeout:function(){clearInterval(this.suggestionsTimeoutId)}};QcSuggestions1=Class.create();QcSuggestions1.prototype={Version:"0.0.0",initialize:function(C,D,A,B,E){this.instanceName=C;this.fieldId=D;this.suggestionsId=A;this.urlBase=B;this.setOptions(E);Event.observe(this.fieldId,"keyup",this.handleKeyUp.bind(this));Event.observe(this.fieldId,"focus",this.handleFocus.bind(this));Event.observe(this.fieldId,"blur",this.handleBlur.bind(this));this._nonSuggestionKeyCodes=[13,16,17,18,27,37,38,39,40,224];this._previousFieldValue=""},setOptions:function(options){this.options={defaultFieldValue:"",additionalParameters:{},updateThrottle:300,useSuggestionsTimeout:true,suggestionsTimeoutDelay:6000,suggestionCount:10,responseParser:function(transport){var suggestions=new Array();suggestions=eval(transport.responseText);return suggestions.length>0?suggestions:false}};Object.extend(this.options,options||{})},handleKeyUp:function(A){if($F(this.fieldId)!=""&&$F(this.fieldId)!=this.options.defaultFieldValue){if($F(this.fieldId)!=this._previousFieldValue&&!this._nonSuggestionKeyCodes.any(function(B){return B==Event.keyCode})){clearInterval(this.keyUpTimeoutId);this.keyUpTimeoutId=setTimeout(function(){this._previousFieldValue=$F(this.fieldId);new Ajax.Request(this.urlBase+"?"+$H(this.options.additionalParameters).merge($(this.fieldId).serialize().toQueryParams()).toQueryString(),{method:"GET",onSuccess:function(D){var C="";var B=new Array();B=this.options.responseParser(D);if(B){C+="<ul><li>Suggested searches:</li>";B.each(function(E,F){if(F<this.options.suggestionCount){if(this.options.useSuggestionsTimeout){var G=new Template('<li><a href="#" onmouseover="#{instanceName}.clearSuggestionsTimeout(); return false" onmouseout="#{instanceName}.startSuggestionsTimeout(); return false" onclick="#{instanceName}.setFieldValue(\'#{value}\'); return false">#{value}</a></li>');C+=G.evaluate({instanceName:this.instanceName,value:E})}else{var G=new Template('<li><a href="#" onclick="#{instanceName}.setFieldValue(\'#{value}\'); return false">#{value}</a></li>');C+=G.evaluate({instanceName:this.instanceName,value:E})}}}.bind(this));C+="</ul>";if(C!=""){$(this.suggestionsId).update(C).show()}if(this.options.onKeyUped){this.options.onKeyUped()}this.startSuggestionsTimeout()}}.bind(this)})}.bind(this),this.options.updateThrottle)}}else{$(this.suggestionsId).hide()}},handleFocus:function(A){this.clearSuggestionsTimeout();if($(this.suggestionsId).getElementsBySelector("ul").length>0&&$F(this.fieldId)!=""&&$F(this.fieldId)!=this.options.defaultFieldValue){$(this.suggestionsId).show();if(this.options.onFocused){this.options.onFocused()}}},handleBlur:function(A){alert("blur");this.clearSuggestionsTimeout();if($(this.suggestionsId).getElementsBySelector("ul").length>0&&$F(this.fieldId)!=""&&$F(this.fieldId)!=this.options.defaultFieldValue){setTimeout(function(){$(this.suggestionsId).hide();if(this.options.onBlured){this.options.onBlured()}}.bind(this),600)}else{if($(this.suggestionsId).getElementsBySelector("ul").length>0&&$F(this.fieldId)==""){setTimeout(function(){$(this.suggestionsId).hide().update();if(this.options.onBlured){this.options.onBlured()}}.bind(this),600)}}},setFieldValue:function(A){this.clearSuggestionsTimeout();$(this.fieldId).value=A;$(this.suggestionsId).hide().update();if(this.options.onBlured){this.options.onBlured()}},startSuggestionsTimeout:function(){this.clearSuggestionsTimeout();if(this.options.useSuggestionsTimeout){this.suggestionsTimeoutId=setTimeout(function(){$(this.suggestionsId).hide().update();if(this.options.onTimeout){this.options.onTimeout()}}.bind(this),this.options.suggestionsTimeoutDelay)}},clearSuggestionsTimeout:function(){clearInterval(this.suggestionsTimeoutId)}};com.qualcomm.Session={getPageInfo:function(){var A=document.body,D=com.qualcomm,C=D.Session,B=D.Page;C.bodyId=A.id;C.bodyEl=$(A);C.isLatinBasedLanguage=!C.bodyEl.hasClassName("is-latin-false");C.sifrEnabled=(C.isLatinBasedLanguage&&B.mediaType()==="screen"&&Util.minimumFlashVersionMet())},sifrSelectorsReplaced:[],flashTargets:(function(){var A=[];var B=[];return{include:function(C){return A.include(C)},push:function(C){A.push(C);$(C).descendants().each(function(D){B.push(D)})},targets:function(){return A},elements:function(){return B}}})()};var parseSelector=$$;com.qualcomm.Sifr={checkIsSifrAllowed:function(){if($(document.body).hasClassName("is-latin-false")){return false}if(com.qualcomm.Page.mediaType()!="screen"){return false}if(com.qualcomm.Util.swf.getPlayerVersion().major<com.qualcomm.Config.Flash.minVersion){return false}return true},fastHide:function(){if(com.qualcomm.Sifr.fastHideRan||!com.qualcomm.Sifr.checkIsSifrAllowed()){return false}$A(com.qualcomm.Config.SifrSettings.configs).collect(function(A){$$(A.selector).each(function(B){B.addClassName("sifr-fast-hide")})});return true},fastShow:function(){$$(".sifr-fast-hide").each(function(A){A.removeClassName("sifr-fast-hide")})},showHiddenElements:function(){Util.log("entering showHiddenElements()");var B=$$(".sifr-image","#local-navigation","h2");if(B){for(var C=0,A=B.length;C<A;C++){B[C].setStyle({visibility:"visible"})}}Util.log("leaving showHiddenElements()")}};com.qualcomm.Sifr.fastHideRan=false;com.qualcomm.Sifr.replacement=function(A){if(!com.qualcomm.Sifr.checkIsSifrAllowed()){return false}if((typeof A=="undefined")||(A==null)){A=null}this.startElement=A;this.matches=[];this.remaining=[];this.start(A)};com.qualcomm.Sifr.replacement.prototype={start:function(B){replacementObj=this;this.startElement=$(B);com.qualcomm.Config.SifrSettings.configs.each(function(D,C){elements=$$(D.selector).filter(function(E){return(!$(E).empty()&&(B==null||E.descendantOf(B))&&!Util.isMetaData(E)&&!E.select("object").length&&!E.hasClassName("sIFR-replacing")&&!E.hasClassName("sIFR-replaced"))});elements.each(function(F,E){replacementObj.matches.push(F);replacementObj.remaining.push(F);F.addClassName("sIFR-replacing")});com.qualcomm.Sifr.activation.activate(D.qualcomm.font);sIFR.replace(com.qualcomm.Config.SifrSettings.swfs[D.qualcomm.font],{css:D.css,elements:elements,wmode:D.wmode})});if(this.matches.length>0){var A=this;cond=function(){return A.isFinished()};Util.waitFor({condition:cond,callback:function(){}})}else{this.sendComplete()}},isFinished:function(){itemsAtStart=this.remaining.length;for(i=0;i<this.remaining.length;i++){if(this.remaining[i].select("object").length){this.remaining[i].removeClassName("sIFR-replacing");this.remaining[i].addClassName("sIFR-replaced");this.remaining.splice(i,1);i--}}if(itemsAtStart>0){if(this.remaining.length==0){this.sendComplete()}}if(this.remaining.length==0){return true}else{return false}},sendComplete:function(){Util.eventNotify("sifr-all-replacements-completed")}};com.qualcomm.Sifr.activation={activated:[],activate:function(A){bAlreadyActive=false;for(i=0;i<com.qualcomm.Sifr.activation.activated.length;i++){if(com.qualcomm.Sifr.activation.activated[i]==A){bAlreadyActive=true}}if(!bAlreadyActive){com.qualcomm.Sifr.activation.activated.push(A);sIFR.activate(com.qualcomm.Config.SifrSettings.swfs[A])}}};com.qualcomm.Util={debug:true,waitList:[],log:function(){if(!Util.debug){return }if(!window.qualcomm){window.qualcomm={};window.qualcomm.log=[]}if(arguments[0]){switch(arguments[0].constructor){case RegExp:B(arguments[0]);break;case String:A(arguments[0]);break;default:throw new Error("Util.log called with invalid argument.");return }}else{B()}function A(E){try{var D=new Date();window.qualcomm.log.push("("+D.getTime()+") "+D.toString()+": "+E)}catch(C){}}function B(){var E;if(arguments[0]){var G=arguments[0];E=window.qualcomm.log.filter(function(H){return G.test(H)})}else{E=window.qualcomm.log}try{console.log(E.join("\n"))}catch(F){try{var D=window.open("about:blank","logWindow","toolbar=no,width=500,height=500,resizable=yes,scrollbars=yes");D.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" ><html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+window.qualcomm.log.join("<br />")+"</body></html>")}catch(C){alert(window.qualcomm.log.join("\n"))}}}},isMetaData:function(C){if(!!C.hasClassName("meta")){return true}var D=C.ancestors();for(var B=0,A=D.length;B<A;B++){if(D[B].hasClassName("meta")){return true}}return false},isBackupContent:function(A){return com.qualcomm.Session.flashTargets.elements().include(A)},waitFor:function(A){this.waitList.push({condition:A.condition,callback:A.callback})},waitLoop:function(){for(i=0;i<com.qualcomm.Util.waitList.length;i++){if(this.com.qualcomm.Util.waitList[i].condition()===true){com.qualcomm.Util.waitList[i].callback();com.qualcomm.Util.waitList.splice(i,1);i--}}setTimeout(Util.waitLoop,300)},startWaitChecking:function(){this.waitLoop()},runAfterEvent:function(A,B){Util.log("inside Util.runAfterEvent() - "+A);window.qualcomm.eventQueue.subscribe(A,B)},eventNotify:function(A){Util.log("--"+A+"--");window.qualcomm.eventQueue.notify(A)},preloadImages:function(A){if((typeof A=="undefined")||(A==null)){A=com.qualcomm.Config.PreloaderSettings.images}if(typeof A=="string"){A=[A]}for(var D=0,B=A.length;D<B;D++){var C=document.getElementsByTagName("head")[0];var E=document.createElement("img");C.appendChild(E);E.setAttribute("src",A[D])}},sifrLoaded:function(A){Util.log("Util.sifrLoaded("+A+")");var B=$$(A);if(!B.length){Util.log("Util.sifrLoaded("+A+") - no elements");return true}var B=B.filter(function(D){return !D.empty()&&!Util.isBackupContent(D)});if(!B.length){Util.log("Util.sifrLoaded("+A+") - elements are all empty");return true}var C=B.filter(function(D){if(Util.isMetaData(D)||D.select("object").length){return true}});if(C.length==B.length){Util.log("All sifr ready for selector: "+A);return true}else{Util.log("sifr not complete for selector: "+A);return false}return true},allSifrLoaded:function(){var B=com.qualcomm.Config.SifrSettings.configs;var A=B.filter(function(C){return Util.sifrLoaded(C.selector)});if(A.length==B.length){return true}else{return false}},homepageFlashLoaded:function(){if(!Util.minimumFlashVersionMet()){return true}var A=$$("#news-items #experience-flash").length;if(A&&A>0){return true}else{return false}},minimumFlashVersionMet:function(){return(com.qualcomm.Util.swf.getPlayerVersion().major>=com.qualcomm.Config.Flash.minVersion)}};var Util=com.qualcomm.Util;com.qualcomm.Util.startWaitChecking();registerNS("com.qualcomm.Util.swf");com.qualcomm.Util.swf={getPlayerVersion:function(){var B=new com.qualcomm.Util.swf._version([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var A=navigator.plugins["Shockwave Flash"];if(A&&A.description){B=new com.qualcomm.Util.swf._version(A.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var C=1;var D=3;while(C){try{D++;C=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+D);B=new com.qualcomm.Util.swf._version([D,0,0])}catch(E){C=null}}}else{try{var C=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(E){try{var C=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");B=new com.qualcomm.Util.swf._version([6,0,21]);C.AllowScriptAccess="always"}catch(E){if(B.major==6){return B}}try{C=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(E){}}if(C!=null){B=new com.qualcomm.Util.swf._version(C.GetVariable("$version").split(" ")[1].split(","))}}}return B},_version:function(A){this.major=A[0]!=null?parseInt(A[0]):0;this.minor=A[1]!=null?parseInt(A[1]):0;this.rev=A[2]!=null?parseInt(A[2]):0}};com.qualcomm.SwfLoader=Class.create({initialize:function(A){Util.log("SwfLoader.init()");if(arguments[1]){Object.extend(A,arguments[1])}this.swf=A.swf;this.name=A.name;this.target=A.target;this.width=A.width;this.height=A.height;this.version=A.version||"9";this.bgColor=A.bgColor||"#1b0044";this.flashvars=A.flashvars||{};this.params=A.params||{allowScriptAccess:"always",wmode:"opaque"};this.flashvars=$H(this.flashvars);this.params=$H(this.params);if(!this.name||this.name==this.target){this.name=this.target+"-flash"}if(Util.minimumFlashVersionMet()){$(this.target).hide()}else{return }Util.log("exiting SwfLoader.init()")},write:function(){Util.log("entering SwfLoader.write()");$(this.target).show();this.so=new SWFObject(this.swf,this.name,this.width,this.height,this.version,this.bgColor);for(var B=0,C=this.params.keys(),A=C.length;B<A;B++){this.so.addParam(C[B],this.params.get(C[B]))}for(var B=0,C=this.flashvars.keys(),A=C.length;B<A;B++){this.so.addVariable(C[B],this.flashvars.get(C[B]))}this.so.write(this.target);Util.log("leaving SwfLoader.write()")}});Object.extend(com.qualcomm.SwfLoader,{instances:[],embed:function(B){if(!Util.minimumFlashVersionMet()){return }Util.log("entering SwfLoader.embed()");var A=new com.qualcomm.SwfLoader(B);this.instances.push(A);var C=function(){Util.log("SwfLoader.embed() callback");this.write()}.bind(A);if(B.immediate){return C()}Util.runAfterEvent("sifr-all-replacements-completed",C)},addTarget:function(B){var A=com.qualcomm.Session.flashTargets;if(!A.include(B)){A.push(B)}},emptyBackupContent:function(){Util.log("entering emptyBackupContent()");if(!com.qualcomm.SwfLoader.instances.length||$("h1")||!Util.minimumFlashVersionMet()){Util.log("...not emptying anything.");return }var D=com.qualcomm.SwfLoader.instances;for(var C=0,B=D.length;C<B;C++){var A=D[C];if(!A.immediate){Util.log("...emptying target div: "+A.target);$(A.target).update("")}}Util.log("leaving emptyBackupContent()")},writeFlashHeader:function(D,B,C,A){com.qualcomm.SwfLoader.embed({target:D,swf:B,name:D,width:C,height:A,bgColor:"#e4f4fd"})},isLatinBased:function(){return $$("body")[0].hasClassName("is-latin-true")}});Object.extend(com.qualcomm.SwfLoader,{writeHomepageFlash:function(B){if(!Util.minimumFlashVersionMet()){return }if(!$("news-items")){return }var A=function(M){var L=M.select(".priority").first().innerHTML;var O=M.select("h3").first().innerHTML;var F=M.select("h4").first().innerHTML;var G=M.select("div.image").first().innerHTML;var K=G;try{K=M.select("div.thumbnail").first().innerHTML}catch(I){}var E=M.select("h5").first().innerHTML;var N=M.select("a").first().innerHTML;var J=M.select("a").first().readAttribute("href");var H="<box priority='"+L+"'><heading>"+O+"</heading><subHeading>"+F+"</subHeading><imageURL>"+G+"</imageURL><thumbnailURL>"+K+"</thumbnailURL><snippet>"+E+"</snippet><cta>"+N+"</cta><link>"+J+"</link></box>";return H};var C="<homepage><intro>"+$$(".meta.intro h2").map(function(E){return"<line>"+E.firstChild.nodeValue+"</line>"}).join("")+"</intro><question>"+$("interested-in").firstChild.nodeValue+"</question>"+$$("#news-items > ul").map(function(E){var F="<identifier id='"+E.className+"'>"+E.childElements().map(A).join("");return F+"</identifier>"}).join("")+"</homepage>";var D=encodeURIComponent(C);com.qualcomm.SwfLoader.embed({immediate:true,target:"news-items",swf:B,name:"experience-flash",width:"744",height:"510",bgColor:"#FFFFFF",flashvars:{dataXML:D,dataPath:"/common/swf/homepage_main.swf",isLatinBasedLanguage:com.qualcomm.SwfLoader.isLatinBased()}})},writeAccordionExperience:function(B,C,A){com.qualcomm.SwfLoader.embed({target:B,swf:C,name:B,width:"196",height:"148",bgColor:"#FFFFFF",flashvars:{linkURL:A,isLatinBasedLanguage:com.qualcomm.SwfLoader.isLatinBased()},params:{allowScriptAccess:"always",wmode:"opaque"}})},writeVideoPlayer196x146:function(A,C,B){com.qualcomm.SwfLoader.embed({target:A,swf:"http://www.qualcomm.com/common/swf/video-player-196x146.swf",name:A,width:"196",height:"146",bgColor:"#FFFFFF",flashvars:{vidURL:C,thumbnailURL:B,isLatinBasedLanguage:com.qualcomm.SwfLoader.isLatinBased()}})},writeVideoPlayer320x240:function(A,C,B){com.qualcomm.SwfLoader.embed({target:A,swf:"http://www.qualcomm.com/common/swf/video-player-320x240.swf",name:A,width:"320",height:"267",bgColor:"#FFFFFF",flashvars:{vidURL:C,thumbnailURL:B,isLatinBasedLanguage:com.qualcomm.SwfLoader.isLatinBased()}})},writeVideoPlayer478x360:function(A,C,B){com.qualcomm.SwfLoader.embed({target:A,swf:"http://www.qualcomm.com/common/swf/video-player-478x360.swf",name:A,width:"478",height:"398",bgColor:"#FFFFFF",flashvars:{vidURL:C,thumbnailURL:B,isLatinBasedLanguage:com.qualcomm.SwfLoader.isLatinBased()}})},writeE1Experience:function(B,A){com.qualcomm.SwfLoader.embed({target:"experience",swf:B,name:"experience-flash",width:"938",height:"580",bgColor:"#1b0044",flashvars:{assetsPath:A,isLatinBasedLanguage:com.qualcomm.SwfLoader.isLatinBased()}})},writeCareersExperience:function(B,A){com.qualcomm.SwfLoader.embed({target:"experience",swf:B,name:"experience-flash",width:"713",height:"350",bgColor:"#1b0044",flashvars:{assetsPath:A,pathURL:A,isLatinBasedLanguage:com.qualcomm.SwfLoader.isLatinBased()}})},writeSuccessStoriesExperience:function(E,D){if(!Util.minimumFlashVersionMet()){return }if(!$("experience")){return }Util.log("entering SwfLoader.writeSuccessStoriesExperience()");var C=com.qualcomm.SwfLoader;C.addTarget($("experience"));$$("div.story").each(function(F){F.setStyle({position:"absolute",left:"-100000px"});Util.log("hid story content for el: "+F.getAttribute("id"));Util.log("el's width: "+$(F).getWidth())});var A="<success-stories>"+$$("#content div.story").map(function(G){if(G.id=="default"){return""}var F;G.id.match(/-slideshow$/)?F="slideshow":F="video";var H=function(J){if(J.hasClassName("images")){var I=J.select("div.image");return J.immediateDescendants().map(function(K){switch(K.tagName){case"H2":return"<slideshow-title>"+K.innerHTML+"</slideshow-title>";case"H5":return"<related-title>"+K.innerHTML+"</related-title>";case"UL":return K.immediateDescendants().map(function(L){var M=L.down();return"<related-item><item-title>"+M.innerHTML+"</item-title><item-url>"+M.readAttribute("href")+"</item-url></related-item>"}).join("")}}).join("")+I.map(function(K){if(K==I.first()){return"<poster-image-url>"+K.innerHTML+"</poster-image-url>"}return"<gallery-image-url>"+K.innerHTML+"</gallery-image-url>"}).join("")}if(J.hasClassName("video")){return J.immediateDescendants().map(function(K){switch(K.tagName){case"DIV":var L="";if(K.hasClassName("image")){L="<poster-image-url>"+K.innerHTML+"</poster-image-url>"}return L;break;case"A":return"<connection>"+K.readAttribute("href")+"</connection><flv>"+K.readAttribute("rel")+"</flv>";case"H2":return"<video-title>"+K.innerHTML+"</video-title>";case"P":return"<paragraph>"+K.innerHTML+"</paragraph>";case"H5":return"<related-title>"+K.innerHTML+"</related-title>";case"UL":return K.immediateDescendants().map(function(M){var N=M.down();return"<related-item><item-title>"+N.innerHTML+"</item-title><item-url>"+N.readAttribute("href")+"</item-url></related-item>"}).join("")}}).join("")}};return"<story id='"+G.id+"'><story-title>"+G.select("h2.title").first().innerHTML+"</story-title><"+F+">"+G.select("div.meta").map(H).join("")+"</"+F+"></story>"}).join("")+"</success-stories>";var B=encodeURIComponent(A);Util.log("...before call to SwfLoader.embed()");Util.log("...escaped data: "+B);com.qualcomm.SwfLoader.embed({target:"experience",swf:E,name:"experience-flash",width:"938",height:"461",bgColor:"1b0044",flashvars:{dataXML:B,pathURL:D,isLatinBasedLanguage:com.qualcomm.SwfLoader.isLatinBased()}})},writeSmartServicesExperience:function(B,A){com.qualcomm.SwfLoader.embed({target:"experience",swf:B,name:"experience-flash",width:"939",height:"461",bgColor:"#1b0044",flashvars:{assetsPath:A,isLatinBasedLanguage:com.qualcomm.SwfLoader.isLatinBased()}})},writeHarmonyExperience:function(B,A){com.qualcomm.SwfLoader.embed({target:"experience",swf:B,name:"experience-flash",width:"938",height:"560",bgColor:"#1b0044",flashvars:{assetsPath:A,pathURL:A,isLatinBasedLanguage:com.qualcomm.SwfLoader.isLatinBased()}})},writeInnovationExperience:function(B,A){com.qualcomm.SwfLoader.embed({target:"experience",swf:B,name:"experience-flash",width:"938",height:"560",bgColor:"#1b0044",flashvars:{pathURL:A,isLatinBasedLanguage:com.qualcomm.SwfLoader.isLatinBased()}})}});if(Object.isUndefined(com.qualcomm.widgets)){com.qualcomm.widgets={}}com.qualcomm.widgets.Accordion=Class.create({initialize:function(B,F){this.openIndex=undefined;this.animationDuration=0.4;this.toggleList=B;if(B.length>1){this._associateEventWithToggles()}var E=com.qualcomm.cookies.readCookie("accordion"+window.document.URL);if(E){for(var A=0;A<B.length;A++){B[A].toggle.setAttribute("href","#");var D=B[A].toggle.up().classNames();var C=D.entries()[0];if(C==E){F=A}}}if(Object.isUndefined(F)){this.closeAll(true)}else{this.activate(null,F,true)}},_associateEventWithToggles:function(){var A=0;this.toggleList.each(function(B){if(!B.toggle){return }B.toggle.observe("click",this.activate.bindAsEventListener(this,A));B.toggle.onclick=function(){return false};A++},this)},_closeSection:function(C,A){if(C.toggle){C.toggle.up().removeClassName("active");if(!A){var B=C.toggle.up().classNames().entries()[0];com.qualcomm.cookies.writeCookie("accordion"+window.document.URL,"none",31)}}if(C.blocks){C.blocks.each(function(D){D.removeClassName("open");if(A){D.hide()}else{new Effect.BlindUp(D,{duration:this.animationDuration})}}.bind(this))}},_openSection:function(C,A){if(!A){var B=C.toggle.up().classNames().entries()[0];com.qualcomm.cookies.writeCookie("accordion"+window.document.URL,B,31)}if(C.toggle){C.toggle.up().addClassName("active")}if(C.blocks){C.blocks.each(function(D){D.addClassName("open");if(A){D.show()}else{new Effect.BlindDown(D,{duration:this.animationDuration})}}.bind(this))}},activate:function(H,E,A){var F=this.toggleList[E];var D=this.toggleList[this.openIndex];var C=$$("#refine-search a.show-all").first();var G=true;var B=false;if(F==D){this.openIndex=undefined;this._closeSection(F);var B=true}if(C){C.observe("click",function(){G=false});if(D&&!G){this._closeSection(D,A)}else{this.closeAll(true)}}else{if(D){this._closeSection(D,A)}else{this.closeAll(true)}}if(B){return }this._openSection(F,A);this.openIndex=E},closeAll:function(A){this.toggleList.each(function(B){this._closeSection(B,A)},this)}});registerNS("com.qualcomm.widgets.accordions");com.qualcomm.widgets.accordions.sidebar={URL_PREFIX:"",DEBUG:false};com.qualcomm.widgets.accordions.sidebar.Base=Class.create({initialize:function(A,B){this.options={};this.options=Object.extend(this.options,B||{});this.ns=com.qualcomm.widgets.accordions.sidebar;this.failed=false;this.loaded=false;this.li=A;this.metaAnchor=A.down("a");this.url=this._addLanguageCodeToURL(this.metaAnchor.rel);this.detailURL=this._addLanguageCodeToURL(this.options.detailURL);this.url=(this.url.match(/^\//)?com.qualcomm.widgets.accordions.sidebar.URL_PREFIX:"")+this.url;this.detailURL=(this.detailURL.match(/^\//)?com.qualcomm.widgets.accordions.sidebar.URL_PREFIX:"")+this.detailURL;this.queryString=this.url.toQueryParams();this.count=(this.queryString&&this.queryString.per_page!=undefined)?parseInt(this.queryString.per_page):3},_parseTimestamp:function(J){var B=J.split("T")[0];var A=J.split("T")[1].split("-")[0];var F=J.split("T")[1].split(/((\+|-)[\d:]+)/)[1];var G=parseInt(B.split("-")[0]);G=!isNaN(G)?G:0;var D=parseInt(B.split("-")[1].replace(/^0+/,""))-1;D=!isNaN(D)?D:0;var I=parseInt(B.split("-")[2].replace(/^0+/,""));I=!isNaN(I)?I:0;var H=parseInt(A.split(":")[0].replace(/^0+/,""));H=!isNaN(H)?H:0;var C=parseInt(A.split(":")[1].replace(/^0+/,""));C=!isNaN(C)?C:0;var E=new Date();E.setFullYear(G);E.setMonth(D);E.setDate(I);E.setHours(H);E.setMinutes(C);E.setSeconds(0);return E},_addLanguageCodeToURL:function(A){var C=$$("body").first().className.split(" ");var D=C.find(function(E){return E.match(/language\-/)});if(D){var B=D.replace(/language\-/,"");A+=(A.match(/\?/)?"&":"?")+"language="+B}return A},_getData:function(B,A){this.getDataOptions={details:true};Object.extend(this.getDataOptions,A||{});new Ajax.Request(this.url,{method:"get",onSuccess:function(F){var D=F.responseXML;if(this.getDataOptions.details){var C=$A(D.getElementsByTagName(B));if(C.length==0){return this._empty("Empty list for url: "+F.request.url)}var E=C.slice(0,this.count).collect(function(H,G){return parseInt(H.getElementsByTagName("id")[0].firstChild.nodeValue)});new Ajax.Request(this.detailURL+(this.detailURL.match(/\?/)?"&":"?")+"id="+E.join(","),{method:"get",onSuccess:function(J){var G,I;try{G=J.responseXML.getElementsByTagName(B);if(G.length>0){I=this._normalizeData(G);if(I.length>0){this._render(I)}else{this._failed("Normalization returned empty list")}}else{this._empty("Empty list for url: "+J.request.url)}}catch(H){this._failed(H)}}.bind(this),onFailure:function(G){this._failed("Failed to load url: "+G.request.url)}.bind(this),onException:function(G){this._failed(G)}.bind(this)})}else{this._render(this._normalizeData(F.responseXML.getElementsByTagName(B)))}}.bind(this),onFailure:function(C){this._failed("Failed to load url: "+C.request.url)}.bind(this),onException:function(C){this._failed(C)}.bind(this)})},_empty:function(A){if(!Prototype.Browser.IE&&this.ns.DEBUG){console.log(A)}this.loaded=true;this._checkLoaded()},_failed:function(A){if(!Prototype.Browser.IE&&this.ns.DEBUG){console.log(A)}this.loaded=true;this.failed=true;this.li.insert('<div class="drop-block"><div class="box"><div class="inner">- Unable to load data -</div></div></div>');this.li.show();this._checkLoaded()},_afterRender:function(){this.loaded=true;this._checkLoaded()},_checkLoaded:function(){if(com.qualcomm.Page.accordions.sidebar.list.all(function(A){return A.loaded})){com.qualcomm.Page.accordions.sidebar.loaded()}}});com.qualcomm.widgets.accordions.sidebar.Videos=Class.create(com.qualcomm.widgets.accordions.sidebar.Base,{initialize:function($super,A,B){$super(A,B);this._getData("video")},_normalizeData:function(A){var B=new Array();$A(A).each(function(D,C){if(C>=this.count){return }var F=new Object();F.title=D.getElementsByTagName("title")[0].firstChild.nodeValue;F.id=parseInt(D.getElementsByTagName("id")[0].firstChild.nodeValue);F.url=com.qualcomm.widgets.accordions.sidebar.URL_PREFIX+D.getElementsByTagName("url")[0].firstChild.nodeValue;F.modalURL=com.qualcomm.widgets.accordions.sidebar.URL_PREFIX+"/partials/video/"+F.id;try{F.length=D.getElementsByTagName("length")[0].firstChild.nodeValue}catch(E){F.length=undefined}try{F.rating=parseFloat(D.getElementsByTagName("rating")[0].firstChild.nodeValue)}catch(E){F.rating=3.5}F.thumbnail=com.qualcomm.widgets.accordions.sidebar.URL_PREFIX+D.getElementsByTagName("thumbnail")[0].firstChild.nodeValue;B.push(F)}.bind(this));return B},_render:function(B){var A=new Element("li",{"class":"videos"}).update('<a class="plus">'+this.li.down("a").innerHTML+"</a>");var C=new Element("div",{"class":"drop-block"});A.insert(C);B.each(function(H,K){var J=new Element("div",{"class":"video rt-rail"});var E=new Element("div",{"class":"video-thumb"});var L=new Element("a",{"class":"video-title video_popup",href:H.modalURL});L.insert('<div class="play-button"></div><div class="video-overlay"></div>');var I=new Element("img",{"class":"video-image",src:H.thumbnail,width:"90",height:"51"});E.insert(L.insert(I));J.insert(E);var D=new Element("div",{"class":"video-details"});D.insert(new Element("a",{"class":"video-title",href:H.url}).update(H.title));if(H.length){D.insert(new Element("span",{"class":"video-duration"}).update(H.length))}if(H.length&&H.rating){D.insert(" • ")}if(H.rating){var F=new Element("span",{"class":"video-rating"});var G=Math.floor(H.rating);var M=H.rating-G>0;$R(0,G-1).each(function(N){F.insert(new Element("img",{src:com.qualcomm.widgets.accordions.sidebar.URL_PREFIX+"/common/images/video/star_orange_rt_rail.png"}))});if(M){F.insert(new Element("img",{src:com.qualcomm.widgets.accordions.sidebar.URL_PREFIX+"/common/images/video/star_orange_half_rt_rail.png"}))}$R(0,(M?4-G:5-G)-1).each(function(N){F.insert(new Element("img",{src:com.qualcomm.widgets.accordions.sidebar.URL_PREFIX+"/common/images/video/star_dk_grey_rt_rail.png"}))});D.insert(F)}J.insert(D);C.insert(J)}.bind(this));C.insert('<div class="clear"></div>');this.li.replace(A);this.li=A;this._afterRender.bind(this).defer()},_afterRender:function($super){com.digitaria.VideoPopup.init();var A={};var C={wmode:"transparent"};var B={};swfobject.embedSWF(com.qualcomm.widgets.accordions.sidebar.URL_PREFIX+"/flash/QualcommVideoWall.swf","experience","960","460","9.0.0","expressInstall.swf",A,C,B);$super()}});com.qualcomm.widgets.accordions.sidebar.Events=Class.create(com.qualcomm.widgets.accordions.sidebar.Base,{initialize:function($super,A,B){$super(A,B);this._getData("event")},_normalizeData:function(A){var B=new Array();$A(A).each(function(D,C){if(C>=this.count){return }var E=new Object();E.title=D.getElementsByTagName("title")[0].firstChild.nodeValue;E.id=parseInt(D.getElementsByTagName("id")[0].firstChild.nodeValue);E.startDate=this._parseTimestamp(D.getElementsByTagName("startDate")[0].firstChild.nodeValue);E.endDate=this._parseTimestamp(D.getElementsByTagName("endDate")[0].firstChild.nodeValue);B.push(E)}.bind(this));return B},_render:function(B){var A=new Element("li",{"class":"events"}).update('<a class="plus">'+this.li.down("a").innerHTML+"</a>");var C=new Element("div",{"class":"drop-block"});A.insert(C);B.each(function(I,F){var H=new Element("div",{"class":"box event rt-rail"});var D=I.startDate.strftime("%b %e");if(I.endDate.getDate()!=I.startDate.getDate()){D+=I.endDate.strftime("-%e")}D+=I.endDate.strftime(", %Y");var E=new Element("strong").update(D+"<br/>");H.insert(E);var G=new Element("a",{"class":"event-title",href:"#"}).update(I.title);H.insert(G);C.insert(H)}.bind(this));C.insert('<div class="clear"></div>');this.li.replace(A);this.li=A;this._afterRender.bind(this).defer()}});com.qualcomm.widgets.accordions.sidebar.News=Class.create(com.qualcomm.widgets.accordions.sidebar.Base,{initialize:function($super,A,B){$super(A,B);this._getData("pressRelease")},_normalizeData:function(A){var B=new Array();$A(A).each(function(D,C){if(C>=this.count){return }var E=new Object();E.title=D.getElementsByTagName("title")[0].firstChild.nodeValue;E.id=parseInt(D.getElementsByTagName("id")[0].firstChild.nodeValue);E.url=com.qualcomm.widgets.accordions.sidebar.URL_PREFIX+D.getElementsByTagName("url")[0].firstChild.nodeValue;E.released=D.getElementsByTagName("released")[0].firstChild.nodeValue;E.released=this._parseTimestamp(E.released);B.push(E)}.bind(this));return B},_render:function(B){var A=new Element("li",{"class":"headline-news"}).update('<a class="plus">'+this.li.down("a").innerHTML+"</a>");var C=new Element("div",{"class":"drop-block"});A.insert(C);B.each(function(F,D){var E=new Element("div",{"class":"box"});E.insert(new Element("a",{href:F.url}).update(F.title));E.insert(new Element("div",{"class":"date"}).update(F.released.strftime("%b %e, %Y")));C.insert(E)}.bind(this));this.li.replace(A);this.li=A;this._afterRender.bind(this).defer()}});com.qualcomm.widgets.accordions.sidebar.Documents=Class.create(com.qualcomm.widgets.accordions.sidebar.Base,{initialize:function($super,A,B){$super(A,B);this._getData("document")},_normalizeData:function(A){var B=new Array();$A(A).each(function(D,C){if(C>=this.count){return }var E=new Object();E.title=D.getElementsByTagName("title")[0].firstChild.nodeValue;E.id=parseInt(D.getElementsByTagName("id")[0].firstChild.nodeValue);E.url=com.qualcomm.widgets.accordions.sidebar.URL_PREFIX+D.getElementsByTagName("url")[0].firstChild.nodeValue;E.published=D.getElementsByTagName("published")[0].firstChild.nodeValue;E.published=this._parseTimestamp(E.published);B.push(E)}.bind(this));return B},_render:function(B){var A=new Element("li",{"class":"documents"}).update('<a class="plus">'+this.li.down("a").innerHTML+"</a>");var C=new Element("div",{"class":"drop-block"});A.insert(C);B.each(function(G,D){var E=new Element("div",{"class":"box"});var F=G.url.split(".")[1];E.insert(new Element("a",{href:G.url,"class":F}).update(G.title));C.insert(E)}.bind(this));this.li.replace(A);this.li=A;this._afterRender.bind(this).defer()}});com.qualcomm.widgets.Tabs=Class.create({initialize:function(B){this.currentTabIndex=undefined;this.tabList=B;this._associateEventWithTabs();var C=com.qualcomm.cookies.readCookie("tab"+window.document.URL)||0;for(var A=B.length-1;A>=0;A--){tabButtonHref=this.tabList[A].tab.getElementsByTagName("a").item(0).hash;if(tabButtonHref==document.location.hash){C=A;break}}com.qualcomm.cookies.writeCookie("tab"+window.document.URL,C,31);this.activate(C)},_associateEventWithTabs:function(){var A=0;this.tabList.each(function(B){B.tab.observe("click",this.activate.bind(this,A));B.tab.onclick=function(){return false};A++},this)},_closeTab:function(A){A.tab.removeClassName("current");A.block.removeClassName("open");A.block.hide()},_openTab:function(A){A.tab.addClassName("current");A.block.addClassName("open");A.block.show()},activate:function(B){var C=this.tabList[B];var A=this.tabList[this.currentTabIndex];if(C==A){return }else{if(A){this._closeTab(A)}else{this.tabList.each(function(D){this._closeTab(D)},this)}}this._openTab(C);this.currentTabIndex=B;com.qualcomm.cookies.writeCookie("tab"+window.document.URL,B,31)}});var SPECIAL_NAVIGATION_SECTIONS=["News and Events","Financial Information","Careers"];LocalNavLink=Class.create({initialize:function(){var B=arguments[0]||{};this.anchor=B.anchor;var A=B.anchor.firstChild;if(A){this.text=A.nodeValue}else{this.text=""}this.url=B.anchor.href;this.hasSubPages=B.hasSubPages||false;this.isCurrent=B.isCurrent||false;this.childLinks=B.childLinks||[];this.level=B.level||1;this.section=B.section;this.specialSection=SPECIAL_NAVIGATION_SECTIONS.include(B.section);this.isLastChild=B.isLastChild||false;this.isOnlyChild=B.isOnlyChild||false;this.top=B.top||this;this.tree=B.tree;this.ul=this.getContainingList();if(this.isCurrent){this.tree.currentPageLink=this}this.showingAllChildren=this.ul.hasClassName("all-sub-pages-visible");return this},getContainingList:function(){var B=this.anchor;var A=0;while(B.tagName!="UL"){B=B.parentNode;if(++A>=10){return }}return $(B)},hasChildLinks:function(){return this.childLinks.length>0},descendantIsCurrent:function(){if(this.isCurrent){return false}return(function(C){if(C.isCurrent){return true}for(var A=0,B=C.childLinks.length;A<B;A++){if(arguments.callee(C.childLinks[A])){return true}}return false})(this)},addChildLink:function(A){this.childLinks.push(A)},getArrowClasses:function(){switch(this.level){case 1:if(this.showingAllChildren||this.isCurrent){this.normalClasses.push("arrow-white-down");this.hoverClasses.push("arrow-white-down")}else{this.normalClasses.push("arrow-purple-up");this.hoverClasses.push("arrow-white-up")}break;case 2:if(this.hasChildLinks()){if(this.showingAllChildren){this.normalClasses.push("arrow-orange-down");this.hoverClasses.push("arrow-orange-down")}else{this.normalClasses.push("arrow-purple-up");this.hoverClasses.push("arrow-orange-up")}}else{if(this.isOnlyChild){this.normalClasses.push("arrow-orange-right");this.hoverClasses.push("arrow-orange-right")}else{if(this.isCurrent){this.normalClasses.push("arrow-orange-right");this.hoverClasses.push("arrow-orange-right")}else{if(this.hasSubPages){this.normalClasses.push("arrow-purple-right");this.hoverClasses.push("arrow-orange-right")}}}}break;case 3:if(this.hasChildLinks()){if(this.showingAllChildren){this.normalClasses.push("arrow-orange-down");this.hoverClasses.push("arrow-orange-down")}else{this.normalClasses.push("arrow-purple-up");this.hoverClasses.push("arrow-orange-up")}}else{if(this.isCurrent){this.normalClasses.push("arrow-orange-right-large");this.hoverClasses.push("arrow-orange-right-large")}else{if(this.hasSubPages){this.normalClasses.push("arrow-purple-right");this.hoverClasses.push("arrow-orange-right")}}}break;case 4:if(this.isCurrent){this.normalClasses.push("arrow-orange-right-large");this.hoverClasses.push("arrow-orange-right-large")}break;default:return }},getBaseClasses:function(){this.normalClasses.push("level-"+this.level);this.hoverClasses.push("level-"+this.level)},getBgClasses:function(){var A;switch(this.level){case 2:A="blue-bg";break;case 3:A=(this.isOnlyChild?"blue-bg":"gray-bg");break;case 4:A="gray-bg";break;default:return }this.normalClasses.push(A);this.hoverClasses.push(A)},getBorderClasses:function(){var A="bottom-border";switch(this.level){case 2:this.normalClasses.push(A);this.hoverClasses.push(A);break;case 3:if(this.isOnlyChild||this.isLastChild){this.normalClasses.push(A);this.hoverClasses.push(A)}break;case 4:if(this.isLastChild){this.normalClasses.push(A);this.hoverClasses.push(A)}break;default:return }},getIndentClasses:function(){if(this.specialSection){switch(this.level){case 1:klass="indent-1";break;case 2:klass="indent-2";break;case 3:klass="indent-3";break}}else{switch(this.level){case 1:klass="indent-1";break;case 2:if(this.tree.currentPageLink&&this.tree.currentPageLink.level==1){klass="indent-2"}else{klass="indent-1"}break;case 3:klass="indent-2";break;case 4:klass="indent-3";break}}this.normalClasses.push(klass);this.hoverClasses.push(klass)},getTextClasses:function(){switch(this.level){case 1:break;case 2:if(this.isCurrent||this.descendantIsCurrent()||this.hasChildLinks()){this.normalClasses.push("orange-text");this.hoverClasses.push("orange-text")}else{this.normalClasses.push("purple-text");this.hoverClasses.push("orange-text")}this.normalClasses.push("bold");this.hoverClasses.push("bold");break;case 3:if(this.isCurrent||this.descendantIsCurrent()||this.hasChildLinks()){this.normalClasses.push("orange-text","bold");this.hoverClasses.push("orange-text","bold")}else{this.normalClasses.push("purple-text");if(this.hasSubPages){this.hoverClasses.push("orange-text","bold")}else{this.hoverClasses.push("orange-text","bold")}}break;case 4:if(this.isCurrent||this.descendantIsCurrent()){this.normalClasses.push("orange-text","bold")}else{this.normalClasses.push("purple-text")}this.hoverClasses.push("orange-text","bold");break;default:return }},create:function(){if(!this.element){this.normalClasses=[];this.hoverClasses=[];this.getBaseClasses();this.getBgClasses();this.getBorderClasses();this.getIndentClasses();this.getArrowClasses();this.getTextClasses();var C=(this.normalClasses.length<1?null:this.normalClasses.join(" "));var A=document.createElement("li");var B=document.createElement("a");var D=document.createTextNode(this.text);if(C){A.className=C}B.setAttribute("href",this.url);A.appendChild(B);B.appendChild(D);this.element=A;this.attachHover()}return this.element},attachHover:function(){Util.log("LocalNavLink.attachHover()");var B=(this.normalClasses.length<1?null:this.normalClasses.join(" "));var A=(this.hoverClasses.length<1?null:this.hoverClasses.join(" "));$(this.element).observe("mouseover",function(C){this.element.className=A}.bind(this));$(this.element).observe("mouseout",function(C){this.element.className=B}.bind(this))},build:function(){Util.log("LocalNavLink.build("+this.text+")");this.tree.listEl.appendChild(this.create());for(var A=0,B=this.childLinks.length;A<B;A++){this.childLinks[A].build()}if(this==this.tree.top){this.tree.element.addClassName("completed");LocalNavDesc.notifyCompleted()}}});Number.prototype.toText=function(){var A=["one","two","three","four"];return A[this-1]};Prototype.Browser.IE6=Prototype.Browser.IE&&parseInt(navigator.userAgent.substring(navigator.userAgent.indexOf("MSIE")+5))==6;Prototype.Browser.IE7=Prototype.Browser.IE&&!Prototype.Browser.IE6;window.qualcomm={log:[],eventQueue:new com.qualcomm.Events.OrderedEventQueue()};document.observe("dom:loaded",function(){com.qualcomm.Page.initPage()});function delayStuff(){var B=1.3;for(var A=0;A<10000;A++){B*=B}}function fillEmptyLocalNav(){Util.log("entering fillEmptyLocalNav()");var A=$$("#local-navigation > ul").first();if(A&&A.select("li.level-2").length==0){A.up().insert('<div style="height:150px;"></div>')}Util.log("leaving fillEmptyLocalNav()")}function getWindowWidth(){var A=0;if(typeof (window.innerWidth)=="number"){A=window.innerWidth}else{if(document.documentElement&&document.documentElement.clientWidth){A=document.documentElement.clientWidth}else{if(document.body&&document.body.clientWidth){A=document.body.clientWidth}}}return A}function showTerm(B,H,D){var G=B.toLowerCase();if(glossarypopoverTimer){clearTimeout(glossarypopoverTimer);glossarypopoverTimer=null}var A=$("termPopover");if(!A){return }var C=$("activator"+G);if(!C){return }var F=Position.page(C)[0]+Position.realOffset(C)[0];var E=Position.page(C)[1]+Position.realOffset(C)[1];if(!popoverLoaded){Element.hide("termPopover");getTermContent(H,B,D);popoverLoaded=true}if(F+popoverWidth>getWindowWidth()){A.setStyle({left:(F-popoverWidth-popoverOffsetX)+"px"})}else{A.setStyle({left:(F+popoverOffsetX)+"px"})}A.setStyle({top:(E+popoverOffsetY)+"px"})}function hideTerm(){Element.update("termPopover","");popoverLoaded=false}function doHideTerm(){if(document.layer){return }glossarypopoverTimer=setTimeout("hideTerm()",200)}function getTermContent(F,B,D){var C=glossaryHtml(F,B,D);var A='<div id="glossarypopover" class="glossarypopover" onmouseout="doHideTerm()" onmouseover="showTerm(\''+C+'\')"  style="position:absolute; top:0; left:0; z-index:1000;">'+C+"</div>";var E=A+'<iframe id="glossarypopover_iefix" style="display:none; position:absolute; z-index:999; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" src="javascript:;" frameborder="0" scrolling="no"></iframe>';Element.update("termPopover",E);setTimeout(function(){var H=$("glossarypopover_iefix");var G=$("glossarypopover");Position.clone(G,H);H.show();Effect.Appear("termPopover",{duration:0.5})},50)}function glossaryHtml(D,A,B){var C="<div class=glossary-container><div class=glossary-definition><div class=top></div><div class=middle><div class=content><div class=term>Glossary term:</div><dl><dt>&ldquo;"+A+"&rdquo;</dt><dd>"+B+"</dd></dl><div class=more>Click <a href=/products_services/glossary/index.html#"+D+" title=more information><img src=/common/images/glossary/glossary-icon.gif></a>for more information</div></div><div class=bottom></div></div></div>";return C}var errMail="webmaster.com";var glossarypopoverTimer=null;var popoverWidth=270;var popoverOffsetX=13;var popoverOffsetY=-3;var popoverLoaded=false;function getWindowWidth(){var A=0;if(typeof (window.innerWidth)=="number"){A=window.innerWidth}else{if(document.documentElement&&document.documentElement.clientWidth){A=document.documentElement.clientWidth}else{if(document.body&&document.body.clientWidth){A=document.body.clientWidth}}}return A}function showTerm(B,H,D){var G=B.toLowerCase();if(glossarypopoverTimer){clearTimeout(glossarypopoverTimer);glossarypopoverTimer=null}var A=$("termPopover");if(!A){return }var C=$("activator"+G);if(!C){return }var F=Position.page(C)[0]+Position.realOffset(C)[0];var E=Position.page(C)[1]+Position.realOffset(C)[1];if(!popoverLoaded){Element.hide("termPopover");getTermContent(H,B,D);popoverLoaded=true}if(F+popoverWidth>getWindowWidth()){A.setStyle({left:(F-popoverWidth-popoverOffsetX)+"px"})}else{A.setStyle({left:(F+popoverOffsetX)+"px"})}A.setStyle({top:(E+popoverOffsetY)+"px"})}function hideTerm(){Element.update("termPopover","");popoverLoaded=false}function doHideTerm(){if(document.layer){return }glossarypopoverTimer=setTimeout("hideTerm()",200)}function getTermContent(F,B,D){var C=glossaryHtml(F,B,D);var A='<div id="glossarypopover" class="glossarypopover" onmouseout="doHideTerm()" onmouseover="showTerm(\''+C+'\')"  style="position:absolute; top:0; left:0; z-index:1000;">'+C+"</div>";var E=A+'<iframe id="glossarypopover_iefix" style="display:none; position:absolute; z-index:999; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" src="javascript:;" frameborder="0" scrolling="no"></iframe>';Element.update("termPopover",E);setTimeout(function(){var H=$("glossarypopover_iefix");var G=$("glossarypopover");Position.clone(G,H);H.show();Effect.Appear("termPopover",{duration:0.5})},50)}function glossaryHtml(D,A,B){var C="<div class=glossary-container><div class=glossary-definition><div class=top></div><div class=middle><div class=content><div class=term>Glossary term:</div><dl><dt>&ldquo;"+A+"&rdquo;</dt><dd>"+B+"</dd></dl><div class=more>Click <a href=/products_services/glossary/index.html#"+D+" title=more information><img src=/common/images/glossary/glossary-icon.gif></a>for more information</div></div><div class=bottom></div></div></div>";return C}var errMail="webmaster.com";var glossarypopoverTimer=null;var popoverWidth=270;var popoverOffsetX=13;var popoverOffsetY=-3;var popoverLoaded=false;function printThis(){var A=window.print;if(A){window.print()}}function makepage(A){return"<html>\n<head>\n<title>Temporary Printing Window</title>\n<script>\nfunction step1() {\n  setTimeout('step2()', 10);\n}\nfunction step2() {\n  window.print();\n  window.close();\n}\n<\/script>\n</head>\n<body onLoad='step1()'>\n<div id='content'>"+A+"</div>";"</body>\n</html>\n"}function printThiss(){try{content=document.getElementById("content").innerHTML;link="about:blank";var A=window.open(link,"_new");A.document.open();A.document.write(makepage(content));A.document.close()}catch(B){}}function isCareersPrefEmpty(D){var E=document.forms.proprefs.loc.value;var C="Please make a selection from:";var B;if(D!=null){if(D=="newgrad"||D=="intern"){B=document.forms.proprefs.coll.value;if(B=="x"||B==""){C+="\n-->College Dropdown";B="x"}}}var A=document.forms.proprefs.cc.value;if(A=="x"||A==""){C+="\n-->Career categories Dropdown";A="x"}var F=document.forms.proprefs.loc.value;if(F=="x"||F==""){C+="\n-->Locations Dropdown";F="x"}if(B=="x"||A=="x"||F=="x"){alert(C);return false}else{document.forms.proprefs.submit()}}function isLeftNavLocationValue(B){var A="Please make a selection from:";var C=document.forms.proprefs.locfolder.value;if(C=="x"||C==""){A+="\n-->Locations Dropdown";C="x"}if(C=="x"){alert(A);return false}else{document.forms.proprefs.submit()}}function isLeftNavStudentValue(C){var A="Please make a selection from:";var B=document.forms.studropdowns.collfolder.value;if(B=="x"||B==""){A+="\n-->College Dropdown";B="x"}if(B=="x"){alert(A);return false}else{document.forms.studropdowns.submit()}}function ul_window(C,E,B){var A=E+46;var D=B+175;newwin=window.open(C,"ul_window","toolbar=0,location=0,directories=0,scrollbars=1,status=0,menubar=0,resizable=1,width="+A+",height="+D);window.self.name="ul_parent"}function getJobSearchValues(B,F,A){var D=null;if(F=="goforsearch"){var C=document.forms.jobsearchform.loc.value;var E=document.forms.jobsearchform.cc.value;if(C!="x"&&E!="x"){D=B+"/WWWJobSearchServlet?location="+C+"&category="+E+"&jobtype="+A;asynchJobGet(D)}else{alert("Please select Job location name and Job category!!")}}else{if(F=="previousdropdown"){D=B+"/WWWJobSearchServlet?previousdropdown=true&jobtype="+A;asynchJobGet(D)}}}var jobSearchReq;function asynchJobGet(A){new Ajax.Request(A,{method:"get",onSuccess:function(C){var B=new Array();jobSearchReq=C;displayJobsAjaxValue(1)}})}function displayJobsAjaxValue(r){var B=null;if(document.implementation&&document.implementation.createDocument){var O=new DOMParser();B=O.parseFromString(jobSearchReq.responseText,"text/xml")}else{if(window.ActiveXObject){B=new ActiveXObject("Microsoft.XMLDOM");B.async="false";B.loadXML(jobSearchReq.responseText)}}if(B!=null){var t="/careers/pro/pro_index.html";var T=B.getElementsByTagName("JOBSEARCH");if(T.length!=0){for(var AB=0;AB<1;AB++){var o=T[AB].getElementsByTagName("JOBSTYPE")[0];var g=o.firstChild.nodeValue;var f=T[AB].getElementsByTagName("PREVIOUSDROPDOWN")[0];var V=f.firstChild.nodeValue;var M;var X=T[AB].getElementsByTagName("CONTEXTPATH")[0];if(X!=null||X!=""){M=X.firstChild.nodeValue;if(M=="nocontext"){M=""}}if(V=="true"){var D="";D=D+'<div class="drop-block">';D=D+'<div class="job-box">';D=D+'<div class="job-box-top">';D=D+'<form id="jobsearchid" name="jobsearchform" method="get">';D=D+'<select name="loc" style="width:170px">';D=D+'<option value="x">Select a Location</option>';D=D+'<option value="x">United States</option>';var b=B.getElementsByTagName("JOBSLOCATION");if(b.length!=0){for(var z=0;z<b.length;z++){var AC=b[z].getElementsByTagName("LOCDISPLAYNAME")[0];var R=AC.firstChild.nodeValue;var e=b[z].getElementsByTagName("LOCDISPLAYID")[0];var G=e.firstChild.nodeValue;var W=b[z].getElementsByTagName("LOCFOLDER")[0];var I=W.firstChild.nodeValue;D=D+'<option value="locdisplayname='+R+"999locid="+G+'">';if(I.indexOf("us_")!=-1){D=D+"..."}D=D+R;D=D+"</option>"}}D=D+"</select>";D=D+"<br/>";D=D+"<br/>";D=D+'<select name="cc" style="width:170px">';D=D+'<option value="x" selected="selected">Select a Career Category</option>';var s=B.getElementsByTagName("JOBSCATEGORY");if(s.length!=0){for(var y=0;y<s.length;y++){var K=s[y].getElementsByTagName("CATEGORYNAME")[0];var p=K.firstChild.nodeValue;var H=s[y].getElementsByTagName("CATEGORYID")[0];var P=H.firstChild.nodeValue;D=D+'<option value="catdisplayname='+p+"999catid="+P+'">'+p+"</option>"}}D=D+'<option value="2">Administrative </option>';D=D+"</select>";D=D+'<div class="go-button-wrapper">';D=D+'<input class="submit" type="submit" value="go" onclick="getJobSearchValues(\''+M+"', 'goforsearch','"+g+"');return false;\" />";D=D+"</div>";D=D+"</form>";D=D+"</div>";D=D+"</div>";D=D+"</div>";document.getElementById("jobsearchid").innerHTML=D}else{if(V=="false"){var v=T[AB].getElementsByTagName("JOBLOCATION")[0];var AG=v.firstChild.nodeValue;var q=T[AB].getElementsByTagName("JOBLOCATIONID")[0];var A=q.firstChild.nodeValue;var h=T[AB].getElementsByTagName("JOBCATEGORY")[0];var u=h.firstChild.nodeValue;var N=T[AB].getElementsByTagName("JOBCATEGORYID")[0];var J=N.firstChild.nodeValue;var AE=T[AB].getElementsByTagName("JOBCONTENT")[0];var F=AE.firstChild.nodeValue;if(F=="false"){var C="";C=C+'<div class="drop-block">';C=C+'<div class="job-box">';C=C+'<div class="job-box-top">';C=C+'<h1>Jobs for "'+AG+'" and "'+u+'"</h1>';C=C+'<div align="right">';C=C+'<a href="#" onclick="getJobSearchValues(\''+M+"', 'previousdropdown','"+g+"'); return false;\" >Change Selection</a>";C=C+"</div>";C=C+"</div>";C=C+'<div class="job-box-mid">';C=C+'<div class="title">';C=C+"Please try another search. We could not find opportunities based on your current selections.";C=C+"</div>";C=C+"</div>";C=C+"</div>";C=C+"</div>";document.getElementById("jobsearchid").innerHTML=C}else{if(F=="true"){var E=T[AB].getElementsByTagName("JOBSDETAILS");if(E.length!=0){var U=E.length;var d;var Z;if(U>5){d=(r-1)*5;Z=d+5;if(Z>U){Z=U}}else{if(U<=5){d=0;Z=U}}var C="";C=C+'<div class="drop-block">';C=C+'<div class="job-box">';C=C+'<div class="job-box-top">';C=C+'<h1>Jobs for "'+AG+'" and "'+u+'"</h1>';C=C+'<div align="right">';t;C=C+'<a href="#" onclick="getJobSearchValues(\''+M+"', 'previousdropdown','"+g+"'); return false;\" >Change Selection</a>";C=C+"</div>";C=C+"</div>";C=C+'<div class="job-box-mid">';for(var AD=d;AD<Z;AD++){var w=E[AD].getElementsByTagName("JOBSTITLE")[0];var c=w.firstChild.nodeValue;var Q=E[AD].getElementsByTagName("JOBSDATE")[0];var Y=Q.firstChild.nodeValue;var AF=E[AD].getElementsByTagName("JOBSURL")[0];var S=AF.firstChild.nodeValue;C=C+'<div class="job-title">';C=C+"<a href="+S+">";C=C+c;C=C+"</a>";C=C+"</div>";C=C+'<div class="job_date">';C=C+"Posted: "+Y;C=C+"</div>";if(U>5&&AD==(Z-1)){C=C+'<div class="justify-right">';C=C+'<ul class="pagination">';var AH;var x=E.length/5;for(var AA=0;AA<x;AA++){var L=AA+1;if(r==L){AH=L+1;C=C+"<li>"+L+"</li>"}else{C=C+'<li><a href="#" onclick="displayJobsAjaxValue(\''+L+"'); return false;\" >"+L+"</a></li>"}}if(E.length==Z){C=C+'<li><a href="#"><img src="/common/images/rt_arrow.gif" /></a></li>'}else{C=C+'<li><a href="#" onclick="displayJobsAjaxValue(\''+AH+'\'); return false;" ><img src="/common/images/rt_arrow.gif" /></a></li>'}C=C+"</ul>";C=C+"</div>"}}var a="http://jobs.qualcomm.com/staffing/Staffing.asp?page=search_results&selJobAreas="+J+"&selUSLocations="+A;C=C+"</div>";C=C+'<a class="reset" href='+a+">View all related careers</a>";C=C+"</div>";C=C+"</div>";document.getElementById("jobsearchid").innerHTML=C}}}}}}}}}function validateCaptcha(){var F=document.getElementById("txtGSCODE").value;var C=false;try{C=new XMLHttpRequest()}catch(B){try{C=new ActiveXObject("Msxml2.XMLHTTP")}catch(E){try{C=new ActiveXObject("Microsoft.XMLHTTP")}catch(A){C=false}}}if(C==false){return"false"}var D="validate";C.open("GET","/nocache/jcaptcha?GSCODE="+escape(F)+"&rand="+Math.random()*10+"&action="+D,false);C.setRequestHeader("Content-Length","0");C.send(null);if(C.readyState==4&&C.status==200){if(C.responseText=="false"){window.alert("Please enter the valid text shown in the image");document.getElementById("txtGSCODE").value="";next();return false}return true}}function next(){var A=new Date();var B=document.images.captcha.src;B=B.substring(0,B.indexOf("&rand=")+6);B=B+A.getTime();if(document.images){document.images.captcha.src=B}}var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;var requiredMajorVersion=8;var requiredMinorVersion=0;var requiredRevision=0;function ControlVersion(){var A;var B;var C;try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");A=B.GetVariable("$version")}catch(C){}if(!A){try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");A="WIN 6,0,21,0";B.AllowScriptAccess="always";A=B.GetVariable("$version")}catch(C){}}if(!A){try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");A=B.GetVariable("$version")}catch(C){}}if(!A){try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");A="WIN 3,0,18,0"}catch(C){}}if(!A){try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");A="WIN 2,0,0,11"}catch(C){A=-1}}return A}function GetSwfVer(){var G=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var F=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var A=navigator.plugins["Shockwave Flash"+F].description;var E=A.split(" ");var C=E[2].split(".");var H=C[0];var B=C[1];var D=E[3];if(D==""){D=E[4]}if(D[0]=="d"){D=D.substring(1)}else{if(D[0]=="r"){D=D.substring(1);if(D.indexOf("d")>0){D=D.substring(0,D.indexOf("d"))}}}var G=H+"."+B+"."+D}}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1){G=4}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1){G=3}else{if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1){G=2}else{if(isIE&&isWin&&!isOpera){G=ControlVersion()}}}}}return G}function DetectFlashVer(F,D,C){versionStr=GetSwfVer();if(versionStr==-1){return false}else{if(versionStr!=0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",")}else{versionArray=versionStr.split(".")}var E=versionArray[0];var A=versionArray[1];var B=versionArray[2];if(E>parseFloat(F)){return true}else{if(E==parseFloat(F)){if(A>parseFloat(D)){return true}else{if(A==parseFloat(D)){if(B>=parseFloat(C)){return true}}}}}return false}}}function AC_AddExtension(B,A){if(B.indexOf("?")!=-1){return B.replace(/\?/,A+"?")}else{return B+A}}function AC_Generateobj(E,D,A){var C="";if(isIE&&isWin&&!isOpera){C+="<object ";for(var B in E){C+=B+'="'+E[B]+'" '}for(var B in D){C+='><param name="'+B+'" value="'+D[B]+'" /> '}C+="></object>"}else{C+="<embed ";for(var B in A){C+=B+'="'+A[B]+'" '}C+="> </embed>"}document.write(C)}function AC_FL_RunContent(){var A=AC_GetArgs(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(A.objAttrs,A.params,A.embedAttrs)}function AC_GetArgs(B,E,G,D,H){var A=new Object();A.embedAttrs=new Object();A.params=new Object();A.objAttrs=new Object();for(var C=0;C<B.length;C=C+2){var F=B[C].toLowerCase();switch(F){case"classid":break;case"pluginspage":A.embedAttrs[B[C]]=B[C+1];break;case"src":case"movie":B[C+1]=AC_AddExtension(B[C+1],E);A.embedAttrs.src=B[C+1];A.params[G]=B[C+1];break;case"onafterupdate":case"onbeforeupdate":case"onblur":case"oncellchange":case"onclick":case"ondblClick":case"ondrag":case"ondragend":case"ondragenter":case"ondragleave":case"ondragover":case"ondrop":case"onfinish":case"onfocus":case"onhelp":case"onmousedown":case"onmouseup":case"onmouseover":case"onmousemove":case"onmouseout":case"onkeypress":case"onkeydown":case"onkeyup":case"onload":case"onlosecapture":case"onpropertychange":case"onreadystatechange":case"onrowsdelete":case"onrowenter":case"onrowexit":case"onrowsinserted":case"onstart":case"onscroll":case"onbeforeeditfocus":case"onactivate":case"onbeforedeactivate":case"ondeactivate":case"type":case"codebase":A.objAttrs[B[C]]=B[C+1];break;case"id":case"width":case"height":case"align":case"vspace":case"hspace":case"class":case"title":case"accesskey":case"name":case"tabindex":A.embedAttrs[B[C]]=A.objAttrs[B[C]]=B[C+1];break;default:A.embedAttrs[B[C]]=A.params[B[C]]=B[C+1]}}A.objAttrs.classid=D;if(H){A.embedAttrs.type=H}return A}com.qualcomm.Page.addThis={init:function(B){var C=new Array();var A=new Array();if(B){var B=$(B);A=B.select(".share");C=B.select(".send")}else{A=$$(".share");C=$$(".send")}A.each(function(D){D.observe("mouseover",function(){var G=Object.extend(this);var F=G.readAttribute("href");var H=G.readAttribute("title");var E=G.readAttribute("rel");if(F=="#"){F="[URL]"}if(!(E=="inline"&&H!="")){H="[TITLE]"}return addthis_open(this,"",F,H)});D.observe("mouseout",function(){})});C.each(function(D){D.observe("click",function(){var F=Object.extend(this);var E=F.readAttribute("href");if(E=="#"){E="[URL]"}return addthis_open(this,"email",E,E)})})}};document.observe("dom:loaded",function(){com.qualcomm.Page.addThis.init()});(function(){var A=24*60*60*1000;var E=function(I,J){I=String(I);while(I.length<J){I="0"+I}return I};var H={millisecond:1,second:1000,minute:60*1000,hour:60*60*1000,day:A,week:7*A,month:{add:function(K,I){H.year.add(K,Math[I>0?"floor":"ceil"](I/12));var J=K.getMonth()+(I%12);if(J==12){J=0;K.setYear(K.getFullYear()+1)}else{if(J==-1){J=11;K.setYear(K.getFullYear()-1)}}K.setMonth(J)},diff:function(M,K){var I=M.getFullYear()-K.getFullYear();var J=M.getMonth()-K.getMonth()+(I*12);var L=M.getDate()-K.getDate();return J+(L/30)}},year:{add:function(J,I){J.setYear(J.getFullYear()+Math[I>0?"floor":"ceil"](I))},diff:function(J,I){return H.month.diff(J,I)/12}}};for(var D in H){if(D.substring(D.length-1)!="s"){H[D+"s"]=H[D]}}var G=function(L,K){if(Date.prototype.strftime.formatShortcuts[K]){return L.strftime(Date.prototype.strftime.formatShortcuts[K])}else{var I=(Date.prototype.strftime.formatCodes[K]||"").split(".");var J=L["get"+I[0]]?L["get"+I[0]]():"";if(I[1]){J=E(J,I[1])}return J}};var C={succ:function(I){return this.clone().add(1,I)},add:function(K,J){var I=H[J]||H.day;if(typeof I=="number"){this.setTime(this.getTime()+(I*K))}else{I.add(this,K)}return this},diff:function(J,M,I){J=Date.create(J);if(J===null){return null}var K=H[M]||H.day;if(typeof K=="number"){var L=(this.getTime()-J.getTime())/K}else{var L=K.diff(this,J)}return(I?L:Math[L>0?"floor":"ceil"](L))},strftime:function(J){var L=J||"%Y-%m-%d",I="",K;while(L.length>0){if(K=L.match(Date.prototype.strftime.formatCodes.matcher)){I+=L.slice(0,K.index);I+=(K[1]||"")+G(this,K[2]);L=L.slice(K.index+K[0].length)}else{I+=L,L=""}}return I},getShortYear:function(){return this.getYear()%100},getMonthNumber:function(){return this.getMonth()+1},getMonthName:function(){return Date.MONTHNAMES[this.getMonth()]},getAbbrMonthName:function(){return Date.ABBR_MONTHNAMES[this.getMonth()]},getDayName:function(){return Date.DAYNAMES[this.getDay()]},getAbbrDayName:function(){return Date.ABBR_DAYNAMES[this.getDay()]},getDayOrdinal:function(){return Date.ORDINALNAMES[this.getDate()%10]},getHours12:function(){var I=this.getHours();return I>12?I-12:(I==0?12:I)},getAmPm:function(){return this.getHours()>=12?"PM":"AM"},getUnix:function(){return Math.round(this.getTime()/1000,0)},getGmtOffset:function(){var I=this.getTimezoneOffset()/60;var J=I<0?"+":"-";I=Math.abs(I);return J+E(Math.floor(I),2)+":"+E((I%1)*60,2)},getTimezoneName:function(){var I=/(?:\((.+)\)$| ([A-Z]{3}) )/.exec(this.toString());return I[1]||I[2]||"GMT"+this.getGmtOffset()},toYmdInt:function(){return(this.getFullYear()*10000)+(this.getMonthNumber()*100)+this.getDate()},clone:function(){return new Date(this.getTime())}};for(var B in C){Date.prototype[B]=C[B]}var F={create:function(I){if(I instanceof Date){return I}if(typeof I=="number"){return new Date(I*1000)}var N=String(I).replace(/^\s*(.+)\s*$/,"$1"),J=0,K=Date.create.patterns.length,L;var M=N;while(J<K){ms=Date.parse(M);if(!isNaN(ms)){return new Date(ms)}L=Date.create.patterns[J];if(typeof L=="function"){obj=L(M);if(obj instanceof Date){return obj}}else{M=N.replace(L[0],L[1])}J++}return NaN},MONTHNAMES:"January February March April May June July August September October November December".split(" "),ABBR_MONTHNAMES:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),DAYNAMES:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ABBR_DAYNAMES:"Sun Mon Tue Wed Thu Fri Sat".split(" "),ORDINALNAMES:"th st nd rd th th th th th th".split(" "),ISO:"%Y-%m-%dT%H:%M:%S.%N%G",SQL:"%Y-%m-%d %H:%M:%S",daysInMonth:function(I,J){if(J==2){return new Date(I,1,29).getDate()==29?29:28}return[undefined,31,undefined,31,30,31,30,31,31,30,31,30,31][J]}};for(var B in F){Date[B]=F[B]}Date.prototype.strftime.formatCodes={matcher:/()%(#?(%|[a-z]))/i,Y:"FullYear",y:"ShortYear.2",m:"MonthNumber.2","#m":"MonthNumber",B:"MonthName",b:"AbbrMonthName",d:"Date.2","#d":"Date",e:"Date",A:"DayName",a:"AbbrDayName",w:"Day",o:"DayOrdinal",H:"Hours.2","#H":"Hours",I:"Hours12.2","#I":"Hours12",p:"AmPm",M:"Minutes.2","#M":"Minutes",S:"Seconds.2","#S":"Seconds",s:"Unix",N:"Milliseconds.3","#N":"Milliseconds",O:"TimezoneOffset",Z:"TimezoneName",G:"GmtOffset"};Date.prototype.strftime.formatShortcuts={F:"%Y-%m-%d",T:"%H:%M:%S",X:"%H:%M:%S",x:"%m/%d/%y",D:"%m/%d/%y","#c":"%a %b %e %H:%M:%S %Y",v:"%e-%b-%Y",R:"%H:%M",r:"%I:%M:%S %p",t:"\t",n:"\n","%":"%"};Date.create.patterns=[[/-/g,"/"],[/st|nd|rd|th/g,""],[/(3[01]|[0-2]\d)\s*\.\s*(1[0-2]|0\d)\s*\.\s*([1-9]\d{3})/,"$2/$1/$3"],[/([1-9]\d{3})\s*-\s*(1[0-2]|0\d)\s*-\s*(3[01]|[0-2]\d)/,"$2/$3/$1"],function(L){var J=L.match(/^(?:(.+)\s+)?([1-9]|1[012])(?:\s*\:\s*(\d\d))?(?:\s*\:\s*(\d\d))?\s*(am|pm)\s*$/i);if(J){if(J[1]){var K=Date.create(J[1]);if(isNaN(K)){return }}else{var K=new Date();K.setMilliseconds(0)}var I=parseFloat(J[2]);I=J[5].toLowerCase()=="am"?(I==12?0:I):(I==12?12:I+12);K.setHours(I,parseFloat(J[3]||0),parseFloat(J[4]||0));return K}}]})();var $D=Date.create;