(function(jQuery){jQuery.each(['backgroundColor','borderBottomColor','borderLeftColor','borderRightColor','borderTopColor','color','outlineColor'],function(i,attr){jQuery.fx.step[attr]=function(fx){if(fx.state==0){fx.start=getColor(fx.elem,attr);fx.end=getRGB(fx.end);}
fx.elem.style[attr]="rgb("+[Math.max(Math.min(parseInt((fx.pos*(fx.end[0]-fx.start[0]))+fx.start[0]),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[1]-fx.start[1]))+fx.start[1]),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[2]-fx.start[2]))+fx.start[2]),255),0)].join(",")+")";}});function getRGB(color){var result;if(color&&color.constructor==Array&&color.length==3)
return color;if(result=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
return[parseInt(result[1]),parseInt(result[2]),parseInt(result[3])];if(result=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
return[parseFloat(result[1])*2.55,parseFloat(result[2])*2.55,parseFloat(result[3])*2.55];if(result=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))
return[parseInt(result[1],16),parseInt(result[2],16),parseInt(result[3],16)];if(result=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))
return[parseInt(result[1]+result[1],16),parseInt(result[2]+result[2],16),parseInt(result[3]+result[3],16)];return colors[jQuery.trim(color).toLowerCase()];}
function getColor(elem,attr){var color;do{color=jQuery.curCSS(elem,attr);if(color!=''&&color!='transparent'||jQuery.nodeName(elem,"body"))
break;attr="backgroundColor";}while(elem=elem.parentNode);return getRGB(color);};var colors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]};})(jQuery);;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);(function($){$.dimensions={version:'1.2'};$.each(['Height','Width'],function(i,name){$.fn['inner'+name]=function(){if(!this[0])return;var torl=name=='Height'?'Top':'Left',borr=name=='Height'?'Bottom':'Right';return this.is(':visible')?this[0]['client'+name]:num(this,name.toLowerCase())+num(this,'padding'+torl)+num(this,'padding'+borr);};$.fn['outer'+name]=function(options){if(!this[0])return;var torl=name=='Height'?'Top':'Left',borr=name=='Height'?'Bottom':'Right';options=$.extend({margin:false},options||{});var val=this.is(':visible')?this[0]['offset'+name]:num(this,name.toLowerCase())+num(this,'border'+torl+'Width')+num(this,'border'+borr+'Width')+num(this,'padding'+torl)+num(this,'padding'+borr);return val+(options.margin?(num(this,'margin'+torl)+num(this,'margin'+borr)):0);};});$.each(['Left','Top'],function(i,name){$.fn['scroll'+name]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(name=='Left'?val:$(window)['scrollLeft'](),name=='Top'?val:$(window)['scrollTop']()):this['scroll'+name]=val;}):this[0]==window||this[0]==document?self[(name=='Left'?'pageXOffset':'pageYOffset')]||$.boxModel&&document.documentElement['scroll'+name]||document.body['scroll'+name]:this[0]['scroll'+name];};});$.fn.extend({position:function(){var left=0,top=0,elem=this[0],offset,parentOffset,offsetParent,results;if(elem){offsetParent=this.offsetParent();offset=this.offset();parentOffset=offsetParent.offset();offset.top-=num(elem,'marginTop');offset.left-=num(elem,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&$.css(offsetParent,'position')=='static'))offsetParent=offsetParent.offsetParent;return $(offsetParent);}});function num(el,prop){return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0;};})(jQuery);;(function($){$.fn.extend({autocomplete:function(urlOrData,options){var isUrl=typeof urlOrData=="string";options=$.extend({},$.Autocompleter.defaults,{url:isUrl?urlOrData:null,data:isUrl?null:urlOrData,delay:isUrl?$.Autocompleter.defaults.delay:10,max:options&&!options.scroll?10:150},options);options.highlight=options.highlight||function(value){return value;};options.formatMatch=options.formatMatch||options.formatItem;return this.each(function(){new $.Autocompleter(this,options);});},result:function(handler){return this.bind("result",handler);},search:function(handler){return this.trigger("search",[handler]);},flushCache:function(){return this.trigger("flushCache");},setOptions:function(options){return this.trigger("setOptions",[options]);},unautocomplete:function(){return this.trigger("unautocomplete");}});$.Autocompleter=function(input,options){var KEY={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var $input=$(input).attr("autocomplete","off").addClass(options.inputClass);var timeout;var previousValue="";var cache=$.Autocompleter.Cache(options);var hasFocus=0;var lastKeyPressCode;var config={mouseDownOnSelect:false};var select=$.Autocompleter.Select(options,input,selectCurrent,config);var blockSubmit;$.browser.opera&&$(input.form).bind("submit.autocomplete",function(){if(blockSubmit){blockSubmit=false;return false;}});$input.bind(($.browser.opera?"keypress":"keydown")+".autocomplete",function(event){hasFocus=1;lastKeyPressCode=event.keyCode;switch(event.keyCode){case KEY.UP:event.preventDefault();if(select.visible()){select.prev();}else{onChange(0,true);}break;case KEY.DOWN:event.preventDefault();if(select.visible()){select.next();}else{onChange(0,true);}break;case KEY.PAGEUP:event.preventDefault();if(select.visible()){select.pageUp();}else{onChange(0,true);}break;case KEY.PAGEDOWN:event.preventDefault();if(select.visible()){select.pageDown();}else{onChange(0,true);}break;case options.multiple&&$.trim(options.multipleSeparator)==","&&KEY.COMMA:case KEY.TAB:case KEY.RETURN:if(selectCurrent()){event.preventDefault();blockSubmit=true;return false;}break;case KEY.ESC:select.hide();break;default:clearTimeout(timeout);timeout=setTimeout(onChange,options.delay);break;}}).focus(function(){hasFocus++;}).blur(function(){hasFocus=0;if(!config.mouseDownOnSelect){hideResults();}}).click(function(){if(hasFocus++>1&&!select.visible()){onChange(0,true);}}).bind("search",function(){var fn=(arguments.length>1)?arguments[1]:null;function findValueCallback(q,data){var result;if(data&&data.length){for(var i=0;i<data.length;i++){if(data[i].result.toLowerCase()==q.toLowerCase()){result=data[i];break;}}}if(typeof fn=="function")fn(result);else $input.trigger("result",result&&[result.data,result.value]);}$.each(trimWords($input.val()),function(i,value){request(value,findValueCallback,findValueCallback);});}).bind("flushCache",function(){cache.flush();}).bind("setOptions",function(){$.extend(options,arguments[1]);if("data"in arguments[1])cache.populate();}).bind("unautocomplete",function(){select.unbind();$input.unbind();$(input.form).unbind(".autocomplete");});function selectCurrent(){var selected=select.selected();if(!selected)return false;var v=selected.result;previousValue=v;if(options.multiple){var words=trimWords($input.val());if(words.length>1){var seperator=options.multipleSeparator.length;var cursorAt=$(input).selection().start;var wordAt,progress=0;$.each(words,function(i,word){progress+=word.length;if(cursorAt<=progress){wordAt=i;return false;}progress+=seperator;});words[wordAt]=v;v=words.join(options.multipleSeparator);}v+=options.multipleSeparator;}$input.val(v);hideResultsNow();$input.trigger("result",[selected.data,selected.value]);return true;}function onChange(crap,skipPrevCheck){if(lastKeyPressCode==KEY.DEL){select.hide();return;}var currentValue=$input.val();if(!skipPrevCheck&&currentValue==previousValue)return;previousValue=currentValue;currentValue=lastWord(currentValue);if(currentValue.length>=options.minChars){$input.addClass(options.loadingClass);if(!options.matchCase)currentValue=currentValue.toLowerCase();request(currentValue,receiveData,hideResultsNow);}else{stopLoading();select.hide();}};function trimWords(value){if(!value)return[""];if(!options.multiple)return[$.trim(value)];return $.map(value.split(options.multipleSeparator),function(word){return $.trim(value).length?$.trim(word):null;});}function lastWord(value){if(!options.multiple)return value;var words=trimWords(value);if(words.length==1)return words[0];var cursorAt=$(input).selection().start;if(cursorAt==value.length){words=trimWords(value)}else{words=trimWords(value.replace(value.substring(cursorAt),""));}return words[words.length-1];}function autoFill(q,sValue){if(options.autoFill&&(lastWord($input.val()).toLowerCase()==q.toLowerCase())&&lastKeyPressCode!=KEY.BACKSPACE){$input.val($input.val()+sValue.substring(lastWord(previousValue).length));$(input).selection(previousValue.length,previousValue.length+sValue.length);}};function hideResults(){clearTimeout(timeout);timeout=setTimeout(hideResultsNow,200);};function hideResultsNow(){var wasVisible=select.visible();select.hide();clearTimeout(timeout);stopLoading();if(options.mustMatch){$input.search(function(result){if(!result){if(options.multiple){var words=trimWords($input.val()).slice(0,-1);$input.val(words.join(options.multipleSeparator)+(words.length?options.multipleSeparator:""));}else{$input.val("");$input.trigger("result",null);}}});}};function receiveData(q,data){if(data&&data.length&&hasFocus){stopLoading();select.display(data,q);autoFill(q,data[0].value);select.show();}else{hideResultsNow();}};function request(term,success,failure){if(!options.matchCase)term=term.toLowerCase();var data=cache.load(term);if(data&&data.length){success(term,data);}else if((typeof options.url=="string")&&(options.url.length>0)){var extraParams={timestamp:+new Date()};$.each(options.extraParams,function(key,param){extraParams[key]=typeof param=="function"?param():param;});$.ajax({mode:"abort",port:"autocomplete"+input.name,dataType:options.dataType,url:options.url,data:$.extend({q:lastWord(term),limit:options.max},extraParams),success:function(data){var parsed=options.parse&&options.parse(data)||parse(data);cache.add(term,parsed);success(term,parsed);}});}else{select.emptyList();failure(term);}};function parse(data){var parsed=[];var rows=data.split("\n");for(var i=0;i<rows.length;i++){var row=$.trim(rows[i]);if(row){row=row.split("|");parsed[parsed.length]={data:row,value:row[0],result:options.formatResult&&options.formatResult(row,row[0])||row[0]};}}return parsed;};function stopLoading(){$input.removeClass(options.loadingClass);};};$.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(row){return row[0];},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(value,term){return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>");},scroll:true,scrollHeight:180};$.Autocompleter.Cache=function(options){var data={};var length=0;function matchSubset(s,sub){if(!options.matchCase)s=s.toLowerCase();var i=s.indexOf(sub);if(options.matchContains=="word"){i=s.toLowerCase().search("\\b"+sub.toLowerCase());}if(i==-1)return false;return i==0||options.matchContains;};function add(q,value){if(length>options.cacheLength){flush();}if(!data[q]){length++;}data[q]=value;}function populate(){if(!options.data)return false;var stMatchSets={},nullData=0;if(!options.url)options.cacheLength=1;stMatchSets[""]=[];for(var i=0,ol=options.data.length;i<ol;i++){var rawValue=options.data[i];rawValue=(typeof rawValue=="string")?[rawValue]:rawValue;var value=options.formatMatch(rawValue,i+1,options.data.length);if(value===false)continue;var firstChar=value.charAt(0).toLowerCase();if(!stMatchSets[firstChar])stMatchSets[firstChar]=[];var row={value:value,data:rawValue,result:options.formatResult&&options.formatResult(rawValue)||value};stMatchSets[firstChar].push(row);if(nullData++<options.max){stMatchSets[""].push(row);}};$.each(stMatchSets,function(i,value){options.cacheLength++;add(i,value);});}setTimeout(populate,25);function flush(){data={};length=0;}return{flush:flush,add:add,populate:populate,load:function(q){if(!options.cacheLength||!length)return null;if(!options.url&&options.matchContains){var csub=[];for(var k in data){if(k.length>0){var c=data[k];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub.push(x);}});}}return csub;}else
if(data[q]){return data[q];}else
if(options.matchSubset){for(var i=q.length-1;i>=options.minChars;i--){var c=data[q.substr(0,i)];if(c){var csub=[];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub[csub.length]=x;}});return csub;}}}return null;}};};$.Autocompleter.Select=function(options,input,select,config){var CLASSES={ACTIVE:"ac_over"};var listItems,active=-1,data,term="",needsInit=true,element,list;function init(){if(!needsInit)return;element=$("<div/>").hide().addClass(options.resultsClass).css("position","absolute").appendTo(document.body);list=$("<ul/>").appendTo(element).mouseover(function(event){if(target(event).nodeName&&target(event).nodeName.toUpperCase()=='LI'){active=$("li",list).removeClass(CLASSES.ACTIVE).index(target(event));$(target(event)).addClass(CLASSES.ACTIVE);}}).click(function(event){$(target(event)).addClass(CLASSES.ACTIVE);select();input.focus();return false;}).mousedown(function(){config.mouseDownOnSelect=true;}).mouseup(function(){config.mouseDownOnSelect=false;});if(options.width>0)element.css("width",options.width);needsInit=false;}function target(event){var element=event.target;while(element&&element.tagName!="LI")element=element.parentNode;if(!element)return[];return element;}function moveSelect(step){listItems.slice(active,active+1).removeClass(CLASSES.ACTIVE);movePosition(step);var activeItem=listItems.slice(active,active+1).addClass(CLASSES.ACTIVE);if(options.scroll){var offset=0;listItems.slice(0,active).each(function(){offset+=this.offsetHeight;});if((offset+activeItem[0].offsetHeight-list.scrollTop())>list[0].clientHeight){list.scrollTop(offset+activeItem[0].offsetHeight-list.innerHeight());}else if(offset<list.scrollTop()){list.scrollTop(offset);}}};function movePosition(step){active+=step;if(active<0){active=listItems.size()-1;}else if(active>=listItems.size()){active=0;}}function limitNumberOfItems(available){return options.max&&options.max<available?options.max:available;}function fillList(){list.empty();var max=limitNumberOfItems(data.length);for(var i=0;i<max;i++){if(!data[i])continue;var formatted=options.formatItem(data[i].data,i+1,max,data[i].value,term);if(formatted===false)continue;var li=$("<li/>").html(options.highlight(formatted,term)).addClass(i%2==0?"ac_even":"ac_odd").appendTo(list)[0];$.data(li,"ac_data",data[i]);}listItems=list.find("li");if(options.selectFirst){listItems.slice(0,1).addClass(CLASSES.ACTIVE);active=0;}if($.fn.bgiframe)list.bgiframe();}return{display:function(d,q){init();data=d;term=q;fillList();},next:function(){moveSelect(1);},prev:function(){moveSelect(-1);},pageUp:function(){if(active!=0&&active-8<0){moveSelect(-active);}else{moveSelect(-8);}},pageDown:function(){if(active!=listItems.size()-1&&active+8>listItems.size()){moveSelect(listItems.size()-1-active);}else{moveSelect(8);}},hide:function(){element&&element.hide();listItems&&listItems.removeClass(CLASSES.ACTIVE);active=-1;},visible:function(){return element&&element.is(":visible");},current:function(){return this.visible()&&(listItems.filter("."+CLASSES.ACTIVE)[0]||options.selectFirst&&listItems[0]);},show:function(){var offset=$(input).offset();element.css({width:typeof options.width=="string"||options.width>0?options.width:$(input).width(),top:offset.top+input.offsetHeight,left:offset.left}).show();if(options.scroll){list.scrollTop(0);list.css({maxHeight:options.scrollHeight,overflow:'auto'});if($.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var listHeight=0;listItems.each(function(){listHeight+=this.offsetHeight;});var scrollbarsVisible=listHeight>options.scrollHeight;list.css('height',scrollbarsVisible?options.scrollHeight:listHeight);if(!scrollbarsVisible){listItems.width(list.width()-parseInt(listItems.css("padding-left"))-parseInt(listItems.css("padding-right")));}}}},selected:function(){var selected=listItems&&listItems.filter("."+CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);return selected&&selected.length&&$.data(selected[0],"ac_data");},emptyList:function(){list&&list.empty();},unbind:function(){element&&element.remove();}};};$.fn.selection=function(start,end){if(start!==undefined){return this.each(function(){if(this.createTextRange){var selRange=this.createTextRange();if(end===undefined||start==end){selRange.move("character",start);selRange.select();}else{selRange.collapse(true);selRange.moveStart("character",start);selRange.moveEnd("character",end);selRange.select();}}else if(this.setSelectionRange){this.setSelectionRange(start,end);}else if(this.selectionStart){this.selectionStart=start;this.selectionEnd=end;}});}var field=this[0];if(field.createTextRange){var range=document.selection.createRange(),orig=field.value,teststring="<->",textLength=range.text.length;range.text=teststring;var caretAt=field.value.indexOf(teststring);field.value=orig;this.selection(caretAt,caretAt+textLength);return{start:caretAt,end:caretAt+textLength}}else if(field.selectionStart!==undefined){return{start:field.selectionStart,end:field.selectionEnd}}};})(jQuery);(function(a){var c=(a.browser.msie?"paste":"input")+".mask";var b=(window.orientation!=undefined);a.mask={definitions:{"9":"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"}};a.fn.extend({caret:function(e,f){if(this.length==0){return}if(typeof e=="number"){f=(typeof f=="number")?f:e;return this.each(function(){if(this.setSelectionRange){this.focus();this.setSelectionRange(e,f)}else{if(this.createTextRange){var g=this.createTextRange();g.collapse(true);g.moveEnd("character",f);g.moveStart("character",e);g.select()}}})}else{if(this[0].setSelectionRange){e=this[0].selectionStart;f=this[0].selectionEnd}else{if(document.selection&&document.selection.createRange){var d=document.selection.createRange();e=0-d.duplicate().moveStart("character",-100000);f=e+d.text.length}}return{begin:e,end:f}}},unmask:function(){return this.trigger("unmask")},mask:function(j,d){if(!j&&this.length>0){var f=a(this[0]);var g=f.data("tests");return a.map(f.data("buffer"),function(l,m){return g[m]?l:null}).join("")}d=a.extend({placeholder:"_",completed:null},d);var k=a.mask.definitions;var g=[];var e=j.length;var i=null;var h=j.length;a.each(j.split(""),function(m,l){if(l=="?"){h--;e=m}else{if(k[l]){g.push(new RegExp(k[l]));if(i==null){i=g.length-1}}else{g.push(null)}}});return this.each(function(){var r=a(this);var m=a.map(j.split(""),function(x,y){if(x!="?"){return k[x]?d.placeholder:x}});var n=false;var q=r.val();r.data("buffer",m).data("tests",g);function v(x){while(++x<=h&&!g[x]){}return x}function t(x){while(!g[x]&&--x>=0){}for(var y=x;y<h;y++){if(g[y]){m[y]=d.placeholder;var z=v(y);if(z<h&&g[y].test(m[z])){m[y]=m[z]}else{break}}}s();r.caret(Math.max(i,x))}function u(y){for(var A=y,z=d.placeholder;A<h;A++){if(g[A]){var B=v(A);var x=m[A];m[A]=z;if(B<h&&g[B].test(x)){z=x}else{break}}}}function l(y){var x=a(this).caret();var z=y.keyCode;n=(z<16||(z>16&&z<32)||(z>32&&z<41));if((x.begin-x.end)!=0&&(!n||z==8||z==46)){w(x.begin,x.end)}if(z==8||z==46||(b&&z==127)){t(x.begin+(z==46?0:-1));return false}else{if(z==27){r.val(q);r.caret(0,p());return false}}}function o(B){if(n){n=false;return(B.keyCode==8)?false:null}B=B||window.event;var C=B.charCode||B.keyCode||B.which;var z=a(this).caret();if(B.ctrlKey||B.altKey||B.metaKey){return true}else{if((C>=32&&C<=125)||C>186){var x=v(z.begin-1);if(x<h){var A=String.fromCharCode(C);if(g[x].test(A)){u(x);m[x]=A;s();var y=v(x);a(this).caret(y);if(d.completed&&y==h){d.completed.call(r)}}}}}return false}function w(x,y){for(var z=x;z<y&&z<h;z++){if(g[z]){m[z]=d.placeholder}}}function s(){return r.val(m.join("")).val()}function p(y){var z=r.val();var C=-1;for(var B=0,x=0;B<h;B++){if(g[B]){m[B]=d.placeholder;while(x++<z.length){var A=z.charAt(x-1);if(g[B].test(A)){m[B]=A;C=B;break}}if(x>z.length){break}}else{if(m[B]==z[x]&&B!=e){x++;C=B}}}if(!y&&C+1<e){r.val("");w(0,h)}else{if(y||C+1>=e){s();if(!y){r.val(r.val().substring(0,C+1))}}}return(e?B:i)}if(!r.attr("readonly")){r.one("unmask",function(){r.unbind(".mask").removeData("buffer").removeData("tests")}).bind("focus.mask",function(){q=r.val();var x=p();s();setTimeout(function(){if(x==j.length){r.caret(0,x)}else{r.caret(x)}},0)}).bind("blur.mask",function(){p();if(r.val()!=q){r.change()}}).bind("keydown.mask",l).bind("keypress.mask",o).bind(c,function(){setTimeout(function(){r.caret(p(true))},0)})}p()})}})})(jQuery);jQuery(document).ready(function(){slideShow(5000);});function slideShow(speed){jQuery('ul.slideshow').append('<li id="slideshow-caption" class="caption"><div class="slideshow-caption-container"><h3></h3><p></p></div></li>');jQuery('ul.slideshow li').css({opacity:0.0});jQuery('ul.slideshow li:first').css({opacity:1.0});jQuery('#slideshow-caption h3').html(jQuery('ul.slideshow a:first').find('img').attr('title'));jQuery('#slideshow-caption p').html(jQuery('ul.slideshow a:first').find('img').attr('alt'));jQuery('#slideshow-caption').css({opacity:0.7,bottom:0});var timer=setInterval('gallery()',speed);jQuery('ul.slideshow').hover(function(){clearInterval(timer);},function(){timer=setInterval('gallery()',speed);});}
function gallery(){var current=(jQuery('ul.slideshow li.show')?jQuery('ul.slideshow li.show'):jQuery('#ul.slideshow li:first'));var next=((current.next().length)?((current.next().attr('id')=='slideshow-caption')?jQuery('ul.slideshow li:first'):current.next()):jQuery('ul.slideshow li:first'));var title=next.find('img').attr('title');var desc=next.find('img').attr('alt');next.css({opacity:0.0}).addClass('show').animate({opacity:1.0},1000);jQuery('#slideshow-caption').animate({bottom:-70},300,function(){jQuery('#slideshow-caption h3').html(title);jQuery('#slideshow-caption p').html(desc);jQuery('#slideshow-caption').animate({bottom:0},500);});current.animate({opacity:0.0},1000).removeClass('show');}
(function($){$.event.special.mousewheel={setup:function(){var handler=$.event.special.mousewheel.handler;if($.browser.mozilla)
$(this).bind('mousemove.mousewheel',function(event){$.data(this,'mwcursorposdata',{pageX:event.pageX,pageY:event.pageY,clientX:event.clientX,clientY:event.clientY});});if(this.addEventListener)
this.addEventListener(($.browser.mozilla?'DOMMouseScroll':'mousewheel'),handler,false);else
this.onmousewheel=handler;},teardown:function(){var handler=$.event.special.mousewheel.handler;$(this).unbind('mousemove.mousewheel');if(this.removeEventListener)
this.removeEventListener(($.browser.mozilla?'DOMMouseScroll':'mousewheel'),handler,false);else
this.onmousewheel=function(){};$.removeData(this,'mwcursorposdata');},handler:function(event){var args=Array.prototype.slice.call(arguments,1);event=$.event.fix(event||window.event);$.extend(event,$.data(this,'mwcursorposdata')||{});var delta=0,returnValue=true;if(event.wheelDelta)delta=event.wheelDelta/120;if(event.detail)delta=-event.detail/3;event.data=event.data||{};event.type="mousewheel";args.unshift(delta);args.unshift(event);return $.event.handle.apply(this,args);}};$.fn.extend({mousewheel:function(fn){return fn?this.bind("mousewheel",fn):this.trigger("mousewheel");},unmousewheel:function(fn){return this.unbind("mousewheel",fn);}});})(jQuery);(function(A){A.jScrollPane={active:[]};A.fn.jScrollPane=function(C){C=A.extend({},A.fn.jScrollPane.defaults,C);var B=function(){return false};return this.each(function(){var O=A(this);O.css("overflow","hidden");var X=this;if(A(this).parent().is(".jScrollPaneContainer")){var Ac=C.maintainPosition?O.position().top:0;var L=A(this).parent();var d=L.innerWidth();var Ad=L.outerHeight();var M=Ad;A(">.jScrollPaneTrack, >.jScrollArrowUp, >.jScrollArrowDown",L).remove();O.css({top:0})}else{var Ac=0;this.originalPadding=O.css("paddingTop")+" "+O.css("paddingRight")+" "+O.css("paddingBottom")+" "+O.css("paddingLeft");this.originalSidePaddingTotal=(parseInt(O.css("paddingLeft"))||0)+(parseInt(O.css("paddingRight"))||0);var d=O.innerWidth();var Ad=O.innerHeight();var M=Ad;O.wrap(A("<div></div>").attr({className:"jScrollPaneContainer"}).css({height:Ad+"px",width:d+"px"}));A(document).bind("emchange",function(Ae,Af,p){O.jScrollPane(C)})}if(C.reinitialiseOnImageLoad){var N=A.data(X,"jScrollPaneImagesToLoad")||A("img",O);var G=[];if(N.length){N.each(function(p,Ae){A(this).bind("load",function(){if(A.inArray(p,G)==-1){G.push(Ae);N=A.grep(N,function(Ag,Af){return Ag!=Ae});A.data(X,"jScrollPaneImagesToLoad",N);C.reinitialiseOnImageLoad=false;O.jScrollPane(C)}}).each(function(Af,Ag){if(this.complete||this.complete===undefined){this.src=this.src}})})}}var o=this.originalSidePaddingTotal;var l={height:"auto",width:d-C.scrollbarWidth-C.scrollbarMargin-o+"px"};if(C.scrollbarOnLeft){l.paddingLeft=C.scrollbarMargin+C.scrollbarWidth+"px"}else{l.paddingRight=C.scrollbarMargin+"px"}O.css(l);var m=O.outerHeight();var i=Ad/m;if(i<0.99){var H=O.parent();H.append(A("<div></div>").attr({className:"jScrollPaneTrack"}).css({width:C.scrollbarWidth+"px"}).append(A("<div></div>").attr({className:"jScrollPaneDrag"}).css({width:C.scrollbarWidth+"px"}).append(A("<div></div>").attr({className:"jScrollPaneDragTop"}).css({width:C.scrollbarWidth+"px"}),A("<div></div>").attr({className:"jScrollPaneDragBottom"}).css({width:C.scrollbarWidth+"px"}))));var z=A(">.jScrollPaneTrack",H);var P=A(">.jScrollPaneTrack .jScrollPaneDrag",H);if(C.showArrows){var g;var Ab;var S;var r;var j=function(){if(r>4||r%4==0){y(u+Ab*b)}r++};var K=function(p){A("html").unbind("mouseup",K);g.removeClass("jScrollActiveArrowButton");clearInterval(S)};var Z=function(){A("html").bind("mouseup",K);g.addClass("jScrollActiveArrowButton");r=0;j();S=setInterval(j,100)};H.append(A("<a></a>").attr({href:"javascript:;",className:"jScrollArrowUp"}).css({width:C.scrollbarWidth+"px"}).html("Scroll up").bind("mousedown",function(){g=A(this);Ab=-1;Z();this.blur();return false}).bind("click",B),A("<a></a>").attr({href:"javascript:;",className:"jScrollArrowDown"}).css({width:C.scrollbarWidth+"px"}).html("Scroll down").bind("mousedown",function(){g=A(this);Ab=1;Z();this.blur();return false}).bind("click",B));var Q=A(">.jScrollArrowUp",H);var J=A(">.jScrollArrowDown",H);if(C.arrowSize){M=Ad-C.arrowSize-C.arrowSize;z.css({height:M+"px",top:C.arrowSize+"px"})}else{var s=Q.height();C.arrowSize=s;M=Ad-s-J.height();z.css({height:M+"px",top:s+"px"})}}var w=A(this).css({position:"absolute",overflow:"visible"});var D;var Y;var b;var u=0;var V=i*Ad/2;var a=function(Ae,Ag){var Af=Ag=="X"?"Left":"Top";return Ae["page"+Ag]||(Ae["client"+Ag]+(document.documentElement["scroll"+Af]||document.body["scroll"+Af]))||0};var f=function(){return false};var v=function(){n();D=P.offset(false);D.top-=u;Y=M-P[0].offsetHeight;b=2*C.wheelSpeed*Y/m};var E=function(p){v();V=a(p,"Y")-u-D.top;A("html").bind("mouseup",T).bind("mousemove",h);if(A.browser.msie){A("html").bind("dragstart",f).bind("selectstart",f)}return false};var T=function(){A("html").unbind("mouseup",T).unbind("mousemove",h);V=i*Ad/2;if(A.browser.msie){A("html").unbind("dragstart",f).unbind("selectstart",f)}};var y=function(Ae){Ae=Ae<0?0:(Ae>Y?Y:Ae);u=Ae;P.css({top:Ae+"px"});var Af=Ae/Y;w.css({top:((Ad-m)*Af)+"px"});O.trigger("scroll");if(C.showArrows){Q[Ae==0?"addClass":"removeClass"]("disabled");J[Ae==Y?"addClass":"removeClass"]("disabled")}};var h=function(p){y(a(p,"Y")-D.top-V)};var q=Math.max(Math.min(i*(Ad-C.arrowSize*2),C.dragMaxHeight),C.dragMinHeight);P.css({height:q+"px"}).bind("mousedown",E);var k;var R;var I;var t=function(){if(R>8||R%4==0){y((u-((u-I)/2)))}R++};var Aa=function(){clearInterval(k);A("html").unbind("mouseup",Aa).unbind("mousemove",e)};var e=function(p){I=a(p,"Y")-D.top-V};var U=function(p){v();e(p);R=0;A("html").bind("mouseup",Aa).bind("mousemove",e);k=setInterval(t,100);t()};z.bind("mousedown",U);H.bind("mousewheel",function(Ae,Ag){v();n();var Af=u;y(u-Ag*b);var p=Af!=u;return!p});var F;var W;function c(){var p=(F-u)/C.animateStep;if(p>1||p<-1){y(u+p)}else{y(F);n()}}var n=function(){if(W){clearInterval(W);delete F}};var x=function(Af,p){if(typeof Af=="string"){$e=A(Af,O);if(!$e.length){return}Af=$e.offset().top-O.offset().top}H.scrollTop(0);n();var Ae=-Af/(Ad-m)*Y;if(p||!C.animateTo){y(Ae)}else{F=Ae;W=setInterval(c,C.animateInterval)}};O[0].scrollTo=x;O[0].scrollBy=function(Ae){var p=-parseInt(w.css("top"))||0;x(p+Ae)};v();x(-Ac,true);A("*",this).bind("focus",function(Ah){var Ag=A(this);var Aj=0;while(Ag[0]!=O[0]){Aj+=Ag.position().top;Ag=Ag.offsetParent()}var p=-parseInt(w.css("top"))||0;var Ai=p+Ad;var Af=Aj>p&&Aj<Ai;if(!Af){var Ae=Aj-C.scrollbarMargin;if(Aj>p){Ae+=A(this).height()+15+C.scrollbarMargin-Ad}x(Ae)}});if(location.hash){x(location.hash)}A(document).bind("click",function(Ae){$target=A(Ae.target);if($target.is("a")){var p=$target.attr("href");if(p.substr(0,1)=="#"){x(p)}}});A.jScrollPane.active.push(O[0])}else{O.css({height:Ad+"px",width:d-this.originalSidePaddingTotal+"px",padding:this.originalPadding});O.parent().unbind("mousewheel")}})};A.fn.jScrollPane.defaults={scrollbarWidth:10,scrollbarMargin:5,wheelSpeed:18,showArrows:false,arrowSize:0,animateTo:false,dragMinHeight:1,dragMaxHeight:99999,animateInterval:100,animateStep:3,maintainPosition:true,scrollbarOnLeft:false,reinitialiseOnImageLoad:false};A(window).bind("unload",function(){var C=A.jScrollPane.active;for(var B=0;B<C.length;B++){C[B].scrollTo=C[B].scrollBy=null}})})(jQuery);var tweetUsers=['Pokeangel','PokemonProject','RealAlkaline64','juanrryp','Jay_PaRaDoX','KazukiPP','Fran_EGL'];var buildString="";jQuery(document).ready(function(){jQuery('#twitter-ticker').slideDown('slow');for(var i=0;i<tweetUsers.length;i++)
{if(i!=0)buildString+='+OR+';buildString+='from:'+tweetUsers[i];}
var fileref=document.createElement('script');fileref.setAttribute("type","text/javascript");fileref.setAttribute("src","http://search.twitter.com/search.json?q="+buildString+"&callback=TweetTick&rpp=10");document.getElementsByTagName("head")[0].appendChild(fileref);});function TweetTick(ob)
{var container=jQuery('#tweet-container');container.html('');jQuery(ob.results).each(function(el){var str='	<div class="tweet">\
					<div class="tavatar"><a href="http://twitter.com/'+this.from_user+'" target="_blank"><img style="float:left; margin-right:5px;" align="texttop" width="40" height="40" border="0" src="'+this.profile_image_url+'" alt="'+this.from_user+'" />'+this.from_user+'</a><br><span class="time">'+relativeTime(this.created_at)+'</span></div>\
					<div class="txt">'+formatTwitString(this.text)+'</div>\
					</div>';container.append(str);});container.jScrollPane();}
function formatTwitString(str)
{str=' '+str;str=str.replace(/((ftp|https?):\/\/([-\w\.]+)+(:\d+)?(\/([\w/_\.]*(\?\S+)?)?)?)/gm,'<a href="$1" target="_blank">$1</a>');str=str.replace(/([^\w])\@([\w\-]+)/gm,'$1@<a href="http://twitter.com/$2" target="_blank">$2</a>');str=str.replace(/([^\w])\#([\w\-]+)/gm,'$1<a href="http://twitter.com/search?q=%23$2" target="_blank">#$2</a>');return str;}
function relativeTime(pastTime)
{var origStamp=Date.parse(pastTime);var curDate=new Date();var currentStamp=curDate.getTime();var difference=parseInt(currentStamp-origStamp)/1000;if(difference<0)return false;if(difference<=5)return"Ahora mismo";if(difference<=20)return"Hace pocos segundos";if(difference<=119)return"Hace un minuto";if(difference<3600)return"Hace "+parseInt(difference/60)+" minutos";if(difference<=1.5*3600)return"Hace una hora";if(difference<23.5*3600)return"Hace "+Math.round(difference/3600)+" horas";if(difference<1.5*24*3600)return"Hace un día";var dateArr=pastTime.split(' ');return dateArr[4].replace(/\:\d+$/,'')+' '+dateArr[2]+' '+dateArr[1]+(dateArr[3]!=curDate.getFullYear()?' '+dateArr[3]:'');}jQuery.noConflict()
var flexdropdownmenu={arrowpath:'http://img3.pokemon-project.com/web/2rp6x3d.jpg',animspeed:200,showhidedelay:[150,150],startzindex:1000,builtflexmenuids:[],positionul:function($,$ul,e,$anchor){var istoplevel=$ul.hasClass('jqflexmenu')
var docrightedge=$(document).scrollLeft()+$(window).width()-40
var docbottomedge=$(document).scrollTop()+$(window).height()-40
if(istoplevel){var offsets=$anchor.offset()
var anchorsetting=$anchor.data('setting')
var x=offsets.left+anchorsetting.useroffsets[0]+(anchorsetting.dir=="h"?$anchor.outerWidth():0)
var y=offsets.top+anchorsetting.useroffsets[1]+(anchorsetting.dir=="h"?0:$anchor.outerHeight())
x=(x+$ul.data('dimensions').w>docrightedge)?x-(anchorsetting.useroffsets[0]*2)-$ul.data('dimensions').w+$anchor.outerWidth()+(anchorsetting.dir=="h"?-($anchor.outerWidth()*2):0):x
y=(y+$ul.data('dimensions').h>docbottomedge)?y-(anchorsetting.useroffsets[1]*2)-$ul.data('dimensions').h-$anchor.outerHeight()+(anchorsetting.dir=="h"?($anchor.outerHeight()*2):0):y}
else{var $parentli=$ul.data('$parentliref')
var parentlioffset=$parentli.offset()
var x=$ul.data('dimensions').parentliw
var y=0
x=(parentlioffset.left+x+$ul.data('dimensions').w>docrightedge)?x-$ul.data('dimensions').parentliw-$ul.data('dimensions').w:x
y=(parentlioffset.top+$ul.data('dimensions').h>docbottomedge)?y-$ul.data('dimensions').h+$ul.data('dimensions').parentlih:y}
$ul.css({left:x,top:y})},showbox:function($,$flexmenu,e){clearTimeout($flexmenu.data('timers').hidetimer)
$flexmenu.data('timers').showtimer=setTimeout(function(){$flexmenu.show(flexdropdownmenu.animspeed)},this.showhidedelay[0])},hidebox:function($,$flexmenu){clearTimeout($flexmenu.data('timers').showtimer)
$flexmenu.data('timers').hidetimer=setTimeout(function(){$flexmenu.hide(100)},this.showhidedelay[1])},buildflexmenu:function($,$menu,$target){$menu.css({display:'block',visibility:'hidden',zIndex:this.startzindex}).addClass('jqflexmenu').appendTo(document.body)
$menu.bind('mouseenter',function(){clearTimeout($menu.data('timers').hidetimer)})
$menu.bind('mouseleave',function(){flexdropdownmenu.hidebox($,$menu)})
$menu.data('dimensions',{w:$menu.outerWidth(),h:$menu.outerHeight()})
$menu.data('timers',{})
var $lis=$menu.find("ul").parent()
$lis.each(function(i){var $li=$(this).css({zIndex:1000+i})
var $subul=$li.find('ul:eq(0)').css({display:'block'})
$subul.data('dimensions',{w:$subul.outerWidth(),h:$subul.outerHeight(),parentliw:this.offsetWidth,parentlih:this.offsetHeight})
$subul.data('$parentliref',$li)
$subul.data('timers',{})
$li.data('$subulref',$subul)
$li.children("a:eq(0)").append('<img src="'+flexdropdownmenu.arrowpath+'" class="rightarrowclass" width="7" height="9" style="border:0;" />')
$li.bind('mouseenter',function(e){var $targetul=$(this).css('zIndex',++flexdropdownmenu.startzindex).addClass("selected").data('$subulref')
if($targetul.queue().length<=1){clearTimeout($targetul.data('timers').hidetimer)
$targetul.data('timers').showtimer=setTimeout(function(){flexdropdownmenu.positionul($,$targetul,e)
$targetul.show(flexdropdownmenu.animspeed)},flexdropdownmenu.showhidedelay[0])}})
$li.bind('mouseleave',function(e){var $targetul=$(this).data('$subulref')
clearTimeout($targetul.data('timers').showtimer)
$targetul.data('timers').hidetimer=setTimeout(function(){$targetul.hide(100).data('$parentliref').removeClass('selected')},flexdropdownmenu.showhidedelay[1])})})
$menu.find('ul').andSelf().css({display:'none',visibility:'visible'})
this.builtflexmenuids.push($menu.get(0).id)},init:function($,$target,$flexmenu){if(this.builtflexmenuids.length==0){$(document).bind("click",function(e){if(e.button==0){$('.jqflexmenu').find('ul').andSelf().hide()}})}
if(jQuery.inArray($flexmenu.get(0).id,this.builtflexmenuids)==-1)
this.buildflexmenu($,$flexmenu,$target)
if($target.parents().filter('ul.jqflexmenu').length>0)
return
var useroffsets=$target.attr('data-offsets')?$target.attr('data-offsets').split(','):[0,0]
useroffsets=[parseInt(useroffsets[0]),parseInt(useroffsets[1])]
$target.data('setting',{dir:$target.attr('data-dir'),useroffsets:useroffsets})
$target.bind("mouseenter",function(e){$flexmenu.css('zIndex',++flexdropdownmenu.startzindex)
flexdropdownmenu.positionul($,$flexmenu,e,$target)
flexdropdownmenu.showbox($,$flexmenu,e)})
$target.bind("mouseleave",function(e){flexdropdownmenu.hidebox($,$flexmenu)})}}
jQuery.fn.addflexmenu=function(flexmenuid,options){var $=jQuery
return this.each(function(){var $target=$(this)
if(typeof options=="object"){if(options.dir)
$target.attr('data-dir',options.dir)
if(options.offsets)
$target.attr('data-offsets',options.offsets)}
if($('#'+flexmenuid).length==1)
flexdropdownmenu.init($,$target,$('#'+flexmenuid))})};jQuery(document).ready(function($){var $anchors=$('*[data-flexmenu]')
$anchors.each(function(){$(this).addflexmenu(this.getAttribute('data-flexmenu'))})})
function ddlistmenu(id,className){var menu=document.createElement('ul')
if(id)
menu.id=id
if(className)
menu.className=className
this.menu=menu}
ddlistmenu.prototype={addItem:function(url,text,target){var li=document.createElement('li')
li.innerHTML='<a href="'+url+'" target="'+target+'">'+text+'</a>'
this.menu.appendChild(li)
this.li=li
return this},addSubMenu:function(){var s=new ddlistmenu(null,null)
this.li.appendChild(s.menu)
return s}}
if(!hs){var hs={lang:{cssDirection:'ltr',loadingText:'Loading...',loadingTitle:'Click to cancel',focusTitle:'Click to bring to front',fullExpandTitle:'Expand to actual size (f)',creditsText:'',creditsTitle:'',previousText:'Previous',nextText:'Next',moveText:'Move',closeText:'Close',closeTitle:'Close (esc)',resizeTitle:'Resize',playText:'Play',playTitle:'Play slideshow (spacebar)',pauseText:'Pause',pauseTitle:'Pause slideshow (spacebar)',previousTitle:'Previous (arrow left)',nextTitle:'Next (arrow right)',moveTitle:'Move',fullExpandText:'1:1',number:'Image %1 of %2',restoreTitle:'Click to close image, click and drag to move. Use arrow keys for next and previous.',loadingText:'Cargando...',loadingTitle:'Click para cancelar',focusTitle:'Click para traer al frente',fullExpandTitle:'Expandir al tama&ntilde;o actual',fullExpandText:'Tama&ntilde;o real',creditsText:'',creditsTitle:'',previousText:'Anterior',previousTitle:'Anterior (flecha izquierda)',nextText:'Siguiente',nextTitle:'Siguiente (flecha derecha)',moveTitle:'Mover',moveText:'Mover',closeText:'Cerrar',closeTitle:'Cerrar (esc)',resizeTitle:'Redimensionar',playText:'Iniciar',playTitle:'Iniciar slideshow (barra espacio)',pauseText:'Pausar',pauseTitle:'Pausar slideshow (barra espacio)',restoreTitle:'Click para cerrar la imagen, click y arrastrar para mover. Usa las flechas del teclado para avanzar o retroceder.'},graphicsDir:'highslide/graphics/',expandCursor:'zoomin.cur',restoreCursor:'zoomout.cur',expandDuration:250,restoreDuration:250,marginLeft:15,marginRight:15,marginTop:15,marginBottom:15,zIndexCounter:1001,loadingOpacity:0.75,allowMultipleInstances:true,numberOfImagesToPreload:5,outlineWhileAnimating:2,outlineStartOffset:3,padToMinWidth:false,fullExpandPosition:'bottom right',fullExpandOpacity:1,showCredits:true,creditsHref:'http://highslide.com/',creditsTarget:'_self',enableKeyListener:true,openerTagNames:['a','area'],transitions:[],transitionDuration:250,dimmingOpacity:0,dimmingDuration:50,allowWidthReduction:false,allowHeightReduction:true,preserveContent:true,objectLoadTime:'before',cacheAjax:true,anchor:'auto',align:'auto',targetX:null,targetY:null,dragByHeading:true,minWidth:200,minHeight:200,allowSizeReduction:true,outlineType:'drop-shadow',skin:{controls:'<div class="highslide-controls"><ul>'+'<li class="highslide-previous">'+'<a href="#" title="{hs.lang.previousTitle}">'+'<span>{hs.lang.previousText}</span></a>'+'</li>'+'<li class="highslide-play">'+'<a href="#" title="{hs.lang.playTitle}">'+'<span>{hs.lang.playText}</span></a>'+'</li>'+'<li class="highslide-pause">'+'<a href="#" title="{hs.lang.pauseTitle}">'+'<span>{hs.lang.pauseText}</span></a>'+'</li>'+'<li class="highslide-next">'+'<a href="#" title="{hs.lang.nextTitle}">'+'<span>{hs.lang.nextText}</span></a>'+'</li>'+'<li class="highslide-move">'+'<a href="#" title="{hs.lang.moveTitle}">'+'<span>{hs.lang.moveText}</span></a>'+'</li>'+'<li class="highslide-full-expand">'+'<a href="#" title="{hs.lang.fullExpandTitle}">'+'<span>{hs.lang.fullExpandText}</span></a>'+'</li>'+'<li class="highslide-close">'+'<a href="#" title="{hs.lang.closeTitle}" >'+'<span>{hs.lang.closeText}</span></a>'+'</li>'+'</ul></div>',contentWrapper:'<div class="highslide-header"><ul>'+'<li class="highslide-previous">'+'<a href="#" title="{hs.lang.previousTitle}" onclick="return hs.previous(this)">'+'<span>{hs.lang.previousText}</span></a>'+'</li>'+'<li class="highslide-next">'+'<a href="#" title="{hs.lang.nextTitle}" onclick="return hs.next(this)">'+'<span>{hs.lang.nextText}</span></a>'+'</li>'+'<li class="highslide-move">'+'<a href="#" title="{hs.lang.moveTitle}" onclick="return false">'+'<span>{hs.lang.moveText}</span></a>'+'</li>'+'<li class="highslide-close">'+'<a href="#" title="{hs.lang.closeTitle}" onclick="return hs.close(this)">'+'<span>{hs.lang.closeText}</span></a>'+'</li>'+'</ul></div>'+'<div class="highslide-body"></div>'+'<div class="highslide-footer"><div>'+'<span class="highslide-resize" title="{hs.lang.resizeTitle}"><span></span></span>'+'</div></div>'},preloadTheseImages:[],continuePreloading:true,expanders:[],overrides:['allowSizeReduction','useBox','anchor','align','targetX','targetY','outlineType','outlineWhileAnimating','captionId','captionText','captionEval','captionOverlay','headingId','headingText','headingEval','headingOverlay','creditsPosition','dragByHeading','autoplay','numberPosition','transitions','dimmingOpacity','width','height','contentId','allowWidthReduction','allowHeightReduction','preserveContent','maincontentId','maincontentText','maincontentEval','objectType','cacheAjax','objectWidth','objectHeight','objectLoadTime','swfOptions','wrapperClassName','minWidth','minHeight','maxWidth','maxHeight','pageOrigin','slideshowGroup','easing','easingClose','fadeInOut','src'],overlays:[],idCounter:0,oPos:{x:['leftpanel','left','center','right','rightpanel'],y:['above','top','middle','bottom','below']},mouse:{},headingOverlay:{},captionOverlay:{},swfOptions:{flashvars:{},params:{},attributes:{}},timers:[],slideshows:[],pendingOutlines:{},sleeping:[],preloadTheseAjax:[],cacheBindings:[],cachedGets:{},clones:{},onReady:[],uaVersion:/Trident\/4\.0/.test(navigator.userAgent)?8:parseFloat((navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,'0'])[1]),ie:(document.all&&!window.opera),safari:/Safari/.test(navigator.userAgent),geckoMac:/Macintosh.+rv:1\.[0-8].+Gecko/.test(navigator.userAgent),$:function(a){if(a)return document.getElementById(a)},push:function(a,b){a[a.length]=b},createElement:function(a,b,c,d,e){var f=document.createElement(a);if(b)hs.extend(f,b);if(e)hs.setStyles(f,{padding:0,border:'none',margin:0});if(c)hs.setStyles(f,c);if(d)d.appendChild(f);return f},extend:function(a,b){for(var x in b)a[x]=b[x];return a},setStyles:function(a,b){for(var x in b){if(hs.ie&&x=='opacity'){if(b[x]>0.99)a.style.removeAttribute('filter');else a.style.filter='alpha(opacity='+(b[x]*100)+')'}else a.style[x]=b[x]}},animate:function(a,b,c){var d,end,unit;if(typeof c!='object'||c===null){var f=arguments;c={duration:f[2],easing:f[3],complete:f[4]}}if(typeof c.duration!='number')c.duration=250;c.easing=Math[c.easing]||Math.easeInQuad;c.curAnim=hs.extend({},b);for(var g in b){var e=new hs.fx(a,c,g);d=parseFloat(hs.css(a,g))||0;end=parseFloat(b[g]);unit=g!='opacity'?'px':'';e.custom(d,end,unit)}},css:function(c,d){if(c.style[d]){return c.style[d]}else if(document.defaultView){return document.defaultView.getComputedStyle(c,null).getPropertyValue(d)}else{if(d=='opacity')d='filter';var e=c.currentStyle[d.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()})];if(d=='filter')e=e.replace(/alpha\(opacity=([0-9]+)\)/,function(a,b){return b/100});return e===''?1:e}},getPageSize:function(){var d=document,w=window,iebody=d.compatMode&&d.compatMode!='BackCompat'?d.documentElement:d.body;var a=hs.ie?iebody.clientWidth:(d.documentElement.clientWidth||self.innerWidth),height=hs.ie?iebody.clientHeight:self.innerHeight;hs.page={width:a,height:height,scrollLeft:hs.ie?iebody.scrollLeft:pageXOffset,scrollTop:hs.ie?iebody.scrollTop:pageYOffset};return hs.page},getPosition:function(a){if(/area/i.test(a.tagName)){var b=document.getElementsByTagName('img');for(var i=0;i<b.length;i++){var u=b[i].useMap;if(u&&u.replace(/^.*?#/,'')==a.parentNode.name){a=b[i];break}}}var p={x:a.offsetLeft,y:a.offsetTop};while(a.offsetParent){a=a.offsetParent;p.x+=a.offsetLeft;p.y+=a.offsetTop;if(a!=document.body&&a!=document.documentElement){p.x-=a.scrollLeft;p.y-=a.scrollTop}}return p},expand:function(a,b,c,d){if(!a)a=hs.createElement('a',null,{display:'none'},hs.container);if(typeof a.getParams=='function')return b;if(d=='html'){for(var i=0;i<hs.sleeping.length;i++){if(hs.sleeping[i]&&hs.sleeping[i].a==a){hs.sleeping[i].awake();hs.sleeping[i]=null;return false}}hs.hasHtmlExpanders=true}try{new hs.Expander(a,b,c,d);return false}catch(e){return true}},htmlExpand:function(a,b,c){return hs.expand(a,b,c,'html')},getSelfRendered:function(){return hs.createElement('div',{className:'highslide-html-content',innerHTML:hs.replaceLang(hs.skin.contentWrapper)})},getElementByClass:function(a,b,c){var d=a.getElementsByTagName(b);for(var i=0;i<d.length;i++){if((new RegExp(c)).test(d[i].className)){return d[i]}}return null},replaceLang:function(s){s=s.replace(/\s/g,' ');var a=/{hs\.lang\.([^}]+)\}/g,matches=s.match(a),lang;if(matches)for(var i=0;i<matches.length;i++){lang=matches[i].replace(a,"$1");if(typeof hs.lang[lang]!='undefined')s=s.replace(matches[i],hs.lang[lang])}return s},setClickEvents:function(){var a=document.getElementsByTagName('a');for(var i=0;i<a.length;i++){var b=hs.isUnobtrusiveAnchor(a[i]);if(b&&!a[i].hsHasSetClick){(function(){var t=b;if(hs.fireEvent(hs,'onSetClickEvent',{element:a[i],type:t})){a[i].onclick=(b=='image')?function(){return hs.expand(this)}:function(){return hs.htmlExpand(this,{objectType:t})}}})();a[i].hsHasSetClick=true}}hs.getAnchors()},isUnobtrusiveAnchor:function(a){if(a.rel=='highslide')return'image';else if(a.rel=='highslide-ajax')return'ajax';else if(a.rel=='highslide-iframe')return'iframe';else if(a.rel=='highslide-swf')return'swf'},getCacheBinding:function(a){for(var i=0;i<hs.cacheBindings.length;i++){if(hs.cacheBindings[i][0]==a){var c=hs.cacheBindings[i][1];hs.cacheBindings[i][1]=c.cloneNode(1);return c}}return null},preloadAjax:function(e){var b=hs.getAnchors();for(var i=0;i<b.htmls.length;i++){var a=b.htmls[i];if(hs.getParam(a,'objectType')=='ajax'&&hs.getParam(a,'cacheAjax'))hs.push(hs.preloadTheseAjax,a)}hs.preloadAjaxElement(0)},preloadAjaxElement:function(i){if(!hs.preloadTheseAjax[i])return;var a=hs.preloadTheseAjax[i];var b=hs.getNode(hs.getParam(a,'contentId'));if(!b)b=hs.getSelfRendered();var c=new hs.Ajax(a,b,1);c.onError=function(){};c.onLoad=function(){hs.push(hs.cacheBindings,[a,b]);hs.preloadAjaxElement(i+1)};c.run()},focusTopmost:function(){var a=0,topmostKey=-1,expanders=hs.expanders,exp,zIndex;for(var i=0;i<expanders.length;i++){exp=expanders[i];if(exp){zIndex=exp.wrapper.style.zIndex;if(zIndex&&zIndex>a){a=zIndex;topmostKey=i}}}if(topmostKey==-1)hs.focusKey=-1;else expanders[topmostKey].focus()},getParam:function(a,b){a.getParams=a.onclick;var p=a.getParams?a.getParams():null;a.getParams=null;return(p&&typeof p[b]!='undefined')?p[b]:(typeof hs[b]!='undefined'?hs[b]:null)},getSrc:function(a){var b=hs.getParam(a,'src');if(b)return b;return a.href},getNode:function(b){var c=hs.$(b),clone=hs.clones[b],a={};if(!c&&!clone)return null;if(!clone){clone=c.cloneNode(true);clone.id='';hs.clones[b]=clone;return c}else{return clone.cloneNode(true)}},discardElement:function(d){if(d)hs.garbageBin.appendChild(d);hs.garbageBin.innerHTML=''},dim:function(a){if(!hs.dimmer){hs.dimmer=hs.createElement('div',{className:'highslide-dimming highslide-viewport-size',owner:'',onclick:function(){if(hs.fireEvent(hs,'onDimmerClick'))hs.close()}},{visibility:'visible',opacity:0},hs.container,true)}hs.dimmer.style.display='';hs.dimmer.owner+='|'+a.key;if(hs.geckoMac&&hs.dimmingGeckoFix)hs.setStyles(hs.dimmer,{background:'url('+hs.graphicsDir+'geckodimmer.png)',opacity:1});else hs.animate(hs.dimmer,{opacity:a.dimmingOpacity},hs.dimmingDuration)},undim:function(a){if(!hs.dimmer)return;if(typeof a!='undefined')hs.dimmer.owner=hs.dimmer.owner.replace('|'+a,'');if((typeof a!='undefined'&&hs.dimmer.owner!='')||(hs.upcoming&&hs.getParam(hs.upcoming,'dimmingOpacity')))return;if(hs.geckoMac&&hs.dimmingGeckoFix)hs.dimmer.style.display='none';else hs.animate(hs.dimmer,{opacity:0},hs.dimmingDuration,null,function(){hs.dimmer.style.display='none'})},transit:function(a,b){var c=b||hs.getExpander();b=c;if(hs.upcoming)return false;else hs.last=c;hs.removeEventListener(document,window.opera?'keypress':'keydown',hs.keyHandler);try{hs.upcoming=a;a.onclick()}catch(e){hs.last=hs.upcoming=null}try{if(!a||b.transitions[1]!='crossfade')b.close()}catch(e){}return false},previousOrNext:function(a,b){var c=hs.getExpander(a);if(c)return hs.transit(c.getAdjacentAnchor(b),c);else return false},previous:function(a){return hs.previousOrNext(a,-1)},next:function(a){return hs.previousOrNext(a,1)},keyHandler:function(e){if(!e)e=window.event;if(!e.target)e.target=e.srcElement;if(typeof e.target.form!='undefined')return true;if(!hs.fireEvent(hs,'onKeyDown',e))return true;var a=hs.getExpander();var b=null;switch(e.keyCode){case 70:if(a)a.doFullExpand();return true;case 32:b=2;break;case 34:case 39:case 40:b=1;break;case 8:case 33:case 37:case 38:b=-1;break;case 27:case 13:b=0}if(b!==null){hs.removeEventListener(document,window.opera?'keypress':'keydown',hs.keyHandler);if(!hs.enableKeyListener)return true;if(e.preventDefault)e.preventDefault();else e.returnValue=false;if(a){if(b==0){a.close()}else if(b==2){if(a.slideshow)a.slideshow.hitSpace()}else{if(a.slideshow)a.slideshow.pause();hs.previousOrNext(a.key,b)}return false}}return true},registerOverlay:function(a){hs.push(hs.overlays,hs.extend(a,{hsId:'hsId'+hs.idCounter++}))},addSlideshow:function(a){var b=a.slideshowGroup;if(typeof b=='object'){for(var i=0;i<b.length;i++){var o={};for(var x in a)o[x]=a[x];o.slideshowGroup=b[i];hs.push(hs.slideshows,o)}}else{hs.push(hs.slideshows,a)}},getWrapperKey:function(a,b){var c,re=/^highslide-wrapper-([0-9]+)$/;c=a;while(c.parentNode){if(c.hsKey!==undefined)return c.hsKey;if(c.id&&re.test(c.id))return c.id.replace(re,"$1");c=c.parentNode}if(!b){c=a;while(c.parentNode){if(c.tagName&&hs.isHsAnchor(c)){for(var d=0;d<hs.expanders.length;d++){var e=hs.expanders[d];if(e&&e.a==c)return d}}c=c.parentNode}}return null},getExpander:function(a,b){if(typeof a=='undefined')return hs.expanders[hs.focusKey]||null;if(typeof a=='number')return hs.expanders[a]||null;if(typeof a=='string')a=hs.$(a);return hs.expanders[hs.getWrapperKey(a,b)]||null},isHsAnchor:function(a){return(a.onclick&&a.onclick.toString().replace(/\s/g,' ').match(/hs.(htmlE|e)xpand/))},reOrder:function(){for(var i=0;i<hs.expanders.length;i++)if(hs.expanders[i]&&hs.expanders[i].isExpanded)hs.focusTopmost()},fireEvent:function(a,b,c){return a&&a[b]?(a[b](a,c)!==false):true},mouseClickHandler:function(e){if(!e)e=window.event;if(e.button>1)return true;if(!e.target)e.target=e.srcElement;var a=e.target;while(a.parentNode&&!(/highslide-(image|move|html|resize)/.test(a.className))){a=a.parentNode}var b=hs.getExpander(a);if(b&&(b.isClosing||!b.isExpanded))return true;if(b&&e.type=='mousedown'){if(e.target.form)return true;var c=a.className.match(/highslide-(image|move|resize)/);if(c){hs.dragArgs={exp:b,type:c[1],left:b.x.pos,width:b.x.size,top:b.y.pos,height:b.y.size,clickX:e.clientX,clickY:e.clientY};hs.addEventListener(document,'mousemove',hs.dragHandler);if(e.preventDefault)e.preventDefault();if(/highslide-(image|html)-blur/.test(b.content.className)){b.focus();hs.hasFocused=true}return false}else if(/highslide-html/.test(a.className)&&hs.focusKey!=b.key){b.focus();b.doShowHide('hidden')}}else if(e.type=='mouseup'){hs.removeEventListener(document,'mousemove',hs.dragHandler);if(hs.dragArgs){if(hs.styleRestoreCursor&&hs.dragArgs.type=='image')hs.dragArgs.exp.content.style.cursor=hs.styleRestoreCursor;var d=hs.dragArgs.hasDragged;if(!d&&!hs.hasFocused&&!/(move|resize)/.test(hs.dragArgs.type)){if(hs.fireEvent(b,'onImageClick'))b.close()}else if(d||(!d&&hs.hasHtmlExpanders)){hs.dragArgs.exp.doShowHide('hidden')}if(hs.dragArgs.exp.releaseMask)hs.dragArgs.exp.releaseMask.style.display='none';if(d)hs.fireEvent(hs.dragArgs.exp,'onDrop',hs.dragArgs);hs.hasFocused=false;hs.dragArgs=null}else if(/highslide-image-blur/.test(a.className)){a.style.cursor=hs.styleRestoreCursor}}return false},dragHandler:function(e){if(!hs.dragArgs)return true;if(!e)e=window.event;var a=hs.dragArgs,exp=a.exp;if(exp.iframe){if(!exp.releaseMask)exp.releaseMask=hs.createElement('div',null,{position:'absolute',width:exp.x.size+'px',height:exp.y.size+'px',left:exp.x.cb+'px',top:exp.y.cb+'px',zIndex:4,background:(hs.ie?'white':'none'),opacity:0.01},exp.wrapper,true);if(exp.releaseMask.style.display=='none')exp.releaseMask.style.display=''}a.dX=e.clientX-a.clickX;a.dY=e.clientY-a.clickY;var b=Math.sqrt(Math.pow(a.dX,2)+Math.pow(a.dY,2));if(!a.hasDragged)a.hasDragged=(a.type!='image'&&b>0)||(b>(hs.dragSensitivity||5));if(a.hasDragged&&e.clientX>5&&e.clientY>5){if(!hs.fireEvent(exp,'onDrag',a))return false;if(a.type=='resize')exp.resize(a);else{exp.moveTo(a.left+a.dX,a.top+a.dY);if(a.type=='image')exp.content.style.cursor='move'}}return false},wrapperMouseHandler:function(e){try{if(!e)e=window.event;var a=/mouseover/i.test(e.type);if(!e.target)e.target=e.srcElement;if(hs.ie)e.relatedTarget=a?e.fromElement:e.toElement;var b=hs.getExpander(e.target);if(!b.isExpanded)return;if(!b||!e.relatedTarget||hs.getExpander(e.relatedTarget,true)==b||hs.dragArgs)return;hs.fireEvent(b,a?'onMouseOver':'onMouseOut',e);for(var i=0;i<b.overlays.length;i++)(function(){var o=hs.$('hsId'+b.overlays[i]);if(o&&o.hideOnMouseOut){if(a)hs.setStyles(o,{visibility:'visible',display:''});hs.animate(o,{opacity:a?o.opacity:0},o.dur)}})()}catch(e){}},addEventListener:function(a,b,c){if(a==document&&b=='ready'){hs.push(hs.onReady,c)}try{a.addEventListener(b,c,false)}catch(e){try{a.detachEvent('on'+b,c);a.attachEvent('on'+b,c)}catch(e){a['on'+b]=c}}},removeEventListener:function(a,b,c){try{a.removeEventListener(b,c,false)}catch(e){try{a.detachEvent('on'+b,c)}catch(e){a['on'+b]=null}}},preloadFullImage:function(i){if(hs.continuePreloading&&hs.preloadTheseImages[i]&&hs.preloadTheseImages[i]!='undefined'){var a=document.createElement('img');a.onload=function(){a=null;hs.preloadFullImage(i+1)};a.src=hs.preloadTheseImages[i]}},preloadImages:function(a){if(a&&typeof a!='object')hs.numberOfImagesToPreload=a;var b=hs.getAnchors();for(var i=0;i<b.images.length&&i<hs.numberOfImagesToPreload;i++){hs.push(hs.preloadTheseImages,hs.getSrc(b.images[i]))}if(hs.outlineType)new hs.Outline(hs.outlineType,function(){hs.preloadFullImage(0)});else hs.preloadFullImage(0);if(hs.restoreCursor)var c=hs.createElement('img',{src:hs.graphicsDir+hs.restoreCursor})},init:function(){if(!hs.container){hs.getPageSize();hs.ieLt7=hs.ie&&hs.uaVersion<7;hs.ie6SSL=hs.ieLt7&&location.protocol=='https:';for(var x in hs.langDefaults){if(typeof hs[x]!='undefined')hs.lang[x]=hs[x];else if(typeof hs.lang[x]=='undefined'&&typeof hs.langDefaults[x]!='undefined')hs.lang[x]=hs.langDefaults[x]}hs.container=hs.createElement('div',{className:'highslide-container'},{position:'absolute',left:0,top:0,width:'100%',zIndex:hs.zIndexCounter,direction:'ltr'},document.body,true);hs.loading=hs.createElement('a',{className:'highslide-loading',title:hs.lang.loadingTitle,innerHTML:hs.lang.loadingText,href:'javascript:;'},{position:'absolute',top:'-9999px',opacity:hs.loadingOpacity,zIndex:1},hs.container);hs.garbageBin=hs.createElement('div',null,{display:'none'},hs.container);hs.viewport=hs.createElement('div',{className:'highslide-viewport highslide-viewport-size'},{visibility:(hs.safari&&hs.uaVersion<525)?'visible':'hidden'},hs.container,1);hs.clearing=hs.createElement('div',null,{clear:'both',paddingTop:'1px'},null,true);Math.linearTween=function(t,b,c,d){return c*t/d+b};Math.easeInQuad=function(t,b,c,d){return c*(t/=d)*t+b};Math.easeOutQuad=function(t,b,c,d){return-c*(t/=d)*(t-2)+b};hs.hideSelects=hs.ieLt7;hs.hideIframes=((window.opera&&hs.uaVersion<9)||navigator.vendor=='KDE'||(hs.ie&&hs.uaVersion<5.5));hs.fireEvent(this,'onActivate')}},ready:function(){if(hs.isReady)return;hs.isReady=true;for(var i=0;i<hs.onReady.length;i++)hs.onReady[i]()},updateAnchors:function(){var a,els,all=[],images=[],htmls=[],groups={},re;for(var i=0;i<hs.openerTagNames.length;i++){els=document.getElementsByTagName(hs.openerTagNames[i]);for(var j=0;j<els.length;j++){a=els[j];re=hs.isHsAnchor(a);if(re){hs.push(all,a);if(re[0]=='hs.expand')hs.push(images,a);else if(re[0]=='hs.htmlExpand')hs.push(htmls,a);var g=hs.getParam(a,'slideshowGroup')||'none';if(!groups[g])groups[g]=[];hs.push(groups[g],a)}}}hs.anchors={all:all,groups:groups,images:images,htmls:htmls};return hs.anchors},getAnchors:function(){return hs.anchors||hs.updateAnchors()},close:function(a){var b=hs.getExpander(a);if(b)b.close();return false}};hs.fx=function(a,b,c){this.options=b;this.elem=a;this.prop=c;if(!b.orig)b.orig={}};hs.fx.prototype={update:function(){(hs.fx.step[this.prop]||hs.fx.step._default)(this);if(this.options.step)this.options.step.call(this.elem,this.now,this)},custom:function(b,c,d){this.startTime=(new Date()).getTime();this.start=b;this.end=c;this.unit=d;this.now=this.start;this.pos=this.state=0;var e=this;function t(a){return e.step(a)}t.elem=this.elem;if(t()&&hs.timers.push(t)==1){hs.timerId=setInterval(function(){var a=hs.timers;for(var i=0;i<a.length;i++)if(!a[i]())a.splice(i--,1);if(!a.length){clearInterval(hs.timerId)}},13)}},step:function(a){var t=(new Date()).getTime();if(a||t>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var b=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)b=false;if(b){if(this.options.complete)this.options.complete.call(this.elem)}return false}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=this.options.easing(n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};hs.extend(hs.fx,{step:{opacity:function(a){hs.setStyles(a.elem,{opacity:a.now})},_default:function(a){try{if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=a.now+a.unit;else a.elem[a.prop]=a.now}catch(e){}}}});hs.Outline=function(a,b){this.onLoad=b;this.outlineType=a;var v=hs.uaVersion,tr;this.hasAlphaImageLoader=hs.ie&&v>=5.5&&v<7;if(!a){if(b)b();return}hs.init();this.table=hs.createElement('table',{cellSpacing:0},{visibility:'hidden',position:'absolute',borderCollapse:'collapse',width:0},hs.container,true);var c=hs.createElement('tbody',null,null,this.table,1);this.td=[];for(var i=0;i<=8;i++){if(i%3==0)tr=hs.createElement('tr',null,{height:'auto'},c,true);this.td[i]=hs.createElement('td',null,null,tr,true);var d=i!=4?{lineHeight:0,fontSize:0}:{position:'relative'};hs.setStyles(this.td[i],d)}this.td[4].className=a+' highslide-outline';this.preloadGraphic()};hs.Outline.prototype={preloadGraphic:function(){var a=hs.graphicsDir+(hs.outlinesDir||"outlines/")+this.outlineType+".png";var b=hs.safari&&hs.uaVersion<525?hs.container:null;this.graphic=hs.createElement('img',null,{position:'absolute',top:'-9999px'},b,true);var c=this;this.graphic.onload=function(){c.onGraphicLoad()};this.graphic.src=a},onGraphicLoad:function(){var o=this.offset=this.graphic.width/4,pos=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],dim={height:(2*o)+'px',width:(2*o)+'px'};for(var i=0;i<=8;i++){if(pos[i]){if(this.hasAlphaImageLoader){var w=(i==1||i==7)?'100%':this.graphic.width+'px';var a=hs.createElement('div',null,{width:'100%',height:'100%',position:'relative',overflow:'hidden'},this.td[i],true);hs.createElement('div',null,{filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+this.graphic.src+"')",position:'absolute',width:w,height:this.graphic.height+'px',left:(pos[i][0]*o)+'px',top:(pos[i][1]*o)+'px'},a,true)}else{hs.setStyles(this.td[i],{background:'url('+this.graphic.src+') '+(pos[i][0]*o)+'px '+(pos[i][1]*o)+'px'})}if(window.opera&&(i==3||i==5))hs.createElement('div',null,dim,this.td[i],true);hs.setStyles(this.td[i],dim)}}this.graphic=null;if(hs.pendingOutlines[this.outlineType])hs.pendingOutlines[this.outlineType].destroy();hs.pendingOutlines[this.outlineType]=this;if(this.onLoad)this.onLoad()},setPosition:function(a,b,c,d,e){var f=this.exp,stl=f.wrapper.style,b=b||0,a=a||{x:f.x.pos+b,y:f.y.pos+b,w:f.x.get('wsize')-2*b,h:f.y.get('wsize')-2*b};if(c)this.table.style.visibility=(a.h>=4*this.offset)?'visible':'hidden';hs.setStyles(this.table,{left:(a.x-this.offset)+'px',top:(a.y-this.offset)+'px',width:(a.w+2*this.offset)+'px'});a.w-=2*this.offset;a.h-=2*this.offset;hs.setStyles(this.td[4],{width:a.w>=0?a.w+'px':0,height:a.h>=0?a.h+'px':0});if(this.hasAlphaImageLoader)this.td[3].style.height=this.td[5].style.height=this.td[4].style.height},destroy:function(a){if(a)this.table.style.visibility='hidden';else hs.discardElement(this.table)}};hs.Dimension=function(a,b){this.exp=a;this.dim=b;this.ucwh=b=='x'?'Width':'Height';this.wh=this.ucwh.toLowerCase();this.uclt=b=='x'?'Left':'Top';this.lt=this.uclt.toLowerCase();this.ucrb=b=='x'?'Right':'Bottom';this.rb=this.ucrb.toLowerCase();this.p1=this.p2=0};hs.Dimension.prototype={get:function(a){switch(a){case'loadingPos':return this.tpos+this.tb+(this.t-hs.loading['offset'+this.ucwh])/2;case'loadingPosXfade':return this.pos+this.cb+this.p1+(this.size-hs.loading['offset'+this.ucwh])/2;case'wsize':return this.size+2*this.cb+this.p1+this.p2;case'fitsize':return this.clientSize-this.marginMin-this.marginMax;case'maxsize':return this.get('fitsize')-2*this.cb-this.p1-this.p2;case'opos':return this.pos-(this.exp.outline?this.exp.outline.offset:0);case'osize':return this.get('wsize')+(this.exp.outline?2*this.exp.outline.offset:0);case'imgPad':return this.imgSize?Math.round((this.size-this.imgSize)/2):0}},calcBorders:function(){this.cb=(this.exp.content['offset'+this.ucwh]-this.t)/2;this.marginMax=hs['margin'+this.ucrb]},calcThumb:function(){this.t=this.exp.el[this.wh]?parseInt(this.exp.el[this.wh]):this.exp.el['offset'+this.ucwh];this.tpos=this.exp.tpos[this.dim];this.tb=(this.exp.el['offset'+this.ucwh]-this.t)/2;if(this.tpos==0||this.tpos==-1){this.tpos=(hs.page[this.wh]/2)+hs.page['scroll'+this.uclt]}},calcExpanded:function(){var a=this.exp;this.justify='auto';if(a.align=='center')this.justify='center';else if(new RegExp(this.lt).test(a.anchor))this.justify=null;else if(new RegExp(this.rb).test(a.anchor))this.justify='max';this.pos=this.tpos-this.cb+this.tb;if(this.maxHeight&&this.dim=='x')a.maxWidth=Math.min(a.maxWidth||this.full,a.maxHeight*this.full/a.y.full);this.size=Math.min(this.full,a['max'+this.ucwh]||this.full);this.minSize=a.allowSizeReduction?Math.min(a['min'+this.ucwh],this.full):this.full;if(a.isImage&&a.useBox){this.size=a[this.wh];this.imgSize=this.full}if(this.dim=='x'&&hs.padToMinWidth)this.minSize=a.minWidth;this.target=a['target'+this.dim.toUpperCase()];this.marginMin=hs['margin'+this.uclt];this.scroll=hs.page['scroll'+this.uclt];this.clientSize=hs.page[this.wh]},setSize:function(i){var a=this.exp;if(a.isImage&&(a.useBox||hs.padToMinWidth)){this.imgSize=i;this.size=Math.max(this.size,this.imgSize);a.content.style[this.lt]=this.get('imgPad')+'px'}else this.size=i;a.content.style[this.wh]=i+'px';a.wrapper.style[this.wh]=this.get('wsize')+'px';if(a.outline)a.outline.setPosition();if(a.releaseMask)a.releaseMask.style[this.wh]=i+'px';if(this.dim=='y'&&a.iDoc&&a.body.style.height!='auto')try{a.iDoc.body.style.overflow='auto'}catch(e){}if(a.isHtml){var d=a.scrollerDiv;if(this.sizeDiff===undefined)this.sizeDiff=a.innerContent['offset'+this.ucwh]-d['offset'+this.ucwh];d.style[this.wh]=(this.size-this.sizeDiff)+'px';if(this.dim=='x')a.mediumContent.style.width='auto';if(a.body)a.body.style[this.wh]='auto'}if(this.dim=='x'&&a.overlayBox)a.sizeOverlayBox(true);if(this.dim=='x'&&a.slideshow&&a.isImage){if(i==this.full)a.slideshow.disable('full-expand');else a.slideshow.enable('full-expand')}},setPos:function(i){this.pos=i;this.exp.wrapper.style[this.lt]=i+'px';if(this.exp.outline)this.exp.outline.setPosition()}};hs.Expander=function(a,b,c,d){if(document.readyState&&hs.ie&&!hs.isReady){hs.addEventListener(document,'ready',function(){new hs.Expander(a,b,c,d)});return}this.a=a;this.custom=c;this.contentType=d||'image';this.isHtml=(d=='html');this.isImage=!this.isHtml;hs.continuePreloading=false;this.overlays=[];this.last=hs.last;hs.last=null;hs.init();var e=this.key=hs.expanders.length;for(var i=0;i<hs.overrides.length;i++){var f=hs.overrides[i];this[f]=b&&typeof b[f]!='undefined'?b[f]:hs[f]}if(!this.src)this.src=a.href;var g=(b&&b.thumbnailId)?hs.$(b.thumbnailId):a;g=this.thumb=g.getElementsByTagName('img')[0]||g;this.thumbsUserSetId=g.id||a.id;if(!hs.fireEvent(this,'onInit'))return true;for(var i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&hs.expanders[i].a==a&&!(this.last&&this.transitions[1]=='crossfade')){hs.expanders[i].focus();return false}}if(!hs.allowSimultaneousLoading)for(var i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&hs.expanders[i].thumb!=g&&!hs.expanders[i].onLoadStarted){hs.expanders[i].cancelLoading()}}hs.expanders[e]=this;if(!hs.allowMultipleInstances&&!hs.upcoming){if(hs.expanders[e-1])hs.expanders[e-1].close();if(typeof hs.focusKey!='undefined'&&hs.expanders[hs.focusKey])hs.expanders[hs.focusKey].close()}this.el=g;this.tpos=this.pageOrigin||hs.getPosition(g);hs.getPageSize();var x=this.x=new hs.Dimension(this,'x');x.calcThumb();var y=this.y=new hs.Dimension(this,'y');y.calcThumb();if(/area/i.test(g.tagName))this.getImageMapAreaCorrection(g);this.wrapper=hs.createElement('div',{id:'highslide-wrapper-'+this.key,className:'highslide-wrapper '+this.wrapperClassName},{visibility:'hidden',position:'absolute',zIndex:hs.zIndexCounter+=2},null,true);this.wrapper.onmouseover=this.wrapper.onmouseout=hs.wrapperMouseHandler;if(this.contentType=='image'&&this.outlineWhileAnimating==2)this.outlineWhileAnimating=0;if(!this.outlineType||(this.last&&this.isImage&&this.transitions[1]=='crossfade')){this[this.contentType+'Create']()}else if(hs.pendingOutlines[this.outlineType]){this.connectOutline();this[this.contentType+'Create']()}else{this.showLoading();var h=this;new hs.Outline(this.outlineType,function(){h.connectOutline();h[h.contentType+'Create']()})}return true};hs.Expander.prototype={error:function(e){if(hs.debug)alert('Line '+e.lineNumber+': '+e.message);else window.location.href=this.src},connectOutline:function(){var a=this.outline=hs.pendingOutlines[this.outlineType];a.exp=this;a.table.style.zIndex=this.wrapper.style.zIndex-1;hs.pendingOutlines[this.outlineType]=null},showLoading:function(){if(this.onLoadStarted||this.loading)return;this.loading=hs.loading;var a=this;this.loading.onclick=function(){a.cancelLoading()};if(!hs.fireEvent(this,'onShowLoading'))return;var a=this,l=this.x.get('loadingPos')+'px',t=this.y.get('loadingPos')+'px';if(!b&&this.last&&this.transitions[1]=='crossfade')var b=this.last;if(b){l=b.x.get('loadingPosXfade')+'px';t=b.y.get('loadingPosXfade')+'px';this.loading.style.zIndex=hs.zIndexCounter++}setTimeout(function(){if(a.loading)hs.setStyles(a.loading,{left:l,top:t,zIndex:hs.zIndexCounter++})},100)},imageCreate:function(){var a=this;var b=document.createElement('img');this.content=b;b.onload=function(){if(hs.expanders[a.key])a.contentLoaded()};if(hs.blockRightClick)b.oncontextmenu=function(){return false};b.className='highslide-image';hs.setStyles(b,{visibility:'hidden',display:'block',position:'absolute',maxWidth:'9999px',zIndex:3});b.title=hs.lang.restoreTitle;if(hs.safari&&hs.uaVersion<525)hs.container.appendChild(b);if(hs.ie&&hs.flushImgSize)b.src=null;b.src=this.src;this.showLoading()},htmlCreate:function(){if(!hs.fireEvent(this,'onBeforeGetContent'))return;this.content=hs.getCacheBinding(this.a);if(!this.content)this.content=hs.getNode(this.contentId);if(!this.content)this.content=hs.getSelfRendered();this.getInline(['maincontent']);if(this.maincontent){var a=hs.getElementByClass(this.content,'div','highslide-body');if(a)a.appendChild(this.maincontent);this.maincontent.style.display='block'}hs.fireEvent(this,'onAfterGetContent');var b=this.innerContent=this.content;if(/(swf|iframe)/.test(this.objectType))this.setObjContainerSize(b);hs.container.appendChild(this.wrapper);hs.setStyles(this.wrapper,{position:'static',padding:'0 '+hs.marginRight+'px 0 '+hs.marginLeft+'px'});this.content=hs.createElement('div',{className:'highslide-html'},{position:'relative',zIndex:3,height:0,overflow:'hidden'},this.wrapper);this.mediumContent=hs.createElement('div',null,null,this.content,1);this.mediumContent.appendChild(b);hs.setStyles(b,{position:'relative',display:'block',direction:hs.lang.cssDirection||''});if(this.width)b.style.width=this.width+'px';if(this.height)hs.setStyles(b,{height:this.height+'px',overflow:'hidden'});if(b.offsetWidth<this.minWidth)b.style.width=this.minWidth+'px';if(this.objectType=='ajax'&&!hs.getCacheBinding(this.a)){this.showLoading();var c=this;var d=new hs.Ajax(this.a,b);d.src=this.src;d.onLoad=function(){if(hs.expanders[c.key])c.contentLoaded()};d.onError=function(){location.href=c.src};d.run()}else if(this.objectType=='iframe'&&this.objectLoadTime=='before'){this.writeExtendedContent()}else this.contentLoaded()},contentLoaded:function(){try{if(!this.content)return;this.content.onload=null;if(this.onLoadStarted)return;else this.onLoadStarted=true;var x=this.x,y=this.y;if(this.loading){hs.setStyles(this.loading,{top:'-9999px'});this.loading=null;hs.fireEvent(this,'onHideLoading')}if(this.isImage){x.full=this.content.width;y.full=this.content.height;hs.setStyles(this.content,{width:x.t+'px',height:y.t+'px'});this.wrapper.appendChild(this.content);hs.container.appendChild(this.wrapper)}else if(this.htmlGetSize)this.htmlGetSize();x.calcBorders();y.calcBorders();hs.setStyles(this.wrapper,{left:(x.tpos+x.tb-x.cb)+'px',top:(y.tpos+x.tb-y.cb)+'px'});this.initSlideshow();this.getOverlays();var a=x.full/y.full;x.calcExpanded();this.justify(x);y.calcExpanded();this.justify(y);if(this.isHtml)this.htmlSizeOperations();if(this.overlayBox)this.sizeOverlayBox(0,1);if(this.allowSizeReduction){if(this.isImage)this.correctRatio(a);else this.fitOverlayBox();var b=this.slideshow;if(b&&this.last&&b.controls&&b.fixedControls){var c=b.overlayOptions.position||'',p;for(var d in hs.oPos)for(var i=0;i<5;i++){p=this[d];if(c.match(hs.oPos[d][i])){p.pos=this.last[d].pos+(this.last[d].p1-p.p1)+(this.last[d].size-p.size)*[0,0,.5,1,1][i];if(b.fixedControls=='fit'){if(p.pos+p.size+p.p1+p.p2>p.scroll+p.clientSize-p.marginMax)p.pos=p.scroll+p.clientSize-p.size-p.marginMin-p.marginMax-p.p1-p.p2;if(p.pos<p.scroll+p.marginMin)p.pos=p.scroll+p.marginMin}}}}if(this.isImage&&this.x.full>(this.x.imgSize||this.x.size)){this.createFullExpand();if(this.overlays.length==1)this.sizeOverlayBox()}}this.show()}catch(e){this.error(e)}},setObjContainerSize:function(a,b){var c=hs.getElementByClass(a,'DIV','highslide-body');if(/(iframe|swf)/.test(this.objectType)){if(this.objectWidth)c.style.width=this.objectWidth+'px';if(this.objectHeight)c.style.height=this.objectHeight+'px'}},writeExtendedContent:function(){if(this.hasExtendedContent)return;var b=this;this.body=hs.getElementByClass(this.innerContent,'DIV','highslide-body');if(this.objectType=='iframe'){this.showLoading();var c=hs.clearing.cloneNode(1);this.body.appendChild(c);this.newWidth=this.innerContent.offsetWidth;if(!this.objectWidth)this.objectWidth=c.offsetWidth;var d=this.innerContent.offsetHeight-this.body.offsetHeight,h=this.objectHeight||hs.page.height-d-hs.marginTop-hs.marginBottom,onload=this.objectLoadTime=='before'?' onload="if (hs.expanders['+this.key+']) hs.expanders['+this.key+'].contentLoaded()" ':'';this.body.innerHTML+='<iframe name="hs'+(new Date()).getTime()+'" frameborder="0" key="'+this.key+'" '+' style="width:'+this.objectWidth+'px; height:'+h+'px" '+onload+' src="'+this.src+'" ></iframe>';this.ruler=this.body.getElementsByTagName('div')[0];this.iframe=this.body.getElementsByTagName('iframe')[0];if(this.objectLoadTime=='after')this.correctIframeSize()}if(this.objectType=='swf'){this.body.id=this.body.id||'hs-flash-id-'+this.key;var a=this.swfOptions;if(!a.params)a.params={};if(typeof a.params.wmode=='undefined')a.params.wmode='transparent';if(swfobject)swfobject.embedSWF(this.src,this.body.id,this.objectWidth,this.objectHeight,a.version||'7',a.expressInstallSwfurl,a.flashvars,a.params,a.attributes)}this.hasExtendedContent=true},htmlGetSize:function(){if(this.iframe&&!this.objectHeight){this.iframe.style.height=this.body.style.height=this.getIframePageHeight()+'px'}this.innerContent.appendChild(hs.clearing);if(!this.x.full)this.x.full=this.innerContent.offsetWidth;this.y.full=this.innerContent.offsetHeight;this.innerContent.removeChild(hs.clearing);if(hs.ie&&this.newHeight>parseInt(this.innerContent.currentStyle.height)){this.newHeight=parseInt(this.innerContent.currentStyle.height)}hs.setStyles(this.wrapper,{position:'absolute',padding:'0'});hs.setStyles(this.content,{width:this.x.t+'px',height:this.y.t+'px'})},getIframePageHeight:function(){var h;try{var a=this.iDoc=this.iframe.contentDocument||this.iframe.contentWindow.document;var b=a.createElement('div');b.style.clear='both';a.body.appendChild(b);h=b.offsetTop;if(hs.ie)h+=parseInt(a.body.currentStyle.marginTop)+parseInt(a.body.currentStyle.marginBottom)-1}catch(e){h=300}return h},correctIframeSize:function(){var a=this.innerContent.offsetWidth-this.ruler.offsetWidth;hs.discardElement(this.ruler);if(a<0)a=0;var b=this.innerContent.offsetHeight-this.iframe.offsetHeight;if(this.iDoc&&!this.objectHeight&&!this.height&&this.y.size==this.y.full)try{this.iDoc.body.style.overflow='hidden'}catch(e){}hs.setStyles(this.iframe,{width:Math.abs(this.x.size-a)+'px',height:Math.abs(this.y.size-b)+'px'});hs.setStyles(this.body,{width:this.iframe.style.width,height:this.iframe.style.height});this.scrollingContent=this.iframe;this.scrollerDiv=this.scrollingContent},htmlSizeOperations:function(){this.setObjContainerSize(this.innerContent);if(this.objectType=='swf'&&this.objectLoadTime=='before')this.writeExtendedContent();if(this.x.size<this.x.full&&!this.allowWidthReduction)this.x.size=this.x.full;if(this.y.size<this.y.full&&!this.allowHeightReduction)this.y.size=this.y.full;this.scrollerDiv=this.innerContent;hs.setStyles(this.mediumContent,{position:'relative',width:this.x.size+'px'});hs.setStyles(this.innerContent,{border:'none',width:'auto',height:'auto'});var a=hs.getElementByClass(this.innerContent,'DIV','highslide-body');if(a&&!/(iframe|swf)/.test(this.objectType)){var b=a;a=hs.createElement(b.nodeName,null,{overflow:'hidden'},null,true);b.parentNode.insertBefore(a,b);a.appendChild(hs.clearing);a.appendChild(b);var c=this.innerContent.offsetWidth-a.offsetWidth;var d=this.innerContent.offsetHeight-a.offsetHeight;a.removeChild(hs.clearing);var e=hs.safari||navigator.vendor=='KDE'?1:0;hs.setStyles(a,{width:(this.x.size-c-e)+'px',height:(this.y.size-d)+'px',overflow:'auto',position:'relative'});if(e&&b.offsetHeight>a.offsetHeight){a.style.width=(parseInt(a.style.width)+e)+'px'}this.scrollingContent=a;this.scrollerDiv=this.scrollingContent}if(this.iframe&&this.objectLoadTime=='before')this.correctIframeSize();if(!this.scrollingContent&&this.y.size<this.mediumContent.offsetHeight)this.scrollerDiv=this.content;if(this.scrollerDiv==this.content&&!this.allowWidthReduction&&!/(iframe|swf)/.test(this.objectType)){this.x.size+=17}if(this.scrollerDiv&&this.scrollerDiv.offsetHeight>this.scrollerDiv.parentNode.offsetHeight){setTimeout("try { hs.expanders["+this.key+"].scrollerDiv.style.overflow = 'auto'; } catch(e) {}",hs.expandDuration)}},getImageMapAreaCorrection:function(a){var c=a.coords.split(',');for(var i=0;i<c.length;i++)c[i]=parseInt(c[i]);if(a.shape.toLowerCase()=='circle'){this.x.tpos+=c[0]-c[2];this.y.tpos+=c[1]-c[2];this.x.t=this.y.t=2*c[2]}else{var b,maxY,minX=b=c[0],minY=maxY=c[1];for(var i=0;i<c.length;i++){if(i%2==0){minX=Math.min(minX,c[i]);b=Math.max(b,c[i])}else{minY=Math.min(minY,c[i]);maxY=Math.max(maxY,c[i])}}this.x.tpos+=minX;this.x.t=b-minX;this.y.tpos+=minY;this.y.t=maxY-minY}},justify:function(p,a){var b,tgt=p.target,dim=p==this.x?'x':'y';if(tgt&&tgt.match(/ /)){b=tgt.split(' ');tgt=b[0]}if(tgt&&hs.$(tgt)){p.pos=hs.getPosition(hs.$(tgt))[dim];if(b&&b[1]&&b[1].match(/^[-]?[0-9]+px$/))p.pos+=parseInt(b[1]);if(p.size<p.minSize)p.size=p.minSize}else if(p.justify=='auto'||p.justify=='center'){var c=false;var d=p.exp.allowSizeReduction;if(p.justify=='center')p.pos=Math.round(p.scroll+(p.clientSize+p.marginMin-p.marginMax-p.get('wsize'))/2);else p.pos=Math.round(p.pos-((p.get('wsize')-p.t)/2));if(p.pos<p.scroll+p.marginMin){p.pos=p.scroll+p.marginMin;c=true}if(!a&&p.size<p.minSize){p.size=p.minSize;d=false}if(p.pos+p.get('wsize')>p.scroll+p.clientSize-p.marginMax){if(!a&&c&&d){p.size=Math.min(p.size,p.get(dim=='y'?'fitsize':'maxsize'))}else if(p.get('wsize')<p.get('fitsize')){p.pos=p.scroll+p.clientSize-p.marginMax-p.get('wsize')}else{p.pos=p.scroll+p.marginMin;if(!a&&d)p.size=p.get(dim=='y'?'fitsize':'maxsize')}}if(!a&&p.size<p.minSize){p.size=p.minSize;d=false}}else if(p.justify=='max'){p.pos=Math.floor(p.pos-p.size+p.t)}if(p.pos<p.marginMin){var e=p.pos;p.pos=p.marginMin;if(d&&!a)p.size=p.size-(p.pos-e)}},correctRatio:function(a){var x=this.x,y=this.y,changed=false,xSize=Math.min(x.full,x.size),ySize=Math.min(y.full,y.size),useBox=(this.useBox||hs.padToMinWidth);if(xSize/ySize>a){xSize=ySize*a;if(xSize<x.minSize){xSize=x.minSize;ySize=xSize/a}changed=true}else if(xSize/ySize<a){ySize=xSize/a;changed=true}if(hs.padToMinWidth&&x.full<x.minSize){x.imgSize=x.full;y.size=y.imgSize=y.full}else if(this.useBox){x.imgSize=xSize;y.imgSize=ySize}else{x.size=xSize;y.size=ySize}changed=this.fitOverlayBox(this.useBox?null:a,changed);if(useBox&&y.size<y.imgSize){y.imgSize=y.size;x.imgSize=y.size*a}if(changed||useBox){x.pos=x.tpos-x.cb+x.tb;x.minSize=x.size;this.justify(x,true);y.pos=y.tpos-y.cb+y.tb;y.minSize=y.size;this.justify(y,true);if(this.overlayBox)this.sizeOverlayBox()}},fitOverlayBox:function(a,b){var x=this.x,y=this.y;if(this.overlayBox&&(this.isImage||this.allowHeightReduction)){while(y.size>this.minHeight&&x.size>this.minWidth&&y.get('wsize')>y.get('fitsize')){y.size-=10;if(a)x.size=y.size*a;this.sizeOverlayBox(0,1);b=true}}return b},reflow:function(){if(this.scrollerDiv){var h=/iframe/i.test(this.scrollerDiv.tagName)?(this.getIframePageHeight()+1)+'px':'auto';if(this.body)this.body.style.height=h;this.scrollerDiv.style.height=h;this.y.setSize(this.innerContent.offsetHeight)}},show:function(){var x=this.x,y=this.y;this.doShowHide('hidden');hs.fireEvent(this,'onBeforeExpand');if(this.slideshow&&this.slideshow.thumbstrip)this.slideshow.thumbstrip.selectThumb();this.changeSize(1,{wrapper:{width:x.get('wsize'),height:y.get('wsize'),left:x.pos,top:y.pos},content:{left:x.p1+x.get('imgPad'),top:y.p1+y.get('imgPad'),width:x.imgSize||x.size,height:y.imgSize||y.size}},hs.expandDuration)},changeSize:function(e,f,g){var h=this.transitions,other=e?(this.last?this.last.a:null):hs.upcoming,t=(h[1]&&other&&hs.getParam(other,'transitions')[1]==h[1])?h[1]:h[0];if(this[t]&&t!='expand'){this[t](e,f);return}if(this.outline&&!this.outlineWhileAnimating){if(e)this.outline.setPosition();else this.outline.destroy((this.isHtml&&this.preserveContent))}if(!e)this.destroyOverlays();var i=this,x=i.x,y=i.y,easing=this.easing;if(!e)easing=this.easingClose||easing;var j=e?function(){if(i.outline)i.outline.table.style.visibility="visible";setTimeout(function(){i.afterExpand()},50)}:function(){i.afterClose()};if(e)hs.setStyles(this.wrapper,{width:x.t+'px',height:y.t+'px'});if(e&&this.isHtml){hs.setStyles(this.wrapper,{left:(x.tpos-x.cb+x.tb)+'px',top:(y.tpos-y.cb+y.tb)+'px'})}if(this.fadeInOut){hs.setStyles(this.wrapper,{opacity:e?0:1});hs.extend(f.wrapper,{opacity:e})}hs.animate(this.wrapper,f.wrapper,{duration:g,easing:easing,step:function(a,b){if(i.outline&&i.outlineWhileAnimating&&b.prop=='top'){var c=e?b.pos:1-b.pos;var d={w:x.t+(x.get('wsize')-x.t)*c,h:y.t+(y.get('wsize')-y.t)*c,x:x.tpos+(x.pos-x.tpos)*c,y:y.tpos+(y.pos-y.tpos)*c};i.outline.setPosition(d,0,1)}if(i.isHtml){if(b.prop=='left')i.mediumContent.style.left=(x.pos-a)+'px';if(b.prop=='top')i.mediumContent.style.top=(y.pos-a)+'px'}}});hs.animate(this.content,f.content,g,easing,j);if(e){this.wrapper.style.visibility='visible';this.content.style.visibility='visible';if(this.isHtml)this.innerContent.style.visibility='visible';this.a.className+=' highslide-active-anchor'}},fade:function(a,b){this.outlineWhileAnimating=false;var c=this,t=a?hs.expandDuration:0;if(a){hs.animate(this.wrapper,b.wrapper,0);hs.setStyles(this.wrapper,{opacity:0,visibility:'visible'});hs.animate(this.content,b.content,0);this.content.style.visibility='visible';hs.animate(this.wrapper,{opacity:1},t,null,function(){c.afterExpand()})}if(this.outline){this.outline.table.style.zIndex=this.wrapper.style.zIndex;var d=a||-1,offset=this.outline.offset,startOff=a?3:offset,endOff=a?offset:3;for(var i=startOff;d*i<=d*endOff;i+=d,t+=25){(function(){var o=a?endOff-i:startOff-i;setTimeout(function(){c.outline.setPosition(0,o,1)},t)})()}}if(a){}else{setTimeout(function(){if(c.outline)c.outline.destroy(c.preserveContent);c.destroyOverlays();hs.animate(c.wrapper,{opacity:0},hs.restoreDuration,null,function(){c.afterClose()})},t)}},crossfade:function(e,f,g){if(!e)return;var h=this,last=this.last,x=this.x,y=this.y,lastX=last.x,lastY=last.y,wrapper=this.wrapper,content=this.content,overlayBox=this.overlayBox;hs.removeEventListener(document,'mousemove',hs.dragHandler);hs.setStyles(content,{width:(x.imgSize||x.size)+'px',height:(y.imgSize||y.size)+'px'});if(overlayBox)overlayBox.style.overflow='visible';this.outline=last.outline;if(this.outline)this.outline.exp=h;last.outline=null;var i=hs.createElement('div',{className:'highslide-'+this.contentType},{position:'absolute',zIndex:4,overflow:'hidden',display:'none'});var j={oldImg:last,newImg:this};for(var n in j){this[n]=j[n].content.cloneNode(1);hs.setStyles(this[n],{position:'absolute',border:0,visibility:'visible'});i.appendChild(this[n])}wrapper.appendChild(i);if(this.isHtml)hs.setStyles(this.mediumContent,{left:0,top:0});if(overlayBox){overlayBox.className='';wrapper.appendChild(overlayBox)}i.style.display='';last.content.style.display='none';if(hs.safari&&hs.uaVersion<525){this.wrapper.style.visibility='visible'}hs.animate(wrapper,{width:x.size},{duration:hs.transitionDuration,step:function(a,b){var c=b.pos,invPos=1-c;var d,size={},props=['pos','size','p1','p2'];for(var n in props){d=props[n];size['x'+d]=Math.round(invPos*lastX[d]+c*x[d]);size['y'+d]=Math.round(invPos*lastY[d]+c*y[d]);size.ximgSize=Math.round(invPos*(lastX.imgSize||lastX.size)+c*(x.imgSize||x.size));size.ximgPad=Math.round(invPos*lastX.get('imgPad')+c*x.get('imgPad'));size.yimgSize=Math.round(invPos*(lastY.imgSize||lastY.size)+c*(y.imgSize||y.size));size.yimgPad=Math.round(invPos*lastY.get('imgPad')+c*y.get('imgPad'))}if(h.outline)h.outline.setPosition({x:size.xpos,y:size.ypos,w:size.xsize+size.xp1+size.xp2+2*x.cb,h:size.ysize+size.yp1+size.yp2+2*y.cb});last.wrapper.style.clip='rect('+(size.ypos-lastY.pos)+'px, '+(size.xsize+size.xp1+size.xp2+size.xpos+2*lastX.cb-lastX.pos)+'px, '+(size.ysize+size.yp1+size.yp2+size.ypos+2*lastY.cb-lastY.pos)+'px, '+(size.xpos-lastX.pos)+'px)';hs.setStyles(content,{top:(size.yp1+y.get('imgPad'))+'px',left:(size.xp1+x.get('imgPad'))+'px',marginTop:(y.pos-size.ypos)+'px',marginLeft:(x.pos-size.xpos)+'px'});hs.setStyles(wrapper,{top:size.ypos+'px',left:size.xpos+'px',width:(size.xp1+size.xp2+size.xsize+2*x.cb)+'px',height:(size.yp1+size.yp2+size.ysize+2*y.cb)+'px'});hs.setStyles(i,{width:(size.ximgSize||size.xsize)+'px',height:(size.yimgSize||size.ysize)+'px',left:(size.xp1+size.ximgPad)+'px',top:(size.yp1+size.yimgPad)+'px',visibility:'visible'});hs.setStyles(h.oldImg,{top:(lastY.pos-size.ypos+lastY.p1-size.yp1+lastY.get('imgPad')-size.yimgPad)+'px',left:(lastX.pos-size.xpos+lastX.p1-size.xp1+lastX.get('imgPad')-size.ximgPad)+'px'});hs.setStyles(h.newImg,{opacity:c,top:(y.pos-size.ypos+y.p1-size.yp1+y.get('imgPad')-size.yimgPad)+'px',left:(x.pos-size.xpos+x.p1-size.xp1+x.get('imgPad')-size.ximgPad)+'px'});if(overlayBox)hs.setStyles(overlayBox,{width:size.xsize+'px',height:size.ysize+'px',left:(size.xp1+x.cb)+'px',top:(size.yp1+y.cb)+'px'})},complete:function(){wrapper.style.visibility=content.style.visibility='visible';content.style.display='block';hs.discardElement(i);h.afterExpand();last.afterClose();h.last=null}})},reuseOverlay:function(o,a){if(!this.last)return false;for(var i=0;i<this.last.overlays.length;i++){var b=hs.$('hsId'+this.last.overlays[i]);if(b&&b.hsId==o.hsId){this.genOverlayBox();b.reuse=this.key;hs.push(this.overlays,this.last.overlays[i]);return true}}return false},afterExpand:function(){this.isExpanded=true;this.focus();if(this.isHtml&&this.objectLoadTime=='after')this.writeExtendedContent();if(this.iframe){try{var a=this,doc=this.iframe.contentDocument||this.iframe.contentWindow.document;hs.addEventListener(doc,'mousedown',function(){if(hs.focusKey!=a.key)a.focus()})}catch(e){}if(hs.ie&&typeof this.isClosing!='boolean')this.iframe.style.width=(this.objectWidth-1)+'px'}if(this.dimmingOpacity)hs.dim(this);if(hs.upcoming&&hs.upcoming==this.a)hs.upcoming=null;this.prepareNextOutline();var p=hs.page,mX=hs.mouse.x+p.scrollLeft,mY=hs.mouse.y+p.scrollTop;this.mouseIsOver=this.x.pos<mX&&mX<this.x.pos+this.x.get('wsize')&&this.y.pos<mY&&mY<this.y.pos+this.y.get('wsize');if(this.overlayBox)this.showOverlays();hs.fireEvent(this,'onAfterExpand')},prepareNextOutline:function(){var a=this.key;var b=this.outlineType;new hs.Outline(b,function(){try{hs.expanders[a].preloadNext()}catch(e){}})},preloadNext:function(){var a=this.getAdjacentAnchor(1);if(a&&a.onclick.toString().match(/hs\.expand/))var b=hs.createElement('img',{src:hs.getSrc(a)})},getAdjacentAnchor:function(a){var b=this.getAnchorIndex(),as=hs.anchors.groups[this.slideshowGroup||'none'];if(as&&!as[b+a]&&this.slideshow&&this.slideshow.repeat){if(a==1)return as[0];else if(a==-1)return as[as.length-1]}return(as&&as[b+a])||null},getAnchorIndex:function(){var a=hs.getAnchors().groups[this.slideshowGroup||'none'];if(a)for(var i=0;i<a.length;i++){if(a[i]==this.a)return i}return null},getNumber:function(){if(this[this.numberPosition]){var a=hs.anchors.groups[this.slideshowGroup||'none'];if(a){var s=hs.lang.number.replace('%1',this.getAnchorIndex()+1).replace('%2',a.length);this[this.numberPosition].innerHTML='<div class="highslide-number">'+s+'</div>'+this[this.numberPosition].innerHTML}}},initSlideshow:function(){if(!this.last){for(var i=0;i<hs.slideshows.length;i++){var a=hs.slideshows[i],sg=a.slideshowGroup;if(typeof sg=='undefined'||sg===null||sg===this.slideshowGroup)this.slideshow=new hs.Slideshow(this.key,a)}}else{this.slideshow=this.last.slideshow}var a=this.slideshow;if(!a)return;var b=a.expKey=this.key;a.checkFirstAndLast();a.disable('full-expand');if(a.controls){this.createOverlay(hs.extend(a.overlayOptions||{},{overlayId:a.controls,hsId:'controls',zIndex:5}))}if(a.thumbstrip)a.thumbstrip.add(this);if(!this.last&&this.autoplay)a.play(true);if(a.autoplay){a.autoplay=setTimeout(function(){hs.next(b)},(a.interval||500))}},cancelLoading:function(){hs.discardElement(this.wrapper);hs.expanders[this.key]=null;if(hs.upcoming==this.a)hs.upcoming=null;hs.undim(this.key);if(this.loading)hs.loading.style.left='-9999px';hs.fireEvent(this,'onHideLoading')},writeCredits:function(){if(this.credits)return;this.credits=hs.createElement('a',{href:hs.creditsHref,target:hs.creditsTarget,className:'highslide-credits',innerHTML:hs.lang.creditsText,title:hs.lang.creditsTitle});this.createOverlay({overlayId:this.credits,position:this.creditsPosition||'top left',hsId:'credits'})},getInline:function(a,b){for(var i=0;i<a.length;i++){var c=a[i],s=null;if(c=='caption'&&!hs.fireEvent(this,'onBeforeGetCaption'))return;else if(c=='heading'&&!hs.fireEvent(this,'onBeforeGetHeading'))return;if(!this[c+'Id']&&this.thumbsUserSetId)this[c+'Id']=c+'-for-'+this.thumbsUserSetId;if(this[c+'Id'])this[c]=hs.getNode(this[c+'Id']);if(!this[c]&&!this[c+'Text']&&this[c+'Eval'])try{s=eval(this[c+'Eval'])}catch(e){}if(!this[c]&&this[c+'Text']){s=this[c+'Text']}if(!this[c]&&!s){this[c]=hs.getNode(this.a['_'+c+'Id']);if(!this[c]){var d=this.a.nextSibling;while(d&&!hs.isHsAnchor(d)){if((new RegExp('highslide-'+c)).test(d.className||null)){if(!d.id)this.a['_'+c+'Id']=d.id='hsId'+hs.idCounter++;this[c]=hs.getNode(d.id);break}d=d.nextSibling}}}if(!this[c]&&!s&&this.numberPosition==c)s='\n';if(!this[c]&&s)this[c]=hs.createElement('div',{className:'highslide-'+c,innerHTML:s});if(b&&this[c]){var o={position:(c=='heading')?'above':'below'};for(var x in this[c+'Overlay'])o[x]=this[c+'Overlay'][x];o.overlayId=this[c];this.createOverlay(o)}}},doShowHide:function(a){if(hs.hideSelects)this.showHideElements('SELECT',a);if(hs.hideIframes)this.showHideElements('IFRAME',a);if(hs.geckoMac)this.showHideElements('*',a)},showHideElements:function(a,b){var c=document.getElementsByTagName(a);var d=a=='*'?'overflow':'visibility';for(var i=0;i<c.length;i++){if(d=='visibility'||(document.defaultView.getComputedStyle(c[i],"").getPropertyValue('overflow')=='auto'||c[i].getAttribute('hidden-by')!=null)){var e=c[i].getAttribute('hidden-by');if(b=='visible'&&e){e=e.replace('['+this.key+']','');c[i].setAttribute('hidden-by',e);if(!e)c[i].style[d]=c[i].origProp}else if(b=='hidden'){var f=hs.getPosition(c[i]);f.w=c[i].offsetWidth;f.h=c[i].offsetHeight;if(!this.dimmingOpacity){var g=(f.x+f.w<this.x.get('opos')||f.x>this.x.get('opos')+this.x.get('osize'));var h=(f.y+f.h<this.y.get('opos')||f.y>this.y.get('opos')+this.y.get('osize'))}var j=hs.getWrapperKey(c[i]);if(!g&&!h&&j!=this.key){if(!e){c[i].setAttribute('hidden-by','['+this.key+']');c[i].origProp=c[i].style[d];c[i].style[d]='hidden'}else if(e.indexOf('['+this.key+']')==-1){c[i].setAttribute('hidden-by',e+'['+this.key+']')}}else if((e=='['+this.key+']'||hs.focusKey==j)&&j!=this.key){c[i].setAttribute('hidden-by','');c[i].style[d]=c[i].origProp||''}else if(e&&e.indexOf('['+this.key+']')>-1){c[i].setAttribute('hidden-by',e.replace('['+this.key+']',''))}}}}},focus:function(){this.wrapper.style.zIndex=hs.zIndexCounter+=2;for(var i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&i==hs.focusKey){var a=hs.expanders[i];a.content.className+=' highslide-'+a.contentType+'-blur';if(a.isImage){a.content.style.cursor=hs.ie?'hand':'pointer';a.content.title=hs.lang.focusTitle}hs.fireEvent(a,'onBlur')}}if(this.outline)this.outline.table.style.zIndex=this.wrapper.style.zIndex-1;this.content.className='highslide-'+this.contentType;if(this.isImage){this.content.title=hs.lang.restoreTitle;if(hs.restoreCursor){hs.styleRestoreCursor=window.opera?'pointer':'url('+hs.graphicsDir+hs.restoreCursor+'), pointer';if(hs.ie&&hs.uaVersion<6)hs.styleRestoreCursor='hand';this.content.style.cursor=hs.styleRestoreCursor}}hs.focusKey=this.key;hs.addEventListener(document,window.opera?'keypress':'keydown',hs.keyHandler);hs.fireEvent(this,'onFocus')},moveTo:function(x,y){this.x.setPos(x);this.y.setPos(y)},resize:function(e){var w,h,r=e.width/e.height;w=Math.max(e.width+e.dX,Math.min(this.minWidth,this.x.full));if(this.isImage&&Math.abs(w-this.x.full)<12)w=this.x.full;h=this.isHtml?e.height+e.dY:w/r;if(h<Math.min(this.minHeight,this.y.full)){h=Math.min(this.minHeight,this.y.full);if(this.isImage)w=h*r}this.resizeTo(w,h)},resizeTo:function(w,h){this.y.setSize(h);this.x.setSize(w);this.wrapper.style.height=this.y.get('wsize')+'px'},close:function(){if(this.isClosing||!this.isExpanded)return;if(this.transitions[1]=='crossfade'&&hs.upcoming){hs.getExpander(hs.upcoming).cancelLoading();hs.upcoming=null}if(!hs.fireEvent(this,'onBeforeClose'))return;this.isClosing=true;if(this.slideshow&&!hs.upcoming)this.slideshow.pause();hs.removeEventListener(document,window.opera?'keypress':'keydown',hs.keyHandler);try{if(this.isHtml)this.htmlPrepareClose();this.content.style.cursor='default';this.changeSize(0,{wrapper:{width:this.x.t,height:this.y.t,left:this.x.tpos-this.x.cb+this.x.tb,top:this.y.tpos-this.y.cb+this.y.tb},content:{left:0,top:0,width:this.x.t,height:this.y.t}},hs.restoreDuration)}catch(e){this.afterClose()}},htmlPrepareClose:function(){if(hs.geckoMac){if(!hs.mask)hs.mask=hs.createElement('div',null,{position:'absolute'},hs.container);hs.setStyles(hs.mask,{width:this.x.size+'px',height:this.y.size+'px',left:this.x.pos+'px',top:this.y.pos+'px',display:'block'})}if(this.objectType=='swf')try{hs.$(this.body.id).StopPlay()}catch(e){}if(this.objectLoadTime=='after'&&!this.preserveContent)this.destroyObject();if(this.scrollerDiv&&this.scrollerDiv!=this.scrollingContent)this.scrollerDiv.style.overflow='hidden'},destroyObject:function(){if(hs.ie&&this.iframe)try{this.iframe.contentWindow.document.body.innerHTML=''}catch(e){}if(this.objectType=='swf')swfobject.removeSWF(this.body.id);this.body.innerHTML=''},sleep:function(){if(this.outline)this.outline.table.style.display='none';this.releaseMask=null;this.wrapper.style.display='none';this.isExpanded=false;hs.push(hs.sleeping,this)},awake:function(){try{hs.expanders[this.key]=this;if(!hs.allowMultipleInstances&&hs.focusKey!=this.key){try{hs.expanders[hs.focusKey].close()}catch(e){}}var z=hs.zIndexCounter++,stl={display:'',zIndex:z};hs.setStyles(this.wrapper,stl);this.isClosing=false;var o=this.outline||0;if(o){if(!this.outlineWhileAnimating)stl.visibility='hidden';hs.setStyles(o.table,stl)}if(this.slideshow){this.initSlideshow()}this.show()}catch(e){}},createOverlay:function(o){var a=o.overlayId,relToVP=(o.relativeTo=='viewport'&&!/panel$/.test(o.position));if(typeof a=='string')a=hs.getNode(a);if(o.html)a=hs.createElement('div',{innerHTML:o.html});if(!a||typeof a=='string')return;if(!hs.fireEvent(this,'onCreateOverlay',{overlay:a}))return;a.style.display='block';o.hsId=o.hsId||o.overlayId;if(this.transitions[1]=='crossfade'&&this.reuseOverlay(o,a))return;this.genOverlayBox();var b=o.width&&/^[0-9]+(px|%)$/.test(o.width)?o.width:'auto';if(/^(left|right)panel$/.test(o.position)&&!/^[0-9]+px$/.test(o.width))b='200px';var c=hs.createElement('div',{id:'hsId'+hs.idCounter++,hsId:o.hsId},{position:'absolute',visibility:'hidden',width:b,direction:hs.lang.cssDirection||'',opacity:0},relToVP?hs.viewport:this.overlayBox,true);if(relToVP)c.hsKey=this.key;c.appendChild(a);hs.extend(c,{opacity:1,offsetX:0,offsetY:0,dur:(o.fade===0||o.fade===false||(o.fade==2&&hs.ie))?0:250});hs.extend(c,o);if(this.gotOverlays){this.positionOverlay(c);if(!c.hideOnMouseOut||this.mouseIsOver)hs.animate(c,{opacity:c.opacity},c.dur)}hs.push(this.overlays,hs.idCounter-1)},positionOverlay:function(a){var p=a.position||'middle center',relToVP=(a.relativeTo=='viewport'),offX=a.offsetX,offY=a.offsetY;if(relToVP){hs.viewport.style.display='block';a.hsKey=this.key;if(a.offsetWidth>a.parentNode.offsetWidth)a.style.width='100%'}else if(a.parentNode!=this.overlayBox)this.overlayBox.appendChild(a);if(/left$/.test(p))a.style.left=offX+'px';if(/center$/.test(p))hs.setStyles(a,{left:'50%',marginLeft:(offX-Math.round(a.offsetWidth/2))+'px'});if(/right$/.test(p))a.style.right=-offX+'px';if(/^leftpanel$/.test(p)){hs.setStyles(a,{right:'100%',marginRight:this.x.cb+'px',top:-this.y.cb+'px',bottom:-this.y.cb+'px',overflow:'auto'});this.x.p1=a.offsetWidth}else if(/^rightpanel$/.test(p)){hs.setStyles(a,{left:'100%',marginLeft:this.x.cb+'px',top:-this.y.cb+'px',bottom:-this.y.cb+'px',overflow:'auto'});this.x.p2=a.offsetWidth}var b=a.parentNode.offsetHeight;a.style.height='auto';if(relToVP&&a.offsetHeight>b)a.style.height=hs.ieLt7?b+'px':'100%';if(/^top/.test(p))a.style.top=offY+'px';if(/^middle/.test(p))hs.setStyles(a,{top:'50%',marginTop:(offY-Math.round(a.offsetHeight/2))+'px'});if(/^bottom/.test(p))a.style.bottom=-offY+'px';if(/^above$/.test(p)){hs.setStyles(a,{left:(-this.x.p1-this.x.cb)+'px',right:(-this.x.p2-this.x.cb)+'px',bottom:'100%',marginBottom:this.y.cb+'px',width:'auto'});this.y.p1=a.offsetHeight}else if(/^below$/.test(p)){hs.setStyles(a,{position:'relative',left:(-this.x.p1-this.x.cb)+'px',right:(-this.x.p2-this.x.cb)+'px',top:'100%',marginTop:this.y.cb+'px',width:'auto'});this.y.p2=a.offsetHeight;a.style.position='absolute'}},getOverlays:function(){this.getInline(['heading','caption'],true);this.getNumber();if(this.caption)hs.fireEvent(this,'onAfterGetCaption');if(this.heading)hs.fireEvent(this,'onAfterGetHeading');if(this.heading&&this.dragByHeading)this.heading.className+=' highslide-move';if(hs.showCredits)this.writeCredits();for(var i=0;i<hs.overlays.length;i++){var o=hs.overlays[i],tId=o.thumbnailId,sg=o.slideshowGroup;if((!tId&&!sg)||(tId&&tId==this.thumbsUserSetId)||(sg&&sg===this.slideshowGroup)){if(this.isImage||(this.isHtml&&o.useOnHtml))this.createOverlay(o)}}var a=[];for(var i=0;i<this.overlays.length;i++){var o=hs.$('hsId'+this.overlays[i]);if(/panel$/.test(o.position))this.positionOverlay(o);else hs.push(a,o)}for(var i=0;i<a.length;i++)this.positionOverlay(a[i]);this.gotOverlays=true},genOverlayBox:function(){if(!this.overlayBox)this.overlayBox=hs.createElement('div',{className:this.wrapperClassName},{position:'absolute',width:(this.x.size||(this.useBox?this.width:null)||this.x.full)+'px',height:(this.y.size||this.y.full)+'px',visibility:'hidden',overflow:'hidden',zIndex:hs.ie?4:'auto'},hs.container,true)},sizeOverlayBox:function(a,b){var c=this.overlayBox,x=this.x,y=this.y;hs.setStyles(c,{width:x.size+'px',height:y.size+'px'});if(a||b){for(var i=0;i<this.overlays.length;i++){var o=hs.$('hsId'+this.overlays[i]);var d=(hs.ieLt7||document.compatMode=='BackCompat');if(o&&/^(above|below)$/.test(o.position)){if(d){o.style.width=(c.offsetWidth+2*x.cb+x.p1+x.p2)+'px'}y[o.position=='above'?'p1':'p2']=o.offsetHeight}if(o&&d&&/^(left|right)panel$/.test(o.position)){o.style.height=(c.offsetHeight+2*y.cb)+'px'}}}if(a){hs.setStyles(this.content,{top:y.p1+'px'});hs.setStyles(c,{top:(y.p1+y.cb)+'px'})}},showOverlays:function(){var b=this.overlayBox;b.className='';hs.setStyles(b,{top:(this.y.p1+this.y.cb)+'px',left:(this.x.p1+this.x.cb)+'px',overflow:'visible'});if(hs.safari)b.style.visibility='visible';this.wrapper.appendChild(b);for(var i=0;i<this.overlays.length;i++){var o=hs.$('hsId'+this.overlays[i]);o.style.zIndex=o.zIndex||4;if(!o.hideOnMouseOut||this.mouseIsOver){o.style.visibility='visible';hs.setStyles(o,{visibility:'visible',display:''});hs.animate(o,{opacity:o.opacity},o.dur)}}},destroyOverlays:function(){if(!this.overlays.length)return;if(this.slideshow){var c=this.slideshow.controls;if(c&&hs.getExpander(c)==this)c.parentNode.removeChild(c)}for(var i=0;i<this.overlays.length;i++){var o=hs.$('hsId'+this.overlays[i]);if(o&&o.parentNode==hs.viewport&&hs.getExpander(o)==this)hs.discardElement(o)}if(this.isHtml&&this.preserveContent){this.overlayBox.style.top='-9999px';hs.container.appendChild(this.overlayBox)}else hs.discardElement(this.overlayBox)},createFullExpand:function(){if(this.slideshow&&this.slideshow.controls){this.slideshow.enable('full-expand');return}this.fullExpandLabel=hs.createElement('a',{href:'javascript:hs.expanders['+this.key+'].doFullExpand();',title:hs.lang.fullExpandTitle,className:'highslide-full-expand'});if(!hs.fireEvent(this,'onCreateFullExpand'))return;this.createOverlay({overlayId:this.fullExpandLabel,position:hs.fullExpandPosition,hideOnMouseOut:true,opacity:hs.fullExpandOpacity})},doFullExpand:function(){try{if(!hs.fireEvent(this,'onDoFullExpand'))return;if(this.fullExpandLabel)hs.discardElement(this.fullExpandLabel);this.focus();var a=this.x.size;this.resizeTo(this.x.full,this.y.full);var b=this.x.pos-(this.x.size-a)/2;if(b<hs.marginLeft)b=hs.marginLeft;this.moveTo(b,this.y.pos);this.doShowHide('hidden')}catch(e){this.error(e)}},afterClose:function(){this.a.className=this.a.className.replace('highslide-active-anchor','');this.doShowHide('visible');if(this.isHtml&&this.preserveContent&&this.transitions[1]!='crossfade'){this.sleep()}else{if(this.outline&&this.outlineWhileAnimating)this.outline.destroy();hs.discardElement(this.wrapper)}if(hs.mask)hs.mask.style.display='none';this.destroyOverlays();if(!hs.viewport.childNodes.length)hs.viewport.style.display='none';if(this.dimmingOpacity)hs.undim(this.key);hs.fireEvent(this,'onAfterClose');hs.expanders[this.key]=null;hs.reOrder()}};hs.Ajax=function(a,b,c){this.a=a;this.content=b;this.pre=c};hs.Ajax.prototype={run:function(){var a;if(!this.src)this.src=hs.getSrc(this.a);if(this.src.match('#')){var b=this.src.split('#');this.src=b[0];this.id=b[1]}if(hs.cachedGets[this.src]){this.cachedGet=hs.cachedGets[this.src];if(this.id)this.getElementContent();else this.loadHTML();return}try{a=new XMLHttpRequest()}catch(e){try{a=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{a=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){this.onError()}}}var c=this;a.onreadystatechange=function(){if(c.xhr.readyState==4){if(c.id)c.getElementContent();else c.loadHTML()}};var d=this.src;this.xhr=a;if(hs.forceAjaxReload)d=d.replace(/$/,(/\?/.test(d)?'&':'?')+'dummy='+(new Date()).getTime());a.open('GET',d,true);a.setRequestHeader('X-Requested-With','XMLHttpRequest');a.setRequestHeader('Content-Type','application/x-www-form-urlencoded');a.send(null)},getElementContent:function(){hs.init();var a=window.opera||hs.ie6SSL?{src:'about:blank'}:null;this.iframe=hs.createElement('iframe',a,{position:'absolute',top:'-9999px'},hs.container);this.loadHTML()},loadHTML:function(){var s=this.cachedGet||this.xhr.responseText,regBody;if(this.pre)hs.cachedGets[this.src]=s;if(!hs.ie||hs.uaVersion>=5.5){s=s.replace(new RegExp('<link[^>]*>','gi'),'').replace(new RegExp('<script[^>]*>.*?</script>','gi'),'');if(this.iframe){var a=this.iframe.contentDocument;if(!a&&this.iframe.contentWindow)a=this.iframe.contentWindow.document;if(!a){var b=this;setTimeout(function(){b.loadHTML()},25);return}a.open();a.write(s);a.close();try{s=a.getElementById(this.id).innerHTML}catch(e){try{s=this.iframe.document.getElementById(this.id).innerHTML}catch(e){}}hs.discardElement(this.iframe)}else{regBody=/(<body[^>]*>|<\/body>)/ig;if(regBody.test(s))s=s.split(regBody)[hs.ie?1:2]}}hs.getElementByClass(this.content,'DIV','highslide-body').innerHTML=s;this.onLoad();for(var x in this)this[x]=null}};hs.Slideshow=function(a,b){if(hs.dynamicallyUpdateAnchors!==false)hs.updateAnchors();this.expKey=a;for(var x in b)this[x]=b[x];if(this.useControls)this.getControls();if(this.thumbstrip)this.thumbstrip=hs.Thumbstrip(this)};hs.Slideshow.prototype={getControls:function(){this.controls=hs.createElement('div',{innerHTML:hs.replaceLang(hs.skin.controls)},null,hs.container);var a=['play','pause','previous','next','move','full-expand','close'];this.btn={};var b=this;for(var i=0;i<a.length;i++){this.btn[a[i]]=hs.getElementByClass(this.controls,'li','highslide-'+a[i]);this.enable(a[i])}this.btn.pause.style.display='none'},checkFirstAndLast:function(){if(this.repeat||!this.controls)return;var a=hs.expanders[this.expKey],cur=a.getAnchorIndex(),re=/disabled$/;if(cur==0)this.disable('previous');else if(re.test(this.btn.previous.getElementsByTagName('a')[0].className))this.enable('previous');if(cur+1==hs.anchors.groups[a.slideshowGroup||'none'].length){this.disable('next');this.disable('play')}else if(re.test(this.btn.next.getElementsByTagName('a')[0].className)){this.enable('next');this.enable('play')}},enable:function(b){if(!this.btn)return;var c=this,a=this.btn[b].getElementsByTagName('a')[0],re=/disabled$/;a.onclick=function(){c[b]();return false};if(re.test(a.className))a.className=a.className.replace(re,'')},disable:function(b){if(!this.btn)return;var a=this.btn[b].getElementsByTagName('a')[0];a.onclick=function(){return false};if(!/disabled$/.test(a.className))a.className+=' disabled'},hitSpace:function(){if(this.autoplay)this.pause();else this.play()},play:function(a){if(this.btn){this.btn.play.style.display='none';this.btn.pause.style.display=''}this.autoplay=true;if(!a)hs.next(this.expKey)},pause:function(){if(this.btn){this.btn.pause.style.display='none';this.btn.play.style.display=''}clearTimeout(this.autoplay);this.autoplay=null},previous:function(){this.pause();hs.previous(this.btn.previous)},next:function(){this.pause();hs.next(this.btn.next)},move:function(){},'full-expand':function(){hs.getExpander().doFullExpand()},close:function(){hs.close(this.btn.close)}};hs.Thumbstrip=function(f){function add(a){hs.extend(options||{},{overlayId:dom,hsId:'thumbstrip',className:'highslide-thumbstrip-'+mode+'-overlay '+(options.className||'')});if(hs.ieLt7)options.fade=0;a.createOverlay(options);hs.setStyles(dom.parentNode,{overflow:'hidden'})};function scroll(a){selectThumb(undefined,Math.round(a*dom[isX?'offsetWidth':'offsetHeight']*0.7))};function selectThumb(i,a){if(i===undefined)for(var j=0;j<g.length;j++){if(g[j]==hs.expanders[f.expKey].a){i=j;break}}if(i===undefined)return;var b=dom.getElementsByTagName('a'),active=b[i],cell=active.parentNode,left=isX?'Left':'Top',right=isX?'Right':'Bottom',width=isX?'Width':'Height',offsetLeft='offset'+left,offsetWidth='offset'+width,overlayWidth=div.parentNode.parentNode[offsetWidth],minTblPos=overlayWidth-table[offsetWidth],curTblPos=parseInt(table.style[isX?'left':'top'])||0,tblPos=curTblPos,mgnRight=20;if(a!==undefined){tblPos=curTblPos-a;if(minTblPos>0)minTblPos=0;if(tblPos>0)tblPos=0;if(tblPos<minTblPos)tblPos=minTblPos}else{for(var j=0;j<b.length;j++)b[j].className='';active.className='highslide-active-anchor';var c=i>0?b[i-1].parentNode[offsetLeft]:cell[offsetLeft],activeRight=cell[offsetLeft]+cell[offsetWidth]+(b[i+1]?b[i+1].parentNode[offsetWidth]:0);if(activeRight>overlayWidth-curTblPos)tblPos=overlayWidth-activeRight;else if(c<-curTblPos)tblPos=-c}var d=cell[offsetLeft]+(cell[offsetWidth]-marker[offsetWidth])/2+tblPos;hs.animate(table,isX?{left:tblPos}:{top:tblPos},null,'easeOutQuad');hs.animate(marker,isX?{left:d}:{top:d},null,'easeOutQuad');scrollUp.style.display=tblPos<0?'block':'none';scrollDown.style.display=(tblPos>minTblPos)?'block':'none'};var g=hs.anchors.groups[hs.expanders[f.expKey].slideshowGroup||'none'],options=f.thumbstrip,mode=options.mode||'horizontal',floatMode=(mode=='float'),tree=floatMode?['div','ul','li','span']:['table','tbody','tr','td'],isX=(mode=='horizontal'),dom=hs.createElement('div',{className:'highslide-thumbstrip highslide-thumbstrip-'+mode,innerHTML:'<div class="highslide-thumbstrip-inner">'+'<'+tree[0]+'><'+tree[1]+'></'+tree[1]+'></'+tree[0]+'></div>'+'<div class="highslide-scroll-up"><div></div></div>'+'<div class="highslide-scroll-down"><div></div></div>'+'<div class="highslide-marker"><div></div></div>'},{display:'none'},hs.container),domCh=dom.childNodes,div=domCh[0],scrollUp=domCh[1],scrollDown=domCh[2],marker=domCh[3],table=div.firstChild,tbody=dom.getElementsByTagName(tree[1])[0],tr;for(var i=0;i<g.length;i++){if(i==0||!isX)tr=hs.createElement(tree[2],null,null,tbody);(function(){var a=g[i],cell=hs.createElement(tree[3],null,null,tr),pI=i;hs.createElement('a',{href:a.href,onclick:function(){hs.getExpander(this).focus();return hs.transit(a)},innerHTML:hs.stripItemFormatter?hs.stripItemFormatter(a):a.innerHTML},null,cell)})()}if(!floatMode){scrollUp.onclick=function(){scroll(-1)};scrollDown.onclick=function(){scroll(1)};hs.addEventListener(tbody,document.onmousewheel!==undefined?'mousewheel':'DOMMouseScroll',function(e){var a=0;e=e||window.event;if(e.wheelDelta){a=e.wheelDelta/120;if(hs.opera)a=-a}else if(e.detail){a=-e.detail/3}if(a)scroll(-a*0.2);if(e.preventDefault)e.preventDefault();e.returnValue=false})}return{add:add,selectThumb:selectThumb}};hs.langDefaults=hs.lang;var HsExpander=hs.Expander;if(hs.ie&&window==window.top){(function(){try{document.documentElement.doScroll('left')}catch(e){setTimeout(arguments.callee,50);return}hs.ready()})()}hs.addEventListener(document,'DOMContentLoaded',hs.ready);hs.addEventListener(window,'load',hs.ready);hs.addEventListener(document,'ready',function(){if(hs.expandCursor||hs.dimmingOpacity){var d=hs.createElement('style',{type:'text/css'},null,document.getElementsByTagName('HEAD')[0]);function addRule(a,b){if(!hs.ie){d.appendChild(document.createTextNode(a+" {"+b+"}"))}else{var c=document.styleSheets[document.styleSheets.length-1];if(typeof(c.addRule)=="object")c.addRule(a,b)}}function fix(a){return'expression( ( ( ignoreMe = document.documentElement.'+a+' ? document.documentElement.'+a+' : document.body.'+a+' ) ) + \'px\' );'}if(hs.expandCursor)addRule('.highslide img','cursor: url('+hs.graphicsDir+hs.expandCursor+'), pointer !important;');addRule('.highslide-viewport-size',hs.ie&&(hs.uaVersion<7||document.compatMode=='BackCompat')?'position: absolute; '+'left:'+fix('scrollLeft')+'top:'+fix('scrollTop')+'width:'+fix('clientWidth')+'height:'+fix('clientHeight'):'position: fixed; width: 100%; height: 100%; left: 0; top: 0')}});hs.addEventListener(window,'resize',function(){hs.getPageSize();if(hs.viewport)for(var i=0;i<hs.viewport.childNodes.length;i++){var a=hs.viewport.childNodes[i],exp=hs.getExpander(a);exp.positionOverlay(a);if(a.hsId=='thumbstrip')exp.slideshow.thumbstrip.selectThumb()}});hs.addEventListener(document,'mousemove',function(e){hs.mouse={x:e.clientX,y:e.clientY}});hs.addEventListener(document,'mousedown',hs.mouseClickHandler);hs.addEventListener(document,'mouseup',hs.mouseClickHandler);hs.addEventListener(document,'ready',hs.setClickEvents);hs.addEventListener(window,'load',hs.preloadImages);hs.addEventListener(window,'load',hs.preloadAjax)}
if(typeof dd_domreadycheck=="undefined")
var dd_domreadycheck=false
var ddlevelsmenu={enableshim:true,arrowpointers:{downarrow:["img/web/menu/arrow-down.gif",0,0],rightarrow:["http://img3.pokemon-project.com/web/menu/arrow-right.gif",12,12],showarrow:{toplevel:true,sublevel:true}},hideinterval:1000,effects:{enableswipe:false,enablefade:true,duration:150},httpsiframesrc:"blank.htm",topmenuids:[],topitems:{},subuls:{},lastactivesubul:{},topitemsindex:-1,ulindex:-1,hidetimers:{},shimadded:false,nonFF:!/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent),getoffset:function(what,offsettype){return(what.offsetParent)?what[offsettype]+this.getoffset(what.offsetParent,offsettype):what[offsettype]},getoffsetof:function(el){el._offsets={left:this.getoffset(el,"offsetLeft"),top:this.getoffset(el,"offsetTop")}},getwindowsize:function(){this.docwidth=window.innerWidth?window.innerWidth-10:this.standardbody.clientWidth-10
this.docheight=window.innerHeight?window.innerHeight-15:this.standardbody.clientHeight-18},gettopitemsdimensions:function(){for(var m=0;m<this.topmenuids.length;m++){var topmenuid=this.topmenuids[m]
for(var i=0;i<this.topitems[topmenuid].length;i++){var header=this.topitems[topmenuid][i]
var submenu=document.getElementById(header.getAttribute('rel'))
header._dimensions={w:header.offsetWidth,h:header.offsetHeight,submenuw:submenu.offsetWidth,submenuh:submenu.offsetHeight}}}},isContained:function(m,e){var e=window.event||e
var c=e.relatedTarget||((e.type=="mouseover")?e.fromElement:e.toElement)
while(c&&c!=m)try{c=c.parentNode}catch(e){c=m}
if(c==m)
return true
else
return false},addpointer:function(target,imgclass,imginfo,BeforeorAfter){var pointer=document.createElement("img")
pointer.src=imginfo[0]
pointer.style.width=imginfo[1]+"px"
pointer.style.height=imginfo[2]+"px"
if(imgclass=="rightarrowpointer"){pointer.style.left=target.offsetWidth-imginfo[2]-2+"px"}
pointer.className=imgclass
var target_firstEl=target.childNodes[target.firstChild.nodeType!=1?1:0]
if(target_firstEl&&target_firstEl.tagName=="SPAN"){target=target_firstEl}
if(BeforeorAfter=="before")
target.insertBefore(pointer,target.firstChild)
else
target.appendChild(pointer)},css:function(el,targetclass,action){var needle=new RegExp("(^|\\s+)"+targetclass+"($|\\s+)","ig")
if(action=="check")
return needle.test(el.className)
else if(action=="remove")
el.className=el.className.replace(needle,"")
else if(action=="add"&&!needle.test(el.className))
el.className+=" "+targetclass},addshimmy:function(target){var shim=(!window.opera)?document.createElement("iframe"):document.createElement("div")
shim.className="ddiframeshim"
shim.setAttribute("src",location.protocol=="https:"?this.httpsiframesrc:"about:blank")
shim.setAttribute("frameborder","0")
target.appendChild(shim)
try{shim.style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)'}
catch(e){}
return shim},positionshim:function(header,submenu,dir,scrollX,scrollY){if(header._istoplevel){var scrollY=window.pageYOffset?window.pageYOffset:this.standardbody.scrollTop
var topgap=header._offsets.top-scrollY
var bottomgap=scrollY+this.docheight-header._offsets.top-header._dimensions.h
if(topgap>0){this.shimmy.topshim.style.left=scrollX+"px"
this.shimmy.topshim.style.top=scrollY+"px"
this.shimmy.topshim.style.width="99%"
this.shimmy.topshim.style.height=topgap+"px"}
if(bottomgap>0){this.shimmy.bottomshim.style.left=scrollX+"px"
this.shimmy.bottomshim.style.top=header._offsets.top+header._dimensions.h+"px"
this.shimmy.bottomshim.style.width="99%"
this.shimmy.bottomshim.style.height=bottomgap+"px"}}},hideshim:function(){this.shimmy.topshim.style.width=this.shimmy.bottomshim.style.width=0
this.shimmy.topshim.style.height=this.shimmy.bottomshim.style.height=0},buildmenu:function(mainmenuid,header,submenu,submenupos,istoplevel,dir){header._master=mainmenuid
header._pos=submenupos
header._istoplevel=istoplevel
if(istoplevel){this.addEvent(header,function(e){ddlevelsmenu.hidemenu(ddlevelsmenu.subuls[this._master][parseInt(this._pos)])},"click")}
this.subuls[mainmenuid][submenupos]=submenu
header._dimensions={w:header.offsetWidth,h:header.offsetHeight,submenuw:submenu.offsetWidth,submenuh:submenu.offsetHeight}
this.getoffsetof(header)
submenu.style.left=0
submenu.style.top=0
submenu.style.visibility="hidden"
this.addEvent(header,function(e){if(!ddlevelsmenu.isContained(this,e)){var submenu=ddlevelsmenu.subuls[this._master][parseInt(this._pos)]
if(this._istoplevel){ddlevelsmenu.css(this,"selected","add")
clearTimeout(ddlevelsmenu.hidetimers[this._master][this._pos])}
ddlevelsmenu.getoffsetof(header)
var scrollX=window.pageXOffset?window.pageXOffset:ddlevelsmenu.standardbody.scrollLeft
var scrollY=window.pageYOffset?window.pageYOffset:ddlevelsmenu.standardbody.scrollTop
var submenurightedge=this._offsets.left+this._dimensions.submenuw+(this._istoplevel&&dir=="topbar"?0:this._dimensions.w)
var submenubottomedge=this._offsets.top+this._dimensions.submenuh
var menuleft=(this._istoplevel?this._offsets.left+(dir=="sidebar"?this._dimensions.w:0):this._dimensions.w)
if(submenurightedge-scrollX>ddlevelsmenu.docwidth){menuleft+=-this._dimensions.submenuw+(this._istoplevel&&dir=="topbar"?this._dimensions.w:-this._dimensions.w)}
submenu.style.left=menuleft+"px"
var menutop=(this._istoplevel?this._offsets.top+(dir=="sidebar"?0:this._dimensions.h):this.offsetTop)
if(submenubottomedge-scrollY>ddlevelsmenu.docheight){if(this._dimensions.submenuh<this._offsets.top+(dir=="sidebar"?this._dimensions.h:0)-scrollY){menutop+=-this._dimensions.submenuh+(this._istoplevel&&dir=="topbar"?-this._dimensions.h:this._dimensions.h)}
else{menutop+=-(this._offsets.top-scrollY)+(this._istoplevel&&dir=="topbar"?-this._dimensions.h:0)}}
submenu.style.top=menutop+"px"
if(ddlevelsmenu.enableshim&&(ddlevelsmenu.effects.enableswipe==false||ddlevelsmenu.nonFF)){ddlevelsmenu.positionshim(header,submenu,dir,scrollX,scrollY)}
else{submenu.FFscrollInfo={x:scrollX,y:scrollY}}
ddlevelsmenu.showmenu(header,submenu,dir)}},"mouseover")
this.addEvent(header,function(e){var submenu=ddlevelsmenu.subuls[this._master][parseInt(this._pos)]
if(this._istoplevel){if(!ddlevelsmenu.isContained(this,e)&&!ddlevelsmenu.isContained(submenu,e))
ddlevelsmenu.hidemenu(submenu)}
else if(!this._istoplevel&&!ddlevelsmenu.isContained(this,e)){ddlevelsmenu.hidemenu(submenu)}},"mouseout")},setopacity:function(el,value){el.style.opacity=value
if(typeof el.style.opacity!="string"){el.style.MozOpacity=value
if(el.filters){el.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity="+value*100+")"}}},showmenu:function(header,submenu,dir){if(this.effects.enableswipe||this.effects.enablefade){if(this.effects.enableswipe){var endpoint=(header._istoplevel&&dir=="topbar")?header._dimensions.submenuh:header._dimensions.submenuw
submenu.style.width=submenu.style.height=0
submenu.style.overflow="hidden"}
if(this.effects.enablefade){this.setopacity(submenu,0)}
submenu._curanimatedegree=0
submenu.style.visibility="visible"
clearInterval(submenu._animatetimer)
submenu._starttime=new Date().getTime()
submenu._animatetimer=setInterval(function(){ddlevelsmenu.revealmenu(header,submenu,endpoint,dir)},10)}
else{submenu.style.visibility="visible"}},revealmenu:function(header,submenu,endpoint,dir){var elapsed=new Date().getTime()-submenu._starttime
if(elapsed<this.effects.duration){if(this.effects.enableswipe){if(submenu._curanimatedegree==0){submenu.style[header._istoplevel&&dir=="topbar"?"width":"height"]="auto"}
submenu.style[header._istoplevel&&dir=="topbar"?"height":"width"]=(submenu._curanimatedegree*endpoint)+"px"}
if(this.effects.enablefade){this.setopacity(submenu,submenu._curanimatedegree)}}
else{clearInterval(submenu._animatetimer)
if(this.effects.enableswipe){submenu.style.width="auto"
submenu.style.height="auto"
submenu.style.overflow="visible"}
if(this.effects.enablefade){this.setopacity(submenu,1)
submenu.style.filter=""}
if(this.enableshim&&submenu.FFscrollInfo)
this.positionshim(header,submenu,dir,submenu.FFscrollInfo.x,submenu.FFscrollInfo.y)}
submenu._curanimatedegree=(1-Math.cos((elapsed/this.effects.duration)*Math.PI))/2},hidemenu:function(submenu){if(typeof submenu._pos!="undefined"){this.css(this.topitems[submenu._master][parseInt(submenu._pos)],"selected","remove")
if(this.enableshim)
this.hideshim()}
clearInterval(submenu._animatetimer)
submenu.style.left=0
submenu.style.top="-1000px"
submenu.style.visibility="hidden"},addEvent:function(target,functionref,tasktype){if(target.addEventListener)
target.addEventListener(tasktype,functionref,false);else if(target.attachEvent)
target.attachEvent('on'+tasktype,function(){return functionref.call(target,window.event)});},domready:function(functionref){if(dd_domreadycheck){functionref()
return}
if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false)
functionref();dd_domreadycheck=true},false)}
else if(document.attachEvent){if(document.documentElement.doScroll&&window==window.top)(function(){if(dd_domreadycheck){functionref()
return}
try{document.documentElement.doScroll("left")}catch(error){setTimeout(arguments.callee,0)
return;}
functionref();dd_domreadycheck=true})();}
if(document.attachEvent&&parent.length>0)
this.addEvent(window,function(){functionref()},"load");},init:function(mainmenuid,dir){this.standardbody=(document.compatMode=="CSS1Compat")?document.documentElement:document.body
this.topitemsindex=-1
this.ulindex=-1
this.topmenuids.push(mainmenuid)
this.topitems[mainmenuid]=[]
this.subuls[mainmenuid]=[]
this.hidetimers[mainmenuid]=[]
if(this.enableshim&&!this.shimadded){this.shimmy={}
this.shimmy.topshim=this.addshimmy(document.body)
this.shimmy.bottomshim=this.addshimmy(document.body)
this.shimadded=true}
var menubar=document.getElementById(mainmenuid)
var alllinks=menubar.getElementsByTagName("a")
this.getwindowsize()
for(var i=0;i<alllinks.length;i++){if(alllinks[i].getAttribute('rel')){this.topitemsindex++
this.ulindex++
var menuitem=alllinks[i]
this.topitems[mainmenuid][this.topitemsindex]=menuitem
var dropul=document.getElementById(menuitem.getAttribute('rel'))
document.body.appendChild(dropul)
dropul.style.zIndex=2000
dropul._master=mainmenuid
dropul._pos=this.topitemsindex
this.addEvent(dropul,function(){ddlevelsmenu.hidemenu(this)},"click")
var arrowclass=(dir=="sidebar")?"rightarrowpointer":"downarrowpointer"
var arrowpointer=(dir=="sidebar")?this.arrowpointers.rightarrow:this.arrowpointers.downarrow
if(this.arrowpointers.showarrow.toplevel)
this.addpointer(menuitem,arrowclass,arrowpointer,(dir=="sidebar")?"before":"after")
this.buildmenu(mainmenuid,menuitem,dropul,this.ulindex,true,dir)
dropul.onmouseover=function(){clearTimeout(ddlevelsmenu.hidetimers[this._master][this._pos])}
this.addEvent(dropul,function(e){if(!ddlevelsmenu.isContained(this,e)&&!ddlevelsmenu.isContained(ddlevelsmenu.topitems[this._master][parseInt(this._pos)],e)){var dropul=this
if(ddlevelsmenu.enableshim)
ddlevelsmenu.hideshim()
ddlevelsmenu.hidetimers[this._master][this._pos]=setTimeout(function(){ddlevelsmenu.hidemenu(dropul)},ddlevelsmenu.hideinterval)}},"mouseout")
var subuls=dropul.getElementsByTagName("ul")
for(var c=0;c<subuls.length;c++){this.ulindex++
var parentli=subuls[c].parentNode
if(this.arrowpointers.showarrow.sublevel)
this.addpointer(parentli.getElementsByTagName("a")[0],"rightarrowpointer",this.arrowpointers.rightarrow,"before")
this.buildmenu(mainmenuid,parentli,subuls[c],this.ulindex,false,dir)}}}
this.addEvent(window,function(){ddlevelsmenu.getwindowsize();ddlevelsmenu.gettopitemsdimensions()},"resize")},setup:function(mainmenuid,dir){this.domready(function(){ddlevelsmenu.init(mainmenuid,dir)})}}
